apt_text_stream.h File Reference

Text Stream Parse/Generate Routine. More...

#include "apt_string_table.h"
#include "apt_pair.h"

Go to the source code of this file.

Data Structures

struct  apt_text_stream_t

Defines

#define APT_TOKEN_SP   0x20
#define APT_TOKEN_HTAB   0x09
#define APT_TOKEN_CR   0x0D
#define APT_TOKEN_LF   0x0A

Typedefs

typedef struct apt_text_stream_t apt_text_stream_t

Functions

apt_bool_t apt_text_line_read (apt_text_stream_t *stream, apt_str_t *line)
apt_bool_t apt_text_header_read (apt_text_stream_t *stream, apt_pair_t *pair)
apt_bool_t apt_text_field_read (apt_text_stream_t *stream, char separator, apt_bool_t skip_spaces, apt_str_t *field)
apt_bool_t apt_text_name_value_insert (apt_text_stream_t *stream, const apt_str_t *name, const apt_str_t *value)
apt_bool_t apt_text_header_name_insert (apt_text_stream_t *stream, const apt_str_t *name)
apt_bool_t apt_pair_array_parse (apt_pair_arr_t *arr, const apt_str_t *value, apr_pool_t *pool)
apt_bool_t apt_pair_array_generate (const apt_pair_arr_t *arr, apt_str_t *str, apr_pool_t *pool)
apt_bool_t apt_text_pair_array_insert (apt_text_stream_t *stream, const apt_pair_arr_t *arr)
apt_bool_t apt_boolean_value_parse (const apt_str_t *str, apt_bool_t *value)
apt_bool_t apt_boolean_value_generate (apt_bool_t value, apt_str_t *str, apr_pool_t *pool)
apt_bool_t apt_text_boolean_value_insert (apt_text_stream_t *stream, apt_bool_t value)
apr_size_t apt_size_value_parse (const apt_str_t *str)
apt_bool_t apt_size_value_generate (apr_size_t value, apt_str_t *str, apr_pool_t *pool)
apt_bool_t apt_text_size_value_insert (apt_text_stream_t *stream, apr_size_t value)
float apt_float_value_parse (const apt_str_t *str)
apt_bool_t apt_float_value_generate (float value, apt_str_t *str, apr_pool_t *pool)
apt_bool_t apt_text_float_value_insert (apt_text_stream_t *stream, float value)
apt_bool_t apt_text_string_insert (apt_text_stream_t *stream, const apt_str_t *str)
apt_bool_t apt_text_stream_scroll (apt_text_stream_t *stream)
apt_bool_t apt_id_resource_parse (const apt_str_t *str, char separator, apt_str_t *id, apt_str_t *resource, apr_pool_t *pool)
apt_bool_t apt_id_resource_generate (const apt_str_t *id, const apt_str_t *resource, char separator, apt_str_t *str, apr_pool_t *pool)
apt_bool_t apt_var_length_value_generate (apr_size_t *value, apr_size_t max_count, apt_str_t *str)
apt_bool_t apt_completion_cause_generate (const apt_str_table_item_t table[], apr_size_t size, apr_size_t cause, apt_str_t *str, apr_pool_t *pool)
apt_bool_t apt_unique_id_generate (apt_str_t *id, apr_size_t length, apr_pool_t *pool)

Detailed Description

Text Stream Parse/Generate Routine.


Define Documentation

#define APT_TOKEN_CR   0x0D

Carrige return

#define APT_TOKEN_HTAB   0x09

Horizontal tab

#define APT_TOKEN_LF   0x0A

Line feed

#define APT_TOKEN_SP   0x20

Space


Typedef Documentation

Text stream declaration


Function Documentation

apt_bool_t apt_boolean_value_generate ( apt_bool_t  value,
apt_str_t str,
apr_pool_t *  pool 
)

Generate apr_size_t value from pool (buffer is allocated from pool)

apt_bool_t apt_boolean_value_parse ( const apt_str_t str,
apt_bool_t value 
)

Parse boolean-value

apt_bool_t apt_completion_cause_generate ( const apt_str_table_item_t  table[],
apr_size_t  size,
apr_size_t  cause,
apt_str_t str,
apr_pool_t *  pool 
)

Generate completion-cause

apt_bool_t apt_float_value_generate ( float  value,
apt_str_t str,
apr_pool_t *  pool 
)

Generate float value (buffer is allocated from pool)

float apt_float_value_parse ( const apt_str_t str  ) 

Parse float value

apt_bool_t apt_id_resource_generate ( const apt_str_t id,
const apt_str_t resource,
char  separator,
apt_str_t str,
apr_pool_t *  pool 
)

Generate id at resource string

apt_bool_t apt_id_resource_parse ( const apt_str_t str,
char  separator,
apt_str_t id,
apt_str_t resource,
apr_pool_t *  pool 
)

Parse id at resource string

apt_bool_t apt_pair_array_generate ( const apt_pair_arr_t arr,
apt_str_t str,
apr_pool_t *  pool 
)

Generate array of name-value pairs

apt_bool_t apt_pair_array_parse ( apt_pair_arr_t arr,
const apt_str_t value,
apr_pool_t *  pool 
)

Parse array of name-value pairs

apt_bool_t apt_size_value_generate ( apr_size_t  value,
apt_str_t str,
apr_pool_t *  pool 
)

Generate apr_size_t value from pool (buffer is allocated from pool)

apr_size_t apt_size_value_parse ( const apt_str_t str  ) 

Parse apr_size_t value

apt_bool_t apt_text_boolean_value_insert ( apt_text_stream_t stream,
apt_bool_t  value 
)

Insert boolean-value

apt_bool_t apt_text_field_read ( apt_text_stream_t stream,
char  separator,
apt_bool_t  skip_spaces,
apt_str_t field 
)

Read the field terminated with specified separator.

Parameters:
stream the text stream to navigate
separator the field separator
skip_spaces whether to skip spaces or not
field the read field to return
Returns:
TRUE if the read field isn't empty, otherwise FALSE
Remarks:
To be used to navigate through the fields of the text stream (message).
apt_bool_t apt_text_float_value_insert ( apt_text_stream_t stream,
float  value 
)

Insert float value

apt_bool_t apt_text_header_name_insert ( apt_text_stream_t stream,
const apt_str_t name 
)

Generate only the name ("name:") of the header field

apt_bool_t apt_text_header_read ( apt_text_stream_t stream,
apt_pair_t pair 
)

Read header field (name-value pair) of the text stream by scanning entire line.

Parameters:
stream the text stream to navigate
pair the read pair to return
Returns:
TRUE if the header is successfully read, otherwise FALSE
Remarks:
To be used to navigate through the lines and read header fields (name:value pairs) of the text stream (message).
apt_bool_t apt_text_line_read ( apt_text_stream_t stream,
apt_str_t line 
)

Read entire line of the text stream.

Parameters:
stream the text stream to navigate on
line the read line to return
Returns:
TRUE if the line is successfully read, otherwise FALSE
Remarks:
To be used to navigate through the lines of the text stream (message).
apt_bool_t apt_text_name_value_insert ( apt_text_stream_t stream,
const apt_str_t name,
const apt_str_t value 
)

Generate name-value pair line

apt_bool_t apt_text_pair_array_insert ( apt_text_stream_t stream,
const apt_pair_arr_t arr 
)

Insert array of name-value pairs

apt_bool_t apt_text_size_value_insert ( apt_text_stream_t stream,
apr_size_t  value 
)

Insert apr_size_t value

apt_bool_t apt_text_stream_scroll ( apt_text_stream_t stream  ) 

Scroll text stream

apt_bool_t apt_text_string_insert ( apt_text_stream_t stream,
const apt_str_t str 
)

Insert string value

apt_bool_t apt_unique_id_generate ( apt_str_t id,
apr_size_t  length,
apr_pool_t *  pool 
)

Generate unique identifier (hex string)

Parameters:
id the id to generate
length the length of hex string to generate
pool the pool to allocate memory from
apt_bool_t apt_var_length_value_generate ( apr_size_t *  value,
apr_size_t  max_count,
apt_str_t str 
)

Generate value plus the length (number of digits) of the value itself

 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Defines

Generated on 25 Mar 2013 for UniMRCP by  doxygen 1.6.1