$darkmode
Libical API Documentation 4.0 STABLE VERSION Visit the v3.0 documentation
icalproperty.h
Go to the documentation of this file.
1 /*======================================================================
2  FILE: icalproperty.h
3  CREATOR: eric 20 March 1999
4 
5  SPDX-FileCopyrightText: 2000, Eric Busboom <eric@civicknowledge.com>
6  SPDX-License-Identifier: LGPL-2.1-only OR MPL-2.0
7 ======================================================================*/
8 
14 #ifndef ICALPROPERTY_H
15 #define ICALPROPERTY_H
16 
17 #include "libical_ical_export.h"
18 #include "icalderivedproperty.h" /* To get icalproperty_kind enumerations */
19 
20 #include <stdarg.h> /* for va_... */
21 
23 /* This is exposed so that callers will not have to allocate and
24  * deallocate iterators. Pretend that you can't see it. */
25 struct icalpvl_elem_t;
26 typedef struct icalparamiter {
27  icalparameter_kind kind;
28  struct icalpvl_elem_t *iter;
29 } icalparamiter;
31 
41 LIBICAL_ICAL_EXPORT icalproperty *icalproperty_new(icalproperty_kind kind);
42 
51 LIBICAL_ICAL_EXPORT icalproperty *icalproperty_clone(const icalproperty *old);
52 
61 LIBICAL_ICAL_EXPORT icalproperty *icalproperty_new_from_string(const char *str);
62 
73 LIBICAL_ICAL_EXPORT const char *icalproperty_as_ical_string(icalproperty *prop);
74 
85 LIBICAL_ICAL_EXPORT char *icalproperty_as_ical_string_r(icalproperty *prop);
86 
92 LIBICAL_ICAL_EXPORT void icalproperty_free(icalproperty *prop);
93 
102 LIBICAL_ICAL_EXPORT icalproperty_kind icalproperty_isa(const icalproperty *property);
103 
113 LIBICAL_ICAL_EXPORT bool icalproperty_isa_property(void *property);
114 
127 LIBICAL_ICAL_EXPORT void icalproperty_add_parameters(icalproperty *prop, va_list args);
128 
137 LIBICAL_ICAL_EXPORT void icalproperty_add_parameter(icalproperty *prop, icalparameter *parameter);
138 
150 LIBICAL_ICAL_EXPORT void icalproperty_set_parameter(icalproperty *prop, icalparameter *parameter);
151 
164 LIBICAL_ICAL_EXPORT void icalproperty_set_parameter_from_string(icalproperty *prop,
165  const char *name,
166  const char *value);
167 
180 LIBICAL_ICAL_EXPORT const char *icalproperty_get_parameter_as_string(icalproperty *prop,
181  const char *name);
182 
195 LIBICAL_ICAL_EXPORT char *icalproperty_get_parameter_as_string_r(icalproperty *prop,
196  const char *name);
197 
207 LIBICAL_ICAL_EXPORT void icalproperty_remove_parameter_by_kind(icalproperty *prop,
208  icalparameter_kind kind);
209 
223 LIBICAL_ICAL_EXPORT void icalproperty_remove_parameter_by_name(icalproperty *prop,
224  const char *name);
225 
234 LIBICAL_ICAL_EXPORT void icalproperty_remove_parameter_by_ref(icalproperty *prop,
235  icalparameter *param);
236 
245 LIBICAL_ICAL_EXPORT int icalproperty_count_parameters(const icalproperty *prop);
246 
247 /* Iterate through the parameters */
248 
260 LIBICAL_ICAL_EXPORT icalparameter *icalproperty_get_first_parameter(icalproperty *prop,
261  icalparameter_kind kind);
262 
273 LIBICAL_ICAL_EXPORT icalparameter *icalproperty_get_next_parameter(icalproperty *prop,
274  icalparameter_kind kind);
275 
276 /* Access the value of the property */
277 
286 LIBICAL_ICAL_EXPORT void icalproperty_set_value(icalproperty *prop, icalvalue *value);
287 
301 LIBICAL_ICAL_EXPORT void icalproperty_set_value_from_string(icalproperty *prop, const char *str,
302  const char *type);
303 
312 LIBICAL_ICAL_EXPORT icalvalue *icalproperty_get_value(const icalproperty *prop);
313 
324 LIBICAL_ICAL_EXPORT const char *icalproperty_get_value_as_string(const icalproperty *prop);
325 
336 LIBICAL_ICAL_EXPORT char *icalproperty_get_value_as_string_r(const icalproperty *prop);
337 
344 LIBICAL_ICAL_EXPORT void icalvalue_set_parent(icalvalue *value, icalproperty *property);
345 
354 LIBICAL_ICAL_EXPORT icalproperty *icalvalue_get_parent(const icalvalue *value);
355 
356 /* Deal with X properties */
357 
364 LIBICAL_ICAL_EXPORT void icalproperty_set_x_name(icalproperty *prop, const char *name);
365 
376 LIBICAL_ICAL_EXPORT const char *icalproperty_get_x_name(const icalproperty *prop);
377 
378 /* Deal with IANA properties */
379 
387 LIBICAL_ICAL_EXPORT void icalproperty_set_iana_name(icalproperty *prop, const char *name);
388 
398 LIBICAL_ICAL_EXPORT const char *icalproperty_get_iana_name(const icalproperty *prop);
399 
412 LIBICAL_ICAL_EXPORT const char *icalproperty_get_property_name(const icalproperty *prop);
413 
426 LIBICAL_ICAL_EXPORT char *icalproperty_get_property_name_r(const icalproperty *prop);
427 
436 LIBICAL_ICAL_EXPORT icalvalue_kind icalparameter_value_to_value_kind(icalparameter_value value);
437 
446 LIBICAL_ICAL_EXPORT void icalparameter_set_parent(icalparameter *param, icalproperty *property);
447 
456 LIBICAL_ICAL_EXPORT icalproperty *icalparameter_get_parent(const icalparameter *param);
457 
458 /* Convert kinds to string and get default value type */
459 
468 LIBICAL_ICAL_EXPORT icalvalue_kind icalproperty_kind_to_value_kind(icalproperty_kind kind);
469 
478 LIBICAL_ICAL_EXPORT icalproperty_kind icalproperty_value_kind_to_kind(icalvalue_kind kind);
479 
488 LIBICAL_ICAL_EXPORT const char *icalproperty_kind_to_string(icalproperty_kind kind);
489 
500 LIBICAL_ICAL_EXPORT icalproperty_kind icalproperty_string_to_kind(const char *string);
501 
509 LIBICAL_ICAL_EXPORT bool icalproperty_kind_is_valid(const icalproperty_kind kind);
510 
521 LIBICAL_ICAL_EXPORT icalproperty_method icalproperty_string_to_method(const char *str);
522 
531 LIBICAL_ICAL_EXPORT const char *icalproperty_method_to_string(icalproperty_method method);
532 
544 LIBICAL_ICAL_EXPORT const char *icalproperty_enum_to_string(int e);
545 
557 LIBICAL_ICAL_EXPORT char *icalproperty_enum_to_string_r(int e);
558 
571 LIBICAL_ICAL_EXPORT int icalproperty_kind_and_string_to_enum(const int kind, const char *str);
572 
581 LIBICAL_ICAL_EXPORT const char *icalproperty_status_to_string(icalproperty_status status);
582 
592 LIBICAL_ICAL_EXPORT icalproperty_status icalproperty_string_to_status(const char *string);
593 
602 LIBICAL_ICAL_EXPORT const char *icalproperty_action_to_string(icalproperty_action action);
603 
613 LIBICAL_ICAL_EXPORT icalproperty_action icalproperty_string_to_action(const char *string);
614 
623 LIBICAL_ICAL_EXPORT const char *icalproperty_transp_to_string(icalproperty_transp transp);
624 
634 LIBICAL_ICAL_EXPORT icalproperty_transp icalproperty_string_to_transp(const char *string);
635 
644 LIBICAL_ICAL_EXPORT const char *icalproperty_class_to_string(icalproperty_class propclass);
645 
656 LIBICAL_ICAL_EXPORT icalproperty_class icalproperty_string_to_class(const char *string);
657 
666 LIBICAL_ICAL_EXPORT const char *icalproperty_participanttype_to_string(icalproperty_participanttype participanttype);
667 
677 LIBICAL_ICAL_EXPORT icalproperty_participanttype icalproperty_string_to_participanttype(const char *string);
678 
687 LIBICAL_ICAL_EXPORT const char *icalproperty_resourcetype_to_string(icalproperty_resourcetype resourcetype);
688 
698 LIBICAL_ICAL_EXPORT icalproperty_resourcetype icalproperty_string_to_resourcetype(const char *string);
699 
709 LIBICAL_ICAL_EXPORT bool icalproperty_enum_belongs_to_property(icalproperty_kind kind, int e);
710 
718 LIBICAL_ICAL_EXPORT void icalproperty_normalize(icalproperty *prop);
719 
734 LIBICAL_ICAL_EXPORT void icalproperty_set_allow_empty_properties(bool enable);
735 
743 LIBICAL_ICAL_EXPORT bool icalproperty_get_allow_empty_properties(void);
744 
746 LIBICAL_ICAL_EXPORT icalparamiter icalproperty_begin_parameter(icalproperty *property, icalparameter_kind kind);
747 
748 LIBICAL_ICAL_EXPORT icalparameter *icalparamiter_next(icalparamiter *i);
749 
750 LIBICAL_ICAL_EXPORT icalparameter *icalparamiter_deref(icalparamiter *i);
752 
753 #endif /*ICALPROPERTY_H */
icalproperty_participanttype icalproperty_string_to_participanttype(const char *string)
const char * icalproperty_kind_to_string(icalproperty_kind kind)
const char * icalproperty_as_ical_string(icalproperty *prop)
Definition: icalproperty.c:362
icalproperty_resourcetype icalproperty_string_to_resourcetype(const char *string)
icalparameter * icalproperty_get_first_parameter(icalproperty *prop, icalparameter_kind kind)
Definition: icalproperty.c:704
bool icalproperty_get_allow_empty_properties(void)
Definition: icalproperty.c:72
icalproperty_kind icalproperty_value_kind_to_kind(icalvalue_kind kind)
const char * icalproperty_participanttype_to_string(icalproperty_participanttype participanttype)
char * icalproperty_get_property_name_r(const icalproperty *prop)
Definition: icalproperty.c:895
icalvalue * icalproperty_get_value(const icalproperty *prop)
Definition: icalproperty.c:817
icalproperty_kind icalproperty_string_to_kind(const char *string)
void icalproperty_set_value(icalproperty *prop, icalvalue *value)
Definition: icalproperty.c:746
icalproperty * icalproperty_new_from_string(const char *str)
Definition: icalproperty.c:138
char * icalproperty_get_value_as_string_r(const icalproperty *prop)
Definition: icalproperty.c:833
icalproperty_class icalproperty_string_to_class(const char *string)
icalproperty_method icalproperty_string_to_method(const char *str)
char * icalproperty_get_parameter_as_string_r(icalproperty *prop, const char *name)
Definition: icalproperty.c:552
const char * icalproperty_class_to_string(icalproperty_class propclass)
icalproperty * icalproperty_new(icalproperty_kind kind)
Definition: icalproperty.c:91
void icalproperty_set_parameter(icalproperty *prop, icalparameter *parameter)
Definition: icalproperty.c:491
char * icalproperty_enum_to_string_r(int e)
void icalproperty_remove_parameter_by_ref(icalproperty *prop, icalparameter *param)
Removes the specified parameter reference from the property.
Definition: icalproperty.c:676
icalproperty * icalvalue_get_parent(const icalvalue *value)
Definition: icalvalue.c:1551
void icalproperty_set_x_name(icalproperty *prop, const char *name)
Definition: icalproperty.c:844
const char * icalproperty_transp_to_string(icalproperty_transp transp)
bool icalproperty_enum_belongs_to_property(icalproperty_kind kind, int e)
void icalparameter_set_parent(icalparameter *param, icalproperty *property)
const char * icalproperty_get_value_as_string(const icalproperty *prop)
Definition: icalproperty.c:824
icalproperty_kind icalproperty_isa(const icalproperty *property)
Definition: icalproperty.c:466
char * icalproperty_as_ical_string_r(icalproperty *prop)
Definition: icalproperty.c:371
icalproperty_action icalproperty_string_to_action(const char *string)
int icalproperty_count_parameters(const icalproperty *prop)
Definition: icalproperty.c:694
const char * icalproperty_status_to_string(icalproperty_status status)
icalparameter * icalproperty_get_next_parameter(icalproperty *prop, icalparameter_kind kind)
Definition: icalproperty.c:726
const char * icalproperty_action_to_string(icalproperty_action action)
icalproperty_status icalproperty_string_to_status(const char *string)
const char * icalproperty_get_property_name(const icalproperty *prop)
Definition: icalproperty.c:886
icalvalue_kind icalproperty_kind_to_value_kind(icalproperty_kind kind)
const char * icalproperty_resourcetype_to_string(icalproperty_resourcetype resourcetype)
void icalproperty_set_iana_name(icalproperty *prop, const char *name)
Definition: icalproperty.c:864
const char * icalproperty_enum_to_string(int e)
void icalproperty_free(icalproperty *prop)
Definition: icalproperty.c:184
void icalproperty_set_allow_empty_properties(bool enable)
Definition: icalproperty.c:67
icalvalue_kind icalparameter_value_to_value_kind(icalparameter_value value)
const char * icalproperty_get_x_name(const icalproperty *prop)
Definition: icalproperty.c:857
icalproperty_transp icalproperty_string_to_transp(const char *string)
void icalproperty_normalize(icalproperty *prop)
Definition: icalproperty.c:948
int icalproperty_kind_and_string_to_enum(const int kind, const char *str)
const char * icalproperty_method_to_string(icalproperty_method method)
void icalproperty_add_parameters(icalproperty *prop, va_list args)
Definition: icalproperty.c:77
void icalproperty_set_parameter_from_string(icalproperty *prop, const char *name, const char *value)
Definition: icalproperty.c:510
icalproperty * icalproperty_clone(const icalproperty *old)
Definition: icalproperty.c:100
void icalproperty_set_value_from_string(icalproperty *prop, const char *str, const char *type)
Definition: icalproperty.c:776
void icalproperty_remove_parameter_by_name(icalproperty *prop, const char *name)
Removes all parameters with the specified name.
Definition: icalproperty.c:645
void icalproperty_remove_parameter_by_kind(icalproperty *prop, icalparameter_kind kind)
Removes all parameters with the specified kind.
Definition: icalproperty.c:627
void icalvalue_set_parent(icalvalue *value, icalproperty *property)
Definition: icalvalue.c:1544
icalproperty * icalparameter_get_parent(const icalparameter *param)
void icalproperty_add_parameter(icalproperty *prop, icalparameter *parameter)
Definition: icalproperty.c:483
bool icalproperty_isa_property(void *property)
Definition: icalproperty.c:475
const char * icalproperty_get_iana_name(const icalproperty *prop)
Definition: icalproperty.c:878
const char * icalproperty_get_parameter_as_string(icalproperty *prop, const char *name)
Definition: icalproperty.c:543
bool icalproperty_kind_is_valid(const icalproperty_kind kind)