blob: ab3893bc76d22c960b898a85f827fcb1210549c3 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
|
/* -*- Mode: C++ -*- */
/**
* @file icalparameter_cxx.h
* @author fnguyen (12/10/01)
* @brief Definition of C++ Wrapper for icalparameter.c
*
* (C) COPYRIGHT 2001, Critical Path
This program is free software; you can redistribute it and/or modify
it under the terms of either:
The LGPL as published by the Free Software Foundation, version
2.1, available at: http://www.fsf.org/copyleft/lesser.html
Or:
The Mozilla Public License Version 1.0. You may obtain a copy of
the License at http://www.mozilla.org/MPL/
*/
#ifndef ICALPARAMETER_CXX_H
#define ICALPARAMETER_CXX_H
extern "C" {
#include "ical.h"
};
#include "icptrholder.h"
typedef char* string; // Will use the string library from STL
class ICalParameter {
public:
ICalParameter() throw(icalerrorenum);
ICalParameter(const ICalParameter&) throw(icalerrorenum);
ICalParameter& operator=(const ICalParameter&) throw(icalerrorenum);
~ICalParameter();
ICalParameter(icalparameter* v) throw(icalerrorenum);
// Create from string of form "PARAMNAME=VALUE"
ICalParameter(string str) throw(icalerrorenum);
// Create from just the value, the part after the "="
ICalParameter(icalparameter_kind kind, string str) throw(icalerrorenum);
ICalParameter(icalparameter_kind kind) throw(icalerrorenum);
operator icalparameter*() { return imp; }
void detach() {
imp = NULL;
}
public:
string as_ical_string() throw(icalerrorenum);
bool is_valid();
icalparameter_kind isa( );
int isa_parameter(void* param);
public:
/* Acess the name of an X parameer */
static void set_xname (ICalParameter ¶m, string v);
static string get_xname(ICalParameter ¶m);
static void set_xvalue (ICalParameter ¶m, string v);
static string get_xvalue(ICalParameter ¶m);
/* Convert enumerations */
static string kind_to_string(icalparameter_kind kind);
static icalparameter_kind string_to_kind(string str);
public:
/* DELEGATED-FROM */
string get_delegatedfrom();
void set_delegatedfrom(string v);
/* RELATED */
icalparameter_related get_related();
void set_related(icalparameter_related v);
/* SENT-BY */
string get_sentby();
void set_sentby(string v);
/* LANGUAGE */
string get_language();
void set_language(string v);
/* RELTYPE */
icalparameter_reltype get_reltype();
void set_reltype(icalparameter_reltype v);
/* ENCODING */
icalparameter_encoding get_encoding();
void set_encoding(icalparameter_encoding v);
/* ALTREP */
string get_altrep();
void set_altrep(string v);
/* FMTTYPE */
string get_fmttype();
void set_fmttype(string v);
/* FBTYPE */
icalparameter_fbtype get_fbtype();
void set_fbtype(icalparameter_fbtype v);
/* RSVP */
icalparameter_rsvp get_rsvp();
void set_rsvp(icalparameter_rsvp v);
/* RANGE */
icalparameter_range get_range();
void set_range(icalparameter_range v);
/* DELEGATED-TO */
string get_delegatedto();
void set_delegatedto(string v);
/* CN */
string get_cn();
void set_cn(string v);
/* ROLE */
icalparameter_role get_role();
void set_role(icalparameter_role v);
/* X-LIC-COMPARETYPE */
icalparameter_xliccomparetype get_xliccomparetype();
void set_xliccomparetype(icalparameter_xliccomparetype v);
/* PARTSTAT */
icalparameter_partstat get_partstat();
void set_partstat(icalparameter_partstat v);
/* X-LIC-ERRORTYPE */
icalparameter_xlicerrortype get_xlicerrortype();
void set_xlicerrortype(icalparameter_xlicerrortype v);
/* MEMBER */
string get_member();
void set_member(string v);
/* X */
string get_x();
void set_x(string v);
/* CUTYPE */
icalparameter_cutype get_cutype();
void set_cutype(icalparameter_cutype v);
/* TZID */
string get_tzid();
void set_tzid(string v);
/* VALUE */
icalparameter_value get_value();
void set_value(icalparameter_value v);
/* DIR */
string get_dir();
void set_dir(string v);
private:
icalparameter* imp;
};
#endif
|