Libical API Documentation 3.0
Loading...
Searching...
No Matches
icalvalue_cxx.h
1/*======================================================================
2 FILE: icalvalue_cxx.h
3 CREATOR: fnguyen 12/13/01
4 (C) COPYRIGHT 2001, Critical Path
5
6 This library is free software; you can redistribute it and/or modify
7 it under the terms of either:
8
9 The LGPL as published by the Free Software Foundation, version
10 2.1, available at: https://www.gnu.org/licenses/lgpl-2.1.html
11
12 Or:
13
14 The Mozilla Public License Version 2.0. You may obtain a copy of
15 the License at https://www.mozilla.org/MPL/
16======================================================================*/
17
18#ifndef ICALVALUE_CXX_H
19#define ICALVALUE_CXX_H
20
21#include "libical_ical_export.h"
22#include "icptrholder_cxx.h"
23
24extern "C"
25{
26#include "icalerror.h"
27#include "icalvalue.h"
28}
29
30#include <string>
31
32namespace LibICal
33{
34
35class LIBICAL_ICAL_EXPORT ICalValue
36{
37public:
38 ICalValue();
39 ICalValue(const ICalValue &);
40 ICalValue &operator=(const ICalValue &);
41 ~ICalValue();
42
43 explicit ICalValue(icalvalue *);
44 explicit ICalValue(const icalvalue_kind &kind);
45 ICalValue(const icalvalue_kind &kind, const std::string &str);
46
47 operator icalvalue *()
48 {
49 return imp;
50 }
51
52 void detach();
53
54public:
55 std::string as_ical_string();
56 bool is_valid();
57 icalvalue_kind isa();
58 int isa_value(void *);
59
60 /* Special, non autogenerated value accessors */
61 void set_recur(const struct icalrecurrencetype &v);
62 struct icalrecurrencetype get_recur();
63
64 void set_trigger(const struct icaltriggertype &v);
65 struct icaltriggertype get_trigger();
66
67 void set_datetimeperiod(const struct icaldatetimeperiodtype &v);
68 struct icaldatetimeperiodtype get_datetimeperiod();
69
70public:
71 static icalparameter_xliccomparetype compare(ICalValue &a, ICalValue &b);
72
73 /* Convert enumerations */
74 static icalvalue_kind string_to_kind(const std::string &str);
75 std::string kind_to_string(const icalvalue_kind &kind);
76
77public:
78 /* BOOLEAN */
79 int get_boolean() const;
80 void set_boolean(const int &v);
81
82 /* UTC-OFFSET */
83 int get_utcoffset() const;
84 void set_utcoffset(const int &v);
85
86 /* METHOD */
87 enum icalproperty_method get_method() const;
88 void set_method(const enum icalproperty_method &v);
89
90 /* CAL-ADDRESS */
91 std::string get_caladdress() const;
92 void set_caladdress(const std::string &v);
93
94 /* PERIOD */
95 struct icalperiodtype get_period() const;
96 void set_period(const struct icalperiodtype &v);
97
98 /* STATUS */
99 enum icalproperty_status get_status() const;
100 void set_status(const enum icalproperty_status &v);
101
102 /* BINARY */
103 std::string get_binary() const;
104 void set_binary(const std::string &v);
105
106 /* TEXT */
107 std::string get_text() const;
108 void set_text(const std::string &v);
109
110 /* DURATION */
111 struct icaldurationtype get_duration() const;
112 void set_duration(const struct icaldurationtype &v);
113
114 /* INTEGER */
115 int get_integer() const;
116 void set_integer(const int &v);
117
118 /* URI */
119 std::string get_uri() const;
120 void set_uri(const std::string &v);
121
122 /* ATTACH */
123 icalattach *get_attach();
124 void set_attach(icalattach *v);
125
126 /* CLASS */
127 enum icalproperty_class get_class() const;
128 void set_class(const enum icalproperty_class &v);
129
130 /* FLOAT */
131 float get_float() const;
132 void set_float(const float &v);
133
134 /* QUERY */
135 std::string get_query() const;
136 void set_query(const std::string &v);
137
138 /* STRING */
139 std::string get_string() const;
140 void set_string(const std::string &v);
141
142 /* TRANSP */
143 enum icalproperty_transp get_transp() const;
144 void set_transp(const enum icalproperty_transp &v);
145
146 /* DATE-TIME */
147 struct icaltimetype get_datetime() const;
148 void set_datetime(const struct icaltimetype &v);
149
150 /* GEO */
151 struct icalgeotype get_geo() const;
152 void set_geo(const struct icalgeotype &v);
153
154 /* DATE */
155 struct icaltimetype get_date() const;
156 void set_date(const struct icaltimetype &v);
157
158 /* ACTION */
159 enum icalproperty_action get_action() const;
160 void set_action(const enum icalproperty_action &v);
161
162private:
163 icalvalue *imp;
164};
165
166} // namespace LibICal
167
168typedef ICPointerHolder < LibICal::ICalValue > ICalValueTmpPtr;
169
170#endif
Definition icptrholder_cxx.h:48
Definition icalvalue_cxx.h:36
Error handling for libical.
C++ template classes for managing C++ pointers returned by VComponent::get_..._component,...
Definition icalattachimpl.h:26
Definition icaltypes.h:28
A struct representing a duration.
Definition icalduration.h:37
Definition icaltypes.h:34
Struct to represent a period in time.
Definition icalperiod.h:38
Definition icalrecur.h:152
Definition icaltime.h:105
Definition icaltypes.h:40