pazpar2  1.14.1
Data Structures | Typedefs | Functions
http.h File Reference
#include <yaz/wrbuf.h>
#include <yaz/timing.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_shttp_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 (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

◆ http_channel_destroy_t

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

Definition at line 125 of file http.h.

◆ http_channel_observer_t

Definition at line 29 of file http.h.

◆ http_server_t

typedef struct http_server* http_server_t

Definition at line 31 of file http.h.

◆ http_sessions_t

typedef struct http_sessions* http_sessions_t

Definition at line 32 of file http.h.

Function Documentation

◆ http_add_observer()

http_channel_observer_t http_add_observer ( struct http_channel c,
void *  data,
http_channel_destroy_t  des 
)

◆ http_addheader()

void http_addheader ( struct http_response r,
const char *  name,
const char *  value 
)

◆ http_argbyname()

const char* http_argbyname ( struct http_request r,
const char *  name 
)

◆ http_channel_observer_chan()

struct http_channel* http_channel_observer_chan ( http_channel_observer_t  obs)

◆ http_close_server()

void http_close_server ( struct conf_server ser)

Definition at line 1362 of file http.c.

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

Referenced by cmd_exit(), and config_stop_listeners().

◆ http_command()

void http_command ( struct http_channel c)

◆ http_create_response()

struct http_response* http_create_response ( struct http_channel c)

◆ http_header_append()

struct http_header* http_header_append ( struct http_channel ch,
struct http_header hp,
const char *  name,
const char *  value 
)

Definition at line 702 of file http.c.

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

Referenced by http_proxy().

◆ http_headerbyname()

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

Definition at line 303 of file http.c.

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

◆ http_init()

int http_init ( struct conf_server ser,
const char *  record_fname 
)

◆ http_lookup_header()

const char* http_lookup_header ( struct http_header header,
const char *  name 
)

◆ http_mutex_init()

void http_mutex_init ( struct conf_server server)

◆ http_observer_set_data2()

void http_observer_set_data2 ( http_channel_observer_t  obs,
void *  data2 
)

Definition at line 1460 of file http.c.

References http_channel_observer_s::data2.

◆ http_remove_observer()

void http_remove_observer ( http_channel_observer_t  obs)

◆ http_send_response()

void http_send_response ( struct http_channel c)

◆ http_server_destroy()

void http_server_destroy ( http_server_t  hs)

◆ http_sessions_create()

http_sessions_t http_sessions_create ( void  )

◆ http_sessions_destroy()

void http_sessions_destroy ( http_sessions_t  hs)

◆ http_set_proxyaddr()

void http_set_proxyaddr ( const char *  url,
struct conf_server ser 
)

Definition at line 1375 of file http.c.

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

Referenced by config_start_listeners().

◆ urlencode()

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

Definition at line 266 of file http.c.