This module wraps the cUrl library and adds also support for OAuth protocol.
typedef struct _MicrofeedHttp MicrofeedHttp |
Definition at line 19 of file microfeedhttp.h.
typedef void(* MicrofeedHttpOAuthAccessCallback)(MicrofeedHttp *http, const char *access_token, const char *access_token_secret, void *user_data) |
Definition at line 22 of file microfeedhttp.h.
typedef int(* MicrofeedHttpOAuthAuthorizeCallback)(MicrofeedHttp *http, const char *url, void *user_data) |
Definition at line 21 of file microfeedhttp.h.
Definition at line 24 of file microfeedhttp.h.
time_t microfeed_get_reply_start_time | ( | MicrofeedHttp * | http | ) |
void microfeed_http_cleanup | ( | ) |
void microfeed_http_free | ( | MicrofeedHttp * | http | ) |
Definition at line 132 of file microfeedhttp.c.
References _MicrofeedHttp::buffer, _MicrofeedHttp::cookie_filename, _MicrofeedHttp::curl, and _MicrofeedHttp::userpass.
void microfeed_http_free_string | ( | MicrofeedHttp * | http, | |
char * | ptr | |||
) |
Definition at line 142 of file microfeedhttp.c.
const void* microfeed_http_get_data | ( | MicrofeedHttp * | http, | |
const char * | url, | |||
size_t * | size_return | |||
) |
Definition at line 147 of file microfeedhttp.c.
References _OAuth::access_callback, _OAuth::access_token, _OAuth::access_token_secret, _MicrofeedHttp::buffer, _MicrofeedHttp::curl, _Buffer::data, _MicrofeedHttp::oauth, _Buffer::size, and _OAuth::user_data.
Referenced by microfeed_http_get_json().
MicrofeedJson* microfeed_http_get_json | ( | MicrofeedHttp * | http, | |
const char * | url | |||
) |
Definition at line 183 of file microfeedhttp.c.
References _MicrofeedHttp::buffer, _Buffer::data, microfeed_http_get_data(), microfeed_json_new_from_data(), and _Buffer::size.
time_t microfeed_http_get_server_time | ( | MicrofeedHttp * | http | ) |
void microfeed_http_init | ( | int | multithreaded | ) |
MicrofeedHttp* microfeed_http_new | ( | ) |
Definition at line 101 of file microfeedhttp.c.
References _MicrofeedHttp::buffer, _MicrofeedHttp::curl, microfeed_memory_allocate, and microfeed_memory_free().
time_t microfeed_http_parse_date | ( | MicrofeedHttp * | http, | |
const char * | datestring | |||
) |
Definition at line 269 of file microfeedhttp.c.
char* microfeed_http_post_data | ( | MicrofeedHttp * | http, | |
const char * | url, | |||
size_t * | len, | |||
const char * | post_data | |||
) |
Definition at line 205 of file microfeedhttp.c.
References _OAuth::access_callback, _OAuth::access_token, _OAuth::access_token_secret, _MicrofeedHttp::buffer, _MicrofeedHttp::curl, _Buffer::data, _MicrofeedHttp::oauth, _MicrofeedHttp::reply_start_time, _MicrofeedHttp::server_time, _Buffer::size, and _OAuth::user_data.
Referenced by microfeed_http_post_json().
MicrofeedJson* microfeed_http_post_json | ( | MicrofeedHttp * | http, | |
const char * | url, | |||
const char * | post_data | |||
) |
Definition at line 279 of file microfeedhttp.c.
References _MicrofeedHttp::buffer, _Buffer::data, microfeed_http_post_data(), microfeed_json_new_from_data(), and _Buffer::size.
int microfeed_http_set_basic_authentication | ( | MicrofeedHttp * | http, | |
const char * | userpass | |||
) |
Definition at line 307 of file microfeedhttp.c.
References _MicrofeedHttp::curl, and _MicrofeedHttp::userpass.
int microfeed_http_set_cookie_file | ( | MicrofeedHttp * | http, | |
const char * | filename | |||
) |
Definition at line 291 of file microfeedhttp.c.
References _MicrofeedHttp::cookie_filename, and _MicrofeedHttp::curl.
void microfeed_http_set_oauth_access_token | ( | MicrofeedHttp * | http, | |
const char * | access_token, | |||
const char * | access_token_secret | |||
) |
Definition at line 344 of file microfeedhttp.c.
References _OAuth::access_token, _OAuth::access_token_secret, and _MicrofeedHttp::oauth.
int microfeed_http_set_oauth_authentication | ( | MicrofeedHttp * | http, | |
const char * | request_token_url, | |||
const char * | user_authorization_url, | |||
const char * | access_token_url, | |||
const char * | consumer_key, | |||
const char * | consumer_secret, | |||
MicrofeedHttpOAuthAuthorizeCallback | authorize_callback, | |||
MicrofeedHttpOAuthAccessCallback | access_callback, | |||
void * | user_data | |||
) |
void microfeed_http_set_oauth_signature_method | ( | MicrofeedHttp * | http, | |
MicrofeedHttpOAuthSignatureMethod | signature_method | |||
) |
void microfeed_http_unset_oauth_authentication | ( | MicrofeedHttp * | http | ) |