Libical API Documentation  3.0
icalproperty.h
Go to the documentation of this file.
1 /*======================================================================
2  FILE: icalproperty.h
3  CREATOR: eric 20 March 1999
4 
5  (C) COPYRIGHT 2000, Eric Busboom <eric@civicknowledge.com>
6 
7  This library is free software; you can redistribute it and/or modify
8  it under the terms of either:
9 
10  The LGPL as published by the Free Software Foundation, version
11  2.1, available at: https://www.gnu.org/licenses/lgpl-2.1.html
12 
13  Or:
14 
15  The Mozilla Public License Version 2.0. You may obtain a copy of
16  the License at https://www.mozilla.org/MPL/
17 ======================================================================*/
18 
19 #ifndef ICALPROPERTY_H
20 #define ICALPROPERTY_H
21 
22 #include "libical_ical_export.h"
23 #include "icalderivedproperty.h" /* To get icalproperty_kind enumerations */
24 
25 #include <stdarg.h> /* for va_... */
26 
29 LIBICAL_ICAL_EXPORT icalproperty *icalproperty_new(icalproperty_kind kind);
30 
31 LIBICAL_ICAL_EXPORT icalproperty *icalproperty_new_impl(icalproperty_kind kind);
32 
33 LIBICAL_ICAL_EXPORT icalproperty *icalproperty_new_clone(icalproperty *prop);
34 
35 LIBICAL_ICAL_EXPORT icalproperty *icalproperty_new_from_string(const char *str);
36 
37 LIBICAL_ICAL_EXPORT const char *icalproperty_as_ical_string(icalproperty *prop);
38 
39 LIBICAL_ICAL_EXPORT char *icalproperty_as_ical_string_r(icalproperty *prop);
40 
41 LIBICAL_ICAL_EXPORT void icalproperty_free(icalproperty *prop);
42 
43 LIBICAL_ICAL_EXPORT icalproperty_kind icalproperty_isa(icalproperty *property);
44 
45 LIBICAL_ICAL_EXPORT int icalproperty_isa_property(void *property);
46 
47 LIBICAL_ICAL_EXPORT void icalproperty_add_parameters(struct icalproperty_impl *prop, va_list args);
48 
49 LIBICAL_ICAL_EXPORT void icalproperty_add_parameter(icalproperty *prop, icalparameter *parameter);
50 
51 LIBICAL_ICAL_EXPORT void icalproperty_set_parameter(icalproperty *prop, icalparameter *parameter);
52 
53 LIBICAL_ICAL_EXPORT void icalproperty_set_parameter_from_string(icalproperty *prop,
54  const char *name,
55  const char *value);
56 LIBICAL_ICAL_EXPORT const char *icalproperty_get_parameter_as_string(icalproperty *prop,
57  const char *name);
58 
59 LIBICAL_ICAL_EXPORT char *icalproperty_get_parameter_as_string_r(icalproperty *prop,
60  const char *name);
61 
71 LIBICAL_ICAL_EXPORT void icalproperty_remove_parameter_by_kind(icalproperty *prop,
72  icalparameter_kind kind);
73 
87 LIBICAL_ICAL_EXPORT void icalproperty_remove_parameter_by_name(icalproperty *prop,
88  const char *name);
89 
98 LIBICAL_ICAL_EXPORT void icalproperty_remove_parameter_by_ref(icalproperty *prop,
99  icalparameter *param);
100 
101 LIBICAL_ICAL_EXPORT int icalproperty_count_parameters(const icalproperty *prop);
102 
103 /* Iterate through the parameters */
104 LIBICAL_ICAL_EXPORT icalparameter *icalproperty_get_first_parameter(icalproperty *prop,
105  icalparameter_kind kind);
106 LIBICAL_ICAL_EXPORT icalparameter *icalproperty_get_next_parameter(icalproperty *prop,
107  icalparameter_kind kind);
108 /* Access the value of the property */
109 LIBICAL_ICAL_EXPORT void icalproperty_set_value(icalproperty *prop, icalvalue *value);
110 LIBICAL_ICAL_EXPORT void icalproperty_set_value_from_string(icalproperty *prop, const char *value,
111  const char *kind);
112 
113 LIBICAL_ICAL_EXPORT icalvalue *icalproperty_get_value(const icalproperty *prop);
114 LIBICAL_ICAL_EXPORT const char *icalproperty_get_value_as_string(const icalproperty *prop);
115 LIBICAL_ICAL_EXPORT char *icalproperty_get_value_as_string_r(const icalproperty *prop);
116 
120 LIBICAL_ICAL_EXPORT void icalvalue_set_parent(icalvalue *value, icalproperty *property);
121 
126 LIBICAL_ICAL_EXPORT icalproperty *icalvalue_get_parent(icalvalue *value);
127 
128 /* Deal with X properties */
129 
130 LIBICAL_ICAL_EXPORT void icalproperty_set_x_name(icalproperty *prop, const char *name);
131 LIBICAL_ICAL_EXPORT const char *icalproperty_get_x_name(icalproperty *prop);
132 
137 LIBICAL_ICAL_EXPORT const char *icalproperty_get_property_name(const icalproperty *prop);
138 LIBICAL_ICAL_EXPORT char *icalproperty_get_property_name_r(const icalproperty *prop);
139 
140 LIBICAL_ICAL_EXPORT icalvalue_kind icalparameter_value_to_value_kind(icalparameter_value value);
141 
146 LIBICAL_ICAL_EXPORT void icalparameter_set_parent(icalparameter *param, icalproperty *property);
147 
152 LIBICAL_ICAL_EXPORT icalproperty *icalparameter_get_parent(icalparameter *param);
153 
154 /* Convert kinds to string and get default value type */
155 LIBICAL_ICAL_EXPORT icalvalue_kind icalproperty_kind_to_value_kind(icalproperty_kind kind);
156 LIBICAL_ICAL_EXPORT icalproperty_kind icalproperty_value_kind_to_kind(icalvalue_kind kind);
157 LIBICAL_ICAL_EXPORT const char *icalproperty_kind_to_string(icalproperty_kind kind);
158 LIBICAL_ICAL_EXPORT icalproperty_kind icalproperty_string_to_kind(const char *string);
159 
161 LIBICAL_ICAL_EXPORT int icalproperty_kind_is_valid(const icalproperty_kind kind);
162 
163 LIBICAL_ICAL_EXPORT icalproperty_method icalproperty_string_to_method(const char *str);
164 LIBICAL_ICAL_EXPORT const char *icalproperty_method_to_string(icalproperty_method method);
165 
166 LIBICAL_ICAL_EXPORT const char *icalproperty_enum_to_string(int e);
167 LIBICAL_ICAL_EXPORT char *icalproperty_enum_to_string_r(int e);
168 LIBICAL_ICAL_EXPORT int icalproperty_kind_and_string_to_enum(const int kind, const char *str);
169 
170 LIBICAL_ICAL_EXPORT const char *icalproperty_status_to_string(icalproperty_status);
171 LIBICAL_ICAL_EXPORT icalproperty_status icalproperty_string_to_status(const char *string);
172 
173 LIBICAL_ICAL_EXPORT int icalproperty_enum_belongs_to_property(icalproperty_kind kind, int e);
174 
179 LIBICAL_ICAL_EXPORT void icalproperty_normalize(icalproperty *prop);
180 
181 #endif /*ICALPROPERTY_H */
icalproperty * icalparameter_get_parent(icalparameter *param)
Definition: icalparameter.c:417
const char * icalproperty_get_property_name(const icalproperty *prop)
Definition: icalproperty.c:867
void icalproperty_remove_parameter_by_ref(icalproperty *prop, icalparameter *param)
Removes the specified parameter reference from the property.
Definition: icalproperty.c:674
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:628
void icalproperty_normalize(icalproperty *prop)
Definition: icalproperty.c:929
void icalvalue_set_parent(icalvalue *value, icalproperty *property)
Definition: icalvalue.c:1471
icalproperty * icalvalue_get_parent(icalvalue *value)
Definition: icalvalue.c:1478
void icalparameter_set_parent(icalparameter *param, icalproperty *property)
Definition: icalparameter.c:410
int icalproperty_kind_is_valid(const icalproperty_kind kind)
Definition: icalproperty.c:37