pazpar2  1.6.30
Data Structures | Typedefs | Functions
http.h File Reference
#include <yaz/wrbuf.h>
#include "eventl.h"

Go to the source code of this file.

Data Structures

struct  http_channel
struct  http_proxy
struct  http_header
struct  http_argument
struct  http_request
struct  http_response

Typedefs

typedef struct
http_channel_observer_s
http_channel_observer_t
typedef struct http_serverhttp_server_t
typedef struct http_sessionshttp_sessions_t
typedef void(* http_channel_destroy_t )(void *data, struct http_channel *c, void *data2)

Functions

void http_mutex_init (struct conf_server *server)
void http_server_destroy (http_server_t hs)
void http_set_proxyaddr (const char *url, struct conf_server *ser)
int http_init (const char *addr, struct conf_server *ser, const char *record_fname)
void http_close_server (struct conf_server *ser)
void http_addheader (struct http_response *r, const char *name, const char *value)
const char * http_lookup_header (struct http_header *header, const char *name)
struct http_headerhttp_header_append (struct http_channel *ch, struct http_header *hp, const char *name, const char *value)
const char * http_argbyname (struct http_request *r, const char *name)
const char * http_headerbyname (struct http_header *r, const char *name)
struct http_responsehttp_create_response (struct http_channel *c)
void http_send_response (struct http_channel *c)
void urlencode (const char *i, char *o)
http_channel_observer_t http_add_observer (struct http_channel *c, void *data, http_channel_destroy_t)
void http_observer_set_data2 (http_channel_observer_t obs, void *data2)
void http_remove_observer (http_channel_observer_t obs)
struct http_channelhttp_channel_observer_chan (http_channel_observer_t obs)
void http_command (struct http_channel *c)
http_sessions_t http_sessions_create (void)
void http_sessions_destroy (http_sessions_t hs)

Typedef Documentation

typedef void(* http_channel_destroy_t)(void *data, struct http_channel *c, void *data2)

Definition at line 124 of file http.h.

Definition at line 28 of file http.h.

typedef struct http_server* http_server_t

Definition at line 30 of file http.h.

typedef struct http_sessions* http_sessions_t

Definition at line 31 of file http.h.

Function Documentation

http_channel_observer_t http_add_observer ( struct http_channel c,
void *  data,
http_channel_destroy_t   
)
void http_addheader ( struct http_response r,
const char *  name,
const char *  value 
)
const char* http_argbyname ( struct http_request r,
const char *  name 
)
struct http_channel* http_channel_observer_chan ( http_channel_observer_t  obs)
read
void http_close_server ( struct conf_server ser)

Definition at line 1327 of file http.c.

References conf_server::http_server, and http_server::listener_socket.

Referenced by cmd_exit(), and config_stop_listeners().

void http_command ( struct http_channel c)
struct http_response* http_create_response ( struct http_channel c)
read
struct http_header* http_header_append ( struct http_channel ch,
struct http_header hp,
const char *  name,
const char *  value 
)
read

Definition at line 699 of file http.c.

References http_header::name, http_header::next, http_channel::nmem, and http_header::value.

Referenced by http_proxy().

const char* http_headerbyname ( struct http_header r,
const char *  name 
)

Definition at line 302 of file http.c.

References http_header::name, http_header::next, and http_header::value.

int http_init ( const char *  addr,
struct conf_server ser,
const char *  record_fname 
)
const char* http_lookup_header ( struct http_header header,
const char *  name 
)

Definition at line 118 of file http.c.

References http_header::name, http_header::next, and http_header::value.

Referenced by cmd_init(), cmd_settings(), http_parse_request(), and http_proxy().

void http_mutex_init ( struct conf_server server)
void http_observer_set_data2 ( http_channel_observer_t  obs,
void *  data2 
)

Definition at line 1425 of file http.c.

References http_channel_observer_s::data2.

void http_remove_observer ( http_channel_observer_t  obs)
void http_send_response ( struct http_channel c)
void http_server_destroy ( http_server_t  hs)
http_sessions_t http_sessions_create ( void  )
void http_sessions_destroy ( http_sessions_t  hs)
void http_set_proxyaddr ( const char *  url,
struct conf_server ser 
)

Definition at line 1340 of file http.c.

References conf_server::http_server, and http_server::proxy_addr.

Referenced by config_start_listeners().

void urlencode ( const char *  i,
char *  o 
)

Definition at line 265 of file http.c.