NUGU SDK Linux  1.7.6
nugu_http.h File Reference
#include <stddef.h>
#include <nugu.h>
+ Include dependency graph for nugu_http.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  _nugu_http_response
 HTTP Response object. More...
 

Typedefs

typedef int(* NuguHttpCallback) (NuguHttpRequest *req, const NuguHttpResponse *resp, void *user_data)
 Callback prototype for receiving async HTTP response. More...
 
typedef struct _nugu_http_header NuguHttpHeader
 HTTP Header object.
 
typedef struct _nugu_http_host NuguHttpHost
 HTTP Host object.
 
typedef int(* NuguHttpProgressCallback) (NuguHttpRequest *req, const NuguHttpResponse *resp, long long downloaded, long long total, void *user_data)
 Callback prototype for HTTP download progress.
 
typedef struct _nugu_http_request NuguHttpRequest
 HTTP Request object.
 
typedef struct _nugu_http_response NuguHttpResponse
 HTTP Response object.
 

Enumerations

enum  NuguHttpRequestType { NUGU_HTTP_REQUEST_GET , NUGU_HTTP_REQUEST_POST , NUGU_HTTP_REQUEST_PUT , NUGU_HTTP_REQUEST_DELETE }
 HTTP request types.
 

Functions

NUGU_API NuguHttpRequestnugu_http_delete (NuguHttpHost *host, const char *path, NuguHttpHeader *header, NuguHttpCallback callback, void *user_data)
 A convenient API for HTTP DELETE async requests. More...
 
NUGU_API NuguHttpRequestnugu_http_delete_sync (NuguHttpHost *host, const char *path, NuguHttpHeader *header)
 A convenient API for HTTP DELETE sync requests. More...
 
NUGU_API NuguHttpRequestnugu_http_download (NuguHttpHost *host, const char *path, const char *dest_path, NuguHttpHeader *header, NuguHttpCallback callback, NuguHttpProgressCallback progress_callback, void *user_data)
 A convenient API for HTTP file download async requests. More...
 
NUGU_API NuguHttpRequestnugu_http_get (NuguHttpHost *host, const char *path, NuguHttpHeader *header, NuguHttpCallback callback, void *user_data)
 A convenient API for HTTP GET async requests. More...
 
NUGU_API NuguHttpRequestnugu_http_get_sync (NuguHttpHost *host, const char *path, NuguHttpHeader *header)
 A convenient API for HTTP GET sync requests. More...
 
NUGU_API int nugu_http_header_add (NuguHttpHeader *header, const char *key, const char *value)
 Add a key-value string to header object. More...
 
NUGU_API NuguHttpHeadernugu_http_header_dup (const NuguHttpHeader *src_header)
 Duplicate the http header object. More...
 
NUGU_API const char * nugu_http_header_find (NuguHttpHeader *header, const char *key)
 Find value from header object. More...
 
NUGU_API void nugu_http_header_free (NuguHttpHeader *header)
 Destroy the header object. More...
 
NUGU_API int nugu_http_header_import (NuguHttpHeader *header, const NuguHttpHeader *from)
 Import header data from other header object. More...
 
NUGU_API NuguHttpHeadernugu_http_header_new (void)
 Create a new HTTP header object. More...
 
NUGU_API int nugu_http_header_remove (NuguHttpHeader *header, const char *key)
 Remove a key-value string from header object. More...
 
NUGU_API void nugu_http_host_free (NuguHttpHost *host)
 Destroy the host object. More...
 
NUGU_API NuguHttpHostnugu_http_host_new (const char *url)
 Create a new HTTP host object. More...
 
NUGU_API const char * nugu_http_host_peek_url (NuguHttpHost *host)
 Get url from HTTP host object. More...
 
NUGU_API void nugu_http_host_set_connection_timeout (NuguHttpHost *host, long msecs)
 Set connection timeout to host. More...
 
NUGU_API void nugu_http_host_set_timeout (NuguHttpHost *host, long msecs)
 Set timeout to host. More...
 
NUGU_API void nugu_http_init (void)
 Initialize HTTP module (curl_global_init)
 
NUGU_API NuguHttpRequestnugu_http_post (NuguHttpHost *host, const char *path, NuguHttpHeader *header, const void *body, size_t body_len, NuguHttpCallback callback, void *user_data)
 A convenient API for HTTP POST async requests. More...
 
NUGU_API NuguHttpRequestnugu_http_post_sync (NuguHttpHost *host, const char *path, NuguHttpHeader *header, const void *body, size_t body_len)
 A convenient API for HTTP POST sync requests. More...
 
NUGU_API NuguHttpRequestnugu_http_put (NuguHttpHost *host, const char *path, NuguHttpHeader *header, const void *body, size_t body_len, NuguHttpCallback callback, void *user_data)
 A convenient API for HTTP PUT async requests. More...
 
NUGU_API NuguHttpRequestnugu_http_put_sync (NuguHttpHost *host, const char *path, NuguHttpHeader *header, const void *body, size_t body_len)
 A convenient API for HTTP PUT sync requests. More...
 
NUGU_API NuguHttpRequestnugu_http_request (enum NuguHttpRequestType type, NuguHttpHost *host, const char *path, NuguHttpHeader *header, const void *body, size_t body_len, NuguHttpCallback callback, void *user_data)
 HTTP async request. More...
 
NUGU_API void nugu_http_request_free (NuguHttpRequest *req)
 Destroy the HTTP request object. More...
 
NUGU_API const NuguHttpResponsenugu_http_request_response_get (NuguHttpRequest *req)
 Get the HTTP response from request object. More...
 
NUGU_API NuguHttpRequestnugu_http_request_sync (enum NuguHttpRequestType type, NuguHttpHost *host, const char *path, NuguHttpHeader *header, const void *body, size_t body_len)
 HTTP sync request. More...
 
NUGU_API NuguHttpResponsenugu_http_response_dup (const NuguHttpResponse *orig)
 Duplicate the HTTP response object. More...
 
NUGU_API void nugu_http_response_free (NuguHttpResponse *resp)
 Destroy the HTTP response object. More...