Libical API Documentation  3.0
icalparameter_cxx.h
Go to the documentation of this file.
1 
20 #ifndef ICALPARAMETER_CXX_H
21 #define ICALPARAMETER_CXX_H
22 
23 #include "libical_ical_export.h"
24 #include "icptrholder_cxx.h"
25 
26 extern "C"
27 {
28 #include "icalerror.h"
29 #include "icalparameter.h"
30 }
31 
32 #include <string>
33 
34 namespace LibICal
35 {
36 
37 class LIBICAL_ICAL_EXPORT ICalParameter
38 {
39 public:
42  ICalParameter &operator=(const ICalParameter &) throw(icalerrorenum);
43  ~ICalParameter();
44 
45  explicit ICalParameter(icalparameter *v) throw(icalerrorenum);
46 
47  // Create from string of form "PARAMNAME=VALUE"
48  explicit ICalParameter(const std::string &str) throw(icalerrorenum);
49 
50  // Create from just the value, the part after the "="
51  explicit ICalParameter(const icalparameter_kind &kind) throw(icalerrorenum);
52  ICalParameter(const icalparameter_kind &kind,
53  const std::string &str) throw(icalerrorenum);
54 
55  operator icalparameter *()
56  {
57  return imp;
58  }
59 
60  void detach();
61 
62 public:
63  std::string as_ical_string() throw(icalerrorenum);
64  bool is_valid();
65  icalparameter_kind isa();
66  int isa_parameter(void *param);
67 
68 public:
69  /* Access the name of an X parameter */
70  static void set_xname(ICalParameter &param, const std::string &v);
71  static std::string get_xname(ICalParameter &param);
72  static void set_xvalue(ICalParameter &param, const std::string &v);
73  static std::string get_xvalue(ICalParameter &param);
74 
75  /* Convert enumerations */
76  static std::string kind_to_string(const icalparameter_kind &kind);
77  static icalparameter_kind string_to_kind(const std::string &str);
78 
79 public:
80  /* DELEGATED-FROM */
81  std::string get_delegatedfrom() const;
82  void set_delegatedfrom(const std::string &v);
83 
84  /* RELATED */
85  icalparameter_related get_related() const;
86  void set_related(const icalparameter_related &v);
87 
88  /* SENT-BY */
89  std::string get_sentby() const;
90  void set_sentby(const std::string &v);
91 
92  /* LANGUAGE */
93  std::string get_language() const;
94  void set_language(const std::string &v);
95 
96  /* RELTYPE */
97  icalparameter_reltype get_reltype() const;
98  void set_reltype(const icalparameter_reltype &v);
99 
100  /* ENCODING */
101  icalparameter_encoding get_encoding() const;
102  void set_encoding(const icalparameter_encoding &v);
103 
104  /* ALTREP */
105  std::string get_altrep() const;
106  void set_altrep(const std::string &v);
107 
108  /* FMTTYPE */
109  std::string get_fmttype() const;
110  void set_fmttype(const std::string &v);
111 
112  /* FBTYPE */
113  icalparameter_fbtype get_fbtype() const;
114  void set_fbtype(const icalparameter_fbtype &v);
115 
116  /* RSVP */
117  icalparameter_rsvp get_rsvp() const;
118  void set_rsvp(const icalparameter_rsvp &v);
119 
120  /* RANGE */
121  icalparameter_range get_range() const;
122  void set_range(const icalparameter_range &v);
123 
124  /* DELEGATED-TO */
125  std::string get_delegatedto() const;
126  void set_delegatedto(const std::string &v);
127 
128  /* CN */
129  std::string get_cn() const;
130  void set_cn(const std::string &v);
131 
132  /* ROLE */
133  icalparameter_role get_role() const;
134  void set_role(const icalparameter_role &v);
135 
136  /* X-LIC-COMPARETYPE */
137  icalparameter_xliccomparetype get_xliccomparetype() const;
138  void set_xliccomparetype(const icalparameter_xliccomparetype &v);
139 
140  /* PARTSTAT */
141  icalparameter_partstat get_partstat() const;
142  void set_partstat(const icalparameter_partstat &v);
143 
144  /* X-LIC-ERRORTYPE */
145  icalparameter_xlicerrortype get_xlicerrortype() const;
146  void set_xlicerrortype(const icalparameter_xlicerrortype &v);
147 
148  /* MEMBER */
149  std::string get_member() const;
150  void set_member(const std::string &v);
151 
152  /* X */
153  std::string get_x() const;
154  void set_x(const std::string &v);
155 
156  /* CUTYPE */
157  icalparameter_cutype get_cutype() const;
158  void set_cutype(const icalparameter_cutype &v);
159 
160  /* TZID */
161  std::string get_tzid() const;
162  void set_tzid(const std::string &v);
163 
164  /* VALUE */
165  icalparameter_value get_value() const;
166  void set_value(const icalparameter_value &v);
167 
168  /* DIR */
169  std::string get_dir() const;
170  void set_dir(const std::string &v);
171 
172 private:
173  icalparameter *imp;
174 };
175 
176 } // namespace LibICal
177 
178 #endif
Definition: icalparameter_cxx.h:34
Definition: icalparameter_cxx.h:37
icalerrorenum
Represents the different types of errors that can be triggered in libical.
Definition: icalerror.h:74
Error handling for libical.
C++ template classes for managing C++ pointers returned by VComponent::get_..._component, VComponent::get_..._property, ICalProperty::get_..._value.