|
Libical API Documentation 4.0 UNRELEASED Go to the stable 3.0 documentation
|
Line-oriented parsing vCard format. More...
Go to the source code of this file.
Typedefs | |
| typedef vcardvalue_kind(* | vcard_xprop_value_kind_func) (const char *name, void *data) |
| Callback function pointer to define x-property default value types. | |
Functions | |
| const char * | vcardparser_errstr (int err) |
| vcardcomponent * | vcardparser_parse_string (const char *str) |
| void | vcardparser_set_xprop_value_kind (vcard_xprop_value_kind_func func, void *data) |
| Registers a parser callback to override the default value type of an x-property. | |
Line-oriented parsing vCard format.
Definition in file vcardparser.h.
| typedef vcardvalue_kind(* vcard_xprop_value_kind_func) (const char *name, void *data) |
Callback function pointer to define x-property default value types.
This typedef defines a pointer to a function that the vCard parser calls to determine the default value type of an x-property.
| name | The name of the x-property currently parsed. This is the name as it appears in the vCard data except that it already is unfolded, e.g. it is not normalized to upper case. |
| data | A pointer to some user-defined callback data. Can be NULL. |
Definition at line 39 of file vcardparser.h.
| const char * vcardparser_errstr | ( | int | err | ) |
Definition at line 960 of file vcardparser.c.
| vcardcomponent * vcardparser_parse_string | ( | const char * | str | ) |
Definition at line 1003 of file vcardparser.c.
| void vcardparser_set_xprop_value_kind | ( | vcard_xprop_value_kind_func | func, |
| void * | data ) |
Registers a parser callback to override the default value type of an x-property.
Extended properties ("x-properties") in vCard do not have a default value type. Instead, they are parsed as unknown values and preserved verbatim. This function allows to register a callback to define the default value type for some x-property. Any VALUE parameter set on the property overrides the default value.
| func | The function pointer to the callback. Use NULL to disable a previously registered callback. |
| data | Some callback-specific data. Can be NULL. |
For example, the callback might return VCARD_TEXT_VALUE when parsing an x-property named "X-ABLabel".
This function is not reentrant. Depending on libical is built, the callback either is registered as a process-global or thread-local variable.
Definition at line 1030 of file vcardparser.c.