UniMRCP
1.5.0
|
Text Stream Parse/Generate Routine. More...
Go to the source code of this file.
Data Structures | |
struct | apt_text_stream_t |
Macros | |
#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 |
Text Stream Parse/Generate Routine.
#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 struct apt_text_stream_t apt_text_stream_t |
Text stream declaration
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_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.
stream | the text stream to navigate |
separator | the field separator |
skip_spaces | whether to skip spaces or not |
field | the read field to return |
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.
stream | the text stream to navigate |
pair | the read pair to return |
apt_bool_t apt_text_line_read | ( | apt_text_stream_t * | stream, |
apt_str_t * | line | ||
) |
Read entire line of the text stream.
stream | the text stream to navigate on |
line | the read line to return |
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_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)
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