1 /**
2  * @file    icalproperty_cxx.cpp
3  * @author  fnguyen (12/10/01)
4  * @brief   Implementation of C++ Wrapper for icalproperty.c
5  *
6  * (C) COPYRIGHT 2001, Critical Path
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: https://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 https://www.mozilla.org/MPL/
18  */
19 
20 #include "icalproperty_cxx.h"
21 #include "icalparameter_cxx.h"
22 #include "icalvalue_cxx.h"
23 using namespace LibICal;
24 
ICalProperty()25 ICalProperty::ICalProperty() : imp(icalproperty_new(ICAL_ANY_PROPERTY))
26 {
27 }
28 
ICalProperty(const ICalProperty & v)29 ICalProperty::ICalProperty(const ICalProperty &v) : imp(icalproperty_new_clone(v.imp))
30 {
31     if (imp == NULL) {
32         throw icalerrno;
33     }
34 }
35 
operator =(const ICalProperty & v)36 ICalProperty &ICalProperty::operator=(const ICalProperty &v)
37 {
38     if (this == &v) {
39         return *this;
40     }
41 
42     if (imp != NULL) {
43         icalproperty_free(imp);
44         imp = icalproperty_new_clone(v.imp);
45         if (imp == NULL) {
46             throw icalerrno;
47         }
48     }
49 
50     return *this;
51 }
52 
detach()53 void ICalProperty::detach()
54 {
55     imp = NULL;
56 }
57 
~ICalProperty()58 ICalProperty::~ICalProperty()
59 {
60     if (imp != NULL) {
61         icalproperty_free(imp);
62     }
63 }
64 
ICalProperty(icalproperty * v)65 ICalProperty::ICalProperty(icalproperty *v) : imp(v)
66 {
67 }
68 
ICalProperty(std::string str)69 ICalProperty::ICalProperty(std::string str) //NOLINT TODO:V3.1:pass const ref
70     : imp(icalproperty_new_from_string(str.c_str()))
71 {
72 }
73 
ICalProperty(icalproperty_kind kind)74 ICalProperty::ICalProperty(icalproperty_kind kind)
75     : imp(icalproperty_new(kind))
76 {
77 }
78 
as_ical_string()79 std::string ICalProperty::as_ical_string()
80 {
81     return static_cast<std::string>(icalproperty_as_ical_string(imp));
82 }
83 
isa()84 icalproperty_kind ICalProperty::isa()
85 {
86     return icalproperty_isa(imp);
87 }
88 
isa_property(void * property)89 int ICalProperty::isa_property(void *property)
90 {
91     return icalproperty_isa_property(property);
92 }
93 
operator ==(ICalProperty & rhs)94 int ICalProperty::operator==(ICalProperty &rhs)
95 {
96     icalparameter_xliccomparetype result;
97     ICalValue  *thisPropValue = this->get_value();
98     ICalValue  *rhsPropValue  = rhs.get_value();
99     result = icalvalue_compare(static_cast<icalvalue *>(*thisPropValue),
100                                static_cast<icalvalue *>(*rhsPropValue));
101     delete thisPropValue;
102     delete rhsPropValue;
103     return (result == ICAL_XLICCOMPARETYPE_EQUAL) ? 1 : 0;
104 }
105 
add_parameter(ICalParameter & parameter)106 void ICalProperty::add_parameter(ICalParameter &parameter)
107 {
108     icalproperty_add_parameter(imp, parameter);
109 }
110 
set_parameter(ICalParameter & parameter)111 void ICalProperty::set_parameter(ICalParameter &parameter)
112 {
113     icalproperty_set_parameter(imp, parameter);
114 }
115 
set_parameter_from_string(const std::string & name,const std::string & val)116 void ICalProperty::set_parameter_from_string(const std::string &name, const std::string &val)
117 {
118     icalproperty_set_parameter_from_string(imp, name.c_str(), val.c_str());
119 }
120 
get_parameter_as_string(const std::string & name)121 std::string ICalProperty::get_parameter_as_string(const std::string &name)
122 {
123     return static_cast<std::string>(icalproperty_get_parameter_as_string(imp, name.c_str()));
124 }
125 
remove_parameter_by_kind(const icalparameter_kind & kind)126 void ICalProperty::remove_parameter_by_kind(const icalparameter_kind &kind)
127 {
128     icalproperty_remove_parameter_by_kind(imp, kind);
129 }
130 
count_parameters()131 int ICalProperty::count_parameters()
132 {
133     return icalproperty_count_parameters(imp);
134 }
135 
136 /** Iterate through the parameters */
get_first_parameter(const icalparameter_kind & kind)137 ICalParameter *ICalProperty::get_first_parameter(const icalparameter_kind &kind)
138 {
139     icalparameter *p = icalproperty_get_first_parameter(imp, kind);
140     return (p != NULL) ? new ICalParameter(p) : NULL;
141 }
142 
get_next_parameter(const icalparameter_kind & kind)143 ICalParameter *ICalProperty::get_next_parameter(const icalparameter_kind &kind)
144 {
145     icalparameter *p = icalproperty_get_next_parameter(imp, kind);
146     return (p != NULL) ? new ICalParameter(p) : NULL;
147 }
148 
149 /** Access the value of the property */
set_value(const ICalValue & val)150 void ICalProperty::set_value(const ICalValue &val)
151 {
152     icalproperty_set_value(imp, const_cast<ICalValue &>(val));
153 }
154 
set_value_from_string(const std::string & val,const std::string & kind)155 void ICalProperty::set_value_from_string(const std::string &val, const std::string &kind)
156 {
157     icalproperty_set_value_from_string(imp, val.c_str(), kind.c_str());
158 }
159 
get_value()160 ICalValue *ICalProperty::get_value()
161 {
162     return new ICalValue(icalproperty_get_value(imp));
163 }
164 
get_value_as_string()165 std::string ICalProperty::get_value_as_string()
166 {
167     return static_cast<std::string>(icalproperty_get_value_as_string(imp));
168 }
169 
170 /** Return the name of the property -- the type name converted to a
171  *  string, or the value of get_x_name if the type is X property
172  */
get_name() const173 std::string ICalProperty::get_name() const
174 {
175     return static_cast<std::string>(icalproperty_get_property_name(imp));
176 }
177 
178 /* Deal with X properties */
set_x_name(ICalProperty & prop,const std::string & name)179 void ICalProperty::set_x_name(ICalProperty &prop, const std::string &name)
180 {
181     icalproperty_set_x_name(prop, name.c_str());
182 }
183 
get_x_name(ICalProperty & prop)184 std::string ICalProperty::get_x_name(ICalProperty &prop)
185 {
186     return static_cast<std::string>(icalproperty_get_x_name(prop));
187 }
188 
value_to_value_kind(const icalparameter_value & val)189 icalvalue_kind ICalProperty::value_to_value_kind(const icalparameter_value &val)
190 {
191     return icalparameter_value_to_value_kind(val);
192 }
193 
194 /* Convert kinds to string and get default value type */
kind_to_value_kind(const icalproperty_kind & kind)195 icalvalue_kind ICalProperty::kind_to_value_kind(const icalproperty_kind &kind)
196 {
197     return icalproperty_kind_to_value_kind(kind);
198 }
199 
value_kind_to_kind(const icalvalue_kind & kind)200 icalproperty_kind ICalProperty::value_kind_to_kind(const icalvalue_kind &kind)
201 {
202     return icalproperty_value_kind_to_kind(kind);
203 }
204 
kind_to_string(const icalproperty_kind & kind)205 std::string ICalProperty::kind_to_string(const icalproperty_kind &kind)
206 {
207     return static_cast<std::string>(icalproperty_kind_to_string(kind));
208 }
209 
string_to_kind(const std::string & str)210 icalproperty_kind ICalProperty::string_to_kind(const std::string &str)
211 {
212     return icalproperty_string_to_kind(str.c_str());
213 }
214 
method_to_string(const icalproperty_method & method)215 std::string ICalProperty::method_to_string(const icalproperty_method &method)
216 {
217     return static_cast<std::string>(icalproperty_method_to_string(method));
218 }
219 
string_to_method(const std::string & str)220 icalproperty_method ICalProperty::string_to_method(const std::string &str)
221 {
222     return icalproperty_string_to_method(str.c_str());
223 }
224 
enum_to_string(const int & e)225 std::string ICalProperty::enum_to_string(const int &e)
226 {
227     return static_cast<std::string>(icalproperty_enum_to_string(e));
228 }
229 
kind_and_string_to_enum(const icalproperty_kind & kind,const std::string & str)230 int ICalProperty::kind_and_string_to_enum(const icalproperty_kind &kind, const std::string &str)
231 {
232     return icalproperty_kind_and_string_to_enum(kind, str.c_str());
233 }
234 
status_to_string(const icalproperty_status & status)235 std::string ICalProperty::status_to_string(const icalproperty_status &status)
236 {
237     return static_cast<std::string>(icalproperty_status_to_string(status));
238 }
239 
string_to_status(const std::string & str)240 icalproperty_status ICalProperty::string_to_status(const std::string &str)
241 {
242     return icalproperty_string_to_status(str.c_str());
243 }
244 
enum_belongs_to_property(const icalproperty_kind & kind,const int & e)245 int ICalProperty::enum_belongs_to_property(const icalproperty_kind &kind, const int &e)
246 {
247     return icalproperty_enum_belongs_to_property(kind, e);
248 }
249 
250 /* ACTION */
set_action(const enum icalproperty_action & val)251 void ICalProperty::set_action(const enum icalproperty_action &val)
252 {
253     icalproperty_set_action(imp, val);
254 }
255 
get_action()256 enum icalproperty_action ICalProperty::get_action()
257 {
258     return icalproperty_get_action(imp);
259 }
260 
261 /* ATTACH */
set_attach(icalattach * val)262 void ICalProperty::set_attach(icalattach *val)
263 {
264     icalproperty_set_attach(imp, val);
265 }
266 
get_attach() const267 icalattach *ICalProperty::get_attach() const
268 {
269     return icalproperty_get_attach(imp);
270 }
271 
272 /* ATTENDEE */
set_attendee(const std::string & val)273 void ICalProperty::set_attendee(const std::string &val)
274 {
275     icalproperty_set_attendee(imp, val.c_str());
276 }
277 
get_attendee() const278 std::string ICalProperty::get_attendee() const
279 {
280     return static_cast<std::string>(icalproperty_get_attendee(imp));
281 }
282 
283 /* CALSCALE */
set_calscale(const std::string & val)284 void ICalProperty::set_calscale(const std::string &val)
285 {
286     icalproperty_set_calscale(imp, val.c_str());
287 }
288 
get_calscale() const289 std::string ICalProperty::get_calscale() const
290 {
291     return static_cast<std::string>(icalproperty_get_calscale(imp));
292 }
293 
294 /* CATEGORIES */
set_categories(const std::string & val)295 void ICalProperty::set_categories(const std::string &val)
296 {
297     icalproperty_set_categories(imp, val.c_str());
298 }
299 
get_categories() const300 std::string ICalProperty::get_categories() const
301 {
302     return static_cast<std::string>(icalproperty_get_categories(imp));
303 }
304 
305 /* CLASS */
set_class(const enum icalproperty_class & val)306 void ICalProperty::set_class(const enum icalproperty_class &val)
307 {
308     icalproperty_set_class(imp, val);
309 }
310 
get_class() const311 enum icalproperty_class ICalProperty::get_class() const
312 {
313     return static_cast<enum icalproperty_class>(icalproperty_get_class(imp));
314 }
315 
316 /* COMMENT */
set_comment(const std::string & val)317 void ICalProperty::set_comment(const std::string &val)
318 {
319     icalproperty_set_comment(imp, val.c_str());
320 }
321 
get_comment() const322 std::string ICalProperty::get_comment() const
323 {
324     return static_cast<std::string>(icalproperty_get_comment(imp));
325 }
326 
327 /* COMPLETED */
set_completed(const struct icaltimetype & val)328 void ICalProperty::set_completed(const struct icaltimetype &val)
329 {
330     icalproperty_set_completed(imp, val);
331 }
332 
get_completed() const333 struct icaltimetype ICalProperty::get_completed() const {
334     return icalproperty_get_completed(imp);
335 }
336 
337 /* CONTACT */
set_contact(const std::string & val)338 void ICalProperty::set_contact(const std::string &val)
339 {
340     icalproperty_set_contact(imp, val.c_str());
341 }
342 
get_contact() const343 std::string ICalProperty::get_contact() const
344 {
345     return static_cast<std::string>(icalproperty_get_contact(imp));
346 }
347 
348 /* CREATED */
set_created(const struct icaltimetype & val)349 void ICalProperty::set_created(const struct icaltimetype &val)
350 {
351     icalproperty_set_created(imp, val);
352 }
353 
get_created() const354 struct icaltimetype ICalProperty::get_created() const {
355     return icalproperty_get_created(imp);
356 }
357 
358 /* DESCRIPTION */
set_description(const std::string & val)359 void ICalProperty::set_description(const std::string &val)
360 {
361     icalproperty_set_description(imp, val.c_str());
362 }
363 
get_description() const364 std::string ICalProperty::get_description() const
365 {
366     return static_cast<std::string>(icalproperty_get_description(imp));
367 }
368 
369 /* DTEND */
set_dtend(const struct icaltimetype & val)370 void ICalProperty::set_dtend(const struct icaltimetype &val)
371 {
372     icalproperty_set_dtend(imp, val);
373 }
374 
get_dtend() const375 struct icaltimetype ICalProperty::get_dtend() const {
376     return icalproperty_get_dtend(imp);
377 }
378 
379 /* DTSTAMP */
set_dtstamp(const struct icaltimetype & val)380 void ICalProperty::set_dtstamp(const struct icaltimetype &val)
381 {
382     icalproperty_set_dtstamp(imp, val);
383 }
384 
get_dtstamp() const385 struct icaltimetype ICalProperty::get_dtstamp() const {
386     return icalproperty_get_dtstamp(imp);
387 }
388 
389 /* DTSTART */
set_dtstart(const struct icaltimetype & val)390 void ICalProperty::set_dtstart(const struct icaltimetype &val)
391 {
392     icalproperty_set_dtstart(imp, val);
393 }
394 
get_dtstart() const395 struct icaltimetype ICalProperty::get_dtstart() const {
396     return icalproperty_get_dtstart(imp);
397 }
398 
399 /* DUE */
set_due(const struct icaltimetype & val)400 void ICalProperty::set_due(const struct icaltimetype &val)
401 {
402     icalproperty_set_due(imp, val);
403 }
404 
get_due() const405 struct icaltimetype ICalProperty::get_due() const {
406     return icalproperty_get_due(imp);
407 }
408 
409 /* DURATION */
set_duration(const struct icaldurationtype & val)410 void ICalProperty::set_duration(const struct icaldurationtype &val)
411 {
412     icalproperty_set_duration(imp, val);
413 }
414 
get_duration() const415 struct icaldurationtype ICalProperty::get_duration() const {
416     return icalproperty_get_duration(imp);
417 }
418 
419 /* EXDATE */
set_exdate(const struct icaltimetype & val)420 void ICalProperty::set_exdate(const struct icaltimetype &val)
421 {
422     icalproperty_set_exdate(imp, val);
423 }
424 
get_exdate() const425 struct icaltimetype ICalProperty::get_exdate() const {
426     return icalproperty_get_exdate(imp);
427 }
428 
429 /* EXPAND */
set_expand(const int & val)430 void ICalProperty::set_expand(const int &val)
431 {
432     icalproperty_set_expand(imp, val);
433 }
434 
get_expand() const435 int ICalProperty::get_expand() const
436 {
437     return icalproperty_get_expand(imp);
438 }
439 
440 /* EXRULE */
set_exrule(const struct icalrecurrencetype & val)441 void ICalProperty::set_exrule(const struct icalrecurrencetype &val)
442 {
443     icalproperty_set_exrule(imp, val);
444 }
445 
get_exrule() const446 struct icalrecurrencetype ICalProperty::get_exrule() const {
447     return icalproperty_get_exrule(imp);
448 }
449 
450 /* FREEBUSY */
set_freebusy(const struct icalperiodtype & val)451 void ICalProperty::set_freebusy(const struct icalperiodtype &val)
452 {
453     icalproperty_set_freebusy(imp, val);
454 }
455 
get_freebusy() const456 struct icalperiodtype ICalProperty::get_freebusy() const {
457     return icalproperty_get_freebusy(imp);
458 }
459 
460 /* GEO */
set_geo(const struct icalgeotype & val)461 void ICalProperty::set_geo(const struct icalgeotype &val)
462 {
463     icalproperty_set_geo(imp, val);
464 }
465 
get_geo() const466 struct icalgeotype ICalProperty::get_geo() const {
467     return icalproperty_get_geo(imp);
468 }
469 
470 /* LAST-MODIFIED */
set_lastmodified(const struct icaltimetype & val)471 void ICalProperty::set_lastmodified(const struct icaltimetype &val)
472 {
473     icalproperty_set_lastmodified(imp, val);
474 }
475 
get_lastmodified() const476 struct icaltimetype ICalProperty::get_lastmodified() const {
477     return icalproperty_get_lastmodified(imp);
478 }
479 
480 /* LOCATION */
set_location(const std::string & val)481 void ICalProperty::set_location(const std::string &val)
482 {
483     icalproperty_set_location(imp, val.c_str());
484 }
485 
get_location() const486 std::string ICalProperty::get_location() const
487 {
488     return static_cast<std::string>(icalproperty_get_location(imp));
489 }
490 
491 /* MAXRESULTS */
set_maxresults(const int & val)492 void ICalProperty::set_maxresults(const int &val)
493 {
494     icalproperty_set_maxresults(imp, val);
495 }
496 
get_maxresults() const497 int ICalProperty::get_maxresults() const
498 {
499     return icalproperty_get_maxresults(imp);
500 }
501 
502 /* MAXRESULTSSIZE */
set_maxresultsize(const int & val)503 void ICalProperty::set_maxresultsize(const int &val)
504 {
505     icalproperty_set_maxresultssize(imp, val);
506 }
507 
get_maxresultsize() const508 int ICalProperty::get_maxresultsize() const
509 {
510     return icalproperty_get_maxresultssize(imp);
511 }
512 
513 /* METHOD */
set_method(const enum icalproperty_method & val)514 void ICalProperty::set_method(const enum icalproperty_method &val)
515 {
516     icalproperty_set_method(imp, val);
517 }
518 
get_method() const519 enum icalproperty_method ICalProperty::get_method() const
520 {
521     return icalproperty_get_method(imp);
522 }
523 
524 /* ORGANIZER */
set_organizer(const std::string & val)525 void ICalProperty::set_organizer(const std::string &val)
526 {
527     icalproperty_set_organizer(imp, val.c_str());
528 }
529 
get_organizer() const530 std::string ICalProperty::get_organizer() const
531 {
532     return static_cast<std::string>(icalproperty_get_organizer(imp));
533 }
534 
535 /* OWNER */
set_owner(const std::string & val)536 void ICalProperty::set_owner(const std::string &val)
537 {
538     icalproperty_set_owner(imp, val.c_str());
539 }
540 
get_owner() const541 std::string ICalProperty::get_owner() const
542 {
543     return static_cast<std::string>(icalproperty_get_owner(imp));
544 }
545 
546 /* PERCENT-COMPLETE */
set_percentcomplete(const int & val)547 void ICalProperty::set_percentcomplete(const int &val)
548 {
549     icalproperty_set_percentcomplete(imp, val);
550 }
551 
get_percentcomplete() const552 int ICalProperty::get_percentcomplete() const
553 {
554     return icalproperty_get_percentcomplete(imp);
555 }
556 
557 /* PRIORITY */
set_priority(const int & val)558 void ICalProperty::set_priority(const int &val)
559 {
560     icalproperty_set_priority(imp, val);
561 }
562 
get_priority() const563 int ICalProperty::get_priority() const
564 {
565     return icalproperty_get_priority(imp);
566 }
567 
568 /* PRODID */
set_prodid(const std::string & val)569 void ICalProperty::set_prodid(const std::string &val)
570 {
571     icalproperty_set_prodid(imp, val.c_str());
572 }
573 
get_prodid() const574 std::string ICalProperty::get_prodid() const
575 {
576     return static_cast<std::string>(icalproperty_get_prodid(imp));
577 }
578 
579 /* QUERY */
set_query(const std::string & val)580 void ICalProperty::set_query(const std::string &val)
581 {
582     icalproperty_set_query(imp, val.c_str());
583 }
584 
get_query() const585 std::string ICalProperty::get_query() const
586 {
587     return static_cast<std::string>(icalproperty_get_query(imp));
588 }
589 
590 /* QUERYNAME */
set_queryname(const std::string & val)591 void ICalProperty::set_queryname(const std::string &val)
592 {
593     icalproperty_set_queryname(imp, val.c_str());
594 }
595 
get_queryname() const596 std::string ICalProperty::get_queryname() const
597 {
598     return static_cast<std::string>(icalproperty_get_queryname(imp));
599 }
600 
601 /* RDATE */
set_rdate(const struct icaldatetimeperiodtype & val)602 void ICalProperty::set_rdate(const struct icaldatetimeperiodtype &val)
603 {
604     icalproperty_set_rdate(imp, val);
605 }
606 
get_rdate() const607 struct icaldatetimeperiodtype ICalProperty::get_rdate() const {
608     return icalproperty_get_rdate(imp);
609 }
610 
611 /* RECURRENCE-ID */
set_recurrenceid(const struct icaltimetype & val)612 void ICalProperty::set_recurrenceid(const struct icaltimetype &val)
613 {
614     icalproperty_set_recurrenceid(imp, val);
615 }
616 
get_recurrenceid() const617 struct icaltimetype ICalProperty::get_recurrenceid() const {
618     return icalproperty_get_recurrenceid(imp);
619 }
620 
621 /* RELATED-TO */
set_relatedto(const std::string & val)622 void ICalProperty::set_relatedto(const std::string &val)
623 {
624     icalproperty_set_relatedto(imp, val.c_str());
625 }
626 
get_relatedto() const627 std::string ICalProperty::get_relatedto() const
628 {
629     return static_cast<std::string>(icalproperty_get_relatedto(imp));
630 }
631 
632 /* RELCALID */
set_relcalid(const std::string & val)633 void ICalProperty::set_relcalid(const std::string &val)
634 {
635     icalproperty_set_relcalid(imp, val.c_str());
636 }
637 
get_relcalid() const638 std::string ICalProperty::get_relcalid() const
639 {
640     return static_cast<std::string>(icalproperty_get_relcalid(imp));
641 }
642 
643 /* REPEAT */
set_repeat(const int & val)644 void ICalProperty::set_repeat(const int &val)
645 {
646     icalproperty_set_repeat(imp, val);
647 }
648 
get_repeat() const649 int ICalProperty::get_repeat() const
650 {
651     return icalproperty_get_repeat(imp);
652 }
653 
654 /* REQUEST-STATUS */
set_requeststatus(const std::string & val)655 void ICalProperty::set_requeststatus(const std::string &val)
656 {
657     icalreqstattype v = icalreqstattype_from_string(val.c_str());
658 
659     icalproperty_set_requeststatus(imp, v);
660 }
661 
get_requeststatus() const662 std::string ICalProperty::get_requeststatus() const
663 {
664     icalreqstattype v = icalproperty_get_requeststatus(imp);
665     return static_cast<std::string>(icalreqstattype_as_string(v));
666 }
667 
668 /* RESOURCES */
set_resources(const std::string & val)669 void ICalProperty::set_resources(const std::string &val)
670 {
671     icalproperty_set_resources(imp, val.c_str());
672 }
673 
get_resources() const674 std::string ICalProperty::get_resources() const
675 {
676     return static_cast<std::string>(icalproperty_get_resources(imp));
677 }
678 
679 /* RRULE */
set_rrule(const struct icalrecurrencetype & val)680 void ICalProperty::set_rrule(const struct icalrecurrencetype &val)
681 {
682     icalproperty_set_rrule(imp, val);
683 }
684 
get_rrule() const685 struct icalrecurrencetype ICalProperty::get_rrule() const {
686     return icalproperty_get_rrule(imp);
687 }
688 
689 /* SCOPE */
set_scope(const std::string & val)690 void ICalProperty::set_scope(const std::string &val)
691 {
692     icalproperty_set_scope(imp, val.c_str());
693 }
694 
get_scope() const695 std::string ICalProperty::get_scope() const
696 {
697     return static_cast<std::string>(icalproperty_get_scope(imp));
698 }
699 
700 /* SEQUENCE */
set_sequence(const int & val)701 void ICalProperty::set_sequence(const int &val)
702 {
703     icalproperty_set_sequence(imp, val);
704 }
705 
get_sequence() const706 int ICalProperty::get_sequence() const
707 {
708     return icalproperty_get_sequence(imp);
709 }
710 
711 /* STATUS */
set_status(const enum icalproperty_status & val)712 void ICalProperty::set_status(const enum icalproperty_status &val)
713 {
714     icalproperty_set_status(imp, val);
715 }
716 
get_status() const717 enum icalproperty_status ICalProperty::get_status() const
718 {
719     return icalproperty_get_status(imp);
720 }
721 
722 /* SUMMARY */
set_summary(const std::string & val)723 void ICalProperty::set_summary(const std::string &val)
724 {
725     icalproperty_set_summary(imp, val.c_str());
726 }
727 
get_summary() const728 std::string ICalProperty::get_summary() const
729 {
730     return static_cast<std::string>(icalproperty_get_summary(imp));
731 }
732 
733 /* TARGET */
set_target(const std::string & val)734 void ICalProperty::set_target(const std::string &val)
735 {
736     icalproperty_set_target(imp, val.c_str());
737 }
738 
get_target() const739 std::string ICalProperty::get_target() const
740 {
741     return static_cast<std::string>(icalproperty_get_target(imp));
742 }
743 
744 /* TRANSP */
set_transp(const enum icalproperty_transp & val)745 void ICalProperty::set_transp(const enum icalproperty_transp &val)
746 {
747     icalproperty_set_transp(imp, val);
748 }
749 
get_transp() const750 enum icalproperty_transp ICalProperty::get_transp() const
751 {
752     return icalproperty_get_transp(imp);
753 }
754 
755 /* TRIGGER */
set_trigger(const struct icaltriggertype & val)756 void ICalProperty::set_trigger(const struct icaltriggertype &val)
757 {
758     icalproperty_set_trigger(imp, val);
759 }
760 
get_trigger() const761 struct icaltriggertype ICalProperty::get_trigger() const {
762     return icalproperty_get_trigger(imp);
763 }
764 
765 /* TZID */
set_tzid(const std::string & val)766 void ICalProperty::set_tzid(const std::string &val)
767 {
768     icalproperty_set_tzid(imp, val.c_str());
769 }
770 
get_tzid() const771 std::string ICalProperty::get_tzid() const
772 {
773     return static_cast<std::string>(icalproperty_get_tzid(imp));
774 }
775 
776 /* TZNAME */
set_tzname(const std::string & val)777 void ICalProperty::set_tzname(const std::string &val)
778 {
779     icalproperty_set_tzname(imp, val.c_str());
780 }
781 
get_tzname() const782 std::string ICalProperty::get_tzname() const
783 {
784     return static_cast<std::string>(icalproperty_get_tzname(imp));
785 }
786 
787 /* TZOFFSETFROM */
set_tzoffsetfrom(const int & val)788 void ICalProperty::set_tzoffsetfrom(const int &val)
789 {
790     icalproperty_set_tzoffsetfrom(imp, val);
791 }
792 
get_tzoffsetfrom() const793 int ICalProperty::get_tzoffsetfrom() const
794 {
795     return icalproperty_get_tzoffsetfrom(imp);
796 }
797 
798 /* TZOFFSETTO */
set_tzoffsetto(const int & val)799 void ICalProperty::set_tzoffsetto(const int &val)
800 {
801     icalproperty_set_tzoffsetto(imp, val);
802 }
803 
get_tzoffsetto() const804 int ICalProperty::get_tzoffsetto() const
805 {
806     return icalproperty_get_tzoffsetto(imp);
807 }
808 
809 /* TZURL */
set_tzurl(const std::string & val)810 void ICalProperty::set_tzurl(const std::string &val)
811 {
812     icalproperty_set_tzurl(imp, val.c_str());
813 }
814 
get_tzurl() const815 std::string ICalProperty::get_tzurl() const
816 {
817     return static_cast<std::string>(icalproperty_get_tzurl(imp));
818 }
819 
820 /* UID */
set_uid(const std::string & val)821 void ICalProperty::set_uid(const std::string &val)
822 {
823     icalproperty_set_uid(imp, val.c_str());
824 }
825 
get_uid() const826 std::string ICalProperty::get_uid() const
827 {
828     return static_cast<std::string>(icalproperty_get_uid(imp));
829 }
830 
831 /* URL */
set_url(const std::string & val)832 void ICalProperty::set_url(const std::string &val)
833 {
834     icalproperty_set_url(imp, val.c_str());
835 }
836 
get_url() const837 std::string ICalProperty::get_url() const
838 {
839     return static_cast<std::string>(icalproperty_get_url(imp));
840 }
841 
842 /* VERSION */
set_version(const std::string & val)843 void ICalProperty::set_version(const std::string &val)
844 {
845     icalproperty_set_version(imp, val.c_str());
846 }
847 
get_version() const848 std::string ICalProperty::get_version() const
849 {
850     return static_cast<std::string>(icalproperty_get_version(imp));
851 }
852 
853 /* X */
set_x(const std::string & val)854 void ICalProperty::set_x(const std::string &val)
855 {
856     icalproperty_set_x(imp, val.c_str());
857 }
858 
get_x() const859 std::string ICalProperty::get_x() const
860 {
861     return static_cast<std::string>(icalproperty_get_x(imp));
862 }
863 
864 /* X-LIC-CLUSTERCOUNT */
set_xlicclustercount(const std::string & val)865 void ICalProperty::set_xlicclustercount(const std::string &val)
866 {
867     icalproperty_set_xlicclustercount(imp, val.c_str());
868 }
869 
get_xlicclustercount() const870 std::string ICalProperty::get_xlicclustercount() const
871 {
872     return static_cast<std::string>(icalproperty_get_xlicclustercount(imp));
873 }
874 
875 /* X-LIC-ERROR */
set_xlicerror(const std::string & val)876 void ICalProperty::set_xlicerror(const std::string &val)
877 {
878     icalproperty_set_xlicerror(imp, val.c_str());
879 }
880 
get_xlicerror() const881 std::string ICalProperty::get_xlicerror() const
882 {
883     return static_cast<std::string>(icalproperty_get_xlicerror(imp));
884 }
885 
886 /* X-LIC-MIMECHARSET */
set_xlicmimecharset(const std::string & val)887 void ICalProperty::set_xlicmimecharset(const std::string &val)
888 {
889     icalproperty_set_xlicmimecharset(imp, val.c_str());
890 }
891 
get_xlicmimecharset() const892 std::string ICalProperty::get_xlicmimecharset() const
893 {
894     return static_cast<std::string>(icalproperty_get_xlicmimecharset(imp));
895 }
896 
897 /* X-LIC-MIMECID */
set_xlicmimecid(const std::string & val)898 void ICalProperty::set_xlicmimecid(const std::string &val)
899 {
900     icalproperty_set_xlicmimecid(imp, val.c_str());
901 }
902 
get_xlicmimecid() const903 std::string ICalProperty::get_xlicmimecid() const
904 {
905     return static_cast<std::string>(icalproperty_get_xlicmimecid(imp));
906 }
907 
908 /* X-LIC-MIMECONTENTTYPE */
set_xlicmimecontenttype(const std::string & val)909 void ICalProperty::set_xlicmimecontenttype(const std::string &val)
910 {
911     icalproperty_set_xlicmimecontenttype(imp, val.c_str());
912 }
913 
get_xlicmimecontenttype() const914 std::string ICalProperty::get_xlicmimecontenttype() const
915 {
916     return static_cast<std::string>(icalproperty_get_xlicmimecontenttype(imp));
917 }
918 
919 /* X-LIC-MIMEENCODING */
set_xlicmimeencoding(const std::string & val)920 void ICalProperty::set_xlicmimeencoding(const std::string &val)
921 {
922     icalproperty_set_xlicmimeencoding(imp, val.c_str());
923 }
924 
get_xlicmimeencoding() const925 std::string ICalProperty::get_xlicmimeencoding() const
926 {
927     return static_cast<std::string>(icalproperty_get_xlicmimeencoding(imp));
928 }
929 
930 /* X-LIC-MIMEFILENAME */
set_xlicmimefilename(const std::string & val)931 void ICalProperty::set_xlicmimefilename(const std::string &val)
932 {
933     icalproperty_set_xlicmimefilename(imp, val.c_str());
934 }
935 
get_xlicmimefilename() const936 std::string ICalProperty::get_xlicmimefilename() const
937 {
938     return static_cast<std::string>(icalproperty_get_xlicmimefilename(imp));
939 }
940 
941 /* X-LIC-MIMEOPTINFO */
set_xlicmimeoptinfo(const std::string & val)942 void ICalProperty::set_xlicmimeoptinfo(const std::string &val)
943 {
944     icalproperty_set_xlicmimeoptinfo(imp, val.c_str());
945 }
946 
get_xlicmimeoptinfo() const947 std::string ICalProperty::get_xlicmimeoptinfo() const
948 {
949     return static_cast<std::string>(icalproperty_get_xlicmimeoptinfo(imp));
950 }
951