Libical API Documentation 4.0
Loading...
Searching...
No Matches
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
7 SPDX-License-Identifier: LGPL-2.1-only OR MPL-2.0
8
9======================================================================*/
10
11#ifndef ICALPROPERTY_H
12#define ICALPROPERTY_H
13
14#include "libical_ical_export.h"
15#include "icalderivedproperty.h" /* To get icalproperty_kind enumerations */
16#include "pvl.h"
17
18#include <stdarg.h> /* for va_... */
19
21
22LIBICAL_ICAL_EXPORT icalproperty *icalproperty_new(icalproperty_kind kind);
23
24LIBICAL_ICAL_EXPORT icalproperty *icalproperty_new_impl(icalproperty_kind kind);
25
31LIBICAL_ICAL_EXPORT icalproperty *icalproperty_clone(const icalproperty *prop);
32
33LIBICAL_ICAL_EXPORT icalproperty *icalproperty_new_from_string(const char *str);
34
35LIBICAL_ICAL_EXPORT const char *icalproperty_as_ical_string(icalproperty *prop);
36
37LIBICAL_ICAL_EXPORT char *icalproperty_as_ical_string_r(icalproperty *prop);
38
39LIBICAL_ICAL_EXPORT void icalproperty_free(icalproperty *prop);
40
41LIBICAL_ICAL_EXPORT icalproperty_kind icalproperty_isa(icalproperty *property);
42
43LIBICAL_ICAL_EXPORT bool icalproperty_isa_property(void *property);
44
45LIBICAL_ICAL_EXPORT void icalproperty_add_parameters(struct icalproperty_impl *prop, va_list args);
46
47LIBICAL_ICAL_EXPORT void icalproperty_add_parameter(icalproperty *prop, icalparameter *parameter);
48
49LIBICAL_ICAL_EXPORT void icalproperty_set_parameter(icalproperty *prop, icalparameter *parameter);
50
51LIBICAL_ICAL_EXPORT void icalproperty_set_parameter_from_string(icalproperty *prop,
52 const char *name,
53 const char *value);
54LIBICAL_ICAL_EXPORT const char *icalproperty_get_parameter_as_string(icalproperty *prop,
55 const char *name);
56
57LIBICAL_ICAL_EXPORT char *icalproperty_get_parameter_as_string_r(icalproperty *prop,
58 const char *name);
59
69LIBICAL_ICAL_EXPORT void icalproperty_remove_parameter_by_kind(icalproperty *prop,
70 icalparameter_kind kind);
71
85LIBICAL_ICAL_EXPORT void icalproperty_remove_parameter_by_name(icalproperty *prop,
86 const char *name);
87
96LIBICAL_ICAL_EXPORT void icalproperty_remove_parameter_by_ref(icalproperty *prop,
97 icalparameter *param);
98
99LIBICAL_ICAL_EXPORT int icalproperty_count_parameters(const icalproperty *prop);
100
101/* Iterate through the parameters */
102LIBICAL_ICAL_EXPORT icalparameter *icalproperty_get_first_parameter(icalproperty *prop,
103 icalparameter_kind kind);
104LIBICAL_ICAL_EXPORT icalparameter *icalproperty_get_next_parameter(icalproperty *prop,
105 icalparameter_kind kind);
106/* Access the value of the property */
107LIBICAL_ICAL_EXPORT void icalproperty_set_value(icalproperty *prop, icalvalue *value);
108LIBICAL_ICAL_EXPORT void icalproperty_set_value_from_string(icalproperty *prop, const char *value,
109 const char *kind);
110
111LIBICAL_ICAL_EXPORT icalvalue *icalproperty_get_value(const icalproperty *prop);
112LIBICAL_ICAL_EXPORT const char *icalproperty_get_value_as_string(const icalproperty *prop);
113LIBICAL_ICAL_EXPORT char *icalproperty_get_value_as_string_r(const icalproperty *prop);
114
118LIBICAL_ICAL_EXPORT void icalvalue_set_parent(icalvalue *value, icalproperty *property);
119
124LIBICAL_ICAL_EXPORT icalproperty *icalvalue_get_parent(icalvalue *value);
125
126/* Deal with X properties */
127
128LIBICAL_ICAL_EXPORT void icalproperty_set_x_name(icalproperty *prop, const char *name);
129LIBICAL_ICAL_EXPORT const char *icalproperty_get_x_name(icalproperty *prop);
130
135LIBICAL_ICAL_EXPORT const char *icalproperty_get_property_name(const icalproperty *prop);
136LIBICAL_ICAL_EXPORT char *icalproperty_get_property_name_r(const icalproperty *prop);
137
138LIBICAL_ICAL_EXPORT icalvalue_kind icalparameter_value_to_value_kind(icalparameter_value value);
139
144LIBICAL_ICAL_EXPORT void icalparameter_set_parent(icalparameter *param, icalproperty *property);
145
150LIBICAL_ICAL_EXPORT icalproperty *icalparameter_get_parent(icalparameter *param);
151
152/* Convert kinds to string and get default value type */
153LIBICAL_ICAL_EXPORT icalvalue_kind icalproperty_kind_to_value_kind(icalproperty_kind kind);
154LIBICAL_ICAL_EXPORT icalproperty_kind icalproperty_value_kind_to_kind(icalvalue_kind kind);
155LIBICAL_ICAL_EXPORT const char *icalproperty_kind_to_string(icalproperty_kind kind);
156LIBICAL_ICAL_EXPORT icalproperty_kind icalproperty_string_to_kind(const char *string);
157
159LIBICAL_ICAL_EXPORT bool icalproperty_kind_is_valid(const icalproperty_kind kind);
160
161LIBICAL_ICAL_EXPORT icalproperty_method icalproperty_string_to_method(const char *str);
162LIBICAL_ICAL_EXPORT const char *icalproperty_method_to_string(icalproperty_method method);
163
164LIBICAL_ICAL_EXPORT const char *icalproperty_enum_to_string(int e);
165LIBICAL_ICAL_EXPORT char *icalproperty_enum_to_string_r(int e);
166LIBICAL_ICAL_EXPORT int icalproperty_kind_and_string_to_enum(const int kind, const char *str);
167
168LIBICAL_ICAL_EXPORT const char *icalproperty_status_to_string(icalproperty_status);
169LIBICAL_ICAL_EXPORT icalproperty_status icalproperty_string_to_status(const char *string);
170
171LIBICAL_ICAL_EXPORT const char *icalproperty_action_to_string(icalproperty_action);
172LIBICAL_ICAL_EXPORT icalproperty_action icalproperty_string_to_action(const char *string);
173
174LIBICAL_ICAL_EXPORT const char *icalproperty_transp_to_string(icalproperty_transp);
175LIBICAL_ICAL_EXPORT icalproperty_transp icalproperty_string_to_transp(const char *string);
176
177LIBICAL_ICAL_EXPORT const char *icalproperty_class_to_string(icalproperty_class);
178LIBICAL_ICAL_EXPORT icalproperty_class icalproperty_string_to_class(const char *string);
179
180LIBICAL_ICAL_EXPORT const char *icalproperty_participanttype_to_string(icalproperty_participanttype);
181LIBICAL_ICAL_EXPORT icalproperty_participanttype icalproperty_string_to_participanttype(const char *string);
182
183LIBICAL_ICAL_EXPORT const char *icalproperty_resourcetype_to_string(icalproperty_resourcetype);
184LIBICAL_ICAL_EXPORT icalproperty_resourcetype icalproperty_string_to_resourcetype(const char *string);
185
186LIBICAL_ICAL_EXPORT bool icalproperty_enum_belongs_to_property(icalproperty_kind kind, int e);
187
192LIBICAL_ICAL_EXPORT void icalproperty_normalize(icalproperty *prop);
193
194/* This is exposed so that callers will not have to allocate and
195 deallocate iterators. Pretend that you can't see it. */
196typedef struct icalparamiter {
197 icalparameter_kind kind;
198 pvl_elem iter;
200
201LIBICAL_ICAL_EXPORT icalparamiter icalproperty_begin_parameter(icalproperty *property, icalparameter_kind kind);
202
203LIBICAL_ICAL_EXPORT icalparameter *icalparamiter_next(icalparamiter *i);
204
205LIBICAL_ICAL_EXPORT icalparameter *icalparamiter_deref(icalparamiter *i);
206
207#endif /*ICALPROPERTY_H */
icalproperty * icalproperty_clone(const icalproperty *prop)
Deeply clones an icalproperty.
Definition icalproperty.c:82
void icalproperty_remove_parameter_by_ref(icalproperty *prop, icalparameter *param)
Removes the specified parameter reference from the property.
Definition icalproperty.c:664
void icalproperty_remove_parameter_by_name(icalproperty *prop, const char *name)
Removes all parameters with the specified name.
Definition icalproperty.c:635
void icalproperty_remove_parameter_by_kind(icalproperty *prop, icalparameter_kind kind)
Removes all parameters with the specified kind.
Definition icalproperty.c:618
const char * icalproperty_get_property_name(const icalproperty *prop)
Definition icalproperty.c:855
void icalproperty_normalize(icalproperty *prop)
Definition icalproperty.c:917
void icalvalue_set_parent(icalvalue *value, icalproperty *property)
Definition icalvalue.c:1489
icalproperty * icalparameter_get_parent(icalparameter *param)
Definition icalparameter.c:411
icalproperty * icalvalue_get_parent(icalvalue *value)
Definition icalvalue.c:1496
void icalparameter_set_parent(icalparameter *param, icalproperty *property)
Definition icalparameter.c:404
bool icalproperty_kind_is_valid(const icalproperty_kind kind)
Definition icalproperty.h:196
Definition icalproperty.c:27