PingAccess Agent SDK for C
|
#include <paa-http-client.h>
Public Attributes | |
void * | impl |
apr_status_t(* | process_status )(const paa_http_response *response, paa_resp_status_cb cb, void *userdata) |
apr_status_t(* | process_headers )(const paa_http_response *response, paa_resp_header_cb cb, void *userdata) |
apr_status_t(* | remove_header )(const paa_http_response *response, const char *name) |
apr_status_t(* | register_body_callback )(const paa_http_response *response, paa_resp_body_cb cb, void *userdata) |
The HTTP response structure. This structure is used to process the agent response from PingAccess when the paa_http_client interface is not used.
void* paa_http_response_struct::impl |
opaque implementation handle
apr_status_t(* paa_http_response_struct::process_headers) (const paa_http_response *response, paa_resp_header_cb cb, void *userdata) |
Processes the headers of the response. Implementations should invoke the specified callback, once per response header
response | the response handle |
cb | the callback for the header |
userdata | the data passed to the callback |
apr_status_t(* paa_http_response_struct::process_status) (const paa_http_response *response, paa_resp_status_cb cb, void *userdata) |
Processes the status of the response. Implementations should invoke the specified callback with the appropriate data from the response status line.
response | the response handle |
cb | the callback for the status |
userdata | the data passed to the callback |
apr_status_t(* paa_http_response_struct::register_body_callback) (const paa_http_response *response, paa_resp_body_cb cb, void *userdata) |
Registers a callback that can be invoked to allow the SDK to consume the body of the response for PAAP caching purposes. The body can be streamed to the callback in chunks. The callback MUST not perform any blocking operations.
The callback should be invoked with a size of 0 when the response body is complete. Additionally, if the response has no body this callback should still be invoked with a size of 0 to indicate this case.
response | the response handle |
cb | the callback for the body |
userdata | the data passed to the callback |
apr_status_t(* paa_http_response_struct::remove_header) (const paa_http_response *response, const char *name) |
Removes a header from the response. All header values for the specified header name should be removed from the headers.
response | the response handle |
name | the name of the header |