summaryrefslogtreecommitdiffabout
path: root/libical/src/libical/ical.h
Unidiff
Diffstat (limited to 'libical/src/libical/ical.h') (more/less context) (ignore whitespace changes)
-rw-r--r--libical/src/libical/ical.h2996
1 files changed, 2996 insertions, 0 deletions
diff --git a/libical/src/libical/ical.h b/libical/src/libical/ical.h
new file mode 100644
index 0000000..69a2c3a
--- a/dev/null
+++ b/libical/src/libical/ical.h
@@ -0,0 +1,2996 @@
1#ifndef ICAL_VERSION_H
2#define ICAL_VERSION_H
3
4#define ICAL_PACKAGE "libical"
5#define ICAL_VERSION "0.23"
6
7#endif
8/* -*- Mode: C -*- */
9/*======================================================================
10 FILE: icaltime.h
11 CREATOR: eric 02 June 2000
12
13
14 $Id$
15 $Locker$
16
17 (C) COPYRIGHT 2000, Eric Busboom, http://www.softwarestudio.org
18
19 This program is free software; you can redistribute it and/or modify
20 it under the terms of either:
21
22 The LGPL as published by the Free Software Foundation, version
23 2.1, available at: http://www.fsf.org/copyleft/lesser.html
24
25 Or:
26
27 The Mozilla Public License Version 1.0. You may obtain a copy of
28 the License at http://www.mozilla.org/MPL/
29
30 The Original Code is eric. The Initial Developer of the Original
31 Code is Eric Busboom
32
33
34======================================================================*/
35
36#ifndef ICALTIME_H
37#define ICALTIME_H
38
39#include <time.h>
40
41/* icaltime_span is returned by icalcomponent_get_span() */
42struct icaltime_span {
43 time_t start; /* in UTC */
44 time_t end; /* in UTC */
45 int is_busy; /* 1->busy time, 0-> free time */
46};
47
48
49struct icaltimetype
50{
51 int year;
52 int month;
53 int day;
54 int hour;
55 int minute;
56 int second;
57
58 int is_utc; /* 1-> time is in UTC timezone */
59
60 int is_date; /* 1 -> interpret this as date. */
61
62 const char* zone; /*Ptr to Olsen placename. Libical does not own mem*/
63 };
64
65/* Convert seconds past UNIX epoch to a timetype*/
66struct icaltimetype icaltime_from_timet(time_t v, int is_date);
67
68/* Return the time as seconds past the UNIX epoch */
69time_t icaltime_as_timet(struct icaltimetype);
70
71/* Return a string represention of the time, in RFC2445 format. The
72 string is owned by libical */
73char* icaltime_as_ical_string(struct icaltimetype tt);
74
75/* Like icaltime_from_timet(), except that the input may be in seconds
76 past the epoch in floating time. This routine is deprecated */
77struct icaltimetype icaltime_from_int(int v, int is_date, int is_utc);
78
79/* Like icaltime_as_timet, but in a floating epoch. This routine is deprecated */
80int icaltime_as_int(struct icaltimetype);
81
82/* create a time from an ISO format string */
83struct icaltimetype icaltime_from_string(const char* str);
84
85/* Routines for handling timezones */
86/* Return the offset of the named zone as seconds. tt is a time
87 indicating the date for which you want the offset */
88int icaltime_utc_offset(struct icaltimetype tt, const char* tzid);
89
90/* convert tt, of timezone tzid, into a utc time. Does nothing if the
91 time is already UTC. */
92struct icaltimetype icaltime_as_utc(struct icaltimetype tt,
93 const char* tzid);
94
95/* convert tt, a time in UTC, into a time in timezone tzid */
96struct icaltimetype icaltime_as_zone(struct icaltimetype tt,
97 const char* tzid);
98
99/* Return a null time, which indicates no time has been set. This time represent the beginning of the epoch */
100struct icaltimetype icaltime_null_time(void);
101
102/* Return true of the time is null. */
103int icaltime_is_null_time(struct icaltimetype t);
104
105/* Returns false if the time is clearly invalid, but is not null. This
106 is usually the result of creating a new time type buy not clearing
107 it, or setting one of the flags to an illegal value. */
108int icaltime_is_valid_time(struct icaltimetype t);
109
110/* Reset all of the time components to be in their normal ranges. For
111 instance, given a time with minutes=70, the minutes will be reduces
112 to 10, and the hour incremented. This allows the caller to do
113 arithmetic on times without worrying about overflow or
114 underflow. */
115struct icaltimetype icaltime_normalize(struct icaltimetype t);
116
117/* Return the day of the year of the given time */
118short icaltime_day_of_year(struct icaltimetype t);
119
120/* Create a new time, given a day of year and a year. */
121struct icaltimetype icaltime_from_day_of_year(short doy, short year);
122
123/* Return the day of the week of the given time. Sunday is 1 */
124short icaltime_day_of_week(struct icaltimetype t);
125
126/* Return the day of the year for the Sunday of the week that the
127 given time is within. */
128short icaltime_start_doy_of_week(struct icaltimetype t);
129
130/* Return a string with the time represented in the same format as ctime(). THe string is owned by libical */
131char* icaltime_as_ctime(struct icaltimetype);
132
133/* Return the week number for the week the given time is within */
134short icaltime_week_number(struct icaltimetype t);
135
136/* Create a new time from a weeknumber and a year. */
137struct icaltimetype icaltime_from_week_number(short week_number, short year);
138
139/* Return -1, 0, or 1 to indicate that a<b, a==b or a>b */
140int icaltime_compare(struct icaltimetype a,struct icaltimetype b);
141
142/* like icaltime_compare, but only use the date parts. */
143int icaltime_compare_date_only(struct icaltimetype a, struct icaltimetype b);
144
145/* Return the number of days in the given month */
146short icaltime_days_in_month(short month,short year);
147
148
149#endif /* !ICALTIME_H */
150
151
152
153/* -*- Mode: C -*- */
154/*======================================================================
155 FILE: icalduration.h
156 CREATOR: eric 26 Jan 2001
157
158
159 $Id$
160 $Locker$
161
162 (C) COPYRIGHT 2000, Eric Busboom, http://www.softwarestudio.org
163
164 This program is free software; you can redistribute it and/or modify
165 it under the terms of either:
166
167 The LGPL as published by the Free Software Foundation, version
168 2.1, available at: http://www.fsf.org/copyleft/lesser.html
169
170 Or:
171
172 The Mozilla Public License Version 1.0. You may obtain a copy of
173 the License at http://www.mozilla.org/MPL/
174
175 The Original Code is eric. The Initial Developer of the Original
176 Code is Eric Busboom
177
178
179======================================================================*/
180
181#ifndef ICALDURATION_H
182#define ICALDURATION_H
183
184
185struct icaldurationtype
186{
187 int is_neg;
188 unsigned int days;
189 unsigned int weeks;
190 unsigned int hours;
191 unsigned int minutes;
192 unsigned int seconds;
193};
194
195struct icaldurationtype icaldurationtype_from_int(int t);
196struct icaldurationtype icaldurationtype_from_string(const char*);
197int icaldurationtype_as_int(struct icaldurationtype duration);
198char* icaldurationtype_as_ical_string(struct icaldurationtype d);
199struct icaldurationtype icaldurationtype_null_duration();
200int icaldurationtype_is_null_duration(struct icaldurationtype d);
201
202struct icaltimetype icaltime_add(struct icaltimetype t,
203 struct icaldurationtype d);
204
205struct icaldurationtype icaltime_subtract(struct icaltimetype t1,
206 struct icaltimetype t2);
207
208#endif /* !ICALDURATION_H */
209
210
211
212/* -*- Mode: C -*- */
213/*======================================================================
214 FILE: icalperiod.h
215 CREATOR: eric 26 Jan 2001
216
217
218 $Id$
219 $Locker$
220
221 (C) COPYRIGHT 2000, Eric Busboom, http://www.softwarestudio.org
222
223 This program is free software; you can redistribute it and/or modify
224 it under the terms of either:
225
226 The LGPL as published by the Free Software Foundation, version
227 2.1, available at: http://www.fsf.org/copyleft/lesser.html
228
229 Or:
230
231 The Mozilla Public License Version 1.0. You may obtain a copy of
232 the License at http://www.mozilla.org/MPL/
233
234 The Original Code is eric. The Initial Developer of the Original
235 Code is Eric Busboom
236
237
238======================================================================*/
239
240#ifndef ICALPERIOD_H
241#define ICALPERIOD_H
242
243
244struct icalperiodtype
245{
246 struct icaltimetype start;
247 struct icaltimetype end;
248 struct icaldurationtype duration;
249};
250
251struct icalperiodtype icalperiodtype_from_string (const char* str);
252
253const char* icalperiodtype_as_ical_string(struct icalperiodtype p);
254struct icalperiodtype icalperiodtype_null_period();
255int icalperiodtype_is_null_period(struct icalperiodtype p);
256int icalperiodtype_is_valid_period(struct icalperiodtype p);
257
258
259
260
261#endif /* !ICALTIME_H */
262
263
264
265
266/* -*- Mode: C -*-*/
267/*======================================================================
268 FILE: icalenums.h
269
270
271
272 (C) COPYRIGHT 2000, Eric Busboom, http://www.softwarestudio.org
273
274 This program is free software; you can redistribute it and/or modify
275 it under the terms of either:
276
277 The LGPL as published by the Free Software Foundation, version
278 2.1, available at: http://www.fsf.org/copyleft/lesser.html
279
280 Or:
281
282 The Mozilla Public License Version 1.0. You may obtain a copy of
283 the License at http://www.mozilla.org/MPL/
284
285 The original code is icalenums.h
286
287 Contributions from:
288 Graham Davison (g.m.davison@computer.org)
289
290======================================================================*/
291
292#ifndef ICALENUMS_H
293#define ICALENUMS_H
294
295
296
297/***********************************************************************
298 * Component enumerations
299**********************************************************************/
300
301typedef enum icalcomponent_kind {
302 ICAL_NO_COMPONENT,
303 ICAL_ANY_COMPONENT,/* Used to select all components*/
304 ICAL_XROOT_COMPONENT,
305 ICAL_XATTACH_COMPONENT, /* MIME attached data, returned by parser. */
306 ICAL_VEVENT_COMPONENT,
307 ICAL_VTODO_COMPONENT,
308 ICAL_VJOURNAL_COMPONENT,
309 ICAL_VCALENDAR_COMPONENT,
310 ICAL_VFREEBUSY_COMPONENT,
311 ICAL_VALARM_COMPONENT,
312 ICAL_XAUDIOALARM_COMPONENT,
313 ICAL_XDISPLAYALARM_COMPONENT,
314 ICAL_XEMAILALARM_COMPONENT,
315 ICAL_XPROCEDUREALARM_COMPONENT,
316 ICAL_VTIMEZONE_COMPONENT,
317 ICAL_XSTANDARD_COMPONENT,
318 ICAL_XDAYLIGHT_COMPONENT,
319 ICAL_X_COMPONENT,
320 ICAL_VSCHEDULE_COMPONENT,
321 ICAL_VQUERY_COMPONENT,
322 ICAL_VCAR_COMPONENT,
323 ICAL_VCOMMAND_COMPONENT,
324 ICAL_XLICINVALID_COMPONENT,
325 ICAL_XLICMIMEPART_COMPONENT /* a non-stardard component that mirrors
326 structure of MIME data */
327
328} icalcomponent_kind;
329
330
331
332/***********************************************************************
333 * Request Status codes
334 **********************************************************************/
335
336typedef enum icalrequeststatus {
337 ICAL_UNKNOWN_STATUS,
338 ICAL_2_0_SUCCESS_STATUS,
339 ICAL_2_1_FALLBACK_STATUS,
340 ICAL_2_2_IGPROP_STATUS,
341 ICAL_2_3_IGPARAM_STATUS,
342 ICAL_2_4_IGXPROP_STATUS,
343 ICAL_2_5_IGXPARAM_STATUS,
344 ICAL_2_6_IGCOMP_STATUS,
345 ICAL_2_7_FORWARD_STATUS,
346 ICAL_2_8_ONEEVENT_STATUS,
347 ICAL_2_9_TRUNC_STATUS,
348 ICAL_2_10_ONETODO_STATUS,
349 ICAL_2_11_TRUNCRRULE_STATUS,
350 ICAL_3_0_INVPROPNAME_STATUS,
351 ICAL_3_1_INVPROPVAL_STATUS,
352 ICAL_3_2_INVPARAM_STATUS,
353 ICAL_3_3_INVPARAMVAL_STATUS,
354 ICAL_3_4_INVCOMP_STATUS,
355 ICAL_3_5_INVTIME_STATUS,
356 ICAL_3_6_INVRULE_STATUS,
357 ICAL_3_7_INVCU_STATUS,
358 ICAL_3_8_NOAUTH_STATUS,
359 ICAL_3_9_BADVERSION_STATUS,
360 ICAL_3_10_TOOBIG_STATUS,
361 ICAL_3_11_MISSREQCOMP_STATUS,
362 ICAL_3_12_UNKCOMP_STATUS,
363 ICAL_3_13_BADCOMP_STATUS,
364 ICAL_3_14_NOCAP_STATUS,
365 ICAL_4_0_BUSY_STATUS,
366 ICAL_5_0_MAYBE_STATUS,
367 ICAL_5_1_UNAVAIL_STATUS,
368 ICAL_5_2_NOSERVICE_STATUS,
369 ICAL_5_3_NOSCHED_STATUS
370} icalrequeststatus;
371
372
373const char* icalenum_reqstat_desc(icalrequeststatus stat);
374short icalenum_reqstat_major(icalrequeststatus stat);
375short icalenum_reqstat_minor(icalrequeststatus stat);
376icalrequeststatus icalenum_num_to_reqstat(short major, short minor);
377
378/***********************************************************************
379 * Conversion functions
380**********************************************************************/
381
382
383/* Thse routines used to be in icalenums.c, but were moved into the
384 icalproperty, icalparameter, icalvalue, or icalcomponent modules. */
385
386/* const char* icalproperty_kind_to_string(icalproperty_kind kind);*/
387#define icalenum_property_kind_to_string(x) icalproperty_kind_to_string(x)
388
389/*icalproperty_kind icalproperty_string_to_kind(const char* string)*/
390#define icalenum_string_to_property_kind(x) icalproperty_string_to_kind(x)
391
392/*icalvalue_kind icalproperty_kind_to_value_kind(icalproperty_kind kind);*/
393#define icalenum_property_kind_to_value_kind(x) icalproperty_kind_to_value_kind(x)
394
395/*const char* icalenum_method_to_string(icalproperty_method);*/
396#define icalenum_method_to_string(x) icalproperty_method_to_string(x)
397
398/*icalproperty_method icalenum_string_to_method(const char* string);*/
399#define icalenum_string_to_method(x) icalproperty_string_to_method(x)
400
401/*const char* icalenum_status_to_string(icalproperty_status);*/
402#define icalenum_status_to_string(x) icalproperty_status_to_string(x)
403
404/*icalproperty_status icalenum_string_to_status(const char* string);*/
405#define icalenum_string_to_status(x) icalproperty_string_to_status(x)
406
407/*icalvalue_kind icalenum_string_to_value_kind(const char* str);*/
408#define icalenum_string_to_value_kind(x) icalvalue_string_to_kind(x)
409
410/*const char* icalenum_value_kind_to_string(icalvalue_kind kind);*/
411#define icalenum_value_kind_to_string(x) icalvalue_kind_to_string(x)
412
413/*const char* icalenum_component_kind_to_string(icalcomponent_kind kind);*/
414#define icalenum_component_kind_to_string(x) icalcomponent_kind_to_string(x)
415
416/*icalcomponent_kind icalenum_string_to_component_kind(const char* string);*/
417#define icalenum_string_to_component_kind(x) icalcomponent_string_to_kind(x)
418
419
420#endif /* !ICALENUMS_H */
421
422/* -*- Mode: C -*- */
423/*======================================================================
424 FILE: icaltypes.h
425 CREATOR: eric 20 March 1999
426
427
428 (C) COPYRIGHT 2000, Eric Busboom, http://www.softwarestudio.org
429
430 This program is free software; you can redistribute it and/or modify
431 it under the terms of either:
432
433 The LGPL as published by the Free Software Foundation, version
434 2.1, available at: http://www.fsf.org/copyleft/lesser.html
435
436 Or:
437
438 The Mozilla Public License Version 1.0. You may obtain a copy of
439 the License at http://www.mozilla.org/MPL/
440
441 The original code is icaltypes.h
442
443======================================================================*/
444
445#ifndef ICALTYPES_H
446#define ICALTYPES_H
447
448#include <time.h>
449
450
451/* This type type should probably be an opaque type... */
452struct icalattachtype
453{
454 void* binary;
455 int owns_binary;
456
457 char* base64;
458 int owns_base64;
459
460 char* url;
461
462 int refcount;
463
464};
465
466/* converts base64 to binary, fetches url and stores as binary, or
467 just returns data */
468
469struct icalattachtype* icalattachtype_new(void);
470void icalattachtype_add_reference(struct icalattachtype* v);
471void icalattachtype_free(struct icalattachtype* v);
472
473void icalattachtype_set_url(struct icalattachtype* v, char* url);
474char* icalattachtype_get_url(struct icalattachtype* v);
475
476void icalattachtype_set_base64(struct icalattachtype* v, char* base64,
477 int owns);
478char* icalattachtype_get_base64(struct icalattachtype* v);
479
480void icalattachtype_set_binary(struct icalattachtype* v, char* binary,
481 int owns);
482void* icalattachtype_get_binary(struct icalattachtype* v);
483
484struct icalgeotype
485{
486 float lat;
487 float lon;
488};
489
490
491struct icaldatetimeperiodtype
492{
493 struct icaltimetype time;
494 struct icalperiodtype period;
495};
496
497
498struct icaltriggertype
499{
500 struct icaltimetype time;
501 struct icaldurationtype duration;
502};
503
504struct icaltriggertype icaltriggertype_from_string(const char* str);
505
506int icaltriggertype_is_null_trigger(struct icaltriggertype tr);
507
508/* struct icalreqstattype. This struct contains two string pointers,
509but don't try to free either of them. The "desc" string is a pointer
510to a static table inside the library. Don't try to free it. The
511"debug" string is a pointer into the string that the called passed
512into to icalreqstattype_from_string. Don't try to free it either, and
513don't use it after the original string has been freed.
514
515BTW, you would get that original string from
516*icalproperty_get_requeststatus() or icalvalue_get_text(), when
517operating on a the value of a request_status property. */
518
519struct icalreqstattype {
520
521 icalrequeststatus code;
522 const char* desc;
523 const char* debug;
524};
525
526struct icalreqstattype icalreqstattype_from_string(const char* str);
527const char* icalreqstattype_as_string(struct icalreqstattype);
528
529
530
531struct icaltimezonephase {
532 const char* tzname;
533 int is_stdandard; /* 1 = standard tme, 0 = daylight savings time */
534 struct icaltimetype dtstart;
535 int offsetto;
536 int tzoffsetfrom;
537 const char* comment;
538 struct icaldatetimeperiodtype rdate;
539 const char* rrule;
540};
541
542
543struct icaltimezonetype {
544 const char* tzid;
545 struct icaltimetype last_mod;
546 const char* tzurl;
547
548 /* Array of phases. The end of the array is a phase with tzname == 0 */
549 struct icaltimezonephase *phases;
550};
551
552void icaltimezonetype_free(struct icaltimezonetype tzt);
553
554
555#endif /* !ICALTYPES_H */
556/* -*- Mode: C -*- */
557/*======================================================================
558 FILE: icalrecur.h
559 CREATOR: eric 20 March 2000
560
561
562 (C) COPYRIGHT 2000, Eric Busboom, http://www.softwarestudio.org
563
564 This program is free software; you can redistribute it and/or modify
565 it under the terms of either:
566
567 The LGPL as published by the Free Software Foundation, version
568 2.1, available at: http://www.fsf.org/copyleft/lesser.html
569
570 Or:
571
572 The Mozilla Public License Version 1.0. You may obtain a copy of
573 the License at http://www.mozilla.org/MPL/
574
575How to use:
576
5771) Get a rule and a start time from a component
578 icalproperty rrule;
579 struct icalrecurrencetype recur;
580 struct icaltimetype dtstart;
581
582 rrule = icalcomponent_get_first_property(comp,ICAL_RRULE_PROPERTY);
583 recur = icalproperty_get_rrule(rrule);
584 start = icalproperty_get_dtstart(dtstart);
585
586Or, just make them up:
587 recur = icalrecurrencetype_from_string("FREQ=YEARLY;BYDAY=SU,WE");
588 dtstart = icaltime_from_string("19970101T123000")
589
5902) Create an iterator
591 icalrecur_iterator* ritr;
592 ritr = icalrecur_iterator_new(recur,start);
593
5943) Iterator over the occurrences
595 struct icaltimetype next;
596 while (next = icalrecur_iterator_next(ritr)
597 && !icaltime_is_null_time(next){
598 Do something with next
599 }
600
601Note that that the time returned by icalrecur_iterator_next is in
602whatever timezone that dtstart is in.
603
604======================================================================*/
605
606#ifndef ICALRECUR_H
607#define ICALRECUR_H
608
609#include <time.h>
610
611/***********************************************************************
612 * Recurrance enumerations
613**********************************************************************/
614
615typedef enum icalrecurrencetype_frequency
616{
617 /* These enums are used to index an array, so don't change the
618 order or the integers */
619
620 ICAL_SECONDLY_RECURRENCE=0,
621 ICAL_MINUTELY_RECURRENCE=1,
622 ICAL_HOURLY_RECURRENCE=2,
623 ICAL_DAILY_RECURRENCE=3,
624 ICAL_WEEKLY_RECURRENCE=4,
625 ICAL_MONTHLY_RECURRENCE=5,
626 ICAL_YEARLY_RECURRENCE=6,
627 ICAL_NO_RECURRENCE=7
628
629} icalrecurrencetype_frequency;
630
631typedef enum icalrecurrencetype_weekday
632{
633 ICAL_NO_WEEKDAY,
634 ICAL_SUNDAY_WEEKDAY,
635 ICAL_MONDAY_WEEKDAY,
636 ICAL_TUESDAY_WEEKDAY,
637 ICAL_WEDNESDAY_WEEKDAY,
638 ICAL_THURSDAY_WEEKDAY,
639 ICAL_FRIDAY_WEEKDAY,
640 ICAL_SATURDAY_WEEKDAY
641} icalrecurrencetype_weekday;
642
643enum {
644 ICAL_RECURRENCE_ARRAY_MAX = 0x7f7f,
645 ICAL_RECURRENCE_ARRAY_MAX_BYTE = 0x7f
646};
647
648
649
650/********************** Recurrence type routines **************/
651
652/* See RFC 2445 Section 4.3.10, RECUR Value, for an explaination of
653 the values and fields in struct icalrecurrencetype */
654
655#define ICAL_BY_SECOND_SIZE 61
656#define ICAL_BY_MINUTE_SIZE 61
657#define ICAL_BY_HOUR_SIZE 25
658#define ICAL_BY_DAY_SIZE 364 /* 7 days * 52 weeks */
659#define ICAL_BY_MONTHDAY_SIZE 32
660#define ICAL_BY_YEARDAY_SIZE 367
661#define ICAL_BY_WEEKNO_SIZE 54
662#define ICAL_BY_MONTH_SIZE 13
663#define ICAL_BY_SETPOS_SIZE 367
664
665/* Main struct for holding digested recurrence rules */
666struct icalrecurrencetype
667{
668 icalrecurrencetype_frequency freq;
669
670
671 /* until and count are mutually exclusive. */
672 struct icaltimetype until;
673 int count;
674
675 short interval;
676
677 icalrecurrencetype_weekday week_start;
678
679 /* The BY* parameters can each take a list of values. Here I
680 * assume that the list of values will not be larger than the
681 * range of the value -- that is, the client will not name a
682 * value more than once.
683
684 * Each of the lists is terminated with the value
685 * ICAL_RECURRENCE_ARRAY_MAX unless the the list is full.
686 */
687
688 short by_second[ICAL_BY_SECOND_SIZE];
689 short by_minute[ICAL_BY_MINUTE_SIZE];
690 short by_hour[ICAL_BY_HOUR_SIZE];
691 short by_day[ICAL_BY_DAY_SIZE]; /* Encoded value, see below */
692 short by_month_day[ICAL_BY_MONTHDAY_SIZE];
693 short by_year_day[ ICAL_BY_YEARDAY_SIZE];
694 short by_week_no[ICAL_BY_WEEKNO_SIZE];
695 short by_month[ICAL_BY_MONTH_SIZE];
696 short by_set_pos[ICAL_BY_SETPOS_SIZE];
697};
698
699
700void icalrecurrencetype_clear(struct icalrecurrencetype *r);
701
702/* The 'day' element of the by_day array is encoded to allow
703representation of both the day of the week ( Monday, Tueday), but also
704the Nth day of the week ( First tuesday of the month, last thursday of
705the year) These routines decode the day values */
706
707/* 1 == Monday, etc. */
708enum icalrecurrencetype_weekday icalrecurrencetype_day_day_of_week(short day);
709
710/* 0 == any of day of week. 1 == first, 2 = second, -2 == second to last, etc */
711short icalrecurrencetype_day_position(short day);
712
713
714/***********************************************************************
715 * Recurrance rule parser
716**********************************************************************/
717
718/* Convert between strings ans recurrencetype structures. */
719struct icalrecurrencetype icalrecurrencetype_from_string(const char* str);
720char* icalrecurrencetype_as_string(struct icalrecurrencetype *recur);
721
722
723/********** recurrence iteration routines ********************/
724
725typedef void icalrecur_iterator;
726
727/* Create a new recurrence rule iterator */
728icalrecur_iterator* icalrecur_iterator_new(struct icalrecurrencetype rule,
729 struct icaltimetype dtstart);
730
731/* Get the next occurrence from an iterator */
732struct icaltimetype icalrecur_iterator_next(icalrecur_iterator*);
733
734/* Free the iterator */
735void icalrecur_iterator_free(icalrecur_iterator*);
736
737/* Fills array up with at most 'count' time_t values, each
738 representing an occurrence time in seconds past the POSIX epoch */
739int icalrecur_expand_recurrence(char* rule, time_t start,
740 int count, time_t* array);
741
742
743#endif
744/* -*- Mode: C -*- */
745/*======================================================================
746 FILE: icalvalue.h
747 CREATOR: eric 20 March 1999
748
749
750 $Id$
751 $Locker$
752
753
754
755 (C) COPYRIGHT 2000, Eric Busboom, http://www.softwarestudio.org
756
757 This program is free software; you can redistribute it and/or modify
758 it under the terms of either:
759
760 The LGPL as published by the Free Software Foundation, version
761 2.1, available at: http://www.fsf.org/copyleft/lesser.html
762
763 Or:
764
765 The Mozilla Public License Version 1.0. You may obtain a copy of
766 the License at http://www.mozilla.org/MPL/
767
768 The original code is icalvalue.h
769
770 ======================================================================*/
771
772#ifndef ICALDERIVEDVALUE_H
773#define ICALDERIVEDVALUE_H
774
775
776typedef void icalvalue;
777
778
779
780void icalvalue_set_x(icalvalue* value, const char* v);
781icalvalue* icalvalue_new_x(const char* v);
782const char* icalvalue_get_x(icalvalue* value);
783
784icalvalue* icalvalue_new_attach (struct icalattachtype* v);
785void icalvalue_set_attach(icalvalue* value, struct icalattachtype* v);
786struct icalattachtype* icalvalue_get_attach(icalvalue* value);
787
788icalvalue* icalvalue_new_recur (struct icalrecurrencetype v);
789void icalvalue_set_recur(icalvalue* value, struct icalrecurrencetype v);
790struct icalrecurrencetype icalvalue_get_recur(icalvalue* value);
791
792icalvalue* icalvalue_new_trigger (struct icaltriggertype v);
793void icalvalue_set_trigger(icalvalue* value, struct icaltriggertype v);
794struct icaltriggertype icalvalue_get_trigger(icalvalue* value);
795
796icalvalue* icalvalue_new_datetimeperiod (struct icaldatetimeperiodtype v);
797void icalvalue_set_datetimeperiod(icalvalue* value, struct icaldatetimeperiodtype v);
798struct icaldatetimeperiodtype icalvalue_get_datetimeperiod(icalvalue* value);
799
800void icalvalue_reset_kind(icalvalue* value);
801
802/* Everything below this line is machine generated. Do not edit. */
803typedef enum icalvalue_kind {
804 ICAL_ANY_VALUE=5000,
805 ICAL_QUERY_VALUE=5001,
806 ICAL_TRIGGER_VALUE=5002,
807 ICAL_STATUS_VALUE=5003,
808 ICAL_TRANSP_VALUE=5004,
809 ICAL_CLASS_VALUE=5005,
810 ICAL_DATE_VALUE=5006,
811 ICAL_STRING_VALUE=5007,
812 ICAL_INTEGER_VALUE=5008,
813 ICAL_PERIOD_VALUE=5009,
814 ICAL_TEXT_VALUE=5010,
815 ICAL_DURATION_VALUE=5011,
816 ICAL_BOOLEAN_VALUE=5012,
817 ICAL_URI_VALUE=5013,
818 ICAL_DATETIMEPERIOD_VALUE=5014,
819 ICAL_GEO_VALUE=5015,
820 ICAL_DATETIME_VALUE=5016,
821 ICAL_UTCOFFSET_VALUE=5017,
822 ICAL_ATTACH_VALUE=5018,
823 ICAL_ACTION_VALUE=5019,
824 ICAL_CALADDRESS_VALUE=5020,
825 ICAL_X_VALUE=5021,
826 ICAL_FLOAT_VALUE=5022,
827 ICAL_REQUESTSTATUS_VALUE=5023,
828 ICAL_METHOD_VALUE=5024,
829 ICAL_BINARY_VALUE=5025,
830 ICAL_RECUR_VALUE=5026,
831 ICAL_NO_VALUE=5027
832} icalvalue_kind ;
833
834#define ICALPROPERTY_FIRST_ENUM 10000
835
836typedef enum icalproperty_action {
837 ICAL_ACTION_X = 10000,
838 ICAL_ACTION_AUDIO = 10001,
839 ICAL_ACTION_DISPLAY = 10002,
840 ICAL_ACTION_EMAIL = 10003,
841 ICAL_ACTION_PROCEDURE = 10004,
842 ICAL_ACTION_NONE = 10005
843} icalproperty_action;
844
845typedef enum icalproperty_class {
846 ICAL_CLASS_X = 10006,
847 ICAL_CLASS_PUBLIC = 10007,
848 ICAL_CLASS_PRIVATE = 10008,
849 ICAL_CLASS_CONFIDENTIAL = 10009,
850 ICAL_CLASS_NONE = 10010
851} icalproperty_class;
852
853typedef enum icalproperty_method {
854 ICAL_METHOD_X = 10011,
855 ICAL_METHOD_PUBLISH = 10012,
856 ICAL_METHOD_REQUEST = 10013,
857 ICAL_METHOD_REPLY = 10014,
858 ICAL_METHOD_ADD = 10015,
859 ICAL_METHOD_CANCEL = 10016,
860 ICAL_METHOD_REFRESH = 10017,
861 ICAL_METHOD_COUNTER = 10018,
862 ICAL_METHOD_DECLINECOUNTER = 10019,
863 ICAL_METHOD_CREATE = 10020,
864 ICAL_METHOD_READ = 10021,
865 ICAL_METHOD_RESPONSE = 10022,
866 ICAL_METHOD_MOVE = 10023,
867 ICAL_METHOD_MODIFY = 10024,
868 ICAL_METHOD_GENERATEUID = 10025,
869 ICAL_METHOD_DELETE = 10026,
870 ICAL_METHOD_NONE = 10027
871} icalproperty_method;
872
873typedef enum icalproperty_status {
874 ICAL_STATUS_X = 10028,
875 ICAL_STATUS_TENTATIVE = 10029,
876 ICAL_STATUS_CONFIRMED = 10030,
877 ICAL_STATUS_COMPLETED = 10031,
878 ICAL_STATUS_NEEDSACTION = 10032,
879 ICAL_STATUS_CANCELLED = 10033,
880 ICAL_STATUS_INPROCESS = 10034,
881 ICAL_STATUS_DRAFT = 10035,
882 ICAL_STATUS_FINAL = 10036,
883 ICAL_STATUS_NONE = 10037
884} icalproperty_status;
885
886typedef enum icalproperty_transp {
887 ICAL_TRANSP_X = 10038,
888 ICAL_TRANSP_OPAQUE = 10039,
889 ICAL_TRANSP_TRANSPARENT = 10040,
890 ICAL_TRANSP_NONE = 10041
891} icalproperty_transp;
892
893#define ICALPROPERTY_LAST_ENUM 10042
894
895
896 /* QUERY */
897icalvalue* icalvalue_new_query(const char* v);
898const char* icalvalue_get_query(icalvalue* value);
899void icalvalue_set_query(icalvalue* value, const char* v);
900
901
902 /* STATUS */
903icalvalue* icalvalue_new_status(enum icalproperty_status v);
904enum icalproperty_status icalvalue_get_status(icalvalue* value);
905void icalvalue_set_status(icalvalue* value, enum icalproperty_status v);
906
907
908 /* TRANSP */
909icalvalue* icalvalue_new_transp(enum icalproperty_transp v);
910enum icalproperty_transp icalvalue_get_transp(icalvalue* value);
911void icalvalue_set_transp(icalvalue* value, enum icalproperty_transp v);
912
913
914 /* CLASS */
915icalvalue* icalvalue_new_class(enum icalproperty_class v);
916enum icalproperty_class icalvalue_get_class(icalvalue* value);
917void icalvalue_set_class(icalvalue* value, enum icalproperty_class v);
918
919
920 /* DATE */
921icalvalue* icalvalue_new_date(struct icaltimetype v);
922struct icaltimetype icalvalue_get_date(icalvalue* value);
923void icalvalue_set_date(icalvalue* value, struct icaltimetype v);
924
925
926 /* STRING */
927icalvalue* icalvalue_new_string(const char* v);
928const char* icalvalue_get_string(icalvalue* value);
929void icalvalue_set_string(icalvalue* value, const char* v);
930
931
932 /* INTEGER */
933icalvalue* icalvalue_new_integer(int v);
934int icalvalue_get_integer(icalvalue* value);
935void icalvalue_set_integer(icalvalue* value, int v);
936
937
938 /* PERIOD */
939icalvalue* icalvalue_new_period(struct icalperiodtype v);
940struct icalperiodtype icalvalue_get_period(icalvalue* value);
941void icalvalue_set_period(icalvalue* value, struct icalperiodtype v);
942
943
944 /* TEXT */
945icalvalue* icalvalue_new_text(const char* v);
946const char* icalvalue_get_text(icalvalue* value);
947void icalvalue_set_text(icalvalue* value, const char* v);
948
949
950 /* DURATION */
951icalvalue* icalvalue_new_duration(struct icaldurationtype v);
952struct icaldurationtype icalvalue_get_duration(icalvalue* value);
953void icalvalue_set_duration(icalvalue* value, struct icaldurationtype v);
954
955
956 /* BOOLEAN */
957icalvalue* icalvalue_new_boolean(int v);
958int icalvalue_get_boolean(icalvalue* value);
959void icalvalue_set_boolean(icalvalue* value, int v);
960
961
962 /* URI */
963icalvalue* icalvalue_new_uri(const char* v);
964const char* icalvalue_get_uri(icalvalue* value);
965void icalvalue_set_uri(icalvalue* value, const char* v);
966
967
968 /* GEO */
969icalvalue* icalvalue_new_geo(struct icalgeotype v);
970struct icalgeotype icalvalue_get_geo(icalvalue* value);
971void icalvalue_set_geo(icalvalue* value, struct icalgeotype v);
972
973
974 /* DATE-TIME */
975icalvalue* icalvalue_new_datetime(struct icaltimetype v);
976struct icaltimetype icalvalue_get_datetime(icalvalue* value);
977void icalvalue_set_datetime(icalvalue* value, struct icaltimetype v);
978
979
980 /* UTC-OFFSET */
981icalvalue* icalvalue_new_utcoffset(int v);
982int icalvalue_get_utcoffset(icalvalue* value);
983void icalvalue_set_utcoffset(icalvalue* value, int v);
984
985
986 /* ACTION */
987icalvalue* icalvalue_new_action(enum icalproperty_action v);
988enum icalproperty_action icalvalue_get_action(icalvalue* value);
989void icalvalue_set_action(icalvalue* value, enum icalproperty_action v);
990
991
992 /* CAL-ADDRESS */
993icalvalue* icalvalue_new_caladdress(const char* v);
994const char* icalvalue_get_caladdress(icalvalue* value);
995void icalvalue_set_caladdress(icalvalue* value, const char* v);
996
997
998 /* FLOAT */
999icalvalue* icalvalue_new_float(float v);
1000float icalvalue_get_float(icalvalue* value);
1001void icalvalue_set_float(icalvalue* value, float v);
1002
1003
1004 /* REQUEST-STATUS */
1005icalvalue* icalvalue_new_requeststatus(struct icalreqstattype v);
1006struct icalreqstattype icalvalue_get_requeststatus(icalvalue* value);
1007void icalvalue_set_requeststatus(icalvalue* value, struct icalreqstattype v);
1008
1009
1010 /* METHOD */
1011icalvalue* icalvalue_new_method(enum icalproperty_method v);
1012enum icalproperty_method icalvalue_get_method(icalvalue* value);
1013void icalvalue_set_method(icalvalue* value, enum icalproperty_method v);
1014
1015
1016 /* BINARY */
1017icalvalue* icalvalue_new_binary(const char* v);
1018const char* icalvalue_get_binary(icalvalue* value);
1019void icalvalue_set_binary(icalvalue* value, const char* v);
1020
1021#endif /*ICALVALUE_H*/
1022/* -*- Mode: C -*- */
1023/*======================================================================
1024 FILE: icalparam.h
1025 CREATOR: eric 20 March 1999
1026
1027
1028 $Id$
1029 $Locker$
1030
1031
1032
1033 (C) COPYRIGHT 2000, Eric Busboom, http://www.softwarestudio.org
1034
1035 This program is free software; you can redistribute it and/or modify
1036 it under the terms of either:
1037
1038 The LGPL as published by the Free Software Foundation, version
1039 2.1, available at: http://www.fsf.org/copyleft/lesser.html
1040
1041 Or:
1042
1043 The Mozilla Public License Version 1.0. You may obtain a copy of
1044 the License at http://www.mozilla.org/MPL/
1045
1046 The original code is icalparam.h
1047
1048 ======================================================================*/
1049
1050#ifndef ICALDERIVEDPARAMETER_H
1051#define ICALDERIVEDPARAMETER_H
1052
1053
1054typedef void icalparameter;
1055
1056const char* icalparameter_enum_to_string(int e);
1057int icalparameter_string_to_enum(const char* str);
1058
1059/* Everything below this line is machine generated. Do not edit. */
1060typedef enum icalparameter_kind {
1061 ICAL_ANY_PARAMETER = 0,
1062 ICAL_ALTREP_PARAMETER,
1063 ICAL_CN_PARAMETER,
1064 ICAL_CUTYPE_PARAMETER,
1065 ICAL_DELEGATEDFROM_PARAMETER,
1066 ICAL_DELEGATEDTO_PARAMETER,
1067 ICAL_DIR_PARAMETER,
1068 ICAL_ENCODING_PARAMETER,
1069 ICAL_FBTYPE_PARAMETER,
1070 ICAL_FMTTYPE_PARAMETER,
1071 ICAL_LANGUAGE_PARAMETER,
1072 ICAL_MEMBER_PARAMETER,
1073 ICAL_PARTSTAT_PARAMETER,
1074 ICAL_RANGE_PARAMETER,
1075 ICAL_RELATED_PARAMETER,
1076 ICAL_RELTYPE_PARAMETER,
1077 ICAL_ROLE_PARAMETER,
1078 ICAL_RSVP_PARAMETER,
1079 ICAL_SENTBY_PARAMETER,
1080 ICAL_TZID_PARAMETER,
1081 ICAL_VALUE_PARAMETER,
1082 ICAL_X_PARAMETER,
1083 ICAL_XLICCOMPARETYPE_PARAMETER,
1084 ICAL_XLICERRORTYPE_PARAMETER,
1085 ICAL_NO_PARAMETER
1086} icalparameter_kind;
1087
1088#define ICALPARAMETER_FIRST_ENUM 20000
1089
1090typedef enum icalparameter_cutype {
1091 ICAL_CUTYPE_X = 20000,
1092 ICAL_CUTYPE_INDIVIDUAL = 20001,
1093 ICAL_CUTYPE_GROUP = 20002,
1094 ICAL_CUTYPE_RESOURCE = 20003,
1095 ICAL_CUTYPE_ROOM = 20004,
1096 ICAL_CUTYPE_UNKNOWN = 20005,
1097 ICAL_CUTYPE_NONE = 20006
1098} icalparameter_cutype;
1099
1100typedef enum icalparameter_encoding {
1101 ICAL_ENCODING_X = 20007,
1102 ICAL_ENCODING_8BIT = 20008,
1103 ICAL_ENCODING_BASE64 = 20009,
1104 ICAL_ENCODING_NONE = 20010
1105} icalparameter_encoding;
1106
1107typedef enum icalparameter_fbtype {
1108 ICAL_FBTYPE_X = 20011,
1109 ICAL_FBTYPE_FREE = 20012,
1110 ICAL_FBTYPE_BUSY = 20013,
1111 ICAL_FBTYPE_BUSYUNAVAILABLE = 20014,
1112 ICAL_FBTYPE_BUSYTENTATIVE = 20015,
1113 ICAL_FBTYPE_NONE = 20016
1114} icalparameter_fbtype;
1115
1116typedef enum icalparameter_partstat {
1117 ICAL_PARTSTAT_X = 20017,
1118 ICAL_PARTSTAT_NEEDSACTION = 20018,
1119 ICAL_PARTSTAT_ACCEPTED = 20019,
1120 ICAL_PARTSTAT_DECLINED = 20020,
1121 ICAL_PARTSTAT_TENTATIVE = 20021,
1122 ICAL_PARTSTAT_DELEGATED = 20022,
1123 ICAL_PARTSTAT_COMPLETED = 20023,
1124 ICAL_PARTSTAT_INPROCESS = 20024,
1125 ICAL_PARTSTAT_NONE = 20025
1126} icalparameter_partstat;
1127
1128typedef enum icalparameter_range {
1129 ICAL_RANGE_X = 20026,
1130 ICAL_RANGE_THISANDPRIOR = 20027,
1131 ICAL_RANGE_THISANDFUTURE = 20028,
1132 ICAL_RANGE_NONE = 20029
1133} icalparameter_range;
1134
1135typedef enum icalparameter_related {
1136 ICAL_RELATED_X = 20030,
1137 ICAL_RELATED_START = 20031,
1138 ICAL_RELATED_END = 20032,
1139 ICAL_RELATED_NONE = 20033
1140} icalparameter_related;
1141
1142typedef enum icalparameter_reltype {
1143 ICAL_RELTYPE_X = 20034,
1144 ICAL_RELTYPE_PARENT = 20035,
1145 ICAL_RELTYPE_CHILD = 20036,
1146 ICAL_RELTYPE_SIBLING = 20037,
1147 ICAL_RELTYPE_NONE = 20038
1148} icalparameter_reltype;
1149
1150typedef enum icalparameter_role {
1151 ICAL_ROLE_X = 20039,
1152 ICAL_ROLE_CHAIR = 20040,
1153 ICAL_ROLE_REQPARTICIPANT = 20041,
1154 ICAL_ROLE_OPTPARTICIPANT = 20042,
1155 ICAL_ROLE_NONPARTICIPANT = 20043,
1156 ICAL_ROLE_NONE = 20044
1157} icalparameter_role;
1158
1159typedef enum icalparameter_rsvp {
1160 ICAL_RSVP_X = 20045,
1161 ICAL_RSVP_TRUE = 20046,
1162 ICAL_RSVP_FALSE = 20047,
1163 ICAL_RSVP_NONE = 20048
1164} icalparameter_rsvp;
1165
1166typedef enum icalparameter_value {
1167 ICAL_VALUE_X = 20049,
1168 ICAL_VALUE_BINARY = 20050,
1169 ICAL_VALUE_BOOLEAN = 20051,
1170 ICAL_VALUE_DATE = 20052,
1171 ICAL_VALUE_DURATION = 20053,
1172 ICAL_VALUE_FLOAT = 20054,
1173 ICAL_VALUE_INTEGER = 20055,
1174 ICAL_VALUE_PERIOD = 20056,
1175 ICAL_VALUE_RECUR = 20057,
1176 ICAL_VALUE_TEXT = 20058,
1177 ICAL_VALUE_URI = 20059,
1178 ICAL_VALUE_ERROR = 20060,
1179 ICAL_VALUE_DATETIME = 20061,
1180 ICAL_VALUE_UTCOFFSET = 20062,
1181 ICAL_VALUE_CALADDRESS = 20063,
1182 ICAL_VALUE_NONE = 20064
1183} icalparameter_value;
1184
1185typedef enum icalparameter_xliccomparetype {
1186 ICAL_XLICCOMPARETYPE_X = 20065,
1187 ICAL_XLICCOMPARETYPE_EQUAL = 20066,
1188 ICAL_XLICCOMPARETYPE_NOTEQUAL = 20067,
1189 ICAL_XLICCOMPARETYPE_LESS = 20068,
1190 ICAL_XLICCOMPARETYPE_GREATER = 20069,
1191 ICAL_XLICCOMPARETYPE_LESSEQUAL = 20070,
1192 ICAL_XLICCOMPARETYPE_GREATEREQUAL = 20071,
1193 ICAL_XLICCOMPARETYPE_REGEX = 20072,
1194 ICAL_XLICCOMPARETYPE_NONE = 20073
1195} icalparameter_xliccomparetype;
1196
1197typedef enum icalparameter_xlicerrortype {
1198 ICAL_XLICERRORTYPE_X = 20074,
1199 ICAL_XLICERRORTYPE_COMPONENTPARSEERROR = 20075,
1200 ICAL_XLICERRORTYPE_PROPERTYPARSEERROR = 20076,
1201 ICAL_XLICERRORTYPE_PARAMETERNAMEPARSEERROR = 20077,
1202 ICAL_XLICERRORTYPE_PARAMETERVALUEPARSEERROR = 20078,
1203 ICAL_XLICERRORTYPE_VALUEPARSEERROR = 20079,
1204 ICAL_XLICERRORTYPE_INVALIDITIP = 20080,
1205 ICAL_XLICERRORTYPE_UNKNOWNVCALPROPERROR = 20081,
1206 ICAL_XLICERRORTYPE_MIMEPARSEERROR = 20082,
1207 ICAL_XLICERRORTYPE_NONE = 20083
1208} icalparameter_xlicerrortype;
1209
1210#define ICALPARAMETER_LAST_ENUM 20084
1211
1212/* DELEGATED-FROM */
1213icalparameter* icalparameter_new_delegatedfrom(const char* v);
1214const char* icalparameter_get_delegatedfrom(icalparameter* value);
1215void icalparameter_set_delegatedfrom(icalparameter* value, const char* v);
1216
1217/* DELEGATED-TO */
1218icalparameter* icalparameter_new_delegatedto(const char* v);
1219const char* icalparameter_get_delegatedto(icalparameter* value);
1220void icalparameter_set_delegatedto(icalparameter* value, const char* v);
1221
1222/* RANGE */
1223icalparameter* icalparameter_new_range(icalparameter_range v);
1224icalparameter_range icalparameter_get_range(icalparameter* value);
1225void icalparameter_set_range(icalparameter* value, icalparameter_range v);
1226
1227/* ENCODING */
1228icalparameter* icalparameter_new_encoding(icalparameter_encoding v);
1229icalparameter_encoding icalparameter_get_encoding(icalparameter* value);
1230void icalparameter_set_encoding(icalparameter* value, icalparameter_encoding v);
1231
1232/* RSVP */
1233icalparameter* icalparameter_new_rsvp(icalparameter_rsvp v);
1234icalparameter_rsvp icalparameter_get_rsvp(icalparameter* value);
1235void icalparameter_set_rsvp(icalparameter* value, icalparameter_rsvp v);
1236
1237/* PARTSTAT */
1238icalparameter* icalparameter_new_partstat(icalparameter_partstat v);
1239icalparameter_partstat icalparameter_get_partstat(icalparameter* value);
1240void icalparameter_set_partstat(icalparameter* value, icalparameter_partstat v);
1241
1242/* RELTYPE */
1243icalparameter* icalparameter_new_reltype(icalparameter_reltype v);
1244icalparameter_reltype icalparameter_get_reltype(icalparameter* value);
1245void icalparameter_set_reltype(icalparameter* value, icalparameter_reltype v);
1246
1247/* CUTYPE */
1248icalparameter* icalparameter_new_cutype(icalparameter_cutype v);
1249icalparameter_cutype icalparameter_get_cutype(icalparameter* value);
1250void icalparameter_set_cutype(icalparameter* value, icalparameter_cutype v);
1251
1252/* MEMBER */
1253icalparameter* icalparameter_new_member(const char* v);
1254const char* icalparameter_get_member(icalparameter* value);
1255void icalparameter_set_member(icalparameter* value, const char* v);
1256
1257/* FMTTYPE */
1258icalparameter* icalparameter_new_fmttype(const char* v);
1259const char* icalparameter_get_fmttype(icalparameter* value);
1260void icalparameter_set_fmttype(icalparameter* value, const char* v);
1261
1262/* SENT-BY */
1263icalparameter* icalparameter_new_sentby(const char* v);
1264const char* icalparameter_get_sentby(icalparameter* value);
1265void icalparameter_set_sentby(icalparameter* value, const char* v);
1266
1267/* VALUE */
1268icalparameter* icalparameter_new_value(icalparameter_value v);
1269icalparameter_value icalparameter_get_value(icalparameter* value);
1270void icalparameter_set_value(icalparameter* value, icalparameter_value v);
1271
1272/* ALTREP */
1273icalparameter* icalparameter_new_altrep(const char* v);
1274const char* icalparameter_get_altrep(icalparameter* value);
1275void icalparameter_set_altrep(icalparameter* value, const char* v);
1276
1277/* DIR */
1278icalparameter* icalparameter_new_dir(const char* v);
1279const char* icalparameter_get_dir(icalparameter* value);
1280void icalparameter_set_dir(icalparameter* value, const char* v);
1281
1282/* RELATED */
1283icalparameter* icalparameter_new_related(icalparameter_related v);
1284icalparameter_related icalparameter_get_related(icalparameter* value);
1285void icalparameter_set_related(icalparameter* value, icalparameter_related v);
1286
1287/* CN */
1288icalparameter* icalparameter_new_cn(const char* v);
1289const char* icalparameter_get_cn(icalparameter* value);
1290void icalparameter_set_cn(icalparameter* value, const char* v);
1291
1292/* X-LIC-ERRORTYPE */
1293icalparameter* icalparameter_new_xlicerrortype(icalparameter_xlicerrortype v);
1294icalparameter_xlicerrortype icalparameter_get_xlicerrortype(icalparameter* value);
1295void icalparameter_set_xlicerrortype(icalparameter* value, icalparameter_xlicerrortype v);
1296
1297/* X */
1298icalparameter* icalparameter_new_x(const char* v);
1299const char* icalparameter_get_x(icalparameter* value);
1300void icalparameter_set_x(icalparameter* value, const char* v);
1301
1302/* LANGUAGE */
1303icalparameter* icalparameter_new_language(const char* v);
1304const char* icalparameter_get_language(icalparameter* value);
1305void icalparameter_set_language(icalparameter* value, const char* v);
1306
1307/* ROLE */
1308icalparameter* icalparameter_new_role(icalparameter_role v);
1309icalparameter_role icalparameter_get_role(icalparameter* value);
1310void icalparameter_set_role(icalparameter* value, icalparameter_role v);
1311
1312/* X-LIC-COMPARETYPE */
1313icalparameter* icalparameter_new_xliccomparetype(icalparameter_xliccomparetype v);
1314icalparameter_xliccomparetype icalparameter_get_xliccomparetype(icalparameter* value);
1315void icalparameter_set_xliccomparetype(icalparameter* value, icalparameter_xliccomparetype v);
1316
1317/* FBTYPE */
1318icalparameter* icalparameter_new_fbtype(icalparameter_fbtype v);
1319icalparameter_fbtype icalparameter_get_fbtype(icalparameter* value);
1320void icalparameter_set_fbtype(icalparameter* value, icalparameter_fbtype v);
1321
1322/* TZID */
1323icalparameter* icalparameter_new_tzid(const char* v);
1324const char* icalparameter_get_tzid(icalparameter* value);
1325void icalparameter_set_tzid(icalparameter* value, const char* v);
1326
1327#endif /*ICALPARAMETER_H*/
1328
1329/* -*- Mode: C -*-
1330 ======================================================================
1331 FILE: icalderivedproperties.{c,h}
1332 CREATOR: eric 09 May 1999
1333
1334 $Id$
1335
1336 (C) COPYRIGHT 2000, Eric Busboom, http://www.softwarestudio.org
1337 ======================================================================*/
1338
1339
1340#ifndef ICALDERIVEDPROPERTY_H
1341#define ICALDERIVEDPROPERTY_H
1342
1343#include <time.h>
1344
1345typedef void icalproperty;
1346
1347
1348/* Everything below this line is machine generated. Do not edit. */
1349typedef enum icalproperty_kind {
1350 ICAL_ANY_PROPERTY = 0,
1351 ICAL_ACTION_PROPERTY,
1352 ICAL_ATTACH_PROPERTY,
1353 ICAL_ATTENDEE_PROPERTY,
1354 ICAL_CALSCALE_PROPERTY,
1355 ICAL_CATEGORIES_PROPERTY,
1356 ICAL_CLASS_PROPERTY,
1357 ICAL_COMMENT_PROPERTY,
1358 ICAL_COMPLETED_PROPERTY,
1359 ICAL_CONTACT_PROPERTY,
1360 ICAL_CREATED_PROPERTY,
1361 ICAL_DESCRIPTION_PROPERTY,
1362 ICAL_DTEND_PROPERTY,
1363 ICAL_DTSTAMP_PROPERTY,
1364 ICAL_DTSTART_PROPERTY,
1365 ICAL_DUE_PROPERTY,
1366 ICAL_DURATION_PROPERTY,
1367 ICAL_EXDATE_PROPERTY,
1368 ICAL_EXRULE_PROPERTY,
1369 ICAL_FREEBUSY_PROPERTY,
1370 ICAL_GEO_PROPERTY,
1371 ICAL_LASTMODIFIED_PROPERTY,
1372 ICAL_LOCATION_PROPERTY,
1373 ICAL_MAXRESULTS_PROPERTY,
1374 ICAL_MAXRESULTSSIZE_PROPERTY,
1375 ICAL_METHOD_PROPERTY,
1376 ICAL_ORGANIZER_PROPERTY,
1377 ICAL_PERCENTCOMPLETE_PROPERTY,
1378 ICAL_PRIORITY_PROPERTY,
1379 ICAL_PRODID_PROPERTY,
1380 ICAL_QUERY_PROPERTY,
1381 ICAL_QUERYNAME_PROPERTY,
1382 ICAL_RDATE_PROPERTY,
1383 ICAL_RECURRENCEID_PROPERTY,
1384 ICAL_RELATEDTO_PROPERTY,
1385 ICAL_REPEAT_PROPERTY,
1386 ICAL_REQUESTSTATUS_PROPERTY,
1387 ICAL_RESOURCES_PROPERTY,
1388 ICAL_RRULE_PROPERTY,
1389 ICAL_SCOPE_PROPERTY,
1390 ICAL_SEQUENCE_PROPERTY,
1391 ICAL_STATUS_PROPERTY,
1392 ICAL_SUMMARY_PROPERTY,
1393 ICAL_TARGET_PROPERTY,
1394 ICAL_TRANSP_PROPERTY,
1395 ICAL_TRIGGER_PROPERTY,
1396 ICAL_TZID_PROPERTY,
1397 ICAL_TZNAME_PROPERTY,
1398 ICAL_TZOFFSETFROM_PROPERTY,
1399 ICAL_TZOFFSETTO_PROPERTY,
1400 ICAL_TZURL_PROPERTY,
1401 ICAL_UID_PROPERTY,
1402 ICAL_URL_PROPERTY,
1403 ICAL_VERSION_PROPERTY,
1404 ICAL_X_PROPERTY,
1405 ICAL_XLICCLUSTERCOUNT_PROPERTY,
1406 ICAL_XLICERROR_PROPERTY,
1407 ICAL_XLICMIMECHARSET_PROPERTY,
1408 ICAL_XLICMIMECID_PROPERTY,
1409 ICAL_XLICMIMECONTENTTYPE_PROPERTY,
1410 ICAL_XLICMIMEENCODING_PROPERTY,
1411 ICAL_XLICMIMEFILENAME_PROPERTY,
1412 ICAL_XLICMIMEOPTINFO_PROPERTY,
1413 ICAL_NO_PROPERTY
1414} icalproperty_kind;
1415
1416icalproperty* icalproperty_vanew_action(enum icalproperty_action v, ...);
1417
1418/* ACTION */
1419icalproperty* icalproperty_new_action(enum icalproperty_action v);
1420void icalproperty_set_action(icalproperty* prop, enum icalproperty_action v);
1421enum icalproperty_action icalproperty_get_action(icalproperty* prop);icalproperty* icalproperty_vanew_attach(struct icalattachtype* v, ...);
1422
1423/* ATTACH */
1424icalproperty* icalproperty_new_attach(struct icalattachtype* v);
1425void icalproperty_set_attach(icalproperty* prop, struct icalattachtype* v);
1426struct icalattachtype* icalproperty_get_attach(icalproperty* prop);icalproperty* icalproperty_vanew_attendee(const char* v, ...);
1427
1428/* ATTENDEE */
1429icalproperty* icalproperty_new_attendee(const char* v);
1430void icalproperty_set_attendee(icalproperty* prop, const char* v);
1431const char* icalproperty_get_attendee(icalproperty* prop);icalproperty* icalproperty_vanew_calscale(const char* v, ...);
1432
1433/* CALSCALE */
1434icalproperty* icalproperty_new_calscale(const char* v);
1435void icalproperty_set_calscale(icalproperty* prop, const char* v);
1436const char* icalproperty_get_calscale(icalproperty* prop);icalproperty* icalproperty_vanew_categories(const char* v, ...);
1437
1438/* CATEGORIES */
1439icalproperty* icalproperty_new_categories(const char* v);
1440void icalproperty_set_categories(icalproperty* prop, const char* v);
1441const char* icalproperty_get_categories(icalproperty* prop);icalproperty* icalproperty_vanew_class(const char* v, ...);
1442
1443/* CLASS */
1444icalproperty* icalproperty_new_class(const char* v);
1445void icalproperty_set_class(icalproperty* prop, const char* v);
1446const char* icalproperty_get_class(icalproperty* prop);icalproperty* icalproperty_vanew_comment(const char* v, ...);
1447
1448/* COMMENT */
1449icalproperty* icalproperty_new_comment(const char* v);
1450void icalproperty_set_comment(icalproperty* prop, const char* v);
1451const char* icalproperty_get_comment(icalproperty* prop);icalproperty* icalproperty_vanew_completed(struct icaltimetype v, ...);
1452
1453/* COMPLETED */
1454icalproperty* icalproperty_new_completed(struct icaltimetype v);
1455void icalproperty_set_completed(icalproperty* prop, struct icaltimetype v);
1456struct icaltimetype icalproperty_get_completed(icalproperty* prop);icalproperty* icalproperty_vanew_contact(const char* v, ...);
1457
1458/* CONTACT */
1459icalproperty* icalproperty_new_contact(const char* v);
1460void icalproperty_set_contact(icalproperty* prop, const char* v);
1461const char* icalproperty_get_contact(icalproperty* prop);icalproperty* icalproperty_vanew_created(struct icaltimetype v, ...);
1462
1463/* CREATED */
1464icalproperty* icalproperty_new_created(struct icaltimetype v);
1465void icalproperty_set_created(icalproperty* prop, struct icaltimetype v);
1466struct icaltimetype icalproperty_get_created(icalproperty* prop);icalproperty* icalproperty_vanew_description(const char* v, ...);
1467
1468/* DESCRIPTION */
1469icalproperty* icalproperty_new_description(const char* v);
1470void icalproperty_set_description(icalproperty* prop, const char* v);
1471const char* icalproperty_get_description(icalproperty* prop);icalproperty* icalproperty_vanew_dtend(struct icaltimetype v, ...);
1472
1473/* DTEND */
1474icalproperty* icalproperty_new_dtend(struct icaltimetype v);
1475void icalproperty_set_dtend(icalproperty* prop, struct icaltimetype v);
1476struct icaltimetype icalproperty_get_dtend(icalproperty* prop);icalproperty* icalproperty_vanew_dtstamp(struct icaltimetype v, ...);
1477
1478/* DTSTAMP */
1479icalproperty* icalproperty_new_dtstamp(struct icaltimetype v);
1480void icalproperty_set_dtstamp(icalproperty* prop, struct icaltimetype v);
1481struct icaltimetype icalproperty_get_dtstamp(icalproperty* prop);icalproperty* icalproperty_vanew_dtstart(struct icaltimetype v, ...);
1482
1483/* DTSTART */
1484icalproperty* icalproperty_new_dtstart(struct icaltimetype v);
1485void icalproperty_set_dtstart(icalproperty* prop, struct icaltimetype v);
1486struct icaltimetype icalproperty_get_dtstart(icalproperty* prop);icalproperty* icalproperty_vanew_due(struct icaltimetype v, ...);
1487
1488/* DUE */
1489icalproperty* icalproperty_new_due(struct icaltimetype v);
1490void icalproperty_set_due(icalproperty* prop, struct icaltimetype v);
1491struct icaltimetype icalproperty_get_due(icalproperty* prop);icalproperty* icalproperty_vanew_duration(struct icaldurationtype v, ...);
1492
1493/* DURATION */
1494icalproperty* icalproperty_new_duration(struct icaldurationtype v);
1495void icalproperty_set_duration(icalproperty* prop, struct icaldurationtype v);
1496struct icaldurationtype icalproperty_get_duration(icalproperty* prop);icalproperty* icalproperty_vanew_exdate(struct icaltimetype v, ...);
1497
1498/* EXDATE */
1499icalproperty* icalproperty_new_exdate(struct icaltimetype v);
1500void icalproperty_set_exdate(icalproperty* prop, struct icaltimetype v);
1501struct icaltimetype icalproperty_get_exdate(icalproperty* prop);icalproperty* icalproperty_vanew_exrule(struct icalrecurrencetype v, ...);
1502
1503/* EXRULE */
1504icalproperty* icalproperty_new_exrule(struct icalrecurrencetype v);
1505void icalproperty_set_exrule(icalproperty* prop, struct icalrecurrencetype v);
1506struct icalrecurrencetype icalproperty_get_exrule(icalproperty* prop);icalproperty* icalproperty_vanew_freebusy(struct icalperiodtype v, ...);
1507
1508/* FREEBUSY */
1509icalproperty* icalproperty_new_freebusy(struct icalperiodtype v);
1510void icalproperty_set_freebusy(icalproperty* prop, struct icalperiodtype v);
1511struct icalperiodtype icalproperty_get_freebusy(icalproperty* prop);icalproperty* icalproperty_vanew_geo(struct icalgeotype v, ...);
1512
1513/* GEO */
1514icalproperty* icalproperty_new_geo(struct icalgeotype v);
1515void icalproperty_set_geo(icalproperty* prop, struct icalgeotype v);
1516struct icalgeotype icalproperty_get_geo(icalproperty* prop);icalproperty* icalproperty_vanew_lastmodified(struct icaltimetype v, ...);
1517
1518/* LAST-MODIFIED */
1519icalproperty* icalproperty_new_lastmodified(struct icaltimetype v);
1520void icalproperty_set_lastmodified(icalproperty* prop, struct icaltimetype v);
1521struct icaltimetype icalproperty_get_lastmodified(icalproperty* prop);icalproperty* icalproperty_vanew_location(const char* v, ...);
1522
1523/* LOCATION */
1524icalproperty* icalproperty_new_location(const char* v);
1525void icalproperty_set_location(icalproperty* prop, const char* v);
1526const char* icalproperty_get_location(icalproperty* prop);icalproperty* icalproperty_vanew_maxresults(int v, ...);
1527
1528/* MAXRESULTS */
1529icalproperty* icalproperty_new_maxresults(int v);
1530void icalproperty_set_maxresults(icalproperty* prop, int v);
1531int icalproperty_get_maxresults(icalproperty* prop);icalproperty* icalproperty_vanew_maxresultssize(int v, ...);
1532
1533/* MAXRESULTSSIZE */
1534icalproperty* icalproperty_new_maxresultssize(int v);
1535void icalproperty_set_maxresultssize(icalproperty* prop, int v);
1536int icalproperty_get_maxresultssize(icalproperty* prop);icalproperty* icalproperty_vanew_method(enum icalproperty_method v, ...);
1537
1538/* METHOD */
1539icalproperty* icalproperty_new_method(enum icalproperty_method v);
1540void icalproperty_set_method(icalproperty* prop, enum icalproperty_method v);
1541enum icalproperty_method icalproperty_get_method(icalproperty* prop);icalproperty* icalproperty_vanew_organizer(const char* v, ...);
1542
1543/* ORGANIZER */
1544icalproperty* icalproperty_new_organizer(const char* v);
1545void icalproperty_set_organizer(icalproperty* prop, const char* v);
1546const char* icalproperty_get_organizer(icalproperty* prop);icalproperty* icalproperty_vanew_percentcomplete(int v, ...);
1547
1548/* PERCENT-COMPLETE */
1549icalproperty* icalproperty_new_percentcomplete(int v);
1550void icalproperty_set_percentcomplete(icalproperty* prop, int v);
1551int icalproperty_get_percentcomplete(icalproperty* prop);icalproperty* icalproperty_vanew_priority(int v, ...);
1552
1553/* PRIORITY */
1554icalproperty* icalproperty_new_priority(int v);
1555void icalproperty_set_priority(icalproperty* prop, int v);
1556int icalproperty_get_priority(icalproperty* prop);icalproperty* icalproperty_vanew_prodid(const char* v, ...);
1557
1558/* PRODID */
1559icalproperty* icalproperty_new_prodid(const char* v);
1560void icalproperty_set_prodid(icalproperty* prop, const char* v);
1561const char* icalproperty_get_prodid(icalproperty* prop);icalproperty* icalproperty_vanew_query(const char* v, ...);
1562
1563/* QUERY */
1564icalproperty* icalproperty_new_query(const char* v);
1565void icalproperty_set_query(icalproperty* prop, const char* v);
1566const char* icalproperty_get_query(icalproperty* prop);icalproperty* icalproperty_vanew_queryname(const char* v, ...);
1567
1568/* QUERYNAME */
1569icalproperty* icalproperty_new_queryname(const char* v);
1570void icalproperty_set_queryname(icalproperty* prop, const char* v);
1571const char* icalproperty_get_queryname(icalproperty* prop);icalproperty* icalproperty_vanew_rdate(struct icaldatetimeperiodtype v, ...);
1572
1573/* RDATE */
1574icalproperty* icalproperty_new_rdate(struct icaldatetimeperiodtype v);
1575void icalproperty_set_rdate(icalproperty* prop, struct icaldatetimeperiodtype v);
1576struct icaldatetimeperiodtype icalproperty_get_rdate(icalproperty* prop);icalproperty* icalproperty_vanew_recurrenceid(struct icaltimetype v, ...);
1577
1578/* RECURRENCE-ID */
1579icalproperty* icalproperty_new_recurrenceid(struct icaltimetype v);
1580void icalproperty_set_recurrenceid(icalproperty* prop, struct icaltimetype v);
1581struct icaltimetype icalproperty_get_recurrenceid(icalproperty* prop);icalproperty* icalproperty_vanew_relatedto(const char* v, ...);
1582
1583/* RELATED-TO */
1584icalproperty* icalproperty_new_relatedto(const char* v);
1585void icalproperty_set_relatedto(icalproperty* prop, const char* v);
1586const char* icalproperty_get_relatedto(icalproperty* prop);icalproperty* icalproperty_vanew_repeat(int v, ...);
1587
1588/* REPEAT */
1589icalproperty* icalproperty_new_repeat(int v);
1590void icalproperty_set_repeat(icalproperty* prop, int v);
1591int icalproperty_get_repeat(icalproperty* prop);icalproperty* icalproperty_vanew_requeststatus(struct icalreqstattype v, ...);
1592
1593/* REQUEST-STATUS */
1594icalproperty* icalproperty_new_requeststatus(struct icalreqstattype v);
1595void icalproperty_set_requeststatus(icalproperty* prop, struct icalreqstattype v);
1596struct icalreqstattype icalproperty_get_requeststatus(icalproperty* prop);icalproperty* icalproperty_vanew_resources(const char* v, ...);
1597
1598/* RESOURCES */
1599icalproperty* icalproperty_new_resources(const char* v);
1600void icalproperty_set_resources(icalproperty* prop, const char* v);
1601const char* icalproperty_get_resources(icalproperty* prop);icalproperty* icalproperty_vanew_rrule(struct icalrecurrencetype v, ...);
1602
1603/* RRULE */
1604icalproperty* icalproperty_new_rrule(struct icalrecurrencetype v);
1605void icalproperty_set_rrule(icalproperty* prop, struct icalrecurrencetype v);
1606struct icalrecurrencetype icalproperty_get_rrule(icalproperty* prop);icalproperty* icalproperty_vanew_scope(const char* v, ...);
1607
1608/* SCOPE */
1609icalproperty* icalproperty_new_scope(const char* v);
1610void icalproperty_set_scope(icalproperty* prop, const char* v);
1611const char* icalproperty_get_scope(icalproperty* prop);icalproperty* icalproperty_vanew_sequence(int v, ...);
1612
1613/* SEQUENCE */
1614icalproperty* icalproperty_new_sequence(int v);
1615void icalproperty_set_sequence(icalproperty* prop, int v);
1616int icalproperty_get_sequence(icalproperty* prop);icalproperty* icalproperty_vanew_status(enum icalproperty_status v, ...);
1617
1618/* STATUS */
1619icalproperty* icalproperty_new_status(enum icalproperty_status v);
1620void icalproperty_set_status(icalproperty* prop, enum icalproperty_status v);
1621enum icalproperty_status icalproperty_get_status(icalproperty* prop);icalproperty* icalproperty_vanew_summary(const char* v, ...);
1622
1623/* SUMMARY */
1624icalproperty* icalproperty_new_summary(const char* v);
1625void icalproperty_set_summary(icalproperty* prop, const char* v);
1626const char* icalproperty_get_summary(icalproperty* prop);icalproperty* icalproperty_vanew_target(const char* v, ...);
1627
1628/* TARGET */
1629icalproperty* icalproperty_new_target(const char* v);
1630void icalproperty_set_target(icalproperty* prop, const char* v);
1631const char* icalproperty_get_target(icalproperty* prop);icalproperty* icalproperty_vanew_transp(const char* v, ...);
1632
1633/* TRANSP */
1634icalproperty* icalproperty_new_transp(const char* v);
1635void icalproperty_set_transp(icalproperty* prop, const char* v);
1636const char* icalproperty_get_transp(icalproperty* prop);icalproperty* icalproperty_vanew_trigger(struct icaltriggertype v, ...);
1637
1638/* TRIGGER */
1639icalproperty* icalproperty_new_trigger(struct icaltriggertype v);
1640void icalproperty_set_trigger(icalproperty* prop, struct icaltriggertype v);
1641struct icaltriggertype icalproperty_get_trigger(icalproperty* prop);icalproperty* icalproperty_vanew_tzid(const char* v, ...);
1642
1643/* TZID */
1644icalproperty* icalproperty_new_tzid(const char* v);
1645void icalproperty_set_tzid(icalproperty* prop, const char* v);
1646const char* icalproperty_get_tzid(icalproperty* prop);icalproperty* icalproperty_vanew_tzname(const char* v, ...);
1647
1648/* TZNAME */
1649icalproperty* icalproperty_new_tzname(const char* v);
1650void icalproperty_set_tzname(icalproperty* prop, const char* v);
1651const char* icalproperty_get_tzname(icalproperty* prop);icalproperty* icalproperty_vanew_tzoffsetfrom(int v, ...);
1652
1653/* TZOFFSETFROM */
1654icalproperty* icalproperty_new_tzoffsetfrom(int v);
1655void icalproperty_set_tzoffsetfrom(icalproperty* prop, int v);
1656int icalproperty_get_tzoffsetfrom(icalproperty* prop);icalproperty* icalproperty_vanew_tzoffsetto(int v, ...);
1657
1658/* TZOFFSETTO */
1659icalproperty* icalproperty_new_tzoffsetto(int v);
1660void icalproperty_set_tzoffsetto(icalproperty* prop, int v);
1661int icalproperty_get_tzoffsetto(icalproperty* prop);icalproperty* icalproperty_vanew_tzurl(const char* v, ...);
1662
1663/* TZURL */
1664icalproperty* icalproperty_new_tzurl(const char* v);
1665void icalproperty_set_tzurl(icalproperty* prop, const char* v);
1666const char* icalproperty_get_tzurl(icalproperty* prop);icalproperty* icalproperty_vanew_uid(const char* v, ...);
1667
1668/* UID */
1669icalproperty* icalproperty_new_uid(const char* v);
1670void icalproperty_set_uid(icalproperty* prop, const char* v);
1671const char* icalproperty_get_uid(icalproperty* prop);icalproperty* icalproperty_vanew_url(const char* v, ...);
1672
1673/* URL */
1674icalproperty* icalproperty_new_url(const char* v);
1675void icalproperty_set_url(icalproperty* prop, const char* v);
1676const char* icalproperty_get_url(icalproperty* prop);icalproperty* icalproperty_vanew_version(const char* v, ...);
1677
1678/* VERSION */
1679icalproperty* icalproperty_new_version(const char* v);
1680void icalproperty_set_version(icalproperty* prop, const char* v);
1681const char* icalproperty_get_version(icalproperty* prop);icalproperty* icalproperty_vanew_x(const char* v, ...);
1682
1683/* X */
1684icalproperty* icalproperty_new_x(const char* v);
1685void icalproperty_set_x(icalproperty* prop, const char* v);
1686const char* icalproperty_get_x(icalproperty* prop);icalproperty* icalproperty_vanew_xlicclustercount(const char* v, ...);
1687
1688/* X-LIC-CLUSTERCOUNT */
1689icalproperty* icalproperty_new_xlicclustercount(const char* v);
1690void icalproperty_set_xlicclustercount(icalproperty* prop, const char* v);
1691const char* icalproperty_get_xlicclustercount(icalproperty* prop);icalproperty* icalproperty_vanew_xlicerror(const char* v, ...);
1692
1693/* X-LIC-ERROR */
1694icalproperty* icalproperty_new_xlicerror(const char* v);
1695void icalproperty_set_xlicerror(icalproperty* prop, const char* v);
1696const char* icalproperty_get_xlicerror(icalproperty* prop);icalproperty* icalproperty_vanew_xlicmimecharset(const char* v, ...);
1697
1698/* X-LIC-MIMECHARSET */
1699icalproperty* icalproperty_new_xlicmimecharset(const char* v);
1700void icalproperty_set_xlicmimecharset(icalproperty* prop, const char* v);
1701const char* icalproperty_get_xlicmimecharset(icalproperty* prop);icalproperty* icalproperty_vanew_xlicmimecid(const char* v, ...);
1702
1703/* X-LIC-MIMECID */
1704icalproperty* icalproperty_new_xlicmimecid(const char* v);
1705void icalproperty_set_xlicmimecid(icalproperty* prop, const char* v);
1706const char* icalproperty_get_xlicmimecid(icalproperty* prop);icalproperty* icalproperty_vanew_xlicmimecontenttype(const char* v, ...);
1707
1708/* X-LIC-MIMECONTENTTYPE */
1709icalproperty* icalproperty_new_xlicmimecontenttype(const char* v);
1710void icalproperty_set_xlicmimecontenttype(icalproperty* prop, const char* v);
1711const char* icalproperty_get_xlicmimecontenttype(icalproperty* prop);icalproperty* icalproperty_vanew_xlicmimeencoding(const char* v, ...);
1712
1713/* X-LIC-MIMEENCODING */
1714icalproperty* icalproperty_new_xlicmimeencoding(const char* v);
1715void icalproperty_set_xlicmimeencoding(icalproperty* prop, const char* v);
1716const char* icalproperty_get_xlicmimeencoding(icalproperty* prop);icalproperty* icalproperty_vanew_xlicmimefilename(const char* v, ...);
1717
1718/* X-LIC-MIMEFILENAME */
1719icalproperty* icalproperty_new_xlicmimefilename(const char* v);
1720void icalproperty_set_xlicmimefilename(icalproperty* prop, const char* v);
1721const char* icalproperty_get_xlicmimefilename(icalproperty* prop);icalproperty* icalproperty_vanew_xlicmimeoptinfo(const char* v, ...);
1722
1723/* X-LIC-MIMEOPTINFO */
1724icalproperty* icalproperty_new_xlicmimeoptinfo(const char* v);
1725void icalproperty_set_xlicmimeoptinfo(icalproperty* prop, const char* v);
1726const char* icalproperty_get_xlicmimeoptinfo(icalproperty* prop);
1727
1728#endif /*ICALPROPERTY_H*/
1729/* -*- Mode: C -*- */
1730/*======================================================================
1731 FILE: icalvalue.h
1732 CREATOR: eric 20 March 1999
1733
1734
1735 $Id$
1736 $Locker$
1737
1738
1739
1740 (C) COPYRIGHT 2000, Eric Busboom, http://www.softwarestudio.org
1741
1742 This program is free software; you can redistribute it and/or modify
1743 it under the terms of either:
1744
1745 The LGPL as published by the Free Software Foundation, version
1746 2.1, available at: http://www.fsf.org/copyleft/lesser.html
1747
1748 Or:
1749
1750 The Mozilla Public License Version 1.0. You may obtain a copy of
1751 the License at http://www.mozilla.org/MPL/
1752
1753 The original code is icalvalue.h
1754
1755 ======================================================================*/
1756
1757#ifndef ICALVALUE_H
1758#define ICALVALUE_H
1759
1760#include <time.h>
1761
1762/* Defined in icalderivedvalue.h */
1763/*typedef void icalvalue;*/
1764
1765icalvalue* icalvalue_new(icalvalue_kind kind);
1766
1767icalvalue* icalvalue_new_clone(icalvalue* value);
1768
1769icalvalue* icalvalue_new_from_string(icalvalue_kind kind, const char* str);
1770
1771void icalvalue_free(icalvalue* value);
1772
1773int icalvalue_is_valid(icalvalue* value);
1774
1775const char* icalvalue_as_ical_string(icalvalue* value);
1776
1777icalvalue_kind icalvalue_isa(icalvalue* value);
1778
1779int icalvalue_isa_value(void*);
1780
1781icalparameter_xliccomparetype icalvalue_compare(icalvalue* a, icalvalue *b);
1782
1783
1784/* Special, non autogenerated value accessors */
1785
1786icalvalue* icalvalue_new_recur (struct icalrecurrencetype v);
1787void icalvalue_set_recur(icalvalue* value, struct icalrecurrencetype v);
1788struct icalrecurrencetype icalvalue_get_recur(icalvalue* value);
1789
1790icalvalue* icalvalue_new_trigger (struct icaltriggertype v);
1791void icalvalue_set_trigger(icalvalue* value, struct icaltriggertype v);
1792struct icaltriggertype icalvalue_get_trigger(icalvalue* value);
1793
1794icalvalue* icalvalue_new_datetimeperiod (struct icaldatetimeperiodtype v);
1795void icalvalue_set_datetimeperiod(icalvalue* value,
1796 struct icaldatetimeperiodtype v);
1797struct icaldatetimeperiodtype icalvalue_get_datetimeperiod(icalvalue* value);
1798
1799/* Convert enumerations */
1800
1801icalvalue_kind icalvalue_string_to_kind(const char* str);
1802const char* icalvalue_kind_to_string(icalvalue_kind kind);
1803
1804
1805#endif /*ICALVALUE_H*/
1806/* -*- Mode: C -*- */
1807/*======================================================================
1808 FILE: icalparam.h
1809 CREATOR: eric 20 March 1999
1810
1811
1812 $Id$
1813 $Locker$
1814
1815
1816
1817 (C) COPYRIGHT 2000, Eric Busboom, http://www.softwarestudio.org
1818
1819 This program is free software; you can redistribute it and/or modify
1820 it under the terms of either:
1821
1822 The LGPL as published by the Free Software Foundation, version
1823 2.1, available at: http://www.fsf.org/copyleft/lesser.html
1824
1825 Or:
1826
1827 The Mozilla Public License Version 1.0. You may obtain a copy of
1828 the License at http://www.mozilla.org/MPL/
1829
1830 The original code is icalparam.h
1831
1832 ======================================================================*/
1833
1834#ifndef ICALPARAM_H
1835#define ICALPARAM_H
1836
1837
1838/* Declared in icalderivedparameter.h */
1839/*typedef void icalparameter;*/
1840
1841icalparameter* icalparameter_new(icalparameter_kind kind);
1842icalparameter* icalparameter_new_clone(icalparameter* p);
1843
1844/* Create from string of form "PARAMNAME=VALUE" */
1845icalparameter* icalparameter_new_from_string(const char* value);
1846
1847/* Create from just the value, the part after the "=" */
1848icalparameter* icalparameter_new_from_value_string(icalparameter_kind kind, const char* value);
1849
1850void icalparameter_free(icalparameter* parameter);
1851
1852char* icalparameter_as_ical_string(icalparameter* parameter);
1853
1854int icalparameter_is_valid(icalparameter* parameter);
1855
1856icalparameter_kind icalparameter_isa(icalparameter* parameter);
1857
1858int icalparameter_isa_parameter(void* param);
1859
1860/* Acess the name of an X parameer */
1861void icalparameter_set_xname (icalparameter* param, const char* v);
1862const char* icalparameter_get_xname(icalparameter* param);
1863void icalparameter_set_xvalue (icalparameter* param, const char* v);
1864const char* icalparameter_get_xvalue(icalparameter* param);
1865
1866/* Convert enumerations */
1867
1868const char* icalparameter_kind_to_string(icalparameter_kind kind);
1869icalparameter_kind icalparameter_string_to_kind(const char* string);
1870
1871
1872
1873#endif
1874/* -*- Mode: C -*- */
1875/*======================================================================
1876 FILE: icalproperty.h
1877 CREATOR: eric 20 March 1999
1878
1879
1880 $Id$
1881 $Locker$
1882
1883
1884
1885 (C) COPYRIGHT 2000, Eric Busboom, http://www.softwarestudio.org
1886
1887 This program is free software; you can redistribute it and/or modify
1888 it under the terms of either:
1889
1890 The LGPL as published by the Free Software Foundation, version
1891 2.1, available at: http://www.fsf.org/copyleft/lesser.html
1892
1893 Or:
1894
1895 The Mozilla Public License Version 1.0. You may obtain a copy of
1896 the License at http://www.mozilla.org/MPL/
1897
1898 The original code is icalparam.h
1899
1900 ======================================================================*/
1901
1902
1903#ifndef ICALPROPERTY_H
1904#define ICALPROPERTY_H
1905
1906#include <time.h>
1907
1908
1909
1910
1911/* Actually in icalderivedproperty.h:
1912 typedef void icalproperty; */
1913
1914
1915icalproperty* icalproperty_new(icalproperty_kind kind);
1916
1917icalproperty* icalproperty_new_clone(icalproperty * prop);
1918
1919icalproperty* icalproperty_new_from_string(const char* str);
1920
1921const char* icalproperty_as_ical_string(icalproperty* prop);
1922
1923void icalproperty_free(icalproperty* prop);
1924
1925icalproperty_kind icalproperty_isa(icalproperty* property);
1926int icalproperty_isa_property(void* property);
1927
1928void icalproperty_add_parameter(icalproperty* prop,icalparameter* parameter);
1929void icalproperty_set_parameter(icalproperty* prop,icalparameter* parameter);
1930void icalproperty_set_parameter_from_string(icalproperty* prop,
1931 const char* name, const char* value);
1932const char* icalproperty_get_parameter_as_string(icalproperty* prop,
1933 const char* name);
1934
1935void icalproperty_remove_parameter(icalproperty* prop,
1936 icalparameter_kind kind);
1937
1938int icalproperty_count_parameters(icalproperty* prop);
1939
1940/* Iterate through the parameters */
1941icalparameter* icalproperty_get_first_parameter(icalproperty* prop,
1942 icalparameter_kind kind);
1943icalparameter* icalproperty_get_next_parameter(icalproperty* prop,
1944 icalparameter_kind kind);
1945/* Access the value of the property */
1946void icalproperty_set_value(icalproperty* prop, icalvalue* value);
1947void icalproperty_set_value_from_string(icalproperty* prop,const char* value, const char* kind);
1948
1949icalvalue* icalproperty_get_value(icalproperty* prop);
1950const char* icalproperty_get_value_as_string(icalproperty* prop);
1951
1952/* Deal with X properties */
1953
1954void icalproperty_set_x_name(icalproperty* prop, const char* name);
1955const char* icalproperty_get_x_name(icalproperty* prop);
1956
1957/* Return the name of the property -- the type name converted to a
1958 string, or the value of _get_x_name if the type is and X property */
1959const char* icalproperty_get_name (icalproperty* prop);
1960
1961icalvalue_kind icalparameter_value_to_value_kind(icalparameter_value value);
1962
1963/* Convert kinds to string and get default value type */
1964
1965icalvalue_kind icalproperty_kind_to_value_kind(icalproperty_kind kind);
1966icalvalue_kind icalproperty_value_kind_to_kind(icalvalue_kind kind);
1967const char* icalproperty_kind_to_string(icalproperty_kind kind);
1968icalproperty_kind icalproperty_string_to_kind(const char* string);
1969
1970icalproperty_method icalproperty_string_to_method(const char* str);
1971const char* icalproperty_method_to_string(icalproperty_method method);
1972
1973
1974const char* icalproperty_enum_to_string(int e);
1975int icalproperty_string_to_enum(const char* str);
1976
1977const char* icalproperty_status_to_string(icalproperty_status);
1978icalproperty_status icalproperty_string_to_status(const char* string);
1979
1980int icalproperty_enum_belongs_to_property(icalproperty_kind kind, int e);
1981
1982
1983
1984
1985#endif /*ICALPROPERTY_H*/
1986/* -*- Mode: C -*- */
1987/*======================================================================
1988 FILE: icalattendee.h
1989 CREATOR: eric 8 Mar 01
1990
1991
1992 (C) COPYRIGHT 2000, Eric Busboom, http://www.softwarestudio.org
1993
1994 This program is free software; you can redistribute it and/or modify
1995 it under the terms of either:
1996
1997 The LGPL as published by the Free Software Foundation, version
1998 2.1, available at: http://www.fsf.org/copyleft/lesser.html
1999
2000 Or:
2001
2002 The Mozilla Public License Version 1.0. You may obtain a copy of
2003 the License at http://www.mozilla.org/MPL/
2004
2005 The original code is icaltypes.h
2006
2007======================================================================*/
2008
2009#ifndef ICALATTENDEE_H
2010#define ICALATTENDEE_H
2011
2012#include <time.h>
2013
2014struct icalorganizertype {
2015 const char* value;
2016 const char* common_name;
2017 const char* dir;
2018 const char* sentby;
2019 const char* language;
2020
2021};
2022
2023/* Create a copy of the given organizer. Libical will not own the
2024 memory for the strings in the copy; the call must free them */
2025struct icalorganizertype icalorganizertype_new_clone(struct icalorganizertype a);
2026
2027
2028struct icalattendeetype {
2029 const char* cuid; /* Cal user id, contents of the property value */
2030 /*icalparameter_cutype cutype;*/
2031 const char* member;
2032 /*icalparameter_role role;*/
2033 int rsvp;
2034 const char* delto;
2035 const char* delfrom;
2036 const char* sentby;
2037 const char* cn;
2038 const char* dir;
2039 const char* language;
2040};
2041
2042/* Create a copy of the given attendee. Libical will not own the
2043 memory for the strings in the copy; the call must free them */
2044struct icalattendeetype icalattendeetype_new_clone(struct icalattendeetype a);
2045
2046
2047#endif /* !ICALATTENDEE_H */
2048/*======================================================================
2049 FILE: pvl.h
2050 CREATOR: eric November, 1995
2051
2052
2053 (C) COPYRIGHT 2000, Eric Busboom, http://www.softwarestudio.org
2054======================================================================*/
2055
2056
2057#ifndef __PVL_H__
2058#define __PVL_H__
2059
2060typedef void* pvl_list;
2061typedef void* pvl_elem;
2062
2063/*
2064 struct pvl_elem_t
2065
2066 This type is private. Always use pvl_elem instead. The struct would
2067 not even appear in this header except to make code in the USE_MACROS
2068 blocks work
2069
2070 */
2071typedef struct pvl_elem_t
2072{
2073 int MAGIC; /* Magic Identifier */
2074 void *d; /* Pointer to data user is storing */
2075 struct pvl_elem_t *next;/* Next element */
2076 struct pvl_elem_t *prior;/* prior element */
2077} pvl_elem_t;
2078
2079
2080
2081/* This global is incremented for each call to pvl_new_element(); it gives each
2082 * list a unique identifer */
2083
2084extern int pvl_elem_count;
2085extern int pvl_list_count;
2086
2087/* Create new lists or elements */
2088pvl_elem pvl_new_element(void* d, pvl_elem next,pvl_elem prior);
2089pvl_list pvl_newlist(void);
2090void pvl_free(pvl_list);
2091
2092/* Add, remove, or get the head of the list */
2093void pvl_unshift(pvl_list l,void *d);
2094void* pvl_shift(pvl_list l);
2095pvl_elem pvl_head(pvl_list);
2096
2097/* Add, remove or get the tail of the list */
2098void pvl_push(pvl_list l,void *d);
2099void* pvl_pop(pvl_list l);
2100pvl_elem pvl_tail(pvl_list);
2101
2102/* Insert elements in random places */
2103typedef int (*pvl_comparef)(void* a, void* b); /* a, b are of the data type*/
2104void pvl_insert_ordered(pvl_list l,pvl_comparef f,void *d);
2105void pvl_insert_after(pvl_list l,pvl_elem e,void *d);
2106void pvl_insert_before(pvl_list l,pvl_elem e,void *d);
2107
2108/* Remove an element, or clear the entire list */
2109void* pvl_remove(pvl_list,pvl_elem); /* Remove element, return data */
2110void pvl_clear(pvl_list); /* Remove all elements, de-allocate all data */
2111
2112int pvl_count(pvl_list);
2113
2114/* Navagate the list */
2115pvl_elem pvl_next(pvl_elem e);
2116pvl_elem pvl_prior(pvl_elem e);
2117
2118/* get the data in the list */
2119#ifndef PVL_USE_MACROS
2120void* pvl_data(pvl_elem);
2121#else
2122#define pvl_data(x) x==0 ? 0 : ((struct pvl_elem_t *)x)->d;
2123#endif
2124
2125
2126/* Find an element for which a function returns true */
2127typedef int (*pvl_findf)(void* a, void* b); /*a is list elem, b is other data*/
2128pvl_elem pvl_find(pvl_list l,pvl_findf f,void* v);
2129pvl_elem pvl_find_next(pvl_list l,pvl_findf f,void* v);
2130
2131/* Pass each element in the list to a function */
2132typedef void (*pvl_applyf)(void* a, void* b); /*a is list elem, b is other data*/
2133void pvl_apply(pvl_list l,pvl_applyf f, void *v);
2134
2135
2136#endif /* __PVL_H__ */
2137
2138
2139
2140
2141
2142/* -*- Mode: C -*- */
2143/*======================================================================
2144 FILE: icalcomponent.h
2145 CREATOR: eric 20 March 1999
2146
2147
2148 (C) COPYRIGHT 2000, Eric Busboom, http://www.softwarestudio.org
2149
2150 This program is free software; you can redistribute it and/or modify
2151 it under the terms of either:
2152
2153 The LGPL as published by the Free Software Foundation, version
2154 2.1, available at: http://www.fsf.org/copyleft/lesser.html
2155
2156 Or:
2157
2158 The Mozilla Public License Version 1.0. You may obtain a copy of
2159 the License at http://www.mozilla.org/MPL/
2160
2161 The original code is icalcomponent.h
2162
2163======================================================================*/
2164
2165#ifndef ICALCOMPONENT_H
2166#define ICALCOMPONENT_H
2167
2168
2169typedef void icalcomponent;
2170
2171/* This is exposed so that callers will not have to allocate and
2172 deallocate iterators. Pretend that you can't see it. */
2173typedef struct icalcompiter
2174{
2175 icalcomponent_kind kind;
2176 pvl_elem iter;
2177
2178} icalcompiter;
2179
2180icalcomponent* icalcomponent_new(icalcomponent_kind kind);
2181icalcomponent* icalcomponent_new_clone(icalcomponent* component);
2182icalcomponent* icalcomponent_new_from_string(char* str);
2183icalcomponent* icalcomponent_vanew(icalcomponent_kind kind, ...);
2184void icalcomponent_free(icalcomponent* component);
2185
2186char* icalcomponent_as_ical_string(icalcomponent* component);
2187
2188int icalcomponent_is_valid(icalcomponent* component);
2189
2190icalcomponent_kind icalcomponent_isa(icalcomponent* component);
2191
2192int icalcomponent_isa_component (void* component);
2193
2194/*
2195 * Working with properties
2196 */
2197
2198void icalcomponent_add_property(icalcomponent* component,
2199 icalproperty* property);
2200
2201void icalcomponent_remove_property(icalcomponent* component,
2202 icalproperty* property);
2203
2204int icalcomponent_count_properties(icalcomponent* component,
2205 icalproperty_kind kind);
2206
2207/* Iterate through the properties */
2208icalproperty* icalcomponent_get_current_property(icalcomponent* component);
2209
2210icalproperty* icalcomponent_get_first_property(icalcomponent* component,
2211 icalproperty_kind kind);
2212icalproperty* icalcomponent_get_next_property(icalcomponent* component,
2213 icalproperty_kind kind);
2214
2215
2216/*
2217 * Working with components
2218 */
2219
2220
2221/* Return the first VEVENT, VTODO or VJOURNAL sub-component of cop, or
2222 comp if it is one of those types */
2223
2224icalcomponent* icalcomponent_get_inner(icalcomponent* comp);
2225
2226
2227void icalcomponent_add_component(icalcomponent* parent,
2228 icalcomponent* child);
2229
2230void icalcomponent_remove_component(icalcomponent* parent,
2231 icalcomponent* child);
2232
2233int icalcomponent_count_components(icalcomponent* component,
2234 icalcomponent_kind kind);
2235
2236/* Iteration Routines. There are two forms of iterators, internal and
2237external. The internal ones came first, and are almost completely
2238sufficient, but they fail badly when you want to construct a loop that
2239removes components from the container.*/
2240
2241
2242/* Iterate through components */
2243icalcomponent* icalcomponent_get_current_component (icalcomponent* component);
2244
2245icalcomponent* icalcomponent_get_first_component(icalcomponent* component,
2246 icalcomponent_kind kind);
2247icalcomponent* icalcomponent_get_next_component(icalcomponent* component,
2248 icalcomponent_kind kind);
2249
2250/* Using external iterators */
2251icalcompiter icalcomponent_begin_component(icalcomponent* component,
2252 icalcomponent_kind kind);
2253icalcompiter icalcomponent_end_component(icalcomponent* component,
2254 icalcomponent_kind kind);
2255icalcomponent* icalcompiter_next(icalcompiter* i);
2256icalcomponent* icalcompiter_prior(icalcompiter* i);
2257icalcomponent* icalcompiter_deref(icalcompiter* i);
2258
2259
2260
2261
2262/* Working with embedded error properties */
2263
2264int icalcomponent_count_errors(icalcomponent* component);
2265
2266/* Remove all X-LIC-ERROR properties*/
2267void icalcomponent_strip_errors(icalcomponent* component);
2268
2269/* Convert some X-LIC-ERROR properties into RETURN-STATUS properties*/
2270void icalcomponent_convert_errors(icalcomponent* component);
2271
2272/* Internal operations. They are private, and you should not be using them. */
2273icalcomponent* icalcomponent_get_parent(icalcomponent* component);
2274void icalcomponent_set_parent(icalcomponent* component,
2275 icalcomponent* parent);
2276
2277/* Kind conversion routiens */
2278
2279icalcomponent_kind icalcomponent_string_to_kind(const char* string);
2280
2281const char* icalcomponent_kind_to_string(icalcomponent_kind kind);
2282
2283
2284/************* Derived class methods. ****************************
2285
2286If the code was in an OO language, the remaining routines would be
2287members of classes derived from icalcomponent. Don't call them on the
2288wrong component subtypes. */
2289
2290/* For VCOMPONENT: Return a reference to the first VEVENT, VTODO or
2291 VJOURNAL */
2292icalcomponent* icalcomponent_get_first_real_component(icalcomponent *c);
2293
2294/* For VEVENT, VTODO, VJOURNAL and VTIMEZONE: report the start and end
2295 times of an event in UTC */
2296struct icaltime_span icalcomponent_get_span(icalcomponent* comp);
2297
2298/******************** Convienience routines **********************/
2299
2300void icalcomponent_set_dtstart(icalcomponent* comp, struct icaltimetype v);
2301struct icaltimetype icalcomponent_get_dtstart(icalcomponent* comp);
2302
2303/* For the icalcomponent routines only, dtend and duration are tied
2304 together. If you call the set routine for one and the other exists,
2305 the routine will calculate the change to the other. That is, if
2306 there is a DTEND and you call set_duration, the routine will modify
2307 DTEND to be the sum of DTSTART and the duration. If you call a get
2308 routine for one and the other exists, the routine will calculate
2309 the return value. If you call a set routine and neither exists, the
2310 routine will create the apcompriate comperty */
2311
2312
2313struct icaltimetype icalcomponent_get_dtend(icalcomponent* comp);
2314void icalcomponent_set_dtend(icalcomponent* comp, struct icaltimetype v);
2315
2316void icalcomponent_set_duration(icalcomponent* comp,
2317 struct icaldurationtype v);
2318struct icaldurationtype icalcomponent_get_duration(icalcomponent* comp);
2319
2320void icalcomponent_set_method(icalcomponent* comp, icalproperty_method method);
2321icalproperty_method icalcomponent_get_method(icalcomponent* comp);
2322
2323struct icaltimetype icalcomponent_get_dtstamp(icalcomponent* comp);
2324void icalcomponent_set_dtstamp(icalcomponent* comp, struct icaltimetype v);
2325
2326
2327void icalcomponent_set_summary(icalcomponent* comp, const char* v);
2328const char* icalcomponent_get_summary(icalcomponent* comp);
2329
2330void icalcomponent_set_comment(icalcomponent* comp, const char* v);
2331const char* icalcomponent_get_comment(icalcomponent* comp);
2332
2333void icalcomponent_set_uid(icalcomponent* comp, const char* v);
2334const char* icalcomponent_get_uid(icalcomponent* comp);
2335
2336void icalcomponent_set_recurrenceid(icalcomponent* comp,
2337 struct icaltimetype v);
2338struct icaltimetype icalcomponent_get_recurrenceid(icalcomponent* comp);
2339
2340
2341void icalcomponent_set_organizer(icalcomponent* comp,
2342 struct icalorganizertype org);
2343 struct icalorganizertype icalcomponent_get_organizer(icalcomponent* comp);
2344
2345
2346void icalcomponent_add_attendee(icalcomponent *comp,
2347 struct icalattendeetype attendee);
2348
2349int icalcomponent_remove_attendee(icalcomponent *comp, char* cuid);
2350
2351/* Get the Nth attendee. Out of range indices return an attendee
2352 with cuid == 0 */
2353struct icalattendeetype icalcomponent_get_attendee(icalcomponent *comp,
2354 int index);
2355
2356
2357
2358
2359/*************** Type Specific routines ***************/
2360
2361icalcomponent* icalcomponent_new_vcalendar();
2362icalcomponent* icalcomponent_new_vevent();
2363icalcomponent* icalcomponent_new_vtodo();
2364icalcomponent* icalcomponent_new_vjournal();
2365icalcomponent* icalcomponent_new_valarm();
2366icalcomponent* icalcomponent_new_vfreebusy();
2367icalcomponent* icalcomponent_new_vtimezone();
2368icalcomponent* icalcomponent_new_xstandard();
2369icalcomponent* icalcomponent_new_xdaylight();
2370
2371
2372
2373#endif /* !ICALCOMPONENT_H */
2374
2375
2376
2377/* -*- Mode: C -*- */
2378/*======================================================================
2379 FILE: icalparser.h
2380 CREATOR: eric 20 April 1999
2381
2382 $Id$
2383
2384
2385 (C) COPYRIGHT 2000, Eric Busboom, http://www.softwarestudio.org
2386
2387 This program is free software; you can redistribute it and/or modify
2388 it under the terms of either:
2389
2390 The LGPL as published by the Free Software Foundation, version
2391 2.1, available at: http://www.fsf.org/copyleft/lesser.html
2392
2393 Or:
2394
2395 The Mozilla Public License Version 1.0. You may obtain a copy of
2396 the License at http://www.mozilla.org/MPL/
2397
2398 The original code is icalparser.h
2399
2400======================================================================*/
2401
2402
2403#ifndef ICALPARSER_H
2404#define ICALPARSER_H
2405
2406
2407#include <stdio.h> /* For FILE* */
2408
2409typedef void* icalparser;
2410
2411
2412/***********************************************************************
2413 * Line-oriented parsing.
2414 *
2415 * Create a new parser via icalparse_new_parser, then add ines one at
2416 * a time with icalparse_add_line(). icalparser_add_line() will return
2417 * non-zero when it has finished with a component.
2418 ***********************************************************************/
2419
2420typedef enum icalparser_state {
2421 ICALPARSER_ERROR,
2422 ICALPARSER_SUCCESS,
2423 ICALPARSER_BEGIN_COMP,
2424 ICALPARSER_END_COMP,
2425 ICALPARSER_IN_PROGRESS
2426} icalparser_state;
2427
2428icalparser* icalparser_new(void);
2429icalcomponent* icalparser_add_line(icalparser* parser, char* str );
2430icalcomponent* icalparser_clean(icalparser* parser);
2431icalparser_state icalparser_get_state(icalparser* parser);
2432void icalparser_free(icalparser* parser);
2433
2434
2435/***********************************************************************
2436 * Message oriented parsing. icalparser_parse takes a string that
2437 * holds the text ( in RFC 2445 format ) and returns a pointer to an
2438 * icalcomponent. The caller owns the memory. line_gen_func is a
2439 * pointer to a function that returns one content line per invocation
2440 **********************************************************************/
2441
2442icalcomponent* icalparser_parse(icalparser *parser,
2443 char* (*line_gen_func)(char *s, size_t size, void *d));
2444
2445/* Set the data that icalparser_parse will give to the line_gen_func
2446 as the parameter 'd'*/
2447void icalparser_set_gen_data(icalparser* parser, void* data);
2448
2449
2450icalcomponent* icalparser_parse_string(const char* str);
2451
2452
2453/***********************************************************************
2454 * Parser support functions
2455 ***********************************************************************/
2456
2457/* Use the flex/bison parser to turn a string into a value type */
2458icalvalue* icalparser_parse_value(icalvalue_kind kind,
2459 const char* str, icalcomponent** errors);
2460
2461/* Given a line generator function, return a single iCal content line.*/
2462char* icalparser_get_line(icalparser* parser, char* (*line_gen_func)(char *s, size_t size, void *d));
2463
2464char* string_line_generator(char *out, size_t buf_size, void *d);
2465
2466#endif /* !ICALPARSE_H */
2467/* -*- Mode: C -*- */
2468/*======================================================================
2469 FILE: icalmemory.h
2470 CREATOR: eric 30 June 1999
2471
2472
2473 $Id$
2474 $Locker$
2475
2476 This program is free software; you can redistribute it and/or modify
2477 it under the terms of either:
2478
2479 The LGPL as published by the Free Software Foundation, version
2480 2.1, available at: http://www.fsf.org/copyleft/lesser.html
2481
2482 Or:
2483
2484 The Mozilla Public License Version 1.0. You may obtain a copy of
2485 the License at http://www.mozilla.org/MPL/
2486
2487 The Initial Developer of the Original Code is Eric Busboom
2488
2489 (C) COPYRIGHT 2000, Eric Busboom, http://www.softwarestudio.org
2490======================================================================*/
2491
2492#ifndef ICALMEMORY_H
2493#define ICALMEMORY_H
2494
2495#include <sys/types.h> /* for size_t */
2496
2497
2498/* Tmp buffers are managed by ical. References can be returned to the
2499 caller, although the caller will not own the memory. */
2500
2501void* icalmemory_tmp_buffer(size_t size);
2502char* icalmemory_tmp_copy(const char* str);
2503
2504/* Add an externally allocated buffer to the ring. */
2505void icalmemory_add_tmp_buffer(void*);
2506
2507
2508/* Free all memory used in the ring */
2509void icalmemory_free_ring(void);
2510
2511/* Non-tmp buffers must be freed. These are mostly wrappers around
2512 * malloc, etc, but are used so the caller can change the memory
2513 * allocators in a future version of the library */
2514
2515void* icalmemory_new_buffer(size_t size);
2516void* icalmemory_resize_buffer(void* buf, size_t size);
2517void icalmemory_free_buffer(void* buf);
2518
2519/* icalmemory_append_string will copy the string 'string' to the
2520 buffer 'buf' starting at position 'pos', reallocing 'buf' if it is
2521 too small. 'buf_size' is the size of 'buf' and will be changed if
2522 'buf' is reallocated. 'pos' will point to the last byte of the new
2523 string in 'buf', usually a '\0' */
2524
2525/* THESE ROUTINES CAN NOT BE USED ON TMP BUFFERS. Only use them on
2526 normally allocated memory, or on buffers created from
2527 icalmemory_new_buffer, never with buffers created by
2528 icalmemory_tmp_buffer. If icalmemory_append_string has to resize a
2529 buffer on the ring, the ring will loose track of it an you will
2530 have memory problems. */
2531
2532void icalmemory_append_string(char** buf, char** pos, size_t* buf_size,
2533 const char* string);
2534
2535/* icalmemory_append_char is similar, but is appends a character instead of a string */
2536void icalmemory_append_char(char** buf, char** pos, size_t* buf_size,
2537 char ch);
2538
2539/* A wrapper around strdup. Partly to trap calls to strdup, partly
2540 because in -ansi, gcc on Red Hat claims that strudup is undeclared */
2541char* icalmemory_strdup(const char *s);
2542
2543#endif /* !ICALMEMORY_H */
2544
2545
2546
2547/* -*- Mode: C -*- */
2548/*======================================================================
2549 FILE: icalerror.h
2550 CREATOR: eric 09 May 1999
2551
2552 $Id$
2553
2554
2555 (C) COPYRIGHT 2000, Eric Busboom, http://www.softwarestudio.org
2556
2557 This program is free software; you can redistribute it and/or modify
2558 it under the terms of either:
2559
2560 The LGPL as published by the Free Software Foundation, version
2561 2.1, available at: http://www.fsf.org/copyleft/lesser.html
2562
2563 Or:
2564
2565 The Mozilla Public License Version 1.0. You may obtain a copy of
2566 the License at http://www.mozilla.org/MPL/
2567
2568 The original code is icalerror.h
2569
2570======================================================================*/
2571
2572
2573#ifndef ICALERROR_H
2574#define ICALERROR_H
2575
2576#include <assert.h>
2577#include <stdio.h> /* For icalerror_warn() */
2578
2579
2580#ifdef HAVE_CONFIG_H
2581#include "config.h"
2582#endif
2583
2584#define ICAL_SETERROR_ISFUNC
2585
2586
2587/* This routine is called before any error is triggered. It is called
2588 by icalerror_set_errno, so it does not appear in all of the macros
2589 below */
2590void icalerror_stop_here(void);
2591
2592void icalerror_crash_here(void);
2593
2594typedef enum icalerrorenum {
2595
2596 ICAL_BADARG_ERROR,
2597 ICAL_NEWFAILED_ERROR,
2598 ICAL_ALLOCATION_ERROR,
2599 ICAL_MALFORMEDDATA_ERROR,
2600 ICAL_PARSE_ERROR,
2601 ICAL_INTERNAL_ERROR, /* Like assert --internal consist. prob */
2602 ICAL_FILE_ERROR,
2603 ICAL_USAGE_ERROR,
2604 ICAL_UNIMPLEMENTED_ERROR,
2605 ICAL_UNKNOWN_ERROR, /* Used for problems in input to icalerror_strerror()*/
2606 ICAL_NO_ERROR
2607
2608} icalerrorenum;
2609
2610/* The libical error enumeration, like errno*/
2611extern icalerrorenum icalerrno;
2612
2613/* If true, libicl aborts after a call to icalerror_set_error*/
2614extern int icalerror_errors_are_fatal;
2615
2616/* Warning messages */
2617
2618#ifdef __GNUC__ca
2619#define icalerror_warn(message) {fprintf(stderr,"%s(), %s:%d: %s\n",__FUNCTION__,__FILE__,__LINE__,message);}
2620#else /* __GNU_C__ */
2621#define icalerror_warn(message) {fprintf(stderr,"%s:%d: %s\n",__FILE__,__LINE__,message);}
2622#endif /* __GNU_C__ */
2623
2624
2625void icalerror_clear_errno(void);
2626
2627/* Make an individual error fatal or non-fatal. */
2628typedef enum icalerrorstate {
2629 ICAL_ERROR_FATAL, /* Not fata */
2630 ICAL_ERROR_NONFATAL, /* Fatal */
2631 ICAL_ERROR_DEFAULT, /* Use the value of icalerror_errors_are_fatal*/
2632 ICAL_ERROR_UNKNOWN /* Asked state for an unknown error type */
2633} icalerrorstate ;
2634
2635char* icalerror_strerror(icalerrorenum e);
2636char* icalerror_perror();
2637void icalerror_set_error_state( icalerrorenum error, icalerrorstate);
2638icalerrorstate icalerror_get_error_state( icalerrorenum error);
2639
2640#ifndef ICAL_SETERROR_ISFUNC
2641#define icalerror_set_errno(x) \
2642icalerrno = x; \
2643if(icalerror_get_error_state(x)==ICAL_ERROR_FATAL || \
2644 (icalerror_get_error_state(x)==ICAL_ERROR_DEFAULT && \
2645 icalerror_errors_are_fatal == 1 )){ \
2646 icalerror_warn(icalerror_strerror(x)); \
2647 assert(0); \
2648}
2649#else
2650void icalerror_set_errno(icalerrorenum);
2651#endif
2652
2653#ifdef ICAL_ERRORS_ARE_FATAL
2654#undef NDEBUG
2655#endif
2656
2657#define icalerror_check_value_type(value,type);
2658#define icalerror_check_property_type(value,type);
2659#define icalerror_check_parameter_type(value,type);
2660#define icalerror_check_component_type(value,type);
2661
2662/* Assert with a message */
2663#ifdef ICAL_ERRORS_ARE_FATAL
2664
2665#ifdef __GNUC__
2666#define icalerror_assert(test,message) if(!(test)){fprintf(stderr,"%s(), %s:%d: %s\n",__FUNCTION__,__FILE__,__LINE__,message);icalerror_stop_here(); abort();}
2667#else /*__GNUC__*/
2668#define icalerror_assert(test,message) if(!(test)){fprintf(stderr,"%s:%d: %s\n",__FILE__,__LINE__,message);icalerror_stop_here(); abort();}
2669#endif /*__GNUC__*/
2670
2671#else /* ICAL_ERRORS_ARE_FATAL */
2672#define icalerror_assert(test,message)
2673#endif /* ICAL_ERRORS_ARE_FATAL */
2674
2675/* Check & abort if check fails */
2676#define icalerror_check_arg(test,arg) if(!(test)) { icalerror_set_errno(ICAL_BADARG_ERROR); }
2677
2678/* Check & return void if check fails*/
2679#define icalerror_check_arg_rv(test,arg) if(!(test)) {icalerror_set_errno(ICAL_BADARG_ERROR); return; }
2680
2681/* Check & return 0 if check fails*/
2682#define icalerror_check_arg_rz(test,arg) if(!(test)) { icalerror_set_errno(ICAL_BADARG_ERROR); return 0;}
2683
2684/* Check & return an error if check fails*/
2685#define icalerror_check_arg_re(test,arg,error) if(!(test)) { icalerror_stop_here(); assert(0); return error;}
2686
2687/* Check & return something*/
2688#define icalerror_check_arg_rx(test,arg,x) if(!(test)) { icalerror_set_errno(ICAL_BADARG_ERROR); return x;}
2689
2690
2691
2692/* String interfaces to set an error to NONFATAL and restore it to its
2693 original value */
2694
2695icalerrorstate icalerror_supress(const char* error);
2696void icalerror_restore(const char* error, icalerrorstate es);
2697
2698
2699#endif /* !ICALERROR_H */
2700
2701
2702
2703/* -*- Mode: C -*- */
2704/*======================================================================
2705 FILE: icalrestriction.h
2706 CREATOR: eric 24 April 1999
2707
2708 $Id$
2709
2710
2711 (C) COPYRIGHT 2000, Eric Busboom, http://www.softwarestudio.org
2712
2713 This program is free software; you can redistribute it and/or modify
2714 it under the terms of either:
2715
2716 The LGPL as published by the Free Software Foundation, version
2717 2.1, available at: http://www.fsf.org/copyleft/lesser.html
2718
2719 Or:
2720
2721 The Mozilla Public License Version 1.0. You may obtain a copy of
2722 the License at http://www.mozilla.org/MPL/
2723
2724 The original code is icalrestriction.h
2725
2726 Contributions from:
2727 Graham Davison (g.m.davison@computer.org)
2728
2729
2730======================================================================*/
2731
2732
2733#ifndef ICALRESTRICTION_H
2734#define ICALRESTRICTION_H
2735
2736/* These must stay in this order for icalrestriction_compare to work */
2737typedef enum icalrestriction_kind {
2738 ICAL_RESTRICTION_NONE=0, /* 0 */
2739 ICAL_RESTRICTION_ZERO, /* 1 */
2740 ICAL_RESTRICTION_ONE, /* 2 */
2741 ICAL_RESTRICTION_ZEROPLUS, /* 3 */
2742 ICAL_RESTRICTION_ONEPLUS, /* 4 */
2743 ICAL_RESTRICTION_ZEROORONE, /* 5 */
2744 ICAL_RESTRICTION_ONEEXCLUSIVE,/* 6 */
2745 ICAL_RESTRICTION_ONEMUTUAL, /* 7 */
2746 ICAL_RESTRICTION_UNKNOWN /* 8 */
2747} icalrestriction_kind;
2748
2749int
2750icalrestriction_compare(icalrestriction_kind restr, int count);
2751
2752
2753int
2754icalrestriction_is_parameter_allowed(icalproperty_kind property,
2755 icalparameter_kind parameter);
2756
2757int icalrestriction_check(icalcomponent* comp);
2758
2759
2760#endif /* !ICALRESTRICTION_H */
2761
2762
2763
2764/* -*- Mode: C -*-
2765 ======================================================================
2766 FILE: sspm.h Mime Parser
2767 CREATOR: eric 25 June 2000
2768
2769 $Id$
2770 $Locker$
2771
2772 The contents of this file are subject to the Mozilla Public License
2773 Version 1.0 (the "License"); you may not use this file except in
2774 compliance with the License. You may obtain a copy of the License at
2775 http://www.mozilla.org/MPL/
2776
2777 Software distributed under the License is distributed on an "AS IS"
2778 basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
2779 the License for the specific language governing rights and
2780 limitations under the License.
2781
2782
2783 This program is free software; you can redistribute it and/or modify
2784 it under the terms of either:
2785
2786 The LGPL as published by the Free Software Foundation, version
2787 2.1, available at: http://www.fsf.org/copyleft/lesser.html
2788
2789 Or:
2790
2791 The Mozilla Public License Version 1.0. You may obtain a copy of
2792 the License at http://www.mozilla.org/MPL/
2793
2794 The Initial Developer of the Original Code is Eric Busboom
2795
2796 (C) COPYRIGHT 2000, Eric Busboom, http://www.softwarestudio.org
2797 ======================================================================*/
2798
2799#ifndef SSPM_H
2800#define SSPM_H
2801
2802enum sspm_major_type {
2803 SSPM_NO_MAJOR_TYPE,
2804 SSPM_TEXT_MAJOR_TYPE,
2805 SSPM_IMAGE_MAJOR_TYPE,
2806 SSPM_AUDIO_MAJOR_TYPE,
2807 SSPM_VIDEO_MAJOR_TYPE,
2808 SSPM_APPLICATION_MAJOR_TYPE,
2809 SSPM_MULTIPART_MAJOR_TYPE,
2810 SSPM_MESSAGE_MAJOR_TYPE,
2811 SSPM_UNKNOWN_MAJOR_TYPE
2812};
2813
2814enum sspm_minor_type {
2815 SSPM_NO_MINOR_TYPE,
2816 SSPM_ANY_MINOR_TYPE,
2817 SSPM_PLAIN_MINOR_TYPE,
2818 SSPM_RFC822_MINOR_TYPE,
2819 SSPM_DIGEST_MINOR_TYPE,
2820 SSPM_CALENDAR_MINOR_TYPE,
2821 SSPM_MIXED_MINOR_TYPE,
2822 SSPM_RELATED_MINOR_TYPE,
2823 SSPM_ALTERNATIVE_MINOR_TYPE,
2824 SSPM_PARALLEL_MINOR_TYPE,
2825 SSPM_UNKNOWN_MINOR_TYPE
2826};
2827
2828enum sspm_encoding {
2829 SSPM_NO_ENCODING,
2830 SSPM_QUOTED_PRINTABLE_ENCODING,
2831 SSPM_8BIT_ENCODING,
2832 SSPM_7BIT_ENCODING,
2833 SSPM_BINARY_ENCODING,
2834 SSPM_BASE64_ENCODING,
2835 SSPM_UNKNOWN_ENCODING
2836};
2837
2838enum sspm_error{
2839 SSPM_NO_ERROR,
2840 SSPM_UNEXPECTED_BOUNDARY_ERROR,
2841 SSPM_WRONG_BOUNDARY_ERROR,
2842 SSPM_NO_BOUNDARY_ERROR,
2843 SSPM_NO_HEADER_ERROR,
2844 SSPM_MALFORMED_HEADER_ERROR
2845};
2846
2847
2848struct sspm_header
2849{
2850 int def;
2851 char* boundary;
2852 enum sspm_major_type major;
2853 enum sspm_minor_type minor;
2854 char *minor_text;
2855 char ** content_type_params;
2856 char* charset;
2857 enum sspm_encoding encoding;
2858 char* filename;
2859 char* content_id;
2860 enum sspm_error error;
2861 char* error_text;
2862};
2863
2864struct sspm_part {
2865 struct sspm_header header;
2866 int level;
2867 size_t data_size;
2868 void *data;
2869};
2870
2871struct sspm_action_map {
2872 enum sspm_major_type major;
2873 enum sspm_minor_type minor;
2874 void* (*new_part)();
2875 void (*add_line)(void *part, struct sspm_header *header,
2876 char* line, size_t size);
2877 void* (*end_part)(void* part);
2878 void (*free_part)(void *part);
2879};
2880
2881char* sspm_major_type_string(enum sspm_major_type type);
2882char* sspm_minor_type_string(enum sspm_minor_type type);
2883char* sspm_encoding_string(enum sspm_encoding type);
2884
2885int sspm_parse_mime(struct sspm_part *parts,
2886 size_t max_parts,
2887 struct sspm_action_map *actions,
2888 char* (*get_string)(char *s, size_t size, void* data),
2889 void *get_string_data,
2890 struct sspm_header *first_header
2891 );
2892
2893void sspm_free_parts(struct sspm_part *parts, size_t max_parts);
2894
2895char *decode_quoted_printable(char *dest,
2896 char *src,
2897 size_t *size);
2898char *decode_base64(char *dest,
2899 char *src,
2900 size_t *size);
2901
2902
2903int sspm_write_mime(struct sspm_part *parts,size_t num_parts,
2904 char **output_string, char* header);
2905
2906#endif /*SSPM_H*/
2907/* -*- Mode: C -*- */
2908/*======================================================================
2909 FILE: icalmime.h
2910 CREATOR: eric 26 July 2000
2911
2912
2913 $Id$
2914 $Locker$
2915
2916 (C) COPYRIGHT 2000, Eric Busboom, http://www.softwarestudio.org
2917
2918 This program is free software; you can redistribute it and/or modify
2919 it under the terms of either:
2920
2921 The LGPL as published by the Free Software Foundation, version
2922 2.1, available at: http://www.fsf.org/copyleft/lesser.html
2923
2924 Or:
2925
2926 The Mozilla Public License Version 1.0. You may obtain a copy of
2927 the License at http://www.mozilla.org/MPL/
2928
2929======================================================================*/
2930
2931#ifndef ICALMIME_H
2932#define ICALMIME_H
2933
2934
2935 icalcomponent* icalmime_parse(char* (*line_gen_func)(char *s, size_t size,
2936 void *d),
2937 void *data);
2938
2939/* The inverse of icalmime_parse, not implemented yet. Use sspm.h directly. */
2940char* icalmime_as_mime_string(char* component);
2941
2942
2943
2944#endif /* !ICALMIME_H */
2945
2946
2947
2948/* -*- Mode: C -*-
2949 ======================================================================
2950 FILE: icallangbind.h
2951 CREATOR: eric 25 jan 2001
2952
2953 DESCRIPTION:
2954
2955 $Id$
2956 $Locker$
2957
2958 (C) COPYRIGHT 1999 Eric Busboom
2959 http://www.softwarestudio.org
2960
2961 This package is free software and is provided "as is" without
2962 express or implied warranty. It may be used, redistributed and/or
2963 modified under the same terms as perl itself. ( Either the Artistic
2964 License or the GPL. )
2965
2966 ======================================================================*/
2967
2968#ifndef __ICALLANGBIND_H__
2969#define __ICALLANGBIND_H__
2970
2971int* icallangbind_new_array(int size);
2972void icallangbind_free_array(int* array);
2973int icallangbind_access_array(int* array, int index);
2974icalproperty* icallangbind_get_property(icalcomponent *c, int n, const char* prop);
2975const char* icallangbind_get_property_val(icalproperty* p);
2976const char* icallangbind_get_parameter(icalproperty *p, const char* parameter);
2977icalcomponent* icallangbind_get_component(icalcomponent *c, const char* comp);
2978
2979icalproperty* icallangbind_get_first_property(icalcomponent *c,
2980 const char* prop);
2981
2982icalproperty* icallangbind_get_next_property(icalcomponent *c,
2983 const char* prop);
2984
2985icalcomponent* icallangbind_get_first_component(icalcomponent *c,
2986 const char* comp);
2987
2988icalcomponent* icallangbind_get_next_component(icalcomponent *c,
2989 const char* comp);
2990
2991
2992const char* icallangbind_property_eval_string(icalproperty* prop, char* sep);
2993
2994
2995int icallangbind_string_to_open_flag(const char* str);
2996#endif /*__ICALLANGBIND_H__*/