OpenSDN source code
http_curl.h File Reference
#include <curl/curl.h>
Include dependency graph for http_curl.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  _GlobalInfo
 
struct  _ConnInfo
 
struct  _SockInfo
 
class  CurlErrorCategory
 

Macros

#define NOEXCEPT
 
#define set_curl_option(handle, option, parameter)
 

Typedefs

typedef struct _GlobalInfo GlobalInfo
 
typedef struct _ConnInfo ConnInfo
 
typedef struct _SockInfo SockInfo
 

Functions

int http_get (ConnInfo *conn, GlobalInfo *g)
 
void set_url (ConnInfo *conn, const char *url)
 
int curl_init (HttpClient *)
 
ConnInfonew_conn (HttpConnection *connection, GlobalInfo *g, bool header, bool short_timeout, bool reuse)
 
void del_conn (HttpConnection *connection, GlobalInfo *g)
 
void del_curl_handle (ConnInfo *curl_handle, GlobalInfo *g)
 
void set_header_options (ConnInfo *conn, const char *options)
 
void set_ssl_options (ConnInfo *conn, const char *client_cert, const char *client_cert_type, const char *client_key, const char *ca_cert)
 
void set_post_string (ConnInfo *conn, const char *post, uint32_t len)
 
void set_put_string (ConnInfo *conn, const char *put, uint32_t len)
 
int http_head (ConnInfo *conn, GlobalInfo *g)
 
int http_put (ConnInfo *conn, GlobalInfo *g)
 
int http_post (ConnInfo *conn, GlobalInfo *g)
 
int http_delete (ConnInfo *conn, GlobalInfo *g)
 
bool timer_cb (GlobalInfo *g)
 

Variables

const CurlErrorCategory curl_error_category
 

Macro Definition Documentation

◆ NOEXCEPT

#define NOEXCEPT

Definition at line 11 of file http_curl.h.

◆ set_curl_option

#define set_curl_option (   handle,
  option,
  parameter 
)
Value:
do { \
curl_easy_setopt(handle, option, parameter); \
} while (0)

Definition at line 16 of file http_curl.h.

Typedef Documentation

◆ ConnInfo

typedef struct _ConnInfo ConnInfo

◆ GlobalInfo

typedef struct _GlobalInfo GlobalInfo

◆ SockInfo

typedef struct _SockInfo SockInfo

Function Documentation

◆ curl_init()

int curl_init ( HttpClient client)

Definition at line 507 of file http_curl.cc.

Here is the call graph for this function:

◆ del_conn()

void del_conn ( HttpConnection connection,
GlobalInfo g 
)

Definition at line 364 of file http_curl.cc.

Here is the call graph for this function:

◆ del_curl_handle()

void del_curl_handle ( ConnInfo curl_handle,
GlobalInfo g 
)

Definition at line 378 of file http_curl.cc.

◆ http_delete()

int http_delete ( ConnInfo conn,
GlobalInfo g 
)

Definition at line 501 of file http_curl.cc.

◆ http_get()

int http_get ( ConnInfo conn,
GlobalInfo g 
)

Definition at line 482 of file http_curl.cc.

◆ http_head()

int http_head ( ConnInfo conn,
GlobalInfo g 
)

Definition at line 487 of file http_curl.cc.

◆ http_post()

int http_post ( ConnInfo conn,
GlobalInfo g 
)

Definition at line 497 of file http_curl.cc.

Here is the call graph for this function:

◆ http_put()

int http_put ( ConnInfo conn,
GlobalInfo g 
)

Definition at line 493 of file http_curl.cc.

Here is the call graph for this function:

◆ new_conn()

ConnInfo* new_conn ( HttpConnection connection,
GlobalInfo g,
bool  header,
bool  short_timeout,
bool  reuse 
)

Definition at line 391 of file http_curl.cc.

Here is the call graph for this function:

◆ set_header_options()

void set_header_options ( ConnInfo conn,
const char *  options 
)

Definition at line 445 of file http_curl.cc.

◆ set_post_string()

void set_post_string ( ConnInfo conn,
const char *  post,
uint32_t  len 
)

Definition at line 464 of file http_curl.cc.

◆ set_put_string()

void set_put_string ( ConnInfo conn,
const char *  put,
uint32_t  len 
)

Definition at line 473 of file http_curl.cc.

◆ set_ssl_options()

void set_ssl_options ( ConnInfo conn,
const char *  client_cert,
const char *  client_cert_type,
const char *  client_key,
const char *  ca_cert 
)

Definition at line 450 of file http_curl.cc.

◆ set_url()

void set_url ( ConnInfo conn,
const char *  url 
)

Definition at line 440 of file http_curl.cc.

◆ timer_cb()

bool timer_cb ( GlobalInfo g)

Definition at line 152 of file http_curl.cc.

Here is the call graph for this function:

Variable Documentation

◆ curl_error_category

const CurlErrorCategory curl_error_category
extern

Definition at line 34 of file http_curl.cc.