zgdu.h File Reference

Header for the Z_GDU (HTTP or Z39.50 package). More...

#include <yaz/z-core.h>

Go to the source code of this file.

Data Structures

struct  Z_HTTP_Header
struct  Z_HTTP_Request
struct  Z_HTTP_Response
struct  Z_GDU

Defines

#define Z_GDU_Z3950   1
#define Z_GDU_HTTP_Request   2
#define Z_GDU_HTTP_Response   3

Typedefs

typedef struct Z_HTTP_Header Z_HTTP_Header

Functions

int z_GDU (ODR o, Z_GDU **p, int opt, const char *name)
void z_HTTP_header_add (ODR o, Z_HTTP_Header **hp, const char *n, const char *v)
void z_HTTP_header_add_content_type (ODR o, Z_HTTP_Header **hp, const char *content_type, const char *charset)
void z_HTTP_header_add_basic_auth (ODR o, Z_HTTP_Header **hp, const char *username, const char *password)
const char * z_HTTP_header_lookup (const Z_HTTP_Header *hp, const char *n)
const char * z_HTTP_errmsg (int code)
Z_GDUz_get_HTTP_Response (ODR o, int code)
Z_GDUz_get_HTTP_Request (ODR o)
Z_GDUz_get_HTTP_Request_host_path (ODR odr, const char *host, const char *path)
int yaz_decode_http_request (ODR o, Z_HTTP_Request **hr_p)
int yaz_decode_http_response (ODR o, Z_HTTP_Response **hr_p)
int yaz_encode_http_response (ODR o, Z_HTTP_Response *hr)
int yaz_encode_http_request (ODR o, Z_HTTP_Request *hr)


Detailed Description

Header for the Z_GDU (HTTP or Z39.50 package).

Definition in file zgdu.h.


Define Documentation

#define Z_GDU_HTTP_Request   2

Definition at line 66 of file zgdu.h.

Referenced by z_GDU(), and z_get_HTTP_Request().

#define Z_GDU_HTTP_Response   3

Definition at line 67 of file zgdu.h.

Referenced by z_GDU(), and z_get_HTTP_Response().

#define Z_GDU_Z3950   1

Definition at line 65 of file zgdu.h.

Referenced by z_GDU().


Typedef Documentation

typedef struct Z_HTTP_Header Z_HTTP_Header

Definition at line 40 of file zgdu.h.


Function Documentation

int yaz_decode_http_request ( ODR  o,
Z_HTTP_Request **  hr_p 
)

int yaz_decode_http_response ( ODR  o,
Z_HTTP_Response **  hr_p 
)

int yaz_encode_http_request ( ODR  o,
Z_HTTP_Request hr 
)

int yaz_encode_http_response ( ODR  o,
Z_HTTP_Response hr 
)

int z_GDU ( ODR  o,
Z_GDU **  p,
int  opt,
const char *  name 
)

Z_GDU* z_get_HTTP_Request ( ODR  o  ) 

Z_GDU* z_get_HTTP_Request_host_path ( ODR  odr,
const char *  host,
const char *  path 
)

Z_GDU* z_get_HTTP_Response ( ODR  o,
int  code 
)

const char* z_HTTP_errmsg ( int  code  ) 

Definition at line 355 of file http.c.

Referenced by yaz_encode_http_response(), z_get_HTTP_Response(), and ZOOM_connection_error_x().

void z_HTTP_header_add ( ODR  o,
Z_HTTP_Header **  hp,
const char *  n,
const char *  v 
)

void z_HTTP_header_add_basic_auth ( ODR  o,
Z_HTTP_Header **  hp,
const char *  username,
const char *  password 
)

Definition at line 225 of file http.c.

References odr_malloc(), and z_HTTP_header_add().

Referenced by yaz_sru_get_encode(), yaz_sru_post_encode(), and yaz_sru_soap_encode().

void z_HTTP_header_add_content_type ( ODR  o,
Z_HTTP_Header **  hp,
const char *  content_type,
const char *  charset 
)

Definition at line 204 of file http.c.

References odr_malloc(), and z_HTTP_header_add().

Referenced by yaz_sru_get_encode(), yaz_sru_post_encode(), and yaz_sru_soap_encode().

const char* z_HTTP_header_lookup ( const Z_HTTP_Header hp,
const char *  n 
)


Generated on Wed Jun 18 11:17:04 2008 for YAZ by  doxygen 1.5.6