Libical API Documentation 3.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 (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
29LIBICAL_ICAL_EXPORT icalproperty *icalproperty_new(icalproperty_kind kind);
30
31LIBICAL_ICAL_EXPORT icalproperty *icalproperty_new_impl(icalproperty_kind kind);
32
33LIBICAL_ICAL_EXPORT icalproperty *icalproperty_new_clone(icalproperty *prop);
34
35LIBICAL_ICAL_EXPORT icalproperty *icalproperty_new_from_string(const char *str);
36
37LIBICAL_ICAL_EXPORT const char *icalproperty_as_ical_string(icalproperty *prop);
38
39LIBICAL_ICAL_EXPORT char *icalproperty_as_ical_string_r(icalproperty *prop);
40
41LIBICAL_ICAL_EXPORT void icalproperty_free(icalproperty *prop);
42
43LIBICAL_ICAL_EXPORT icalproperty_kind icalproperty_isa(icalproperty *property);
44
45LIBICAL_ICAL_EXPORT int icalproperty_isa_property(void *property);
46
47LIBICAL_ICAL_EXPORT void icalproperty_add_parameters(struct icalproperty_impl *prop, va_list args);
48
49LIBICAL_ICAL_EXPORT void icalproperty_add_parameter(icalproperty *prop, icalparameter *parameter);
50
51LIBICAL_ICAL_EXPORT void icalproperty_set_parameter(icalproperty *prop, icalparameter *parameter);
52
53LIBICAL_ICAL_EXPORT void icalproperty_set_parameter_from_string(icalproperty *prop,
54 const char *name,
55 const char *value);
56LIBICAL_ICAL_EXPORT const char *icalproperty_get_parameter_as_string(icalproperty *prop,
57 const char *name);
58
59LIBICAL_ICAL_EXPORT char *icalproperty_get_parameter_as_string_r(icalproperty *prop,
60 const char *name);
61
71LIBICAL_ICAL_EXPORT void icalproperty_remove_parameter_by_kind(icalproperty *prop,
72 icalparameter_kind kind);
73
87LIBICAL_ICAL_EXPORT void icalproperty_remove_parameter_by_name(icalproperty *prop,
88 const char *name);
89
98LIBICAL_ICAL_EXPORT void icalproperty_remove_parameter_by_ref(icalproperty *prop,
99 icalparameter *param);
100
101LIBICAL_ICAL_EXPORT int icalproperty_count_parameters(const icalproperty *prop);
102
103/* Iterate through the parameters */
104LIBICAL_ICAL_EXPORT icalparameter *icalproperty_get_first_parameter(icalproperty *prop,
105 icalparameter_kind kind);
106LIBICAL_ICAL_EXPORT icalparameter *icalproperty_get_next_parameter(icalproperty *prop,
107 icalparameter_kind kind);
108/* Access the value of the property */
109LIBICAL_ICAL_EXPORT void icalproperty_set_value(icalproperty *prop, icalvalue *value);
110LIBICAL_ICAL_EXPORT void icalproperty_set_value_from_string(icalproperty *prop, const char *value,
111 const char *kind);
112
113LIBICAL_ICAL_EXPORT icalvalue *icalproperty_get_value(const icalproperty *prop);
114LIBICAL_ICAL_EXPORT const char *icalproperty_get_value_as_string(const icalproperty *prop);
115LIBICAL_ICAL_EXPORT char *icalproperty_get_value_as_string_r(const icalproperty *prop);
116
120LIBICAL_ICAL_EXPORT void icalvalue_set_parent(icalvalue *value, icalproperty *property);
121
126LIBICAL_ICAL_EXPORT icalproperty *icalvalue_get_parent(icalvalue *value);
127
128/* Deal with X properties */
129
130LIBICAL_ICAL_EXPORT void icalproperty_set_x_name(icalproperty *prop, const char *name);
131LIBICAL_ICAL_EXPORT const char *icalproperty_get_x_name(icalproperty *prop);
132
137LIBICAL_ICAL_EXPORT const char *icalproperty_get_property_name(const icalproperty *prop);
138LIBICAL_ICAL_EXPORT char *icalproperty_get_property_name_r(const icalproperty *prop);
139
140LIBICAL_ICAL_EXPORT icalvalue_kind icalparameter_value_to_value_kind(icalparameter_value value);
141
146LIBICAL_ICAL_EXPORT void icalparameter_set_parent(icalparameter *param, icalproperty *property);
147
152LIBICAL_ICAL_EXPORT icalproperty *icalparameter_get_parent(icalparameter *param);
153
154/* Convert kinds to string and get default value type */
155LIBICAL_ICAL_EXPORT icalvalue_kind icalproperty_kind_to_value_kind(icalproperty_kind kind);
156LIBICAL_ICAL_EXPORT icalproperty_kind icalproperty_value_kind_to_kind(icalvalue_kind kind);
157LIBICAL_ICAL_EXPORT const char *icalproperty_kind_to_string(icalproperty_kind kind);
158LIBICAL_ICAL_EXPORT icalproperty_kind icalproperty_string_to_kind(const char *string);
159
161LIBICAL_ICAL_EXPORT int icalproperty_kind_is_valid(const icalproperty_kind kind);
162
163LIBICAL_ICAL_EXPORT icalproperty_method icalproperty_string_to_method(const char *str);
164LIBICAL_ICAL_EXPORT const char *icalproperty_method_to_string(icalproperty_method method);
165
166LIBICAL_ICAL_EXPORT const char *icalproperty_enum_to_string(int e);
167LIBICAL_ICAL_EXPORT char *icalproperty_enum_to_string_r(int e);
168LIBICAL_ICAL_EXPORT int icalproperty_kind_and_string_to_enum(const int kind, const char *str);
169
170LIBICAL_ICAL_EXPORT const char *icalproperty_status_to_string(icalproperty_status);
171LIBICAL_ICAL_EXPORT icalproperty_status icalproperty_string_to_status(const char *string);
172
173LIBICAL_ICAL_EXPORT int icalproperty_enum_belongs_to_property(icalproperty_kind kind, int e);
174
179LIBICAL_ICAL_EXPORT void icalproperty_normalize(icalproperty *prop);
180
181#endif /*ICALPROPERTY_H */
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
const char * icalproperty_get_property_name(const icalproperty *prop)
Definition icalproperty.c:867
void icalproperty_normalize(icalproperty *prop)
Definition icalproperty.c:929
void icalvalue_set_parent(icalvalue *value, icalproperty *property)
Definition icalvalue.c:1491
icalproperty * icalparameter_get_parent(icalparameter *param)
Definition icalparameter.c:417
icalproperty * icalvalue_get_parent(icalvalue *value)
Definition icalvalue.c:1498
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