PingAccess Agent SDK for C
Public Attributes | List of all members
paa_http_response_struct Struct Reference

#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)
 

Detailed Description

The HTTP response structure. This structure is used to process the agent response from PingAccess when the paa_http_client interface is not used.

Member Data Documentation

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

Parameters
responsethe response handle
cbthe callback for the header
userdatathe data passed to the callback
Returns
APR_SUCCESS on success
APR_PAA_HTTP_ERROR on error
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.

Parameters
responsethe response handle
cbthe callback for the status
userdatathe data passed to the callback
Returns
APR_SUCCESS on success
APR_PAA_HTTP_ERROR on error
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.

Parameters
responsethe response handle
cbthe callback for the body
userdatathe data passed to the callback
Returns
APR_SUCCESS on success
APR_PAA_HTTP_ERROR on error
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.

Parameters
responsethe response handle
namethe name of the header
Returns
APR_SUCCESS on success
APR_PAA_HTTP_ERROR on error

The documentation for this struct was generated from the following file: