Libical API Documentation 3.1
icalproperty_cxx.h
Go to the documentation of this file.
1
12#ifndef ICALPROPERTY_CXX_H
13#define ICALPROPERTY_CXX_H
14
15#include "libical_ical_export.h"
16#include "icptrholder_cxx.h"
17
18extern "C"
19{
20#include "icalerror.h"
21#include "icalproperty.h"
22}
23
24#include <string>
25
26namespace LibICal
27{
28
29class ICalParameter;
30class ICalValue;
31
32class LIBICAL_ICAL_EXPORT ICalProperty
33{
34public:
37 ICalProperty &operator=(const ICalProperty &);
39
40 explicit ICalProperty(icalproperty *v);
41 explicit ICalProperty(std::string str);
42 explicit ICalProperty(icalproperty_kind kind);
43 ICalProperty(icalproperty_kind kind, std::string str);
44
45 operator icalproperty *()
46 {
47 return imp;
48 }
49 int operator==(ICalProperty &rhs);
50
51 void detach();
52
53public:
54 std::string as_ical_string();
55 icalproperty_kind isa();
56 int isa_property(void *property);
57
58 void add_parameter(ICalParameter &parameter);
59 void set_parameter(ICalParameter &parameter);
60 void set_parameter_from_string(const std::string &name, const std::string &val);
61 std::string get_parameter_as_string(const std::string &name);
62 void remove_parameter_by_kind(const icalparameter_kind &kind);
63 int count_parameters();
64
66 ICalParameter *get_first_parameter(const icalparameter_kind &kind);
67 ICalParameter *get_next_parameter(const icalparameter_kind &kind);
68
70 void set_value(const ICalValue &val);
71 void set_value_from_string(const std::string &val, const std::string &kind);
72
73 ICalValue *get_value();
74 std::string get_value_as_string();
75
80 std::string get_name() const;
81
82public:
83 /* Deal with X properties */
84 static void set_x_name(ICalProperty &prop, const std::string &name);
85 static std::string get_x_name(ICalProperty &prop);
86
87 static icalvalue_kind value_to_value_kind(const icalparameter_value &val);
88
89 /* Convert kinds to string and get default value type */
90 static icalvalue_kind kind_to_value_kind(const icalproperty_kind &kind);
91 static icalproperty_kind value_kind_to_kind(const icalvalue_kind &kind);
92 static std::string kind_to_string(const icalproperty_kind &kind);
93 static icalproperty_kind string_to_kind(const std::string &str);
94
95 static icalproperty_method string_to_method(const std::string &str);
96 static std::string method_to_string(const icalproperty_method &method);
97
98 static std::string enum_to_string(const int &e);
99 static int kind_and_string_to_enum(const icalproperty_kind &kind, const std::string &str);
100
101 static std::string status_to_string(const icalproperty_status &status);
102 static icalproperty_status string_to_status(const std::string &str);
103
104 static int enum_belongs_to_property(const icalproperty_kind &kind, const int &e);
105
106public:
107 /* ACTION */
108 void set_action(const enum icalproperty_action &val);
109 enum icalproperty_action get_action();
110
111 /* ATTACH */
112 void set_attach(icalattach *val);
113 icalattach *get_attach() const;
114
115 /* ATTENDEE */
116 void set_attendee(const std::string &val);
117 std::string get_attendee() const;
118
119 /* CALSCALE */
120 void set_calscale(const std::string &val);
121 std::string get_calscale() const;
122
123 /* CATEGORIES */
124 void set_categories(const std::string &val);
125 std::string get_categories() const;
126
127 /* CLASS */
128 void set_class(const enum icalproperty_class &val);
129 enum icalproperty_class get_class() const;
130
131 /* COMMENT */
132 void set_comment(const std::string &val);
133 std::string get_comment() const;
134
135 /* COMPLETED */
136 void set_completed(const struct icaltimetype &val);
137 struct icaltimetype get_completed() const;
138
139 /* CONTACT */
140 void set_contact(const std::string &val);
141 std::string get_contact() const;
142
143 /* CREATED */
144 void set_created(const struct icaltimetype &val);
145 struct icaltimetype get_created() const;
146
147 /* DESCRIPTION */
148 void set_description(const std::string &val);
149 std::string get_description() const;
150
151 /* DTEND */
152 void set_dtend(const struct icaltimetype &val);
153 struct icaltimetype get_dtend() const;
154
155 /* DTSTAMP */
156 void set_dtstamp(const struct icaltimetype &val);
157 struct icaltimetype get_dtstamp() const;
158
159 /* DTSTART */
160 void set_dtstart(const struct icaltimetype &val);
161 struct icaltimetype get_dtstart() const;
162
163 /* DUE */
164 void set_due(const struct icaltimetype &val);
165 struct icaltimetype get_due() const;
166
167 /* DURATION */
168 void set_duration(const struct icaldurationtype &val);
169 struct icaldurationtype get_duration() const;
170
171 /* EXDATE */
172 void set_exdate(const struct icaltimetype &val);
173 struct icaltimetype get_exdate() const;
174
175 /* EXPAND */
176 void set_expand(const int &val);
177 int get_expand() const;
178
179 /* EXRULE */
180 void set_exrule(const struct icalrecurrencetype &val);
181 struct icalrecurrencetype get_exrule() const;
182
183 /* FREEBUSY */
184 void set_freebusy(const struct icalperiodtype &val);
185 struct icalperiodtype get_freebusy() const;
186
187 /* GEO */
188 void set_geo(const struct icalgeotype &val);
189 struct icalgeotype get_geo() const;
190
191 /* GRANT */
192 void set_grant(const std::string &val);
193 std::string get_grant() const;
194
195 /* LAST-MODIFIED */
196 void set_lastmodified(const struct icaltimetype &val);
197 struct icaltimetype get_lastmodified() const;
198
199 /* LOCATION */
200 void set_location(const std::string &val);
201 std::string get_location() const;
202
203 /* MAXRESULTS */
204 void set_maxresults(const int &val);
205 int get_maxresults() const;
206
207 /* MAXRESULTSSIZE */
208 void set_maxresultsize(const int &val);
209 int get_maxresultsize() const;
210
211 /* METHOD */
212 void set_method(const enum icalproperty_method &val);
213 enum icalproperty_method get_method() const;
214
215 /* OWNER */
216 void set_owner(const std::string &val);
217 std::string get_owner() const;
218
219 /* ORGANIZER */
220 void set_organizer(const std::string &val);
221 std::string get_organizer() const;
222
223 /* PERCENT-COMPLETE */
224 void set_percentcomplete(const int &val);
225 int get_percentcomplete() const;
226
227 /* PRIORITY */
228 void set_priority(const int &val);
229 int get_priority() const;
230
231 /* PRODID */
232 void set_prodid(const std::string &val);
233 std::string get_prodid() const;
234
235 /* QUERY */
236 void set_query(const std::string &val);
237 std::string get_query() const;
238
239 /* QUERYNAME */
240 void set_queryname(const std::string &val);
241 std::string get_queryname() const;
242
243 /* RDATE */
244 void set_rdate(const struct icaldatetimeperiodtype &val);
245 struct icaldatetimeperiodtype get_rdate() const;
246
247 /* RECURRENCE-ID */
248 void set_recurrenceid(const struct icaltimetype &val);
249 struct icaltimetype get_recurrenceid() const;
250
251 /* RELATED-TO */
252 void set_relatedto(const std::string &val);
253 std::string get_relatedto() const;
254
255 /* RELCALID */
256 void set_relcalid(const std::string &val);
257 std::string get_relcalid() const;
258
259 /* REPEAT */
260 void set_repeat(const int &val);
261 int get_repeat() const;
262
263 /* REQUEST-STATUS */
264 void set_requeststatus(const std::string &val);
265 std::string get_requeststatus() const;
266
267 /* RESOURCES */
268 void set_resources(const std::string &val);
269 std::string get_resources() const;
270
271 /* RRULE */
272 void set_rrule(const struct icalrecurrencetype &val);
273 struct icalrecurrencetype get_rrule() const;
274
275 /* SCOPE */
276 void set_scope(const std::string &val);
277 std::string get_scope() const;
278
279 /* SEQUENCE */
280 void set_sequence(const int &val);
281 int get_sequence() const;
282
283 /* STATUS */
284 void set_status(const enum icalproperty_status &val);
285 enum icalproperty_status get_status() const;
286
287 /* SUMMARY */
288 void set_summary(const std::string &val);
289 std::string get_summary() const;
290
291 /* TARGET */
292 void set_target(const std::string &val);
293 std::string get_target() const;
294
295 /* TRANSP */
296 void set_transp(const enum icalproperty_transp &val);
297 enum icalproperty_transp get_transp() const;
298
299 /* TRIGGER */
300 void set_trigger(const struct icaltriggertype &val);
301 struct icaltriggertype get_trigger() const;
302
303 /* TZID */
304 void set_tzid(const std::string &val);
305 std::string get_tzid() const;
306
307 /* TZNAME */
308 void set_tzname(const std::string &val);
309 std::string get_tzname() const;
310
311 /* TZOFFSETFROM */
312 void set_tzoffsetfrom(const int &val);
313 int get_tzoffsetfrom() const;
314
315 /* TZOFFSETTO */
316 void set_tzoffsetto(const int &val);
317 int get_tzoffsetto() const;
318
319 /* TZURL */
320 void set_tzurl(const std::string &val);
321 std::string get_tzurl() const;
322
323 /* UID */
324 void set_uid(const std::string &val);
325 std::string get_uid() const;
326
327 /* URL */
328 void set_url(const std::string &val);
329 std::string get_url() const;
330
331 /* VERSION */
332 void set_version(const std::string &val);
333 std::string get_version() const;
334
335 /* X */
336 void set_x(const std::string &val);
337 std::string get_x() const;
338
339 /* X-LIC-CLUSTERCOUNT */
340 void set_xlicclustercount(const std::string &val);
341 std::string get_xlicclustercount() const;
342
343 /* X-LIC-ERROR */
344 void set_xlicerror(const std::string &val);
345 std::string get_xlicerror() const;
346
347 /* X-LIC-MIMECHARSET */
348 void set_xlicmimecharset(const std::string &val);
349 std::string get_xlicmimecharset() const;
350
351 /* X-LIC-MIMECID */
352 void set_xlicmimecid(const std::string &val);
353 std::string get_xlicmimecid() const;
354
355 /* X-LIC-MIMECONTENTTYPE */
356 void set_xlicmimecontenttype(const std::string &val);
357 std::string get_xlicmimecontenttype() const;
358
359 /* X-LIC-MIMEENCODING */
360 void set_xlicmimeencoding(const std::string &val);
361 std::string get_xlicmimeencoding() const;
362
363 /* X-LIC-MIMEFILENAME */
364 void set_xlicmimefilename(const std::string &val);
365 std::string get_xlicmimefilename() const;
366
367 /* X-LIC-MIMEOPTINFO */
368 void set_xlicmimeoptinfo(const std::string &val);
369 std::string get_xlicmimeoptinfo() const;
370
371private:
372 icalproperty *imp;
374};
375
376} // namespace LibICal
377
379
380#endif /* ICalProperty_H */
Definition: icptrholder_cxx.h:40
Definition: icalparameter_cxx.h:30
Definition: icalproperty_cxx.h:33
ICalParameter * get_first_parameter(const icalparameter_kind &kind)
std::string get_name() const
void set_value(const ICalValue &val)
Definition: icalvalue_cxx.h:28
Error handling for libical.
C++ template classes for managing C++ pointers returned by VComponent::get_..._component,...
Definition: icalattachimpl.h:18
Definition: icaltypes.h:20
A struct representing a duration.
Definition: icalduration.h:28
Definition: icaltypes.h:27
Struct to represent a period in time.
Definition: icalperiod.h:29
Definition: icalrecur.h:144
Definition: icaltime.h:97
Definition: icaltypes.h:33