diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/client.cpp | 4 | ||||
-rw-r--r-- | src/client.h | 12 |
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 | ||
21 | class curl_httppost; | ||
22 | |||
23 | namespace twitter { | 23 | namespace 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; |