Libical API Documentation 3.1
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{
18#include "icalerror.h"
19#include "icalvalue.h"
20}
21
22#include <string>
23
24namespace LibICal
25{
26
27class LIBICAL_ICAL_EXPORT ICalValue
28{
29public:
30 ICalValue();
31 ICalValue(const ICalValue &);
32 ICalValue &operator=(const ICalValue &);
33 ~ICalValue();
34
35 explicit ICalValue(icalvalue *);
36 explicit ICalValue(const icalvalue_kind &kind);
37 ICalValue(const icalvalue_kind &kind, const std::string &str);
38
39 operator icalvalue *()
40 {
41 return imp;
42 }
43
44 void detach();
45
46public:
47 std::string as_ical_string();
48 bool is_valid();
49 icalvalue_kind isa();
50 int isa_value(void *);
51
52 /* Special, non autogenerated value accessors */
53 void set_recur(const struct icalrecurrencetype &v);
54 struct icalrecurrencetype get_recur();
55
56 void set_trigger(const struct icaltriggertype &v);
57 struct icaltriggertype get_trigger();
58
59 void set_datetimeperiod(const struct icaldatetimeperiodtype &v);
60 struct icaldatetimeperiodtype get_datetimeperiod();
61
62public:
63 static icalparameter_xliccomparetype compare(ICalValue &a, ICalValue &b);
64
65 /* Convert enumerations */
66 static icalvalue_kind string_to_kind(const std::string &str);
67 std::string kind_to_string(const icalvalue_kind &kind);
68
69public:
70 /* BOOLEAN */
71 int get_boolean() const;
72 void set_boolean(const int &v);
73
74 /* UTC-OFFSET */
75 int get_utcoffset() const;
76 void set_utcoffset(const int &v);
77
78 /* METHOD */
79 enum icalproperty_method get_method() const;
80 void set_method(const enum icalproperty_method &v);
81
82 /* CAL-ADDRESS */
83 std::string get_caladdress() const;
84 void set_caladdress(const std::string &v);
85
86 /* PERIOD */
87 struct icalperiodtype get_period() const;
88 void set_period(const struct icalperiodtype &v);
89
90 /* STATUS */
91 enum icalproperty_status get_status() const;
92 void set_status(const enum icalproperty_status &v);
93
94 /* BINARY */
95 std::string get_binary() const;
96 void set_binary(const std::string &v);
97
98 /* TEXT */
99 std::string get_text() const;
100 void set_text(const std::string &v);
101
102 /* DURATION */
103 struct icaldurationtype get_duration() const;
104 void set_duration(const struct icaldurationtype &v);
105
106 /* INTEGER */
107 int get_integer() const;
108 void set_integer(const int &v);
109
110 /* URI */
111 std::string get_uri() const;
112 void set_uri(const std::string &v);
113
114 /* ATTACH */
115 icalattach *get_attach();
116 void set_attach(icalattach *v);
117
118 /* CLASS */
119 enum icalproperty_class get_class() const;
120 void set_class(const enum icalproperty_class &v);
121
122 /* FLOAT */
123 float get_float() const;
124 void set_float(const float &v);
125
126 /* QUERY */
127 std::string get_query() const;
128 void set_query(const std::string &v);
129
130 /* STRING */
131 std::string get_string() const;
132 void set_string(const std::string &v);
133
134 /* TRANSP */
135 enum icalproperty_transp get_transp() const;
136 void set_transp(const enum icalproperty_transp &v);
137
138 /* DATE-TIME */
139 struct icaltimetype get_datetime() const;
140 void set_datetime(const struct icaltimetype &v);
141
142 /* GEO */
143 struct icalgeotype get_geo() const;
144 void set_geo(const struct icalgeotype &v);
145
146 /* DATE */
147 struct icaltimetype get_date() const;
148 void set_date(const struct icaltimetype &v);
149
150 /* ACTION */
151 enum icalproperty_action get_action() const;
152 void set_action(const enum icalproperty_action &v);
153
154private:
155 icalvalue *imp;
156};
157
158} // namespace LibICal
159
161
162#endif
Definition: icptrholder_cxx.h:40
Definition: icalvalue_cxx.h:28
Error handling for libical.
C++ template classes for managing C++ pointers returned by VComponent::get_..._component,...
Definition: icalattachimpl.h:18
Definition: icaltypes.h:20
A struct representing a duration.
Definition: icalduration.h:28
Definition: icaltypes.h:27
Struct to represent a period in time.
Definition: icalperiod.h:29
Definition: icalrecur.h:144
Definition: icaltime.h:97
Definition: icaltypes.h:33