Types (structs, unions and typedefs)

type sf_vec

sf_vec stores sequence of bytes.

uint8_t *base

base points to the beginning of the sequence of bytes.

size_t len

len is the number of bytes contained in this sequence.

type sf_decimal

sf_decimal contains decimal value.

int64_t numer

numer contains numerator of the decimal value.

int64_t denom

denom contains denominator of the decimal value.

type sf_value

sf_value stores a Structured Field item. For Inner List, only type is set to sf_type.SF_TYPE_INNER_LIST. In order to read the items contained in an inner list, call sf_parser_inner_list().

sf_type type

type is the type of the value contained in this particular object.

uint32_t flags

flags is bitwise OR of one or more of SF_VALUE_FLAG_*.

union [anonymous]
int boolean

boolean contains boolean value if type == sf_type.SF_TYPE_BOOLEAN. 1 indicates true, and 0 indicates false.

int64_t integer

integer contains integer value if type is either sf_type.SF_TYPE_INTEGER or sf_type.SF_TYPE_DATE.

sf_decimal decimal

decimal contains decimal value if type == sf_type.SF_TYPE_DECIMAL.

sf_vec vec

vec contains sequence of bytes if type is either sf_type.SF_TYPE_STRING, sf_type.SF_TYPE_TOKEN, sf_type.SF_TYPE_BYTESEQ, or sf_type.SF_TYPE_DISPSTRING.

For sf_type.SF_TYPE_STRING, this field contains one or more escaped characters if flags has SF_VALUE_FLAG_ESCAPED_STRING set. To unescape the string, use sf_unescape().

For sf_type.SF_TYPE_BYTESEQ, this field contains base64 encoded string. To decode this byte string, use sf_base64decode().

For sf_type.SF_TYPE_DISPSTRING, this field may contain percent-encoded UTF-8 byte sequences. To decode it, use sf_pctdecode().

If vec.len == 0, vec.base is guaranteed to be NULL.

type sf_parser

sf_parser is the Structured Field Values parser. Use sf_parser_init() to initialize it.