$darkmode
Libical API Documentation 4.0 STABLE VERSION Visit the v3.0 documentation
icalvalue_cxx.hpp
Go to the documentation of this file.
1 /*======================================================================
2  FILE: icalvalue_cxx.hpp
3  CREATOR: fnguyen 12/13/01
4 
5  SPDX-FileCopyrightText: 2001, Critical Path
6  SPDX-License-Identifier: LGPL-2.1-only OR MPL-2.0
7 ======================================================================*/
8 
14 #ifndef ICALVALUE_CXX_H
15 #define ICALVALUE_CXX_H
16 
17 #include "libical_ical_export.h"
18 #include "icptrholder_cxx.hpp"
19 
20 extern "C" {
21 #include "icalvalue.h"
22 }
23 
24 #include <string>
25 
26 namespace LibICal
27 {
28 
29 class LIBICAL_ICAL_EXPORT ICalValue
30 {
31 public:
32  ICalValue();
33  ICalValue(const ICalValue &);
34  ICalValue &operator=(const ICalValue &);
35  ~ICalValue();
36 
37  explicit ICalValue(icalvalue *);
38  explicit ICalValue(const icalvalue_kind &kind);
39  ICalValue(const icalvalue_kind &kind, const std::string &str);
40 
41  operator icalvalue *()
42  {
43  return imp;
44  }
45 
46  void detach();
47 
48  std::string as_ical_string();
49  bool is_valid();
50  icalvalue_kind isa();
51  bool isa_value(void *);
52 
53  /* Special, non autogenerated value accessors */
54  void set_recur(struct icalrecurrencetype *v);
55  struct icalrecurrencetype *get_recur();
56 
57  void set_trigger(const struct icaltriggertype &v);
58  struct icaltriggertype get_trigger();
59 
60  void set_datetimeperiod(const struct icaldatetimeperiodtype &v);
61  struct icaldatetimeperiodtype get_datetimeperiod();
62 
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 
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 
153 private:
154  icalvalue *imp;
155 };
156 
157 } // namespace LibICal
158 
160 
161 #endif
Defines the data structure representing iCalendar parameter values.
C++ template classes for managing C++ pointers returned by VComponent::get_..._component, VComponent::get_..._property, ICalProperty::get_..._value.
struct icalattach_impl icalattach
An iCal attach object representing a link to a document object.
Definition: icalattach.h:36