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