Libical API Documentation  3.0
icalproperty.h
1 /*======================================================================
2  FILE: icalproperty.h
3  CREATOR: eric 20 March 1999
4 
5  (C) COPYRIGHT 2000, Eric Busboom <eric@softwarestudio.org>
6  http://www.softwarestudio.org
7 
8  This library is free software; you can redistribute it and/or modify
9  it under the terms of either:
10 
11  The LGPL as published by the Free Software Foundation, version
12  2.1, available at: http://www.gnu.org/licenses/lgpl-2.1.html
13 
14  Or:
15 
16  The Mozilla Public License Version 2.0. You may obtain a copy of
17  the License at http://www.mozilla.org/MPL/
18 ======================================================================*/
19 
20 #ifndef ICALPROPERTY_H
21 #define ICALPROPERTY_H
22 
23 #include "libical_ical_export.h"
24 #include "icalderivedproperty.h" /* To get icalproperty_kind enumerations */
25 
26 #include <stdarg.h> /* for va_... */
27 
28 LIBICAL_ICAL_EXPORT icalproperty *icalproperty_new(icalproperty_kind kind);
29 
30 LIBICAL_ICAL_EXPORT icalproperty *icalproperty_new_impl(icalproperty_kind kind);
31 
32 LIBICAL_ICAL_EXPORT icalproperty *icalproperty_new_clone(icalproperty *prop);
33 
34 LIBICAL_ICAL_EXPORT icalproperty *icalproperty_new_from_string(const char *str);
35 
36 LIBICAL_ICAL_EXPORT const char *icalproperty_as_ical_string(icalproperty *prop);
37 
38 LIBICAL_ICAL_EXPORT char *icalproperty_as_ical_string_r(icalproperty *prop);
39 
40 LIBICAL_ICAL_EXPORT void icalproperty_free(icalproperty *prop);
41 
42 LIBICAL_ICAL_EXPORT icalproperty_kind icalproperty_isa(icalproperty *property);
43 
44 LIBICAL_ICAL_EXPORT int icalproperty_isa_property(void *property);
45 
46 LIBICAL_ICAL_EXPORT void icalproperty_add_parameters(struct icalproperty_impl *prop, va_list args);
47 
48 LIBICAL_ICAL_EXPORT void icalproperty_add_parameter(icalproperty *prop, icalparameter *parameter);
49 
50 LIBICAL_ICAL_EXPORT void icalproperty_set_parameter(icalproperty *prop, icalparameter *parameter);
51 
52 LIBICAL_ICAL_EXPORT void icalproperty_set_parameter_from_string(icalproperty *prop,
53  const char *name,
54  const char *value);
55 LIBICAL_ICAL_EXPORT const char *icalproperty_get_parameter_as_string(icalproperty *prop,
56  const char *name);
57 
58 LIBICAL_ICAL_EXPORT char *icalproperty_get_parameter_as_string_r(icalproperty *prop,
59  const char *name);
60 
61 LIBICAL_ICAL_EXPORT void icalproperty_remove_parameter_by_kind(icalproperty *prop,
62  icalparameter_kind kind);
63 
64 LIBICAL_ICAL_EXPORT void icalproperty_remove_parameter_by_name(icalproperty *prop,
65  const char *name);
66 
67 LIBICAL_ICAL_EXPORT void icalproperty_remove_parameter_by_ref(icalproperty *prop,
68  icalparameter *param);
69 
70 LIBICAL_ICAL_EXPORT int icalproperty_count_parameters(const icalproperty *prop);
71 
72 /* Iterate through the parameters */
73 LIBICAL_ICAL_EXPORT icalparameter *icalproperty_get_first_parameter(icalproperty *prop,
74  icalparameter_kind kind);
75 LIBICAL_ICAL_EXPORT icalparameter *icalproperty_get_next_parameter(icalproperty *prop,
76  icalparameter_kind kind);
77 /* Access the value of the property */
78 LIBICAL_ICAL_EXPORT void icalproperty_set_value(icalproperty *prop, icalvalue *value);
79 LIBICAL_ICAL_EXPORT void icalproperty_set_value_from_string(icalproperty *prop, const char *value,
80  const char *kind);
81 
82 LIBICAL_ICAL_EXPORT icalvalue *icalproperty_get_value(const icalproperty *prop);
83 LIBICAL_ICAL_EXPORT const char *icalproperty_get_value_as_string(const icalproperty *prop);
84 LIBICAL_ICAL_EXPORT char *icalproperty_get_value_as_string_r(const icalproperty *prop);
85 
86 LIBICAL_ICAL_EXPORT void icalvalue_set_parent(icalvalue *value, icalproperty *property);
87 LIBICAL_ICAL_EXPORT icalproperty *icalvalue_get_parent(icalvalue *value);
88 
89 /* Deal with X properties */
90 
91 LIBICAL_ICAL_EXPORT void icalproperty_set_x_name(icalproperty *prop, const char *name);
92 LIBICAL_ICAL_EXPORT const char *icalproperty_get_x_name(icalproperty *prop);
93 
98 LIBICAL_ICAL_EXPORT const char *icalproperty_get_property_name(const icalproperty *prop);
99 LIBICAL_ICAL_EXPORT char *icalproperty_get_property_name_r(const icalproperty *prop);
100 
101 LIBICAL_ICAL_EXPORT icalvalue_kind icalparameter_value_to_value_kind(icalparameter_value value);
102 
103 LIBICAL_ICAL_EXPORT void icalparameter_set_parent(icalparameter *param, icalproperty *property);
104 LIBICAL_ICAL_EXPORT icalproperty *icalparameter_get_parent(icalparameter *param);
105 
106 /* Convert kinds to string and get default value type */
107 LIBICAL_ICAL_EXPORT icalvalue_kind icalproperty_kind_to_value_kind(icalproperty_kind kind);
108 LIBICAL_ICAL_EXPORT icalproperty_kind icalproperty_value_kind_to_kind(icalvalue_kind kind);
109 LIBICAL_ICAL_EXPORT const char *icalproperty_kind_to_string(icalproperty_kind kind);
110 LIBICAL_ICAL_EXPORT icalproperty_kind icalproperty_string_to_kind(const char *string);
111 
113 LIBICAL_ICAL_EXPORT int icalproperty_kind_is_valid(const icalproperty_kind kind);
114 
115 LIBICAL_ICAL_EXPORT icalproperty_method icalproperty_string_to_method(const char *str);
116 LIBICAL_ICAL_EXPORT const char *icalproperty_method_to_string(icalproperty_method method);
117 
118 LIBICAL_ICAL_EXPORT const char *icalproperty_enum_to_string(int e);
119 LIBICAL_ICAL_EXPORT char *icalproperty_enum_to_string_r(int e);
120 LIBICAL_ICAL_EXPORT int icalproperty_kind_and_string_to_enum(const int kind, const char *str);
121 
122 LIBICAL_ICAL_EXPORT const char *icalproperty_status_to_string(icalproperty_status);
123 LIBICAL_ICAL_EXPORT icalproperty_status icalproperty_string_to_status(const char *string);
124 
125 LIBICAL_ICAL_EXPORT int icalproperty_enum_belongs_to_property(icalproperty_kind kind, int e);
126 
127 LIBICAL_ICAL_EXPORT void icalproperty_normalize(icalproperty *prop);
128 
129 #endif /*ICALPROPERTY_H */
Definition: icalproperty.c:36