Libical API Documentation 4.0
Loading...
Searching...
No Matches
icalvalue_cxx.h
1/*======================================================================
2 FILE: icalvalue_cxx.h
3 CREATOR: fnguyen 12/13/01
4 SPDX-FileCopyrightText: 2001, Critical Path
5
6 SPDX-License-Identifier: LGPL-2.1-only OR MPL-2.0
7
8======================================================================*/
9
10#ifndef ICALVALUE_CXX_H
11#define ICALVALUE_CXX_H
12
13#include "libical_ical_export.h"
14#include "icptrholder_cxx.h"
15
16extern "C" {
17#include "icalerror.h"
18#include "icalvalue.h"
19}
20
21#include <string>
22
23namespace LibICal
24{
25
26class LIBICAL_ICAL_EXPORT ICalValue
27{
28public:
29 ICalValue();
30 ICalValue(const ICalValue &);
31 ICalValue &operator=(const ICalValue &);
32 ~ICalValue();
33
34 explicit ICalValue(icalvalue *);
35 explicit ICalValue(const icalvalue_kind &kind);
36 ICalValue(const icalvalue_kind &kind, const std::string &str);
37
38 operator icalvalue *()
39 {
40 return imp;
41 }
42
43 void detach();
44
45public:
46 std::string as_ical_string();
47 bool is_valid();
48 icalvalue_kind isa();
49 int isa_value(void *);
50
51 /* Special, non autogenerated value accessors */
52 void set_recur(struct icalrecurrencetype *v);
53 struct icalrecurrencetype *get_recur();
54
55 void set_trigger(const struct icaltriggertype &v);
56 struct icaltriggertype get_trigger();
57
58 void set_datetimeperiod(const struct icaldatetimeperiodtype &v);
59 struct icaldatetimeperiodtype get_datetimeperiod();
60
61public:
62 static icalparameter_xliccomparetype compare(ICalValue &a, ICalValue &b);
63
64 /* Convert enumerations */
65 static icalvalue_kind string_to_kind(const std::string &str);
66 std::string kind_to_string(const icalvalue_kind &kind);
67
68public:
69 /* BOOLEAN */
70 int get_boolean() const;
71 void set_boolean(const int &v);
72
73 /* UTC-OFFSET */
74 int get_utcoffset() const;
75 void set_utcoffset(const int &v);
76
77 /* METHOD */
78 enum icalproperty_method get_method() const;
79 void set_method(const enum icalproperty_method &v);
80
81 /* CAL-ADDRESS */
82 std::string get_caladdress() const;
83 void set_caladdress(const std::string &v);
84
85 /* PERIOD */
86 struct icalperiodtype get_period() const;
87 void set_period(const struct icalperiodtype &v);
88
89 /* STATUS */
90 enum icalproperty_status get_status() const;
91 void set_status(const enum icalproperty_status &v);
92
93 /* BINARY */
94 std::string get_binary() const;
95 void set_binary(const std::string &v);
96
97 /* TEXT */
98 std::string get_text() const;
99 void set_text(const std::string &v);
100
101 /* DURATION */
102 struct icaldurationtype get_duration() const;
103 void set_duration(const struct icaldurationtype &v);
104
105 /* INTEGER */
106 int get_integer() const;
107 void set_integer(const int &v);
108
109 /* URI */
110 std::string get_uri() const;
111 void set_uri(const std::string &v);
112
113 /* ATTACH */
114 icalattach *get_attach();
115 void set_attach(icalattach *v);
116
117 /* CLASS */
118 enum icalproperty_class get_class() const;
119 void set_class(const enum icalproperty_class &v);
120
121 /* FLOAT */
122 float get_float() const;
123 void set_float(const float &v);
124
125 /* QUERY */
126 std::string get_query() const;
127 void set_query(const std::string &v);
128
129 /* STRING */
130 std::string get_string() const;
131 void set_string(const std::string &v);
132
133 /* TRANSP */
134 enum icalproperty_transp get_transp() const;
135 void set_transp(const enum icalproperty_transp &v);
136
137 /* DATE-TIME */
138 struct icaltimetype get_datetime() const;
139 void set_datetime(const struct icaltimetype &v);
140
141 /* GEO */
142 struct icalgeotype get_geo() const;
143 void set_geo(const struct icalgeotype &v);
144
145 /* DATE */
146 struct icaltimetype get_date() const;
147 void set_date(const struct icaltimetype &v);
148
149 /* ACTION */
150 enum icalproperty_action get_action() const;
151 void set_action(const enum icalproperty_action &v);
152
153private:
154 icalvalue *imp;
155};
156
157} // namespace LibICal
158
159typedef ICPointerHolder<LibICal::ICalValue> ICalValueTmpPtr;
160
161#endif
Definition icptrholder_cxx.h:41
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