UniMRCP  1.7.0
Data Structures | Typedefs | Functions
apt_header_field.h File Reference

Header Field Declaration (RFC5322) More...

#include <apr_ring.h>
#include "apt_string.h"
Include dependency graph for apt_header_field.h:
This graph shows which files directly or indirectly include this file:

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

◆ apt_header_field_t

typedef typedefAPT_BEGIN_EXTERN_C struct apt_header_field_t apt_header_field_t

Header field declaration

◆ apt_header_section_t

Header section declaration

Function Documentation

◆ apt_header_field_alloc()

apt_header_field_t* apt_header_field_alloc ( apr_pool_t *  pool)

Allocate an empty header field.

Parameters
poolthe pool to allocate memory from

◆ apt_header_field_copy()

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_fieldthe header field to copy
poolthe pool to allocate memory from

◆ apt_header_field_create()

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
namethe name of the header field
valuethe value of the header field
poolthe pool to allocate memory from

◆ apt_header_field_create_c()

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
namethe name of the header field
valuethe value of the header field
poolthe pool to allocate memory from

◆ apt_header_field_create_from_line()

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
linethe text line, which consists of a name and value pair
separatorthe name and value separator
poolthe pool to allocate memory from

◆ apt_header_section_array_alloc()

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
headerthe header section to allocate
max_field_countthe max number of header fields in the section (protocol dependent)
poolthe pool to allocate memory from

◆ apt_header_section_field_add()

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
headerthe header section to add field to
header_fieldthe header field to add

◆ apt_header_section_field_insert()

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
headerthe header section to insert field into
header_fieldthe header field to insert

◆ apt_header_section_field_remove()

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
headerthe header section to remove field from
header_fieldthe header field to remove

◆ apt_header_section_field_set()

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
headerthe header section to set field for
header_fieldthe header field to set
Remarks
Typically, the header field should be already added to the header section using apt_header_section_field_add()

◆ apt_header_section_init()

void apt_header_section_init ( apt_header_section_t header)

Initialize header section (collection of header fields).

Parameters
headerthe header section to initialize