about summary refs log tree commit diff stats
path: root/src
diff options
context:
space:
mode:
authorKelly Rauchenberger <fefferburbia@gmail.com>2016-05-21 11:30:28 -0400
committerKelly Rauchenberger <fefferburbia@gmail.com>2016-05-21 11:30:28 -0400
commitcdea9154ff180e95dfbdd8e0647922ca8afa3d46 (patch)
treeb9afec2087c64903bf28e9ddc9253573bb10a0fd /src
parent4bcf6d116b92f5969714602ed082ff2a7263edde (diff)
downloadlibtwittercpp-cdea9154ff180e95dfbdd8e0647922ca8afa3d46.tar.gz
libtwittercpp-cdea9154ff180e95dfbdd8e0647922ca8afa3d46.tar.bz2
libtwittercpp-cdea9154ff180e95dfbdd8e0647922ca8afa3d46.zip
Projects using libtwitter++ no longer have to include its dependencies
Diffstat (limited to 'src')
-rw-r--r--src/client.cpp4
-rw-r--r--src/client.h12
2 files changed, 8 insertions, 8 deletions
diff --git a/src/client.cpp b/src/client.cpp index ffb651b..bae563f 100644 --- a/src/client.cpp +++ b/src/client.cpp
@@ -3,6 +3,8 @@
3#include <set> 3#include <set>
4#include <algorithm> 4#include <algorithm>
5#include <liboauthcpp/liboauthcpp.h> 5#include <liboauthcpp/liboauthcpp.h>
6#include <curl_easy.h>
7#include <curl_header.h>
6#include "util.h" 8#include "util.h"
7#include <json.hpp> 9#include <json.hpp>
8 10
@@ -727,7 +729,7 @@ namespace twitter {
727 } 729 }
728 } 730 }
729 731
730 int client::stream::write(char* ptr, size_t size, size_t nmemb) 732 size_t client::stream::write(char* ptr, size_t size, size_t nmemb)
731 { 733 {
732 for (size_t i = 0; i < size*nmemb; i++) 734 for (size_t i = 0; i < size*nmemb; i++)
733 { 735 {
diff --git a/src/client.h b/src/client.h index ae80ed9..750d603 100644 --- a/src/client.h +++ b/src/client.h
@@ -5,8 +5,6 @@
5#include "tweet.h" 5#include "tweet.h"
6#include "auth.h" 6#include "auth.h"
7#include <list> 7#include <list>
8#include <curl_easy.h>
9#include <curl_header.h>
10#include <thread> 8#include <thread>
11#include <mutex> 9#include <mutex>
12#include "notification.h" 10#include "notification.h"
@@ -20,6 +18,8 @@ namespace OAuth {
20 class Client; 18 class Client;
21}; 19};
22 20
21class curl_httppost;
22
23namespace twitter { 23namespace twitter {
24 24
25 class client { 25 class client {
@@ -36,6 +36,9 @@ namespace twitter {
36 void start(); 36 void start();
37 void stop(); 37 void stop();
38 38
39 int progress();
40 size_t write(char* ptr, size_t size, size_t nmemb);
41
39 private: 42 private:
40 enum class backoff { 43 enum class backoff {
41 none, 44 none,
@@ -45,11 +48,6 @@ namespace twitter {
45 }; 48 };
46 49
47 void run(); 50 void run();
48 int progress();
49 int write(char* ptr, size_t size, size_t nmemb);
50
51 friend int client_stream_progress_callback_wrapper(void* stream, curl_off_t, curl_off_t, curl_off_t, curl_off_t);
52 friend size_t client_stream_write_callback_wrapper(void* ptr, size_t size, size_t nmemb, void* stream);
53 51
54 client& _client; 52 client& _client;
55 notify_callback _notify; 53 notify_callback _notify;