|
Libical API Documentation 4.0 UNRELEASED Go to the stable 3.0 documentation
|
Implements the data structure representing iCalendar properties. More...
Go to the source code of this file.
Functions | |
| void | icalproperty_add_parameter (icalproperty *p, icalparameter *parameter) |
| void | icalproperty_add_parameters (icalproperty *prop, va_list args) |
| const char * | icalproperty_as_ical_string (icalproperty *prop) |
| char * | icalproperty_as_ical_string_r (icalproperty *prop) |
| icalproperty * | icalproperty_clone (const icalproperty *old) |
| int | icalproperty_count_parameters (const icalproperty *prop) |
| void | icalproperty_free (icalproperty *p) |
| bool | icalproperty_get_allow_empty_properties (void) |
| struct icaltimetype | icalproperty_get_datetime_with_component (icalproperty *prop, icalcomponent *comp) |
| icalparameter * | icalproperty_get_first_parameter (icalproperty *p, icalparameter_kind kind) |
| const char * | icalproperty_get_iana_name (const icalproperty *prop) |
| icalparameter * | icalproperty_get_next_parameter (icalproperty *p, icalparameter_kind kind) |
| const char * | icalproperty_get_parameter_as_string (icalproperty *prop, const char *name) |
| char * | icalproperty_get_parameter_as_string_r (icalproperty *prop, const char *name) |
| icalcomponent * | icalproperty_get_parent (const icalproperty *property) |
| const char * | icalproperty_get_property_name (const icalproperty *prop) |
| char * | icalproperty_get_property_name_r (const icalproperty *prop) |
| icalvalue * | icalproperty_get_value (const icalproperty *prop) |
| const char * | icalproperty_get_value_as_string (const icalproperty *prop) |
| char * | icalproperty_get_value_as_string_r (const icalproperty *prop) |
| const char * | icalproperty_get_x_name (const icalproperty *prop) |
| icalproperty_kind | icalproperty_isa (const icalproperty *p) |
| bool | icalproperty_isa_property (void *property) |
| icalproperty * | icalproperty_new (icalproperty_kind kind) |
| icalproperty * | icalproperty_new_from_string (const char *str) |
| void | icalproperty_normalize (icalproperty *prop) |
| void | icalproperty_remove_parameter_by_kind (icalproperty *prop, icalparameter_kind kind) |
| Removes all parameters with the specified kind. | |
| void | icalproperty_remove_parameter_by_name (icalproperty *prop, const char *name) |
| Removes all parameters with the specified name. | |
| void | icalproperty_remove_parameter_by_ref (icalproperty *prop, icalparameter *parameter) |
| Removes the specified parameter reference from the property. | |
| void | icalproperty_set_allow_empty_properties (bool enable) |
| void | icalproperty_set_iana_name (icalproperty *prop, const char *name) |
| void | icalproperty_set_parameter (icalproperty *prop, icalparameter *parameter) |
| void | icalproperty_set_parameter_from_string (icalproperty *prop, const char *name, const char *value) |
| void | icalproperty_set_parent (icalproperty *property, icalcomponent *component) |
| void | icalproperty_set_value (icalproperty *p, icalvalue *value) |
| void | icalproperty_set_value_from_string (icalproperty *prop, const char *str, const char *type) |
| void | icalproperty_set_x_name (icalproperty *prop, const char *name) |
Implements the data structure representing iCalendar properties.
Definition in file icalproperty.c.
| void icalproperty_add_parameter | ( | icalproperty * | prop, |
| icalparameter * | parameter ) |
Adds a parameter to the specified icalproperty.
No error checking is performed by this function.
| prop | a pointer to a valid icalproperty |
| parameter | a pointer to a presumably valid icalparameter |
Definition at line 488 of file icalproperty.c.
| void icalproperty_add_parameters | ( | icalproperty * | prop, |
| va_list | args ) |
Adds a list of parameter to the specified icalproperty.
| prop | a pointer to a valid icalproperty. |
| args | a va_list of pointers that presumably point to list of valid icalparameters. |
If any item in va_list points to an illegal icalparameter the internal library icalerrno is set to ICAL_BADARG_ERROR.
Any item in va_list points to an icalvalue is ignored.
Definition at line 77 of file icalproperty.c.
| const char * icalproperty_as_ical_string | ( | icalproperty * | prop | ) |
Stringify an icalproperty.
| prop | a pointer to an icalproperty |
prop. NULL is returned is prop is invalid.Definition at line 360 of file icalproperty.c.
| char * icalproperty_as_ical_string_r | ( | icalproperty * | prop | ) |
Stringify an icalproperty.
| prop | a pointer to an icalproperty |
prop. NULL is returned is prop is invalid.Definition at line 369 of file icalproperty.c.
| icalproperty * icalproperty_clone | ( | const icalproperty * | old | ) |
Deeply clones an icalproperty.
| old | a pointer to the icalproperty to clone |
Definition at line 100 of file icalproperty.c.
| int icalproperty_count_parameters | ( | const icalproperty * | prop | ) |
Gets the number of parameter for a specified icalproperty.
| prop | a pointer to a valid icalproperty |
prop. Returns -1 if prop is NULL. Definition at line 699 of file icalproperty.c.
| void icalproperty_free | ( | icalproperty * | prop | ) |
Free the memory for an icalproperty.
| prop | a pointer to a valid icalproperty |
Definition at line 184 of file icalproperty.c.
| bool icalproperty_get_allow_empty_properties | ( | void | ) |
Returns if empty properties are allowed; else are replaced with X-LIC-ERROR properties.
Definition at line 72 of file icalproperty.c.
| struct icaltimetype icalproperty_get_datetime_with_component | ( | icalproperty * | prop, |
| icalcomponent * | comp ) |
Computes the datetime corresponding to the specified icalproperty and icalcomponent. If the property is a DATE-TIME with a TZID parameter and a corresponding VTIMEZONE is present in the component, the returned component will already be in the correct timezone; otherwise the caller is responsible for converting it.
Call icaltime_is_null_time() on the returned value to detect failures.
| prop | a pointer to a valid icalproperty |
| comp | a pointer to a valid icalcomponent |
Definition at line 1072 of file icalproperty.c.
| icalparameter * icalproperty_get_first_parameter | ( | icalproperty * | prop, |
| icalparameter_kind | kind ) |
From the head position, iterates the icalparameter list attached to the specified icalproperty until the first icalparameter_kind is found.
| prop | a pointer to a valid icalproperty |
| kind | an icalparameter_kind to use for the search |
kind ; NULL if no matches are found. Definition at line 709 of file icalproperty.c.
| const char * icalproperty_get_iana_name | ( | const icalproperty * | prop | ) |
Gets the IANA name of the specified icalproperty.
| prop | a pointer to a valid icalproperty |
comp IANA name; will be NULL if the name has yet to be specified. Definition at line 883 of file icalproperty.c.
| icalparameter * icalproperty_get_next_parameter | ( | icalproperty * | prop, |
| icalparameter_kind | kind ) |
From the current position, iterates the icalparameter list attached to the specified icalproperty until the next icalparameter_kind is found.
| prop | a pointer to a valid icalproperty |
| kind | an icalparameter_kind to use for the search |
kind; NULL if no matches are found. Definition at line 731 of file icalproperty.c.
| const char * icalproperty_get_parameter_as_string | ( | icalproperty * | prop, |
| const char * | name ) |
Gets the parameter value for a specified icalproperty parameter.
| prop | a pointer to a valid icalproperty |
| name | a a pointer to a char string containing the name of icalparameter to use |
name refers to an invalid icalproperty_kind.Definition at line 548 of file icalproperty.c.
| char * icalproperty_get_parameter_as_string_r | ( | icalproperty * | prop, |
| const char * | name ) |
Gets the parameter value for a specified icalproperty parameter.
| prop | a pointer to a valid icalproperty |
| name | a pointer to a char string containing the name of icalparameter to use |
name refers to an invalid icalproperty_kind.Definition at line 557 of file icalproperty.c.
| icalcomponent * icalproperty_get_parent | ( | const icalproperty * | property | ) |
Gets the parent icalcomponent for the specified icalproperty.
| property | a pointer to a valid icalproperty |
Definition at line 939 of file icalproperty.c.
| const char * icalproperty_get_property_name | ( | const icalproperty * | prop | ) |
Gets the name of the specified icalproperty.
Returns the name of the property – the type name converted to a string, or the value of _get_x_name if the type is and X property.
| prop | a pointer to the icalproperty |
Definition at line 891 of file icalproperty.c.
| char * icalproperty_get_property_name_r | ( | const icalproperty * | prop | ) |
Gets the name of the specified icalproperty.
Returns the name of the property – the type name converted to a string, or the value of _get_x_name if the type is and X property.
| prop | a pointer to the icalproperty |
Definition at line 900 of file icalproperty.c.
| icalvalue * icalproperty_get_value | ( | const icalproperty * | prop | ) |
Gets the icalvalue for the specified icalproperty.
| prop | a pointer to a valid icalproperty |
prop icalvalue; or NULL if prop does not have an attached icalvalue yet. Definition at line 822 of file icalproperty.c.
| const char * icalproperty_get_value_as_string | ( | const icalproperty * | prop | ) |
Gets the icalvalue for the specified icalproperty as a char string.
| prop | a pointer to a valid icalproperty |
prop icalvalue; or NULL if prop does not have an attached icalvalue yet.Definition at line 829 of file icalproperty.c.
| char * icalproperty_get_value_as_string_r | ( | const icalproperty * | prop | ) |
Gets the icalvalue for the specified icalproperty as a char string.
| prop | a pointer to a valid icalproperty |
prop icalvalue; or NULL if prop does not have an attached icalvalue yet.Definition at line 838 of file icalproperty.c.
| const char * icalproperty_get_x_name | ( | const icalproperty * | prop | ) |
Gets the X-NAME icalproperty of the specified icalproperty.
| prop | a pointer to a valid icalproperty |
Definition at line 862 of file icalproperty.c.
| icalproperty_kind icalproperty_isa | ( | const icalproperty * | property | ) |
Determines the icalproperty_kind of the specified icalproperty.
| property | a pointer to valid icalproperty. |
property; ICAL_NO_PROPERTY is returned if property is NULL. Definition at line 467 of file icalproperty.c.
| bool icalproperty_isa_property | ( | void * | property | ) |
Determines if the specified pointer is an icalproperty pointer.
Just looks if the ::id member strncmps to "prop".
| property | a pointer, presumably to an icalproperty. |
Definition at line 476 of file icalproperty.c.
| icalproperty * icalproperty_new | ( | icalproperty_kind | kind | ) |
Construct a new icalproperty of the specified icalproperty_kind.
| kind | is the icalproperty_kind to use |
Definition at line 91 of file icalproperty.c.
| icalproperty * icalproperty_new_from_string | ( | const char * | str | ) |
Construct and populate a new icalproperty from a char string.
| str | a non-NULL pointer to the data used to populate the new icalproperty. |
Definition at line 138 of file icalproperty.c.
| void icalproperty_normalize | ( | icalproperty * | prop | ) |
Normalizes (reorders and sorts the parameters) the specified icalproperty.
| prop | a pointer a valid icalproperty |
Definition at line 953 of file icalproperty.c.
| void icalproperty_remove_parameter_by_kind | ( | icalproperty * | prop, |
| icalparameter_kind | kind ) |
Removes all parameters with the specified kind.
| prop | A valid icalproperty. |
| kind | The kind to remove (ex. ICAL_TZID_PARAMETER) |
See icalproperty_remove_parameter_by_name() and icalproperty_remove_parameter_by_ref() for alternate ways of removing parameters
Definition at line 632 of file icalproperty.c.
| void icalproperty_remove_parameter_by_name | ( | icalproperty * | prop, |
| const char * | name ) |
Removes all parameters with the specified name.
| prop | A valid icalproperty. |
| name | The name of the parameter to remove |
This function removes parameters with the given name. The name corresponds to either a built-in name (TZID, etc.) or the name of an extended parameter (X-FOO)
See icalproperty_remove_parameter_by_kind() and icalproperty_remove_parameter_by_ref() for alternate ways of removing parameters
Definition at line 650 of file icalproperty.c.
| void icalproperty_remove_parameter_by_ref | ( | icalproperty * | prop, |
| icalparameter * | param ) |
Removes the specified parameter reference from the property.
| prop | A valid icalproperty. |
| param | A reference to a specific icalparameter. |
This function removes the specified parameter reference from the property.
Definition at line 681 of file icalproperty.c.
| void icalproperty_set_allow_empty_properties | ( | bool | enable | ) |
Sets if empty properties are permitted.
Determines the library behavior whenever an empty property is encountered. When not set (the default) empty properties are replaced with X-LIC-ERROR properties. Otherwise, processing proceeds normally and the property value will be empty.
| enable | If true, libical allows empty properties; otherwise empty properties are replaced by X-LIC-ERROR properties. |
Note that if icalerror_get_errors_are_fatal is also true a SIGABRT will be raised whenever an empty property is encountered.
Definition at line 67 of file icalproperty.c.
| void icalproperty_set_iana_name | ( | icalproperty * | prop, |
| const char * | name ) |
Sets the IANA name for an icalproperty.
| prop | a pointer to a valid icalproperty |
| name | a pointer to char string containing the IANA name. |
Definition at line 869 of file icalproperty.c.
| void icalproperty_set_parameter | ( | icalproperty * | prop, |
| icalparameter * | parameter ) |
Adds an icalparameter to an icalproperty.
No error checking is performed by this function.
| prop | a pointer to a valid icalproperty |
| parameter | a pointer to a presumably valid icalparameter |
If parameter kind is already attached to prop then the old parameter is removed in favor of parameter.
Definition at line 496 of file icalproperty.c.
| void icalproperty_set_parameter_from_string | ( | icalproperty * | prop, |
| const char * | name, | ||
| const char * | value ) |
Sets a icalparameter from a string for the specified icalproperty.
| prop | a pointer to a valid icalproperty |
| name | a pointer to a char string containing the parameter name |
| value | a pointer to a char string containing the parameter value |
If name refers to an invalid icalparameter_kind or value is illegal, then the internal library icalerrno is set to ICAL_BADARG_ERROR.
Definition at line 515 of file icalproperty.c.
| void icalproperty_set_parent | ( | icalproperty * | property, |
| icalcomponent * | component ) |
Sets the parent icalcomponent for the specified icalproperty.
| property | a pointer to a valid icalproperty |
| component | a pointer to a valid icalcomponent to use as the parent |
Definition at line 932 of file icalproperty.c.
| void icalproperty_set_value | ( | icalproperty * | prop, |
| icalvalue * | value ) |
Sets an icalvalue for the specified icalproperty.
| prop | a pointer to a valid icalproperty |
| value | a pointer to a valid icalvalue to use |
If prop already has an icalvalue it will be replaced.
Definition at line 751 of file icalproperty.c.
| void icalproperty_set_value_from_string | ( | icalproperty * | prop, |
| const char * | str, | ||
| const char * | type ) |
Sets an icalvalue for the specified icalproperty from a char string..
| prop | a pointer to a valid icalproperty |
| str | a non-NULL pointer to char string to be converted to the icalvalue |
| type | a non-NULL pointer to a char string to be converted to an icalvalue_kind |
If type string matches "NO" then the icalvalue_kind will be taken from an existing icalvalue (if one exists) or will use the default icalvalue_kind for the icalproperty.
If prop already has an icalvalue it will be replaced.
Definition at line 781 of file icalproperty.c.
| void icalproperty_set_x_name | ( | icalproperty * | prop, |
| const char * | name ) |
Sets the X-NAME property of the specified icalproperty.
| prop | a pointer to a valid icalproperty |
| name | a pointer to a char string to use as the X-NAME |
Definition at line 849 of file icalproperty.c.