|
Libical API Documentation 4.0 UNRELEASED Go to the stable 3.0 documentation
|
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. | |
Functions | |
| char * | vcardstructured_as_vcard_string_r (const vcardstructuredtype *st, bool is_param) |
| Formats a vcardstructuredtype as a vCard property or parameter value. | |
| vcardstructuredtype * | vcardstructured_clone (const vcardstructuredtype *st) |
| Clones a vcardstructuredtype. | |
| vcardstrarray * | vcardstructured_field_at (const vcardstructuredtype *st, size_t position) |
| Returns the field at the given position in a vcardstructuredtype. | |
| vcardstructuredtype * | vcardstructured_new (size_t num_fields) |
| Creates a new instance of vcardstructuredtype. | |
| vcardstructuredtype * | vcardstructured_new_from_string (const char *s) |
| Creates a new instance of vcardstructuredtype from a string. | |
| size_t | vcardstructured_num_fields (const vcardstructuredtype *st) |
| Returns the number of fields in a vcardstructuredtype. | |
| void | vcardstructured_ref (vcardstructuredtype *st) |
| Increments the reference count of the vcardstructuredtype. | |
| void | vcardstructured_set_field_at (vcardstructuredtype *st, size_t position, vcardstrarray *field) |
| Sets the field at the given position in a vcardstructuredtype. | |
| void | vcardstructured_set_num_fields (vcardstructuredtype *st, size_t num_fields) |
| Sets the number of fields in a vcardstructuredtype. | |
| void | vcardstructured_unref (vcardstructuredtype *st) |
| Decrements the reference count of the vcardstructuredtype. | |
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. |
Definition at line 783 of file vcardvalue.c.
| vcardstructuredtype * vcardstructured_clone | ( | const vcardstructuredtype * | st | ) |
Clones a vcardstructuredtype.
| st | The object to clone. |
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. |
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. |
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 |
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.
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.
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.
Definition at line 120 of file vcardstructured.c.