apt_header_field.h File Reference

Header Field Declaration (RFC5322). More...

#include <apr_ring.h>
#include "apt_string.h"

Go to the source code of this file.

Data Structures

struct  apt_header_field_t
struct  apt_header_section_t

Typedefs

typedef
typedefAPT_BEGIN_EXTERN_C
struct apt_header_field_t 
apt_header_field_t
typedef struct apt_header_section_t apt_header_section_t

Functions

apt_header_field_tapt_header_field_alloc (apr_pool_t *pool)
apt_header_field_tapt_header_field_create (const apt_str_t *name, const apt_str_t *value, apr_pool_t *pool)
apt_header_field_tapt_header_field_create_c (const char *name, const char *value, apr_pool_t *pool)
apt_header_field_tapt_header_field_create_from_line (const apt_str_t *line, char separator, apr_pool_t *pool)
apt_header_field_tapt_header_field_copy (const apt_header_field_t *src_header_field, apr_pool_t *pool)
void apt_header_section_init (apt_header_section_t *header)
apt_bool_t apt_header_section_array_alloc (apt_header_section_t *header, apr_size_t max_field_count, apr_pool_t *pool)
apt_bool_t apt_header_section_field_add (apt_header_section_t *header, apt_header_field_t *header_field)
apt_bool_t apt_header_section_field_insert (apt_header_section_t *header, apt_header_field_t *header_field)
apt_bool_t apt_header_section_field_set (apt_header_section_t *header, apt_header_field_t *header_field)
apt_bool_t apt_header_section_field_remove (apt_header_section_t *header, apt_header_field_t *header_field)

Detailed Description

Header Field Declaration (RFC5322).


Typedef Documentation

typedef typedefAPT_BEGIN_EXTERN_C struct apt_header_field_t apt_header_field_t

Header field declaration

Header section declaration


Function Documentation

apt_header_field_t* apt_header_field_alloc ( apr_pool_t *  pool  ) 

Allocate an empty header field.

Parameters:
pool the pool to allocate memory from
apt_header_field_t* apt_header_field_copy ( const apt_header_field_t src_header_field,
apr_pool_t *  pool 
)

Copy specified header field.

Parameters:
src_header_field the header field to copy
pool the pool to allocate memory from
apt_header_field_t* apt_header_field_create ( const apt_str_t name,
const apt_str_t value,
apr_pool_t *  pool 
)

Create a header field using given name and value APT strings.

Parameters:
name the name of the header field
value the value of the header field
pool the pool to allocate memory from
apt_header_field_t* apt_header_field_create_c ( const char *  name,
const char *  value,
apr_pool_t *  pool 
)

Create a header field using given name and value C strings.

Parameters:
name the name of the header field
value the value of the header field
pool the pool to allocate memory from
apt_header_field_t* apt_header_field_create_from_line ( const apt_str_t line,
char  separator,
apr_pool_t *  pool 
)

Create a header field from entire text line consisting of a name and value pair.

Parameters:
line the text line, which consists of a name and value pair
separator the name and value separator
pool the pool to allocate memory from
apt_bool_t apt_header_section_array_alloc ( apt_header_section_t header,
apr_size_t  max_field_count,
apr_pool_t *  pool 
)

Allocate header section to set/get header fields by numeric identifiers.

Parameters:
header the header section to allocate
max_field_count the max number of header fields in the section (protocol dependent)
pool the pool to allocate memory from
apt_bool_t apt_header_section_field_add ( apt_header_section_t header,
apt_header_field_t header_field 
)

Add (append) header field to header section.

Parameters:
header the header section to add field to
header_field the header field to add
apt_bool_t apt_header_section_field_insert ( apt_header_section_t header,
apt_header_field_t header_field 
)

Insert header field to header section based on numreic identifier if specified.

Parameters:
header the header section to insert field into
header_field the header field to insert
apt_bool_t apt_header_section_field_remove ( apt_header_section_t header,
apt_header_field_t header_field 
)

Remove header field from header section.

Parameters:
header the header section to remove field from
header_field the header field to remove
apt_bool_t apt_header_section_field_set ( apt_header_section_t header,
apt_header_field_t header_field 
)

Set header field in the array of header fields using associated numeric identifier.

Parameters:
header the header section to set field for
header_field the header field to set
Remarks:
Typically, the header field should be already added to the header section using apt_header_section_field_add()
void apt_header_section_init ( apt_header_section_t header  ) 

Initialize header section (collection of header fields).

Parameters:
header the header section to initialize
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Defines

Generated on 25 Mar 2013 for UniMRCP by  doxygen 1.6.1