#ifndef _CURL_ADAPTER_H_ | |
#define _CURL_ADAPTER_H_ | |
#include <stdlib.h> | |
#include <stdio.h> | |
#include <dmgr_api.h> | |
typedef size_t(*callbackFunc)(void *ptr, size_t size, size_t nmemb, void *stream); | |
int http_post(const char* url, char* post_buf, policy_info_t *policy, | |
callbackFunc func, void *ptr); | |
int http_get(const char*url, long resume_from, policy_info_t *policy, | |
callbackFunc func, void *ptr); | |
int http_is_reponse_successful(long resp_code) ; | |
long http_get_response_code(); | |
#endif // !_CURL_ADAPTER_H_ |