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