Diffstat (limited to 'libical/src/libical/icalderivedproperty.c') (more/less context) (ignore whitespace changes)
-rw-r--r-- | libical/src/libical/icalderivedproperty.c | 1062 |
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 | |||
@@ -43,10 +43,9 @@ | |||
43 | #include <stdio.h> /* for printf */ | 43 | #include <stdio.h> /* for printf */ |
44 | #include <stdarg.h> /* for va_list, va_start, etc. */ | 44 | #include <stdarg.h> /* for va_list, va_start, etc. */ |
45 | 45 | ||
46 | #define TMP_BUF_SIZE 1024 | ||
47 | |||
48 | struct icalproperty_impl* | 46 | struct icalproperty_impl* |
49 | icalproperty_new_impl (icalproperty_kind kind); | 47 | icalproperty_new_impl (icalproperty_kind kind); |
48 | void icalproperty_add_parameters(struct icalproperty_impl *prop,va_list args); | ||
50 | 49 | ||
51 | /* This map associates the property kinds with the string | 50 | /* This map associates the property kinds with the string |
52 | representation of the property name and the kind of VALUE that the | 51 | representation of the property name and the kind of VALUE that the |
@@ -59,76 +58,6 @@ struct icalproperty_map { | |||
59 | 58 | ||
60 | }; | 59 | }; |
61 | 60 | ||
62 | extern struct icalproperty_map property_map[]; | ||
63 | extern void icalproperty_add_parameters(struct icalproperty_impl *prop,va_list args); | ||
64 | const 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 | |||
79 | icalproperty_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 | |||
103 | icalvalue_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 | |||
118 | icalvalue_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 |
133 | property that they are used in and the string representation of the | 62 | property that they are used in and the string representation of the |
134 | enumeration */ | 63 | enumeration */ |
@@ -139,127 +68,27 @@ struct icalproperty_enum_map { | |||
139 | const char* str; | 68 | const char* str; |
140 | }; | 69 | }; |
141 | 70 | ||
142 | extern struct icalproperty_enum_map enum_map[]; | ||
143 | |||
144 | |||
145 | const 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 | |||
153 | int 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 | |||
172 | int 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 | |||
188 | const 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 | |||
196 | icalproperty_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 | |||
218 | const 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 | |||
226 | icalproperty_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. */ | 72 | static struct icalproperty_map property_map[77] = { |
251 | static 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}, |
254 | {ICAL_ATTACH_PROPERTY,"ATTACH",ICAL_ATTACH_VALUE}, | 76 | {ICAL_ATTACH_PROPERTY,"ATTACH",ICAL_ATTACH_VALUE}, |
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}, |
260 | {ICAL_COMPLETED_PROPERTY,"COMPLETED",ICAL_DATETIME_VALUE}, | 85 | {ICAL_COMPLETED_PROPERTY,"COMPLETED",ICAL_DATETIME_VALUE}, |
261 | {ICAL_CONTACT_PROPERTY,"CONTACT",ICAL_TEXT_VALUE}, | 86 | {ICAL_CONTACT_PROPERTY,"CONTACT",ICAL_TEXT_VALUE}, |
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}, |
264 | {ICAL_DTEND_PROPERTY,"DTEND",ICAL_DATETIME_VALUE}, | 93 | {ICAL_DTEND_PROPERTY,"DTEND",ICAL_DATETIME_VALUE}, |
265 | {ICAL_DTSTAMP_PROPERTY,"DTSTAMP",ICAL_DATETIME_VALUE}, | 94 | {ICAL_DTSTAMP_PROPERTY,"DTSTAMP",ICAL_DATETIME_VALUE}, |
@@ -267,6 +96,7 @@ static struct icalproperty_map property_map[] = { | |||
267 | {ICAL_DUE_PROPERTY,"DUE",ICAL_DATETIME_VALUE}, | 96 | {ICAL_DUE_PROPERTY,"DUE",ICAL_DATETIME_VALUE}, |
268 | {ICAL_DURATION_PROPERTY,"DURATION",ICAL_DURATION_VALUE}, | 97 | {ICAL_DURATION_PROPERTY,"DURATION",ICAL_DURATION_VALUE}, |
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}, |
271 | {ICAL_FREEBUSY_PROPERTY,"FREEBUSY",ICAL_PERIOD_VALUE}, | 101 | {ICAL_FREEBUSY_PROPERTY,"FREEBUSY",ICAL_PERIOD_VALUE}, |
272 | {ICAL_GEO_PROPERTY,"GEO",ICAL_GEO_VALUE}, | 102 | {ICAL_GEO_PROPERTY,"GEO",ICAL_GEO_VALUE}, |
@@ -276,6 +106,7 @@ static struct icalproperty_map property_map[] = { | |||
276 | {ICAL_MAXRESULTSSIZE_PROPERTY,"MAXRESULTSSIZE",ICAL_INTEGER_VALUE}, | 106 | {ICAL_MAXRESULTSSIZE_PROPERTY,"MAXRESULTSSIZE",ICAL_INTEGER_VALUE}, |
277 | {ICAL_METHOD_PROPERTY,"METHOD",ICAL_METHOD_VALUE}, | 107 | {ICAL_METHOD_PROPERTY,"METHOD",ICAL_METHOD_VALUE}, |
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}, |
280 | {ICAL_PRIORITY_PROPERTY,"PRIORITY",ICAL_INTEGER_VALUE}, | 111 | {ICAL_PRIORITY_PROPERTY,"PRIORITY",ICAL_INTEGER_VALUE}, |
281 | {ICAL_PRODID_PROPERTY,"PRODID",ICAL_TEXT_VALUE}, | 112 | {ICAL_PRODID_PROPERTY,"PRODID",ICAL_TEXT_VALUE}, |
@@ -284,6 +115,7 @@ static struct icalproperty_map property_map[] = { | |||
284 | {ICAL_RDATE_PROPERTY,"RDATE",ICAL_DATETIMEPERIOD_VALUE}, | 115 | {ICAL_RDATE_PROPERTY,"RDATE",ICAL_DATETIMEPERIOD_VALUE}, |
285 | {ICAL_RECURRENCEID_PROPERTY,"RECURRENCE-ID",ICAL_DATETIME_VALUE}, | 116 | {ICAL_RECURRENCEID_PROPERTY,"RECURRENCE-ID",ICAL_DATETIME_VALUE}, |
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}, |
288 | {ICAL_REQUESTSTATUS_PROPERTY,"REQUEST-STATUS",ICAL_REQUESTSTATUS_VALUE}, | 120 | {ICAL_REQUESTSTATUS_PROPERTY,"REQUEST-STATUS",ICAL_REQUESTSTATUS_VALUE}, |
289 | {ICAL_RESOURCES_PROPERTY,"RESOURCES",ICAL_TEXT_VALUE}, | 121 | {ICAL_RESOURCES_PROPERTY,"RESOURCES",ICAL_TEXT_VALUE}, |
@@ -293,7 +125,7 @@ static struct icalproperty_map property_map[] = { | |||
293 | {ICAL_STATUS_PROPERTY,"STATUS",ICAL_STATUS_VALUE}, | 125 | {ICAL_STATUS_PROPERTY,"STATUS",ICAL_STATUS_VALUE}, |
294 | {ICAL_SUMMARY_PROPERTY,"SUMMARY",ICAL_TEXT_VALUE}, | 126 | {ICAL_SUMMARY_PROPERTY,"SUMMARY",ICAL_TEXT_VALUE}, |
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}, |
298 | {ICAL_TZID_PROPERTY,"TZID",ICAL_TEXT_VALUE}, | 130 | {ICAL_TZID_PROPERTY,"TZID",ICAL_TEXT_VALUE}, |
299 | {ICAL_TZNAME_PROPERTY,"TZNAME",ICAL_TEXT_VALUE}, | 131 | {ICAL_TZNAME_PROPERTY,"TZNAME",ICAL_TEXT_VALUE}, |
@@ -303,7 +135,8 @@ static struct icalproperty_map property_map[] = { | |||
303 | {ICAL_UID_PROPERTY,"UID",ICAL_TEXT_VALUE}, | 135 | {ICAL_UID_PROPERTY,"UID",ICAL_TEXT_VALUE}, |
304 | {ICAL_URL_PROPERTY,"URL",ICAL_URI_VALUE}, | 136 | {ICAL_URL_PROPERTY,"URL",ICAL_URI_VALUE}, |
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}, |
308 | {ICAL_XLICERROR_PROPERTY,"X-LIC-ERROR",ICAL_TEXT_VALUE}, | 141 | {ICAL_XLICERROR_PROPERTY,"X-LIC-ERROR",ICAL_TEXT_VALUE}, |
309 | {ICAL_XLICMIMECHARSET_PROPERTY,"X-LIC-MIMECHARSET",ICAL_STRING_VALUE}, | 142 | {ICAL_XLICMIMECHARSET_PROPERTY,"X-LIC-MIMECHARSET",ICAL_STRING_VALUE}, |
@@ -314,7 +147,7 @@ static struct icalproperty_map property_map[] = { | |||
314 | {ICAL_XLICMIMEOPTINFO_PROPERTY,"X-LIC-MIMEOPTINFO",ICAL_STRING_VALUE}, | 147 | {ICAL_XLICMIMEOPTINFO_PROPERTY,"X-LIC-MIMEOPTINFO",ICAL_STRING_VALUE}, |
315 | {ICAL_NO_PROPERTY,"",ICAL_NO_VALUE}}; | 148 | {ICAL_NO_PROPERTY,"",ICAL_NO_VALUE}}; |
316 | 149 | ||
317 | static struct icalproperty_enum_map enum_map[] = { | 150 | static struct icalproperty_enum_map enum_map[75] = { |
318 | {ICAL_ACTION_PROPERTY,ICAL_ACTION_X,"" }, /*10000*/ | 151 | {ICAL_ACTION_PROPERTY,ICAL_ACTION_X,"" }, /*10000*/ |
319 | {ICAL_ACTION_PROPERTY,ICAL_ACTION_AUDIO,"AUDIO" }, /*10001*/ | 152 | {ICAL_ACTION_PROPERTY,ICAL_ACTION_AUDIO,"AUDIO" }, /*10001*/ |
320 | {ICAL_ACTION_PROPERTY,ICAL_ACTION_DISPLAY,"DISPLAY" }, /*10002*/ | 153 | {ICAL_ACTION_PROPERTY,ICAL_ACTION_DISPLAY,"DISPLAY" }, /*10002*/ |
@@ -355,8 +188,39 @@ static struct icalproperty_enum_map enum_map[] = { | |||
355 | {ICAL_STATUS_PROPERTY,ICAL_STATUS_NONE,"" }, /*10037*/ | 188 | {ICAL_STATUS_PROPERTY,ICAL_STATUS_NONE,"" }, /*10037*/ |
356 | {ICAL_TRANSP_PROPERTY,ICAL_TRANSP_X,"" }, /*10038*/ | 189 | {ICAL_TRANSP_PROPERTY,ICAL_TRANSP_X,"" }, /*10038*/ |
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,""} |
361 | }; | 225 | }; |
362 | 226 | ||
@@ -369,6 +233,7 @@ icalproperty* icalproperty_vanew_action(enum icalproperty_action v, ...){ | |||
369 | va_end(args); | 233 | va_end(args); |
370 | return (icalproperty*)impl; | 234 | return (icalproperty*)impl; |
371 | } | 235 | } |
236 | |||
372 | /* ACTION */ | 237 | /* ACTION */ |
373 | icalproperty* icalproperty_new_action(enum icalproperty_action v) { | 238 | icalproperty* icalproperty_new_action(enum icalproperty_action v) { |
374 | struct icalproperty_impl *impl = icalproperty_new_impl(ICAL_ACTION_PROPERTY); | 239 | struct icalproperty_impl *impl = icalproperty_new_impl(ICAL_ACTION_PROPERTY); |
@@ -381,11 +246,40 @@ void icalproperty_set_action(icalproperty* prop, enum icalproperty_action v){ | |||
381 | icalerror_check_arg_rv( (prop!=0),"prop"); | 246 | icalerror_check_arg_rv( (prop!=0),"prop"); |
382 | icalproperty_set_value(prop,icalvalue_new_action(v)); | 247 | icalproperty_set_value(prop,icalvalue_new_action(v)); |
383 | } | 248 | } |
384 | enum icalproperty_action icalproperty_get_action(icalproperty* prop){ | 249 | enum icalproperty_action icalproperty_get_action(const icalproperty* prop){ |
385 | icalerror_check_arg( (prop!=0),"prop"); | 250 | icalerror_check_arg( (prop!=0),"prop"); |
386 | return icalvalue_get_action(icalproperty_get_value(prop)); | 251 | return icalvalue_get_action(icalproperty_get_value(prop)); |
387 | } | 252 | } |
388 | icalproperty* icalproperty_vanew_attach(struct icalattachtype* v, ...){ | 253 | icalproperty* 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 */ | ||
265 | icalproperty* 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 | |||
272 | void 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 | } | ||
278 | const char* icalproperty_get_allowconflict(const icalproperty* prop){ | ||
279 | icalerror_check_arg( (prop!=0),"prop"); | ||
280 | return icalvalue_get_text(icalproperty_get_value(prop)); | ||
281 | } | ||
282 | icalproperty* icalproperty_vanew_attach(icalattach * v, ...){ | ||
389 | va_list args; | 283 | va_list args; |
390 | struct icalproperty_impl *impl = icalproperty_new_impl(ICAL_ATTACH_PROPERTY); icalerror_check_arg_rz( (v!=0),"v"); | 284 | struct icalproperty_impl *impl = icalproperty_new_impl(ICAL_ATTACH_PROPERTY); icalerror_check_arg_rz( (v!=0),"v"); |
391 | 285 | ||
@@ -395,21 +289,22 @@ icalproperty* icalproperty_vanew_attach(struct icalattachtype* v, ...){ | |||
395 | va_end(args); | 289 | va_end(args); |
396 | return (icalproperty*)impl; | 290 | return (icalproperty*)impl; |
397 | } | 291 | } |
292 | |||
398 | /* ATTACH */ | 293 | /* ATTACH */ |
399 | icalproperty* icalproperty_new_attach(struct icalattachtype* v) { | 294 | icalproperty* 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"); |
401 | 296 | ||
402 | icalproperty_set_attach((icalproperty*)impl,v); | 297 | icalproperty_set_attach((icalproperty*)impl,v); |
403 | return (icalproperty*)impl; | 298 | return (icalproperty*)impl; |
404 | } | 299 | } |
405 | 300 | ||
406 | void icalproperty_set_attach(icalproperty* prop, struct icalattachtype* v){ | 301 | void icalproperty_set_attach(icalproperty* prop, icalattach * v){ |
407 | icalerror_check_arg_rv( (v!=0),"v"); | 302 | icalerror_check_arg_rv( (v!=0),"v"); |
408 | 303 | ||
409 | icalerror_check_arg_rv( (prop!=0),"prop"); | 304 | icalerror_check_arg_rv( (prop!=0),"prop"); |
410 | icalproperty_set_value(prop,icalvalue_new_attach(v)); | 305 | icalproperty_set_value(prop,icalvalue_new_attach(v)); |
411 | } | 306 | } |
412 | struct icalattachtype* icalproperty_get_attach(icalproperty* prop){ | 307 | icalattach * icalproperty_get_attach(const icalproperty* prop){ |
413 | icalerror_check_arg( (prop!=0),"prop"); | 308 | icalerror_check_arg( (prop!=0),"prop"); |
414 | return icalvalue_get_attach(icalproperty_get_value(prop)); | 309 | return icalvalue_get_attach(icalproperty_get_value(prop)); |
415 | } | 310 | } |
@@ -423,6 +318,7 @@ icalproperty* icalproperty_vanew_attendee(const char* v, ...){ | |||
423 | va_end(args); | 318 | va_end(args); |
424 | return (icalproperty*)impl; | 319 | return (icalproperty*)impl; |
425 | } | 320 | } |
321 | |||
426 | /* ATTENDEE */ | 322 | /* ATTENDEE */ |
427 | icalproperty* icalproperty_new_attendee(const char* v) { | 323 | icalproperty* icalproperty_new_attendee(const char* v) { |
428 | struct icalproperty_impl *impl = icalproperty_new_impl(ICAL_ATTENDEE_PROPERTY); icalerror_check_arg_rz( (v!=0),"v"); | 324 | struct icalproperty_impl *impl = icalproperty_new_impl(ICAL_ATTENDEE_PROPERTY); icalerror_check_arg_rz( (v!=0),"v"); |
@@ -437,10 +333,68 @@ void icalproperty_set_attendee(icalproperty* prop, const char* v){ | |||
437 | icalerror_check_arg_rv( (prop!=0),"prop"); | 333 | icalerror_check_arg_rv( (prop!=0),"prop"); |
438 | icalproperty_set_value(prop,icalvalue_new_caladdress(v)); | 334 | icalproperty_set_value(prop,icalvalue_new_caladdress(v)); |
439 | } | 335 | } |
440 | const char* icalproperty_get_attendee(icalproperty* prop){ | 336 | const char* icalproperty_get_attendee(const icalproperty* prop){ |
441 | icalerror_check_arg( (prop!=0),"prop"); | 337 | icalerror_check_arg( (prop!=0),"prop"); |
442 | return icalvalue_get_caladdress(icalproperty_get_value(prop)); | 338 | return icalvalue_get_caladdress(icalproperty_get_value(prop)); |
443 | } | 339 | } |
340 | icalproperty* 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 */ | ||
352 | icalproperty* 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 | |||
359 | void 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 | } | ||
365 | const char* icalproperty_get_calid(const icalproperty* prop){ | ||
366 | icalerror_check_arg( (prop!=0),"prop"); | ||
367 | return icalvalue_get_text(icalproperty_get_value(prop)); | ||
368 | } | ||
369 | icalproperty* 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 */ | ||
381 | icalproperty* 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 | |||
388 | void 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 | } | ||
394 | const char* icalproperty_get_calmaster(const icalproperty* prop){ | ||
395 | icalerror_check_arg( (prop!=0),"prop"); | ||
396 | return icalvalue_get_text(icalproperty_get_value(prop)); | ||
397 | } | ||
444 | icalproperty* icalproperty_vanew_calscale(const char* v, ...){ | 398 | icalproperty* icalproperty_vanew_calscale(const char* v, ...){ |
445 | va_list args; | 399 | va_list args; |
446 | struct icalproperty_impl *impl = icalproperty_new_impl(ICAL_CALSCALE_PROPERTY); icalerror_check_arg_rz( (v!=0),"v"); | 400 | struct icalproperty_impl *impl = icalproperty_new_impl(ICAL_CALSCALE_PROPERTY); icalerror_check_arg_rz( (v!=0),"v"); |
@@ -451,6 +405,7 @@ icalproperty* icalproperty_vanew_calscale(const char* v, ...){ | |||
451 | va_end(args); | 405 | va_end(args); |
452 | return (icalproperty*)impl; | 406 | return (icalproperty*)impl; |
453 | } | 407 | } |
408 | |||
454 | /* CALSCALE */ | 409 | /* CALSCALE */ |
455 | icalproperty* icalproperty_new_calscale(const char* v) { | 410 | icalproperty* icalproperty_new_calscale(const char* v) { |
456 | struct icalproperty_impl *impl = icalproperty_new_impl(ICAL_CALSCALE_PROPERTY); icalerror_check_arg_rz( (v!=0),"v"); | 411 | struct icalproperty_impl *impl = icalproperty_new_impl(ICAL_CALSCALE_PROPERTY); icalerror_check_arg_rz( (v!=0),"v"); |
@@ -465,7 +420,36 @@ void icalproperty_set_calscale(icalproperty* prop, const char* v){ | |||
465 | icalerror_check_arg_rv( (prop!=0),"prop"); | 420 | icalerror_check_arg_rv( (prop!=0),"prop"); |
466 | icalproperty_set_value(prop,icalvalue_new_text(v)); | 421 | icalproperty_set_value(prop,icalvalue_new_text(v)); |
467 | } | 422 | } |
468 | const char* icalproperty_get_calscale(icalproperty* prop){ | 423 | const char* icalproperty_get_calscale(const icalproperty* prop){ |
424 | icalerror_check_arg( (prop!=0),"prop"); | ||
425 | return icalvalue_get_text(icalproperty_get_value(prop)); | ||
426 | } | ||
427 | icalproperty* 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 */ | ||
439 | icalproperty* 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 | |||
446 | void 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 | } | ||
452 | const char* icalproperty_get_carid(const icalproperty* prop){ | ||
469 | icalerror_check_arg( (prop!=0),"prop"); | 453 | icalerror_check_arg( (prop!=0),"prop"); |
470 | return icalvalue_get_text(icalproperty_get_value(prop)); | 454 | return icalvalue_get_text(icalproperty_get_value(prop)); |
471 | } | 455 | } |
@@ -479,6 +463,7 @@ icalproperty* icalproperty_vanew_categories(const char* v, ...){ | |||
479 | va_end(args); | 463 | va_end(args); |
480 | return (icalproperty*)impl; | 464 | return (icalproperty*)impl; |
481 | } | 465 | } |
466 | |||
482 | /* CATEGORIES */ | 467 | /* CATEGORIES */ |
483 | icalproperty* icalproperty_new_categories(const char* v) { | 468 | icalproperty* icalproperty_new_categories(const char* v) { |
484 | struct icalproperty_impl *impl = icalproperty_new_impl(ICAL_CATEGORIES_PROPERTY); icalerror_check_arg_rz( (v!=0),"v"); | 469 | struct icalproperty_impl *impl = icalproperty_new_impl(ICAL_CATEGORIES_PROPERTY); icalerror_check_arg_rz( (v!=0),"v"); |
@@ -493,37 +478,35 @@ void icalproperty_set_categories(icalproperty* prop, const char* v){ | |||
493 | icalerror_check_arg_rv( (prop!=0),"prop"); | 478 | icalerror_check_arg_rv( (prop!=0),"prop"); |
494 | icalproperty_set_value(prop,icalvalue_new_text(v)); | 479 | icalproperty_set_value(prop,icalvalue_new_text(v)); |
495 | } | 480 | } |
496 | const char* icalproperty_get_categories(icalproperty* prop){ | 481 | const char* icalproperty_get_categories(const icalproperty* prop){ |
497 | icalerror_check_arg( (prop!=0),"prop"); | 482 | icalerror_check_arg( (prop!=0),"prop"); |
498 | return icalvalue_get_text(icalproperty_get_value(prop)); | 483 | return icalvalue_get_text(icalproperty_get_value(prop)); |
499 | } | 484 | } |
500 | icalproperty* icalproperty_vanew_class(const char* v, ...){ | 485 | icalproperty* 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); |
505 | va_start(args,v); | 489 | va_start(args,v); |
506 | icalproperty_add_parameters(impl, args); | 490 | icalproperty_add_parameters(impl, args); |
507 | va_end(args); | 491 | va_end(args); |
508 | return (icalproperty*)impl; | 492 | return (icalproperty*)impl; |
509 | } | 493 | } |
510 | /* CLASS */ | ||
511 | icalproperty* 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 */ | ||
496 | icalproperty* 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); |
515 | return (icalproperty*)impl; | 499 | return (icalproperty*)impl; |
516 | } | 500 | } |
517 | 501 | ||
518 | void icalproperty_set_class(icalproperty* prop, const char* v){ | 502 | void 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 | } |
524 | const char* icalproperty_get_class(icalproperty* prop){ | 507 | enum 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 | } |
528 | icalproperty* icalproperty_vanew_comment(const char* v, ...){ | 511 | icalproperty* icalproperty_vanew_comment(const char* v, ...){ |
529 | va_list args; | 512 | va_list args; |
@@ -535,6 +518,7 @@ icalproperty* icalproperty_vanew_comment(const char* v, ...){ | |||
535 | va_end(args); | 518 | va_end(args); |
536 | return (icalproperty*)impl; | 519 | return (icalproperty*)impl; |
537 | } | 520 | } |
521 | |||
538 | /* COMMENT */ | 522 | /* COMMENT */ |
539 | icalproperty* icalproperty_new_comment(const char* v) { | 523 | icalproperty* icalproperty_new_comment(const char* v) { |
540 | struct icalproperty_impl *impl = icalproperty_new_impl(ICAL_COMMENT_PROPERTY); icalerror_check_arg_rz( (v!=0),"v"); | 524 | struct icalproperty_impl *impl = icalproperty_new_impl(ICAL_COMMENT_PROPERTY); icalerror_check_arg_rz( (v!=0),"v"); |
@@ -549,7 +533,7 @@ void icalproperty_set_comment(icalproperty* prop, const char* v){ | |||
549 | icalerror_check_arg_rv( (prop!=0),"prop"); | 533 | icalerror_check_arg_rv( (prop!=0),"prop"); |
550 | icalproperty_set_value(prop,icalvalue_new_text(v)); | 534 | icalproperty_set_value(prop,icalvalue_new_text(v)); |
551 | } | 535 | } |
552 | const char* icalproperty_get_comment(icalproperty* prop){ | 536 | const char* icalproperty_get_comment(const icalproperty* prop){ |
553 | icalerror_check_arg( (prop!=0),"prop"); | 537 | icalerror_check_arg( (prop!=0),"prop"); |
554 | return icalvalue_get_text(icalproperty_get_value(prop)); | 538 | return icalvalue_get_text(icalproperty_get_value(prop)); |
555 | } | 539 | } |
@@ -562,6 +546,7 @@ icalproperty* icalproperty_vanew_completed(struct icaltimetype v, ...){ | |||
562 | va_end(args); | 546 | va_end(args); |
563 | return (icalproperty*)impl; | 547 | return (icalproperty*)impl; |
564 | } | 548 | } |
549 | |||
565 | /* COMPLETED */ | 550 | /* COMPLETED */ |
566 | icalproperty* icalproperty_new_completed(struct icaltimetype v) { | 551 | icalproperty* icalproperty_new_completed(struct icaltimetype v) { |
567 | struct icalproperty_impl *impl = icalproperty_new_impl(ICAL_COMPLETED_PROPERTY); | 552 | struct icalproperty_impl *impl = icalproperty_new_impl(ICAL_COMPLETED_PROPERTY); |
@@ -574,7 +559,7 @@ void icalproperty_set_completed(icalproperty* prop, struct icaltimetype v){ | |||
574 | icalerror_check_arg_rv( (prop!=0),"prop"); | 559 | icalerror_check_arg_rv( (prop!=0),"prop"); |
575 | icalproperty_set_value(prop,icalvalue_new_datetime(v)); | 560 | icalproperty_set_value(prop,icalvalue_new_datetime(v)); |
576 | } | 561 | } |
577 | struct icaltimetype icalproperty_get_completed(icalproperty* prop){ | 562 | struct icaltimetype icalproperty_get_completed(const icalproperty* prop){ |
578 | icalerror_check_arg( (prop!=0),"prop"); | 563 | icalerror_check_arg( (prop!=0),"prop"); |
579 | return icalvalue_get_datetime(icalproperty_get_value(prop)); | 564 | return icalvalue_get_datetime(icalproperty_get_value(prop)); |
580 | } | 565 | } |
@@ -588,6 +573,7 @@ icalproperty* icalproperty_vanew_contact(const char* v, ...){ | |||
588 | va_end(args); | 573 | va_end(args); |
589 | return (icalproperty*)impl; | 574 | return (icalproperty*)impl; |
590 | } | 575 | } |
576 | |||
591 | /* CONTACT */ | 577 | /* CONTACT */ |
592 | icalproperty* icalproperty_new_contact(const char* v) { | 578 | icalproperty* icalproperty_new_contact(const char* v) { |
593 | struct icalproperty_impl *impl = icalproperty_new_impl(ICAL_CONTACT_PROPERTY); icalerror_check_arg_rz( (v!=0),"v"); | 579 | struct icalproperty_impl *impl = icalproperty_new_impl(ICAL_CONTACT_PROPERTY); icalerror_check_arg_rz( (v!=0),"v"); |
@@ -602,7 +588,7 @@ void icalproperty_set_contact(icalproperty* prop, const char* v){ | |||
602 | icalerror_check_arg_rv( (prop!=0),"prop"); | 588 | icalerror_check_arg_rv( (prop!=0),"prop"); |
603 | icalproperty_set_value(prop,icalvalue_new_text(v)); | 589 | icalproperty_set_value(prop,icalvalue_new_text(v)); |
604 | } | 590 | } |
605 | const char* icalproperty_get_contact(icalproperty* prop){ | 591 | const char* icalproperty_get_contact(const icalproperty* prop){ |
606 | icalerror_check_arg( (prop!=0),"prop"); | 592 | icalerror_check_arg( (prop!=0),"prop"); |
607 | return icalvalue_get_text(icalproperty_get_value(prop)); | 593 | return icalvalue_get_text(icalproperty_get_value(prop)); |
608 | } | 594 | } |
@@ -615,6 +601,7 @@ icalproperty* icalproperty_vanew_created(struct icaltimetype v, ...){ | |||
615 | va_end(args); | 601 | va_end(args); |
616 | return (icalproperty*)impl; | 602 | return (icalproperty*)impl; |
617 | } | 603 | } |
604 | |||
618 | /* CREATED */ | 605 | /* CREATED */ |
619 | icalproperty* icalproperty_new_created(struct icaltimetype v) { | 606 | icalproperty* icalproperty_new_created(struct icaltimetype v) { |
620 | struct icalproperty_impl *impl = icalproperty_new_impl(ICAL_CREATED_PROPERTY); | 607 | struct icalproperty_impl *impl = icalproperty_new_impl(ICAL_CREATED_PROPERTY); |
@@ -627,10 +614,126 @@ void icalproperty_set_created(icalproperty* prop, struct icaltimetype v){ | |||
627 | icalerror_check_arg_rv( (prop!=0),"prop"); | 614 | icalerror_check_arg_rv( (prop!=0),"prop"); |
628 | icalproperty_set_value(prop,icalvalue_new_datetime(v)); | 615 | icalproperty_set_value(prop,icalvalue_new_datetime(v)); |
629 | } | 616 | } |
630 | struct icaltimetype icalproperty_get_created(icalproperty* prop){ | 617 | struct icaltimetype icalproperty_get_created(const icalproperty* prop){ |
631 | icalerror_check_arg( (prop!=0),"prop"); | 618 | icalerror_check_arg( (prop!=0),"prop"); |
632 | return icalvalue_get_datetime(icalproperty_get_value(prop)); | 619 | return icalvalue_get_datetime(icalproperty_get_value(prop)); |
633 | } | 620 | } |
621 | icalproperty* 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 */ | ||
633 | icalproperty* 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 | |||
640 | void 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 | } | ||
646 | const char* icalproperty_get_decreed(const icalproperty* prop){ | ||
647 | icalerror_check_arg( (prop!=0),"prop"); | ||
648 | return icalvalue_get_text(icalproperty_get_value(prop)); | ||
649 | } | ||
650 | icalproperty* 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 */ | ||
662 | icalproperty* 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 | |||
669 | void 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 | } | ||
675 | const char* icalproperty_get_defaultcharset(const icalproperty* prop){ | ||
676 | icalerror_check_arg( (prop!=0),"prop"); | ||
677 | return icalvalue_get_text(icalproperty_get_value(prop)); | ||
678 | } | ||
679 | icalproperty* 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 */ | ||
691 | icalproperty* 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 | |||
698 | void 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 | } | ||
704 | const char* icalproperty_get_defaultlocale(const icalproperty* prop){ | ||
705 | icalerror_check_arg( (prop!=0),"prop"); | ||
706 | return icalvalue_get_text(icalproperty_get_value(prop)); | ||
707 | } | ||
708 | icalproperty* 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 */ | ||
720 | icalproperty* 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 | |||
727 | void 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 | } | ||
733 | const char* icalproperty_get_defaulttzid(const icalproperty* prop){ | ||
734 | icalerror_check_arg( (prop!=0),"prop"); | ||
735 | return icalvalue_get_text(icalproperty_get_value(prop)); | ||
736 | } | ||
634 | icalproperty* icalproperty_vanew_description(const char* v, ...){ | 737 | icalproperty* icalproperty_vanew_description(const char* v, ...){ |
635 | va_list args; | 738 | va_list args; |
636 | struct icalproperty_impl *impl = icalproperty_new_impl(ICAL_DESCRIPTION_PROPERTY); icalerror_check_arg_rz( (v!=0),"v"); | 739 | struct icalproperty_impl *impl = icalproperty_new_impl(ICAL_DESCRIPTION_PROPERTY); icalerror_check_arg_rz( (v!=0),"v"); |
@@ -641,6 +744,7 @@ icalproperty* icalproperty_vanew_description(const char* v, ...){ | |||
641 | va_end(args); | 744 | va_end(args); |
642 | return (icalproperty*)impl; | 745 | return (icalproperty*)impl; |
643 | } | 746 | } |
747 | |||
644 | /* DESCRIPTION */ | 748 | /* DESCRIPTION */ |
645 | icalproperty* icalproperty_new_description(const char* v) { | 749 | icalproperty* icalproperty_new_description(const char* v) { |
646 | struct icalproperty_impl *impl = icalproperty_new_impl(ICAL_DESCRIPTION_PROPERTY); icalerror_check_arg_rz( (v!=0),"v"); | 750 | struct icalproperty_impl *impl = icalproperty_new_impl(ICAL_DESCRIPTION_PROPERTY); icalerror_check_arg_rz( (v!=0),"v"); |
@@ -655,7 +759,7 @@ void icalproperty_set_description(icalproperty* prop, const char* v){ | |||
655 | icalerror_check_arg_rv( (prop!=0),"prop"); | 759 | icalerror_check_arg_rv( (prop!=0),"prop"); |
656 | icalproperty_set_value(prop,icalvalue_new_text(v)); | 760 | icalproperty_set_value(prop,icalvalue_new_text(v)); |
657 | } | 761 | } |
658 | const char* icalproperty_get_description(icalproperty* prop){ | 762 | const char* icalproperty_get_description(const icalproperty* prop){ |
659 | icalerror_check_arg( (prop!=0),"prop"); | 763 | icalerror_check_arg( (prop!=0),"prop"); |
660 | return icalvalue_get_text(icalproperty_get_value(prop)); | 764 | return icalvalue_get_text(icalproperty_get_value(prop)); |
661 | } | 765 | } |
@@ -668,6 +772,7 @@ icalproperty* icalproperty_vanew_dtend(struct icaltimetype v, ...){ | |||
668 | va_end(args); | 772 | va_end(args); |
669 | return (icalproperty*)impl; | 773 | return (icalproperty*)impl; |
670 | } | 774 | } |
775 | |||
671 | /* DTEND */ | 776 | /* DTEND */ |
672 | icalproperty* icalproperty_new_dtend(struct icaltimetype v) { | 777 | icalproperty* icalproperty_new_dtend(struct icaltimetype v) { |
673 | struct icalproperty_impl *impl = icalproperty_new_impl(ICAL_DTEND_PROPERTY); | 778 | struct icalproperty_impl *impl = icalproperty_new_impl(ICAL_DTEND_PROPERTY); |
@@ -676,11 +781,16 @@ icalproperty* icalproperty_new_dtend(struct icaltimetype v) { | |||
676 | } | 781 | } |
677 | 782 | ||
678 | void icalproperty_set_dtend(icalproperty* prop, struct icaltimetype v){ | 783 | void 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 | } |
683 | struct icaltimetype icalproperty_get_dtend(icalproperty* prop){ | 793 | struct icaltimetype icalproperty_get_dtend(const icalproperty* prop){ |
684 | icalerror_check_arg( (prop!=0),"prop"); | 794 | icalerror_check_arg( (prop!=0),"prop"); |
685 | return icalvalue_get_datetime(icalproperty_get_value(prop)); | 795 | return icalvalue_get_datetime(icalproperty_get_value(prop)); |
686 | } | 796 | } |
@@ -693,6 +803,7 @@ icalproperty* icalproperty_vanew_dtstamp(struct icaltimetype v, ...){ | |||
693 | va_end(args); | 803 | va_end(args); |
694 | return (icalproperty*)impl; | 804 | return (icalproperty*)impl; |
695 | } | 805 | } |
806 | |||
696 | /* DTSTAMP */ | 807 | /* DTSTAMP */ |
697 | icalproperty* icalproperty_new_dtstamp(struct icaltimetype v) { | 808 | icalproperty* icalproperty_new_dtstamp(struct icaltimetype v) { |
698 | struct icalproperty_impl *impl = icalproperty_new_impl(ICAL_DTSTAMP_PROPERTY); | 809 | struct icalproperty_impl *impl = icalproperty_new_impl(ICAL_DTSTAMP_PROPERTY); |
@@ -705,7 +816,7 @@ void icalproperty_set_dtstamp(icalproperty* prop, struct icaltimetype v){ | |||
705 | icalerror_check_arg_rv( (prop!=0),"prop"); | 816 | icalerror_check_arg_rv( (prop!=0),"prop"); |
706 | icalproperty_set_value(prop,icalvalue_new_datetime(v)); | 817 | icalproperty_set_value(prop,icalvalue_new_datetime(v)); |
707 | } | 818 | } |
708 | struct icaltimetype icalproperty_get_dtstamp(icalproperty* prop){ | 819 | struct icaltimetype icalproperty_get_dtstamp(const icalproperty* prop){ |
709 | icalerror_check_arg( (prop!=0),"prop"); | 820 | icalerror_check_arg( (prop!=0),"prop"); |
710 | return icalvalue_get_datetime(icalproperty_get_value(prop)); | 821 | return icalvalue_get_datetime(icalproperty_get_value(prop)); |
711 | } | 822 | } |
@@ -718,6 +829,7 @@ icalproperty* icalproperty_vanew_dtstart(struct icaltimetype v, ...){ | |||
718 | va_end(args); | 829 | va_end(args); |
719 | return (icalproperty*)impl; | 830 | return (icalproperty*)impl; |
720 | } | 831 | } |
832 | |||
721 | /* DTSTART */ | 833 | /* DTSTART */ |
722 | icalproperty* icalproperty_new_dtstart(struct icaltimetype v) { | 834 | icalproperty* icalproperty_new_dtstart(struct icaltimetype v) { |
723 | struct icalproperty_impl *impl = icalproperty_new_impl(ICAL_DTSTART_PROPERTY); | 835 | struct icalproperty_impl *impl = icalproperty_new_impl(ICAL_DTSTART_PROPERTY); |
@@ -726,11 +838,16 @@ icalproperty* icalproperty_new_dtstart(struct icaltimetype v) { | |||
726 | } | 838 | } |
727 | 839 | ||
728 | void icalproperty_set_dtstart(icalproperty* prop, struct icaltimetype v){ | 840 | void 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 | } |
733 | struct icaltimetype icalproperty_get_dtstart(icalproperty* prop){ | 850 | struct icaltimetype icalproperty_get_dtstart(const icalproperty* prop){ |
734 | icalerror_check_arg( (prop!=0),"prop"); | 851 | icalerror_check_arg( (prop!=0),"prop"); |
735 | return icalvalue_get_datetime(icalproperty_get_value(prop)); | 852 | return icalvalue_get_datetime(icalproperty_get_value(prop)); |
736 | } | 853 | } |
@@ -743,6 +860,7 @@ icalproperty* icalproperty_vanew_due(struct icaltimetype v, ...){ | |||
743 | va_end(args); | 860 | va_end(args); |
744 | return (icalproperty*)impl; | 861 | return (icalproperty*)impl; |
745 | } | 862 | } |
863 | |||
746 | /* DUE */ | 864 | /* DUE */ |
747 | icalproperty* icalproperty_new_due(struct icaltimetype v) { | 865 | icalproperty* icalproperty_new_due(struct icaltimetype v) { |
748 | struct icalproperty_impl *impl = icalproperty_new_impl(ICAL_DUE_PROPERTY); | 866 | struct icalproperty_impl *impl = icalproperty_new_impl(ICAL_DUE_PROPERTY); |
@@ -751,11 +869,16 @@ icalproperty* icalproperty_new_due(struct icaltimetype v) { | |||
751 | } | 869 | } |
752 | 870 | ||
753 | void icalproperty_set_due(icalproperty* prop, struct icaltimetype v){ | 871 | void 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 | } |
758 | struct icaltimetype icalproperty_get_due(icalproperty* prop){ | 881 | struct icaltimetype icalproperty_get_due(const icalproperty* prop){ |
759 | icalerror_check_arg( (prop!=0),"prop"); | 882 | icalerror_check_arg( (prop!=0),"prop"); |
760 | return icalvalue_get_datetime(icalproperty_get_value(prop)); | 883 | return icalvalue_get_datetime(icalproperty_get_value(prop)); |
761 | } | 884 | } |
@@ -768,6 +891,7 @@ icalproperty* icalproperty_vanew_duration(struct icaldurationtype v, ...){ | |||
768 | va_end(args); | 891 | va_end(args); |
769 | return (icalproperty*)impl; | 892 | return (icalproperty*)impl; |
770 | } | 893 | } |
894 | |||
771 | /* DURATION */ | 895 | /* DURATION */ |
772 | icalproperty* icalproperty_new_duration(struct icaldurationtype v) { | 896 | icalproperty* icalproperty_new_duration(struct icaldurationtype v) { |
773 | struct icalproperty_impl *impl = icalproperty_new_impl(ICAL_DURATION_PROPERTY); | 897 | struct icalproperty_impl *impl = icalproperty_new_impl(ICAL_DURATION_PROPERTY); |
@@ -780,7 +904,7 @@ void icalproperty_set_duration(icalproperty* prop, struct icaldurationtype v){ | |||
780 | icalerror_check_arg_rv( (prop!=0),"prop"); | 904 | icalerror_check_arg_rv( (prop!=0),"prop"); |
781 | icalproperty_set_value(prop,icalvalue_new_duration(v)); | 905 | icalproperty_set_value(prop,icalvalue_new_duration(v)); |
782 | } | 906 | } |
783 | struct icaldurationtype icalproperty_get_duration(icalproperty* prop){ | 907 | struct icaldurationtype icalproperty_get_duration(const icalproperty* prop){ |
784 | icalerror_check_arg( (prop!=0),"prop"); | 908 | icalerror_check_arg( (prop!=0),"prop"); |
785 | return icalvalue_get_duration(icalproperty_get_value(prop)); | 909 | return icalvalue_get_duration(icalproperty_get_value(prop)); |
786 | } | 910 | } |
@@ -793,6 +917,7 @@ icalproperty* icalproperty_vanew_exdate(struct icaltimetype v, ...){ | |||
793 | va_end(args); | 917 | va_end(args); |
794 | return (icalproperty*)impl; | 918 | return (icalproperty*)impl; |
795 | } | 919 | } |
920 | |||
796 | /* EXDATE */ | 921 | /* EXDATE */ |
797 | icalproperty* icalproperty_new_exdate(struct icaltimetype v) { | 922 | icalproperty* icalproperty_new_exdate(struct icaltimetype v) { |
798 | struct icalproperty_impl *impl = icalproperty_new_impl(ICAL_EXDATE_PROPERTY); | 923 | struct icalproperty_impl *impl = icalproperty_new_impl(ICAL_EXDATE_PROPERTY); |
@@ -801,14 +926,45 @@ icalproperty* icalproperty_new_exdate(struct icaltimetype v) { | |||
801 | } | 926 | } |
802 | 927 | ||
803 | void icalproperty_set_exdate(icalproperty* prop, struct icaltimetype v){ | 928 | void 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 | } |
808 | struct icaltimetype icalproperty_get_exdate(icalproperty* prop){ | 938 | struct icaltimetype icalproperty_get_exdate(const icalproperty* prop){ |
809 | icalerror_check_arg( (prop!=0),"prop"); | 939 | icalerror_check_arg( (prop!=0),"prop"); |
810 | return icalvalue_get_datetime(icalproperty_get_value(prop)); | 940 | return icalvalue_get_datetime(icalproperty_get_value(prop)); |
811 | } | 941 | } |
942 | icalproperty* 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 */ | ||
953 | icalproperty* 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 | |||
959 | void 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 | } | ||
964 | int icalproperty_get_expand(const icalproperty* prop){ | ||
965 | icalerror_check_arg( (prop!=0),"prop"); | ||
966 | return icalvalue_get_integer(icalproperty_get_value(prop)); | ||
967 | } | ||
812 | icalproperty* icalproperty_vanew_exrule(struct icalrecurrencetype v, ...){ | 968 | icalproperty* icalproperty_vanew_exrule(struct icalrecurrencetype v, ...){ |
813 | va_list args; | 969 | va_list args; |
814 | struct icalproperty_impl *impl = icalproperty_new_impl(ICAL_EXRULE_PROPERTY); | 970 | struct icalproperty_impl *impl = icalproperty_new_impl(ICAL_EXRULE_PROPERTY); |
@@ -818,6 +974,7 @@ icalproperty* icalproperty_vanew_exrule(struct icalrecurrencetype v, ...){ | |||
818 | va_end(args); | 974 | va_end(args); |
819 | return (icalproperty*)impl; | 975 | return (icalproperty*)impl; |
820 | } | 976 | } |
977 | |||
821 | /* EXRULE */ | 978 | /* EXRULE */ |
822 | icalproperty* icalproperty_new_exrule(struct icalrecurrencetype v) { | 979 | icalproperty* icalproperty_new_exrule(struct icalrecurrencetype v) { |
823 | struct icalproperty_impl *impl = icalproperty_new_impl(ICAL_EXRULE_PROPERTY); | 980 | struct icalproperty_impl *impl = icalproperty_new_impl(ICAL_EXRULE_PROPERTY); |
@@ -830,7 +987,7 @@ void icalproperty_set_exrule(icalproperty* prop, struct icalrecurrencetype v){ | |||
830 | icalerror_check_arg_rv( (prop!=0),"prop"); | 987 | icalerror_check_arg_rv( (prop!=0),"prop"); |
831 | icalproperty_set_value(prop,icalvalue_new_recur(v)); | 988 | icalproperty_set_value(prop,icalvalue_new_recur(v)); |
832 | } | 989 | } |
833 | struct icalrecurrencetype icalproperty_get_exrule(icalproperty* prop){ | 990 | struct icalrecurrencetype icalproperty_get_exrule(const icalproperty* prop){ |
834 | icalerror_check_arg( (prop!=0),"prop"); | 991 | icalerror_check_arg( (prop!=0),"prop"); |
835 | return icalvalue_get_recur(icalproperty_get_value(prop)); | 992 | return icalvalue_get_recur(icalproperty_get_value(prop)); |
836 | } | 993 | } |
@@ -843,6 +1000,7 @@ icalproperty* icalproperty_vanew_freebusy(struct icalperiodtype v, ...){ | |||
843 | va_end(args); | 1000 | va_end(args); |
844 | return (icalproperty*)impl; | 1001 | return (icalproperty*)impl; |
845 | } | 1002 | } |
1003 | |||
846 | /* FREEBUSY */ | 1004 | /* FREEBUSY */ |
847 | icalproperty* icalproperty_new_freebusy(struct icalperiodtype v) { | 1005 | icalproperty* icalproperty_new_freebusy(struct icalperiodtype v) { |
848 | struct icalproperty_impl *impl = icalproperty_new_impl(ICAL_FREEBUSY_PROPERTY); | 1006 | struct icalproperty_impl *impl = icalproperty_new_impl(ICAL_FREEBUSY_PROPERTY); |
@@ -855,7 +1013,7 @@ void icalproperty_set_freebusy(icalproperty* prop, struct icalperiodtype v){ | |||
855 | icalerror_check_arg_rv( (prop!=0),"prop"); | 1013 | icalerror_check_arg_rv( (prop!=0),"prop"); |
856 | icalproperty_set_value(prop,icalvalue_new_period(v)); | 1014 | icalproperty_set_value(prop,icalvalue_new_period(v)); |
857 | } | 1015 | } |
858 | struct icalperiodtype icalproperty_get_freebusy(icalproperty* prop){ | 1016 | struct icalperiodtype icalproperty_get_freebusy(const icalproperty* prop){ |
859 | icalerror_check_arg( (prop!=0),"prop"); | 1017 | icalerror_check_arg( (prop!=0),"prop"); |
860 | return icalvalue_get_period(icalproperty_get_value(prop)); | 1018 | return icalvalue_get_period(icalproperty_get_value(prop)); |
861 | } | 1019 | } |
@@ -868,6 +1026,7 @@ icalproperty* icalproperty_vanew_geo(struct icalgeotype v, ...){ | |||
868 | va_end(args); | 1026 | va_end(args); |
869 | return (icalproperty*)impl; | 1027 | return (icalproperty*)impl; |
870 | } | 1028 | } |
1029 | |||
871 | /* GEO */ | 1030 | /* GEO */ |
872 | icalproperty* icalproperty_new_geo(struct icalgeotype v) { | 1031 | icalproperty* icalproperty_new_geo(struct icalgeotype v) { |
873 | struct icalproperty_impl *impl = icalproperty_new_impl(ICAL_GEO_PROPERTY); | 1032 | struct icalproperty_impl *impl = icalproperty_new_impl(ICAL_GEO_PROPERTY); |
@@ -880,7 +1039,7 @@ void icalproperty_set_geo(icalproperty* prop, struct icalgeotype v){ | |||
880 | icalerror_check_arg_rv( (prop!=0),"prop"); | 1039 | icalerror_check_arg_rv( (prop!=0),"prop"); |
881 | icalproperty_set_value(prop,icalvalue_new_geo(v)); | 1040 | icalproperty_set_value(prop,icalvalue_new_geo(v)); |
882 | } | 1041 | } |
883 | struct icalgeotype icalproperty_get_geo(icalproperty* prop){ | 1042 | struct icalgeotype icalproperty_get_geo(const icalproperty* prop){ |
884 | icalerror_check_arg( (prop!=0),"prop"); | 1043 | icalerror_check_arg( (prop!=0),"prop"); |
885 | return icalvalue_get_geo(icalproperty_get_value(prop)); | 1044 | return icalvalue_get_geo(icalproperty_get_value(prop)); |
886 | } | 1045 | } |
@@ -893,6 +1052,7 @@ icalproperty* icalproperty_vanew_lastmodified(struct icaltimetype v, ...){ | |||
893 | va_end(args); | 1052 | va_end(args); |
894 | return (icalproperty*)impl; | 1053 | return (icalproperty*)impl; |
895 | } | 1054 | } |
1055 | |||
896 | /* LAST-MODIFIED */ | 1056 | /* LAST-MODIFIED */ |
897 | icalproperty* icalproperty_new_lastmodified(struct icaltimetype v) { | 1057 | icalproperty* icalproperty_new_lastmodified(struct icaltimetype v) { |
898 | struct icalproperty_impl *impl = icalproperty_new_impl(ICAL_LASTMODIFIED_PROPERTY); | 1058 | struct icalproperty_impl *impl = icalproperty_new_impl(ICAL_LASTMODIFIED_PROPERTY); |
@@ -905,7 +1065,7 @@ void icalproperty_set_lastmodified(icalproperty* prop, struct icaltimetype v){ | |||
905 | icalerror_check_arg_rv( (prop!=0),"prop"); | 1065 | icalerror_check_arg_rv( (prop!=0),"prop"); |
906 | icalproperty_set_value(prop,icalvalue_new_datetime(v)); | 1066 | icalproperty_set_value(prop,icalvalue_new_datetime(v)); |
907 | } | 1067 | } |
908 | struct icaltimetype icalproperty_get_lastmodified(icalproperty* prop){ | 1068 | struct icaltimetype icalproperty_get_lastmodified(const icalproperty* prop){ |
909 | icalerror_check_arg( (prop!=0),"prop"); | 1069 | icalerror_check_arg( (prop!=0),"prop"); |
910 | return icalvalue_get_datetime(icalproperty_get_value(prop)); | 1070 | return icalvalue_get_datetime(icalproperty_get_value(prop)); |
911 | } | 1071 | } |
@@ -919,6 +1079,7 @@ icalproperty* icalproperty_vanew_location(const char* v, ...){ | |||
919 | va_end(args); | 1079 | va_end(args); |
920 | return (icalproperty*)impl; | 1080 | return (icalproperty*)impl; |
921 | } | 1081 | } |
1082 | |||
922 | /* LOCATION */ | 1083 | /* LOCATION */ |
923 | icalproperty* icalproperty_new_location(const char* v) { | 1084 | icalproperty* icalproperty_new_location(const char* v) { |
924 | struct icalproperty_impl *impl = icalproperty_new_impl(ICAL_LOCATION_PROPERTY); icalerror_check_arg_rz( (v!=0),"v"); | 1085 | struct icalproperty_impl *impl = icalproperty_new_impl(ICAL_LOCATION_PROPERTY); icalerror_check_arg_rz( (v!=0),"v"); |
@@ -933,7 +1094,7 @@ void icalproperty_set_location(icalproperty* prop, const char* v){ | |||
933 | icalerror_check_arg_rv( (prop!=0),"prop"); | 1094 | icalerror_check_arg_rv( (prop!=0),"prop"); |
934 | icalproperty_set_value(prop,icalvalue_new_text(v)); | 1095 | icalproperty_set_value(prop,icalvalue_new_text(v)); |
935 | } | 1096 | } |
936 | const char* icalproperty_get_location(icalproperty* prop){ | 1097 | const char* icalproperty_get_location(const icalproperty* prop){ |
937 | icalerror_check_arg( (prop!=0),"prop"); | 1098 | icalerror_check_arg( (prop!=0),"prop"); |
938 | return icalvalue_get_text(icalproperty_get_value(prop)); | 1099 | return icalvalue_get_text(icalproperty_get_value(prop)); |
939 | } | 1100 | } |
@@ -946,6 +1107,7 @@ icalproperty* icalproperty_vanew_maxresults(int v, ...){ | |||
946 | va_end(args); | 1107 | va_end(args); |
947 | return (icalproperty*)impl; | 1108 | return (icalproperty*)impl; |
948 | } | 1109 | } |
1110 | |||
949 | /* MAXRESULTS */ | 1111 | /* MAXRESULTS */ |
950 | icalproperty* icalproperty_new_maxresults(int v) { | 1112 | icalproperty* icalproperty_new_maxresults(int v) { |
951 | struct icalproperty_impl *impl = icalproperty_new_impl(ICAL_MAXRESULTS_PROPERTY); | 1113 | struct icalproperty_impl *impl = icalproperty_new_impl(ICAL_MAXRESULTS_PROPERTY); |
@@ -958,7 +1120,7 @@ void icalproperty_set_maxresults(icalproperty* prop, int v){ | |||
958 | icalerror_check_arg_rv( (prop!=0),"prop"); | 1120 | icalerror_check_arg_rv( (prop!=0),"prop"); |
959 | icalproperty_set_value(prop,icalvalue_new_integer(v)); | 1121 | icalproperty_set_value(prop,icalvalue_new_integer(v)); |
960 | } | 1122 | } |
961 | int icalproperty_get_maxresults(icalproperty* prop){ | 1123 | int icalproperty_get_maxresults(const icalproperty* prop){ |
962 | icalerror_check_arg( (prop!=0),"prop"); | 1124 | icalerror_check_arg( (prop!=0),"prop"); |
963 | return icalvalue_get_integer(icalproperty_get_value(prop)); | 1125 | return icalvalue_get_integer(icalproperty_get_value(prop)); |
964 | } | 1126 | } |
@@ -971,6 +1133,7 @@ icalproperty* icalproperty_vanew_maxresultssize(int v, ...){ | |||
971 | va_end(args); | 1133 | va_end(args); |
972 | return (icalproperty*)impl; | 1134 | return (icalproperty*)impl; |
973 | } | 1135 | } |
1136 | |||
974 | /* MAXRESULTSSIZE */ | 1137 | /* MAXRESULTSSIZE */ |
975 | icalproperty* icalproperty_new_maxresultssize(int v) { | 1138 | icalproperty* icalproperty_new_maxresultssize(int v) { |
976 | struct icalproperty_impl *impl = icalproperty_new_impl(ICAL_MAXRESULTSSIZE_PROPERTY); | 1139 | struct icalproperty_impl *impl = icalproperty_new_impl(ICAL_MAXRESULTSSIZE_PROPERTY); |
@@ -983,7 +1146,7 @@ void icalproperty_set_maxresultssize(icalproperty* prop, int v){ | |||
983 | icalerror_check_arg_rv( (prop!=0),"prop"); | 1146 | icalerror_check_arg_rv( (prop!=0),"prop"); |
984 | icalproperty_set_value(prop,icalvalue_new_integer(v)); | 1147 | icalproperty_set_value(prop,icalvalue_new_integer(v)); |
985 | } | 1148 | } |
986 | int icalproperty_get_maxresultssize(icalproperty* prop){ | 1149 | int icalproperty_get_maxresultssize(const icalproperty* prop){ |
987 | icalerror_check_arg( (prop!=0),"prop"); | 1150 | icalerror_check_arg( (prop!=0),"prop"); |
988 | return icalvalue_get_integer(icalproperty_get_value(prop)); | 1151 | return icalvalue_get_integer(icalproperty_get_value(prop)); |
989 | } | 1152 | } |
@@ -996,6 +1159,7 @@ icalproperty* icalproperty_vanew_method(enum icalproperty_method v, ...){ | |||
996 | va_end(args); | 1159 | va_end(args); |
997 | return (icalproperty*)impl; | 1160 | return (icalproperty*)impl; |
998 | } | 1161 | } |
1162 | |||
999 | /* METHOD */ | 1163 | /* METHOD */ |
1000 | icalproperty* icalproperty_new_method(enum icalproperty_method v) { | 1164 | icalproperty* icalproperty_new_method(enum icalproperty_method v) { |
1001 | struct icalproperty_impl *impl = icalproperty_new_impl(ICAL_METHOD_PROPERTY); | 1165 | struct icalproperty_impl *impl = icalproperty_new_impl(ICAL_METHOD_PROPERTY); |
@@ -1008,7 +1172,7 @@ void icalproperty_set_method(icalproperty* prop, enum icalproperty_method v){ | |||
1008 | icalerror_check_arg_rv( (prop!=0),"prop"); | 1172 | icalerror_check_arg_rv( (prop!=0),"prop"); |
1009 | icalproperty_set_value(prop,icalvalue_new_method(v)); | 1173 | icalproperty_set_value(prop,icalvalue_new_method(v)); |
1010 | } | 1174 | } |
1011 | enum icalproperty_method icalproperty_get_method(icalproperty* prop){ | 1175 | enum icalproperty_method icalproperty_get_method(const icalproperty* prop){ |
1012 | icalerror_check_arg( (prop!=0),"prop"); | 1176 | icalerror_check_arg( (prop!=0),"prop"); |
1013 | return icalvalue_get_method(icalproperty_get_value(prop)); | 1177 | return icalvalue_get_method(icalproperty_get_value(prop)); |
1014 | } | 1178 | } |
@@ -1022,6 +1186,7 @@ icalproperty* icalproperty_vanew_organizer(const char* v, ...){ | |||
1022 | va_end(args); | 1186 | va_end(args); |
1023 | return (icalproperty*)impl; | 1187 | return (icalproperty*)impl; |
1024 | } | 1188 | } |
1189 | |||
1025 | /* ORGANIZER */ | 1190 | /* ORGANIZER */ |
1026 | icalproperty* icalproperty_new_organizer(const char* v) { | 1191 | icalproperty* icalproperty_new_organizer(const char* v) { |
1027 | struct icalproperty_impl *impl = icalproperty_new_impl(ICAL_ORGANIZER_PROPERTY); icalerror_check_arg_rz( (v!=0),"v"); | 1192 | struct icalproperty_impl *impl = icalproperty_new_impl(ICAL_ORGANIZER_PROPERTY); icalerror_check_arg_rz( (v!=0),"v"); |
@@ -1036,10 +1201,39 @@ void icalproperty_set_organizer(icalproperty* prop, const char* v){ | |||
1036 | icalerror_check_arg_rv( (prop!=0),"prop"); | 1201 | icalerror_check_arg_rv( (prop!=0),"prop"); |
1037 | icalproperty_set_value(prop,icalvalue_new_caladdress(v)); | 1202 | icalproperty_set_value(prop,icalvalue_new_caladdress(v)); |
1038 | } | 1203 | } |
1039 | const char* icalproperty_get_organizer(icalproperty* prop){ | 1204 | const char* icalproperty_get_organizer(const icalproperty* prop){ |
1040 | icalerror_check_arg( (prop!=0),"prop"); | 1205 | icalerror_check_arg( (prop!=0),"prop"); |
1041 | return icalvalue_get_caladdress(icalproperty_get_value(prop)); | 1206 | return icalvalue_get_caladdress(icalproperty_get_value(prop)); |
1042 | } | 1207 | } |
1208 | icalproperty* 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 */ | ||
1220 | icalproperty* 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 | |||
1227 | void 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 | } | ||
1233 | const char* icalproperty_get_owner(const icalproperty* prop){ | ||
1234 | icalerror_check_arg( (prop!=0),"prop"); | ||
1235 | return icalvalue_get_text(icalproperty_get_value(prop)); | ||
1236 | } | ||
1043 | icalproperty* icalproperty_vanew_percentcomplete(int v, ...){ | 1237 | icalproperty* icalproperty_vanew_percentcomplete(int v, ...){ |
1044 | va_list args; | 1238 | va_list args; |
1045 | struct icalproperty_impl *impl = icalproperty_new_impl(ICAL_PERCENTCOMPLETE_PROPERTY); | 1239 | struct icalproperty_impl *impl = icalproperty_new_impl(ICAL_PERCENTCOMPLETE_PROPERTY); |
@@ -1049,6 +1243,7 @@ icalproperty* icalproperty_vanew_percentcomplete(int v, ...){ | |||
1049 | va_end(args); | 1243 | va_end(args); |
1050 | return (icalproperty*)impl; | 1244 | return (icalproperty*)impl; |
1051 | } | 1245 | } |
1246 | |||
1052 | /* PERCENT-COMPLETE */ | 1247 | /* PERCENT-COMPLETE */ |
1053 | icalproperty* icalproperty_new_percentcomplete(int v) { | 1248 | icalproperty* icalproperty_new_percentcomplete(int v) { |
1054 | struct icalproperty_impl *impl = icalproperty_new_impl(ICAL_PERCENTCOMPLETE_PROPERTY); | 1249 | struct icalproperty_impl *impl = icalproperty_new_impl(ICAL_PERCENTCOMPLETE_PROPERTY); |
@@ -1061,7 +1256,7 @@ void icalproperty_set_percentcomplete(icalproperty* prop, int v){ | |||
1061 | icalerror_check_arg_rv( (prop!=0),"prop"); | 1256 | icalerror_check_arg_rv( (prop!=0),"prop"); |
1062 | icalproperty_set_value(prop,icalvalue_new_integer(v)); | 1257 | icalproperty_set_value(prop,icalvalue_new_integer(v)); |
1063 | } | 1258 | } |
1064 | int icalproperty_get_percentcomplete(icalproperty* prop){ | 1259 | int icalproperty_get_percentcomplete(const icalproperty* prop){ |
1065 | icalerror_check_arg( (prop!=0),"prop"); | 1260 | icalerror_check_arg( (prop!=0),"prop"); |
1066 | return icalvalue_get_integer(icalproperty_get_value(prop)); | 1261 | return icalvalue_get_integer(icalproperty_get_value(prop)); |
1067 | } | 1262 | } |
@@ -1074,6 +1269,7 @@ icalproperty* icalproperty_vanew_priority(int v, ...){ | |||
1074 | va_end(args); | 1269 | va_end(args); |
1075 | return (icalproperty*)impl; | 1270 | return (icalproperty*)impl; |
1076 | } | 1271 | } |
1272 | |||
1077 | /* PRIORITY */ | 1273 | /* PRIORITY */ |
1078 | icalproperty* icalproperty_new_priority(int v) { | 1274 | icalproperty* icalproperty_new_priority(int v) { |
1079 | struct icalproperty_impl *impl = icalproperty_new_impl(ICAL_PRIORITY_PROPERTY); | 1275 | struct icalproperty_impl *impl = icalproperty_new_impl(ICAL_PRIORITY_PROPERTY); |
@@ -1086,7 +1282,7 @@ void icalproperty_set_priority(icalproperty* prop, int v){ | |||
1086 | icalerror_check_arg_rv( (prop!=0),"prop"); | 1282 | icalerror_check_arg_rv( (prop!=0),"prop"); |
1087 | icalproperty_set_value(prop,icalvalue_new_integer(v)); | 1283 | icalproperty_set_value(prop,icalvalue_new_integer(v)); |
1088 | } | 1284 | } |
1089 | int icalproperty_get_priority(icalproperty* prop){ | 1285 | int icalproperty_get_priority(const icalproperty* prop){ |
1090 | icalerror_check_arg( (prop!=0),"prop"); | 1286 | icalerror_check_arg( (prop!=0),"prop"); |
1091 | return icalvalue_get_integer(icalproperty_get_value(prop)); | 1287 | return icalvalue_get_integer(icalproperty_get_value(prop)); |
1092 | } | 1288 | } |
@@ -1100,6 +1296,7 @@ icalproperty* icalproperty_vanew_prodid(const char* v, ...){ | |||
1100 | va_end(args); | 1296 | va_end(args); |
1101 | return (icalproperty*)impl; | 1297 | return (icalproperty*)impl; |
1102 | } | 1298 | } |
1299 | |||
1103 | /* PRODID */ | 1300 | /* PRODID */ |
1104 | icalproperty* icalproperty_new_prodid(const char* v) { | 1301 | icalproperty* icalproperty_new_prodid(const char* v) { |
1105 | struct icalproperty_impl *impl = icalproperty_new_impl(ICAL_PRODID_PROPERTY); icalerror_check_arg_rz( (v!=0),"v"); | 1302 | struct icalproperty_impl *impl = icalproperty_new_impl(ICAL_PRODID_PROPERTY); icalerror_check_arg_rz( (v!=0),"v"); |
@@ -1114,7 +1311,7 @@ void icalproperty_set_prodid(icalproperty* prop, const char* v){ | |||
1114 | icalerror_check_arg_rv( (prop!=0),"prop"); | 1311 | icalerror_check_arg_rv( (prop!=0),"prop"); |
1115 | icalproperty_set_value(prop,icalvalue_new_text(v)); | 1312 | icalproperty_set_value(prop,icalvalue_new_text(v)); |
1116 | } | 1313 | } |
1117 | const char* icalproperty_get_prodid(icalproperty* prop){ | 1314 | const char* icalproperty_get_prodid(const icalproperty* prop){ |
1118 | icalerror_check_arg( (prop!=0),"prop"); | 1315 | icalerror_check_arg( (prop!=0),"prop"); |
1119 | return icalvalue_get_text(icalproperty_get_value(prop)); | 1316 | return icalvalue_get_text(icalproperty_get_value(prop)); |
1120 | } | 1317 | } |
@@ -1128,6 +1325,7 @@ icalproperty* icalproperty_vanew_query(const char* v, ...){ | |||
1128 | va_end(args); | 1325 | va_end(args); |
1129 | return (icalproperty*)impl; | 1326 | return (icalproperty*)impl; |
1130 | } | 1327 | } |
1328 | |||
1131 | /* QUERY */ | 1329 | /* QUERY */ |
1132 | icalproperty* icalproperty_new_query(const char* v) { | 1330 | icalproperty* icalproperty_new_query(const char* v) { |
1133 | struct icalproperty_impl *impl = icalproperty_new_impl(ICAL_QUERY_PROPERTY); icalerror_check_arg_rz( (v!=0),"v"); | 1331 | struct icalproperty_impl *impl = icalproperty_new_impl(ICAL_QUERY_PROPERTY); icalerror_check_arg_rz( (v!=0),"v"); |
@@ -1142,7 +1340,7 @@ void icalproperty_set_query(icalproperty* prop, const char* v){ | |||
1142 | icalerror_check_arg_rv( (prop!=0),"prop"); | 1340 | icalerror_check_arg_rv( (prop!=0),"prop"); |
1143 | icalproperty_set_value(prop,icalvalue_new_query(v)); | 1341 | icalproperty_set_value(prop,icalvalue_new_query(v)); |
1144 | } | 1342 | } |
1145 | const char* icalproperty_get_query(icalproperty* prop){ | 1343 | const char* icalproperty_get_query(const icalproperty* prop){ |
1146 | icalerror_check_arg( (prop!=0),"prop"); | 1344 | icalerror_check_arg( (prop!=0),"prop"); |
1147 | return icalvalue_get_query(icalproperty_get_value(prop)); | 1345 | return icalvalue_get_query(icalproperty_get_value(prop)); |
1148 | } | 1346 | } |
@@ -1156,6 +1354,7 @@ icalproperty* icalproperty_vanew_queryname(const char* v, ...){ | |||
1156 | va_end(args); | 1354 | va_end(args); |
1157 | return (icalproperty*)impl; | 1355 | return (icalproperty*)impl; |
1158 | } | 1356 | } |
1357 | |||
1159 | /* QUERYNAME */ | 1358 | /* QUERYNAME */ |
1160 | icalproperty* icalproperty_new_queryname(const char* v) { | 1359 | icalproperty* icalproperty_new_queryname(const char* v) { |
1161 | struct icalproperty_impl *impl = icalproperty_new_impl(ICAL_QUERYNAME_PROPERTY); icalerror_check_arg_rz( (v!=0),"v"); | 1360 | struct icalproperty_impl *impl = icalproperty_new_impl(ICAL_QUERYNAME_PROPERTY); icalerror_check_arg_rz( (v!=0),"v"); |
@@ -1170,7 +1369,7 @@ void icalproperty_set_queryname(icalproperty* prop, const char* v){ | |||
1170 | icalerror_check_arg_rv( (prop!=0),"prop"); | 1369 | icalerror_check_arg_rv( (prop!=0),"prop"); |
1171 | icalproperty_set_value(prop,icalvalue_new_text(v)); | 1370 | icalproperty_set_value(prop,icalvalue_new_text(v)); |
1172 | } | 1371 | } |
1173 | const char* icalproperty_get_queryname(icalproperty* prop){ | 1372 | const char* icalproperty_get_queryname(const icalproperty* prop){ |
1174 | icalerror_check_arg( (prop!=0),"prop"); | 1373 | icalerror_check_arg( (prop!=0),"prop"); |
1175 | return icalvalue_get_text(icalproperty_get_value(prop)); | 1374 | return icalvalue_get_text(icalproperty_get_value(prop)); |
1176 | } | 1375 | } |
@@ -1183,6 +1382,7 @@ icalproperty* icalproperty_vanew_rdate(struct icaldatetimeperiodtype v, ...){ | |||
1183 | va_end(args); | 1382 | va_end(args); |
1184 | return (icalproperty*)impl; | 1383 | return (icalproperty*)impl; |
1185 | } | 1384 | } |
1385 | |||
1186 | /* RDATE */ | 1386 | /* RDATE */ |
1187 | icalproperty* icalproperty_new_rdate(struct icaldatetimeperiodtype v) { | 1387 | icalproperty* icalproperty_new_rdate(struct icaldatetimeperiodtype v) { |
1188 | struct icalproperty_impl *impl = icalproperty_new_impl(ICAL_RDATE_PROPERTY); | 1388 | struct icalproperty_impl *impl = icalproperty_new_impl(ICAL_RDATE_PROPERTY); |
@@ -1195,7 +1395,7 @@ void icalproperty_set_rdate(icalproperty* prop, struct icaldatetimeperiodtype v) | |||
1195 | icalerror_check_arg_rv( (prop!=0),"prop"); | 1395 | icalerror_check_arg_rv( (prop!=0),"prop"); |
1196 | icalproperty_set_value(prop,icalvalue_new_datetimeperiod(v)); | 1396 | icalproperty_set_value(prop,icalvalue_new_datetimeperiod(v)); |
1197 | } | 1397 | } |
1198 | struct icaldatetimeperiodtype icalproperty_get_rdate(icalproperty* prop){ | 1398 | struct icaldatetimeperiodtype icalproperty_get_rdate(const icalproperty* prop){ |
1199 | icalerror_check_arg( (prop!=0),"prop"); | 1399 | icalerror_check_arg( (prop!=0),"prop"); |
1200 | return icalvalue_get_datetimeperiod(icalproperty_get_value(prop)); | 1400 | return icalvalue_get_datetimeperiod(icalproperty_get_value(prop)); |
1201 | } | 1401 | } |
@@ -1208,6 +1408,7 @@ icalproperty* icalproperty_vanew_recurrenceid(struct icaltimetype v, ...){ | |||
1208 | va_end(args); | 1408 | va_end(args); |
1209 | return (icalproperty*)impl; | 1409 | return (icalproperty*)impl; |
1210 | } | 1410 | } |
1411 | |||
1211 | /* RECURRENCE-ID */ | 1412 | /* RECURRENCE-ID */ |
1212 | icalproperty* icalproperty_new_recurrenceid(struct icaltimetype v) { | 1413 | icalproperty* icalproperty_new_recurrenceid(struct icaltimetype v) { |
1213 | struct icalproperty_impl *impl = icalproperty_new_impl(ICAL_RECURRENCEID_PROPERTY); | 1414 | struct icalproperty_impl *impl = icalproperty_new_impl(ICAL_RECURRENCEID_PROPERTY); |
@@ -1216,11 +1417,16 @@ icalproperty* icalproperty_new_recurrenceid(struct icaltimetype v) { | |||
1216 | } | 1417 | } |
1217 | 1418 | ||
1218 | void icalproperty_set_recurrenceid(icalproperty* prop, struct icaltimetype v){ | 1419 | void 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 | } |
1223 | struct icaltimetype icalproperty_get_recurrenceid(icalproperty* prop){ | 1429 | struct icaltimetype icalproperty_get_recurrenceid(const icalproperty* prop){ |
1224 | icalerror_check_arg( (prop!=0),"prop"); | 1430 | icalerror_check_arg( (prop!=0),"prop"); |
1225 | return icalvalue_get_datetime(icalproperty_get_value(prop)); | 1431 | return icalvalue_get_datetime(icalproperty_get_value(prop)); |
1226 | } | 1432 | } |
@@ -1234,6 +1440,7 @@ icalproperty* icalproperty_vanew_relatedto(const char* v, ...){ | |||
1234 | va_end(args); | 1440 | va_end(args); |
1235 | return (icalproperty*)impl; | 1441 | return (icalproperty*)impl; |
1236 | } | 1442 | } |
1443 | |||
1237 | /* RELATED-TO */ | 1444 | /* RELATED-TO */ |
1238 | icalproperty* icalproperty_new_relatedto(const char* v) { | 1445 | icalproperty* icalproperty_new_relatedto(const char* v) { |
1239 | struct icalproperty_impl *impl = icalproperty_new_impl(ICAL_RELATEDTO_PROPERTY); icalerror_check_arg_rz( (v!=0),"v"); | 1446 | struct icalproperty_impl *impl = icalproperty_new_impl(ICAL_RELATEDTO_PROPERTY); icalerror_check_arg_rz( (v!=0),"v"); |
@@ -1248,7 +1455,36 @@ void icalproperty_set_relatedto(icalproperty* prop, const char* v){ | |||
1248 | icalerror_check_arg_rv( (prop!=0),"prop"); | 1455 | icalerror_check_arg_rv( (prop!=0),"prop"); |
1249 | icalproperty_set_value(prop,icalvalue_new_text(v)); | 1456 | icalproperty_set_value(prop,icalvalue_new_text(v)); |
1250 | } | 1457 | } |
1251 | const char* icalproperty_get_relatedto(icalproperty* prop){ | 1458 | const char* icalproperty_get_relatedto(const icalproperty* prop){ |
1459 | icalerror_check_arg( (prop!=0),"prop"); | ||
1460 | return icalvalue_get_text(icalproperty_get_value(prop)); | ||
1461 | } | ||
1462 | icalproperty* 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 */ | ||
1474 | icalproperty* 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 | |||
1481 | void 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 | } | ||
1487 | const char* icalproperty_get_relcalid(const icalproperty* prop){ | ||
1252 | icalerror_check_arg( (prop!=0),"prop"); | 1488 | icalerror_check_arg( (prop!=0),"prop"); |
1253 | return icalvalue_get_text(icalproperty_get_value(prop)); | 1489 | return icalvalue_get_text(icalproperty_get_value(prop)); |
1254 | } | 1490 | } |
@@ -1261,6 +1497,7 @@ icalproperty* icalproperty_vanew_repeat(int v, ...){ | |||
1261 | va_end(args); | 1497 | va_end(args); |
1262 | return (icalproperty*)impl; | 1498 | return (icalproperty*)impl; |
1263 | } | 1499 | } |
1500 | |||
1264 | /* REPEAT */ | 1501 | /* REPEAT */ |
1265 | icalproperty* icalproperty_new_repeat(int v) { | 1502 | icalproperty* icalproperty_new_repeat(int v) { |
1266 | struct icalproperty_impl *impl = icalproperty_new_impl(ICAL_REPEAT_PROPERTY); | 1503 | struct icalproperty_impl *impl = icalproperty_new_impl(ICAL_REPEAT_PROPERTY); |
@@ -1273,7 +1510,7 @@ void icalproperty_set_repeat(icalproperty* prop, int v){ | |||
1273 | icalerror_check_arg_rv( (prop!=0),"prop"); | 1510 | icalerror_check_arg_rv( (prop!=0),"prop"); |
1274 | icalproperty_set_value(prop,icalvalue_new_integer(v)); | 1511 | icalproperty_set_value(prop,icalvalue_new_integer(v)); |
1275 | } | 1512 | } |
1276 | int icalproperty_get_repeat(icalproperty* prop){ | 1513 | int icalproperty_get_repeat(const icalproperty* prop){ |
1277 | icalerror_check_arg( (prop!=0),"prop"); | 1514 | icalerror_check_arg( (prop!=0),"prop"); |
1278 | return icalvalue_get_integer(icalproperty_get_value(prop)); | 1515 | return icalvalue_get_integer(icalproperty_get_value(prop)); |
1279 | } | 1516 | } |
@@ -1286,6 +1523,7 @@ icalproperty* icalproperty_vanew_requeststatus(struct icalreqstattype v, ...){ | |||
1286 | va_end(args); | 1523 | va_end(args); |
1287 | return (icalproperty*)impl; | 1524 | return (icalproperty*)impl; |
1288 | } | 1525 | } |
1526 | |||
1289 | /* REQUEST-STATUS */ | 1527 | /* REQUEST-STATUS */ |
1290 | icalproperty* icalproperty_new_requeststatus(struct icalreqstattype v) { | 1528 | icalproperty* icalproperty_new_requeststatus(struct icalreqstattype v) { |
1291 | struct icalproperty_impl *impl = icalproperty_new_impl(ICAL_REQUESTSTATUS_PROPERTY); | 1529 | struct icalproperty_impl *impl = icalproperty_new_impl(ICAL_REQUESTSTATUS_PROPERTY); |
@@ -1298,7 +1536,7 @@ void icalproperty_set_requeststatus(icalproperty* prop, struct icalreqstattype v | |||
1298 | icalerror_check_arg_rv( (prop!=0),"prop"); | 1536 | icalerror_check_arg_rv( (prop!=0),"prop"); |
1299 | icalproperty_set_value(prop,icalvalue_new_requeststatus(v)); | 1537 | icalproperty_set_value(prop,icalvalue_new_requeststatus(v)); |
1300 | } | 1538 | } |
1301 | struct icalreqstattype icalproperty_get_requeststatus(icalproperty* prop){ | 1539 | struct icalreqstattype icalproperty_get_requeststatus(const icalproperty* prop){ |
1302 | icalerror_check_arg( (prop!=0),"prop"); | 1540 | icalerror_check_arg( (prop!=0),"prop"); |
1303 | return icalvalue_get_requeststatus(icalproperty_get_value(prop)); | 1541 | return icalvalue_get_requeststatus(icalproperty_get_value(prop)); |
1304 | } | 1542 | } |
@@ -1312,6 +1550,7 @@ icalproperty* icalproperty_vanew_resources(const char* v, ...){ | |||
1312 | va_end(args); | 1550 | va_end(args); |
1313 | return (icalproperty*)impl; | 1551 | return (icalproperty*)impl; |
1314 | } | 1552 | } |
1553 | |||
1315 | /* RESOURCES */ | 1554 | /* RESOURCES */ |
1316 | icalproperty* icalproperty_new_resources(const char* v) { | 1555 | icalproperty* icalproperty_new_resources(const char* v) { |
1317 | struct icalproperty_impl *impl = icalproperty_new_impl(ICAL_RESOURCES_PROPERTY); icalerror_check_arg_rz( (v!=0),"v"); | 1556 | struct icalproperty_impl *impl = icalproperty_new_impl(ICAL_RESOURCES_PROPERTY); icalerror_check_arg_rz( (v!=0),"v"); |
@@ -1326,7 +1565,7 @@ void icalproperty_set_resources(icalproperty* prop, const char* v){ | |||
1326 | icalerror_check_arg_rv( (prop!=0),"prop"); | 1565 | icalerror_check_arg_rv( (prop!=0),"prop"); |
1327 | icalproperty_set_value(prop,icalvalue_new_text(v)); | 1566 | icalproperty_set_value(prop,icalvalue_new_text(v)); |
1328 | } | 1567 | } |
1329 | const char* icalproperty_get_resources(icalproperty* prop){ | 1568 | const char* icalproperty_get_resources(const icalproperty* prop){ |
1330 | icalerror_check_arg( (prop!=0),"prop"); | 1569 | icalerror_check_arg( (prop!=0),"prop"); |
1331 | return icalvalue_get_text(icalproperty_get_value(prop)); | 1570 | return icalvalue_get_text(icalproperty_get_value(prop)); |
1332 | } | 1571 | } |
@@ -1339,6 +1578,7 @@ icalproperty* icalproperty_vanew_rrule(struct icalrecurrencetype v, ...){ | |||
1339 | va_end(args); | 1578 | va_end(args); |
1340 | return (icalproperty*)impl; | 1579 | return (icalproperty*)impl; |
1341 | } | 1580 | } |
1581 | |||
1342 | /* RRULE */ | 1582 | /* RRULE */ |
1343 | icalproperty* icalproperty_new_rrule(struct icalrecurrencetype v) { | 1583 | icalproperty* icalproperty_new_rrule(struct icalrecurrencetype v) { |
1344 | struct icalproperty_impl *impl = icalproperty_new_impl(ICAL_RRULE_PROPERTY); | 1584 | struct icalproperty_impl *impl = icalproperty_new_impl(ICAL_RRULE_PROPERTY); |
@@ -1351,7 +1591,7 @@ void icalproperty_set_rrule(icalproperty* prop, struct icalrecurrencetype v){ | |||
1351 | icalerror_check_arg_rv( (prop!=0),"prop"); | 1591 | icalerror_check_arg_rv( (prop!=0),"prop"); |
1352 | icalproperty_set_value(prop,icalvalue_new_recur(v)); | 1592 | icalproperty_set_value(prop,icalvalue_new_recur(v)); |
1353 | } | 1593 | } |
1354 | struct icalrecurrencetype icalproperty_get_rrule(icalproperty* prop){ | 1594 | struct icalrecurrencetype icalproperty_get_rrule(const icalproperty* prop){ |
1355 | icalerror_check_arg( (prop!=0),"prop"); | 1595 | icalerror_check_arg( (prop!=0),"prop"); |
1356 | return icalvalue_get_recur(icalproperty_get_value(prop)); | 1596 | return icalvalue_get_recur(icalproperty_get_value(prop)); |
1357 | } | 1597 | } |
@@ -1365,6 +1605,7 @@ icalproperty* icalproperty_vanew_scope(const char* v, ...){ | |||
1365 | va_end(args); | 1605 | va_end(args); |
1366 | return (icalproperty*)impl; | 1606 | return (icalproperty*)impl; |
1367 | } | 1607 | } |
1608 | |||
1368 | /* SCOPE */ | 1609 | /* SCOPE */ |
1369 | icalproperty* icalproperty_new_scope(const char* v) { | 1610 | icalproperty* icalproperty_new_scope(const char* v) { |
1370 | struct icalproperty_impl *impl = icalproperty_new_impl(ICAL_SCOPE_PROPERTY); icalerror_check_arg_rz( (v!=0),"v"); | 1611 | struct icalproperty_impl *impl = icalproperty_new_impl(ICAL_SCOPE_PROPERTY); icalerror_check_arg_rz( (v!=0),"v"); |
@@ -1379,7 +1620,7 @@ void icalproperty_set_scope(icalproperty* prop, const char* v){ | |||
1379 | icalerror_check_arg_rv( (prop!=0),"prop"); | 1620 | icalerror_check_arg_rv( (prop!=0),"prop"); |
1380 | icalproperty_set_value(prop,icalvalue_new_text(v)); | 1621 | icalproperty_set_value(prop,icalvalue_new_text(v)); |
1381 | } | 1622 | } |
1382 | const char* icalproperty_get_scope(icalproperty* prop){ | 1623 | const char* icalproperty_get_scope(const icalproperty* prop){ |
1383 | icalerror_check_arg( (prop!=0),"prop"); | 1624 | icalerror_check_arg( (prop!=0),"prop"); |
1384 | return icalvalue_get_text(icalproperty_get_value(prop)); | 1625 | return icalvalue_get_text(icalproperty_get_value(prop)); |
1385 | } | 1626 | } |
@@ -1392,6 +1633,7 @@ icalproperty* icalproperty_vanew_sequence(int v, ...){ | |||
1392 | va_end(args); | 1633 | va_end(args); |
1393 | return (icalproperty*)impl; | 1634 | return (icalproperty*)impl; |
1394 | } | 1635 | } |
1636 | |||
1395 | /* SEQUENCE */ | 1637 | /* SEQUENCE */ |
1396 | icalproperty* icalproperty_new_sequence(int v) { | 1638 | icalproperty* icalproperty_new_sequence(int v) { |
1397 | struct icalproperty_impl *impl = icalproperty_new_impl(ICAL_SEQUENCE_PROPERTY); | 1639 | struct icalproperty_impl *impl = icalproperty_new_impl(ICAL_SEQUENCE_PROPERTY); |
@@ -1404,7 +1646,7 @@ void icalproperty_set_sequence(icalproperty* prop, int v){ | |||
1404 | icalerror_check_arg_rv( (prop!=0),"prop"); | 1646 | icalerror_check_arg_rv( (prop!=0),"prop"); |
1405 | icalproperty_set_value(prop,icalvalue_new_integer(v)); | 1647 | icalproperty_set_value(prop,icalvalue_new_integer(v)); |
1406 | } | 1648 | } |
1407 | int icalproperty_get_sequence(icalproperty* prop){ | 1649 | int icalproperty_get_sequence(const icalproperty* prop){ |
1408 | icalerror_check_arg( (prop!=0),"prop"); | 1650 | icalerror_check_arg( (prop!=0),"prop"); |
1409 | return icalvalue_get_integer(icalproperty_get_value(prop)); | 1651 | return icalvalue_get_integer(icalproperty_get_value(prop)); |
1410 | } | 1652 | } |
@@ -1417,6 +1659,7 @@ icalproperty* icalproperty_vanew_status(enum icalproperty_status v, ...){ | |||
1417 | va_end(args); | 1659 | va_end(args); |
1418 | return (icalproperty*)impl; | 1660 | return (icalproperty*)impl; |
1419 | } | 1661 | } |
1662 | |||
1420 | /* STATUS */ | 1663 | /* STATUS */ |
1421 | icalproperty* icalproperty_new_status(enum icalproperty_status v) { | 1664 | icalproperty* icalproperty_new_status(enum icalproperty_status v) { |
1422 | struct icalproperty_impl *impl = icalproperty_new_impl(ICAL_STATUS_PROPERTY); | 1665 | struct icalproperty_impl *impl = icalproperty_new_impl(ICAL_STATUS_PROPERTY); |
@@ -1429,7 +1672,7 @@ void icalproperty_set_status(icalproperty* prop, enum icalproperty_status v){ | |||
1429 | icalerror_check_arg_rv( (prop!=0),"prop"); | 1672 | icalerror_check_arg_rv( (prop!=0),"prop"); |
1430 | icalproperty_set_value(prop,icalvalue_new_status(v)); | 1673 | icalproperty_set_value(prop,icalvalue_new_status(v)); |
1431 | } | 1674 | } |
1432 | enum icalproperty_status icalproperty_get_status(icalproperty* prop){ | 1675 | enum icalproperty_status icalproperty_get_status(const icalproperty* prop){ |
1433 | icalerror_check_arg( (prop!=0),"prop"); | 1676 | icalerror_check_arg( (prop!=0),"prop"); |
1434 | return icalvalue_get_status(icalproperty_get_value(prop)); | 1677 | return icalvalue_get_status(icalproperty_get_value(prop)); |
1435 | } | 1678 | } |
@@ -1443,6 +1686,7 @@ icalproperty* icalproperty_vanew_summary(const char* v, ...){ | |||
1443 | va_end(args); | 1686 | va_end(args); |
1444 | return (icalproperty*)impl; | 1687 | return (icalproperty*)impl; |
1445 | } | 1688 | } |
1689 | |||
1446 | /* SUMMARY */ | 1690 | /* SUMMARY */ |
1447 | icalproperty* icalproperty_new_summary(const char* v) { | 1691 | icalproperty* icalproperty_new_summary(const char* v) { |
1448 | struct icalproperty_impl *impl = icalproperty_new_impl(ICAL_SUMMARY_PROPERTY); icalerror_check_arg_rz( (v!=0),"v"); | 1692 | struct icalproperty_impl *impl = icalproperty_new_impl(ICAL_SUMMARY_PROPERTY); icalerror_check_arg_rz( (v!=0),"v"); |
@@ -1457,7 +1701,7 @@ void icalproperty_set_summary(icalproperty* prop, const char* v){ | |||
1457 | icalerror_check_arg_rv( (prop!=0),"prop"); | 1701 | icalerror_check_arg_rv( (prop!=0),"prop"); |
1458 | icalproperty_set_value(prop,icalvalue_new_text(v)); | 1702 | icalproperty_set_value(prop,icalvalue_new_text(v)); |
1459 | } | 1703 | } |
1460 | const char* icalproperty_get_summary(icalproperty* prop){ | 1704 | const char* icalproperty_get_summary(const icalproperty* prop){ |
1461 | icalerror_check_arg( (prop!=0),"prop"); | 1705 | icalerror_check_arg( (prop!=0),"prop"); |
1462 | return icalvalue_get_text(icalproperty_get_value(prop)); | 1706 | return icalvalue_get_text(icalproperty_get_value(prop)); |
1463 | } | 1707 | } |
@@ -1471,6 +1715,7 @@ icalproperty* icalproperty_vanew_target(const char* v, ...){ | |||
1471 | va_end(args); | 1715 | va_end(args); |
1472 | return (icalproperty*)impl; | 1716 | return (icalproperty*)impl; |
1473 | } | 1717 | } |
1718 | |||
1474 | /* TARGET */ | 1719 | /* TARGET */ |
1475 | icalproperty* icalproperty_new_target(const char* v) { | 1720 | icalproperty* icalproperty_new_target(const char* v) { |
1476 | struct icalproperty_impl *impl = icalproperty_new_impl(ICAL_TARGET_PROPERTY); icalerror_check_arg_rz( (v!=0),"v"); | 1721 | struct icalproperty_impl *impl = icalproperty_new_impl(ICAL_TARGET_PROPERTY); icalerror_check_arg_rz( (v!=0),"v"); |
@@ -1485,37 +1730,35 @@ void icalproperty_set_target(icalproperty* prop, const char* v){ | |||
1485 | icalerror_check_arg_rv( (prop!=0),"prop"); | 1730 | icalerror_check_arg_rv( (prop!=0),"prop"); |
1486 | icalproperty_set_value(prop,icalvalue_new_caladdress(v)); | 1731 | icalproperty_set_value(prop,icalvalue_new_caladdress(v)); |
1487 | } | 1732 | } |
1488 | const char* icalproperty_get_target(icalproperty* prop){ | 1733 | const char* icalproperty_get_target(const icalproperty* prop){ |
1489 | icalerror_check_arg( (prop!=0),"prop"); | 1734 | icalerror_check_arg( (prop!=0),"prop"); |
1490 | return icalvalue_get_caladdress(icalproperty_get_value(prop)); | 1735 | return icalvalue_get_caladdress(icalproperty_get_value(prop)); |
1491 | } | 1736 | } |
1492 | icalproperty* icalproperty_vanew_transp(const char* v, ...){ | 1737 | icalproperty* 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); |
1497 | va_start(args,v); | 1741 | va_start(args,v); |
1498 | icalproperty_add_parameters(impl, args); | 1742 | icalproperty_add_parameters(impl, args); |
1499 | va_end(args); | 1743 | va_end(args); |
1500 | return (icalproperty*)impl; | 1744 | return (icalproperty*)impl; |
1501 | } | 1745 | } |
1502 | /* TRANSP */ | ||
1503 | icalproperty* 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 */ | ||
1748 | icalproperty* 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); |
1507 | return (icalproperty*)impl; | 1751 | return (icalproperty*)impl; |
1508 | } | 1752 | } |
1509 | 1753 | ||
1510 | void icalproperty_set_transp(icalproperty* prop, const char* v){ | 1754 | void 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 | } |
1516 | const char* icalproperty_get_transp(icalproperty* prop){ | 1759 | enum 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 | } |
1520 | icalproperty* icalproperty_vanew_trigger(struct icaltriggertype v, ...){ | 1763 | icalproperty* icalproperty_vanew_trigger(struct icaltriggertype v, ...){ |
1521 | va_list args; | 1764 | va_list args; |
@@ -1526,6 +1769,7 @@ icalproperty* icalproperty_vanew_trigger(struct icaltriggertype v, ...){ | |||
1526 | va_end(args); | 1769 | va_end(args); |
1527 | return (icalproperty*)impl; | 1770 | return (icalproperty*)impl; |
1528 | } | 1771 | } |
1772 | |||
1529 | /* TRIGGER */ | 1773 | /* TRIGGER */ |
1530 | icalproperty* icalproperty_new_trigger(struct icaltriggertype v) { | 1774 | icalproperty* icalproperty_new_trigger(struct icaltriggertype v) { |
1531 | struct icalproperty_impl *impl = icalproperty_new_impl(ICAL_TRIGGER_PROPERTY); | 1775 | struct icalproperty_impl *impl = icalproperty_new_impl(ICAL_TRIGGER_PROPERTY); |
@@ -1538,7 +1782,7 @@ void icalproperty_set_trigger(icalproperty* prop, struct icaltriggertype v){ | |||
1538 | icalerror_check_arg_rv( (prop!=0),"prop"); | 1782 | icalerror_check_arg_rv( (prop!=0),"prop"); |
1539 | icalproperty_set_value(prop,icalvalue_new_trigger(v)); | 1783 | icalproperty_set_value(prop,icalvalue_new_trigger(v)); |
1540 | } | 1784 | } |
1541 | struct icaltriggertype icalproperty_get_trigger(icalproperty* prop){ | 1785 | struct icaltriggertype icalproperty_get_trigger(const icalproperty* prop){ |
1542 | icalerror_check_arg( (prop!=0),"prop"); | 1786 | icalerror_check_arg( (prop!=0),"prop"); |
1543 | return icalvalue_get_trigger(icalproperty_get_value(prop)); | 1787 | return icalvalue_get_trigger(icalproperty_get_value(prop)); |
1544 | } | 1788 | } |
@@ -1552,6 +1796,7 @@ icalproperty* icalproperty_vanew_tzid(const char* v, ...){ | |||
1552 | va_end(args); | 1796 | va_end(args); |
1553 | return (icalproperty*)impl; | 1797 | return (icalproperty*)impl; |
1554 | } | 1798 | } |
1799 | |||
1555 | /* TZID */ | 1800 | /* TZID */ |
1556 | icalproperty* icalproperty_new_tzid(const char* v) { | 1801 | icalproperty* icalproperty_new_tzid(const char* v) { |
1557 | struct icalproperty_impl *impl = icalproperty_new_impl(ICAL_TZID_PROPERTY); icalerror_check_arg_rz( (v!=0),"v"); | 1802 | struct icalproperty_impl *impl = icalproperty_new_impl(ICAL_TZID_PROPERTY); icalerror_check_arg_rz( (v!=0),"v"); |
@@ -1566,7 +1811,7 @@ void icalproperty_set_tzid(icalproperty* prop, const char* v){ | |||
1566 | icalerror_check_arg_rv( (prop!=0),"prop"); | 1811 | icalerror_check_arg_rv( (prop!=0),"prop"); |
1567 | icalproperty_set_value(prop,icalvalue_new_text(v)); | 1812 | icalproperty_set_value(prop,icalvalue_new_text(v)); |
1568 | } | 1813 | } |
1569 | const char* icalproperty_get_tzid(icalproperty* prop){ | 1814 | const char* icalproperty_get_tzid(const icalproperty* prop){ |
1570 | icalerror_check_arg( (prop!=0),"prop"); | 1815 | icalerror_check_arg( (prop!=0),"prop"); |
1571 | return icalvalue_get_text(icalproperty_get_value(prop)); | 1816 | return icalvalue_get_text(icalproperty_get_value(prop)); |
1572 | } | 1817 | } |
@@ -1580,6 +1825,7 @@ icalproperty* icalproperty_vanew_tzname(const char* v, ...){ | |||
1580 | va_end(args); | 1825 | va_end(args); |
1581 | return (icalproperty*)impl; | 1826 | return (icalproperty*)impl; |
1582 | } | 1827 | } |
1828 | |||
1583 | /* TZNAME */ | 1829 | /* TZNAME */ |
1584 | icalproperty* icalproperty_new_tzname(const char* v) { | 1830 | icalproperty* icalproperty_new_tzname(const char* v) { |
1585 | struct icalproperty_impl *impl = icalproperty_new_impl(ICAL_TZNAME_PROPERTY); icalerror_check_arg_rz( (v!=0),"v"); | 1831 | struct icalproperty_impl *impl = icalproperty_new_impl(ICAL_TZNAME_PROPERTY); icalerror_check_arg_rz( (v!=0),"v"); |
@@ -1594,7 +1840,7 @@ void icalproperty_set_tzname(icalproperty* prop, const char* v){ | |||
1594 | icalerror_check_arg_rv( (prop!=0),"prop"); | 1840 | icalerror_check_arg_rv( (prop!=0),"prop"); |
1595 | icalproperty_set_value(prop,icalvalue_new_text(v)); | 1841 | icalproperty_set_value(prop,icalvalue_new_text(v)); |
1596 | } | 1842 | } |
1597 | const char* icalproperty_get_tzname(icalproperty* prop){ | 1843 | const char* icalproperty_get_tzname(const icalproperty* prop){ |
1598 | icalerror_check_arg( (prop!=0),"prop"); | 1844 | icalerror_check_arg( (prop!=0),"prop"); |
1599 | return icalvalue_get_text(icalproperty_get_value(prop)); | 1845 | return icalvalue_get_text(icalproperty_get_value(prop)); |
1600 | } | 1846 | } |
@@ -1607,6 +1853,7 @@ icalproperty* icalproperty_vanew_tzoffsetfrom(int v, ...){ | |||
1607 | va_end(args); | 1853 | va_end(args); |
1608 | return (icalproperty*)impl; | 1854 | return (icalproperty*)impl; |
1609 | } | 1855 | } |
1856 | |||
1610 | /* TZOFFSETFROM */ | 1857 | /* TZOFFSETFROM */ |
1611 | icalproperty* icalproperty_new_tzoffsetfrom(int v) { | 1858 | icalproperty* icalproperty_new_tzoffsetfrom(int v) { |
1612 | struct icalproperty_impl *impl = icalproperty_new_impl(ICAL_TZOFFSETFROM_PROPERTY); | 1859 | struct icalproperty_impl *impl = icalproperty_new_impl(ICAL_TZOFFSETFROM_PROPERTY); |
@@ -1619,7 +1866,7 @@ void icalproperty_set_tzoffsetfrom(icalproperty* prop, int v){ | |||
1619 | icalerror_check_arg_rv( (prop!=0),"prop"); | 1866 | icalerror_check_arg_rv( (prop!=0),"prop"); |
1620 | icalproperty_set_value(prop,icalvalue_new_utcoffset(v)); | 1867 | icalproperty_set_value(prop,icalvalue_new_utcoffset(v)); |
1621 | } | 1868 | } |
1622 | int icalproperty_get_tzoffsetfrom(icalproperty* prop){ | 1869 | int icalproperty_get_tzoffsetfrom(const icalproperty* prop){ |
1623 | icalerror_check_arg( (prop!=0),"prop"); | 1870 | icalerror_check_arg( (prop!=0),"prop"); |
1624 | return icalvalue_get_utcoffset(icalproperty_get_value(prop)); | 1871 | return icalvalue_get_utcoffset(icalproperty_get_value(prop)); |
1625 | } | 1872 | } |
@@ -1632,6 +1879,7 @@ icalproperty* icalproperty_vanew_tzoffsetto(int v, ...){ | |||
1632 | va_end(args); | 1879 | va_end(args); |
1633 | return (icalproperty*)impl; | 1880 | return (icalproperty*)impl; |
1634 | } | 1881 | } |
1882 | |||
1635 | /* TZOFFSETTO */ | 1883 | /* TZOFFSETTO */ |
1636 | icalproperty* icalproperty_new_tzoffsetto(int v) { | 1884 | icalproperty* icalproperty_new_tzoffsetto(int v) { |
1637 | struct icalproperty_impl *impl = icalproperty_new_impl(ICAL_TZOFFSETTO_PROPERTY); | 1885 | struct icalproperty_impl *impl = icalproperty_new_impl(ICAL_TZOFFSETTO_PROPERTY); |
@@ -1644,7 +1892,7 @@ void icalproperty_set_tzoffsetto(icalproperty* prop, int v){ | |||
1644 | icalerror_check_arg_rv( (prop!=0),"prop"); | 1892 | icalerror_check_arg_rv( (prop!=0),"prop"); |
1645 | icalproperty_set_value(prop,icalvalue_new_utcoffset(v)); | 1893 | icalproperty_set_value(prop,icalvalue_new_utcoffset(v)); |
1646 | } | 1894 | } |
1647 | int icalproperty_get_tzoffsetto(icalproperty* prop){ | 1895 | int icalproperty_get_tzoffsetto(const icalproperty* prop){ |
1648 | icalerror_check_arg( (prop!=0),"prop"); | 1896 | icalerror_check_arg( (prop!=0),"prop"); |
1649 | return icalvalue_get_utcoffset(icalproperty_get_value(prop)); | 1897 | return icalvalue_get_utcoffset(icalproperty_get_value(prop)); |
1650 | } | 1898 | } |
@@ -1658,6 +1906,7 @@ icalproperty* icalproperty_vanew_tzurl(const char* v, ...){ | |||
1658 | va_end(args); | 1906 | va_end(args); |
1659 | return (icalproperty*)impl; | 1907 | return (icalproperty*)impl; |
1660 | } | 1908 | } |
1909 | |||
1661 | /* TZURL */ | 1910 | /* TZURL */ |
1662 | icalproperty* icalproperty_new_tzurl(const char* v) { | 1911 | icalproperty* icalproperty_new_tzurl(const char* v) { |
1663 | struct icalproperty_impl *impl = icalproperty_new_impl(ICAL_TZURL_PROPERTY); icalerror_check_arg_rz( (v!=0),"v"); | 1912 | struct icalproperty_impl *impl = icalproperty_new_impl(ICAL_TZURL_PROPERTY); icalerror_check_arg_rz( (v!=0),"v"); |
@@ -1672,7 +1921,7 @@ void icalproperty_set_tzurl(icalproperty* prop, const char* v){ | |||
1672 | icalerror_check_arg_rv( (prop!=0),"prop"); | 1921 | icalerror_check_arg_rv( (prop!=0),"prop"); |
1673 | icalproperty_set_value(prop,icalvalue_new_uri(v)); | 1922 | icalproperty_set_value(prop,icalvalue_new_uri(v)); |
1674 | } | 1923 | } |
1675 | const char* icalproperty_get_tzurl(icalproperty* prop){ | 1924 | const char* icalproperty_get_tzurl(const icalproperty* prop){ |
1676 | icalerror_check_arg( (prop!=0),"prop"); | 1925 | icalerror_check_arg( (prop!=0),"prop"); |
1677 | return icalvalue_get_uri(icalproperty_get_value(prop)); | 1926 | return icalvalue_get_uri(icalproperty_get_value(prop)); |
1678 | } | 1927 | } |
@@ -1686,6 +1935,7 @@ icalproperty* icalproperty_vanew_uid(const char* v, ...){ | |||
1686 | va_end(args); | 1935 | va_end(args); |
1687 | return (icalproperty*)impl; | 1936 | return (icalproperty*)impl; |
1688 | } | 1937 | } |
1938 | |||
1689 | /* UID */ | 1939 | /* UID */ |
1690 | icalproperty* icalproperty_new_uid(const char* v) { | 1940 | icalproperty* icalproperty_new_uid(const char* v) { |
1691 | struct icalproperty_impl *impl = icalproperty_new_impl(ICAL_UID_PROPERTY); icalerror_check_arg_rz( (v!=0),"v"); | 1941 | struct icalproperty_impl *impl = icalproperty_new_impl(ICAL_UID_PROPERTY); icalerror_check_arg_rz( (v!=0),"v"); |
@@ -1700,7 +1950,7 @@ void icalproperty_set_uid(icalproperty* prop, const char* v){ | |||
1700 | icalerror_check_arg_rv( (prop!=0),"prop"); | 1950 | icalerror_check_arg_rv( (prop!=0),"prop"); |
1701 | icalproperty_set_value(prop,icalvalue_new_text(v)); | 1951 | icalproperty_set_value(prop,icalvalue_new_text(v)); |
1702 | } | 1952 | } |
1703 | const char* icalproperty_get_uid(icalproperty* prop){ | 1953 | const char* icalproperty_get_uid(const icalproperty* prop){ |
1704 | icalerror_check_arg( (prop!=0),"prop"); | 1954 | icalerror_check_arg( (prop!=0),"prop"); |
1705 | return icalvalue_get_text(icalproperty_get_value(prop)); | 1955 | return icalvalue_get_text(icalproperty_get_value(prop)); |
1706 | } | 1956 | } |
@@ -1714,6 +1964,7 @@ icalproperty* icalproperty_vanew_url(const char* v, ...){ | |||
1714 | va_end(args); | 1964 | va_end(args); |
1715 | return (icalproperty*)impl; | 1965 | return (icalproperty*)impl; |
1716 | } | 1966 | } |
1967 | |||
1717 | /* URL */ | 1968 | /* URL */ |
1718 | icalproperty* icalproperty_new_url(const char* v) { | 1969 | icalproperty* icalproperty_new_url(const char* v) { |
1719 | struct icalproperty_impl *impl = icalproperty_new_impl(ICAL_URL_PROPERTY); icalerror_check_arg_rz( (v!=0),"v"); | 1970 | struct icalproperty_impl *impl = icalproperty_new_impl(ICAL_URL_PROPERTY); icalerror_check_arg_rz( (v!=0),"v"); |
@@ -1728,7 +1979,7 @@ void icalproperty_set_url(icalproperty* prop, const char* v){ | |||
1728 | icalerror_check_arg_rv( (prop!=0),"prop"); | 1979 | icalerror_check_arg_rv( (prop!=0),"prop"); |
1729 | icalproperty_set_value(prop,icalvalue_new_uri(v)); | 1980 | icalproperty_set_value(prop,icalvalue_new_uri(v)); |
1730 | } | 1981 | } |
1731 | const char* icalproperty_get_url(icalproperty* prop){ | 1982 | const char* icalproperty_get_url(const icalproperty* prop){ |
1732 | icalerror_check_arg( (prop!=0),"prop"); | 1983 | icalerror_check_arg( (prop!=0),"prop"); |
1733 | return icalvalue_get_uri(icalproperty_get_value(prop)); | 1984 | return icalvalue_get_uri(icalproperty_get_value(prop)); |
1734 | } | 1985 | } |
@@ -1742,6 +1993,7 @@ icalproperty* icalproperty_vanew_version(const char* v, ...){ | |||
1742 | va_end(args); | 1993 | va_end(args); |
1743 | return (icalproperty*)impl; | 1994 | return (icalproperty*)impl; |
1744 | } | 1995 | } |
1996 | |||
1745 | /* VERSION */ | 1997 | /* VERSION */ |
1746 | icalproperty* icalproperty_new_version(const char* v) { | 1998 | icalproperty* icalproperty_new_version(const char* v) { |
1747 | struct icalproperty_impl *impl = icalproperty_new_impl(ICAL_VERSION_PROPERTY); icalerror_check_arg_rz( (v!=0),"v"); | 1999 | struct icalproperty_impl *impl = icalproperty_new_impl(ICAL_VERSION_PROPERTY); icalerror_check_arg_rz( (v!=0),"v"); |
@@ -1756,7 +2008,7 @@ void icalproperty_set_version(icalproperty* prop, const char* v){ | |||
1756 | icalerror_check_arg_rv( (prop!=0),"prop"); | 2008 | icalerror_check_arg_rv( (prop!=0),"prop"); |
1757 | icalproperty_set_value(prop,icalvalue_new_text(v)); | 2009 | icalproperty_set_value(prop,icalvalue_new_text(v)); |
1758 | } | 2010 | } |
1759 | const char* icalproperty_get_version(icalproperty* prop){ | 2011 | const char* icalproperty_get_version(const icalproperty* prop){ |
1760 | icalerror_check_arg( (prop!=0),"prop"); | 2012 | icalerror_check_arg( (prop!=0),"prop"); |
1761 | return icalvalue_get_text(icalproperty_get_value(prop)); | 2013 | return icalvalue_get_text(icalproperty_get_value(prop)); |
1762 | } | 2014 | } |
@@ -1770,6 +2022,7 @@ icalproperty* icalproperty_vanew_x(const char* v, ...){ | |||
1770 | va_end(args); | 2022 | va_end(args); |
1771 | return (icalproperty*)impl; | 2023 | return (icalproperty*)impl; |
1772 | } | 2024 | } |
2025 | |||
1773 | /* X */ | 2026 | /* X */ |
1774 | icalproperty* icalproperty_new_x(const char* v) { | 2027 | icalproperty* icalproperty_new_x(const char* v) { |
1775 | struct icalproperty_impl *impl = icalproperty_new_impl(ICAL_X_PROPERTY); icalerror_check_arg_rz( (v!=0),"v"); | 2028 | struct icalproperty_impl *impl = icalproperty_new_impl(ICAL_X_PROPERTY); icalerror_check_arg_rz( (v!=0),"v"); |
@@ -1782,11 +2035,37 @@ void icalproperty_set_x(icalproperty* prop, const char* v){ | |||
1782 | icalerror_check_arg_rv( (v!=0),"v"); | 2035 | icalerror_check_arg_rv( (v!=0),"v"); |
1783 | 2036 | ||
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 | } |
1787 | const char* icalproperty_get_x(icalproperty* prop){ | 2040 | const 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 | } | ||
2044 | icalproperty* 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 */ | ||
2055 | icalproperty* 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 | |||
2061 | void 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 | } | ||
2066 | enum 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 | } |
1791 | icalproperty* icalproperty_vanew_xlicclustercount(const char* v, ...){ | 2070 | icalproperty* icalproperty_vanew_xlicclustercount(const char* v, ...){ |
1792 | va_list args; | 2071 | va_list args; |
@@ -1798,6 +2077,7 @@ icalproperty* icalproperty_vanew_xlicclustercount(const char* v, ...){ | |||
1798 | va_end(args); | 2077 | va_end(args); |
1799 | return (icalproperty*)impl; | 2078 | return (icalproperty*)impl; |
1800 | } | 2079 | } |
2080 | |||
1801 | /* X-LIC-CLUSTERCOUNT */ | 2081 | /* X-LIC-CLUSTERCOUNT */ |
1802 | icalproperty* icalproperty_new_xlicclustercount(const char* v) { | 2082 | icalproperty* icalproperty_new_xlicclustercount(const char* v) { |
1803 | struct icalproperty_impl *impl = icalproperty_new_impl(ICAL_XLICCLUSTERCOUNT_PROPERTY); icalerror_check_arg_rz( (v!=0),"v"); | 2083 | struct icalproperty_impl *impl = icalproperty_new_impl(ICAL_XLICCLUSTERCOUNT_PROPERTY); icalerror_check_arg_rz( (v!=0),"v"); |
@@ -1812,7 +2092,7 @@ void icalproperty_set_xlicclustercount(icalproperty* prop, const char* v){ | |||
1812 | icalerror_check_arg_rv( (prop!=0),"prop"); | 2092 | icalerror_check_arg_rv( (prop!=0),"prop"); |
1813 | icalproperty_set_value(prop,icalvalue_new_string(v)); | 2093 | icalproperty_set_value(prop,icalvalue_new_string(v)); |
1814 | } | 2094 | } |
1815 | const char* icalproperty_get_xlicclustercount(icalproperty* prop){ | 2095 | const char* icalproperty_get_xlicclustercount(const icalproperty* prop){ |
1816 | icalerror_check_arg( (prop!=0),"prop"); | 2096 | icalerror_check_arg( (prop!=0),"prop"); |
1817 | return icalvalue_get_string(icalproperty_get_value(prop)); | 2097 | return icalvalue_get_string(icalproperty_get_value(prop)); |
1818 | } | 2098 | } |
@@ -1826,6 +2106,7 @@ icalproperty* icalproperty_vanew_xlicerror(const char* v, ...){ | |||
1826 | va_end(args); | 2106 | va_end(args); |
1827 | return (icalproperty*)impl; | 2107 | return (icalproperty*)impl; |
1828 | } | 2108 | } |
2109 | |||
1829 | /* X-LIC-ERROR */ | 2110 | /* X-LIC-ERROR */ |
1830 | icalproperty* icalproperty_new_xlicerror(const char* v) { | 2111 | icalproperty* icalproperty_new_xlicerror(const char* v) { |
1831 | struct icalproperty_impl *impl = icalproperty_new_impl(ICAL_XLICERROR_PROPERTY); icalerror_check_arg_rz( (v!=0),"v"); | 2112 | struct icalproperty_impl *impl = icalproperty_new_impl(ICAL_XLICERROR_PROPERTY); icalerror_check_arg_rz( (v!=0),"v"); |
@@ -1840,7 +2121,7 @@ void icalproperty_set_xlicerror(icalproperty* prop, const char* v){ | |||
1840 | icalerror_check_arg_rv( (prop!=0),"prop"); | 2121 | icalerror_check_arg_rv( (prop!=0),"prop"); |
1841 | icalproperty_set_value(prop,icalvalue_new_text(v)); | 2122 | icalproperty_set_value(prop,icalvalue_new_text(v)); |
1842 | } | 2123 | } |
1843 | const char* icalproperty_get_xlicerror(icalproperty* prop){ | 2124 | const char* icalproperty_get_xlicerror(const icalproperty* prop){ |
1844 | icalerror_check_arg( (prop!=0),"prop"); | 2125 | icalerror_check_arg( (prop!=0),"prop"); |
1845 | return icalvalue_get_text(icalproperty_get_value(prop)); | 2126 | return icalvalue_get_text(icalproperty_get_value(prop)); |
1846 | } | 2127 | } |
@@ -1854,6 +2135,7 @@ icalproperty* icalproperty_vanew_xlicmimecharset(const char* v, ...){ | |||
1854 | va_end(args); | 2135 | va_end(args); |
1855 | return (icalproperty*)impl; | 2136 | return (icalproperty*)impl; |
1856 | } | 2137 | } |
2138 | |||
1857 | /* X-LIC-MIMECHARSET */ | 2139 | /* X-LIC-MIMECHARSET */ |
1858 | icalproperty* icalproperty_new_xlicmimecharset(const char* v) { | 2140 | icalproperty* icalproperty_new_xlicmimecharset(const char* v) { |
1859 | struct icalproperty_impl *impl = icalproperty_new_impl(ICAL_XLICMIMECHARSET_PROPERTY); icalerror_check_arg_rz( (v!=0),"v"); | 2141 | struct icalproperty_impl *impl = icalproperty_new_impl(ICAL_XLICMIMECHARSET_PROPERTY); icalerror_check_arg_rz( (v!=0),"v"); |
@@ -1868,7 +2150,7 @@ void icalproperty_set_xlicmimecharset(icalproperty* prop, const char* v){ | |||
1868 | icalerror_check_arg_rv( (prop!=0),"prop"); | 2150 | icalerror_check_arg_rv( (prop!=0),"prop"); |
1869 | icalproperty_set_value(prop,icalvalue_new_string(v)); | 2151 | icalproperty_set_value(prop,icalvalue_new_string(v)); |
1870 | } | 2152 | } |
1871 | const char* icalproperty_get_xlicmimecharset(icalproperty* prop){ | 2153 | const char* icalproperty_get_xlicmimecharset(const icalproperty* prop){ |
1872 | icalerror_check_arg( (prop!=0),"prop"); | 2154 | icalerror_check_arg( (prop!=0),"prop"); |
1873 | return icalvalue_get_string(icalproperty_get_value(prop)); | 2155 | return icalvalue_get_string(icalproperty_get_value(prop)); |
1874 | } | 2156 | } |
@@ -1882,6 +2164,7 @@ icalproperty* icalproperty_vanew_xlicmimecid(const char* v, ...){ | |||
1882 | va_end(args); | 2164 | va_end(args); |
1883 | return (icalproperty*)impl; | 2165 | return (icalproperty*)impl; |
1884 | } | 2166 | } |
2167 | |||
1885 | /* X-LIC-MIMECID */ | 2168 | /* X-LIC-MIMECID */ |
1886 | icalproperty* icalproperty_new_xlicmimecid(const char* v) { | 2169 | icalproperty* icalproperty_new_xlicmimecid(const char* v) { |
1887 | struct icalproperty_impl *impl = icalproperty_new_impl(ICAL_XLICMIMECID_PROPERTY); icalerror_check_arg_rz( (v!=0),"v"); | 2170 | struct icalproperty_impl *impl = icalproperty_new_impl(ICAL_XLICMIMECID_PROPERTY); icalerror_check_arg_rz( (v!=0),"v"); |
@@ -1896,7 +2179,7 @@ void icalproperty_set_xlicmimecid(icalproperty* prop, const char* v){ | |||
1896 | icalerror_check_arg_rv( (prop!=0),"prop"); | 2179 | icalerror_check_arg_rv( (prop!=0),"prop"); |
1897 | icalproperty_set_value(prop,icalvalue_new_string(v)); | 2180 | icalproperty_set_value(prop,icalvalue_new_string(v)); |
1898 | } | 2181 | } |
1899 | const char* icalproperty_get_xlicmimecid(icalproperty* prop){ | 2182 | const char* icalproperty_get_xlicmimecid(const icalproperty* prop){ |
1900 | icalerror_check_arg( (prop!=0),"prop"); | 2183 | icalerror_check_arg( (prop!=0),"prop"); |
1901 | return icalvalue_get_string(icalproperty_get_value(prop)); | 2184 | return icalvalue_get_string(icalproperty_get_value(prop)); |
1902 | } | 2185 | } |
@@ -1910,6 +2193,7 @@ icalproperty* icalproperty_vanew_xlicmimecontenttype(const char* v, ...){ | |||
1910 | va_end(args); | 2193 | va_end(args); |
1911 | return (icalproperty*)impl; | 2194 | return (icalproperty*)impl; |
1912 | } | 2195 | } |
2196 | |||
1913 | /* X-LIC-MIMECONTENTTYPE */ | 2197 | /* X-LIC-MIMECONTENTTYPE */ |
1914 | icalproperty* icalproperty_new_xlicmimecontenttype(const char* v) { | 2198 | icalproperty* icalproperty_new_xlicmimecontenttype(const char* v) { |
1915 | struct icalproperty_impl *impl = icalproperty_new_impl(ICAL_XLICMIMECONTENTTYPE_PROPERTY); icalerror_check_arg_rz( (v!=0),"v"); | 2199 | struct icalproperty_impl *impl = icalproperty_new_impl(ICAL_XLICMIMECONTENTTYPE_PROPERTY); icalerror_check_arg_rz( (v!=0),"v"); |
@@ -1924,7 +2208,7 @@ void icalproperty_set_xlicmimecontenttype(icalproperty* prop, const char* v){ | |||
1924 | icalerror_check_arg_rv( (prop!=0),"prop"); | 2208 | icalerror_check_arg_rv( (prop!=0),"prop"); |
1925 | icalproperty_set_value(prop,icalvalue_new_string(v)); | 2209 | icalproperty_set_value(prop,icalvalue_new_string(v)); |
1926 | } | 2210 | } |
1927 | const char* icalproperty_get_xlicmimecontenttype(icalproperty* prop){ | 2211 | const char* icalproperty_get_xlicmimecontenttype(const icalproperty* prop){ |
1928 | icalerror_check_arg( (prop!=0),"prop"); | 2212 | icalerror_check_arg( (prop!=0),"prop"); |
1929 | return icalvalue_get_string(icalproperty_get_value(prop)); | 2213 | return icalvalue_get_string(icalproperty_get_value(prop)); |
1930 | } | 2214 | } |
@@ -1938,6 +2222,7 @@ icalproperty* icalproperty_vanew_xlicmimeencoding(const char* v, ...){ | |||
1938 | va_end(args); | 2222 | va_end(args); |
1939 | return (icalproperty*)impl; | 2223 | return (icalproperty*)impl; |
1940 | } | 2224 | } |
2225 | |||
1941 | /* X-LIC-MIMEENCODING */ | 2226 | /* X-LIC-MIMEENCODING */ |
1942 | icalproperty* icalproperty_new_xlicmimeencoding(const char* v) { | 2227 | icalproperty* icalproperty_new_xlicmimeencoding(const char* v) { |
1943 | struct icalproperty_impl *impl = icalproperty_new_impl(ICAL_XLICMIMEENCODING_PROPERTY); icalerror_check_arg_rz( (v!=0),"v"); | 2228 | struct icalproperty_impl *impl = icalproperty_new_impl(ICAL_XLICMIMEENCODING_PROPERTY); icalerror_check_arg_rz( (v!=0),"v"); |
@@ -1952,7 +2237,7 @@ void icalproperty_set_xlicmimeencoding(icalproperty* prop, const char* v){ | |||
1952 | icalerror_check_arg_rv( (prop!=0),"prop"); | 2237 | icalerror_check_arg_rv( (prop!=0),"prop"); |
1953 | icalproperty_set_value(prop,icalvalue_new_string(v)); | 2238 | icalproperty_set_value(prop,icalvalue_new_string(v)); |
1954 | } | 2239 | } |
1955 | const char* icalproperty_get_xlicmimeencoding(icalproperty* prop){ | 2240 | const char* icalproperty_get_xlicmimeencoding(const icalproperty* prop){ |
1956 | icalerror_check_arg( (prop!=0),"prop"); | 2241 | icalerror_check_arg( (prop!=0),"prop"); |
1957 | return icalvalue_get_string(icalproperty_get_value(prop)); | 2242 | return icalvalue_get_string(icalproperty_get_value(prop)); |
1958 | } | 2243 | } |
@@ -1966,6 +2251,7 @@ icalproperty* icalproperty_vanew_xlicmimefilename(const char* v, ...){ | |||
1966 | va_end(args); | 2251 | va_end(args); |
1967 | return (icalproperty*)impl; | 2252 | return (icalproperty*)impl; |
1968 | } | 2253 | } |
2254 | |||
1969 | /* X-LIC-MIMEFILENAME */ | 2255 | /* X-LIC-MIMEFILENAME */ |
1970 | icalproperty* icalproperty_new_xlicmimefilename(const char* v) { | 2256 | icalproperty* icalproperty_new_xlicmimefilename(const char* v) { |
1971 | struct icalproperty_impl *impl = icalproperty_new_impl(ICAL_XLICMIMEFILENAME_PROPERTY); icalerror_check_arg_rz( (v!=0),"v"); | 2257 | struct icalproperty_impl *impl = icalproperty_new_impl(ICAL_XLICMIMEFILENAME_PROPERTY); icalerror_check_arg_rz( (v!=0),"v"); |
@@ -1980,7 +2266,7 @@ void icalproperty_set_xlicmimefilename(icalproperty* prop, const char* v){ | |||
1980 | icalerror_check_arg_rv( (prop!=0),"prop"); | 2266 | icalerror_check_arg_rv( (prop!=0),"prop"); |
1981 | icalproperty_set_value(prop,icalvalue_new_string(v)); | 2267 | icalproperty_set_value(prop,icalvalue_new_string(v)); |
1982 | } | 2268 | } |
1983 | const char* icalproperty_get_xlicmimefilename(icalproperty* prop){ | 2269 | const char* icalproperty_get_xlicmimefilename(const icalproperty* prop){ |
1984 | icalerror_check_arg( (prop!=0),"prop"); | 2270 | icalerror_check_arg( (prop!=0),"prop"); |
1985 | return icalvalue_get_string(icalproperty_get_value(prop)); | 2271 | return icalvalue_get_string(icalproperty_get_value(prop)); |
1986 | } | 2272 | } |
@@ -1994,6 +2280,7 @@ icalproperty* icalproperty_vanew_xlicmimeoptinfo(const char* v, ...){ | |||
1994 | va_end(args); | 2280 | va_end(args); |
1995 | return (icalproperty*)impl; | 2281 | return (icalproperty*)impl; |
1996 | } | 2282 | } |
2283 | |||
1997 | /* X-LIC-MIMEOPTINFO */ | 2284 | /* X-LIC-MIMEOPTINFO */ |
1998 | icalproperty* icalproperty_new_xlicmimeoptinfo(const char* v) { | 2285 | icalproperty* icalproperty_new_xlicmimeoptinfo(const char* v) { |
1999 | struct icalproperty_impl *impl = icalproperty_new_impl(ICAL_XLICMIMEOPTINFO_PROPERTY); icalerror_check_arg_rz( (v!=0),"v"); | 2286 | struct icalproperty_impl *impl = icalproperty_new_impl(ICAL_XLICMIMEOPTINFO_PROPERTY); icalerror_check_arg_rz( (v!=0),"v"); |
@@ -2008,7 +2295,220 @@ void icalproperty_set_xlicmimeoptinfo(icalproperty* prop, const char* v){ | |||
2008 | icalerror_check_arg_rv( (prop!=0),"prop"); | 2295 | icalerror_check_arg_rv( (prop!=0),"prop"); |
2009 | icalproperty_set_value(prop,icalvalue_new_string(v)); | 2296 | icalproperty_set_value(prop,icalvalue_new_string(v)); |
2010 | } | 2297 | } |
2011 | const char* icalproperty_get_xlicmimeoptinfo(icalproperty* prop){ | 2298 | const char* icalproperty_get_xlicmimeoptinfo(const icalproperty* prop){ |
2012 | icalerror_check_arg( (prop!=0),"prop"); | 2299 | icalerror_check_arg( (prop!=0),"prop"); |
2013 | return icalvalue_get_string(icalproperty_get_value(prop)); | 2300 | return icalvalue_get_string(icalproperty_get_value(prop)); |
2014 | } | 2301 | } |
2302 | |||
2303 | int 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 | |||
2314 | const 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 | |||
2329 | icalproperty_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 | |||
2353 | icalproperty_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 | |||
2368 | icalvalue_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 | |||
2382 | const 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 | |||
2390 | int 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 */ | ||
2421 | int 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 | |||
2440 | int 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 | |||
2456 | const 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 | |||
2464 | icalproperty_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 | |||
2486 | const 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 | |||
2494 | icalproperty_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 | } | ||