PingAccess Agent SDK for C
Classes | Typedefs
paa-http-server-facade.h File Reference
#include <stdlib.h>
#include "apr.h"
#include "apr_pools.h"

Go to the source code of this file.


struct  paa_client_request_struct
struct  paa_client_response_struct


typedef struct paa_agent_response_struct paa_agent_response
typedef struct paa_client_request_struct paa_client_request
typedef size_t(* paa_client_request_read_cb) (unsigned char *dst, size_t size, void *userdata)
typedef apr_status_t(* paa_header_cb) (const char *name, const char *value, void *userdata)
typedef struct paa_client_response_struct paa_client_response
typedef size_t(* paa_client_response_write_cb) (const unsigned char *src, size_t size, void *userdata)

Detailed Description

Header for HTTP Server Facade.

This file defines interfaces for the client request and response to be provided by the HTTP server/proxy. Some of the functions in these interfaces only need to be implemented when the SDK consumer is also using the paa_http_client interface.

Note: the SDK assumes that all data returned by these interfaces has been properly sanitized and is well-formed.

Typedef Documentation

typedef struct paa_agent_response_struct paa_agent_response

Opaque agent response handle

Not exposed to SDK consumers

Forward declaration typedef for client request structure

typedef size_t(* paa_client_request_read_cb) (unsigned char *dst, size_t size, void *userdata)

Callback used to read the body of the request. This type is only used when using the paa_http_client interface.

dstthe destination of the data
sizethe size of each member in the data
userdatathe userdata returned from the paa_client_request_get_read_data function
the number of bytes stored in the destination. -1 cast as a size_t on error. 0 should be returned to indicate the end of the request body data.

Forward declaration of client response structure

typedef size_t(* paa_client_response_write_cb) (const unsigned char *src, size_t size, void *userdata)

Callback for writing the response body of the client response

srcthe source for the response body data
sizethe size of the response data
userdatathe userdata specified with the callback
the number of bytes written should be size on success
typedef apr_status_t(* paa_header_cb) (const char *name, const char *value, void *userdata)

Callback used to enumerate headers in a request or response

namethe name of the header
valuethe value of the header
userdatathe data specified with the callback
APR_EAGAIN if more headers should be enumerated
other return value indicates headers should stop and value passed to caller