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