HomePort
hpd_curl_ev.h
Go to the documentation of this file.
1 /*
2  * Copyright 2011 Aalborg University. All rights reserved.
3  *
4  * Redistribution and use in source and binary forms, with or without modification, are
5  * permitted provided that the following conditions are met:
6  *
7  * 1. Redistributions of source code must retain the above copyright notice, this list of
8  * conditions and the following disclaimer.
9  *
10  * 2. Redistributions in binary form must reproduce the above copyright notice, this list
11  * of conditions and the following disclaimer in the documentation and/or other materials
12  * provided with the distribution.
13  *
14  * THIS SOFTWARE IS PROVIDED BY Aalborg University ''AS IS'' AND ANY EXPRESS OR IMPLIED
15  * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
16  * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL Aalborg University OR
17  * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
18  * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
19  * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
20  * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
21  * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
22  * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
23  *
24  * The views and conclusions contained in the software and documentation are those of the
25  * authors and should not be interpreted as representing official policies, either expressed
26  */
27 
28 #ifndef HOMEPORT_HPD_CURL_EV_H
29 #define HOMEPORT_HPD_CURL_EV_H
30 
31 #include <stddef.h>
32 #include <hpd/hpd_types.h>
33 
35 
36 typedef size_t (*hpd_curl_ev_f)(char *buffer, size_t size, size_t nmemb, void *userdata);
37 typedef void (*hpd_curl_ev_free_f)(void *userdata);
38 typedef void (*hpd_curl_ev_done_f)(void *userdata, int curl_code);
39 
42 
45 
49 
55 
57 
58 #endif
void(* hpd_curl_ev_free_f)(void *userdata)
Definition: hpd_curl_ev.h:37
hpd_error_t hpd_curl_ev_add_header(hpd_curl_ev_handle_t *handle, const char *header)
HPD_E_UNKNOWN: handle may be in an inconsistent state, and should not be added before a call to this ...
Definition: curl_ev.c:178
hpd_error_t hpd_curl_ev_set_done_callback(hpd_curl_ev_handle_t *handle, hpd_curl_ev_done_f on_done)
Definition: curl_ev.c:117
hpd_error_t hpd_curl_ev_cleanup(hpd_curl_ev_handle_t *handle)
Definition: curl_ev.c:90
hpd_curl_ev_f on_body
const hpd_module_t * context
void(* hpd_curl_ev_done_f)(void *userdata, int curl_code)
Definition: hpd_curl_ev.h:38
char * url
hpd_curl_ev_done_f on_done
size_t(* hpd_curl_ev_f)(char *buffer, size_t size, size_t nmemb, void *userdata)
Definition: hpd_curl_ev.h:36
hpd_curl_ev_free_f on_free
hpd_error_t hpd_curl_ev_set_verbose(hpd_curl_ev_handle_t *handle, long int bool)
Definition: curl_ev.c:164
enum hpd_error hpd_error_t
Definition: hpd_types.h:167
hpd_curl_ev_f on_header
hpd_error_t hpd_curl_ev_remove_handle(hpd_curl_ev_handle_t *handle)
hpd_error_t hpd_curl_ev_set_postfields(hpd_curl_ev_handle_t *handle, const void *data, size_t len)
HPD_E_UNKNOWN: handle may be in an inconsistent state, and should not be added before a call to this ...
Definition: curl_ev.c:145
hpd_error_t hpd_curl_ev_set_data(hpd_curl_ev_handle_t *handle, void *data, hpd_curl_ev_free_f on_free)
Definition: curl_ev.c:133
hpd_error_t hpd_curl_ev_set_header_callback(hpd_curl_ev_handle_t *handle, hpd_curl_ev_f on_header)
Definition: curl_ev.c:103
hpd_error_t hpd_curl_ev_add_handle(hpd_curl_ev_handle_t *handle)
hpd_error_t hpd_curl_ev_set_body_callback(hpd_curl_ev_handle_t *handle, hpd_curl_ev_f on_body)
Definition: curl_ev.c:110
hpd_error_t hpd_curl_ev_init(hpd_curl_ev_handle_t **handle, const hpd_module_t *context)
Definition: curl_ev.c:71
hpd_error_t hpd_curl_ev_set_url(hpd_curl_ev_handle_t *handle, const char *url)
Definition: curl_ev.c:155
hpd_error_t hpd_curl_ev_set_custom_request(hpd_curl_ev_handle_t *handle, const char *request)
Definition: curl_ev.c:124