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 |
#define APT_TOKEN_HTAB 0x09 |
#define APT_TOKEN_LF 0x0A |
#define APT_TOKEN_SP 0x20 |
Typedef Documentation
Function Documentation
Generate apr_size_t value from pool (buffer is allocated from pool)
Generate completion-cause
Generate float value (buffer is allocated from pool)
float apt_float_value_parse |
( |
const apt_str_t * |
str |
) |
|
Generate id at resource string
Parse id at resource string
Generate array of name-value pairs
Parse array of name-value pairs
Generate apr_size_t value from pool (buffer is allocated from pool)
apr_size_t apt_size_value_parse |
( |
const apt_str_t * |
str |
) |
|
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
Generate only the name ("name:") of the header field
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
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
Generate name-value pair line
Insert array of name-value pairs
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