$darkmode
Defines the data structure representing vCard structured values. More...
Go to the source code of this file.
Typedefs | |
| typedef struct vcardstructuredtype_impl | vcardstructuredtype |
| Represents a decoded, structured text value. More... | |
Functions | |
| char * | vcardstructured_as_vcard_string_r (const vcardstructuredtype *st, bool is_param) |
| Formats a vcardstructuredtype as a vCard property or parameter value. More... | |
| vcardstructuredtype * | vcardstructured_clone (const vcardstructuredtype *st) |
| Clones a vcardstructuredtype. More... | |
| vcardstrarray * | vcardstructured_field_at (const vcardstructuredtype *st, size_t position) |
| Returns the field at the given position in a vcardstructuredtype. More... | |
| vcardstructuredtype * | vcardstructured_new (size_t num_fields) |
| Creates a new instance of vcardstructuredtype. More... | |
| vcardstructuredtype * | vcardstructured_new_from_string (const char *s) |
| Creates a new instance of vcardstructuredtype from a string. More... | |
| size_t | vcardstructured_num_fields (const vcardstructuredtype *st) |
| Returns the number of fields in a vcardstructuredtype. More... | |
| void | vcardstructured_ref (vcardstructuredtype *st) |
| Increments the reference count of the vcardstructuredtype. More... | |
| void | vcardstructured_set_field_at (vcardstructuredtype *st, size_t position, vcardstrarray *field) |
| Sets the field at the given position in a vcardstructuredtype. More... | |
| void | vcardstructured_set_num_fields (vcardstructuredtype *st, size_t num_fields) |
| Sets the number of fields in a vcardstructuredtype. More... | |
| void | vcardstructured_unref (vcardstructuredtype *st) |
| Decrements the reference count of the vcardstructuredtype. More... | |
Defines the data structure representing vCard structured values.
Definition in file vcardstructured.h.
| typedef struct vcardstructuredtype_impl vcardstructuredtype |
Represents a decoded, structured text value.
vCard defines structured values for properties such as N and ADR. These values consist of "components", where each component may contain multiple values.
To avoid confusion with existing libical terminology, the vcardstructuredtype uses the term "field" to refer to a "component". A vcardstructuredtype consists of zero or more fields, each of which consists of zero or more values. A field is represented by a vcardstrarray. A field of value NULL is treated equally to an empty vcardstrarray.
Definition at line 42 of file vcardstructured.h.
| char* vcardstructured_as_vcard_string_r | ( | const vcardstructuredtype * | st, |
| bool | is_param | ||
| ) |
Formats a vcardstructuredtype as a vCard property or parameter value.
| st | The structured type object to format. |
| is_param | Whether the value is being formatted as a parameter value. |
NULL on error.Definition at line 780 of file vcardvalue.c.
| vcardstructuredtype* vcardstructured_clone | ( | const vcardstructuredtype * | st | ) |
Clones a vcardstructuredtype.
| st | The object to clone. |
NULL it sets icalerrno to ICAL_BADARG_ERROR.Definition at line 134 of file vcardstructured.c.
| vcardstrarray* vcardstructured_field_at | ( | const vcardstructuredtype * | st, |
| size_t | position | ||
| ) |
Returns the field at the given position in a vcardstructuredtype.
| st | The structured type object. |
| position | The zero-based index of the field to retrieve. |
NULL on error.NULL or position is out of bounds, it sets icalerrno to ICAL_BADARG_ERROR and returns NULL. Definition at line 190 of file vcardstructured.c.
| vcardstructuredtype* vcardstructured_new | ( | size_t | num_fields | ) |
Creates a new instance of vcardstructuredtype.
| num_fields | The initial number of fields. |
Definition at line 65 of file vcardstructured.c.
| vcardstructuredtype* vcardstructured_new_from_string | ( | const char * | s | ) |
Creates a new instance of vcardstructuredtype from a string.
| s | The string containing a vCard representation of the structured value. |
Definition at line 77 of file vcardstructured.c.
| size_t vcardstructured_num_fields | ( | const vcardstructuredtype * | st | ) |
Returns the number of fields in a vcardstructuredtype.
| st | The structured type object. |
NULL, it sets icalerrno to ICAL_BADARG_ERROR and returns 0. Definition at line 152 of file vcardstructured.c.
| void vcardstructured_ref | ( | vcardstructuredtype * | st | ) |
Increments the reference count of the vcardstructuredtype.
| st | The object to increase the reference count of |
NULL, or the reference count is smaller than 0, it sets icalerrno to ICAL_BADARG_ERROR.Definition at line 113 of file vcardstructured.c.
| void vcardstructured_set_field_at | ( | vcardstructuredtype * | st, |
| size_t | position, | ||
| vcardstrarray * | field | ||
| ) |
Sets the field at the given position in a vcardstructuredtype.
| st | The structured type object. |
| position | The zero-based index of the field to set. |
| field | The vcardstrarray to store at position. |
If position is beyond the current number of fields, the number of fields is extended to accommodate it. Any existing field at position is freed before being replaced.
NULL, it sets icalerrno to ICAL_BADARG_ERROR. Definition at line 199 of file vcardstructured.c.
| void vcardstructured_set_num_fields | ( | vcardstructuredtype * | st, |
| size_t | num_fields | ||
| ) |
Sets the number of fields in a vcardstructuredtype.
| st | The structured type object. |
| num_fields | The new number of fields. |
If num_fields is smaller than the current number of fields, the excess fields are freed.
NULL, it sets icalerrno to ICAL_BADARG_ERROR. Definition at line 158 of file vcardstructured.c.
| void vcardstructured_unref | ( | vcardstructuredtype * | st | ) |
Decrements the reference count of the vcardstructuredtype.
| st | The object to decrease the reference count of |
Decreases the reference count of st. If this was the last user of the object, it is freed.
NULL, or the reference count is smaller than 0, it sets icalerrno to ICAL_BADARG_ERROR.Definition at line 120 of file vcardstructured.c.
1.8.10