summaryrefslogtreecommitdiffabout
path: root/libical/src/libical/icalderivedproperty.c
Unidiff
Diffstat (limited to 'libical/src/libical/icalderivedproperty.c') (more/less context) (ignore whitespace changes)
-rw-r--r--libical/src/libical/icalderivedproperty.c1062
1 files changed, 781 insertions, 281 deletions
diff --git a/libical/src/libical/icalderivedproperty.c b/libical/src/libical/icalderivedproperty.c
index b41562b..362bfbe 100644
--- a/libical/src/libical/icalderivedproperty.c
+++ b/libical/src/libical/icalderivedproperty.c
@@ -45,6 +45,5 @@
45 45
46#define TMP_BUF_SIZE 1024
47
48struct icalproperty_impl* 46struct icalproperty_impl*
49icalproperty_new_impl (icalproperty_kind kind); 47icalproperty_new_impl (icalproperty_kind kind);
48void icalproperty_add_parameters(struct icalproperty_impl *prop,va_list args);
50 49
@@ -61,72 +60,2 @@ struct icalproperty_map {
61 60
62extern struct icalproperty_map property_map[];
63extern void icalproperty_add_parameters(struct icalproperty_impl *prop,va_list args);
64const char* icalproperty_kind_to_string(icalproperty_kind kind)
65{
66 int i;
67
68 for (i=0; property_map[i].kind != ICAL_NO_PROPERTY; i++) {
69 if (property_map[i].kind == kind) {
70 return property_map[i].name;
71 }
72 }
73
74 return 0;
75
76}
77
78
79icalproperty_kind icalproperty_string_to_kind(const char* string)
80{
81 int i;
82
83 if (string ==0 ) {
84 return ICAL_NO_PROPERTY;
85 }
86
87
88 for (i=0; property_map[i].kind != ICAL_NO_PROPERTY; i++) {
89 if (strcmp(property_map[i].name, string) == 0) {
90 return property_map[i].kind;
91 }
92 }
93
94 if(strncmp(string,"X-",2)==0){
95 return ICAL_X_PROPERTY;
96 }
97
98
99 return ICAL_NO_PROPERTY;
100}
101
102
103icalvalue_kind icalproperty_value_kind_to_kind(icalvalue_kind kind)
104{
105 int i;
106
107 for (i=0; property_map[i].kind != ICAL_NO_PROPERTY; i++) {
108 if ( property_map[i].value == kind ) {
109 return property_map[i].kind;
110 }
111 }
112
113 return ICAL_NO_VALUE;
114}
115
116
117
118icalvalue_kind icalproperty_kind_to_value_kind(icalproperty_kind kind)
119{
120 int i;
121
122 for (i=0; property_map[i].kind != ICAL_NO_PROPERTY; i++) {
123 if ( property_map[i].kind == kind ) {
124 return property_map[i].value;
125 }
126 }
127
128 return ICAL_NO_VALUE;
129}
130
131
132/* This map associates the property enumerations with the king of 61/* This map associates the property enumerations with the king of
@@ -141,113 +70,6 @@ struct icalproperty_enum_map {
141 70
142extern struct icalproperty_enum_map enum_map[];
143
144
145const char* icalproperty_enum_to_string(int e)
146{
147 icalerror_check_arg_rz(e >= ICALPROPERTY_FIRST_ENUM,"e");
148 icalerror_check_arg_rz(e <= ICALPROPERTY_LAST_ENUM,"e");
149
150 return enum_map[e-ICALPROPERTY_FIRST_ENUM].str;
151}
152
153int icalproperty_string_to_enum(const char* str)
154{
155 int i;
156
157 icalerror_check_arg_rz(str!=0,"str")
158
159 while(*str == ' '){
160 str++;
161 }
162
163 for (i=ICALPROPERTY_FIRST_ENUM; i != ICALPROPERTY_LAST_ENUM; i++) {
164 if ( strcmp(enum_map[i-ICALPROPERTY_FIRST_ENUM].str, str) == 0) {
165 return enum_map[i-ICALPROPERTY_FIRST_ENUM].prop_enum;
166 }
167 }
168
169 return 0;
170}
171
172int icalproperty_enum_belongs_to_property(icalproperty_kind kind, int e)
173{
174 int i;
175
176
177 for (i=ICALPROPERTY_FIRST_ENUM; i != ICALPROPERTY_LAST_ENUM; i++) {
178 if(enum_map[i-ICALPROPERTY_FIRST_ENUM].prop_enum == e &&
179 enum_map[i-ICALPROPERTY_FIRST_ENUM].prop == kind ){
180 return 1;
181 }
182 }
183
184 return 0;
185}
186
187
188const char* icalproperty_method_to_string(icalproperty_method method)
189{
190 icalerror_check_arg_rz(method >= ICAL_METHOD_X,"method");
191 icalerror_check_arg_rz(method <= ICAL_METHOD_NONE,"method");
192
193 return enum_map[method-ICALPROPERTY_FIRST_ENUM].str;
194}
195
196icalproperty_method icalproperty_string_to_method(const char* str)
197{
198 int i;
199
200 icalerror_check_arg_rx(str!=0,"str",ICAL_METHOD_NONE)
201
202 while(*str == ' '){
203 str++;
204 }
205
206 for (i=ICAL_METHOD_X-ICALPROPERTY_FIRST_ENUM;
207 i != ICAL_METHOD_NONE-ICALPROPERTY_FIRST_ENUM;
208 i++) {
209 if ( strcmp(enum_map[i].str, str) == 0) {
210 return (icalproperty_method)enum_map[i].prop_enum;
211 }
212 }
213
214 return ICAL_METHOD_NONE;
215}
216
217
218const char* icalenum_status_to_string(icalproperty_status status)
219{
220 icalerror_check_arg_rz(status >= ICAL_STATUS_X,"status");
221 icalerror_check_arg_rz(status <= ICAL_STATUS_NONE,"status");
222
223 return enum_map[status-ICALPROPERTY_FIRST_ENUM].str;
224}
225
226icalproperty_status icalenum_string_to_status(const char* str)
227{
228 int i;
229
230 icalerror_check_arg_rx(str!=0,"str",ICAL_STATUS_NONE)
231
232 while(*str == ' '){
233 str++;
234 }
235
236 for (i=ICAL_STATUS_X-ICALPROPERTY_FIRST_ENUM;
237 i != ICAL_STATUS_NONE-ICALPROPERTY_FIRST_ENUM;
238 i++) {
239 if ( strcmp(enum_map[i].str, str) == 0) {
240 return (icalproperty_method)enum_map[i].prop_enum;
241 }
242 }
243
244 return ICAL_STATUS_NONE;
245
246}
247
248
249 71
250/* Everything below this line is machine generated. Do not edit. */ 72static struct icalproperty_map property_map[77] = {
251static struct icalproperty_map property_map[] = {
252{ICAL_ACTION_PROPERTY,"ACTION",ICAL_ACTION_VALUE}, 73{ICAL_ACTION_PROPERTY,"ACTION",ICAL_ACTION_VALUE},
74{ICAL_ALLOWCONFLICT_PROPERTY,"ALLOW-CONFLICT",ICAL_TEXT_VALUE},
253{ICAL_ANY_PROPERTY,"ANY",ICAL_NO_VALUE}, 75{ICAL_ANY_PROPERTY,"ANY",ICAL_NO_VALUE},
@@ -255,5 +77,8 @@ static struct icalproperty_map property_map[] = {
255{ICAL_ATTENDEE_PROPERTY,"ATTENDEE",ICAL_CALADDRESS_VALUE}, 77{ICAL_ATTENDEE_PROPERTY,"ATTENDEE",ICAL_CALADDRESS_VALUE},
78{ICAL_CALID_PROPERTY,"CALID",ICAL_TEXT_VALUE},
79{ICAL_CALMASTER_PROPERTY,"CALMASTER",ICAL_TEXT_VALUE},
256{ICAL_CALSCALE_PROPERTY,"CALSCALE",ICAL_TEXT_VALUE}, 80{ICAL_CALSCALE_PROPERTY,"CALSCALE",ICAL_TEXT_VALUE},
81{ICAL_CARID_PROPERTY,"CARID",ICAL_TEXT_VALUE},
257{ICAL_CATEGORIES_PROPERTY,"CATEGORIES",ICAL_TEXT_VALUE}, 82{ICAL_CATEGORIES_PROPERTY,"CATEGORIES",ICAL_TEXT_VALUE},
258{ICAL_CLASS_PROPERTY,"CLASS",ICAL_TEXT_VALUE}, 83{ICAL_CLASS_PROPERTY,"CLASS",ICAL_CLASS_VALUE},
259{ICAL_COMMENT_PROPERTY,"COMMENT",ICAL_TEXT_VALUE}, 84{ICAL_COMMENT_PROPERTY,"COMMENT",ICAL_TEXT_VALUE},
@@ -262,2 +87,6 @@ static struct icalproperty_map property_map[] = {
262{ICAL_CREATED_PROPERTY,"CREATED",ICAL_DATETIME_VALUE}, 87{ICAL_CREATED_PROPERTY,"CREATED",ICAL_DATETIME_VALUE},
88{ICAL_DECREED_PROPERTY,"DECREED",ICAL_TEXT_VALUE},
89{ICAL_DEFAULTCHARSET_PROPERTY,"DEFAULT-CHARSET",ICAL_TEXT_VALUE},
90{ICAL_DEFAULTLOCALE_PROPERTY,"DEFAULT-LOCALE",ICAL_TEXT_VALUE},
91{ICAL_DEFAULTTZID_PROPERTY,"DEFAULT-TZID",ICAL_TEXT_VALUE},
263{ICAL_DESCRIPTION_PROPERTY,"DESCRIPTION",ICAL_TEXT_VALUE}, 92{ICAL_DESCRIPTION_PROPERTY,"DESCRIPTION",ICAL_TEXT_VALUE},
@@ -269,2 +98,3 @@ static struct icalproperty_map property_map[] = {
269{ICAL_EXDATE_PROPERTY,"EXDATE",ICAL_DATETIME_VALUE}, 98{ICAL_EXDATE_PROPERTY,"EXDATE",ICAL_DATETIME_VALUE},
99{ICAL_EXPAND_PROPERTY,"EXPAND",ICAL_INTEGER_VALUE},
270{ICAL_EXRULE_PROPERTY,"EXRULE",ICAL_RECUR_VALUE}, 100{ICAL_EXRULE_PROPERTY,"EXRULE",ICAL_RECUR_VALUE},
@@ -278,2 +108,3 @@ static struct icalproperty_map property_map[] = {
278{ICAL_ORGANIZER_PROPERTY,"ORGANIZER",ICAL_CALADDRESS_VALUE}, 108{ICAL_ORGANIZER_PROPERTY,"ORGANIZER",ICAL_CALADDRESS_VALUE},
109{ICAL_OWNER_PROPERTY,"OWNER",ICAL_TEXT_VALUE},
279{ICAL_PERCENTCOMPLETE_PROPERTY,"PERCENT-COMPLETE",ICAL_INTEGER_VALUE}, 110{ICAL_PERCENTCOMPLETE_PROPERTY,"PERCENT-COMPLETE",ICAL_INTEGER_VALUE},
@@ -286,2 +117,3 @@ static struct icalproperty_map property_map[] = {
286{ICAL_RELATEDTO_PROPERTY,"RELATED-TO",ICAL_TEXT_VALUE}, 117{ICAL_RELATEDTO_PROPERTY,"RELATED-TO",ICAL_TEXT_VALUE},
118{ICAL_RELCALID_PROPERTY,"RELCALID",ICAL_TEXT_VALUE},
287{ICAL_REPEAT_PROPERTY,"REPEAT",ICAL_INTEGER_VALUE}, 119{ICAL_REPEAT_PROPERTY,"REPEAT",ICAL_INTEGER_VALUE},
@@ -295,3 +127,3 @@ static struct icalproperty_map property_map[] = {
295{ICAL_TARGET_PROPERTY,"TARGET",ICAL_CALADDRESS_VALUE}, 127{ICAL_TARGET_PROPERTY,"TARGET",ICAL_CALADDRESS_VALUE},
296{ICAL_TRANSP_PROPERTY,"TRANSP",ICAL_TEXT_VALUE}, 128{ICAL_TRANSP_PROPERTY,"TRANSP",ICAL_TRANSP_VALUE},
297{ICAL_TRIGGER_PROPERTY,"TRIGGER",ICAL_TRIGGER_VALUE}, 129{ICAL_TRIGGER_PROPERTY,"TRIGGER",ICAL_TRIGGER_VALUE},
@@ -305,3 +137,4 @@ static struct icalproperty_map property_map[] = {
305{ICAL_VERSION_PROPERTY,"VERSION",ICAL_TEXT_VALUE}, 137{ICAL_VERSION_PROPERTY,"VERSION",ICAL_TEXT_VALUE},
306{ICAL_X_PROPERTY,"X",ICAL_TEXT_VALUE}, 138{ICAL_X_PROPERTY,"X",ICAL_X_VALUE},
139{ICAL_XLICCLASS_PROPERTY,"X-LIC-CLASS",ICAL_XLICCLASS_VALUE},
307{ICAL_XLICCLUSTERCOUNT_PROPERTY,"X-LIC-CLUSTERCOUNT",ICAL_STRING_VALUE}, 140{ICAL_XLICCLUSTERCOUNT_PROPERTY,"X-LIC-CLUSTERCOUNT",ICAL_STRING_VALUE},
@@ -316,3 +149,3 @@ static struct icalproperty_map property_map[] = {
316 149
317static struct icalproperty_enum_map enum_map[] = { 150static struct icalproperty_enum_map enum_map[75] = {
318 {ICAL_ACTION_PROPERTY,ICAL_ACTION_X,"" }, /*10000*/ 151 {ICAL_ACTION_PROPERTY,ICAL_ACTION_X,"" }, /*10000*/
@@ -357,4 +190,35 @@ static struct icalproperty_enum_map enum_map[] = {
357 {ICAL_TRANSP_PROPERTY,ICAL_TRANSP_OPAQUE,"OPAQUE" }, /*10039*/ 190 {ICAL_TRANSP_PROPERTY,ICAL_TRANSP_OPAQUE,"OPAQUE" }, /*10039*/
358 {ICAL_TRANSP_PROPERTY,ICAL_TRANSP_TRANSPARENT,"TRANSPARENT" }, /*10040*/ 191 {ICAL_TRANSP_PROPERTY,ICAL_TRANSP_OPAQUENOCONFLICT,"OPAQUE-NOCONFLICT" }, /*10040*/
359 {ICAL_TRANSP_PROPERTY,ICAL_TRANSP_NONE,"" }, /*10041*/ 192 {ICAL_TRANSP_PROPERTY,ICAL_TRANSP_TRANSPARENT,"TRANSPARENT" }, /*10041*/
193 {ICAL_TRANSP_PROPERTY,ICAL_TRANSP_TRANSPARENTNOCONFLICT,"TRANSPARENT-NOCONFLICT" }, /*10042*/
194 {ICAL_TRANSP_PROPERTY,ICAL_TRANSP_NONE,"" }, /*10043*/
195 {ICAL_XLICCLASS_PROPERTY,ICAL_XLICCLASS_X,"" }, /*10044*/
196 {ICAL_XLICCLASS_PROPERTY,ICAL_XLICCLASS_PUBLISHNEW,"PUBLISH-NEW" }, /*10045*/
197 {ICAL_XLICCLASS_PROPERTY,ICAL_XLICCLASS_PUBLISHUPDATE,"PUBLISH-UPDATE" }, /*10046*/
198 {ICAL_XLICCLASS_PROPERTY,ICAL_XLICCLASS_PUBLISHFREEBUSY,"PUBLISH-FREEBUSY" }, /*10047*/
199 {ICAL_XLICCLASS_PROPERTY,ICAL_XLICCLASS_REQUESTNEW,"REQUEST-NEW" }, /*10048*/
200 {ICAL_XLICCLASS_PROPERTY,ICAL_XLICCLASS_REQUESTUPDATE,"REQUEST-UPDATE" }, /*10049*/
201 {ICAL_XLICCLASS_PROPERTY,ICAL_XLICCLASS_REQUESTRESCHEDULE,"REQUEST-RESCHEDULE" }, /*10050*/
202 {ICAL_XLICCLASS_PROPERTY,ICAL_XLICCLASS_REQUESTDELEGATE,"REQUEST-DELEGATE" }, /*10051*/
203 {ICAL_XLICCLASS_PROPERTY,ICAL_XLICCLASS_REQUESTNEWORGANIZER,"REQUEST-NEW-ORGANIZER" }, /*10052*/
204 {ICAL_XLICCLASS_PROPERTY,ICAL_XLICCLASS_REQUESTFORWARD,"REQUEST-FORWARD" }, /*10053*/
205 {ICAL_XLICCLASS_PROPERTY,ICAL_XLICCLASS_REQUESTSTATUS,"REQUEST-STATUS" }, /*10054*/
206 {ICAL_XLICCLASS_PROPERTY,ICAL_XLICCLASS_REQUESTFREEBUSY,"REQUEST-FREEBUSY" }, /*10055*/
207 {ICAL_XLICCLASS_PROPERTY,ICAL_XLICCLASS_REPLYACCEPT,"REPLY-ACCEPT" }, /*10056*/
208 {ICAL_XLICCLASS_PROPERTY,ICAL_XLICCLASS_REPLYDECLINE,"REPLY-DECLINE" }, /*10057*/
209 {ICAL_XLICCLASS_PROPERTY,ICAL_XLICCLASS_REPLYDELEGATE,"REPLY-DELEGATE" }, /*10058*/
210 {ICAL_XLICCLASS_PROPERTY,ICAL_XLICCLASS_REPLYCRASHERACCEPT,"REPLY-CRASHER-ACCEPT" }, /*10059*/
211 {ICAL_XLICCLASS_PROPERTY,ICAL_XLICCLASS_REPLYCRASHERDECLINE,"REPLY-CRASHER-DECLINE" }, /*10060*/
212 {ICAL_XLICCLASS_PROPERTY,ICAL_XLICCLASS_ADDINSTANCE,"ADD-INSTANCE" }, /*10061*/
213 {ICAL_XLICCLASS_PROPERTY,ICAL_XLICCLASS_CANCELEVENT,"CANCEL-EVENT" }, /*10062*/
214 {ICAL_XLICCLASS_PROPERTY,ICAL_XLICCLASS_CANCELINSTANCE,"CANCEL-INSTANCE" }, /*10063*/
215 {ICAL_XLICCLASS_PROPERTY,ICAL_XLICCLASS_CANCELALL,"CANCEL-ALL" }, /*10064*/
216 {ICAL_XLICCLASS_PROPERTY,ICAL_XLICCLASS_REFRESH,"REFRESH" }, /*10065*/
217 {ICAL_XLICCLASS_PROPERTY,ICAL_XLICCLASS_COUNTER,"COUNTER" }, /*10066*/
218 {ICAL_XLICCLASS_PROPERTY,ICAL_XLICCLASS_DECLINECOUNTER,"DECLINECOUNTER" }, /*10067*/
219 {ICAL_XLICCLASS_PROPERTY,ICAL_XLICCLASS_MALFORMED,"MALFORMED" }, /*10068*/
220 {ICAL_XLICCLASS_PROPERTY,ICAL_XLICCLASS_OBSOLETE,"OBSOLETE" }, /*10069*/
221 {ICAL_XLICCLASS_PROPERTY,ICAL_XLICCLASS_MISSEQUENCED,"MISSEQUENCED" }, /*10070*/
222 {ICAL_XLICCLASS_PROPERTY,ICAL_XLICCLASS_UNKNOWN,"UNKNOWN" }, /*10071*/
223 {ICAL_XLICCLASS_PROPERTY,ICAL_XLICCLASS_NONE,"" }, /*10072*/
360 {ICAL_NO_PROPERTY,0,""} 224 {ICAL_NO_PROPERTY,0,""}
@@ -371,2 +235,3 @@ icalproperty* icalproperty_vanew_action(enum icalproperty_action v, ...){
371} 235}
236
372/* ACTION */ 237/* ACTION */
@@ -383,3 +248,3 @@ void icalproperty_set_action(icalproperty* prop, enum icalproperty_action v){
383} 248}
384enum icalproperty_action icalproperty_get_action(icalproperty* prop){ 249enum icalproperty_action icalproperty_get_action(const icalproperty* prop){
385 icalerror_check_arg( (prop!=0),"prop"); 250 icalerror_check_arg( (prop!=0),"prop");
@@ -387,3 +252,32 @@ enum icalproperty_action icalproperty_get_action(icalproperty* prop){
387} 252}
388icalproperty* icalproperty_vanew_attach(struct icalattachtype* v, ...){ 253icalproperty* icalproperty_vanew_allowconflict(const char* v, ...){
254 va_list args;
255 struct icalproperty_impl *impl = icalproperty_new_impl(ICAL_ALLOWCONFLICT_PROPERTY); icalerror_check_arg_rz( (v!=0),"v");
256
257 icalproperty_set_allowconflict((icalproperty*)impl,v);
258 va_start(args,v);
259 icalproperty_add_parameters(impl, args);
260 va_end(args);
261 return (icalproperty*)impl;
262}
263
264/* ALLOW-CONFLICT */
265icalproperty* icalproperty_new_allowconflict(const char* v) {
266 struct icalproperty_impl *impl = icalproperty_new_impl(ICAL_ALLOWCONFLICT_PROPERTY); icalerror_check_arg_rz( (v!=0),"v");
267
268 icalproperty_set_allowconflict((icalproperty*)impl,v);
269 return (icalproperty*)impl;
270}
271
272void icalproperty_set_allowconflict(icalproperty* prop, const char* v){
273 icalerror_check_arg_rv( (v!=0),"v");
274
275 icalerror_check_arg_rv( (prop!=0),"prop");
276 icalproperty_set_value(prop,icalvalue_new_text(v));
277}
278const char* icalproperty_get_allowconflict(const icalproperty* prop){
279 icalerror_check_arg( (prop!=0),"prop");
280 return icalvalue_get_text(icalproperty_get_value(prop));
281}
282icalproperty* icalproperty_vanew_attach(icalattach * v, ...){
389 va_list args; 283 va_list args;
@@ -397,4 +291,5 @@ icalproperty* icalproperty_vanew_attach(struct icalattachtype* v, ...){
397} 291}
292
398/* ATTACH */ 293/* ATTACH */
399icalproperty* icalproperty_new_attach(struct icalattachtype* v) { 294icalproperty* icalproperty_new_attach(icalattach * v) {
400 struct icalproperty_impl *impl = icalproperty_new_impl(ICAL_ATTACH_PROPERTY); icalerror_check_arg_rz( (v!=0),"v"); 295 struct icalproperty_impl *impl = icalproperty_new_impl(ICAL_ATTACH_PROPERTY); icalerror_check_arg_rz( (v!=0),"v");
@@ -405,3 +300,3 @@ icalproperty* icalproperty_new_attach(struct icalattachtype* v) {
405 300
406void icalproperty_set_attach(icalproperty* prop, struct icalattachtype* v){ 301void icalproperty_set_attach(icalproperty* prop, icalattach * v){
407 icalerror_check_arg_rv( (v!=0),"v"); 302 icalerror_check_arg_rv( (v!=0),"v");
@@ -411,3 +306,3 @@ void icalproperty_set_attach(icalproperty* prop, struct icalattachtype* v){
411} 306}
412struct icalattachtype* icalproperty_get_attach(icalproperty* prop){ 307icalattach * icalproperty_get_attach(const icalproperty* prop){
413 icalerror_check_arg( (prop!=0),"prop"); 308 icalerror_check_arg( (prop!=0),"prop");
@@ -425,2 +320,3 @@ icalproperty* icalproperty_vanew_attendee(const char* v, ...){
425} 320}
321
426/* ATTENDEE */ 322/* ATTENDEE */
@@ -439,3 +335,3 @@ void icalproperty_set_attendee(icalproperty* prop, const char* v){
439} 335}
440const char* icalproperty_get_attendee(icalproperty* prop){ 336const char* icalproperty_get_attendee(const icalproperty* prop){
441 icalerror_check_arg( (prop!=0),"prop"); 337 icalerror_check_arg( (prop!=0),"prop");
@@ -443,2 +339,60 @@ const char* icalproperty_get_attendee(icalproperty* prop){
443} 339}
340icalproperty* icalproperty_vanew_calid(const char* v, ...){
341 va_list args;
342 struct icalproperty_impl *impl = icalproperty_new_impl(ICAL_CALID_PROPERTY); icalerror_check_arg_rz( (v!=0),"v");
343
344 icalproperty_set_calid((icalproperty*)impl,v);
345 va_start(args,v);
346 icalproperty_add_parameters(impl, args);
347 va_end(args);
348 return (icalproperty*)impl;
349}
350
351/* CALID */
352icalproperty* icalproperty_new_calid(const char* v) {
353 struct icalproperty_impl *impl = icalproperty_new_impl(ICAL_CALID_PROPERTY); icalerror_check_arg_rz( (v!=0),"v");
354
355 icalproperty_set_calid((icalproperty*)impl,v);
356 return (icalproperty*)impl;
357}
358
359void icalproperty_set_calid(icalproperty* prop, const char* v){
360 icalerror_check_arg_rv( (v!=0),"v");
361
362 icalerror_check_arg_rv( (prop!=0),"prop");
363 icalproperty_set_value(prop,icalvalue_new_text(v));
364}
365const char* icalproperty_get_calid(const icalproperty* prop){
366 icalerror_check_arg( (prop!=0),"prop");
367 return icalvalue_get_text(icalproperty_get_value(prop));
368}
369icalproperty* icalproperty_vanew_calmaster(const char* v, ...){
370 va_list args;
371 struct icalproperty_impl *impl = icalproperty_new_impl(ICAL_CALMASTER_PROPERTY); icalerror_check_arg_rz( (v!=0),"v");
372
373 icalproperty_set_calmaster((icalproperty*)impl,v);
374 va_start(args,v);
375 icalproperty_add_parameters(impl, args);
376 va_end(args);
377 return (icalproperty*)impl;
378}
379
380/* CALMASTER */
381icalproperty* icalproperty_new_calmaster(const char* v) {
382 struct icalproperty_impl *impl = icalproperty_new_impl(ICAL_CALMASTER_PROPERTY); icalerror_check_arg_rz( (v!=0),"v");
383
384 icalproperty_set_calmaster((icalproperty*)impl,v);
385 return (icalproperty*)impl;
386}
387
388void icalproperty_set_calmaster(icalproperty* prop, const char* v){
389 icalerror_check_arg_rv( (v!=0),"v");
390
391 icalerror_check_arg_rv( (prop!=0),"prop");
392 icalproperty_set_value(prop,icalvalue_new_text(v));
393}
394const char* icalproperty_get_calmaster(const icalproperty* prop){
395 icalerror_check_arg( (prop!=0),"prop");
396 return icalvalue_get_text(icalproperty_get_value(prop));
397}
444icalproperty* icalproperty_vanew_calscale(const char* v, ...){ 398icalproperty* icalproperty_vanew_calscale(const char* v, ...){
@@ -453,2 +407,3 @@ icalproperty* icalproperty_vanew_calscale(const char* v, ...){
453} 407}
408
454/* CALSCALE */ 409/* CALSCALE */
@@ -467,3 +422,32 @@ void icalproperty_set_calscale(icalproperty* prop, const char* v){
467} 422}
468const char* icalproperty_get_calscale(icalproperty* prop){ 423const char* icalproperty_get_calscale(const icalproperty* prop){
424 icalerror_check_arg( (prop!=0),"prop");
425 return icalvalue_get_text(icalproperty_get_value(prop));
426}
427icalproperty* icalproperty_vanew_carid(const char* v, ...){
428 va_list args;
429 struct icalproperty_impl *impl = icalproperty_new_impl(ICAL_CARID_PROPERTY); icalerror_check_arg_rz( (v!=0),"v");
430
431 icalproperty_set_carid((icalproperty*)impl,v);
432 va_start(args,v);
433 icalproperty_add_parameters(impl, args);
434 va_end(args);
435 return (icalproperty*)impl;
436}
437
438/* CARID */
439icalproperty* icalproperty_new_carid(const char* v) {
440 struct icalproperty_impl *impl = icalproperty_new_impl(ICAL_CARID_PROPERTY); icalerror_check_arg_rz( (v!=0),"v");
441
442 icalproperty_set_carid((icalproperty*)impl,v);
443 return (icalproperty*)impl;
444}
445
446void icalproperty_set_carid(icalproperty* prop, const char* v){
447 icalerror_check_arg_rv( (v!=0),"v");
448
449 icalerror_check_arg_rv( (prop!=0),"prop");
450 icalproperty_set_value(prop,icalvalue_new_text(v));
451}
452const char* icalproperty_get_carid(const icalproperty* prop){
469 icalerror_check_arg( (prop!=0),"prop"); 453 icalerror_check_arg( (prop!=0),"prop");
@@ -481,2 +465,3 @@ icalproperty* icalproperty_vanew_categories(const char* v, ...){
481} 465}
466
482/* CATEGORIES */ 467/* CATEGORIES */
@@ -495,3 +480,3 @@ void icalproperty_set_categories(icalproperty* prop, const char* v){
495} 480}
496const char* icalproperty_get_categories(icalproperty* prop){ 481const char* icalproperty_get_categories(const icalproperty* prop){
497 icalerror_check_arg( (prop!=0),"prop"); 482 icalerror_check_arg( (prop!=0),"prop");
@@ -499,6 +484,5 @@ const char* icalproperty_get_categories(icalproperty* prop){
499} 484}
500icalproperty* icalproperty_vanew_class(const char* v, ...){ 485icalproperty* icalproperty_vanew_class(enum icalproperty_class v, ...){
501 va_list args; 486 va_list args;
502 struct icalproperty_impl *impl = icalproperty_new_impl(ICAL_CLASS_PROPERTY); icalerror_check_arg_rz( (v!=0),"v"); 487 struct icalproperty_impl *impl = icalproperty_new_impl(ICAL_CLASS_PROPERTY);
503
504 icalproperty_set_class((icalproperty*)impl,v); 488 icalproperty_set_class((icalproperty*)impl,v);
@@ -509,6 +493,6 @@ icalproperty* icalproperty_vanew_class(const char* v, ...){
509} 493}
510/* CLASS */
511icalproperty* icalproperty_new_class(const char* v) {
512 struct icalproperty_impl *impl = icalproperty_new_impl(ICAL_CLASS_PROPERTY); icalerror_check_arg_rz( (v!=0),"v");
513 494
495/* CLASS */
496icalproperty* icalproperty_new_class(enum icalproperty_class v) {
497 struct icalproperty_impl *impl = icalproperty_new_impl(ICAL_CLASS_PROPERTY);
514 icalproperty_set_class((icalproperty*)impl,v); 498 icalproperty_set_class((icalproperty*)impl,v);
@@ -517,11 +501,10 @@ icalproperty* icalproperty_new_class(const char* v) {
517 501
518void icalproperty_set_class(icalproperty* prop, const char* v){ 502void icalproperty_set_class(icalproperty* prop, enum icalproperty_class v){
519 icalerror_check_arg_rv( (v!=0),"v"); 503
520
521 icalerror_check_arg_rv( (prop!=0),"prop"); 504 icalerror_check_arg_rv( (prop!=0),"prop");
522 icalproperty_set_value(prop,icalvalue_new_text(v)); 505 icalproperty_set_value(prop,icalvalue_new_class(v));
523} 506}
524const char* icalproperty_get_class(icalproperty* prop){ 507enum icalproperty_class icalproperty_get_class(const icalproperty* prop){
525 icalerror_check_arg( (prop!=0),"prop"); 508 icalerror_check_arg( (prop!=0),"prop");
526 return icalvalue_get_text(icalproperty_get_value(prop)); 509 return icalvalue_get_class(icalproperty_get_value(prop));
527} 510}
@@ -537,2 +520,3 @@ icalproperty* icalproperty_vanew_comment(const char* v, ...){
537} 520}
521
538/* COMMENT */ 522/* COMMENT */
@@ -551,3 +535,3 @@ void icalproperty_set_comment(icalproperty* prop, const char* v){
551} 535}
552const char* icalproperty_get_comment(icalproperty* prop){ 536const char* icalproperty_get_comment(const icalproperty* prop){
553 icalerror_check_arg( (prop!=0),"prop"); 537 icalerror_check_arg( (prop!=0),"prop");
@@ -564,2 +548,3 @@ icalproperty* icalproperty_vanew_completed(struct icaltimetype v, ...){
564} 548}
549
565/* COMPLETED */ 550/* COMPLETED */
@@ -576,3 +561,3 @@ void icalproperty_set_completed(icalproperty* prop, struct icaltimetype v){
576} 561}
577struct icaltimetype icalproperty_get_completed(icalproperty* prop){ 562struct icaltimetype icalproperty_get_completed(const icalproperty* prop){
578 icalerror_check_arg( (prop!=0),"prop"); 563 icalerror_check_arg( (prop!=0),"prop");
@@ -590,2 +575,3 @@ icalproperty* icalproperty_vanew_contact(const char* v, ...){
590} 575}
576
591/* CONTACT */ 577/* CONTACT */
@@ -604,3 +590,3 @@ void icalproperty_set_contact(icalproperty* prop, const char* v){
604} 590}
605const char* icalproperty_get_contact(icalproperty* prop){ 591const char* icalproperty_get_contact(const icalproperty* prop){
606 icalerror_check_arg( (prop!=0),"prop"); 592 icalerror_check_arg( (prop!=0),"prop");
@@ -617,2 +603,3 @@ icalproperty* icalproperty_vanew_created(struct icaltimetype v, ...){
617} 603}
604
618/* CREATED */ 605/* CREATED */
@@ -629,3 +616,3 @@ void icalproperty_set_created(icalproperty* prop, struct icaltimetype v){
629} 616}
630struct icaltimetype icalproperty_get_created(icalproperty* prop){ 617struct icaltimetype icalproperty_get_created(const icalproperty* prop){
631 icalerror_check_arg( (prop!=0),"prop"); 618 icalerror_check_arg( (prop!=0),"prop");
@@ -633,2 +620,118 @@ struct icaltimetype icalproperty_get_created(icalproperty* prop){
633} 620}
621icalproperty* icalproperty_vanew_decreed(const char* v, ...){
622 va_list args;
623 struct icalproperty_impl *impl = icalproperty_new_impl(ICAL_DECREED_PROPERTY); icalerror_check_arg_rz( (v!=0),"v");
624
625 icalproperty_set_decreed((icalproperty*)impl,v);
626 va_start(args,v);
627 icalproperty_add_parameters(impl, args);
628 va_end(args);
629 return (icalproperty*)impl;
630}
631
632/* DECREED */
633icalproperty* icalproperty_new_decreed(const char* v) {
634 struct icalproperty_impl *impl = icalproperty_new_impl(ICAL_DECREED_PROPERTY); icalerror_check_arg_rz( (v!=0),"v");
635
636 icalproperty_set_decreed((icalproperty*)impl,v);
637 return (icalproperty*)impl;
638}
639
640void icalproperty_set_decreed(icalproperty* prop, const char* v){
641 icalerror_check_arg_rv( (v!=0),"v");
642
643 icalerror_check_arg_rv( (prop!=0),"prop");
644 icalproperty_set_value(prop,icalvalue_new_text(v));
645}
646const char* icalproperty_get_decreed(const icalproperty* prop){
647 icalerror_check_arg( (prop!=0),"prop");
648 return icalvalue_get_text(icalproperty_get_value(prop));
649}
650icalproperty* icalproperty_vanew_defaultcharset(const char* v, ...){
651 va_list args;
652 struct icalproperty_impl *impl = icalproperty_new_impl(ICAL_DEFAULTCHARSET_PROPERTY); icalerror_check_arg_rz( (v!=0),"v");
653
654 icalproperty_set_defaultcharset((icalproperty*)impl,v);
655 va_start(args,v);
656 icalproperty_add_parameters(impl, args);
657 va_end(args);
658 return (icalproperty*)impl;
659}
660
661/* DEFAULT-CHARSET */
662icalproperty* icalproperty_new_defaultcharset(const char* v) {
663 struct icalproperty_impl *impl = icalproperty_new_impl(ICAL_DEFAULTCHARSET_PROPERTY); icalerror_check_arg_rz( (v!=0),"v");
664
665 icalproperty_set_defaultcharset((icalproperty*)impl,v);
666 return (icalproperty*)impl;
667}
668
669void icalproperty_set_defaultcharset(icalproperty* prop, const char* v){
670 icalerror_check_arg_rv( (v!=0),"v");
671
672 icalerror_check_arg_rv( (prop!=0),"prop");
673 icalproperty_set_value(prop,icalvalue_new_text(v));
674}
675const char* icalproperty_get_defaultcharset(const icalproperty* prop){
676 icalerror_check_arg( (prop!=0),"prop");
677 return icalvalue_get_text(icalproperty_get_value(prop));
678}
679icalproperty* icalproperty_vanew_defaultlocale(const char* v, ...){
680 va_list args;
681 struct icalproperty_impl *impl = icalproperty_new_impl(ICAL_DEFAULTLOCALE_PROPERTY); icalerror_check_arg_rz( (v!=0),"v");
682
683 icalproperty_set_defaultlocale((icalproperty*)impl,v);
684 va_start(args,v);
685 icalproperty_add_parameters(impl, args);
686 va_end(args);
687 return (icalproperty*)impl;
688}
689
690/* DEFAULT-LOCALE */
691icalproperty* icalproperty_new_defaultlocale(const char* v) {
692 struct icalproperty_impl *impl = icalproperty_new_impl(ICAL_DEFAULTLOCALE_PROPERTY); icalerror_check_arg_rz( (v!=0),"v");
693
694 icalproperty_set_defaultlocale((icalproperty*)impl,v);
695 return (icalproperty*)impl;
696}
697
698void icalproperty_set_defaultlocale(icalproperty* prop, const char* v){
699 icalerror_check_arg_rv( (v!=0),"v");
700
701 icalerror_check_arg_rv( (prop!=0),"prop");
702 icalproperty_set_value(prop,icalvalue_new_text(v));
703}
704const char* icalproperty_get_defaultlocale(const icalproperty* prop){
705 icalerror_check_arg( (prop!=0),"prop");
706 return icalvalue_get_text(icalproperty_get_value(prop));
707}
708icalproperty* icalproperty_vanew_defaulttzid(const char* v, ...){
709 va_list args;
710 struct icalproperty_impl *impl = icalproperty_new_impl(ICAL_DEFAULTTZID_PROPERTY); icalerror_check_arg_rz( (v!=0),"v");
711
712 icalproperty_set_defaulttzid((icalproperty*)impl,v);
713 va_start(args,v);
714 icalproperty_add_parameters(impl, args);
715 va_end(args);
716 return (icalproperty*)impl;
717}
718
719/* DEFAULT-TZID */
720icalproperty* icalproperty_new_defaulttzid(const char* v) {
721 struct icalproperty_impl *impl = icalproperty_new_impl(ICAL_DEFAULTTZID_PROPERTY); icalerror_check_arg_rz( (v!=0),"v");
722
723 icalproperty_set_defaulttzid((icalproperty*)impl,v);
724 return (icalproperty*)impl;
725}
726
727void icalproperty_set_defaulttzid(icalproperty* prop, const char* v){
728 icalerror_check_arg_rv( (v!=0),"v");
729
730 icalerror_check_arg_rv( (prop!=0),"prop");
731 icalproperty_set_value(prop,icalvalue_new_text(v));
732}
733const char* icalproperty_get_defaulttzid(const icalproperty* prop){
734 icalerror_check_arg( (prop!=0),"prop");
735 return icalvalue_get_text(icalproperty_get_value(prop));
736}
634icalproperty* icalproperty_vanew_description(const char* v, ...){ 737icalproperty* icalproperty_vanew_description(const char* v, ...){
@@ -643,2 +746,3 @@ icalproperty* icalproperty_vanew_description(const char* v, ...){
643} 746}
747
644/* DESCRIPTION */ 748/* DESCRIPTION */
@@ -657,3 +761,3 @@ void icalproperty_set_description(icalproperty* prop, const char* v){
657} 761}
658const char* icalproperty_get_description(icalproperty* prop){ 762const char* icalproperty_get_description(const icalproperty* prop){
659 icalerror_check_arg( (prop!=0),"prop"); 763 icalerror_check_arg( (prop!=0),"prop");
@@ -670,2 +774,3 @@ icalproperty* icalproperty_vanew_dtend(struct icaltimetype v, ...){
670} 774}
775
671/* DTEND */ 776/* DTEND */
@@ -678,7 +783,12 @@ icalproperty* icalproperty_new_dtend(struct icaltimetype v) {
678void icalproperty_set_dtend(icalproperty* prop, struct icaltimetype v){ 783void icalproperty_set_dtend(icalproperty* prop, struct icaltimetype v){
784 icalvalue *value;
679 785
680 icalerror_check_arg_rv( (prop!=0),"prop"); 786 icalerror_check_arg_rv( (prop!=0),"prop");
681 icalproperty_set_value(prop,icalvalue_new_datetime(v)); 787 if (v.is_date)
788 value = icalvalue_new_date(v);
789 else
790 value = icalvalue_new_datetime(v);
791 icalproperty_set_value(prop,value);
682} 792}
683struct icaltimetype icalproperty_get_dtend(icalproperty* prop){ 793struct icaltimetype icalproperty_get_dtend(const icalproperty* prop){
684 icalerror_check_arg( (prop!=0),"prop"); 794 icalerror_check_arg( (prop!=0),"prop");
@@ -695,2 +805,3 @@ icalproperty* icalproperty_vanew_dtstamp(struct icaltimetype v, ...){
695} 805}
806
696/* DTSTAMP */ 807/* DTSTAMP */
@@ -707,3 +818,3 @@ void icalproperty_set_dtstamp(icalproperty* prop, struct icaltimetype v){
707} 818}
708struct icaltimetype icalproperty_get_dtstamp(icalproperty* prop){ 819struct icaltimetype icalproperty_get_dtstamp(const icalproperty* prop){
709 icalerror_check_arg( (prop!=0),"prop"); 820 icalerror_check_arg( (prop!=0),"prop");
@@ -720,2 +831,3 @@ icalproperty* icalproperty_vanew_dtstart(struct icaltimetype v, ...){
720} 831}
832
721/* DTSTART */ 833/* DTSTART */
@@ -728,7 +840,12 @@ icalproperty* icalproperty_new_dtstart(struct icaltimetype v) {
728void icalproperty_set_dtstart(icalproperty* prop, struct icaltimetype v){ 840void icalproperty_set_dtstart(icalproperty* prop, struct icaltimetype v){
841 icalvalue *value;
729 842
730 icalerror_check_arg_rv( (prop!=0),"prop"); 843 icalerror_check_arg_rv( (prop!=0),"prop");
731 icalproperty_set_value(prop,icalvalue_new_datetime(v)); 844 if (v.is_date)
845 value = icalvalue_new_date(v);
846 else
847 value = icalvalue_new_datetime(v);
848 icalproperty_set_value(prop,value);
732} 849}
733struct icaltimetype icalproperty_get_dtstart(icalproperty* prop){ 850struct icaltimetype icalproperty_get_dtstart(const icalproperty* prop){
734 icalerror_check_arg( (prop!=0),"prop"); 851 icalerror_check_arg( (prop!=0),"prop");
@@ -745,2 +862,3 @@ icalproperty* icalproperty_vanew_due(struct icaltimetype v, ...){
745} 862}
863
746/* DUE */ 864/* DUE */
@@ -753,7 +871,12 @@ icalproperty* icalproperty_new_due(struct icaltimetype v) {
753void icalproperty_set_due(icalproperty* prop, struct icaltimetype v){ 871void icalproperty_set_due(icalproperty* prop, struct icaltimetype v){
872 icalvalue *value;
754 873
755 icalerror_check_arg_rv( (prop!=0),"prop"); 874 icalerror_check_arg_rv( (prop!=0),"prop");
756 icalproperty_set_value(prop,icalvalue_new_datetime(v)); 875 if (v.is_date)
876 value = icalvalue_new_date(v);
877 else
878 value = icalvalue_new_datetime(v);
879 icalproperty_set_value(prop,value);
757} 880}
758struct icaltimetype icalproperty_get_due(icalproperty* prop){ 881struct icaltimetype icalproperty_get_due(const icalproperty* prop){
759 icalerror_check_arg( (prop!=0),"prop"); 882 icalerror_check_arg( (prop!=0),"prop");
@@ -770,2 +893,3 @@ icalproperty* icalproperty_vanew_duration(struct icaldurationtype v, ...){
770} 893}
894
771/* DURATION */ 895/* DURATION */
@@ -782,3 +906,3 @@ void icalproperty_set_duration(icalproperty* prop, struct icaldurationtype v){
782} 906}
783struct icaldurationtype icalproperty_get_duration(icalproperty* prop){ 907struct icaldurationtype icalproperty_get_duration(const icalproperty* prop){
784 icalerror_check_arg( (prop!=0),"prop"); 908 icalerror_check_arg( (prop!=0),"prop");
@@ -795,2 +919,3 @@ icalproperty* icalproperty_vanew_exdate(struct icaltimetype v, ...){
795} 919}
920
796/* EXDATE */ 921/* EXDATE */
@@ -803,7 +928,12 @@ icalproperty* icalproperty_new_exdate(struct icaltimetype v) {
803void icalproperty_set_exdate(icalproperty* prop, struct icaltimetype v){ 928void icalproperty_set_exdate(icalproperty* prop, struct icaltimetype v){
929 icalvalue *value;
804 930
805 icalerror_check_arg_rv( (prop!=0),"prop"); 931 icalerror_check_arg_rv( (prop!=0),"prop");
806 icalproperty_set_value(prop,icalvalue_new_datetime(v)); 932 if (v.is_date)
933 value = icalvalue_new_date(v);
934 else
935 value = icalvalue_new_datetime(v);
936 icalproperty_set_value(prop,value);
807} 937}
808struct icaltimetype icalproperty_get_exdate(icalproperty* prop){ 938struct icaltimetype icalproperty_get_exdate(const icalproperty* prop){
809 icalerror_check_arg( (prop!=0),"prop"); 939 icalerror_check_arg( (prop!=0),"prop");
@@ -811,2 +941,28 @@ struct icaltimetype icalproperty_get_exdate(icalproperty* prop){
811} 941}
942icalproperty* icalproperty_vanew_expand(int v, ...){
943 va_list args;
944 struct icalproperty_impl *impl = icalproperty_new_impl(ICAL_EXPAND_PROPERTY);
945 icalproperty_set_expand((icalproperty*)impl,v);
946 va_start(args,v);
947 icalproperty_add_parameters(impl, args);
948 va_end(args);
949 return (icalproperty*)impl;
950}
951
952/* EXPAND */
953icalproperty* icalproperty_new_expand(int v) {
954 struct icalproperty_impl *impl = icalproperty_new_impl(ICAL_EXPAND_PROPERTY);
955 icalproperty_set_expand((icalproperty*)impl,v);
956 return (icalproperty*)impl;
957}
958
959void icalproperty_set_expand(icalproperty* prop, int v){
960
961 icalerror_check_arg_rv( (prop!=0),"prop");
962 icalproperty_set_value(prop,icalvalue_new_integer(v));
963}
964int icalproperty_get_expand(const icalproperty* prop){
965 icalerror_check_arg( (prop!=0),"prop");
966 return icalvalue_get_integer(icalproperty_get_value(prop));
967}
812icalproperty* icalproperty_vanew_exrule(struct icalrecurrencetype v, ...){ 968icalproperty* icalproperty_vanew_exrule(struct icalrecurrencetype v, ...){
@@ -820,2 +976,3 @@ icalproperty* icalproperty_vanew_exrule(struct icalrecurrencetype v, ...){
820} 976}
977
821/* EXRULE */ 978/* EXRULE */
@@ -832,3 +989,3 @@ void icalproperty_set_exrule(icalproperty* prop, struct icalrecurrencetype v){
832} 989}
833struct icalrecurrencetype icalproperty_get_exrule(icalproperty* prop){ 990struct icalrecurrencetype icalproperty_get_exrule(const icalproperty* prop){
834 icalerror_check_arg( (prop!=0),"prop"); 991 icalerror_check_arg( (prop!=0),"prop");
@@ -845,2 +1002,3 @@ icalproperty* icalproperty_vanew_freebusy(struct icalperiodtype v, ...){
845} 1002}
1003
846/* FREEBUSY */ 1004/* FREEBUSY */
@@ -857,3 +1015,3 @@ void icalproperty_set_freebusy(icalproperty* prop, struct icalperiodtype v){
857} 1015}
858struct icalperiodtype icalproperty_get_freebusy(icalproperty* prop){ 1016struct icalperiodtype icalproperty_get_freebusy(const icalproperty* prop){
859 icalerror_check_arg( (prop!=0),"prop"); 1017 icalerror_check_arg( (prop!=0),"prop");
@@ -870,2 +1028,3 @@ icalproperty* icalproperty_vanew_geo(struct icalgeotype v, ...){
870} 1028}
1029
871/* GEO */ 1030/* GEO */
@@ -882,3 +1041,3 @@ void icalproperty_set_geo(icalproperty* prop, struct icalgeotype v){
882} 1041}
883struct icalgeotype icalproperty_get_geo(icalproperty* prop){ 1042struct icalgeotype icalproperty_get_geo(const icalproperty* prop){
884 icalerror_check_arg( (prop!=0),"prop"); 1043 icalerror_check_arg( (prop!=0),"prop");
@@ -895,2 +1054,3 @@ icalproperty* icalproperty_vanew_lastmodified(struct icaltimetype v, ...){
895} 1054}
1055
896/* LAST-MODIFIED */ 1056/* LAST-MODIFIED */
@@ -907,3 +1067,3 @@ void icalproperty_set_lastmodified(icalproperty* prop, struct icaltimetype v){
907} 1067}
908struct icaltimetype icalproperty_get_lastmodified(icalproperty* prop){ 1068struct icaltimetype icalproperty_get_lastmodified(const icalproperty* prop){
909 icalerror_check_arg( (prop!=0),"prop"); 1069 icalerror_check_arg( (prop!=0),"prop");
@@ -921,2 +1081,3 @@ icalproperty* icalproperty_vanew_location(const char* v, ...){
921} 1081}
1082
922/* LOCATION */ 1083/* LOCATION */
@@ -935,3 +1096,3 @@ void icalproperty_set_location(icalproperty* prop, const char* v){
935} 1096}
936const char* icalproperty_get_location(icalproperty* prop){ 1097const char* icalproperty_get_location(const icalproperty* prop){
937 icalerror_check_arg( (prop!=0),"prop"); 1098 icalerror_check_arg( (prop!=0),"prop");
@@ -948,2 +1109,3 @@ icalproperty* icalproperty_vanew_maxresults(int v, ...){
948} 1109}
1110
949/* MAXRESULTS */ 1111/* MAXRESULTS */
@@ -960,3 +1122,3 @@ void icalproperty_set_maxresults(icalproperty* prop, int v){
960} 1122}
961int icalproperty_get_maxresults(icalproperty* prop){ 1123int icalproperty_get_maxresults(const icalproperty* prop){
962 icalerror_check_arg( (prop!=0),"prop"); 1124 icalerror_check_arg( (prop!=0),"prop");
@@ -973,2 +1135,3 @@ icalproperty* icalproperty_vanew_maxresultssize(int v, ...){
973} 1135}
1136
974/* MAXRESULTSSIZE */ 1137/* MAXRESULTSSIZE */
@@ -985,3 +1148,3 @@ void icalproperty_set_maxresultssize(icalproperty* prop, int v){
985} 1148}
986int icalproperty_get_maxresultssize(icalproperty* prop){ 1149int icalproperty_get_maxresultssize(const icalproperty* prop){
987 icalerror_check_arg( (prop!=0),"prop"); 1150 icalerror_check_arg( (prop!=0),"prop");
@@ -998,2 +1161,3 @@ icalproperty* icalproperty_vanew_method(enum icalproperty_method v, ...){
998} 1161}
1162
999/* METHOD */ 1163/* METHOD */
@@ -1010,3 +1174,3 @@ void icalproperty_set_method(icalproperty* prop, enum icalproperty_method v){
1010} 1174}
1011enum icalproperty_method icalproperty_get_method(icalproperty* prop){ 1175enum icalproperty_method icalproperty_get_method(const icalproperty* prop){
1012 icalerror_check_arg( (prop!=0),"prop"); 1176 icalerror_check_arg( (prop!=0),"prop");
@@ -1024,2 +1188,3 @@ icalproperty* icalproperty_vanew_organizer(const char* v, ...){
1024} 1188}
1189
1025/* ORGANIZER */ 1190/* ORGANIZER */
@@ -1038,3 +1203,3 @@ void icalproperty_set_organizer(icalproperty* prop, const char* v){
1038} 1203}
1039const char* icalproperty_get_organizer(icalproperty* prop){ 1204const char* icalproperty_get_organizer(const icalproperty* prop){
1040 icalerror_check_arg( (prop!=0),"prop"); 1205 icalerror_check_arg( (prop!=0),"prop");
@@ -1042,2 +1207,31 @@ const char* icalproperty_get_organizer(icalproperty* prop){
1042} 1207}
1208icalproperty* icalproperty_vanew_owner(const char* v, ...){
1209 va_list args;
1210 struct icalproperty_impl *impl = icalproperty_new_impl(ICAL_OWNER_PROPERTY); icalerror_check_arg_rz( (v!=0),"v");
1211
1212 icalproperty_set_owner((icalproperty*)impl,v);
1213 va_start(args,v);
1214 icalproperty_add_parameters(impl, args);
1215 va_end(args);
1216 return (icalproperty*)impl;
1217}
1218
1219/* OWNER */
1220icalproperty* icalproperty_new_owner(const char* v) {
1221 struct icalproperty_impl *impl = icalproperty_new_impl(ICAL_OWNER_PROPERTY); icalerror_check_arg_rz( (v!=0),"v");
1222
1223 icalproperty_set_owner((icalproperty*)impl,v);
1224 return (icalproperty*)impl;
1225}
1226
1227void icalproperty_set_owner(icalproperty* prop, const char* v){
1228 icalerror_check_arg_rv( (v!=0),"v");
1229
1230 icalerror_check_arg_rv( (prop!=0),"prop");
1231 icalproperty_set_value(prop,icalvalue_new_text(v));
1232}
1233const char* icalproperty_get_owner(const icalproperty* prop){
1234 icalerror_check_arg( (prop!=0),"prop");
1235 return icalvalue_get_text(icalproperty_get_value(prop));
1236}
1043icalproperty* icalproperty_vanew_percentcomplete(int v, ...){ 1237icalproperty* icalproperty_vanew_percentcomplete(int v, ...){
@@ -1051,2 +1245,3 @@ icalproperty* icalproperty_vanew_percentcomplete(int v, ...){
1051} 1245}
1246
1052/* PERCENT-COMPLETE */ 1247/* PERCENT-COMPLETE */
@@ -1063,3 +1258,3 @@ void icalproperty_set_percentcomplete(icalproperty* prop, int v){
1063} 1258}
1064int icalproperty_get_percentcomplete(icalproperty* prop){ 1259int icalproperty_get_percentcomplete(const icalproperty* prop){
1065 icalerror_check_arg( (prop!=0),"prop"); 1260 icalerror_check_arg( (prop!=0),"prop");
@@ -1076,2 +1271,3 @@ icalproperty* icalproperty_vanew_priority(int v, ...){
1076} 1271}
1272
1077/* PRIORITY */ 1273/* PRIORITY */
@@ -1088,3 +1284,3 @@ void icalproperty_set_priority(icalproperty* prop, int v){
1088} 1284}
1089int icalproperty_get_priority(icalproperty* prop){ 1285int icalproperty_get_priority(const icalproperty* prop){
1090 icalerror_check_arg( (prop!=0),"prop"); 1286 icalerror_check_arg( (prop!=0),"prop");
@@ -1102,2 +1298,3 @@ icalproperty* icalproperty_vanew_prodid(const char* v, ...){
1102} 1298}
1299
1103/* PRODID */ 1300/* PRODID */
@@ -1116,3 +1313,3 @@ void icalproperty_set_prodid(icalproperty* prop, const char* v){
1116} 1313}
1117const char* icalproperty_get_prodid(icalproperty* prop){ 1314const char* icalproperty_get_prodid(const icalproperty* prop){
1118 icalerror_check_arg( (prop!=0),"prop"); 1315 icalerror_check_arg( (prop!=0),"prop");
@@ -1130,2 +1327,3 @@ icalproperty* icalproperty_vanew_query(const char* v, ...){
1130} 1327}
1328
1131/* QUERY */ 1329/* QUERY */
@@ -1144,3 +1342,3 @@ void icalproperty_set_query(icalproperty* prop, const char* v){
1144} 1342}
1145const char* icalproperty_get_query(icalproperty* prop){ 1343const char* icalproperty_get_query(const icalproperty* prop){
1146 icalerror_check_arg( (prop!=0),"prop"); 1344 icalerror_check_arg( (prop!=0),"prop");
@@ -1158,2 +1356,3 @@ icalproperty* icalproperty_vanew_queryname(const char* v, ...){
1158} 1356}
1357
1159/* QUERYNAME */ 1358/* QUERYNAME */
@@ -1172,3 +1371,3 @@ void icalproperty_set_queryname(icalproperty* prop, const char* v){
1172} 1371}
1173const char* icalproperty_get_queryname(icalproperty* prop){ 1372const char* icalproperty_get_queryname(const icalproperty* prop){
1174 icalerror_check_arg( (prop!=0),"prop"); 1373 icalerror_check_arg( (prop!=0),"prop");
@@ -1185,2 +1384,3 @@ icalproperty* icalproperty_vanew_rdate(struct icaldatetimeperiodtype v, ...){
1185} 1384}
1385
1186/* RDATE */ 1386/* RDATE */
@@ -1197,3 +1397,3 @@ void icalproperty_set_rdate(icalproperty* prop, struct icaldatetimeperiodtype v)
1197} 1397}
1198struct icaldatetimeperiodtype icalproperty_get_rdate(icalproperty* prop){ 1398struct icaldatetimeperiodtype icalproperty_get_rdate(const icalproperty* prop){
1199 icalerror_check_arg( (prop!=0),"prop"); 1399 icalerror_check_arg( (prop!=0),"prop");
@@ -1210,2 +1410,3 @@ icalproperty* icalproperty_vanew_recurrenceid(struct icaltimetype v, ...){
1210} 1410}
1411
1211/* RECURRENCE-ID */ 1412/* RECURRENCE-ID */
@@ -1218,7 +1419,12 @@ icalproperty* icalproperty_new_recurrenceid(struct icaltimetype v) {
1218void icalproperty_set_recurrenceid(icalproperty* prop, struct icaltimetype v){ 1419void icalproperty_set_recurrenceid(icalproperty* prop, struct icaltimetype v){
1420 icalvalue *value;
1219 1421
1220 icalerror_check_arg_rv( (prop!=0),"prop"); 1422 icalerror_check_arg_rv( (prop!=0),"prop");
1221 icalproperty_set_value(prop,icalvalue_new_datetime(v)); 1423 if (v.is_date)
1424 value = icalvalue_new_date(v);
1425 else
1426 value = icalvalue_new_datetime(v);
1427 icalproperty_set_value(prop,value);
1222} 1428}
1223struct icaltimetype icalproperty_get_recurrenceid(icalproperty* prop){ 1429struct icaltimetype icalproperty_get_recurrenceid(const icalproperty* prop){
1224 icalerror_check_arg( (prop!=0),"prop"); 1430 icalerror_check_arg( (prop!=0),"prop");
@@ -1236,2 +1442,3 @@ icalproperty* icalproperty_vanew_relatedto(const char* v, ...){
1236} 1442}
1443
1237/* RELATED-TO */ 1444/* RELATED-TO */
@@ -1250,3 +1457,32 @@ void icalproperty_set_relatedto(icalproperty* prop, const char* v){
1250} 1457}
1251const char* icalproperty_get_relatedto(icalproperty* prop){ 1458const char* icalproperty_get_relatedto(const icalproperty* prop){
1459 icalerror_check_arg( (prop!=0),"prop");
1460 return icalvalue_get_text(icalproperty_get_value(prop));
1461}
1462icalproperty* icalproperty_vanew_relcalid(const char* v, ...){
1463 va_list args;
1464 struct icalproperty_impl *impl = icalproperty_new_impl(ICAL_RELCALID_PROPERTY); icalerror_check_arg_rz( (v!=0),"v");
1465
1466 icalproperty_set_relcalid((icalproperty*)impl,v);
1467 va_start(args,v);
1468 icalproperty_add_parameters(impl, args);
1469 va_end(args);
1470 return (icalproperty*)impl;
1471}
1472
1473/* RELCALID */
1474icalproperty* icalproperty_new_relcalid(const char* v) {
1475 struct icalproperty_impl *impl = icalproperty_new_impl(ICAL_RELCALID_PROPERTY); icalerror_check_arg_rz( (v!=0),"v");
1476
1477 icalproperty_set_relcalid((icalproperty*)impl,v);
1478 return (icalproperty*)impl;
1479}
1480
1481void icalproperty_set_relcalid(icalproperty* prop, const char* v){
1482 icalerror_check_arg_rv( (v!=0),"v");
1483
1484 icalerror_check_arg_rv( (prop!=0),"prop");
1485 icalproperty_set_value(prop,icalvalue_new_text(v));
1486}
1487const char* icalproperty_get_relcalid(const icalproperty* prop){
1252 icalerror_check_arg( (prop!=0),"prop"); 1488 icalerror_check_arg( (prop!=0),"prop");
@@ -1263,2 +1499,3 @@ icalproperty* icalproperty_vanew_repeat(int v, ...){
1263} 1499}
1500
1264/* REPEAT */ 1501/* REPEAT */
@@ -1275,3 +1512,3 @@ void icalproperty_set_repeat(icalproperty* prop, int v){
1275} 1512}
1276int icalproperty_get_repeat(icalproperty* prop){ 1513int icalproperty_get_repeat(const icalproperty* prop){
1277 icalerror_check_arg( (prop!=0),"prop"); 1514 icalerror_check_arg( (prop!=0),"prop");
@@ -1288,2 +1525,3 @@ icalproperty* icalproperty_vanew_requeststatus(struct icalreqstattype v, ...){
1288} 1525}
1526
1289/* REQUEST-STATUS */ 1527/* REQUEST-STATUS */
@@ -1300,3 +1538,3 @@ void icalproperty_set_requeststatus(icalproperty* prop, struct icalreqstattype v
1300} 1538}
1301struct icalreqstattype icalproperty_get_requeststatus(icalproperty* prop){ 1539struct icalreqstattype icalproperty_get_requeststatus(const icalproperty* prop){
1302 icalerror_check_arg( (prop!=0),"prop"); 1540 icalerror_check_arg( (prop!=0),"prop");
@@ -1314,2 +1552,3 @@ icalproperty* icalproperty_vanew_resources(const char* v, ...){
1314} 1552}
1553
1315/* RESOURCES */ 1554/* RESOURCES */
@@ -1328,3 +1567,3 @@ void icalproperty_set_resources(icalproperty* prop, const char* v){
1328} 1567}
1329const char* icalproperty_get_resources(icalproperty* prop){ 1568const char* icalproperty_get_resources(const icalproperty* prop){
1330 icalerror_check_arg( (prop!=0),"prop"); 1569 icalerror_check_arg( (prop!=0),"prop");
@@ -1341,2 +1580,3 @@ icalproperty* icalproperty_vanew_rrule(struct icalrecurrencetype v, ...){
1341} 1580}
1581
1342/* RRULE */ 1582/* RRULE */
@@ -1353,3 +1593,3 @@ void icalproperty_set_rrule(icalproperty* prop, struct icalrecurrencetype v){
1353} 1593}
1354struct icalrecurrencetype icalproperty_get_rrule(icalproperty* prop){ 1594struct icalrecurrencetype icalproperty_get_rrule(const icalproperty* prop){
1355 icalerror_check_arg( (prop!=0),"prop"); 1595 icalerror_check_arg( (prop!=0),"prop");
@@ -1367,2 +1607,3 @@ icalproperty* icalproperty_vanew_scope(const char* v, ...){
1367} 1607}
1608
1368/* SCOPE */ 1609/* SCOPE */
@@ -1381,3 +1622,3 @@ void icalproperty_set_scope(icalproperty* prop, const char* v){
1381} 1622}
1382const char* icalproperty_get_scope(icalproperty* prop){ 1623const char* icalproperty_get_scope(const icalproperty* prop){
1383 icalerror_check_arg( (prop!=0),"prop"); 1624 icalerror_check_arg( (prop!=0),"prop");
@@ -1394,2 +1635,3 @@ icalproperty* icalproperty_vanew_sequence(int v, ...){
1394} 1635}
1636
1395/* SEQUENCE */ 1637/* SEQUENCE */
@@ -1406,3 +1648,3 @@ void icalproperty_set_sequence(icalproperty* prop, int v){
1406} 1648}
1407int icalproperty_get_sequence(icalproperty* prop){ 1649int icalproperty_get_sequence(const icalproperty* prop){
1408 icalerror_check_arg( (prop!=0),"prop"); 1650 icalerror_check_arg( (prop!=0),"prop");
@@ -1419,2 +1661,3 @@ icalproperty* icalproperty_vanew_status(enum icalproperty_status v, ...){
1419} 1661}
1662
1420/* STATUS */ 1663/* STATUS */
@@ -1431,3 +1674,3 @@ void icalproperty_set_status(icalproperty* prop, enum icalproperty_status v){
1431} 1674}
1432enum icalproperty_status icalproperty_get_status(icalproperty* prop){ 1675enum icalproperty_status icalproperty_get_status(const icalproperty* prop){
1433 icalerror_check_arg( (prop!=0),"prop"); 1676 icalerror_check_arg( (prop!=0),"prop");
@@ -1445,2 +1688,3 @@ icalproperty* icalproperty_vanew_summary(const char* v, ...){
1445} 1688}
1689
1446/* SUMMARY */ 1690/* SUMMARY */
@@ -1459,3 +1703,3 @@ void icalproperty_set_summary(icalproperty* prop, const char* v){
1459} 1703}
1460const char* icalproperty_get_summary(icalproperty* prop){ 1704const char* icalproperty_get_summary(const icalproperty* prop){
1461 icalerror_check_arg( (prop!=0),"prop"); 1705 icalerror_check_arg( (prop!=0),"prop");
@@ -1473,2 +1717,3 @@ icalproperty* icalproperty_vanew_target(const char* v, ...){
1473} 1717}
1718
1474/* TARGET */ 1719/* TARGET */
@@ -1487,3 +1732,3 @@ void icalproperty_set_target(icalproperty* prop, const char* v){
1487} 1732}
1488const char* icalproperty_get_target(icalproperty* prop){ 1733const char* icalproperty_get_target(const icalproperty* prop){
1489 icalerror_check_arg( (prop!=0),"prop"); 1734 icalerror_check_arg( (prop!=0),"prop");
@@ -1491,6 +1736,5 @@ const char* icalproperty_get_target(icalproperty* prop){
1491} 1736}
1492icalproperty* icalproperty_vanew_transp(const char* v, ...){ 1737icalproperty* icalproperty_vanew_transp(enum icalproperty_transp v, ...){
1493 va_list args; 1738 va_list args;
1494 struct icalproperty_impl *impl = icalproperty_new_impl(ICAL_TRANSP_PROPERTY); icalerror_check_arg_rz( (v!=0),"v"); 1739 struct icalproperty_impl *impl = icalproperty_new_impl(ICAL_TRANSP_PROPERTY);
1495
1496 icalproperty_set_transp((icalproperty*)impl,v); 1740 icalproperty_set_transp((icalproperty*)impl,v);
@@ -1501,6 +1745,6 @@ icalproperty* icalproperty_vanew_transp(const char* v, ...){
1501} 1745}
1502/* TRANSP */
1503icalproperty* icalproperty_new_transp(const char* v) {
1504 struct icalproperty_impl *impl = icalproperty_new_impl(ICAL_TRANSP_PROPERTY); icalerror_check_arg_rz( (v!=0),"v");
1505 1746
1747/* TRANSP */
1748icalproperty* icalproperty_new_transp(enum icalproperty_transp v) {
1749 struct icalproperty_impl *impl = icalproperty_new_impl(ICAL_TRANSP_PROPERTY);
1506 icalproperty_set_transp((icalproperty*)impl,v); 1750 icalproperty_set_transp((icalproperty*)impl,v);
@@ -1509,11 +1753,10 @@ icalproperty* icalproperty_new_transp(const char* v) {
1509 1753
1510void icalproperty_set_transp(icalproperty* prop, const char* v){ 1754void icalproperty_set_transp(icalproperty* prop, enum icalproperty_transp v){
1511 icalerror_check_arg_rv( (v!=0),"v"); 1755
1512
1513 icalerror_check_arg_rv( (prop!=0),"prop"); 1756 icalerror_check_arg_rv( (prop!=0),"prop");
1514 icalproperty_set_value(prop,icalvalue_new_text(v)); 1757 icalproperty_set_value(prop,icalvalue_new_transp(v));
1515} 1758}
1516const char* icalproperty_get_transp(icalproperty* prop){ 1759enum icalproperty_transp icalproperty_get_transp(const icalproperty* prop){
1517 icalerror_check_arg( (prop!=0),"prop"); 1760 icalerror_check_arg( (prop!=0),"prop");
1518 return icalvalue_get_text(icalproperty_get_value(prop)); 1761 return icalvalue_get_transp(icalproperty_get_value(prop));
1519} 1762}
@@ -1528,2 +1771,3 @@ icalproperty* icalproperty_vanew_trigger(struct icaltriggertype v, ...){
1528} 1771}
1772
1529/* TRIGGER */ 1773/* TRIGGER */
@@ -1540,3 +1784,3 @@ void icalproperty_set_trigger(icalproperty* prop, struct icaltriggertype v){
1540} 1784}
1541struct icaltriggertype icalproperty_get_trigger(icalproperty* prop){ 1785struct icaltriggertype icalproperty_get_trigger(const icalproperty* prop){
1542 icalerror_check_arg( (prop!=0),"prop"); 1786 icalerror_check_arg( (prop!=0),"prop");
@@ -1554,2 +1798,3 @@ icalproperty* icalproperty_vanew_tzid(const char* v, ...){
1554} 1798}
1799
1555/* TZID */ 1800/* TZID */
@@ -1568,3 +1813,3 @@ void icalproperty_set_tzid(icalproperty* prop, const char* v){
1568} 1813}
1569const char* icalproperty_get_tzid(icalproperty* prop){ 1814const char* icalproperty_get_tzid(const icalproperty* prop){
1570 icalerror_check_arg( (prop!=0),"prop"); 1815 icalerror_check_arg( (prop!=0),"prop");
@@ -1582,2 +1827,3 @@ icalproperty* icalproperty_vanew_tzname(const char* v, ...){
1582} 1827}
1828
1583/* TZNAME */ 1829/* TZNAME */
@@ -1596,3 +1842,3 @@ void icalproperty_set_tzname(icalproperty* prop, const char* v){
1596} 1842}
1597const char* icalproperty_get_tzname(icalproperty* prop){ 1843const char* icalproperty_get_tzname(const icalproperty* prop){
1598 icalerror_check_arg( (prop!=0),"prop"); 1844 icalerror_check_arg( (prop!=0),"prop");
@@ -1609,2 +1855,3 @@ icalproperty* icalproperty_vanew_tzoffsetfrom(int v, ...){
1609} 1855}
1856
1610/* TZOFFSETFROM */ 1857/* TZOFFSETFROM */
@@ -1621,3 +1868,3 @@ void icalproperty_set_tzoffsetfrom(icalproperty* prop, int v){
1621} 1868}
1622int icalproperty_get_tzoffsetfrom(icalproperty* prop){ 1869int icalproperty_get_tzoffsetfrom(const icalproperty* prop){
1623 icalerror_check_arg( (prop!=0),"prop"); 1870 icalerror_check_arg( (prop!=0),"prop");
@@ -1634,2 +1881,3 @@ icalproperty* icalproperty_vanew_tzoffsetto(int v, ...){
1634} 1881}
1882
1635/* TZOFFSETTO */ 1883/* TZOFFSETTO */
@@ -1646,3 +1894,3 @@ void icalproperty_set_tzoffsetto(icalproperty* prop, int v){
1646} 1894}
1647int icalproperty_get_tzoffsetto(icalproperty* prop){ 1895int icalproperty_get_tzoffsetto(const icalproperty* prop){
1648 icalerror_check_arg( (prop!=0),"prop"); 1896 icalerror_check_arg( (prop!=0),"prop");
@@ -1660,2 +1908,3 @@ icalproperty* icalproperty_vanew_tzurl(const char* v, ...){
1660} 1908}
1909
1661/* TZURL */ 1910/* TZURL */
@@ -1674,3 +1923,3 @@ void icalproperty_set_tzurl(icalproperty* prop, const char* v){
1674} 1923}
1675const char* icalproperty_get_tzurl(icalproperty* prop){ 1924const char* icalproperty_get_tzurl(const icalproperty* prop){
1676 icalerror_check_arg( (prop!=0),"prop"); 1925 icalerror_check_arg( (prop!=0),"prop");
@@ -1688,2 +1937,3 @@ icalproperty* icalproperty_vanew_uid(const char* v, ...){
1688} 1937}
1938
1689/* UID */ 1939/* UID */
@@ -1702,3 +1952,3 @@ void icalproperty_set_uid(icalproperty* prop, const char* v){
1702} 1952}
1703const char* icalproperty_get_uid(icalproperty* prop){ 1953const char* icalproperty_get_uid(const icalproperty* prop){
1704 icalerror_check_arg( (prop!=0),"prop"); 1954 icalerror_check_arg( (prop!=0),"prop");
@@ -1716,2 +1966,3 @@ icalproperty* icalproperty_vanew_url(const char* v, ...){
1716} 1966}
1967
1717/* URL */ 1968/* URL */
@@ -1730,3 +1981,3 @@ void icalproperty_set_url(icalproperty* prop, const char* v){
1730} 1981}
1731const char* icalproperty_get_url(icalproperty* prop){ 1982const char* icalproperty_get_url(const icalproperty* prop){
1732 icalerror_check_arg( (prop!=0),"prop"); 1983 icalerror_check_arg( (prop!=0),"prop");
@@ -1744,2 +1995,3 @@ icalproperty* icalproperty_vanew_version(const char* v, ...){
1744} 1995}
1996
1745/* VERSION */ 1997/* VERSION */
@@ -1758,3 +2010,3 @@ void icalproperty_set_version(icalproperty* prop, const char* v){
1758} 2010}
1759const char* icalproperty_get_version(icalproperty* prop){ 2011const char* icalproperty_get_version(const icalproperty* prop){
1760 icalerror_check_arg( (prop!=0),"prop"); 2012 icalerror_check_arg( (prop!=0),"prop");
@@ -1772,2 +2024,3 @@ icalproperty* icalproperty_vanew_x(const char* v, ...){
1772} 2024}
2025
1773/* X */ 2026/* X */
@@ -1784,7 +2037,33 @@ void icalproperty_set_x(icalproperty* prop, const char* v){
1784 icalerror_check_arg_rv( (prop!=0),"prop"); 2037 icalerror_check_arg_rv( (prop!=0),"prop");
1785 icalproperty_set_value(prop,icalvalue_new_text(v)); 2038 icalproperty_set_value(prop,icalvalue_new_x(v));
1786} 2039}
1787const char* icalproperty_get_x(icalproperty* prop){ 2040const char* icalproperty_get_x(const icalproperty* prop){
1788 icalerror_check_arg( (prop!=0),"prop"); 2041 icalerror_check_arg( (prop!=0),"prop");
1789 return icalvalue_get_text(icalproperty_get_value(prop)); 2042 return icalvalue_get_x(icalproperty_get_value(prop));
2043}
2044icalproperty* icalproperty_vanew_xlicclass(enum icalproperty_xlicclass v, ...){
2045 va_list args;
2046 struct icalproperty_impl *impl = icalproperty_new_impl(ICAL_XLICCLASS_PROPERTY);
2047 icalproperty_set_xlicclass((icalproperty*)impl,v);
2048 va_start(args,v);
2049 icalproperty_add_parameters(impl, args);
2050 va_end(args);
2051 return (icalproperty*)impl;
2052}
2053
2054/* X-LIC-CLASS */
2055icalproperty* icalproperty_new_xlicclass(enum icalproperty_xlicclass v) {
2056 struct icalproperty_impl *impl = icalproperty_new_impl(ICAL_XLICCLASS_PROPERTY);
2057 icalproperty_set_xlicclass((icalproperty*)impl,v);
2058 return (icalproperty*)impl;
2059}
2060
2061void icalproperty_set_xlicclass(icalproperty* prop, enum icalproperty_xlicclass v){
2062
2063 icalerror_check_arg_rv( (prop!=0),"prop");
2064 icalproperty_set_value(prop,icalvalue_new_xlicclass(v));
2065}
2066enum icalproperty_xlicclass icalproperty_get_xlicclass(const icalproperty* prop){
2067 icalerror_check_arg( (prop!=0),"prop");
2068 return icalvalue_get_xlicclass(icalproperty_get_value(prop));
1790} 2069}
@@ -1800,2 +2079,3 @@ icalproperty* icalproperty_vanew_xlicclustercount(const char* v, ...){
1800} 2079}
2080
1801/* X-LIC-CLUSTERCOUNT */ 2081/* X-LIC-CLUSTERCOUNT */
@@ -1814,3 +2094,3 @@ void icalproperty_set_xlicclustercount(icalproperty* prop, const char* v){
1814} 2094}
1815const char* icalproperty_get_xlicclustercount(icalproperty* prop){ 2095const char* icalproperty_get_xlicclustercount(const icalproperty* prop){
1816 icalerror_check_arg( (prop!=0),"prop"); 2096 icalerror_check_arg( (prop!=0),"prop");
@@ -1828,2 +2108,3 @@ icalproperty* icalproperty_vanew_xlicerror(const char* v, ...){
1828} 2108}
2109
1829/* X-LIC-ERROR */ 2110/* X-LIC-ERROR */
@@ -1842,3 +2123,3 @@ void icalproperty_set_xlicerror(icalproperty* prop, const char* v){
1842} 2123}
1843const char* icalproperty_get_xlicerror(icalproperty* prop){ 2124const char* icalproperty_get_xlicerror(const icalproperty* prop){
1844 icalerror_check_arg( (prop!=0),"prop"); 2125 icalerror_check_arg( (prop!=0),"prop");
@@ -1856,2 +2137,3 @@ icalproperty* icalproperty_vanew_xlicmimecharset(const char* v, ...){
1856} 2137}
2138
1857/* X-LIC-MIMECHARSET */ 2139/* X-LIC-MIMECHARSET */
@@ -1870,3 +2152,3 @@ void icalproperty_set_xlicmimecharset(icalproperty* prop, const char* v){
1870} 2152}
1871const char* icalproperty_get_xlicmimecharset(icalproperty* prop){ 2153const char* icalproperty_get_xlicmimecharset(const icalproperty* prop){
1872 icalerror_check_arg( (prop!=0),"prop"); 2154 icalerror_check_arg( (prop!=0),"prop");
@@ -1884,2 +2166,3 @@ icalproperty* icalproperty_vanew_xlicmimecid(const char* v, ...){
1884} 2166}
2167
1885/* X-LIC-MIMECID */ 2168/* X-LIC-MIMECID */
@@ -1898,3 +2181,3 @@ void icalproperty_set_xlicmimecid(icalproperty* prop, const char* v){
1898} 2181}
1899const char* icalproperty_get_xlicmimecid(icalproperty* prop){ 2182const char* icalproperty_get_xlicmimecid(const icalproperty* prop){
1900 icalerror_check_arg( (prop!=0),"prop"); 2183 icalerror_check_arg( (prop!=0),"prop");
@@ -1912,2 +2195,3 @@ icalproperty* icalproperty_vanew_xlicmimecontenttype(const char* v, ...){
1912} 2195}
2196
1913/* X-LIC-MIMECONTENTTYPE */ 2197/* X-LIC-MIMECONTENTTYPE */
@@ -1926,3 +2210,3 @@ void icalproperty_set_xlicmimecontenttype(icalproperty* prop, const char* v){
1926} 2210}
1927const char* icalproperty_get_xlicmimecontenttype(icalproperty* prop){ 2211const char* icalproperty_get_xlicmimecontenttype(const icalproperty* prop){
1928 icalerror_check_arg( (prop!=0),"prop"); 2212 icalerror_check_arg( (prop!=0),"prop");
@@ -1940,2 +2224,3 @@ icalproperty* icalproperty_vanew_xlicmimeencoding(const char* v, ...){
1940} 2224}
2225
1941/* X-LIC-MIMEENCODING */ 2226/* X-LIC-MIMEENCODING */
@@ -1954,3 +2239,3 @@ void icalproperty_set_xlicmimeencoding(icalproperty* prop, const char* v){
1954} 2239}
1955const char* icalproperty_get_xlicmimeencoding(icalproperty* prop){ 2240const char* icalproperty_get_xlicmimeencoding(const icalproperty* prop){
1956 icalerror_check_arg( (prop!=0),"prop"); 2241 icalerror_check_arg( (prop!=0),"prop");
@@ -1968,2 +2253,3 @@ icalproperty* icalproperty_vanew_xlicmimefilename(const char* v, ...){
1968} 2253}
2254
1969/* X-LIC-MIMEFILENAME */ 2255/* X-LIC-MIMEFILENAME */
@@ -1982,3 +2268,3 @@ void icalproperty_set_xlicmimefilename(icalproperty* prop, const char* v){
1982} 2268}
1983const char* icalproperty_get_xlicmimefilename(icalproperty* prop){ 2269const char* icalproperty_get_xlicmimefilename(const icalproperty* prop){
1984 icalerror_check_arg( (prop!=0),"prop"); 2270 icalerror_check_arg( (prop!=0),"prop");
@@ -1996,2 +2282,3 @@ icalproperty* icalproperty_vanew_xlicmimeoptinfo(const char* v, ...){
1996} 2282}
2283
1997/* X-LIC-MIMEOPTINFO */ 2284/* X-LIC-MIMEOPTINFO */
@@ -2010,3 +2297,3 @@ void icalproperty_set_xlicmimeoptinfo(icalproperty* prop, const char* v){
2010} 2297}
2011const char* icalproperty_get_xlicmimeoptinfo(icalproperty* prop){ 2298const char* icalproperty_get_xlicmimeoptinfo(const icalproperty* prop){
2012 icalerror_check_arg( (prop!=0),"prop"); 2299 icalerror_check_arg( (prop!=0),"prop");
@@ -2014 +2301,214 @@ const char* icalproperty_get_xlicmimeoptinfo(icalproperty* prop){
2014} 2301}
2302
2303int icalproperty_kind_is_valid(const icalproperty_kind kind)
2304{
2305 int i = 0;
2306 do {
2307 if (property_map[i].kind == kind)
2308 return 1;
2309 } while (property_map[i++].kind != ICAL_NO_PROPERTY);
2310
2311 return 0;
2312}
2313
2314const char* icalproperty_kind_to_string(icalproperty_kind kind)
2315{
2316 int i;
2317
2318 for (i=0; property_map[i].kind != ICAL_NO_PROPERTY; i++) {
2319 if (property_map[i].kind == kind) {
2320 return property_map[i].name;
2321 }
2322 }
2323
2324 return 0;
2325
2326}
2327
2328
2329icalproperty_kind icalproperty_string_to_kind(const char* string)
2330{
2331 int i;
2332
2333 if (string ==0 ) {
2334 return ICAL_NO_PROPERTY;
2335 }
2336
2337
2338 for (i=0; property_map[i].kind != ICAL_NO_PROPERTY; i++) {
2339 if (strcmp(property_map[i].name, string) == 0) {
2340 return property_map[i].kind;
2341 }
2342 }
2343
2344 if(strncmp(string,"X-",2)==0){
2345 return ICAL_X_PROPERTY;
2346 }
2347
2348
2349 return ICAL_NO_PROPERTY;
2350}
2351
2352
2353icalproperty_kind icalproperty_value_kind_to_kind(icalvalue_kind kind)
2354{
2355 int i;
2356
2357 for (i=0; property_map[i].kind != ICAL_NO_PROPERTY; i++) {
2358 if ( property_map[i].value == kind ) {
2359 return property_map[i].kind;
2360 }
2361 }
2362
2363 return ICAL_NO_PROPERTY;
2364}
2365
2366
2367
2368icalvalue_kind icalproperty_kind_to_value_kind(icalproperty_kind kind)
2369{
2370 int i;
2371
2372 for (i=0; property_map[i].kind != ICAL_NO_PROPERTY; i++) {
2373 if ( property_map[i].kind == kind ) {
2374 return property_map[i].value;
2375 }
2376 }
2377
2378 return ICAL_NO_VALUE;
2379}
2380
2381
2382const char* icalproperty_enum_to_string(int e)
2383{
2384 icalerror_check_arg_rz(e >= ICALPROPERTY_FIRST_ENUM,"e");
2385 icalerror_check_arg_rz(e <= ICALPROPERTY_LAST_ENUM,"e");
2386
2387 return enum_map[e-ICALPROPERTY_FIRST_ENUM].str;
2388}
2389
2390int icalproperty_kind_and_string_to_enum(const int kind, const char* str)
2391{
2392 icalproperty_kind pkind;
2393 int i;
2394
2395 icalerror_check_arg_rz(str!=0,"str")
2396
2397 if ((pkind = icalproperty_value_kind_to_kind(kind)) == ICAL_NO_VALUE)
2398 return 0;
2399
2400 while(*str == ' '){
2401 str++;
2402 }
2403
2404 for (i=ICALPROPERTY_FIRST_ENUM; i != ICALPROPERTY_LAST_ENUM; i++) {
2405 if (enum_map[i-ICALPROPERTY_FIRST_ENUM].prop == pkind)
2406 break;
2407 }
2408 if (i == ICALPROPERTY_LAST_ENUM)
2409 return 0;
2410
2411 for (; i != ICALPROPERTY_LAST_ENUM; i++) {
2412 if ( strcmp(enum_map[i-ICALPROPERTY_FIRST_ENUM].str, str) == 0) {
2413 return enum_map[i-ICALPROPERTY_FIRST_ENUM].prop_enum;
2414 }
2415 }
2416
2417 return 0;
2418}
2419
2420/** @deprecated please use icalproperty_kind_and_string_to_enum instead */
2421int icalproperty_string_to_enum(const char* str)
2422{
2423 int i;
2424
2425 icalerror_check_arg_rz(str!=0,"str")
2426
2427 while(*str == ' '){
2428 str++;
2429 }
2430
2431 for (i=ICALPROPERTY_FIRST_ENUM; i != ICALPROPERTY_LAST_ENUM; i++) {
2432 if ( strcmp(enum_map[i-ICALPROPERTY_FIRST_ENUM].str, str) == 0) {
2433 return enum_map[i-ICALPROPERTY_FIRST_ENUM].prop_enum;
2434 }
2435 }
2436
2437 return 0;
2438}
2439
2440int icalproperty_enum_belongs_to_property(icalproperty_kind kind, int e)
2441{
2442 int i;
2443
2444
2445 for (i=ICALPROPERTY_FIRST_ENUM; i != ICALPROPERTY_LAST_ENUM; i++) {
2446 if(enum_map[i-ICALPROPERTY_FIRST_ENUM].prop_enum == e &&
2447 enum_map[i-ICALPROPERTY_FIRST_ENUM].prop == kind ){
2448 return 1;
2449 }
2450 }
2451
2452 return 0;
2453}
2454
2455
2456const char* icalproperty_method_to_string(icalproperty_method method)
2457{
2458 icalerror_check_arg_rz(method >= ICAL_METHOD_X,"method");
2459 icalerror_check_arg_rz(method <= ICAL_METHOD_NONE,"method");
2460
2461 return enum_map[method-ICALPROPERTY_FIRST_ENUM].str;
2462}
2463
2464icalproperty_method icalproperty_string_to_method(const char* str)
2465{
2466 int i;
2467
2468 icalerror_check_arg_rx(str!=0,"str",ICAL_METHOD_NONE)
2469
2470 while(*str == ' '){
2471 str++;
2472 }
2473
2474 for (i=ICAL_METHOD_X-ICALPROPERTY_FIRST_ENUM;
2475 i != ICAL_METHOD_NONE-ICALPROPERTY_FIRST_ENUM;
2476 i++) {
2477 if ( strcmp(enum_map[i].str, str) == 0) {
2478 return (icalproperty_method)enum_map[i].prop_enum;
2479 }
2480 }
2481
2482 return ICAL_METHOD_NONE;
2483}
2484
2485
2486const char* icalenum_status_to_string(icalproperty_status status)
2487{
2488 icalerror_check_arg_rz(status >= ICAL_STATUS_X,"status");
2489 icalerror_check_arg_rz(status <= ICAL_STATUS_NONE,"status");
2490
2491 return enum_map[status-ICALPROPERTY_FIRST_ENUM].str;
2492}
2493
2494icalproperty_status icalenum_string_to_status(const char* str)
2495{
2496 int i;
2497
2498 icalerror_check_arg_rx(str!=0,"str",ICAL_STATUS_NONE)
2499
2500 while(*str == ' '){
2501 str++;
2502 }
2503
2504 for (i=ICAL_STATUS_X-ICALPROPERTY_FIRST_ENUM;
2505 i != ICAL_STATUS_NONE-ICALPROPERTY_FIRST_ENUM;
2506 i++) {
2507 if ( strcmp(enum_map[i].str, str) == 0) {
2508 return (icalproperty_status)enum_map[i].prop_enum;
2509 }
2510 }
2511
2512 return ICAL_STATUS_NONE;
2513
2514}