diff options
66 files changed, 8198 insertions, 2973 deletions
diff --git a/libical/AUTHORS b/libical/AUTHORS index e69de29bb2..659288c31d 100644 --- a/libical/AUTHORS +++ b/libical/AUTHORS @@ -0,0 +1 @@ +Eric Busboom <eric@softwarestudio.org> diff --git a/libical/ChangeLog b/libical/ChangeLog index a4197ae714..409d7cb97f 100644 --- a/libical/ChangeLog +++ b/libical/ChangeLog @@ -1,23 +1,127 @@ -2000-11-21 Federico Mena Quintero <federico@helixcode.com> +2000-12-11 Federico Mena Quintero <federico@helixcode.com> - * src/libical/icalyacc.y: Patch from Eric Busboom - <eric@softwarestudio.org> to fix BYDAY elements in monthly - recurrence rule values. + * configure.in (AC_OUTPUT): Fixed order of generated files to make + "make distcheck" work. Turn on AM_MAINTAINER_MODE. + + * src/libical/Makefile.am (EXTRA_DIST): Add icalversion.h.in. + (COMBINEDHEADERS): Added paths to make "make distcheck" work. + (libical_la_SOURCES): Added headers for distribution in our weird + setup. + +2000-12-11 JP Rosevear <jpr@helixcode.com> + + * src/libical/icaltime.c (icaltime_compare_date_only): New + function that compares only the dates, not the times as well. + + * src/libical/icaltime.h: Add prototype for the function above. + + * src/libical/icalrecur.h (struct icalrecurrencetype): Correct + header documentation. + + * src/libical/icaltypes.c: No longer include <limits.h>. + + * src/libical/icalrecur.c: Likewise. + + * src/libical/icalvalue.c: Likewise. + + * src/libical/icalyacc.y: Likewise. + +2000-11-21 Eric Busboom <eric@softwarestudio.org> + + * icalrecur.c Fixed a bug in the increment_* routines that made + incrementing by more then 1 insensible. Thanks to Martin Neimeier + +2000-11-20 Eric Busboom <eric@softwarestudio.org> + + * icalmessage.c Many routines to create new ical messages. + + * icalspanlist.c Code to generate a list of the busy time f the + VEVENTS in a set. Also includes routiens to generate free and busy + lists from the spanlist, and to find the next free time after a + given time. + + * icalvalue.c The STATUS property now has its own value type, + STATUS, which holds the enumeration icalproperty_status. + + * icalrestriction.c Added more restrictions. Now handles mutual + and exclusive consitions, and checks for the reight values in + STATUS properties + + +2000-11-10 Eric Busboom <eric@softwarestudio.org> + + * icaltypes.c Added routine to create durationtype from string: + icaldurationtype_from_string + +2000-11-09 Eric Busboom <eric@softwarestudio.org> + + * icalcomponet.c Add sever get/set convienience routines to access + and manipulate common component propoerties from the component + interface. This eliminates the need to create a lot of temporary + variables if you just want to change the start time of and event. + +2000-11-06 Eric Busboom <eric@softwarestudio.org> + + * icalcomponent.c Added new routines to icalcomponent: + _get_span -- returns the start and end times of the event in UTC + _get_first_real_component -- return ref to VTODO, VEVENT or VJOURNAL + + * icalspanlist.c Added new class, icalspanlist, that generates a + list of alternating busy and free times from an icalset. The class + includes routines to gnerate rfc2445 busy and free lists, and to + get the next avaliable busy or free time after a given time. 2000-11-06 Federico Mena Quintero <federico@helixcode.com> * src/libical/icalvalue.c (icalvalue_recur_as_ical_string): Handle - both the position and weekday in the by_day field. + both the position and weekday in the by_day field. 2000-10-20 Jesse Pavel <jpavel@helixcode.com> * src/libical/icalproperty.c: added support for the icalproperty_remove_parameter() function. +2000-10-20 Eric Busboom <eric@agony.busboom.org> + + * Const correctness. Added 'const' all over everywhere. + +2000-10-19 Eric Busboom <eric@agony.busboom.org> + + * icalproperty, icalparameter, icalvalue .c, .h Changed most + instances of char* to const char* + + * icalclassify.h Added multiple include protection + + * icalset.h and others, got rid of parameter named "new" + +2000-10-15 Eric Busboom <eric@softwarestudio.org> + + * icalcomponent Added convienience functions for constructing + components: icalcomponent_new_vcalendar(), etc. + + * Makefile.am Incorporated build system patch from Federico + Quintero. Misc small fixes and cleanup + + * scripts Incorporated auto-gen patch from Frederico. Generated + code in libical now uses icalproperty.c.in (etc) instead of + editing file icalparoperty.c in place. + + * libical. Changed flex/bison to use the -P/-p options to set + ical_yy as a prefix. Removed prefix redefinition from icalyacc.y + +2000-10-12 Eric Busboom <eric@softwarestudio.org> + + * icalproperty.c Fixed icalproperty_get_{first,next}_parameter to + honor the parameter kind argument + + * icalparameter.c Added, but did not complete, a new version of + icalparameters_from_string that does not use the hairy nested + case/switch statements of the previous version + 2000-10-11 Damon Chaplin <damon@helixcode.com> - * src/libical/icalparameter.c (icalparameter_as_ical_string): - (icalparameter_new_from_string): + * src/libical/icalparameter.c (icalparameter_as_ical_string): + (icalparameter_new_from_string): * src/libical/icalparser.c (icalparser_add_line): add support for 'X-' parameters. @@ -29,6 +133,12 @@ * src/test/Makefile.in: While I'm here, remove this from CVS, as it's a generated file. +2000-10-02 Eric Busboom <eric@softwarestudio.org> + + * ical.h ical.h and icalss.h now are concatenations of all of the + public headers for their respective libraries. Thus, only ical.h, + icalss.h and icalvcal.h need to be installed. + 2000-09-12 Ettore Perazzoli <ettore@helixcode.com> * configure.in: AC_OUTPUT the Makefile in `src' before the stuff @@ -42,12 +152,9 @@ * src/libicalss/icalcsdb.h: ditto -2000-09-08 JP Rosevear <jpr@helixcode.com> - - * src/libical/icaltime.c (icaltime_compare_date_only): New - function that compares only the dates, not the times as well +2000-09-11 Eric Busboom <eric@softwarestudio.org> - * src/libical/icaltime.h: Add prototype + * icalvcal.c Added more comments 2000-09-01 JP Rosevear <jpr@helixcode.com> @@ -61,25 +168,21 @@ 2000-08-31 JP Rosevear <jpr@helixcode.com> * Kill off more old, dead files - + 2000-08-31 JP Rosevear <jpr@helixcode.com> * MacOS: This dir is not in 0.19 - + 2000-08-31 JP Rosevear <jpr@helixcode.com> * src/libical/CHANGES: This file is not in 0.19 - + 2000-08-31 JP Rosevear <jpr@helixcode.com> * src/libical/.gdb_history: Kill file * src/libical/.gdb_history: Kill file - -2000-08-31 JP Rosevear <jpr@helixcode.com> - * configure.in: Don't list config.h in AC_OUTPUT - 2000-08-31 JP Rosevear <jpr@helixcode.com> * src/pvl/Makefile: Kill old file @@ -92,6 +195,10 @@ * examples/.cvsignore: Shut up +2000-08-31 JP Rosevear <jpr@helixcode.com> + + * configure.in: Don't list config.h in AC_OUTPUT + 2000-08-26 Ettore Perazzoli <ettore@helixcode.com> * examples/Makefile.am (INCLUDES): More `$(srcdir)' loving. @@ -124,8 +231,8 @@ * src/test/Makefile.am: Make it work. -2000-08-04 <eric@softwarestudio.org> - +2000-08-04 Eric Busboom <eric@softwarestudio.org> + * stow.c Changed stow to write data to a file ( icalfileset) not a calendar. Also added MIME parsing capability @@ -135,8 +242,8 @@ * icalmime.h New file that parses mime data and returns an icalcomponent that includes all of the parts. - -2000-07-26 <eric@softwarestudio.org> + +2000-07-26 Eric Busboom <eric@softwarestudio.org> * icaldirset.h misc bug fixes to get deleting components to work @@ -144,13 +251,13 @@ and _get_next_component, since these will reset the interal iterators. -2000-07-23 <eric@softwarestudio.org> +2000-07-23 Eric Busboom <eric@softwarestudio.org> * icalcomponent.h Added external iterators to icalcomponent for subcomponents: icalcompiter. These are still experimental, but they seem to work OK and have a nice syntax -2000-07-18 <eric@softwarestudio.org> +2000-07-18 Eric Busboom <eric@softwarestudio.org> * icalset This is a new "superclass" for icalstore, icalcluster, and others. It merges the interfaces of the old icalstore and @@ -159,7 +266,7 @@ * icalstore.{c,h} CHanged name to icaldirset * icalcluster.{c,h} Changed name to icalfileset - + 2000-06-12 Eric Busboom <eric@softwarestudio.org> @@ -188,11 +295,11 @@ * icaltypes.h Changed signature icaltimetype_from_timet to include is_utc flag. - + 2000-03-17 Eric Busboom <eric@softwarestudio.org> - * icalstore.c Vastly improved icalstore_test. + * icalstore.c Vastly improved icalstore_test. 2000-03-16 Eric Busboom <eric@softwarestudio.org> @@ -208,5 +315,5 @@ oriented parsing. * icalparser.c Fixed icalparser_get_line to remove \r in input. - + diff --git a/libical/INSTALL b/libical/INSTALL index 88e2a5e7d6..b3f195d679 100644 --- a/libical/INSTALL +++ b/libical/INSTALL @@ -3,8 +3,8 @@ Building the library This distribution is developed on Red Hat Linux 6.0 and usually compiles on SunOS 5.6 and FreeBSD 2.27. I have reports of success of -previous version on MacOS ( with CodeWarrior ) but I don't know about -any other systems. +previous version on MacOS ( with CodeWarrior ) and on UnixWare, but I +don't know about any other systems. The library is configured with automake. From the root directory, run diff --git a/libical/Makefile.am b/libical/Makefile.am index 8dcd95a438..e13464d7aa 100644 --- a/libical/Makefile.am +++ b/libical/Makefile.am @@ -5,5 +5,5 @@ EXTRA_DIST = \ TEST \ TODO -SUBDIRS = design-data doc scripts test-data src examples +SUBDIRS = design-data doc scripts test-data src examples diff --git a/libical/NEWS b/libical/NEWS index fb945eb9a2..9be3a9131f 100644 --- a/libical/NEWS +++ b/libical/NEWS @@ -1,3 +1,59 @@ +Version 0.21, 20 Nov 00 ( cvs tag libical-0-21) +---------------------------------------------- + + * icalmessage.c Many routines to create new ical messages. + + * icalspanlist.c Code to generate a list of the busy time f the + VEVENTS in a set. Also includes routiens to generate free and busy + lists from the spanlist, and to find the next free time after a + given time. + + * icalvalue.c The STATUS property now has its own value type, + STATUS, which holds the enumeration icalproperty_status. + + * icalrestriction.c Added more restrictions. Now handles mutual + and exclusive consitions, and checks for the reight values in + STATUS properties + + * icaltypes.c Added routine to create durationtype from string: + icaldurationtype_from_string + + + * icalcomponet.c Add sever get/set convienience routines to access + and manipulate common component propoerties from the component + interface. This eliminates the need to create a lot of temporary + variables if you just want to change the start time of and event. + + + * icalcomponent.c Added new routines to icalcomponent: + _get_span -- returns the start and end times of the event in UTC + _get_first_real_component -- return ref to VTODO, VEVENT or VJOURNAL + + * icalspanlist.c Added new class, icalspanlist, that generates a + list of alternating busy and free times from an icalset. The class + includes routines to gnerate rfc2445 busy and free lists, and to + get the next avaliable busy or free time after a given time. + + +Version 0.20D 3 Nov 00 +----------------------- + +Many miscelaneous tweaks to the build system + +More work to icalclassify. + +Aded routines to icaltime.c to convert to and from specific timezones +in Olsen format ("America/Los_Angeles") + + +Version 0.20 7 Sept 00 (cvs tag libical-0-20 ) +---------------------------------------------- + +Addedd icalclassify() which looks at a message and determine how to +process it. + +Misc bug fixes and tweaks. + Version 0.19 6 August 00 (cvs tag libical-0-19) ----------------------------------------------- diff --git a/libical/README b/libical/README index ce27e309c0..92b2ff6e86 100644 --- a/libical/README +++ b/libical/README @@ -55,6 +55,12 @@ To build all of the Makefiles for your system. If you will be installing the lib If configure runs fine, run "make" to build the library and "make install" to install it. +Although the distribution uses libtool to generate libraries, it has +shared libraries turned off by default. To create and install shared +libraries use: + + ./configure --enable-shared + The current version of libical focuses on creating and manipulating iCal objects. With it, you can parse text representations of iCal components, add and remove sub-components, properties, @@ -76,6 +82,12 @@ gcc-specific automatic dependancy tracking. You will not need to re-run automake unless you got the sources from CVS. +Using the Library +----------------- + +There is rudimentary, unfinished documentation in the /doc directory, +and annotated examples in /examples. + Perl Library ------------ @@ -83,19 +95,6 @@ Perl Library There is a perl language binding of this library, LIBICAL. It is available from http://www.softwarestudio.org/libical -Parser ------- - -The parser is a test program that will convert a text representation -of an iCal object to the internal representation and print it back out -as text. It is primarily a test tool, but it is also a good -demonstration of how the library works. - -To use it, cat one of the test components into the parser -executable. For example, from the root of the distribution: - - src/test/icalparser < test-data/1.1 - Eric Busboom eric@softwarestudio.org diff --git a/libical/THANKS b/libical/THANKS index 6e867ffe27..ee804111e9 100644 --- a/libical/THANKS +++ b/libical/THANKS @@ -22,3 +22,17 @@ CSTP protocol implementation, and modifications to icalcstp.h Gisle Hannemyr <gisle@oslonett.no> The decode*() functions in sspm.c are based on the decode() routine in the mimelite program, Copyright (c) 1994 Gisle Hannemyr. + +The Evolution team at Helixcode ( Federico Mena Quintero +<federico@helixcode.com>, JP Rosevear <jpr@helixcode.com>, Ettore +Perazzoli <ettore@helixcode.com>, Christopher James Lahey +<clahey@helixcode.com>, Peter Williams <peterw@helixcode.com>) for +miscelaneous patches and adjustments to the build system. + +Cornelius Schumacher <schumacher@kde.org> for many insightful +suggestions and a few patches. + +Mark D. Anderson <mda@discerning.com> for discussions and ideas. + +Martin Neimeier <nei@ibn.de> for correcting bugs in icalrecur.c + diff --git a/libical/TODO b/libical/TODO index 98d0c2d2b1..eb52fb7a25 100644 --- a/libical/TODO +++ b/libical/TODO @@ -34,3 +34,6 @@ Check all uses of strcpy and sprinf for buffer overflows Make the mime parsing code in sspm grow the list of parts as needed, rather than having a hard limit. + +in sspm.c, and unrecognized content-transfer-encoding values must +force a content type of application/octet-stream. diff --git a/libical/acconfig.h b/libical/acconfig.h index e9383f73a4..ede59fd497 100644 --- a/libical/acconfig.h +++ b/libical/acconfig.h @@ -5,3 +5,6 @@ /* Define to make icalcluster_commit() save to a temp file and mv to the original file instead of writing to the orig file directly */ #undef ICAL_SAFESAVES + +/* Define to terminate lines with "\n" instead of "\r\n" */ +#undef ICAL_UNIX_NEWLINE diff --git a/libical/configure.in b/libical/configure.in index 0c91500602..ba4de0d8b9 100644 --- a/libical/configure.in +++ b/libical/configure.in @@ -1,7 +1,10 @@ dnl Process this file with autoconf to produce a configure script. AC_INIT(src/libical/ical.h) AM_CONFIG_HEADER(config.h) -AM_INIT_AUTOMAKE(libical,0.19) +AM_INIT_AUTOMAKE(libical,0.21helix1) + +dnl Initialize maintainer mode +AM_MAINTAINER_MODE dnl Checks for programs. AC_PROG_YACC @@ -13,12 +16,12 @@ AC_PROG_INSTALL dnl Initialize libtool AM_PROG_LIBTOOL - AC_SUBST(AR) AC_CHECK_PROGS(AR, ar aal, ar) -AC_DEFINE(ICAL_ERRORS_ARE_FATAL,1) +dnl AC_DEFINE(ICAL_ERRORS_ARE_FATAL,1) AC_DEFINE(ICAL_SAFESAVES,1) +AC_DEFINE(ICAL_UNIX_NEWLINE,1) dnl Checks for libraries. dnl Replace `main' with a function in -lical: @@ -36,16 +39,17 @@ AC_STRUCT_TM dnl Checks for library functions. AC_CHECK_FUNCS(strdup) -AC_OUTPUT(\ -src/Makefile \ -src/libical/icalversion.h \ -src/libical/Makefile \ -src/libicalss/Makefile \ -src/libicalvcal/Makefile \ -src/test/Makefile \ -examples/Makefile \ -design-data/Makefile \ -doc/Makefile \ -scripts/Makefile \ -test-data/Makefile \ -Makefile ) +AC_OUTPUT([ +Makefile +design-data/Makefile +doc/Makefile +examples/Makefile +scripts/Makefile +src/Makefile +src/libical/Makefile +src/libical/icalversion.h +src/libicalss/Makefile +src/libicalvcal/Makefile +src/test/Makefile +test-data/Makefile +]) diff --git a/libical/design-data/param-c-types.txt b/libical/design-data/param-c-types.txt index d2f28e688a..3f690fa0dc 100644 --- a/libical/design-data/param-c-types.txt +++ b/libical/design-data/param-c-types.txt @@ -1,23 +1,23 @@ -ALTREP char* -CN char* +ALTREP const char* +CN const char* CUTYPE icalparameter_cutype -DELEGATED-FROM char* -DELEGATED-TO char* -DIR char* +DELEGATED-FROM const char* +DELEGATED-TO const char* +DIR const char* ENCODING icalparameter_encoding FBTYPE icalparameter_fbtype -FMTTYPE char* -LANGUAGE char* -MEMBER char* +FMTTYPE const char* +LANGUAGE const char* +MEMBER const char* PARTSTAT icalparameter_partstat RANGE icalparameter_range RELATED icalparameter_related RELTYPE icalparameter_reltype ROLE icalparameter_role RSVP int -SENT-BY char* -TZID char* +SENT-BY const char* +TZID const char* VALUE icalparameter_value -X char* +X const char* X-LIC-ERRORTYPE icalparameter_xlicerrortype X-LIC-COMPARETYPE icalparameter_xliccomparetype diff --git a/libical/design-data/prop-to-value.txt b/libical/design-data/prop-to-value.txt index 4f4bf196ff..d753007339 100644 --- a/libical/design-data/prop-to-value.txt +++ b/libical/design-data/prop-to-value.txt @@ -10,7 +10,7 @@ LOCATION TEXT PERCENT-COMPLETE INTEGER PRIORITY INTEGER RESOURCES TEXT -STATUS TEXT +STATUS STATUS SUMMARY TEXT COMPLETED DATE-TIME FREEBUSY PERIOD diff --git a/libical/design-data/restrictions.csv b/libical/design-data/restrictions.csv index bf71d96327..1c62e2a8b4 100644 --- a/libical/design-data/restrictions.csv +++ b/libical/design-data/restrictions.csv @@ -5,7 +5,7 @@ PUBLISH,VEVENT,DTSTART,NONE,ONE PUBLISH,VEVENT,ORGANIZER,NONE,ONE PUBLISH,VEVENT,SUMMARY,NONE,ONE PUBLISH,VEVENT,UID,NONE,ONE -PUBLISH,VEVENT,RECURRENCEID,NONE,ZEROORONE +PUBLISH,VEVENT,RECURRENCEID,NONE,ZEROORONE,must_be_recurring PUBLISH,VEVENT,SEQUENCE,NONE,ZEROORONE PUBLISH,VEVENT,ATTACH,NONE,ZEROPLUS PUBLISH,VEVENT,CATEGORIES,NONE,ZEROPLUS #Non-standard @@ -26,7 +26,7 @@ PUBLISH,VEVENT,RDATE,NONE,ZEROPLUS PUBLISH,VEVENT,RELATEDTO,NONE,ZEROPLUS PUBLISH,VEVENT,RESOURCES,NONE,ZEROORONE PUBLISH,VEVENT,RRULE,NONE,ZEROPLUS -PUBLISH,VEVENT,STATUS,NONE,ZEROORONE +PUBLISH,VEVENT,STATUS,NONE,ZEROORONE,may_be_tent_conf_cancel PUBLISH,VEVENT,TRANSP,NONE,ZEROORONE PUBLISH,VEVENT,URL,NONE,ZEROORONE PUBLISH,VEVENT,X,NONE,ZEROPLUS @@ -36,7 +36,7 @@ PUBLISH,VEVENT,NONE,VALARM,ZEROPLUS PUBLISH,VEVENT,NONE,VFREEBUSY,ZERO PUBLISH,VEVENT,NONE,VJOURNAL,ZERO PUBLISH,VEVENT,NONE,VTODO,ZERO -PUBLISH,VEVENT,NONE,VTIMEZONE,ZEROPLUS +PUBLISH,VEVENT,NONE,VTIMEZONE,ZEROPLUS,must_if_tz_ref PUBLISH,VEVENT,NONE,X,ZEROPLUS REQUEST,VEVENT,NONE,NONE,ONEPLUS REQUEST,VEVENT,ATTENDEE,NONE,ONEPLUS @@ -53,8 +53,8 @@ REQUEST,VEVENT,COMMENT,NONE,ZEROORONE REQUEST,VEVENT,CONTACT,NONE,ZEROPLUS REQUEST,VEVENT,CREATED,NONE,ZEROORONE REQUEST,VEVENT,DESCRIPTION,NONE,ZEROORONE -REQUEST,VEVENT,DTEND,NONE,ONEEXCLUSIVE,icalrestriction_check_exclusive -REQUEST,VEVENT,DURATION,NONE,ONEEXCLUSIVE,icalrestriction_check_exclusive +REQUEST,VEVENT,DTEND,NONE,ONEEXCLUSIVE,no_duration +REQUEST,VEVENT,DURATION,NONE,ONEEXCLUSIVE,no_dtend REQUEST,VEVENT,EXDATE,NONE,ZEROPLUS REQUEST,VEVENT,EXRULE,NONE,ZEROPLUS REQUEST,VEVENT,GEO,NONE,ZEROORONE @@ -62,17 +62,17 @@ REQUEST,VEVENT,LASTMODIFIED,NONE,ZEROORONE REQUEST,VEVENT,LOCATION,NONE,ZEROORONE REQUEST,VEVENT,PRIORITY,NONE,ZEROORONE REQUEST,VEVENT,RDATE,NONE,ZEROPLUS -REQUEST,VEVENT,RECURRENCEID,NONE,ZEROORONE +REQUEST,VEVENT,RECURRENCEID,NONE,ZEROORONE,must_be_recurring REQUEST,VEVENT,RELATEDTO,NONE,ZEROPLUS REQUEST,VEVENT,REQUESTSTATUS,NONE,ZEROPLUS REQUEST,VEVENT,RESOURCES,NONE,ZEROORONE REQUEST,VEVENT,RRULE,NONE,ZEROPLUS -REQUEST,VEVENT,STATUS,NONE,ZEROORONE +REQUEST,VEVENT,STATUS,NONE,ZEROORONE,may_be_tent_conf REQUEST,VEVENT,TRANSP,NONE,ZEROORONE REQUEST,VEVENT,URL,NONE,ZEROORONE REQUEST,VEVENT,X,NONE,ZEROPLUS REQUEST,VEVENT,NONE,VALARM,ZEROPLUS -REQUEST,VEVENT,NONE,VTIMEZONE,ZEROPLUS +REQUEST,VEVENT,NONE,VTIMEZONE,ZEROPLUS,must_if_tz_ref REQUEST,VEVENT,NONE,X,ZEROPLUS REQUEST,VEVENT,NONE,VFREEBUSY,ZERO REQUEST,VEVENT,NONE,VJOURNAL,ZERO @@ -81,7 +81,7 @@ REPLY,VEVENT,NONE,NONE,ONEPLUS REPLY,VEVENT,ATTENDEE,NONE,ONE REPLY,VEVENT,DTSTAMP,NONE,ONE REPLY,VEVENT,ORGANIZER,NONE,ONE -REPLY,VEVENT,RECURRENCEID,NONE,ZEROORONE +REPLY,VEVENT,RECURRENCEID,NONE,ZEROORONE,must_be_recurring REPLY,VEVENT,UID,NONE,ONE REPLY,VEVENT,SEQUENCE,NONE,ZEROORONE REPLY,VEVENT,ATTACH,NONE,ZEROPLUS @@ -91,9 +91,9 @@ REPLY,VEVENT,COMMENT,NONE,ZEROORONE REPLY,VEVENT,CONTACT,NONE,ZEROPLUS REPLY,VEVENT,CREATED,NONE,ZEROORONE REPLY,VEVENT,DESCRIPTION,NONE,ZEROORONE -REPLY,VEVENT,DTEND,NONE,ONEEXCLUSIVE,icalrestriction_check_exclusive +REPLY,VEVENT,DTEND,NONE,ONEEXCLUSIVE,no_duration REPLY,VEVENT,DTSTART,NONE,ZEROORONE -REPLY,VEVENT,DURATION,NONE,ONEEXCLUSIVE,icalrestriction_check_exclusive +REPLY,VEVENT,DURATION,NONE,ONEEXCLUSIVE,no_dtend REPLY,VEVENT,EXDATE,NONE,ZEROPLUS REPLY,VEVENT,EXRULE,NONE,ZEROPLUS REPLY,VEVENT,GEO,NONE,ZEROORONE @@ -110,7 +110,7 @@ REPLY,VEVENT,SUMMARY,NONE,ZEROORONE REPLY,VEVENT,TRANSP,NONE,ZEROORONE REPLY,VEVENT,URL,NONE,ZEROORONE REPLY,VEVENT,X,NONE,ZEROPLUS -REPLY,VEVENT,NONE,VTIMEZONE,ZEROORONE +REPLY,VEVENT,NONE,VTIMEZONE,ZEROORONE,must_if_tz_ref REPLY,VEVENT,NONE,X,ZEROPLUS REPLY,VEVENT,NONE,VALARM,ZERO REPLY,VEVENT,NONE,VFREEBUSY,ZERO @@ -131,8 +131,8 @@ ADD,VEVENT,COMMENT,NONE,ZEROORONE ADD,VEVENT,CONTACT,NONE,ZEROPLUS ADD,VEVENT,CREATED,NONE,ZEROORONE ADD,VEVENT,DESCRIPTION,NONE,ZEROORONE -ADD,VEVENT,DTEND,NONE,ONEEXCLUSIVE, icalrestriction_check_exclusive -ADD,VEVENT,DURATION,NONE,ONEEXCLUSIVE, icalrestriction_check_exclusive +ADD,VEVENT,DTEND,NONE,ONEEXCLUSIVE,no_duration +ADD,VEVENT,DURATION,NONE,ONEEXCLUSIVE,no_duration ADD,VEVENT,EXDATE,NONE,ZEROPLUS ADD,VEVENT,EXRULE,NONE,ZEROPLUS ADD,VEVENT,GEO,NONE,ZEROORONE @@ -143,14 +143,14 @@ ADD,VEVENT,RDATE,NONE,ZEROPLUS ADD,VEVENT,RELATEDTO,NONE,ZEROPLUS ADD,VEVENT,RESOURCES,NONE,ZEROORONE ADD,VEVENT,RRULE,NONE,ZEROPLUS -ADD,VEVENT,STATUS,NONE,ZEROORONE +ADD,VEVENT,STATUS,NONE,ZEROORONE,may_be_tent_conf ADD,VEVENT,TRANSP,NONE,ZEROORONE ADD,VEVENT,URL,NONE,ZEROORONE ADD,VEVENT,X,NONE,ZEROPLUS -ADD,VEVENT,RECURRENCEID,NONE,ZERO +ADD,VEVENT,RECURRENCEID,NONE,ZERO,must_be_recurring ADD,VEVENT,REQUESTSTATUS,NONE,ZERO ADD,VEVENT,NONE,VALARM,ZEROPLUS -ADD,VEVENT,NONE,VTIMEZONE,ZEROPLUS +ADD,VEVENT,NONE,VTIMEZONE,ZEROPLUS,must_if_tz_ref ADD,VEVENT,NONE,X,ZEROPLUS ADD,VEVENT,NONE,VFREEBUSY,ZERO ADD,VEVENT,NONE,VTODO,ZERO @@ -168,9 +168,9 @@ CANCEL,VEVENT,CLASS,NONE,ZEROORONE CANCEL,VEVENT,CONTACT,NONE,ZEROPLUS CANCEL,VEVENT,CREATED,NONE,ZEROORONE CANCEL,VEVENT,DESCRIPTION,NONE,ZEROORONE -CANCEL,VEVENT,DTEND,NONE,ONEEXCLUSIVE, icalrestriction_check_exclusive +CANCEL,VEVENT,DTEND,NONE,ONEEXCLUSIVE ,no_duration CANCEL,VEVENT,DTSTART,NONE,ZEROORONE -CANCEL,VEVENT,DURATION,NONE,ONEEXCLUSIVE, icalrestriction_check_exclusive +CANCEL,VEVENT,DURATION,NONE,ONEEXCLUSIVE,no_duration CANCEL,VEVENT,EXDATE,NONE,ZEROPLUS CANCEL,VEVENT,EXRULE,NONE,ZEROPLUS CANCEL,VEVENT,GEO,NONE,ZEROORONE @@ -178,17 +178,17 @@ CANCEL,VEVENT,LASTMODIFIED,NONE,ZEROORONE CANCEL,VEVENT,LOCATION,NONE,ZEROORONE CANCEL,VEVENT,PRIORITY,NONE,ZEROORONE CANCEL,VEVENT,RDATE,NONE,ZEROPLUS -CANCEL,VEVENT,RECURRENCEID,NONE,ZEROORONE +CANCEL,VEVENT,RECURRENCEID,NONE,ZEROORONE,must_be_recurring CANCEL,VEVENT,RELATEDTO,NONE,ZEROPLUS CANCEL,VEVENT,RESOURCES,NONE,ZEROORONE CANCEL,VEVENT,RRULE,NONE,ZEROPLUS -CANCEL,VEVENT,STATUS,NONE,ZEROORONE +CANCEL,VEVENT,STATUS,NONE,ZEROORONE,must_be_canceled_no_attendee CANCEL,VEVENT,SUMMARY,NONE,ZEROORONE CANCEL,VEVENT,TRANSP,NONE,ZEROORONE CANCEL,VEVENT,URL,NONE,ZEROORONE CANCEL,VEVENT,X,NONE,ZEROPLUS CANCEL,VEVENT,REQUESTSTATUS,NONE,ZERO -CANCEL,VEVENT,NONE,VTIMEZONE,ZEROPLUS +CANCEL,VEVENT,NONE,VTIMEZONE,ZEROPLUS,must_if_tz_ref CANCEL,VEVENT,NONE,X,ZEROPLUS CANCEL,VEVENT,NONE,VTODO,ZERO CANCEL,VEVENT,NONE,VJOURNAL,ZERO @@ -200,7 +200,7 @@ REFRESH,VEVENT,DTSTAMP,NONE,ONE REFRESH,VEVENT,ORGANIZER,NONE,ONE REFRESH,VEVENT,UID,NONE,ONE REFRESH,VEVENT,COMMENT,NONE,ZEROORONE -REFRESH,VEVENT,RECURRENCEID,NONE,ZEROORONE +REFRESH,VEVENT,RECURRENCEID,NONE,ZEROORONE,must_be_recurring REFRESH,VEVENT,X,NONE,ZEROPLUS REFRESH,VEVENT,ATTACH,NONE,ZERO REFRESH,VEVENT,CATEGORIES,NONE,ZERO @@ -231,7 +231,7 @@ REFRESH,VEVENT,NONE,X,ZEROPLUS REFRESH,VEVENT,NONE,VTODO,ZERO REFRESH,VEVENT,NONE,VJOURNAL,ZERO REFRESH,VEVENT,NONE,VFREEBUSY,ZERO -REFRESH,VEVENT,NONE,VTIMEZONE,ZERO +REFRESH,VEVENT,NONE,VTIMEZONE,ZERO,must_if_tz_ref REFRESH,VEVENT,NONE,VALARM,ZERO COUNTER,VEVENT,NONE,NONE,ONE COUNTER,VEVENT,DTSTAMP,NONE,ONE @@ -248,8 +248,8 @@ COUNTER,VEVENT,COMMENT,NONE,ZEROORONE COUNTER,VEVENT,CONTACT,NONE,ZEROPLUS COUNTER,VEVENT,CREATED,NONE,ZEROORONE COUNTER,VEVENT,DESCRIPTION,NONE,ZEROORONE -COUNTER,VEVENT,DTEND,NONE,ONEEXCLUSIVE, icalrestriction_check_exclusive -COUNTER,VEVENT,DURATION,NONE,ONEEXCLUSIVE, icalrestriction_check_exclusive +COUNTER,VEVENT,DTEND,NONE,ONEEXCLUSIVE,no_duration +COUNTER,VEVENT,DURATION,NONE,ONEEXCLUSIVE,no_duration COUNTER,VEVENT,EXDATE,NONE,ZEROPLUS COUNTER,VEVENT,EXRULE,NONE,ZEROPLUS COUNTER,VEVENT,GEO,NONE,ZEROORONE @@ -257,17 +257,17 @@ COUNTER,VEVENT,LASTMODIFIED,NONE,ZEROORONE COUNTER,VEVENT,LOCATION,NONE,ZEROORONE COUNTER,VEVENT,PRIORITY,NONE,ZEROORONE COUNTER,VEVENT,RDATE,NONE,ZEROPLUS -COUNTER,VEVENT,RECURRENCEID,NONE,ZEROORONE +COUNTER,VEVENT,RECURRENCEID,NONE,ZEROORONE,must_be_recurring COUNTER,VEVENT,RELATEDTO,NONE,ZEROPLUS COUNTER,VEVENT,REQUESTSTATUS,NONE,ZEROPLUS COUNTER,VEVENT,RESOURCES,NONE,ZEROORONE COUNTER,VEVENT,RRULE,NONE,ZEROPLUS -COUNTER,VEVENT,STATUS,NONE,ZEROORONE +COUNTER,VEVENT,STATUS,NONE,ZEROORONE,may_be_tent_conf_cancel COUNTER,VEVENT,TRANSP,NONE,ZEROORONE COUNTER,VEVENT,URL,NONE,ZEROORONE COUNTER,VEVENT,X,NONE,ZEROPLUS COUNTER,VEVENT,NONE,VALARM,ZEROPLUS -COUNTER,VEVENT,NONE,VTIMEZONE,ZEROPLUS +COUNTER,VEVENT,NONE,VTIMEZONE,ZEROPLUS,must_if_tz_ref COUNTER,VEVENT,NONE,X,ZEROPLUS COUNTER,VEVENT,NONE,VTODO,ZERO COUNTER,VEVENT,NONE,VJOURNAL,ZERO @@ -277,7 +277,7 @@ DECLINECOUNTER,VEVENT,DTSTAMP,NONE,ONE DECLINECOUNTER,VEVENT,ORGANIZER,NONE,ONE DECLINECOUNTER,VEVENT,UID,NONE,ONE DECLINECOUNTER,VEVENT,COMMENT,NONE,ZEROORONE -DECLINECOUNTER,VEVENT,RECURRENCEID,NONE,ZEROORONE +DECLINECOUNTER,VEVENT,RECURRENCEID,NONE,ZEROORONE,must_be_recurring DECLINECOUNTER,VEVENT,REQUESTSTATUS,NONE,ZEROPLUS DECLINECOUNTER,VEVENT,SEQUENCE,NONE,ZERO DECLINECOUNTER,VEVENT,X,NONE,ZEROPLUS @@ -309,7 +309,7 @@ DECLINECOUNTER,VEVENT,NONE,X,ZEROPLUS DECLINECOUNTER,VEVENT,NONE,VTODO,ZERO DECLINECOUNTER,VEVENT,NONE,VJOURNAL,ZERO DECLINECOUNTER,VEVENT,NONE,VFREEBUSY,ZERO -DECLINECOUNTER,VEVENT,NONE,VTIMEZONE,ZERO +DECLINECOUNTER,VEVENT,NONE,VTIMEZONE,ZERO,must_if_tz_ref DECLINECOUNTER,VEVENT,NONE,VALARM,ZERO PUBLISH,VFREEBUSY,NONE,NONE,ONEPLUS PUBLISH,VFREEBUSY,DTSTAMP,NONE,ONE @@ -329,7 +329,7 @@ PUBLISH,VFREEBUSY,NONE,X,ZEROPLUS PUBLISH,VFREEBUSY,NONE,VEVENT,ZERO PUBLISH,VFREEBUSY,NONE,VTODO,ZERO PUBLISH,VFREEBUSY,NONE,VJOURNAL,ZERO -PUBLISH,VFREEBUSY,NONE,VTIMEZONE,ZERO +PUBLISH,VFREEBUSY,NONE,VTIMEZONE,ZERO,must_if_tz_ref PUBLISH,VFREEBUSY,NONE,VALARM,ZERO REQUEST,VFREEBUSY,NONE,NONE,ONE REQUEST,VFREEBUSY,ATTENDEE,NONE,ONEPLUS @@ -396,7 +396,7 @@ PUBLISH,VTODO,LASTMODIFIED,NONE,ZEROORONE PUBLISH,VTODO,LOCATION,NONE,ZEROORONE PUBLISH,VTODO,PERCENTCOMPLETE,NONE,ZEROORONE PUBLISH,VTODO,RDATE,NONE,ZEROPLUS -PUBLISH,VTODO,RECURRENCEID,NONE,ZEROORONE +PUBLISH,VTODO,RECURRENCEID,NONE,ZEROORONE,must_be_recurring PUBLISH,VTODO,RELATEDTO,NONE,ZEROPLUS PUBLISH,VTODO,RESOURCES,NONE,ZEROORONE PUBLISH,VTODO,RRULE,NONE,ZEROPLUS @@ -436,11 +436,11 @@ REQUEST,VTODO,LASTMODIFIED,NONE,ZEROORONE REQUEST,VTODO,LOCATION,NONE,ZEROORONE REQUEST,VTODO,PERCENTCOMPLETE,NONE,ZEROORONE REQUEST,VTODO,RDATE,NONE,ZEROPLUS -REQUEST,VTODO,RECURRENCEID,NONE,ZEROORONE +REQUEST,VTODO,RECURRENCEID,NONE,ZEROORONE,must_be_recurring REQUEST,VTODO,RELATEDTO,NONE,ZEROPLUS REQUEST,VTODO,RESOURCES,NONE,ZEROORONE REQUEST,VTODO,RRULE,NONE,ZEROPLUS -REQUEST,VTODO,STATUS,NONE,ZEROORONE +REQUEST,VTODO,STATUS,NONE,ZEROORONE,may_be_comp_need_process REQUEST,VTODO,URL,NONE,ZEROORONE REQUEST,VTODO,X,NONE,ZEROPLUS REQUEST,VTODO,REQUESTSTATUS,NONE,ZERO @@ -477,7 +477,7 @@ REPLY,VTODO,RDATE,NONE,ZEROPLUS REPLY,VTODO,RELATEDTO,NONE,ZEROPLUS REPLY,VTODO,RESOURCES,NONE,ZEROORONE REPLY,VTODO,RRULE,NONE,ZEROPLUS -REPLY,VTODO,RECURRENCEID,NONE,ZEROORONE +REPLY,VTODO,RECURRENCEID,NONE,ZEROORONE,must_be_recurring REPLY,VTODO,SEQUENCE,NONE,ZEROORONE REPLY,VTODO,STATUS,NONE,ZEROORONE REPLY,VTODO,SUMMARY,NONE,ZEROORONE @@ -516,10 +516,10 @@ ADD,VTODO,RDATE,NONE,ZEROPLUS ADD,VTODO,RELATEDTO,NONE,ZEROPLUS ADD,VTODO,RESOURCES,NONE,ZEROORONE ADD,VTODO,RRULE,NONE,ZEROPLUS -ADD,VTODO,STATUS,NONE,ZEROORONE +ADD,VTODO,STATUS,NONE,ZEROORONE,may_be_comp_need_process ADD,VTODO,URL,NONE,ZEROORONE ADD,VTODO,X,NONE,ZEROPLUS -ADD,VTODO,RECURRENCEID,NONE,ZERO +ADD,VTODO,RECURRENCEID,NONE,ZERO,must_be_recurring ADD,VTODO,REQUESTSTATUS,NONE,ZERO ADD,VTODO,NONE,VALARM,ZEROPLUS ADD,VTODO,NONE,VTIMEZONE,ZEROPLUS @@ -550,12 +550,12 @@ CANCEL,VTODO,LASTMODIFIED,NONE,ZEROORONE CANCEL,VTODO,LOCATION,NONE,ZEROORONE CANCEL,VTODO,PERCENTCOMPLETE,NONE,ZEROORONE CANCEL,VTODO,RDATE,NONE,ZEROPLUS -CANCEL,VTODO,RECURRENCEID,NONE,ZEROORONE +CANCEL,VTODO,RECURRENCEID,NONE,ZEROORONE,must_be_recurring CANCEL,VTODO,RELATEDTO,NONE,ZEROPLUS CANCEL,VTODO,RESOURCES,NONE,ZEROORONE CANCEL,VTODO,RRULE,NONE,ZEROPLUS CANCEL,VTODO,PRIORITY,NONE,ZEROORONE -CANCEL,VTODO,STATUS,NONE,ZEROORONE +CANCEL,VTODO,STATUS,NONE,ZEROORONE,must_be_canceled_no_attendee CANCEL,VTODO,URL,NONE,ZEROORONE CANCEL,VTODO,X,NONE,ZEROPLUS CANCEL,VTODO,REQUESTSTATUS,NONE,ZERO @@ -568,7 +568,7 @@ REFRESH,VTODO,NONE,NONE,ONE REFRESH,VTODO,ATTENDEE,NONE,ONE REFRESH,VTODO,DTSTAMP,NONE,ONE REFRESH,VTODO,UID,NONE,ONE -REFRESH,VTODO,RECURRENCEID,NONE,ZEROORONE +REFRESH,VTODO,RECURRENCEID,NONE,ZEROORONE,must_be_recurring REFRESH,VTODO,X,NONE,ZEROPLUS REFRESH,VTODO,ATTACH,NONE,ZERO REFRESH,VTODO,CATEGORIES,NONE,ZERO @@ -625,13 +625,13 @@ COUNTER,VTODO,LASTMODIFIED,NONE,ZEROORONE COUNTER,VTODO,LOCATION,NONE,ZEROORONE COUNTER,VTODO,PERCENTCOMPLETE,NONE,ZEROORONE COUNTER,VTODO,RDATE,NONE,ZEROPLUS -COUNTER,VTODO,RECURRENCEID,NONE,ZEROORONE +COUNTER,VTODO,RECURRENCEID,NONE,ZEROORONE,must_be_recurring COUNTER,VTODO,RELATEDTO,NONE,ZEROPLUS COUNTER,VTODO,REQUESTSTATUS,NONE,ZEROPLUS COUNTER,VTODO,RESOURCES,NONE,ZEROORONE COUNTER,VTODO,RRULE,NONE,ZEROORONE COUNTER,VTODO,SEQUENCE,NONE,ZEROORONE -COUNTER,VTODO,STATUS,NONE,ZEROORONE +COUNTER,VTODO,STATUS,NONE,ZEROORONE,may_be_comp_need_process COUNTER,VTODO,URL,NONE,ZEROORONE COUNTER,VTODO,X,NONE,ZEROPLUS COUNTER,VTODO,NONE,VALARM,ZEROPLUS @@ -663,7 +663,7 @@ DECLINECOUNTER,VTODO,LOCATION,NONE,ZEROORONE DECLINECOUNTER,VTODO,PERCENTCOMPLETE,NONE,ZEROORONE DECLINECOUNTER,VTODO,PRIORITY,NONE,ZEROORONE DECLINECOUNTER,VTODO,RDATE,NONE,ZEROPLUS -DECLINECOUNTER,VTODO,RECURRENCEID,NONE,ZEROORONE +DECLINECOUNTER,VTODO,RECURRENCEID,NONE,ZEROORONE,must_be_recurring DECLINECOUNTER,VTODO,RELATEDTO,NONE,ZEROPLUS DECLINECOUNTER,VTODO,REQUESTSTATUS,NONE,ZEROPLUS DECLINECOUNTER,VTODO,RESOURCES,NONE,ZEROORONE @@ -692,11 +692,11 @@ PUBLISH,VJOURNAL,EXDATE,NONE,ZEROPLUS PUBLISH,VJOURNAL,EXRULE,NONE,ZEROPLUS PUBLISH,VJOURNAL,LASTMODIFIED,NONE,ZEROORONE PUBLISH,VJOURNAL,RDATE,NONE,ZEROPLUS -PUBLISH,VJOURNAL,RECURRENCEID,NONE,ZEROORONE +PUBLISH,VJOURNAL,RECURRENCEID,NONE,ZEROORONE,must_be_recurring PUBLISH,VJOURNAL,RELATEDTO,NONE,ZEROPLUS PUBLISH,VJOURNAL,RRULE,NONE,ZEROPLUS PUBLISH,VJOURNAL,SEQUENCE,NONE,ZEROORONE -PUBLISH,VJOURNAL,STATUS,NONE,ZEROORONE +PUBLISH,VJOURNAL,STATUS,NONE,ZEROORONE,may_be_draft_final_canceled PUBLISH,VJOURNAL,SUMMARY,NONE,ZEROORONE PUBLISH,VJOURNAL,URL,NONE,ZEROORONE PUBLISH,VJOURNAL,X,NONE,ZEROPLUS @@ -756,10 +756,10 @@ CANCEL,VJOURNAL,EXDATE,NONE,ZEROPLUS CANCEL,VJOURNAL,EXRULE,NONE,ZEROPLUS CANCEL,VJOURNAL,LASTMODIFIED,NONE,ZEROORONE CANCEL,VJOURNAL,RDATE,NONE,ZEROPLUS -CANCEL,VJOURNAL,RECURRENCEID,NONE,ZEROORONE +CANCEL,VJOURNAL,RECURRENCEID,NONE,ZEROORONE,must_be_recurring CANCEL,VJOURNAL,RELATEDTO,NONE,ZEROPLUS CANCEL,VJOURNAL,RRULE,NONE,ZEROPLUS -CANCEL,VJOURNAL,STATUS,NONE,ZEROORONE +CANCEL,VJOURNAL,STATUS,NONE,ZEROORONE,must_be_cancel_if_present CANCEL,VJOURNAL,SUMMARY,NONE,ZEROORONE CANCEL,VJOURNAL,URL,NONE,ZEROORONE CANCEL,VJOURNAL,X,NONE,ZEROPLUS @@ -829,11 +829,11 @@ NONE,VEVENT,COMPLETED,NONE,ZERO NONE,VEVENT,CONTACT,NONE,ZEROPLUS NONE,VEVENT,CREATED,NONE,ZEROORONE NONE,VEVENT,DESCRIPTION,NONE,ZEROORONE -NONE,VEVENT,DTEND,NONE,ONEEXCLUSIVE, icalrestriction_check_exclusive +NONE,VEVENT,DTEND,NONE,ONEEXCLUSIVE,no_duration NONE,VEVENT,DTSTAMP,NONE,ZEROORONE NONE,VEVENT,DTSTART,NONE,ZEROORONE NONE,VEVENT,DUE,NONE,ZERO -NONE,VEVENT,DURATION,NONE,ONEEXCLUSIVE, icalrestriction_check_exclusive +NONE,VEVENT,DURATION,NONE,ONEEXCLUSIVE,no_duration NONE,VEVENT,EXDATE,NONE,ZEROPLUS NONE,VEVENT,EXRULE,NONE,ZEROPLUS NONE,VEVENT,FREEBUSY,NONE,ZERO @@ -846,7 +846,7 @@ NONE,VEVENT,PERCENTCOMPLETE,NONE,ZERO NONE,VEVENT,PRIORITY,NONE,ZEROORONE NONE,VEVENT,PRODID,NONE,ZERO NONE,VEVENT,RDATE,NONE,ZEROPLUS -NONE,VEVENT,RECURRENCEID,NONE,ZEROORONE +NONE,VEVENT,RECURRENCEID,NONE,ZEROORONE,must_be_recurring NONE,VEVENT,RELATEDTO,NONE,ZEROPLUS NONE,VEVENT,REPEAT,NONE,ZERO NONE,VEVENT,REQUESTSTATUS,NONE,ZEROPLUS @@ -894,7 +894,7 @@ NONE,VTODO,PERCENTCOMPLETE,NONE,ZEROORONE NONE,VTODO,PRIORITY,NONE,ZEROORONE NONE,VTODO,PRODID,NONE,ZERO NONE,VTODO,RDATE,NONE,ZEROPLUS -NONE,VTODO,RECURRENCEID,NONE,ZEROORONE +NONE,VTODO,RECURRENCEID,NONE,ZEROORONE,must_be_recurring NONE,VTODO,RELATEDTO,NONE,ZEROPLUS NONE,VTODO,REPEAT,NONE,ZERO NONE,VTODO,REQUESTSTATUS,NONE,ZEROPLUS @@ -942,7 +942,7 @@ NONE,VJOURNAL,PERCENTCOMPLETE,NONE,ZERO NONE,VJOURNAL,PRIORITY,NONE,ZERO NONE,VJOURNAL,PRODID,NONE,ZERO NONE,VJOURNAL,RDATE,NONE,ZEROPLUS -NONE,VJOURNAL,RECURRENCEID,NONE,ZEROORONE +NONE,VJOURNAL,RECURRENCEID,NONE,ZEROORONE,must_be_recurring NONE,VJOURNAL,RELATEDTO,NONE,ZEROPLUS NONE,VJOURNAL,REPEAT,NONE,ZERO NONE,VJOURNAL,REQUESTSTATUS,NONE,ZEROPLUS @@ -1169,8 +1169,8 @@ NONE,XAUDIOALARM,DTEND,NONE,ZERO NONE,XAUDIOALARM,DTSTAMP,NONE,ZERO NONE,XAUDIOALARM,DTSTART,NONE,ZERO NONE,XAUDIOALARM,DUE,NONE,ZERO -NONE,XAUDIOALARM,DURATION,NONE,ONEMUTUAL,icalrestriction_check_mutual -NONE,XAUDIOALARM,REPEAT,NONE,ONEMUTUAL,icalrestriction_check_mutual +NONE,XAUDIOALARM,DURATION,NONE,ONEMUTUAL,must_have_repeat +NONE,XAUDIOALARM,REPEAT,NONE,ONEMUTUAL,must_have_duration NONE,XAUDIOALARM,EXDATE,NONE,ZERO NONE,XAUDIOALARM,EXRULE,NONE,ZERO NONE,XAUDIOALARM,FREEBUSY,NONE,ZERO @@ -1217,8 +1217,8 @@ NONE,XDISPLAYALARM,DTEND,NONE,ZERO NONE,XDISPLAYALARM,DTSTAMP,NONE,ZERO NONE,XDISPLAYALARM,DTSTART,NONE,ZERO NONE,XDISPLAYALARM,DUE,NONE,ZERO -NONE,XDISPLAYALARM,DURATION,NONE,ONEMUTUAL,icalrestriction_check_mutual -NONE,XDISPLAYALARM,REPEAT,NONE,ONEMUTUAL,icalrestriction_check_mutual +NONE,XDISPLAYALARM,DURATION,NONE,ONEMUTUAL,must_have_repeat +NONE,XDISPLAYALARM,REPEAT,NONE,ONEMUTUAL,must_have_duration NONE,XDISPLAYALARM,EXDATE,NONE,ZERO NONE,XDISPLAYALARM,EXRULE,NONE,ZERO NONE,XDISPLAYALARM,FREEBUSY,NONE,ZERO @@ -1265,8 +1265,8 @@ NONE,XEMAILALARM,DTEND,NONE,ZERO NONE,XEMAILALARM,DTSTAMP,NONE,ZERO NONE,XEMAILALARM,DTSTART,NONE,ZERO NONE,XEMAILALARM,DUE,NONE,ZERO -NONE,XEMAILALARM,DURATION,NONE,ONEMUTUAL,icalrestriction_check_mutual -NONE,XEMAILALARM,REPEAT,NONE,ONEMUTUAL,icalrestriction_check_mutual +NONE,XEMAILALARM,DURATION,NONE,ONEMUTUAL,must_have_repeat +NONE,XEMAILALARM,REPEAT,NONE,ONEMUTUAL,must_have_duration NONE,XEMAILALARM,EXDATE,NONE,ZERO NONE,XEMAILALARM,EXRULE,NONE,ZERO NONE,XEMAILALARM,FREEBUSY,NONE,ZERO @@ -1313,8 +1313,8 @@ NONE,XPROCEDUREALARM,DTEND,NONE,ZERO NONE,XPROCEDUREALARM,DTSTAMP,NONE,ZERO NONE,XPROCEDUREALARM,DTSTART,NONE,ZERO NONE,XPROCEDUREALARM,DUE,NONE,ZERO -NONE,XPROCEDUREALARM,DURATION,NONE,ONEMUTUAL,icalrestriction_check_mutual -NONE,XPROCEDUREALARM,REPEAT,NONE,ONEMUTUAL,icalrestriction_check_mutual +NONE,XPROCEDUREALARM,DURATION,NONE,ONEMUTUAL,must_have_repeat +NONE,XPROCEDUREALARM,REPEAT,NONE,ONEMUTUAL,must_have_duration NONE,XPROCEDUREALARM,EXDATE,NONE,ZERO NONE,XPROCEDUREALARM,EXRULE,NONE,ZERO NONE,XPROCEDUREALARM,FREEBUSY,NONE,ZERO diff --git a/libical/design-data/value-c-types.txt b/libical/design-data/value-c-types.txt index c7dd26034f..76a1e7c9b7 100644 --- a/libical/design-data/value-c-types.txt +++ b/libical/design-data/value-c-types.txt @@ -1,22 +1,23 @@ -ATTACH struct icalattachtype # Non-std -BINARY char* -BOOLEAN int -CAL-ADDRESS char* -DATE struct icaltimetype -DATE-TIME struct icaltimetype -DATE-TIME-DATE struct icaltimetype # Non-std -DATE-TIME-PERIOD struct icalperiodtype # Non-std -DURATION struct icaldurationtype -FLOAT float -GEO struct icalgeotype # Non-std -INTEGER int -METHOD icalproperty_method # Non-std -PERIOD struct icalperiodtype -RECUR struct icalrecurrencetype -STRING char* # Non-std -TEXT char* -TIME struct icaltimetype -TRIGGER union icaltriggertype # Non-std -URI char* -UTC-OFFSET int -QUERY char* +ATTACH std struct icalattachtype # Non-std +BINARY std const char* +BOOLEAN std int +CAL-ADDRESS std const char* +DATE std struct icaltimetype +DATE-TIME std struct icaltimetype +DATE-TIME-DATE std struct icaltimetype # Non-std +DATE-TIME-PERIOD std struct icalperiodtype # Non-std +DURATION std struct icaldurationtype +FLOAT std float +GEO std struct icalgeotype # Non-std +INTEGER std int +METHOD std icalproperty_method # Non-std +PERIOD std struct icalperiodtype +RECUR special struct icalrecurrencetype +STRING std const char* # Non-std +TEXT std const char* +TIME std struct icaltimetype +TRIGGER std union icaltriggertype # Non-std +URI std const char* +UTC-OFFSET std int +QUERY std const char* +STATUS std icalproperty_status #Non-std
\ No newline at end of file diff --git a/libical/doc/UsingLibical.lyx b/libical/doc/UsingLibical.lyx index 868eac93b7..776f0d3835 100644 --- a/libical/doc/UsingLibical.lyx +++ b/libical/doc/UsingLibical.lyx @@ -30,7 +30,7 @@ Using Libical Eric Busboom (eric@softwarestudio.org) \layout Date -May 2000 +November 2000 \layout Standard @@ -134,7 +134,15 @@ Building the Library Libical uses autoconf to generate makefiles, although it uses none of the autoconf flags to influence the compilation. - It should built with no adjustments on Linux, FreeBSD and Solaris. + It should built with no adjustments on Linux, FreeBSD and Solaris under + gcc. + Some version have been successfully been build on MacOS, Solaris and UnixWare + without gcc, but you may run into problems with a particular later version. + +\layout Standard + +For a more complete guide to building the library, see the README file in + the distribution. \layout Section @@ -272,7 +280,7 @@ Enumerations Types \layout Subsubsection -The Parser +The parser \layout Subsubsection Restrictions @@ -487,13 +495,13 @@ prop = icalproperty_new_dtstamp(atime) ; icalcomponent_add_property(event, prop); \layout Code -prop = icalproperty_new_uid(strdup("guid-1.host1.com")) ); +prop = icalproperty_new_uid("guid-1.host1.com") ); \layout Code icalcomponent_add_property(event,prop); \layout Code -prop=icalproperty_new_organizer(strdup("mrbig@host.com")); +prop=icalproperty_new_organizer("mrbig@host.com"); \layout Code param = icalparameter_new_role(ICAL_ROLE_CHAIR) @@ -519,9 +527,6 @@ new in the name. Also note that, other than the object reference, most structure data is passed in to libical routines by value. - Strings, of course, are passed in by reference, but libical will take ownership - of the memory, so you had beter strdup() the data unless you want a core - dump when the memory is freed for the second time. Libical has some complex but very regular memory handling rules. These are detailed in section \begin_inset LatexCommand \ref{sec:memory} @@ -559,13 +564,13 @@ There is another way to create complex components, which is arguable more ICAL_VCALENDAR_COMPONENT, \layout Verbatim - icalproperty_new_version(strdup("2.0")), + icalproperty_new_version("2.0"), \layout Verbatim - icalproperty_new_prodid(strdup( + icalproperty_new_prodid( \layout Verbatim - "-//RDU Software//NONSGML HandCal//EN")), + "-//RDU Software//NONSGML HandCal//EN"), \layout Verbatim icalcomponent_vanew( @@ -577,13 +582,13 @@ There is another way to create complex components, which is arguable more icalproperty_new_dtstamp(atime), \layout Verbatim - icalproperty_new_uid(strdup("guid-1.host1.com")), + icalproperty_new_uid("guid-1.host1.com"), \layout Verbatim icalproperty_vanew_organizer( \layout Verbatim - strdup("mrbig@host.com"), + "mrbig@host.com"), \layout Verbatim icalparameter_new_role(ICAL_ROLE_CHAIR), @@ -598,7 +603,7 @@ There is another way to create complex components, which is arguable more icalproperty_vanew_attendee( \layout Verbatim - strdup("employee-A@host.com"), + "employee-A@host.com", \layout Verbatim icalparameter_new_role( @@ -619,10 +624,10 @@ There is another way to create complex components, which is arguable more ), \layout Verbatim - icalproperty_new_location(strdup( + icalproperty_new_location( \layout Verbatim - "1CP Conference Room 4350")), + "1CP Conference Room 4350"), \layout Verbatim 0 @@ -895,7 +900,7 @@ With the 'first' and 'next' routines, you can create a for loop to iterate c != 0; \layout Verbatim - c = icalcomponent_get_next_component(comp,ICAL_ANY_COMPONENT)) + c = icalcomponent_get_next_component(comp,ICAL_ANY_COMPONENT)) \layout Verbatim { @@ -912,6 +917,78 @@ This code bit wil iterate through all of the subcomponents in 'comp' but to another component type. \layout Subsubsection +Using Component Iterators +\layout Standard + +The iteration model in the previous section requires the component to keep + the state of the iteration. + So, you could not use this model to perform a sorting operations, since + you'd need two iterators and there is only space for one. + If you ever call icalcomponent_get_first_component() which an iteration + is in progress, the pointer will be reset to the beginning. + +\layout Standard + +To solve this problem, there are also external iterators for components. + The routines associated with these external iterators are: +\layout Verbatim + +icalcompiter icalcomponent_begin_component(icalcomponent* component, icalcompone +nt_kind kind); +\layout Verbatim + +icalcompiter icalcomponent_end_component(icalcomponent* component, icalcomponent +_kind kind); +\layout Verbatim + +icalcomponent* icalcompiter_next(icalcompiter* i); +\layout Verbatim + +icalcomponent* icalcompiter_prior(icalcompiter* i); +\layout Verbatim + +icalcomponent* icalcompiter_deref(icalcompiter* i); +\layout Standard + +The _begin_() and _end_() routines return a new iterator that points to + the begining and ending of the list of subcomponent for the given component, + and the kind argument works like the kind argument for internal iterators. + +\layout Standard + +After creating an iterators, use _next_() and _prior_() to step forward + and backward through the list and get the component that the iterator points + to, and use _deref() to return the component that the iterator points to + without moving the iterator. + All routines will return 0 when they move to point off the end of the list. + +\layout Standard + +Here is an example of a loop using these routines: +\layout Verbatim + +for( +\layout Verbatim + + i = icalcomponent_begin_component(impl->cluster,ICAL_ANY_COMPONENT); + +\layout Verbatim + + icalcompiter_deref(&i)!= 0; +\layout Verbatim + + icalcompiter_next(&i) +\layout Verbatim + +) { +\layout Verbatim + + icalcomponent *this = icalcompiter_deref(&i); +\layout Verbatim + +} +\layout Subsubsection + Removing Components \layout Standard @@ -1061,19 +1138,72 @@ void icalproperty_remove_parameter( icalparameter_kind kind); \layout Subsubsection -Getting Values -\layout Subsubsection +Working with values +\layout Standard -Setting Values -\layout Subsubsection +Values are typically part of a property, although they can exist on their + own. + You can maniplulate them either as part of the property or independantly. +\layout Standard -Getting Parameters -\layout Subsubsection +The most common way to work with values to is to maniplate them from they + properties that contain them. + This involves fewer routine calls and intermediate variables than working + with them independently, and it is type-safe. + +\layout Standard + +For each property, there are a _get_ and a _set_ routine that access the + internal value. + For instnace, for the UID property, the routines are: +\layout Verbatim + +void icalproperty_set_uid(icalproperty* prop, const char* v) +\layout Verbatim + +const char* icalproperty_get_uid(icalproperty* prop) +\layout Standard + +For multivalued properties, like ATTACH, the value type is usually a struct + or union that holds both possible types. + +\layout Standard -Setting Parameters +If you want to work with the underlying value object, you can get and set + it with: +\layout Verbatim + +icalvalue* icalproperty_get_value (icalproperty* prop) +\layout Verbatim + +void icalproperty_set_value(icalproperty* prop, icalvalue* value); +\layout Standard + +Icalproperty_get_value() will return a reference that you can manipluate + with other icalvalue routines. + Most of the time, you will have to know what the type of the value is. + For instance, if you know that the value is a DATETIME type, you can manipluate + it with: +\layout Verbatim + +struct icaltimetype icalvalue_get_datetime(icalvalue* value); +\layout Verbatim + +void icalvalue_set_datetime(icalvalue* value, struct icaltimetype v); +\layout Standard + +When working with an extension property or value (and X-PROPERTY or a property + that has the parameter VALUE=x-name ) the value type is always a string. + To get and set the value, use: +\layout Verbatim + +void icalproperty_set_x(icalproperty* prop, char* v); +\layout Verbatim + +char* icalproperty_get_x(icalproperty* prop); \layout Subsubsection -Removing Parameters +Working with parameters \layout Subsubsection Checking Component Validity @@ -1086,7 +1216,7 @@ RFC 2446 defines rules for what properties must exist in a component to use to process a component. For instance, if the METHOD is REQUEST and the component is a VEVENT, the sender is probably asking the reciever to join in a meeting. - I this case, RFC2446 says that the component must specify a start time + In this case, RFC2446 says that the component must specify a start time (DTSTART) and list the reciever as an attendee (ATTENDEE). \layout Standard @@ -1170,6 +1300,170 @@ Remember that the string returned by these routines is owned by the library, \layout Subsection +Time +\layout Subsubsection + +Time structure +\layout Standard + +LIbical defines it's own time structure for storing all dates and times. + It would have been nice to re-use the C library's +\emph on +struct tm, +\emph default +but that structure does not differentiate between dates and times, and between + local time and UTC. + The libical structure is: +\layout Verbatim + +struct icaltimetype { +\layout Verbatim + + int year; +\layout Verbatim + + int month; +\layout Verbatim + + int day; +\layout Verbatim + + int hour; +\layout Verbatim + + int minute; +\layout Verbatim + + int second; +\layout Verbatim + + int is_utc; /* 1-> time is in UTC timezone */ +\layout Verbatim + + int is_date; /* 1 -> interpret this as date. + */ }; +\layout Standard + +The year, month, day, hour, minute and second fields how the broken-out + time values. + The is_utc field distinguishes between times UTC and a local time zone. + The is_date field indicates if the intra-day fields hold valid data. + +\layout Subsubsection + +Time manipulating routines +\layout Standard + +The null time value is used to indicate that the data in the structure is + not a valid time. +\layout Verbatim + +struct icaltimetype icaltime_null_time(void); +\layout Verbatim + +int icaltime_is_null_time(struct icaltimetype t); +\layout Standard + +It is sensible for the broken-out time fields to contain values that are + not permitted in an ISO compliant time string. + For instance, the seconds field can hold values greater than 59, and the + hours field can hold values larger than 24. + The excessive values will be rolled over into the next larger field when + the structure is normalized. + +\layout Verbatim + +struct icaltimetype icaltime_normalize(struct icaltimetype t); +\layout Standard + +There are several routines to get the day of the week or month, etc, from + a time structure. +\layout Verbatim + +short icaltime_day_of_year(struct icaltimetype t); +\layout Verbatim + +struct icaltimetype icaltime_from_day_of_year(short doy, short year); +\layout Verbatim + +short icaltime_day_of_week(struct icaltimetype t); +\layout Verbatim + +short icaltime_start_doy_of_week(struct icaltimetype t); +\layout Verbatim + +short icaltime_week_number(short day_of_month, short month, short year); +\layout Verbatim + +struct icaltimetype icaltime_from_week_number(short week_number, short year); +\layout Verbatim + +short icaltime_days_in_month(short month,short year); +\layout Standard + +Two routines convert time structures to and from the number of seconds since + the POSIX epoch. + The is_date field indicates wether or not the hour, minute and second fields + should be used in the conversion, and is_utc indicates if the value should + be converted to a local time or a UTC time, using the operating system + suppled notion of the local timezone. + +\layout Verbatim + +struct icaltimetype icaltime_from_timet(time_t v, int is_date, int is_utc); + +\layout Verbatim + +time_t icaltime_as_timet(struct icaltimetype); +\layout Standard + +The compare routine works exactly like strcmp, but on time structures. + +\layout Verbatim + +int icaltime_compare(struct icaltimetype a,struct icaltimetype b); +\layout Standard + +The following routines convert between UTC and a named timezone. + The tzid field must be a timezone name from the Olsen database, such as + +\begin_inset Quotes eld +\end_inset + +America/Los_Angeles. +\begin_inset Quotes erd +\end_inset + + +\layout Standard + +The utc_offset routine returns the offset of the named time zone from UTC, + in seconds. + +\layout Standard + +The tt parmeter in the fonllowing routines indicates the date on which the + conversion should be made. + The tt parameter is necessary because timezones have many different rules + for when daylight savings time is used, and these rules can change over + time. + So, for a single timezone one year may have daylight savings time on March + 15, but for other years March 15 may be standard time, and some years may + have standard time all year. + +\layout Verbatim + +int icaltime_utc_offset(struct icaltimetype tt, char* tzid) +\layout Verbatim + +struct icaltimetype icaltime_as_utc(struct icaltimetype tt,char* tzid); +\layout Verbatim + +struct icaltimetype icaltime_as_zone(struct icaltimetype tt,char* tzid); +\layout Verbatim + +\layout Subsection + Storing Objects \layout Standard diff --git a/libical/doc/UsingLibical.ps b/libical/doc/UsingLibical.ps index 83c8f6203f..5a618a0c7e 100644 --- a/libical/doc/UsingLibical.ps +++ b/libical/doc/UsingLibical.ps @@ -1,7 +1,7 @@ %!PS-Adobe-2.0 -%%Creator: dvips(k) 5.85 Copyright 1999 Radical Eye Software +%%Creator: dvips(k) 5.86 Copyright 1999 Radical Eye Software %%Title: UsingLibical.dvi -%%Pages: 10 +%%Pages: 18 %%PageOrder: Ascend %%BoundingBox: 0 0 612 792 %%EndComments @@ -10,7 +10,7 @@ %+ /usr/local/home/eric/proj/FreeAssociation/libical/doc/UsingLibical.ps %+ UsingLibical.dvi %DVIPSParameters: dpi=600, compressed -%DVIPSSource: TeX output 2000.06.10:1815 +%DVIPSSource: TeX output 2000.11.03:1354 %%BeginProcSet: texc.pro %! /TeXDict 300 dict def TeXDict begin/N{def}def/B{bind def}N/S{exch}N/X{S @@ -71,178 +71,32 @@ rmoveto}B/y{3 2 roll p a}B/bos{/SS save N}B/eos{SS restore}B end %%EndProcSet TeXDict begin 40258431 52099146 1000 600 600 (UsingLibical.dvi) @start -%DVIPSBitmapFont: Fa ecrm0600 6 1 -/Fa 1 50 df<13E01201120712FF12F91201B3A7487EB512C0A212217AA01E>49 -D E +%DVIPSBitmapFont: Fa ecti1000 10 7 +/Fa 7 118 df<EA03C0EA07F0120F121F13F8A313F0EA07B0EA003013701360A213E013 +C01201EA038013005A120E5A5A5A5A5A0D197A8819>44 D<147F903803FFC090380FC1E0 +90381F0070017E13784913383901F801F83803F003120713E0120FD81FC013F091C7FC48 +5AA2127F90C8FCA35A5AA45AA3153015381578007C14F0007EEB01E0003EEB03C0EC0F80 +6CEB3E00380F81F83803FFE0C690C7FC1D2677A426>99 D<D801E001FEEB07F03C07F803 +FF801FFC3C0E3C0F07C0783E3C1E3E3C03E1E01F261C1F78D9F3C013803C383FF001F780 +0F02E01400007801C013FE007018C002805B4A4848EB1F80EAF07FD8E07E5CA200000207 +143F01FE1700495CA2030F5C0001177E495C18FE031F5C120349DA8001131C18F8033F15 +3C00070403133849020013F0A24B1570000F17E049017E15F019E003FEECE1C0001FEE01 +E34949903800FF000007C70038143C3E2679A444>109 D<3903C003F0390FF01FFC391E +783C0F381C7C703A3C3EE03F8038383FC0EB7F800078150000701300151CD8F07E90C7FC +EAE0FE5BA2120012015BA312035BA312075BA3120F5BA3121F5BA3123F90C9FC120E2126 +79A423>114 D<14FE903807FF8090380F83C090383E00E04913F00178137001F813F000 +01130313F0A215E00003EB01C06DC7FC7FEBFFC06C13F814FE6C7F6D13807F010F13C013 +00143F141F140F123E127E00FE1480A348EB1F0012E06C133E00705B6C5B381E03E06CB4 +5AD801FEC7FC1C267AA422>I<EB0380EB07C0130FA4131F1480A3133F1400A35B137E00 +7FB5FCA2B6FC3800FC00A312015BA312035BA312075BA3120F5BA3121FEB801CA2143C00 +3F1338EB0078147014F014E0EB01C0EA3E03381F0780380F0F00EA07FCEA01F0183579B3 +1C>I<13F8D803FEEB01C0D8078FEB03E0390E0F8007121E121C0038140F131F007815C0 +1270013F131F00F0130000E015805BD8007E133FA201FE14005B5D120149137EA215FE12 +0349EBFC0EA20201131E161C15F813E0163CD9F003133814070001ECF07091381EF8F03A +00F83C78E090393FF03FC090390FC00F00272679A42D>I E %EndDVIPSBitmapFont -%DVIPSBitmapFont: Fb ecbx1000 10 55 -/Fb 55 122 df<913A03FF8007FE027F9039F07FFF800103B500FDB512E0010F903A00FF -FE0FF0D93FF8ECF81F90267FE0019038F03FF849485A4816E014804816C00200ED1FF081 -F007C06F91C7FCA8B912E0A4000390C701C0C7FCB3ABB5D8FC3FEBFF80A43D3A7EB938> -27 D<12E07E127C7E7E7F6C7E6C7E12037F6C7E7F12007F137E137FA2EB3F80A214C013 -1F14E0A2130F14F0A4EB07F8A514FCB114F8A5EB0FF0A414E0131FA214C0133F1480A2EB -7F00A2137E13FE5B12015B485A5B1207485A485A90C7FC123E5A12F05A16537BBD25>41 -D<B61280A819087F9620>45 D<EA0F80EA3FE0EA7FF0A2EAFFF8A5EA7FF0A2EA3FE0EA0F -800D0D798C1B>I<49B4FC011F13F0017F13FC9038FF83FE4848C67E4848EB7F804848EB -3FC04848EB1FE0A2001F15F0A24848EB0FF8A3007F15FCA400FF15FEB3007F15FCA5003F -15F86D131FA2001F15F0A26C6CEB3FE0000715C06C6CEB7F806C6CEBFF003900FF83FE6D -B45A011F13F0010190C7FC27377CB530>48 D<141E143E14FE1307137FB5FCA3138FEA00 -0FB3B3A5007FB61280A4213679B530>I<EB0FFE90387FFFC048B512F0000714FC390FE0 -3FFF261F800F1380263F000313C0D87F8014E0EBE00100FF6D13F07FA2ED7FF8A46C5A6C -5A0006C7FCC8FCEDFFF0A216E05C16C04A138016004A5A4A5AEC1FF05D4A5A4AC7FC14FE -495AD903F01378495A495A495A49C712F8017C14F05B49130148B6FC5A5A5A5A5A4815E0 -B7FCA425367BB530>I<EB03FF011F13F0017F13FC3901FC07FF2603F003138048486C13 -C0496C13E0EA0FF86D14F0487EA66C4814E06C5A6C485AC714C04A138016004A5A4A5AEC -3FF090380FFFC05D15F090380007FE913801FF806E13C016E0ED7FF016F8ED3FFCA216FE -EA1FC0487E487E487EA416FCA249137F007F15F801C0EBFFF06C5A6C6C4813E0260FFC07 -13806CB61200000114FC6C6C13F0010790C7FC27377CB530>I<ED07C0150FA2151F153F -157F15FF5CA25C5C5C5C143E143C5C5C1301495A5C495A495A5B133E5B13785B485A1203 -485A5B48C7FC121E5A127C5AB81280A4C70001EBC000AA0103B61280A429367DB530>I< -001C15C0D81F80130701F8137F90B61280A216005D5D15F05D15804AC7FC14F090C9FCA7 -EB03FE90381FFFE0017F13F89038FE07FC9038F003FFD9C0011380496C13C090C7FC000E -15E0C8127F16F0A216F8A3121FEA3FC0487E12FF7FA316F05B15FFD87F8014E0007EC713 -C0003E5B003F4913806C6C481300390FF01FFE6CB512F8000114E06C6C1380D90FF8C7FC -25377BB530>I<EC0FF8ECFFFE0103EBFF8090390FF80FC090393FE003E090397F8001F0 -9038FF000F48EC1FF84848133F485A120F5B121FA2003FEC1FF0ED0FE0484890C7FCA314 -08EC7FF039FFF1FFFC01F313FFD9F78013809039FF007FC049EB3FE04914F0ED1FF85B16 -FCA34914FEA4127FA5123F16FCA26C7E16F8000F143F6D14F0000715E06C6CEB7FC03A01 -FF81FF806C90B51200013F13FC010F13F00101138027377CB530>I<123C123EEA3FE090 -B71280A41700485D5E5E5E5EA2007CC7EA0FC000784A5A4BC7FC00F8147E485C5D14014A -5AC7485A4A5AA24A5A143F4AC8FCA214FEA213015C1303A21307A2130F5CA2131FA5133F -A96D5A6D5A6D5A29397BB730>I<49B47E010F13F0013F13FC9038FE01FF3A01F8007F80 -4848EB3FC04848EB1FE0150F484814F01507121FA27F7F7F6D130F01FF14E014C09138E0 -1FC06CEBF83F9138FE7F806C9038FFFE005D6C14F06C14FC6C14FF6D14806D14C090B612 -E0D803FD14F02607F07F13F848487E261FC00F13FC383F8003007F010013FE90C7127F15 -1F00FE140715031501A21500A216FC7E6C14016D14F86C6C13036DEB07F06C6CEB0FE0D8 -0FFEEB7FC00003B61200C614FC013F13F00103138027377CB530>I<EB03FF011F13E001 -7F13F83901FF01FE48486C7E4848EB7F80484814C0001FEC3FE0485AED1FF0127F16F8A2 -12FF16FCA416FEA5007F143FA3123F157F6C7E000F14FF6C6C5A3903FE03DF6CB5129F6C -6C131FD91FFC13FCEB00201400A3D80FE0EB3FF8487E486C14F0A216E0157F16C0EDFF80 -495A6C4848130090388007FE390FE01FF86CB55A6C14C0C691C7FCEB1FF027377CB530> -I<DB3FFCEB01C00203B5EAC003021FECF00791B6EAFC0F01039039FC00FF3F4901C0EB1F -FFD91FFEC77E49481403D97FF080494880485B48177F4849153F4890C9FC181F485A180F -123F5B1807127FA24993C7FC12FFAD127F7FF003C0123FA27F001F1707A26C6C1780180F -6C6D16006C6D5D6C173E6C6D157ED97FF85D6D6C4A5A6DB44A5A010701C0EB0FE06D01FC -EBFF80010090B548C7FC021F14F8020314E09126003FFEC8FC3A3B7BB945>67 -D<B87E17F817FF18C028007FF8000713F09338007FF8EF1FFE717E050313807113C0A271 -13E0F07FF0A2F03FF8A219FC181FA219FEA419FFAC19FEA419FC183FA219F8187F19F0F0 -FFE0A24D13C04D13804D1300EF1FFEEF7FFC933807FFF0B912C095C7FC17FC178040397D -B849>I<B912F0A426007FF8C7FCEF1FF8170717031701A21700A21878A3043C137C183C -A41800167CA216FC150391B5FCA4ECF8031500167CA2163C180FA3181EA293C7FCA2183E -A2183C187CA218FCA2EF01F81703170F173FEE01FFB9FC18F0A338397DB83F>I<B912C0 -A43A007FF800039338007FE0171F170F1707A21703A21701A318F0EE7800A41800A216F8 -A21501150791B5FCA4ECF80715011500A21678A693C8FCADB7FCA434397DB83C>I<DB3F -FCEB01C00203B5EAC003021FECF00791B6EAFC0F01039039FC00FF3F4901C0EB1FFFD91F -FEC77E49481403D97FF080494880485B48177F4849153F4890C9FC181F485A180F123F5B -1807127FA24993C8FC12FFAB043FB61280A2127F7FDC0003EBC000123FA27F121FA26C7E -A26C7F6C7F6C7F7ED97FF85C6D7E6DB45C010701C05B6D01FCEBFF3F010090B5EAFE0F02 -1FECF8030203ECE0009126003FFEC9FC413B7BB94B>I<B612FCA439007FF800B3B3ADB6 -12FCA41E397DB824>73 D<B7FCA426007FF8C9FCB3ACEF0780A5170F1800A35FA25FA25F -5F5E5EEE0FFE167FB8FCA431397DB839>76 D<B500F80403B512F06E5EA26E5ED8007FF1 -E000A2D97BFF161EA201796D5DA201786D5DA26E6C5DA36E6C4A5AA26E6C4A5AA26E6C4A -5AA26E6C4A5AA26E6C141EA36E6D5BA26E6D5BA26F6C5BA26F6C485AA36F6C485AA26F6C -485AA26F6C48C7FCA2923803FF1EA36F13BCA26F13F8A2705AA2705AA213FCB500FC6D48 -48B612F0A2EE0F80EE070054397DB85B>I<EDFFF8020FEBFF80027F14F0903A01FFC01F -FC010790380007FFD91FFC010113C0D93FF06D6C7E49486E7E49486E7E48496E7E488348 -90C86C7EA248486F1380A248486F13C0A2003F18E0A348486F13F0A400FF18F8AC007F18 -F06D5DA3003F18E0A26D5D001F18C0A26C6C4B13806C18006E5C6C6D4A5A6C5F6C6D4A5A -6D6C4A5AD93FFC49485A6DB401075B0107D9C01F90C7FC010190B512FC6D6C14F0020F14 -80020001F8C8FC3D3B7BB948>79 D<B8FC17F017FEEFFF8028007FF8000F13C0040113E0 -7013F0EF7FF8EF3FFCA2EF1FFEA218FFA818FEA2EF3FFCA2EF7FF8EFFFF04C13E0040F13 -C091B7120017FC17E002F8C9FCB3A4B612FCA438397DB841>I<B712FCEEFFE017FC17FF -28007FF8000F13C004017F707F717E717EA2717EA284A760A24D5A604D5A4D5A04035B04 -1F90C8FC91B612FC17E0839139F8003FFCEE0FFF707F707F8284A2707FA584A51A601AF0 -84177F1901DD3FFE13E0B600FC011F130394390FFF87C071EBFF8005011400CBEA1FFC44 -3A7DB848>82 D<D907FF130E013FEBE01E90B5EAF83E0003ECFE7E3A07FC01FFFE390FF0 -001F4848130F48481303491301007F140090C8FC167E5A163EA27F161E7F7F6D91C7FC13 -FC387FFFE014FEECFFF06C14FE6F7E6C816C15F06C816C81C681133F010F801301D9000F -1480EC007F030F13C01503818100F0157FA3163FA27E17807E167F6C16007E6D14FE01E0 -495A01F813039039FF801FF800FC90B512E0D8F83F5CD8F00749C7FC39E0007FF02A3B7B -B935>I<003FB91280A4D9F800EBF003D87FC09238007FC049161F007EC7150FA2007C17 -07A200781703A400F818E0481701A4C892C7FCB3AE010FB7FCA43B387DB742>I<B600FC -011FB512C0A426007FF8C8381FC000725AB3B3181F013F94C7FC8060011F163E6D6C157E -187C6D6C15FC6D6D495A6D6DEB07F06D01F0EB1FE0DA7FFEEBFFC0021FB6C8FC02075C02 -0014F0030F1380423A7DB849>I<B600F00103B512E0A4C601F0C83807F0006E5E017F5F -6E150FA2013F5F6E151F011F94C7FC6E5D6D163E6F147E6D167CA26F14FC6D5E6F13016D -5E6F13036D5E811707027F5D6F130F023F5D6F131F021F92C8FC815F6E143EEE807E6E14 -7CEEC0FC6E5C16E016E16E5C16F36E5C16FF6F5BA36F5BA26F90C9FCA26F5AA36F5AA26F -5AA26F5A433A7EB848>I<B6D8E01FB500FC90383FFFFCA4000101F0C7D83FFCC8EA7E00 -6C71153C171F6E197C017F701578836E7014F8013F6F5E6E1801011F4B6D5CA26E18036D -4B6D5CA26D6D496D495A173C6F170F6D037C6D91C7FCEF787F6F5F6D4B6C6C131E816D02 -016E5BEFE01F03F8177C027F01036E13784D7E03FCEE80F8023F49486C5C15FE021F010F -EDC1E04D7E03FF16C36E49EDE3C0041E7F049E15F76E01BC6D5C04FC15FF6E95C8FC4C80 -A26E5F4C143F6E5F4C141FA2037F5E4C140FA26F486E5AA2031F5E93C812036F5E5E3A7E -B863>I<007FB5D8F803B512F8A4C66C48C7D80FF0C7FC6D6C5D6D5E6F495A6D6D49C8FC -7F6D6D137E6F5B6DEBF8016D5D6F485A6E6C485A023F130FDA1FFF5BEE9F806E01FFC9FC -805E6E5B6E5B80826F7E153F826F7F5D4B7F92B57EA2DA01F97FDA03F17F03F07F913807 -E07FDA0FC07F021F6D7E4B7E4A486C7F027E8102FE6D7F4A7F49488149486D7F0107804A -6E7E49488149486E7E013F81017F83B60107B61280A441397DB848>I<EB3FFE0003B512 -E0000F14F8391FF00FFE003FEB03FF6D6C7F6E7FA26F7EA26C5A6C5AEA0380C8FCA2EC3F -FF010FB5FC137F3901FFF87F00071380380FFE00EA3FF85B485A12FF5BA415FF6D5A127F -263FF00713F83B1FFC1FBFFFC0390FFFFE1F0003EBF80F39003FE0032A257DA42E>97 -D<13FFB5FCA412077EAF4AB47E020F13F0023F13FC9138FE03FFDAF00013804AEB7FC002 -80EB3FE091C713F0EE1FF8A217FC160FA217FEAA17FCA3EE1FF8A217F06E133F6EEB7FE0 -6E14C0903AFDF001FF80903AF8FC07FE009039F03FFFF8D9E00F13E0D9C00390C7FC2F3A -7EB935>I<903801FFC0010F13FC017F13FFD9FF8013802603FE0013C048485AEA0FF812 -1F13F0123F6E13804848EB7F00151C92C7FC12FFA9127FA27F123FED01E06C7E15036C6C -EB07C06C6C14806C6C131FC69038C07E006DB45A010F13F00101138023257DA42A>I<EE -7F80ED7FFFA4150381AF903801FF81010F13F1013F13FD9038FFC07F0003EB001FD807FC -1307000F8048487F5B123FA2485AA312FFAA127FA27F123FA26C6C5B000F5C6C6C5B6C6C -4913C02701FF80FD13FE39007FFFF9011F13E1010113012F3A7DB935>I<903803FF8001 -1F13F0017F13FC3901FF83FE3A03FE007F804848133F484814C0001FEC1FE05B003FEC0F -F0A2485A16F8150712FFA290B6FCA301E0C8FCA4127FA36C7E1678121F6C6C14F86D14F0 -00071403D801FFEB0FE06C9038C07FC06DB51200010F13FC010113E025257DA42C>I<EC -1FF0903801FFFC010713FF90391FF87F8090383FE0FFD9FFC113C0A2481381A24813016E -1380A2ED3E0092C7FCA8B6FCA4000390C8FCB3ABB512FEA4223A7DB91D>I<161FD907FE -EBFFC090387FFFE348B6EAEFE02607FE07138F260FF801131F48486C138F003F15CF4990 -387FC7C0EEC000007F81A6003F5DA26D13FF001F5D6C6C4890C7FC3907FE07FE48B512F8 -6D13E0261E07FEC8FC90CAFCA2123E123F7F6C7E90B512F8EDFF8016E06C15F86C816C81 -5A001F81393FC0000F48C8138048157F5A163FA36C157F6C16006D5C6C6C495AD81FF0EB -07FCD807FEEB3FF00001B612C06C6C91C7FC010713F02B377DA530>I<13FFB5FCA41207 -7EAFED7FC0913803FFF8020F13FE91381F03FFDA3C01138014784A7E4A14C05CA25CA291 -C7FCB3A3B5D8FC3F13FFA4303A7DB935>I<EA01F0EA07FC487EA2487EA56C5AA26C5AEA -01F0C8FCA913FF127FA412077EB3A9B512F8A4153B7DBA1B>I<141FEC7FC0ECFFE0A249 -13F0A56D13E0A2EC7FC0EC1F0091C7FCA9EC0FF0EB0FFFA4EB007F143FB3B0121FEA3F80 -EA7FC0EAFFE0EC7FE0A215C014FF6C481380903883FE006CB45A000F13F0000113801C4B -86BA1D>I<13FFB5FCA412077EAF92380FFFE0A4923803FC0016F0ED0FE0ED1F804BC7FC -157E5DEC03F8EC07E04A5A141FEC7FE04A7E8181A2ECCFFEEC0FFF496C7F806E7F6E7F82 -157F6F7E6F7E82150F82B5D8F83F13F8A42D3A7EB932>I<13FFB5FCA412077EB3B3ACB5 -12FCA4163A7DB91B>I<01FED97FE0EB0FFC00FF902601FFFC90383FFF80020701FF90B5 -12E0DA1F81903983F03FF0DA3C00903887801F000749DACF007F00034914DE6D48D97FFC -6D7E4A5CA24A5CA291C75BB3A3B5D8FC1FB50083B512F0A44C257DA451>I<01FEEB7FC0 -00FF903803FFF8020F13FE91381F03FFDA3C011380000713780003497E6D4814C05CA25C -A291C7FCB3A3B5D8FC3F13FFA430257DA435>I<903801FFC0010F13F8017F13FFD9FF80 -7F3A03FE003FE048486D7E48486D7E48486D7EA2003F81491303007F81A300FF1680A900 -7F1600A3003F5D6D1307001F5DA26C6C495A6C6C495A6C6C495A6C6C6CB45A6C6CB5C7FC -011F13FC010113C029257DA430>I<9039FF01FF80B5000F13F0023F13FC9138FE07FFDA -F00113800003496C13C00280EB7FE091C713F0EE3FF8A2EE1FFCA3EE0FFEAA17FC161FA2 -17F8163F17F06E137F6E14E06EEBFFC0DAF00313809139FC07FE0091383FFFF8020F13E0 -020390C7FC91C9FCACB512FCA42F357EA435>I<9038FE03F000FFEB0FFEEC3FFF91387C -7F809138F8FFC000075B6C6C5A5CA29138807F80ED3F00150C92C7FC91C8FCB3A2B512FE -A422257EA427>114 D<90383FF0383903FFFEF8000F13FF381FC00F383F0003007E1301 -007C130012FC15787E7E6D130013FCEBFFE06C13FCECFF806C14C06C14F06C14F81203C6 -14FC131F9038007FFE140700F0130114007E157E7E157C6C14FC6C14F8EB80019038F007 -F090B512C000F8140038E01FF81F257DA426>I<130FA55BA45BA25B5BA25A1207001FEB -FFE0B6FCA3000390C7FCB21578A815F86CEB80F014816CEBC3E090383FFFC06D13809038 -03FE001D357EB425>I<01FFEC3FC0B5EB3FFFA4000714016C80B3A35DA25DA26C5C6E48 -13E06CD9C03E13FF90387FFFFC011F13F00103138030257DA435>I<B539F001FFF8A400 -0390C7EA1F00161E6E133E6C153C6E137C6C15786E13F8017F5CECF001013F5C14F8011F -495AA2ECFC07010F5CECFE0F010791C7FC6E5A6D131E15BE6D13BC15FC6D5BA36E5AA26E -5AA26E5AA26E5AA22D257EA432>I<B500F1B538803FFFA43D07FE000FF80003E06C6C01 -0715C082028015076C6E6C148015076C01C0ED0F00826E485C017FED801E5D90273FF01E -7F5B17C0DAF83E147C011F90393C3FE078037C14F8903B0FFC781FF0F0A29139FEF00FF1 -0107EDF9E002FF14FB6D496CB45AA24B7E6D5EA26D496C90C7FCA292C7FC6E5CA2023E14 -7C023C143C40257EA445>I<B539F01FFFF0A4000390398003F8006C01C013E06C1407D9 -7FE05B6D6C485A6E48C7FC90381FFC3E010F5B903807FEFC6D6C5A5D6D5B6D5B6E7E6E7E -814A7EA24A7E903801F3FFD903E37FD907C17FEB0FC049486C7E4A6C7E013E80496D7E49 -130F00016E7EB590383FFFF8A42D257EA432>I<B539F001FFF8A4000390C7EA1F00161E -6E133E6C153C6E137C6C15786E13F8017F5CECF001013F5C14F8011F495AA2ECFC07010F -5CECFE0F010791C7FC6E5A6D131E15BE6D13BC15FC6D5BA36E5AA26E5AA26E5AA26E5AA2 -92C8FCA25C141E003F133E387F803C38FFC07C147814F8EBC1F0EBC3E06C485A387D1F80 -D83FFFC9FCEA1FFCEA07F02D357EA432>I E -%EndDVIPSBitmapFont -%DVIPSBitmapFont: Fc ecbx1200 12 41 -/Fc 41 122 df<B612F8A91D097F9A25>45 D<EA07C0EA1FF0EA3FF8EA7FFCEAFFFEA7EA +%DVIPSBitmapFont: Fb ecbx1200 12 42 +/Fb 42 122 df<B612F8A91D097F9A25>45 D<EA07C0EA1FF0EA3FF8EA7FFCEAFFFEA7EA 7FFCEA3FF8EA1FF0EA07C00F0F788E1F>I<EC03C01407141F147FEB03FF133FB6FCA413 C3EA0003B3B3ADB712FCA5264177C038>49 D<ECFFE0010F13FE013F6D7E90B612E00003 15F82607FC0313FE3A0FE0007FFFD81F806D138048C7000F13C0488001C015E001F07F00 @@ -267,7 +121,10 @@ FCAAEC3FF001C1B5FC01C714C001DF14F09039FFE03FFC9138000FFE01FC6D7E01F06D13 017F13E091B512F89039F9F01FFC9039FBC007FE9039FF8003FF17804A6C13C05B6F13E0 A24915F0A317F85BA4127FA5123FA217F07F121FA2000F4A13E0A26C6C15C06D4913806C 018014006C6D485A6C9038E01FFC6DB55A011F5C010714C0010191C7FC9038003FF02D42 -7BC038>I<EE1F80A24C7EA24C7EA34C7EA24B7FA34B7FA24B7FA34B7F169F031F80161F +7BC038>I<121E121F13FC90B712FEA45A17FC17F817F017E017C0A2481680007EC8EA3F +00007C157E5E00785D15014B5A00F84A5A484A5A5E151FC848C7FC157E5DA24A5A14035D +14074A5AA2141F5D143FA2147F5D14FFA25BA35B92C8FCA35BA55BAA6D5A6D5A6D5A2F44 +7AC238>I<EE1F80A24C7EA24C7EA34C7EA24B7FA34B7FA24B7FA34B7F169F031F80161F 82033F80ED3E07037E80157C8203FC804B7E02018115F0820203814B137F0207815D173F 020F814B7F021F8292C77EA24A82023E80027E82027FB7FCA291B87EA2498302F0C8FCA2 0103834A157F0107834A153FA249488284011F8491C97E4984133E017E82B6020FB612F0 @@ -379,63 +236,62 @@ B45A806E90C8FC5D6E7E6E7F6E7FA24A7F4A7F8291381F3FFCEC3E1F027C7F4A6C7E4948 495A387FC1F8EB07F06CB45A6C5B000790CAFCEA01FC36407EAB3B>I E %EndDVIPSBitmapFont -%DVIPSBitmapFont: Fd ectt1000 10 73 -/Fd 73 126 df<121FEA3F80EA7FC0EAFFE0B0EA7FC0AEEA1F00C7FCA7121FEA3F80EA7F -C0EAFFE0A5EA7FC0EA3F80EA1F000B3470B32C>33 D<003C131E007F137F481480A66C14 -00A6007E7FA6003E133EA3003C131E001C131C191977B32C>I<143814FC13011303EB07 -F8EB0FF0EB1FC0EB3F80EB7F0013FE485A485A5B12075B120F5B485AA2123F90C7FCA25A -127EA312FE5AAC7E127EA3127F7EA27F121FA26C7E7F12077F12037F6C7E6C7E137FEB3F -80EB1FC0EB0FF0EB07F8EB03FC130113001438164272B92C>40 D<127012FC7E7E6C7E6C -7EEA0FE06C7E6C7E6C7E6C7E137F7F1480131F14C0130FEB07E0A214F01303A214F81301 -A314FC1300AC130114F8A3130314F0A2130714E0A2EB0FC0131F1480133F14005B13FE48 -5A485A485A485AEA3FC0485A48C7FC5A5A1270164279B92C>I<EB0380497EA600201408 -00F8143E00FE14FE00FF13C1EBC7C7EBE7CF003FB512F8000F14E0000314806C14003800 -7FFCA248B5FC481480000F14E0003F14F839FFE7CFFEEBC7C7EB07C100FE13C000F8143E -0020140800001400A66D5A1F247AAA2C>I<EA0F80EA1FE0EA3FF0EA7FF8A213FCA3123F -121F120F120013F8A21201EA03F01207EA1FE0EA7FC0EAFF80130012FC12700E17718A2C ->44 D<007FB512F0B612F8A36C14F01D0579942C>I<121FEA3F80EA7FC0EAFFE0A5EA7F -C0EA3F80EA1F000B0B708A2C>I<1507ED0F80A2151F16005D153E157E157CA215FC5D14 -015D14035D14075D140F5D141F92C7FC5C143EA2147E147C14FC5C13015C13035C13075C -130F5C131F91C8FC5B133EA2137E137C13FC5B12015B12035B12075B120F5B121F90C9FC -A25A123E127E127C12FC5AA2127021417BB92C>I<EB03F8EB0FFE90383FFF80497F90B5 -7E3901FE0FF03903F803F848486C7EEBE0004848137EA248487FA248C7EA1F80A2003E14 -0F007E15C0A3007C140700FC15E0AC6C140F007E15C0A46CEC1F80A36C6CEB3F00A26C6C -137E6D13FE00075CEBF0016C6C485A3901FE0FF06CB55A6D5B6D5BD90FFEC7FCEB03F823 -357CB32C>I<1307497EA2131FA2133F137F13FF5A1207127FB5FC13DF139FEA7C1F1200 -B3AE007FB512E0B612F0A36C14E01C3477B32C>I<EB0FF890387FFF8048B512E0000780 -4814FC391FF80FFE393FE001FF903880007F48C7EA3F80007E141F00FE15C0150F6C15E0 -1507A3127E123CC8FCA2150F16C0151F1680153F16005D15FE4A5A14034A5A4A5A4A5A4A -5AECFF804948C7FC495A495A495AEB3FE0EB7F8049C8FC485A4848EB03C04848EB07E0EA -1FE0485A48B6FCB7FCA36C15C023347CB32C>I<EB0FFC90387FFF8048B512E0000714F8 -4880391FF807FEEBC0004848137F6D7F1680151FA26C5A6CC7FCC8FC153F16005D15FE14 -014A5AEC1FF890381FFFF0495BA215F86D7F90380007FEEC00FF81ED3F80ED1FC0150FA2 -16E01507A2123C127EB4FC150F16C0A248141F007FEC3F806DEB7F006C6C5B391FF807FE -6CB55A6C5C6C14E0C66C1380D90FFCC7FC23357CB32C>I<EC07F04A7E141F143FA2147E -A214FCEB01F8A2EB03F0EB07E0A2EB0FC0EB1F80A2EB3F00137EA25B485AA2485A5B1207 -485AA2485A48C7FCA2127E5AB712FC16FEA36C15FCC8EAF800AA91387FFFF091B512F8A3 -6E13F027347EB32C>I<000FB512FE4880A35D0180C8FCADEB83FE90389FFF8090B512E0 -15F8819038FE03FE9038F000FF01C07F49EB3F8090C7121F6C15C0C8120FA2ED07E0A412 -3C127EB4FC150F16C0A248141F007EEC3F80007FEC7F006C6C5B6D485A391FF80FFC6CB5 -5A6C5C000114C06C6C90C7FCEB0FF823347CB22C>I<EB07FC90383FFF8090B512E00003 -14F84880390FFC07FE391FF001FF9038C0007F4848EB3F8090C7121F4815C0007E140FA5 -6CEC1F80A26C6CEB3F006D5B390FF001FE3903FC07F86CB55A6C6C13C0D907FCC7FC9038 -7FFFC048B512F03903FC07F8390FF001FE391FC0007F497F48C7EA1F80007EEC0FC0A248 -EC07E0A7007EEC0FC0A2007F141F6C6CEB3F806C6CEB7F009038F001FF390FFC07FE6CB5 -5A6C5CC614E0013F1380D907FCC7FC23357CB32C>56 D<EB07FCEB3FFF90B512C0488048 -803907FC07F8390FF001FC48486C7ED83F80137E157F48C77E007EEC1F8012FE5AED0FC0 -A416E0A37E127E007F141F7E6D133F6C6C137F390FF001FF3807FC0F6CB6FC6C14F76C14 -C7013F130FD90FF813C090C7FCA2151F1680153F1600000F5C486C137E486C13FE4A5A4A -5A14079038801FF0391FE07FE090B55A6C91C7FC6C5B000113F838007FC023357CB32C> -I<121FEA3F80EA7FC0EAFFE0A5EA7FC0EA3F80EA1F00C7FCAE121FEA3F80EA7FC0EAFFE0 -A5EA7FC0EA3F80EA1F000B2470A32C>I<EA0F80EA1FC0EA3FE0EA7FF0A5EA3FE0EA1FC0 -EA0F80C7FCAEEA0F80EA1FE0EA3FF0EA7FF8A213FCA3123F121F120F120013F8A21201EA -03F01207EA1FE0EA7FC0EAFF80130012FC12700E3071A32C>I<007FB612F0B712F8A36C -15F0CAFCA8007FB612F0B712F8A36C15F025127DA12C>61 D<EC7F80903803FFE0010F7F -013F7F497F9038FFC0FE3901FE007FD803F87F4848EB1F809038E00FCF390FC03FFF4848 -4813C091B5FCEA3F01393E03F87F903907F03FE0007EEBE01F397C0FC00FEC8007A2EAFC -1F00F8EB0003A900FCEB8007D87C0F14C0A2ECC00F3A7E07E01F80003EEBF03F903903F8 -7F00393F01FFFED81F805B6E5A6C6C6C5A3907E00FC09039F00007C06C6CEB0FE0D801FE -131F3900FFC0FF6DB512C06D1480010FEBFE00010313F89038007FC023337CB22C>64 +%DVIPSBitmapFont: Fc ectt1000 10 71 +/Fc 71 123 df<121FEA3F80EA7FC0EAFFE0B0EA7FC0AEEA1F00C7FCA7121FEA3F80EA7F +C0EAFFE0A5EA7FC0EA3F80EA1F000B3470B32C>33 D<143814FC13011303EB07F8EB0FF0 +EB1FC0EB3F80EB7F0013FE485A485A5B12075B120F5B485AA2123F90C7FCA25A127EA312 +FE5AAC7E127EA3127F7EA27F121FA26C7E7F12077F12037F6C7E6C7E137FEB3F80EB1FC0 +EB0FF0EB07F8EB03FC130113001438164272B92C>40 D<127012FC7E7E6C7E6C7EEA0FE0 +6C7E6C7E6C7E6C7E137F7F1480131F14C0130FEB07E0A214F01303A214F81301A314FC13 +00AC130114F8A3130314F0A2130714E0A2EB0FC0131F1480133F14005B13FE485A485A48 +5A485AEA3FC0485A48C7FC5A5A1270164279B92C>I<EB0380497EA60020140800F8143E +00FE14FE00FF13C1EBC7C7EBE7CF003FB512F8000F14E0000314806C140038007FFCA248 +B5FC481480000F14E0003F14F839FFE7CFFEEBC7C7EB07C100FE13C000F8143E00201408 +00001400A66D5A1F247AAA2C>I<EA0F80EA1FE0EA3FF0EA7FF8A213FCA3123F121F120F +120013F8A21201EA03F01207EA1FE0EA7FC0EAFF80130012FC12700E17718A2C>44 +D<007FB512F0B612F8A36C14F01D0579942C>I<121FEA3F80EA7FC0EAFFE0A5EA7FC0EA +3F80EA1F000B0B708A2C>I<1507ED0F80A2151F16005D153E157E157CA215FC5D14015D +14035D14075D140F5D141F92C7FC5C143EA2147E147C14FC5C13015C13035C13075C130F +5C131F91C8FC5B133EA2137E137C13FC5B12015B12035B12075B120F5B121F90C9FCA25A +123E127E127C12FC5AA2127021417BB92C>I<EB03F8EB0FFE90383FFF80497F90B57E39 +01FE0FF03903F803F848486C7EEBE0004848137EA248487FA248C7EA1F80A2003E140F00 +7E15C0A3007C140700FC15E0AC6C140F007E15C0A46CEC1F80A36C6CEB3F00A26C6C137E +6D13FE00075CEBF0016C6C485A3901FE0FF06CB55A6D5B6D5BD90FFEC7FCEB03F823357C +B32C>I<1307497EA2131FA2133F137F13FF5A1207127FB5FC13DF139FEA7C1F1200B3AE +007FB512E0B612F0A36C14E01C3477B32C>I<EB0FF890387FFF8048B512E00007804814 +FC391FF80FFE393FE001FF903880007F48C7EA3F80007E141F00FE15C0150F6C15E01507 +A3127E123CC8FCA2150F16C0151F1680153F16005D15FE4A5A14034A5A4A5A4A5A4A5AEC +FF804948C7FC495A495A495AEB3FE0EB7F8049C8FC485A4848EB03C04848EB07E0EA1FE0 +485A48B6FCB7FCA36C15C023347CB32C>I<EB0FFC90387FFF8048B512E0000714F84880 +391FF807FEEBC0004848137F6D7F1680151FA26C5A6CC7FCC8FC153F16005D15FE14014A +5AEC1FF890381FFFF0495BA215F86D7F90380007FEEC00FF81ED3F80ED1FC0150FA216E0 +1507A2123C127EB4FC150F16C0A248141F007FEC3F806DEB7F006C6C5B391FF807FE6CB5 +5A6C5C6C14E0C66C1380D90FFCC7FC23357CB32C>I<EC07F04A7E141F143FA2147EA214 +FCEB01F8A2EB03F0EB07E0A2EB0FC0EB1F80A2EB3F00137EA25B485AA2485A5B1207485A +A2485A48C7FCA2127E5AB712FC16FEA36C15FCC8EAF800AA91387FFFF091B512F8A36E13 +F027347EB32C>I<000FB512FE4880A35D0180C8FCADEB83FE90389FFF8090B512E015F8 +819038FE03FE9038F000FF01C07F49EB3F8090C7121F6C15C0C8120FA2ED07E0A4123C12 +7EB4FC150F16C0A248141F007EEC3F80007FEC7F006C6C5B6D485A391FF80FFC6CB55A6C +5C000114C06C6C90C7FCEB0FF823347CB22C>I<EB07FC90383FFF8090B512E0000314F8 +4880390FFC07FE391FF001FF9038C0007F4848EB3F8090C7121F4815C0007E140FA56CEC +1F80A26C6CEB3F006D5B390FF001FE3903FC07F86CB55A6C6C13C0D907FCC7FC90387FFF +C048B512F03903FC07F8390FF001FE391FC0007F497F48C7EA1F80007EEC0FC0A248EC07 +E0A7007EEC0FC0A2007F141F6C6CEB3F806C6CEB7F009038F001FF390FFC07FE6CB55A6C +5CC614E0013F1380D907FCC7FC23357CB32C>56 D<EB07FCEB3FFF90B512C04880488039 +07FC07F8390FF001FC48486C7ED83F80137E157F48C77E007EEC1F8012FE5AED0FC0A416 +E0A37E127E007F141F7E6D133F6C6C137F390FF001FF3807FC0F6CB6FC6C14F76C14C701 +3F130FD90FF813C090C7FCA2151F1680153F1600000F5C486C137E486C13FE4A5A4A5A14 +079038801FF0391FE07FE090B55A6C91C7FC6C5B000113F838007FC023357CB32C>I<12 +1FEA3F80EA7FC0EAFFE0A5EA7FC0EA3F80EA1F00C7FCAE121FEA3F80EA7FC0EAFFE0A5EA +7FC0EA3F80EA1F000B2470A32C>I<EA0F80EA1FC0EA3FE0EA7FF0A5EA3FE0EA1FC0EA0F +80C7FCAEEA0F80EA1FE0EA3FF0EA7FF8A213FCA3123F121F120F120013F8A21201EA03F0 +1207EA1FE0EA7FC0EAFF80130012FC12700E3071A32C>I<007FB612F0B712F8A36C15F0 +CAFCA8007FB612F0B712F8A36C15F025127DA12C>61 D<EC7F80903803FFE0010F7F013F +7F497F9038FFC0FE3901FE007FD803F87F4848EB1F809038E00FCF390FC03FFF48484813 +C091B5FCEA3F01393E03F87F903907F03FE0007EEBE01F397C0FC00FEC8007A2EAFC1F00 +F8EB0003A900FCEB8007D87C0F14C0A2ECC00F3A7E07E01F80003EEBF03F903903F87F00 +393F01FFFED81F805B6E5A6C6C6C5A3907E00FC09039F00007C06C6CEB0FE0D801FE131F +3900FFC0FF6DB512C06D1480010FEBFE00010313F89038007FC023337CB22C>64 D<14FE497EA4497FA214EFA2130781A214C7A2010F7FA314C390381F83F0A590383F01F8 A490387E00FCA549137E90B512FEA34880A29038F8003FA34848EB1F80A4000715C04913 0FD87FFEEBFFFC6D5AB514FE6C15FC497E27347EB32C>I<007FB512E015F8B612FE6C80 @@ -460,116 +316,285 @@ A36C141FA27F121F6D133F120F6D137F6C7E6C6C13FF6D5A3801FF076C90B5FC6D13EF01 2C>I<007FB512F8B612FCA36C14F839000FC000B3B3A5007FB512F8B612FCA36C14F81E 3379B22C>I<0107B512804914C0A36D148090390003F000B3AF1218127EA2B4FCA24A5A 48130F007F131F9038C07FC06CB55A6C91C7FC6C5B000313F838007FC022347BB22C>I< -387FFFE0B57EA36C5BD803F0C8FCB3AE16F0ED01F8A8007FB6FCB7FCA36C15F025337DB2 -2C>76 D<D87FE0EB0FFC486CEB1FFEA26D133F007F15FC000F15E001BC137BA4019E13F3 -A3EB9F01A2018F13E3A21483A2018713C314C7A201831383A214EFA201811303A214FFEB -80FEA3147C14381400ACD87FF0EB1FFC486CEB3FFEA36C48EB1FFC27337EB22C>I<D87F -F0EB7FFC486CEBFFFEA27F007FEC7FFCD807FEEB07C013DEA213DF13CFA2148013C714C0 -A213C314E0A213C114F0A213C014F8A2147CA3143EA2141E141FA2140F1587A2140715C7 -A2140315E71401A215F71400A215FFD87FFC137F487E153FA26C48EB1F8027337EB22C> -I<EB7FFF0003B512E0000F14F848804880EBE003EB800048C7127FA2007E80A300FE1580 -48141FB3A86C143FA2007E1500A3007F5CA26C6C13FEEBF00790B5FC6C5C6C5C000314E0 -C66C90C7FC21357BB32C>I<007FB512C0B612F88115FF6C15802603F00013C0153FED0F -E0ED07F0A2150316F81501A6150316F01507A2ED0FE0ED3FC015FF90B61280160015FC5D -15C001F0C8FCB0387FFF80B57EA36C5B25337EB22C>I<EB7FFF0003B512E0000F14F848 -804880EBF007EB800048C7127FA2007E80A300FE158048141FB3A7EB01F0EB03F800FE14 -3F267E01FC1300A2EB00FE007F5C147FD83F8013FEEBF03F90B5FC6C5C6C5C000314E0C6 -7E90380007F0A26E7EA26E7EA26E7EA2157FA2153E21407BB32C>I<387FFFFCB67E15E0 -15F86C803907E007FE1401EC007F6F7E151FA26F7EA64B5AA2153F4BC7FCEC01FE140790 -B55A5D15E081819038E007FCEC01FE1400157F81A8160FEE1F80A5D87FFEEB1FBFB5ECFF -00815E6C486D5AC8EA01F029347EB22C>I<90381FF80790B5EA0F804814CF000714FF5A -381FF01F383FC003497E48C7FC007E147F00FE143F5A151FA46CEC0F00007E91C7FC127F -7FEA3FE0EA1FFCEBFFC06C13FC0003EBFFC06C14F06C6C7F01077F9038007FFEEC07FF02 -001380153FED1FC0A2ED0FE0A20078140712FCA56CEC0FC0A26CEC1F806D133F01E0EB7F -009038FE01FF90B55A5D00F914F0D8F83F13C0D8700790C7FC23357CB32C>I<007FB612 -FCB712FEA43AFC007E007EA70078153CC71400B3AF90383FFFFCA2497F6D5BA227337EB2 -2C>I<3B7FFF803FFFC0B56C4813E0A36C496C13C03B03F00001F800B3AF6D130300015D -A26D130700005D6D130F017F495A6D6C485AECE0FF6DB5C7FC6D5B010313F86D5B903800 -3F802B3480B22C>I<D87FFCEB7FFC486CEBFFFEA36C48EB7FFCD80FC0EB07E06D130F00 -0715C0A36D131F00031580A36D133F00011500A36D5B0000147EA4017E5BA46D485AA490 -381F83F0A4010F5B14C7A301075BA214EFA201035BA214FFA26D90C7FCA46D5A27347EB2 -2C>I<3A3FFF03FFE0484913F0148714076C6D13E03A01F800FE007F0000495A13FE017E -5BEB7F03013F5B1487011F5B14CF010F5B14FF6D5BA26D90C7FCA26D5AA26D5AA2497EA2 -497EA2497F81EB0FCF81EB1FC7EC87F0EB3F83EC03F8EB7F01017E7FEBFE00497F000114 -7E49137F000380491480151FD87FFEEBFFFC6D5AB514FE6C15FC497E27337EB22C>88 -D<D87FFCEB7FFC486CEBFFFEA36C48EB7FFCD807F0EB0FC0151F000315806D133F12016D -EB7F0012006D137E017E13FE017F5BEB3F01EC81F8131FEC83F0EB0FC314C7903807E7E0 -A201035B14EF6DB45AA292C7FC7F5C147EB0903807FFE0497FA36D5B27337EB22C>I<00 -3FB612C04815E0A4007EC7EA1FC0ED3F80A2ED7F00157E15FE4A5A003C5CC712034A5AA2 -4A5A4A5AA24A5A4AC7FCA214FE495AA2495A495AA2495A495AA2495A49C8FCA213FE485A -A24848EB03C049EB07E01207485A5B121F485AA248C7FCB7FCA46C15C023337CB22C>I< -007FB6FCB71280A46C150021067B7D2C>95 D<3801FFF0000713FE001F6D7E15E0488090 -38C01FF81407EC01FC381F80000006C77EC8127EA3ECFFFE131F90B5FC1203120F48EB80 -7E383FF800EA7FC090C7FC12FE5AA47E007F14FEEB8003383FE01F6CB612FC6C15FE6C14 -BF0001EBFE1F3A003FF007FC27247CA32C>97 D<EA7FF0487EA3127F1201AAEC1FE0ECFF -F801FB13FE90B6FC16809138F07FC09138801FE091380007F049EB03F85BED01FC491300 -A216FE167EA816FE6D14FCA2ED01F86D13036DEB07F0150F9138801FE09138E07FC091B5 -1280160001FB5B01F813F83900F03FC027337FB22C>I<903803FFE0011F13F8017F13FE -48B5FC48804848C6FCEA0FF0485A49137E4848131890C9FC5A127EA25AA8127EA2127F6C -140F6DEB1F806C7E6D133F6C6CEB7F003907FE03FF6CB55A6C5C6C6C5B011F13E0010390 -C7FC21247AA32C>I<EC0FFE4A7EA380EC003FAAEB07F8EB3FFE90B512BF4814FF5A3807 -FC0F380FF00348487E497E48487F90C7FC007E80A212FE5AA87E007E5CA2007F5C6C7E5C -6C6C5A380FF0073807FC1F6CB612FC6CECBFFE6C143FEB3FFC90390FF01FFC27337DB22C ->I<EB03FE90381FFFC0017F13F048B57E48803907FE03FE390FF800FFD81FE0EB3F805B -4848EB1FC090C7120F5A007E15E015075AB7FCA416C000FCC9FC7E127EA2127F6CEC03C0 -6DEB07E06C7ED80FF0130F6C6CEB3FC001FF13FF000190B512806C1500013F13FC010F13 -F00101138023247CA32C>I<EC0FF8EC3FFE91B5FC4914805B903807FC7F14F090390FE0 -3F0014C092C7FCA6007FB512FEB7FCA36C5C26000FC0C7FCB3A8003FB512F04880A36C5C -21337DB22C>I<ED03F8903907F80FFC90391FFE3FFE017FB6FC48B7FC48ECFE7F9038FC -0FF82607F003133E3A0FE001FC1CD9C0001300001F8049137EA66D13FE000F5CEBE0016C -6C485A3903FC0FF048B5FC5D481480D99FFEC7FCEB87F80180C8FCA37F6C7E90B512F06C -14FE48ECFF804815E04815F03A3FC0001FF848C7EA03FC007E1400007C157C00FC157E48 -153EA46C157E007E15FCD87F801303D83FE0EB0FF8D81FFCEB7FF06CB612E0000315806C -1500D8003F13F8010713C028387EA42C>I<EA7FF0487EA3127F1201AAEC1FE0EC7FFC90 -38F9FFFE01FB7F90B6FC9138F03F80ECC01F02807FEC000F5B5BA25BB3267FFFE0B5FCB5 -00F11480A36C01E0140029337FB22C>I<1307EB1FC0A2497EA36D5AA20107C7FC90C8FC -A7387FFFC080B5FC7EA2EA0007B3A8007FB512FCB612FEA36C14FC1F3479B32C>I<140E -EC3F80A2EC7FC0A3EC3F80A2EC0E0091C7FCA748B512804814C0A37EC7120FB3B3A2141F -003C1480007E133FB414005CEB01FEEBFFFC6C5B5C001F5B000790C7FC1A467CB32C>I< -EA7FE0487EA3127F1201AA91381FFFF04A13F8A36E13F0913800FE004A5A4A5A4A5A4A5A -4A5A4A5A4AC7FC14FEEBF1FC13F3EBF7FE90B5FCA2EC9F80EC0FC001FE7FEBFC07496C7E -496C7E811400157E811680151F3A7FFFC0FFFCB500E113FEA36C01C013FC27337EB22C> -I<387FFFE0B57EA37EEA0003B3B3A5007FB61280B712C0A36C158022337BB22C>I<3A7F -83F007E09039CFFC1FF83AFFDFFE3FFCD87FFF13FF91B57E3A07FE1FFC3E01FCEBF83F49 -6C487E01F013E001E013C0A301C01380B33B7FFC3FF87FF0027F13FFD8FFFE6D13F8D87F -FC4913F0023F137F2D2481A32C>I<397FF01FE039FFF87FFC9038F9FFFE01FB7F6CB6FC -00019038F03F80ECC01F02807FEC000F5B5BA25BB3267FFFE0B5FCB500F11480A36C01E0 -140029247FA32C>I<EB07FCEB1FFF017F13C048B512F048803907FC07FC390FF001FE48 -486C7E0180133F003F158090C7121F007EEC0FC0A348EC07E0A76C140F007E15C0A2007F -141F6C15806D133F6C6CEB7F006D5B6C6C485A3907FC07FC6CB55A6C5C6C6C13C0011F90 -C7FCEB07FC23247CA32C>I<397FF01FE039FFF8FFF801FB13FE90B6FC6C158000019038 -F07FC09138801FE091380007F049EB03F85BED01FC491300A216FE167EA816FE6D14FCA2 -ED01F86D13036DEB07F0150F9138801FE09138E07FC091B51280160001FB5B01F813F8EC -3FC091C8FCAD387FFFE0B57EA36C5B27367FA32C>I<D87FFEEB3FC0B53801FFF0020713 -F8021F13FC6C5B39003F7FE1ECFF019138FC00F84A13704A13005CA25C5CA391C8FCAF00 -7FB512E0B67EA36C5C26247EA32C>114 D<90387FF8700003B512F8120F5A5A387FC00F -387E00034813015AA36CEB00F0007F140013F0383FFFC06C13FE6CEBFF80000314E0C66C -13F8010113FCEB0007EC00FE0078147F00FC143F151F7EA26C143F6D133E6D13FE9038F0 -07FC90B5FC15F815E000F8148039701FFC0020247AA32C>I<131E133FA9007FB6FCB712 -80A36C1500D8003FC8FCB1ED03C0ED07E0A5EC800F011FEB1FC0ECE07F6DB51280160001 -035B6D13F89038003FE0232E7EAD2C>I<3A7FF003FF80486C487FA3007F7F0001EB000F -B3A3151FA2153F6D137F3900FE03FF90B7FC6D15807F6D13CF902603FE07130029247FA3 -2C>I<3A7FFF01FFFCB514FE148314016C15FC3A03E0000F80A26D131F00011500A26D5B -0000143EA26D137E017C137CA2017E13FC013E5BA2EB3F01011F5BA21483010F5BA214C7 -01075BA214EF01035BA214FF6D90C7FCA26D5A147C27247EA32C>I<D87FFFEB7FFF6EB5 -FCB515806C16004A7ED807C0EB01F0A66C6C495AA3143E147FA2D801F0495AECFF87A214 -F7A201F113C700005D9038F9E3CFA201FB13EFA3D97BC190C7FC017F13FFA21480A2013F -5B90381F007C29247FA32C>I<3A3FFF03FFF048018713F8A36C010313F03A00FC007E00 -5D90387E01F8013F5BEB1F83EC87E090380FCFC0903807EF80EB03FF6D90C7FC5C6D5A14 -7C14FE130180903803EF80903807CFC0EB0FC7EC83E090381F01F0013F7FEB7E00017C13 -7C49137E0001803A7FFF01FFFC1483B514FE6C15FC140127247EA32C>I<3A7FFF01FFFC -B5008113FE148314816C010113FC3A03E0000F806C7E151F6D140012005D6D133E137C01 -7E137E013E137CA2013F13FC6D5BA2EB0F815DA2EB07C1ECC3E0A2EB03E3ECE7C0130114 -F75DEB00FFA292C7FC80A2143EA2147E147CA214FC5CA2EA0C01003F5BEA7F83EB87E0EA -7E0F495A387FFF806C90C8FC6C5A6C5AEA07E027367EA32C>I<003FB612E04815F0A400 -7EC7EA1FE0ED3FC0ED7F80EDFF004A5A003C495AC7485A4A5A4A5A4A5A4A5A4AC7FCEB01 -FC495AEB0FF0495A495A495A49C8FC4848EB01E04848EB03F0485A485A485A485A485AB7 -FCA46C15E024247DA32C>I<15FF02071380141F147F91B512004913C04AC7FCEB03F85C -B31307EB1FE013FF007F5BB55A49C8FC6D7E6C7FC67F131FEB07F01303B380EB01FEECFF -C06D13FF6E1380141F14070200130021417BB92C>I<EA7FC0EAFFF813FE6D7E6C7FC67F -131FEB07F01303B380EB01FEECFFC06D13FF6E1380141F147F91B512004913C04AC7FCEB -03F85CB31307EB1FE013FF007F5BB55A49C8FC13F8EA7FC021417BB92C>125 -D E +D87FFCEB7FF8486CEBFFFCA36C48EB7FF8D807C0EB1F80153FED7F00157E5D4A5A14034A +5A5D4A5A4A5A143F4AC7FC147E5CEBC1F813C3EBC7FCA2EBCFFEEBDFBEEBFFBF141F01FE +7F496C7E13F86E7EEBF00301E07FEBC001816E7EA2157E153E153F811680ED0FC0A2ED07 +E0D87FFCEB1FFC486CEB3FFEA36C48EB1FFC27337EB22C>I<387FFFE0B57EA36C5BD803 +F0C8FCB3AE16F0ED01F8A8007FB6FCB7FCA36C15F025337DB22C>I<D87FE0EB0FFC486C +EB1FFEA26D133F007F15FC000F15E001BC137BA4019E13F3A3EB9F01A2018F13E3A21483 +A2018713C314C7A201831383A214EFA201811303A214FFEB80FEA3147C14381400ACD87F +F0EB1FFC486CEB3FFEA36C48EB1FFC27337EB22C>I<D87FF0EB7FFC486CEBFFFEA27F00 +7FEC7FFCD807FEEB07C013DEA213DF13CFA2148013C714C0A213C314E0A213C114F0A213 +C014F8A2147CA3143EA2141E141FA2140F1587A2140715C7A2140315E71401A215F71400 +A215FFD87FFC137F487E153FA26C48EB1F8027337EB22C>I<EB7FFF0003B512E0000F14 +F848804880EBE003EB800048C7127FA2007E80A300FE158048141FB3A86C143FA2007E15 +00A3007F5CA26C6C13FEEBF00790B5FC6C5C6C5C000314E0C66C90C7FC21357BB32C>I< +007FB512C0B612F88115FF6C15802603F00013C0153FED0FE0ED07F0A2150316F81501A6 +150316F01507A2ED0FE0ED3FC015FF90B61280160015FC5D15C001F0C8FCB0387FFF80B5 +7EA36C5B25337EB22C>I<EB7FFF0003B512E0000F14F848804880EBF007EB800048C712 +7FA2007E80A300FE158048141FB3A7EB01F0EB03F800FE143F267E01FC1300A2EB00FE00 +7F5C147FD83F8013FEEBF03F90B5FC6C5C6C5C000314E0C67E90380007F0A26E7EA26E7E +A26E7EA2157FA2153E21407BB32C>I<387FFFFCB67E15E015F86C803907E007FE1401EC +007F6F7E151FA26F7EA64B5AA2153F4BC7FCEC01FE140790B55A5D15E081819038E007FC +EC01FE1400157F81A8160FEE1F80A5D87FFEEB1FBFB5ECFF00815E6C486D5AC8EA01F029 +347EB22C>I<90381FF80790B5EA0F804814CF000714FF5A381FF01F383FC003497E48C7 +FC007E147F00FE143F5A151FA46CEC0F00007E91C7FC127F7FEA3FE0EA1FFCEBFFC06C13 +FC0003EBFFC06C14F06C6C7F01077F9038007FFEEC07FF02001380153FED1FC0A2ED0FE0 +A20078140712FCA56CEC0FC0A26CEC1F806D133F01E0EB7F009038FE01FF90B55A5D00F9 +14F0D8F83F13C0D8700790C7FC23357CB32C>I<007FB612FCB712FEA43AFC007E007EA7 +0078153CC71400B3AF90383FFFFCA2497F6D5BA227337EB22C>I<3B7FFF803FFFC0B56C +4813E0A36C496C13C03B03F00001F800B3AF6D130300015DA26D130700005D6D130F017F +495A6D6C485AECE0FF6DB5C7FC6D5B010313F86D5B9038003F802B3480B22C>I<D87FFC +EB7FFC486CEBFFFEA36C48EB7FFCD80FC0EB07E06D130F000715C0A36D131F00031580A3 +6D133F00011500A36D5B0000147EA4017E5BA46D485AA490381F83F0A4010F5B14C7A301 +075BA214EFA201035BA214FFA26D90C7FCA46D5A27347EB22C>I<3A3FFF03FFE0484913 +F0148714076C6D13E03A01F800FE007F0000495A13FE017E5BEB7F03013F5B1487011F5B +14CF010F5B14FF6D5BA26D90C7FCA26D5AA26D5AA2497EA2497EA2497F81EB0FCF81EB1F +C7EC87F0EB3F83EC03F8EB7F01017E7FEBFE00497F0001147E49137F000380491480151F +D87FFEEBFFFC6D5AB514FE6C15FC497E27337EB22C>88 D<D87FFCEB7FFC486CEBFFFEA3 +6C48EB7FFCD807F0EB0FC0151F000315806D133F12016DEB7F0012006D137E017E13FE01 +7F5BEB3F01EC81F8131FEC83F0EB0FC314C7903807E7E0A201035B14EF6DB45AA292C7FC +7F5C147EB0903807FFE0497FA36D5B27337EB22C>I<003FB612C04815E0A4007EC7EA1F +C0ED3F80A2ED7F00157E15FE4A5A003C5CC712034A5AA24A5A4A5AA24A5A4AC7FCA214FE +495AA2495A495AA2495A495AA2495A49C8FCA213FE485AA24848EB03C049EB07E0120748 +5A5B121F485AA248C7FCB7FCA46C15C023337CB22C>I<007FB6FCB71280A46C15002106 +7B7D2C>95 D<3801FFF0000713FE001F6D7E15E048809038C01FF81407EC01FC381F8000 +0006C77EC8127EA3ECFFFE131F90B5FC1203120F48EB807E383FF800EA7FC090C7FC12FE +5AA47E007F14FEEB8003383FE01F6CB612FC6C15FE6C14BF0001EBFE1F3A003FF007FC27 +247CA32C>97 D<EA7FF0487EA3127F1201AAEC1FE0ECFFF801FB13FE90B6FC16809138F0 +7FC09138801FE091380007F049EB03F85BED01FC491300A216FE167EA816FE6D14FCA2ED +01F86D13036DEB07F0150F9138801FE09138E07FC091B51280160001FB5B01F813F83900 +F03FC027337FB22C>I<903803FFE0011F13F8017F13FE48B5FC48804848C6FCEA0FF048 +5A49137E4848131890C9FC5A127EA25AA8127EA2127F6C140F6DEB1F806C7E6D133F6C6C +EB7F003907FE03FF6CB55A6C5C6C6C5B011F13E0010390C7FC21247AA32C>I<EC0FFE4A +7EA380EC003FAAEB07F8EB3FFE90B512BF4814FF5A3807FC0F380FF00348487E497E4848 +7F90C7FC007E80A212FE5AA87E007E5CA2007F5C6C7E5C6C6C5A380FF0073807FC1F6CB6 +12FC6CECBFFE6C143FEB3FFC90390FF01FFC27337DB22C>I<EB03FE90381FFFC0017F13 +F048B57E48803907FE03FE390FF800FFD81FE0EB3F805B4848EB1FC090C7120F5A007E15 +E015075AB7FCA416C000FCC9FC7E127EA2127F6CEC03C06DEB07E06C7ED80FF0130F6C6C +EB3FC001FF13FF000190B512806C1500013F13FC010F13F00101138023247CA32C>I<EC +0FF8EC3FFE91B5FC4914805B903807FC7F14F090390FE03F0014C092C7FCA6007FB512FE +B7FCA36C5C26000FC0C7FCB3A8003FB512F04880A36C5C21337DB22C>I<ED03F8903907 +F80FFC90391FFE3FFE017FB6FC48B7FC48ECFE7F9038FC0FF82607F003133E3A0FE001FC +1CD9C0001300001F8049137EA66D13FE000F5CEBE0016C6C485A3903FC0FF048B5FC5D48 +1480D99FFEC7FCEB87F80180C8FCA37F6C7E90B512F06C14FE48ECFF804815E04815F03A +3FC0001FF848C7EA03FC007E1400007C157C00FC157E48153EA46C157E007E15FCD87F80 +1303D83FE0EB0FF8D81FFCEB7FF06CB612E0000315806C1500D8003F13F8010713C02838 +7EA42C>I<EA7FF0487EA3127F1201AAEC1FE0EC7FFC9038F9FFFE01FB7F90B6FC9138F0 +3F80ECC01F02807FEC000F5B5BA25BB3267FFFE0B5FCB500F11480A36C01E0140029337F +B22C>I<1307EB1FC0A2497EA36D5AA20107C7FC90C8FCA7387FFFC080B5FC7EA2EA0007 +B3A8007FB512FCB612FEA36C14FC1F3479B32C>I<140EEC3F80A2EC7FC0A3EC3F80A2EC +0E0091C7FCA748B512804814C0A37EC7120FB3B3A2141F003C1480007E133FB414005CEB +01FEEBFFFC6C5B5C001F5B000790C7FC1A467CB32C>I<EA7FE0487EA3127F1201AA9138 +1FFFF04A13F8A36E13F0913800FE004A5A4A5A4A5A4A5A4A5A4A5A4AC7FC14FEEBF1FC13 +F3EBF7FE90B5FCA2EC9F80EC0FC001FE7FEBFC07496C7E496C7E811400157E811680151F +3A7FFFC0FFFCB500E113FEA36C01C013FC27337EB22C>I<387FFFE0B57EA37EEA0003B3 +B3A5007FB61280B712C0A36C158022337BB22C>I<3A7F83F007E09039CFFC1FF83AFFDF +FE3FFCD87FFF13FF91B57E3A07FE1FFC3E01FCEBF83F496C487E01F013E001E013C0A301 +C01380B33B7FFC3FF87FF0027F13FFD8FFFE6D13F8D87FFC4913F0023F137F2D2481A32C +>I<397FF01FE039FFF87FFC9038F9FFFE01FB7F6CB6FC00019038F03F80ECC01F02807F +EC000F5B5BA25BB3267FFFE0B5FCB500F11480A36C01E0140029247FA32C>I<EB07FCEB +1FFF017F13C048B512F048803907FC07FC390FF001FE48486C7E0180133F003F158090C7 +121F007EEC0FC0A348EC07E0A76C140F007E15C0A2007F141F6C15806D133F6C6CEB7F00 +6D5B6C6C485A3907FC07FC6CB55A6C5C6C6C13C0011F90C7FCEB07FC23247CA32C>I<39 +7FF01FE039FFF8FFF801FB13FE90B6FC6C158000019038F07FC09138801FE091380007F0 +49EB03F85BED01FC491300A216FE167EA816FE6D14FCA2ED01F86D13036DEB07F0150F91 +38801FE09138E07FC091B51280160001FB5B01F813F8EC3FC091C8FCAD387FFFE0B57EA3 +6C5B27367FA32C>I<D87FFEEB3FC0B53801FFF0020713F8021F13FC6C5B39003F7FE1EC +FF019138FC00F84A13704A13005CA25C5CA391C8FCAF007FB512E0B67EA36C5C26247EA3 +2C>114 D<90387FF8700003B512F8120F5A5A387FC00F387E00034813015AA36CEB00F0 +007F140013F0383FFFC06C13FE6CEBFF80000314E0C66C13F8010113FCEB0007EC00FE00 +78147F00FC143F151F7EA26C143F6D133E6D13FE9038F007FC90B5FC15F815E000F81480 +39701FFC0020247AA32C>I<131E133FA9007FB6FCB71280A36C1500D8003FC8FCB1ED03 +C0ED07E0A5EC800F011FEB1FC0ECE07F6DB51280160001035B6D13F89038003FE0232E7E +AD2C>I<3A7FF003FF80486C487FA3007F7F0001EB000FB3A3151FA2153F6D137F3900FE +03FF90B7FC6D15807F6D13CF902603FE07130029247FA32C>I<3A7FFF01FFFCB514FE14 +8314016C15FC3A03E0000F80A26D131F00011500A26D5B0000143EA26D137E017C137CA2 +017E13FC013E5BA2EB3F01011F5BA21483010F5BA214C701075BA214EF01035BA214FF6D +90C7FCA26D5A147C27247EA32C>I<D87FFFEB7FFF6EB5FCB515806C16004A7ED807C0EB +01F0A66C6C495AA3143E147FA2D801F0495AECFF87A214F7A201F113C700005D9038F9E3 +CFA201FB13EFA3D97BC190C7FC017F13FFA21480A2013F5B90381F007C29247FA32C>I< +3A3FFF03FFF048018713F8A36C010313F03A00FC007E005D90387E01F8013F5BEB1F83EC +87E090380FCFC0903807EF80EB03FF6D90C7FC5C6D5A147C14FE130180903803EF809038 +07CFC0EB0FC7EC83E090381F01F0013F7FEB7E00017C137C49137E0001803A7FFF01FFFC +1483B514FE6C15FC140127247EA32C>I<3A7FFF01FFFCB5008113FE148314816C010113 +FC3A03E0000F806C7E151F6D140012005D6D133E137C017E137E013E137CA2013F13FC6D +5BA2EB0F815DA2EB07C1ECC3E0A2EB03E3ECE7C0130114F75DEB00FFA292C7FC80A2143E +A2147E147CA214FC5CA2EA0C01003F5BEA7F83EB87E0EA7E0F495A387FFF806C90C8FC6C +5A6C5AEA07E027367EA32C>I<003FB612E04815F0A4007EC7EA1FE0ED3FC0ED7F80EDFF +004A5A003C495AC7485A4A5A4A5A4A5A4A5A4AC7FCEB01FC495AEB0FF0495A495A495A49 +C8FC4848EB01E04848EB03F0485A485A485A485A485AB7FCA46C15E024247DA32C>I +E +%EndDVIPSBitmapFont +%DVIPSBitmapFont: Fd ecbx1000 10 57 +/Fd 57 122 df<913A03FF8007FE027F9039F07FFF800103B500FDB512E0010F903A00FF +FE0FF0D93FF8ECF81F90267FE0019038F03FF849485A4816E014804816C00200ED1FF081 +F007C06F91C7FCA8B912E0A4000390C701C0C7FCB3ABB5D8FC3FEBFF80A43D3A7EB938> +27 D<12E07E127C7E7E7F6C7E6C7E12037F6C7E7F12007F137E137FA2EB3F80A214C013 +1F14E0A2130F14F0A4EB07F8A514FCB114F8A5EB0FF0A414E0131FA214C0133F1480A2EB +7F00A2137E13FE5B12015B485A5B1207485A485A90C7FC123E5A12F05A16537BBD25>41 +D<B61280A819087F9620>45 D<EA0F80EA3FE0EA7FF0A2EAFFF8A5EA7FF0A2EA3FE0EA0F +800D0D798C1B>I<141E143E14FE1307137FB5FCA3138FEA000FB3B3A5007FB61280A421 +3679B530>49 D<EB0FFE90387FFFC048B512F0000714FC390FE03FFF261F800F1380263F +000313C0D87F8014E0EBE00100FF6D13F07FA2ED7FF8A46C5A6C5A0006C7FCC8FCEDFFF0 +A216E05C16C04A138016004A5A4A5AEC1FF05D4A5A4AC7FC14FE495AD903F01378495A49 +5A495A49C712F8017C14F05B49130148B6FC5A5A5A5A5A4815E0B7FCA425367BB530>I< +EB03FF011F13F0017F13FC3901FC07FF2603F003138048486C13C0496C13E0EA0FF86D14 +F0487EA66C4814E06C5A6C485AC714C04A138016004A5A4A5AEC3FF090380FFFC05D15F0 +90380007FE913801FF806E13C016E0ED7FF016F8ED3FFCA216FEEA1FC0487E487E487EA4 +16FCA249137F007F15F801C0EBFFF06C5A6C6C4813E0260FFC0713806CB61200000114FC +6C6C13F0010790C7FC27377CB530>I<ED07C0150FA2151F153F157F15FF5CA25C5C5C5C +143E143C5C5C1301495A5C495A495A5B133E5B13785B485A1203485A5B48C7FC121E5A12 +7C5AB81280A4C70001EBC000AA0103B61280A429367DB530>I<001C15C0D81F80130701 +F8137F90B61280A216005D5D15F05D15804AC7FC14F090C9FCA7EB03FE90381FFFE0017F +13F89038FE07FC9038F003FFD9C0011380496C13C090C7FC000E15E0C8127F16F0A216F8 +A3121FEA3FC0487E12FF7FA316F05B15FFD87F8014E0007EC713C0003E5B003F4913806C +6C481300390FF01FFE6CB512F8000114E06C6C1380D90FF8C7FC25377BB530>I<EC0FF8 +ECFFFE0103EBFF8090390FF80FC090393FE003E090397F8001F09038FF000F48EC1FF848 +48133F485A120F5B121FA2003FEC1FF0ED0FE0484890C7FCA31408EC7FF039FFF1FFFC01 +F313FFD9F78013809039FF007FC049EB3FE04914F0ED1FF85B16FCA34914FEA4127FA512 +3F16FCA26C7E16F8000F143F6D14F0000715E06C6CEB7FC03A01FF81FF806C90B5120001 +3F13FC010F13F00101138027377CB530>I<123C123EEA3FE090B71280A41700485D5E5E +5E5EA2007CC7EA0FC000784A5A4BC7FC00F8147E485C5D14014A5AC7485A4A5AA24A5A14 +3F4AC8FCA214FEA213015C1303A21307A2130F5CA2131FA5133FA96D5A6D5A6D5A29397B +B730>I<49B47E010F13F0013F13FC9038FE01FF3A01F8007F804848EB3FC04848EB1FE0 +150F484814F01507121FA27F7F7F6D130F01FF14E014C09138E01FC06CEBF83F9138FE7F +806C9038FFFE005D6C14F06C14FC6C14FF6D14806D14C090B612E0D803FD14F02607F07F +13F848487E261FC00F13FC383F8003007F010013FE90C7127F151F00FE140715031501A2 +1500A216FC7E6C14016D14F86C6C13036DEB07F06C6CEB0FE0D80FFEEB7FC00003B61200 +C614FC013F13F00103138027377CB530>I<EB03FF011F13E0017F13F83901FF01FE4848 +6C7E4848EB7F80484814C0001FEC3FE0485AED1FF0127F16F8A212FF16FCA416FEA5007F +143FA3123F157F6C7E000F14FF6C6C5A3903FE03DF6CB5129F6C6C131FD91FFC13FCEB00 +201400A3D80FE0EB3FF8487E486C14F0A216E0157F16C0EDFF80495A6C48481300903880 +07FE390FE01FF86CB55A6C14C0C691C7FCEB1FF027377CB530>I<ED03E04B7EA24B7EA3 +4B7EA24B7EA34B7EA292B57EA34A8015F302038015E1A202078015C0020F80ED807FA202 +1F80ED003F4A80023E131FA2027E80027C7F02FC814A7FA20101824A7F49B77EA3498202 +C0C7FC010F824A147FA2011F8291C8123F4982013E151FA2017E82017C8101FE83B500F8 +0107B61280A4413A7DB948>65 D<B812C017FC17FF18C028007FF000037F04007F717E71 +7E171F84A2717EA74D5AA260173F4D5A4D5A4C13C0040F5B91B600FCC7FCA2EFFF8002F0 +C713F0EF3FF8717E717E717E19807113C0A319E0A719C0A25F4D138019005FEF7FFE4C48 +5AB912F018C095C7FC17F03B397DB844>I<DB3FFCEB01C00203B5EAC003021FECF00791 +B6EAFC0F01039039FC00FF3F4901C0EB1FFFD91FFEC77E49481403D97FF080494880485B +48177F4849153F4890C9FC181F485A180F123F5B1807127FA24993C7FC12FFAD127F7FF0 +03C0123FA27F001F1707A26C6C1780180F6C6D16006C6D5D6C173E6C6D157ED97FF85D6D +6C4A5A6DB44A5A010701C0EB0FE06D01FCEBFF80010090B548C7FC021F14F8020314E091 +26003FFEC8FC3A3B7BB945>I<B87E17F817FF18C028007FF8000713F09338007FF8EF1F +FE717E050313807113C0A27113E0F07FF0A2F03FF8A219FC181FA219FEA419FFAC19FEA4 +19FC183FA219F8187F19F0F0FFE0A24D13C04D13804D1300EF1FFEEF7FFC933807FFF0B9 +12C095C7FC17FC178040397DB849>I<B912F0A426007FF8C7FCEF1FF8170717031701A2 +1700A21878A3043C137C183CA41800167CA216FC150391B5FCA4ECF8031500167CA2163C +180FA3181EA293C7FCA2183EA2183C187CA218FCA2EF01F81703170F173FEE01FFB9FC18 +F0A338397DB83F>I<B912C0A43A007FF800039338007FE0171F170F1707A21703A21701 +A318F0EE7800A41800A216F8A21501150791B5FCA4ECF80715011500A21678A693C8FCAD +B7FCA434397DB83C>I<B6D8FC03B612F0A426007FF8C70001EBE000B3A391B8FCA402F8 +C71201B3A6B6D8FC03B612F0A444397DB84B>72 D<B612FCA439007FF800B3B3ADB612FC +A41E397DB824>I<B7FCA426007FF8C9FCB3ACEF0780A5170F1800A35FA25FA25F5F5E5E +EE0FFE167FB8FCA431397DB839>76 D<B500F80403B512F06E5EA26E5ED8007FF1E000A2 +D97BFF161EA201796D5DA201786D5DA26E6C5DA36E6C4A5AA26E6C4A5AA26E6C4A5AA26E +6C4A5AA26E6C141EA36E6D5BA26E6D5BA26F6C5BA26F6C485AA36F6C485AA26F6C485AA2 +6F6C48C7FCA2923803FF1EA36F13BCA26F13F8A2705AA2705AA213FCB500FC6D4848B612 +F0A2EE0F80EE070054397DB85B>I<B500FC0203B512F0A28080C66C6D90390003F0006F +6E5A81017B7F13798101787F6E7E6E7E6E7F6E7FA26E7F6E7F6E7F6E7F6F7E153F826F13 +806F13C06F13E06F13F06F13F88117FCEE7FFEEE3FFF7013817013C17013E18218F17013 +F97013FDEF7FFF8383A28383838383187FA2183F181F01FC160FB500FC150718031801A2 +44397DB84B>I<EDFFF8020FEBFF80027F14F0903A01FFC01FFC010790380007FFD91FFC +010113C0D93FF06D6C7E49486E7E49486E7E48496E7E48834890C86C7EA248486F1380A2 +48486F13C0A2003F18E0A348486F13F0A400FF18F8AC007F18F06D5DA3003F18E0A26D5D +001F18C0A26C6C4B13806C18006E5C6C6D4A5A6C5F6C6D4A5A6D6C4A5AD93FFC49485A6D +B401075B0107D9C01F90C7FC010190B512FC6D6C14F0020F1480020001F8C8FC3D3B7BB9 +48>I<B8FC17F017FEEFFF8028007FF8000F13C0040113E07013F0EF7FF8EF3FFCA2EF1F +FEA218FFA818FEA2EF3FFCA2EF7FF8EFFFF04C13E0040F13C091B7120017FC17E002F8C9 +FCB3A4B612FCA438397DB841>I<B712FCEEFFE017FC17FF28007FF8000F13C004017F70 +7F717E717EA2717EA284A760A24D5A604D5A4D5A04035B041F90C8FC91B612FC17E08391 +39F8003FFCEE0FFF707F707F8284A2707FA584A51A601AF084177F1901DD3FFE13E0B600 +FC011F130394390FFF87C071EBFF8005011400CBEA1FFC443A7DB848>82 +D<D907FF130E013FEBE01E90B5EAF83E0003ECFE7E3A07FC01FFFE390FF0001F4848130F +48481303491301007F140090C8FC167E5A163EA27F161E7F7F6D91C7FC13FC387FFFE014 +FEECFFF06C14FE6F7E6C816C15F06C816C81C681133F010F801301D9000F1480EC007F03 +0F13C01503818100F0157FA3163FA27E17807E167F6C16007E6D14FE01E0495A01F81303 +9039FF801FF800FC90B512E0D8F83F5CD8F00749C7FC39E0007FF02A3B7BB935>I<003F +B91280A4D9F800EBF003D87FC09238007FC049161F007EC7150FA2007C1707A200781703 +A400F818E0481701A4C892C7FCB3AE010FB7FCA43B387DB742>I<B600FC011FB512C0A4 +26007FF8C8381FC000725AB3B3181F013F94C7FC8060011F163E6D6C157E187C6D6C15FC +6D6D495A6D6DEB07F06D01F0EB1FE0DA7FFEEBFFC0021FB6C8FC02075C020014F0030F13 +80423A7DB849>I<B600F00103B512E0A4C601F0C83807F0006E5E017F5F6E150FA2013F +5F6E151F011F94C7FC6E5D6D163E6F147E6D167CA26F14FC6D5E6F13016D5E6F13036D5E +811707027F5D6F130F023F5D6F131F021F92C8FC815F6E143EEE807E6E147CEEC0FC6E5C +16E016E16E5C16F36E5C16FF6F5BA36F5BA26F90C9FCA26F5AA36F5AA26F5AA26F5A433A +7EB848>I<B6D8E01FB500FC90383FFFFCA4000101F0C7D83FFCC8EA7E006C71153C171F +6E197C017F701578836E7014F8013F6F5E6E1801011F4B6D5CA26E18036D4B6D5CA26D6D +496D495A173C6F170F6D037C6D91C7FCEF787F6F5F6D4B6C6C131E816D02016E5BEFE01F +03F8177C027F01036E13784D7E03FCEE80F8023F49486C5C15FE021F010FEDC1E04D7E03 +FF16C36E49EDE3C0041E7F049E15F76E01BC6D5C04FC15FF6E95C8FC4C80A26E5F4C143F +6E5F4C141FA2037F5E4C140FA26F486E5AA2031F5E93C812036F5E5E3A7EB863>I<007F +B5D8F803B512F8A4C66C48C7D80FF0C7FC6D6C5D6D5E6F495A6D6D49C8FC7F6D6D137E6F +5B6DEBF8016D5D6F485A6E6C485A023F130FDA1FFF5BEE9F806E01FFC9FC805E6E5B6E5B +80826F7E153F826F7F5D4B7F92B57EA2DA01F97FDA03F17F03F07F913807E07FDA0FC07F +021F6D7E4B7E4A486C7F027E8102FE6D7F4A7F49488149486D7F0107804A6E7E49488149 +486E7E013F81017F83B60107B61280A441397DB848>I<EB3FFE0003B512E0000F14F839 +1FF00FFE003FEB03FF6D6C7F6E7FA26F7EA26C5A6C5AEA0380C8FCA2EC3FFF010FB5FC13 +7F3901FFF87F00071380380FFE00EA3FF85B485A12FF5BA415FF6D5A127F263FF00713F8 +3B1FFC1FBFFFC0390FFFFE1F0003EBF80F39003FE0032A257DA42E>97 +D<13FFB5FCA412077EAF4AB47E020F13F0023F13FC9138FE03FFDAF00013804AEB7FC002 +80EB3FE091C713F0EE1FF8A217FC160FA217FEAA17FCA3EE1FF8A217F06E133F6EEB7FE0 +6E14C0903AFDF001FF80903AF8FC07FE009039F03FFFF8D9E00F13E0D9C00390C7FC2F3A +7EB935>I<903801FFC0010F13FC017F13FFD9FF8013802603FE0013C048485AEA0FF812 +1F13F0123F6E13804848EB7F00151C92C7FC12FFA9127FA27F123FED01E06C7E15036C6C +EB07C06C6C14806C6C131FC69038C07E006DB45A010F13F00101138023257DA42A>I<EE +7F80ED7FFFA4150381AF903801FF81010F13F1013F13FD9038FFC07F0003EB001FD807FC +1307000F8048487F5B123FA2485AA312FFAA127FA27F123FA26C6C5B000F5C6C6C5B6C6C +4913C02701FF80FD13FE39007FFFF9011F13E1010113012F3A7DB935>I<903803FF8001 +1F13F0017F13FC3901FF83FE3A03FE007F804848133F484814C0001FEC1FE05B003FEC0F +F0A2485A16F8150712FFA290B6FCA301E0C8FCA4127FA36C7E1678121F6C6C14F86D14F0 +00071403D801FFEB0FE06C9038C07FC06DB51200010F13FC010113E025257DA42C>I<EC +1FF0903801FFFC010713FF90391FF87F8090383FE0FFD9FFC113C0A2481381A24813016E +1380A2ED3E0092C7FCA8B6FCA4000390C8FCB3ABB512FEA4223A7DB91D>I<161FD907FE +EBFFC090387FFFE348B6EAEFE02607FE07138F260FF801131F48486C138F003F15CF4990 +387FC7C0EEC000007F81A6003F5DA26D13FF001F5D6C6C4890C7FC3907FE07FE48B512F8 +6D13E0261E07FEC8FC90CAFCA2123E123F7F6C7E90B512F8EDFF8016E06C15F86C816C81 +5A001F81393FC0000F48C8138048157F5A163FA36C157F6C16006D5C6C6C495AD81FF0EB +07FCD807FEEB3FF00001B612C06C6C91C7FC010713F02B377DA530>I<13FFB5FCA41207 +7EAFED7FC0913803FFF8020F13FE91381F03FFDA3C01138014784A7E4A14C05CA25CA291 +C7FCB3A3B5D8FC3F13FFA4303A7DB935>I<EA01F0EA07FC487EA2487EA56C5AA26C5AEA +01F0C8FCA913FF127FA412077EB3A9B512F8A4153B7DBA1B>I<141FEC7FC0ECFFE0A249 +13F0A56D13E0A2EC7FC0EC1F0091C7FCA9EC0FF0EB0FFFA4EB007F143FB3B0121FEA3F80 +EA7FC0EAFFE0EC7FE0A215C014FF6C481380903883FE006CB45A000F13F0000113801C4B +86BA1D>I<13FFB5FCA412077EAF92380FFFE0A4923803FC0016F0ED0FE0ED1F804BC7FC +157E5DEC03F8EC07E04A5A141FEC7FE04A7E8181A2ECCFFEEC0FFF496C7F806E7F6E7F82 +157F6F7E6F7E82150F82B5D8F83F13F8A42D3A7EB932>I<13FFB5FCA412077EB3B3ACB5 +12FCA4163A7DB91B>I<01FED97FE0EB0FFC00FF902601FFFC90383FFF80020701FF90B5 +12E0DA1F81903983F03FF0DA3C00903887801F000749DACF007F00034914DE6D48D97FFC +6D7E4A5CA24A5CA291C75BB3A3B5D8FC1FB50083B512F0A44C257DA451>I<01FEEB7FC0 +00FF903803FFF8020F13FE91381F03FFDA3C011380000713780003497E6D4814C05CA25C +A291C7FCB3A3B5D8FC3F13FFA430257DA435>I<903801FFC0010F13F8017F13FFD9FF80 +7F3A03FE003FE048486D7E48486D7E48486D7EA2003F81491303007F81A300FF1680A900 +7F1600A3003F5D6D1307001F5DA26C6C495A6C6C495A6C6C495A6C6C6CB45A6C6CB5C7FC +011F13FC010113C029257DA430>I<9039FF01FF80B5000F13F0023F13FC9138FE07FFDA +F00113800003496C13C00280EB7FE091C713F0EE3FF8A2EE1FFCA3EE0FFEAA17FC161FA2 +17F8163F17F06E137F6E14E06EEBFFC0DAF00313809139FC07FE0091383FFFF8020F13E0 +020390C7FC91C9FCACB512FCA42F357EA435>I<9038FE03F000FFEB0FFEEC3FFF91387C +7F809138F8FFC000075B6C6C5A5CA29138807F80ED3F00150C92C7FC91C8FCB3A2B512FE +A422257EA427>114 D<90383FF0383903FFFEF8000F13FF381FC00F383F0003007E1301 +007C130012FC15787E7E6D130013FCEBFFE06C13FCECFF806C14C06C14F06C14F81203C6 +14FC131F9038007FFE140700F0130114007E157E7E157C6C14FC6C14F8EB80019038F007 +F090B512C000F8140038E01FF81F257DA426>I<130FA55BA45BA25B5BA25A1207001FEB +FFE0B6FCA3000390C7FCB21578A815F86CEB80F014816CEBC3E090383FFFC06D13809038 +03FE001D357EB425>I<01FFEC3FC0B5EB3FFFA4000714016C80B3A35DA25DA26C5C6E48 +13E06CD9C03E13FF90387FFFFC011F13F00103138030257DA435>I<B539F001FFF8A400 +0390C7EA1F00161E6E133E6C153C6E137C6C15786E13F8017F5CECF001013F5C14F8011F +495AA2ECFC07010F5CECFE0F010791C7FC6E5A6D131E15BE6D13BC15FC6D5BA36E5AA26E +5AA26E5AA26E5AA22D257EA432>I<B500F1B538803FFFA43D07FE000FF80003E06C6C01 +0715C082028015076C6E6C148015076C01C0ED0F00826E485C017FED801E5D90273FF01E +7F5B17C0DAF83E147C011F90393C3FE078037C14F8903B0FFC781FF0F0A29139FEF00FF1 +0107EDF9E002FF14FB6D496CB45AA24B7E6D5EA26D496C90C7FCA292C7FC6E5CA2023E14 +7C023C143C40257EA445>I<B539F01FFFF0A4000390398003F8006C01C013E06C1407D9 +7FE05B6D6C485A6E48C7FC90381FFC3E010F5B903807FEFC6D6C5A5D6D5B6D5B6E7E6E7E +814A7EA24A7E903801F3FFD903E37FD907C17FEB0FC049486C7E4A6C7E013E80496D7E49 +130F00016E7EB590383FFFF8A42D257EA432>I<B539F001FFF8A4000390C7EA1F00161E +6E133E6C153C6E137C6C15786E13F8017F5CECF001013F5C14F8011F495AA2ECFC07010F +5CECFE0F010791C7FC6E5A6D131E15BE6D13BC15FC6D5BA36E5AA26E5AA26E5AA26E5AA2 +92C8FCA25C141E003F133E387F803C38FFC07C147814F8EBC1F0EBC3E06C485A387D1F80 +D83FFFC9FCEA1FFCEA07F02D357EA432>I E %EndDVIPSBitmapFont %DVIPSBitmapFont: Fe ecbx1440 14.4 41 /Fe 41 122 df<DC7FFEECFFC0031FB5D8801F13F092B6D8E07F13FC020703F9B57E021F @@ -734,58 +759,8 @@ A26F5AA26F5AA35E151F93C9FC5D153E157ED81FC0137C487E486C13FC486C5B14015D4A 5A14074A5A6C48485A4948CAFC495A383F81FC6CB45A6C5B000313C0C648CBFC3E4D7DB4 45>121 D E %EndDVIPSBitmapFont -%DVIPSBitmapFont: Ff ecss2074 20.74 10 -/Ff 10 116 df<EAFFC0B3B3B3B3B3B390B912FCA83E7570F456>76 -D<D8FFC0F03FF0B3B3B3B3AD6C6CF07FE0A46C6CF0FFC0A36D5F001F1A80A26C6C4D1300 -A26C6C4D5A6D170F6C616E161F6C6D4C5A6C6D4C5A6E16FF6D6C4B5B6D6C4B5B6D6C4B5B -6D6C6C021F90C7FC6D01E0EC7FFE6D01F849485A6D9026FF801F5B6D91B65A6E5E021F16 -8002074BC8FC020115F86E6C14E0030F91C9FC030013F04C7770F46D>85 -D<91380FFF8049B512F0010F14FC017F14FF48B712C0000782001F824882DAE0007F49C7 -EA3FFE01F8140FD81FC06E7E90C86C1380121E00186F13C0001081CAFCEF7FE0A318F017 -3FAD93B5FC157F0207B6FC143F49B7FC1307011F153F017FEBF80090B512804801F8C7FC -4813C04890C8FCEA0FFC485A485A5B485A5BA248C9FCA5177FA26D15FFA26C6C5C6D5C6D -140F6C6C5C01FF91B5FC6CEBE00791B612BF6CEDFE3F16FC6C15F06C15C06CECFE006C6C -13F0D91FFCC9FC344C77CA4C>97 D<EAFFC0B3B3ADED0FFC92B57E020714E0021F80027F -14FC91B67E01C38101C7829026CFFE0080D9DFF0131FD9FFC001037F4A6D7F49C86C7E49 -153F496F7E170F496F7E5B717E4981A2711380A2187FA219C0183FA419E0181FAD183F19 -C0A3187FA2198018FFA24D1300A25F6D5E17076D4B5A6D151F4D5A6D4B5A6D15FF6D0203 -5B6E495BD9DFE0013F5B9026CFFC01B5C7FC01C7B65A01C35D01C15D01C05D023F14C002 -0F5C020301FCC8FCC8EA3FE03B7C72FA52>I<ED3FFF4AB512F8020F14FF023F15C04A15 -F049B712FC4916FF49178049EBE0004990C7120FD93FFC02011300D97FF06E7E4948151F -0280814890C912034894C7FC5B485A5B120F5B121F5B123F5BA3485AA548CCFCAD6C7EA4 -7F123FA27F121F7FA26C7EA26C6C17806D1601000317036C6C160F6E151F6C01E0ED7FC0 -6D6CEC01FFD93FFC14076DB4143F6DD9E003B512806D90B6EAFE006D5E6D16F06D6C5D6E -1580020F02FCC7FC020114E09126003FFCC8FC3A4C78CA47>I<DB1FE04AB4FC912601FF -FE143F02079026FF8003B5FC4AECC01F023F02F0B6FC4A02FB158091BAFC49EBE01F49D9 -000302FCC7FC49486D01F8C8FC02F89038007F8049486E7E49486E7E4A140F013F824A14 -07A249C86C7EA401FE6F7EAA017F4B5AA46D6C4A5AA26E140F011F5E6E141F6D6C4A5A6D -6C4A5A02FEEB01FF496C4990C9FC499038E01FFE92B55A495D02BF5C020F14C0496C5CD9 -7E0149CAFC9138001FE001FE90CCFCA67FA27F8080EB3FF091B612FE6DEDFFF818FF6D17 -C019F0013F17FC498390BA7E48854801E0C71203480180DA001F7F4848C900037F484816 -0049EF3FF84848171F49717E127F4917078648481703A76D1707007F616D170F003F616D -171FD81FFCEF7FF06C6C4D5A6D5E6C01C003075B6C01F8033F5BC601FF4AB448C7FC6D01 -F0011F5B6D90B75A010F17E00103178001004CC8FC021F15F002031580DA000F01E0C9FC -496D7CC950>103 D<EAFFE0ABC7FCB3A9EA7FE0B3B3B3B30B6F74EE25>105 -D<EAFFC0B3B3B3B3B3B3AF0A7B73FA25>108 D<ED1FF826FFC001B57E020714E0021F14 -F8027F8091B67E01C18101C316809038C7FE00D9CFF0011F13C0D9DFE0010713E0D9FF80 -130191C8FC18F049157F5B173F4916F8A249151FA35BA45BB3B3AC354A72C952>110 -D<91380FFFC091B512FE0107ECFFC0011F15F8017F15FE90B812804817C05A489038F000 -3F4890C70003138049EC007FD81FF8151F491507003F16014992C7FCA2485AA77FA26C7E -7F7F6CB4FC6C13C014F86CEBFF806C14FC6CECFFE06C15FC6D14FF6D15C0010F81010315 -F8010081020F80DA007F7F03071480DB003F13C0160F040313E01600EF7FF0173FA2EF1F -F8A2170FA7EF1FF0A20070163F127C007FEE7FE001C015FF01F0020313C0B5020F138002 -F0137F91B712006C5E001F5E000716F0C65E011F1580010302FCC7FCD9000F13C0354C7C -CA3D>115 D E -%EndDVIPSBitmapFont -%DVIPSBitmapFont: Fg ecrm0700 7 2 -/Fg 2 66 df<13381378EA01F8121F12FE12E01200B3AB487EB512F8A215267BA521>49 -D<140EA2141FA34A7EA3EC6FC0A2ECEFE014C7A290380183F0A390380301F8A201067F14 -00A249137EA2011C137F01187FA24980013FB5FCA2903960000FC0A201E080491307A248 -486D7EA200038115011207D81FC0497ED8FFF890383FFFE0A22B2A7EA931>65 -D E -%EndDVIPSBitmapFont -%DVIPSBitmapFont: Fh ecrm1000 10 80 -/Fh 80 123 df<B81280A2290280962A>21 D<DA0FF813FC91397FFF07FF903B01F807DF +%DVIPSBitmapFont: Ff ecrm1000 10 80 +/Ff 80 123 df<B81280A2290280962A>21 D<DA0FF813FC91397FFF07FF903B01F807DF 83C0903A07E001FF0F903B1F8007FE1FE090393F000FFC137E16F85B9338F00780484801 0790C7FC1503ACB812F8A32801F80003F0C7FCB3AB486C497E267FFFE0B512F0A3333B7F BA30>27 D<EC0FF8EC7FFE903901F80780903907E001C090391F8000E090383F0007017E @@ -796,163 +771,157 @@ C0A32A3B7FBA2E>I<DA0FF0EB1FF0DA7FFEEBFFFC903B01F80F83F00F903C07E001CFC0 0380903C1F8000FF0001C090273F0007FE130F017E4948497EA2495CA248485C03076E5A 03030203C7FC95C8FCA9F007E0BAFCA33C01F80003F0001F1807B3AA486C496C497E267F FFE0B500C1B51280A3413B7FBA45>I<007C137C00FE13FEEAFF01A3EAFE00A7007E13FC -007C137CA8003C137800381338A700181330171E77BA2A>34 D<141FEC7FC0903801F0E0 -903803C0600107137090380F803090381F00381518A25BA2133E133F15381530A215705D -5D140190381F838092CAFC1487148E02DC49B51280EB0FF85C4A9039003FF8000107ED0F -C06E5D71C7FC6E140E010F150CD91DFC141C01391518D970FE143801E015302601C07F14 -70D803805D00076D6C5BD80F00EBC00148011F5C4890380FE003003E6E48C8FC007E9038 -07F8060203130E00FE6E5A6E6C5A1400ED7F706C4B13036F5A6F7E6C6C6D6C5B7013066C -6C496C130E6DD979FE5B281FF001F07F133C3C07F80FE03FC0F86CB539800FFFF0C69026 -FE000313C0D91FF0D9007FC7FC393E7DBB41>38 D<121C127FEAFF80A213C0A3127F121C -1200A412011380A2120313005A1206120E5A5A5A12600A1979B917>I<146014E0EB01C0 -EB0380EB0700130E131E5B5BA25B485AA2485AA212075B120F90C7FCA25A121EA2123EA3 -5AA65AB2127CA67EA3121EA2121F7EA27F12077F1203A26C7EA26C7E1378A27F7F130E7F -EB0380EB01C0EB00E01460135278BD20>I<12C07E12707E7E7E120F6C7E6C7EA26C7E6C -7EA21378A2137C133C133E131EA2131F7FA21480A3EB07C0A6EB03E0B2EB07C0A6EB0F80 -A31400A25B131EA2133E133C137C1378A25BA2485A485AA2485A48C7FC120E5A5A5A5A5A -13527CBD20>I<EB0380497EA7397803803C00FC147E00FE14FE397F8383FC393FC387F8 -390FE38FE03903FBBF803900FFFE00EB3FF8EB0FE0A2EB3FF8EBFFFE3903FBBF80390FE3 -8FE0393FC387F8397F8383FC39FE0380FE00FC147E0078143C390007C000A76D5A1F247B -BD2A>I<121C127FEAFF80A213C0A3127F121C1200A412011380A2120313005A1206120E -5A5A5A12600A19798817>44 D<B512FCA516057F941C>I<121C127FEAFF80A5EA7F0012 -1C0909798817>I<1506A2150E150CA2151C151815381530A215701560A215E015C0A214 -011580A2140315005C1406A2140E140CA2141C1418A214381430A21470146014E05CA213 -015CA2130391C7FCA25B1306A2130E130C131C1318A213381330A213701360A213E05BA2 -12015B120390C8FCA25A1206A2120E120CA2121C1218A21238123012701260A212E05AA2 -1F537BBD2A>I<EB03F8EB1FFF90387E0FC09038F803E03901E000F0484813780007147C -48487FA248C77EA2481580A3007EEC0FC0A500FE15E0B3007E15C0A4007F141F6C1580A3 -6C1500A26C6C133EA26C6C5B6C6C5BEBF0013900F803E090387E0FC0D91FFFC7FCEB03F8 -23397DB62A>I<EB01C013031307131F13FFB5FCA2131F1200B3B3A7497E007FB512F0A3 -1C3779B62A>I<EB0FF0EB7FFE48B57E3903E03FE0390F000FF0001E6D7E001C6D7E486D -7E5A6E7E126012FE6CEC7F807FA56CC7FC121CC8FCEDFF00A25D14015D14035D4A5A4A5A -5D4A5A4AC7FC147E5C495A14E0495A495A49C8FC011EEB01805B5B49130348481400485A -485A90C75A48B6FC5A5A485CB6FCA321377CB62A>I<EB07F8EB3FFF90B512C03901F80F -F03903C007F848486C7E390E0001FEEA0F80391FE000FF7FA56C5A6C5AC7485AA25D1403 -5D4A5A5DEC0F80027FC7FCEB1FFCECFF809038000FE06E7EEC01FC816E7EED7F80A216C0 -A2153F16E0A2121EEA7F80A2487EA316C0157F491480007EC7FC0070ECFF006C495A121E -390F8003F83907F00FF00001B512C06C6C90C7FCEB0FF823397DB62A>I<1538A2157815 -F8A2140114031407A2140F141F141B14331473146314C313011483EB030313071306130C -131C131813301370136013C01201EA038013005A120E120C5A123812305A12E0B712F8A3 -C73803F800AA4A7E0103B512F8A325387EB72A>I<0006140CD80780133C9038F003F890 -B5FC5D5D158092C7FC14FC38067FE090C9FCAAEB07F8EB1FFE9038780F809038E007E039 -07C003F0496C7E130000066D7E81C8FC8181A21680A4121C127F5A7FA390C713005D12FC -00605C12704A5A6C5C6C1303001E495A6C6C485A3907E03F800001B5C7FC38007FFCEB1F -E021397CB62A>I<EC3FC0903801FFF0010713FC90380FE03E90383F800790387E001F49 -EB3F804848137F485A12075B000FEC3F0049131E001F91C7FC5B123FA3127F90C9FCEB01 -FC903807FF8039FF1E07E090383801F0496C7E01607F01E0137E497F16805BED1FC0A390 -C713E0A57EA47F123F16C0A2001FEC3F807F000F15006D5B000714FE6C6C5B6C6C485A39 -00FE07F090387FFFC0011F90C7FCEB03FC23397DB62A>I<12301238123E003FB612E0A3 -16C05A168016000070C712060060140E5D5D00E014304814705D5DC712014A5A4AC7FC14 -06140E5CA25C1478147014F05C1301A213035C1307A2130FA3131F5CA2133FA5137FA96D -C8FC131E233A7BB72A>I<EB03F8EB1FFF017F13C09038FC07F03901E001F83903C0007C -4848133C90C7123E48141E000E141F001E80A3121FA26D5B6D131E7FD80FF85B6D137C01 -FF13786C6D5A6CEBE3E0ECF780C601FFC7FC6D5A6D6C7E010F13E0013F7F01F97F3901E0 -7FFE48486C7E380F800F48486C1380001E010113C0487F007C143F0078EC1FE0150F00F8 -1407481403A21501A36C15C0A200781403007C15806C14076CEC0F006C6C131ED807E013 -7C3903F803F0C6B55A013F1380D907FCC7FC23397DB62A>I<EB03F8EB1FFF017F13C039 -01FC07E048486C7E3907E001F8000F6D7E4848137E5B003F80A248C71380A25AED1FC0A5 -16E0A56C143FA36C7E157F121F6C6C13FF6C6C13DF000313013901F0039F3900FC0F1FD9 -3FFC13C0EB07F090C7FCA2153F1680A216005D120F486C137E486C5BA24A5A4A5A49485A -381F000F001CEB1F80260F807FC7FC3807FFFE000113F838003FC023397DB62A>I<121C -127FEAFF80A5EA7F00121CC7FCB2121C127FEAFF80A5EA7F00121C092479A317>I<121C -127FEAFF80A5EA7F00121CC7FCB2121C127FEAFF80A213C0A3127F121C1200A412011380 -A2120313005A1206120E5A5A5A12600A3479A317>I<EC03FF021F13E09138FC00FCD901 -E0131ED90780EB0780011EC7EA01E00138EC00704981498148488148488190C97E48D901 -FC1480000ED907FFEB01C0000C90391F03C000001C90267E00E013E00018490170136026 -3801F86D13700030496D13300103EC0FE0267007E00107133800601718495AA200E0171C -484848150CAA6C6C7E1260A26D6C151C00701718263003F0130F0101141F00386D013F13 -38261800FC01771330001C017E9038E3F070000C90261F03C113E0000E903A07FF00FFC0 -6CD901FCEB3F006C90CAFC7F6C7E6C7E13706D167C011EED03FCD90780EC1FF0D901E0EC -FF80D900FC90383FFC00021FB51280020301E0C7FC363C7BBA41>64 -D<1538A3157CA315FEA34A7EA34A6C7EA202077FEC063FA2020E7FEC0C1FA2021C7FEC18 -0FA202387FEC3007A202707FEC6003A202C07F1501A2D901807F81A249C77F167FA20106 -810107B6FCA24981010CC7121FA2496E7EA3496E7EA3496E7EA213E0707E1201486C81D8 -0FFC02071380B56C90B512FEA3373C7DBB3E>I<B712E016FC16FF0001903980007FC06C -90C7EA1FE0707E707E707EA2707EA283A75F16035F4C5A4C5A4C5A4C5AEEFF8091B500FC -C7FCA291C7EA7F80EE1FE0EE07F0707E707E83707EA21880177F18C0A7188017FFA24C13 -005F16034C5AEE1FF8486DEB7FF0B812C094C7FC16F832397DB83B>I<913A01FF800180 -020FEBE003027F13F8903A01FF807E07903A03FC000F0FD90FF0EB039F4948EB01DFD93F -80EB00FF49C8127F01FE153F12014848151F4848150FA248481507A2485A1703123F5B00 -7F1601A35B00FF93C7FCAD127F6DED0180A3123F7F001F160318006C7E5F6C7E17066C6C -150E6C6C5D00001618017F15386D6C5CD91FE05C6D6CEB03C0D903FCEB0F80902701FF80 -3FC7FC9039007FFFFC020F13F002011380313D7BBA3C>I<B712C016F816FE0001903980 -01FF806C90C7EA3FE0EE0FF0EE03F8707E707E177FA2EF3F8018C0171F18E0170F18F0A3 -EF07F8A418FCAC18F8A4EF0FF0A218E0A2171F18C0EF3F80A2EF7F0017FE4C5A4C5AEE0F -F0EE3FE0486DEBFF80B8C7FC16F816C036397DB83F>I<B812FEA3000190388000076C90 -C8FC173F838383A383A31880170116C0A394C7FCA31501A21503150F91B5FCA3EC000F15 -031501A21500A21860A318E093C712C0A41701A3EF0380A21707A2170F173F177F486D90 -3807FF00B9FCA333397EB838>I<B812F8A30001903880001F6C90C71201EE00FC177C17 -3C171CA2170CA4170E1706A2ED0180A21700A41503A21507151F91B5FCA3EC001F150715 -03A21501A692C8FCAD4813C0B612C0A32F397DB836>I<DBFF8013C0020FEBF001023F13 -FC9139FF803F03903A03FC000787D90FF0EB03CF4948EB00EF4948147F4948143F49C812 -1F485A4848150F48481507A248481503A2485A1701123F5B007F1600A448481600AB93B6 -FCA26C7E9338007FE0EF3FC0A2123F7F121FA26C7EA26C7EA26C7E6C7E6C6C157F6D7E6D -6C14FF6D6C14EFD90FF8EB03C7D903FEEB0783903A00FFC03F0191393FFFFC00020F01F0 -130002001380383D7CBA41>I<B648B512FEA30001902680000313006C90C76C5AB3A491 -B6FCA391C71201B3A6486D497EB648B512FEA337397DB83E>I<B612C0A3C6EBC0006D5A -B3B3AD497EB612C0A31A397EB81E>I<B649B5FCA3000101809038007FF06C90C8EA3F80 -053EC7FC173C17385F5F4C5A4C5A4CC8FC160E5E5E5E5E4B5AED0780030EC9FC5D153E15 -7E15FF5C4A7F4A6C7E140E4A6C7E4A6C7E14704A6C7E4A6C7E14804A6C7E6F7EA26F7F70 -7EA2707E707EA2707EA2707E707EA2707E707F8484486D497FB6011FEBFF80A339397DB8 -41>75 D<B612E0A3000101C0C8FC6C90C9FCB3AD1718A517381730A31770A317F0A21601 -1603160FEE1FE0486D13FFB8FCA32D397DB834>I<B5933807FFF86E5DA20001F0FC0026 -00DFC0ED1BF8A2D9CFE01533A3D9C7F01563A3D9C3F815C3A2D9C1FCEC0183A3D9C0FEEC -0303A2027F1406A36E6C130CA36E6C1318A26E6C1330A36E6C1360A26E6C13C0A3913901 -FC0180A3913900FE0300A2ED7F06A3ED3F8CA2ED1FD8A3ED0FF0A3486C6D5A487ED80FFC -6D48497EB500C00203B512F8A2ED018045397DB84C>I<B5913807FFFE8080C69238007F -E06EEC1F80D9DFF0EC0F001706EBCFF8EBC7FCA2EBC3FEEBC1FFA201C07F6E7EA26E7E6E -7E81140F6E7E8114036E7E168080ED7FC016E0153FED1FF0ED0FF8A2ED07FCED03FEA2ED -01FF6F1386A2EE7FC6EE3FE6A2EE1FF6EE0FFEA216071603A216011600A2177E486C153E -487ED80FFC151EB500C0140EA2170637397DB83E>I<EC03FF021F13E09138FE01FC9039 -01F8007ED907E0EB1F8049486D7ED93F80EB07F049C76C7E01FE6E7E48486E7E49157E00 -03167F4848ED3F80A24848ED1FC0A2001F17E049150F003F17F0A3007F17F8491507A300 -FF17FCAC007F17F86D150FA3003F17F0A26C6CED1FE0A36C6CED3FC0000717806D157F00 -0317006C6C15FEA26C6C4A5A017F4A5A6D6C495A6D6C495AD907E0EB1F80D903F8017FC7 -FC903900FE01FC91381FFFE0020390C8FC363D7BBA41>I<B712C016FC16FF0001D98000 -13C06C90C7EA1FE0707EEE03F883707EA2707EA21880A71800A24C5AA24C5A5FEE0FF04C -5AEEFF8091B548C7FC16F091CAFCB3A5487FB6FCA331397EB838>I<EC03FF021F13E091 -38FE01FC903901F8007ED907E0EB1F8049486D7ED93F80EB07F049C76C7E01FE6E7E4848 -6E7EA24848157F0007178049153F000F17C049151F001F17E0A24848ED0FF0A3007F17F8 -A2491507A200FF17FCAC007F17F8A26D150FA2003F17F0A26C6CED1FE0A36C6CED3FC000 -07027C14804AB4FC3C03F80383807F003B01FC0701C0FEEC0E002600FE0CEBE1FC017FEC -63F8D93F8CEB77F0D91FCCEB3FE0D907EE14806DB449C7FC0100D981FC130CEC1FFF0203 -131C91C7001E131C161F183CEF807CEFC0F8EE0FFFA318F08218E07013C0701380933800 -7E00364B7BBA41>I<B612FEEDFFE016F8000190388007FE6C90C76C7EEE3FC0707E707E -707EA2707EA283A65FA24C5AA24C5A4C5AEE3F8004FFC8FCED07FC91B512E05E9138000F -F0ED03F8ED00FE82707E707EA2161F83A583A6F00180A217F8160F1803486D01071400B6 -6D6C5A04011306933800FE0ECAEA3FFCEF07F0393B7DB83D>I<D90FF813C090383FFE01 -90B512813903F807E33907E000F74848137F4848133F48C7121F003E140F007E1407A200 -7C140312FC1501A36C1400A37E6D14006C7E7F13F86CB47E6C13F8ECFF806C14E06C14F8 -6C14FEC680013F1480010714C0EB007F020713E0EC007FED3FF0151F150FED07F8A200C0 -1403A21501A37EA216F07E15036C15E06C14076C15C06C140F6DEB1F80D8FBF0EB3F00D8 -F0FE13FE39E03FFFF8010F13E0D8C00190C7FC253D7CBA2E>I<003FB812E0A3D9C003EB -001F273E0001FE130348EE01F00078160000701770A300601730A400E01738481718A4C7 -1600B3B0913807FF80011FB612E0A335397DB83C>I<B6903807FFFEA300010180903800 -7FE06C90C8EA1F80EF0F001706B3B2170E6D150C80171C133F17186D6C14385F6D6C14F0 -6D6C5C6D6C495A6D6CEB07806D6C49C7FC91387F807E91381FFFF8020713E09138007F80 -373B7DB83E>I<B500FC91387FFF80A30003018091380FFC006C90C8EA07E0715A6C705A -6E1403017F93C7FCA280013F1506A26E140E011F150C80010F5DA28001075DA26E147001 -031560A26D6C5CA2806D4A5AA2ED8003027F91C8FCA291383FC006A215E0021F5BA2EDF0 -1C020F1318A26E6C5AA215FC02035BA2EDFEE002015BA26E6C5AA36FC9FCA3153EA2151C -A3393B7EB83E>I<B5D8FC07B5D8F001B5FCA30007902780001FFEC7EA1FF86C48C7D80F -F8EC07E000010307ED03C01B807F6C6F6C1500A26E5F017F6E6C1406A280013F4A6C5CA2 -80011F4A6D5BEE067FA26D6C010E6D5BEE0C3FA26D6C011C6D5BEE181FA26D6C6F5BEE30 -0FA26D6C6F485AEE6007A26D6C4CC7FC9338C003FCA203805D913B7F818001FE06A203C1 -150EDA3FC3C7EAFF0CA203E3151CDA1FE6EC7F98A215F6DA0FFCEC3FF0A302075E4B141F -A202035E4B140FA202015E4B1407A2020093C8FC4B80503B7EB855>I<007FB590383FFF -FCA3C601F801071380D97FE0D903FCC7FC013FEC01F06D6C5C5F6D6C5C6D6C13034CC8FC -6D6C1306160E6D6C5B6DEB8018163891387FC0306E6C5A16E06E6C5A91380FF18015FB6E -B4C9FC5D14036E7EA26E7F6F7EA24B7E15DF9138019FF09138038FF8150F91380607FC91 -380E03FE140C4A6C7EEC38000230804A6D7E14E04A6D7E49486D7E130391C76C7E01066E -7E130E010C6E7E011C1401013C8101FE822607FF80010713E0B500E0013FEBFF80A33939 -7EB83E>I<B500FE91383FFFE0A3000301E0913807FE00C649EC03F0017F6F5A606D6C5D -6D6C140395C7FC6D6C1406A26D6C5C6D6C141C17186D6C143817306D6D5B6E6C13E05F91 -383FE0015F91381FF003DA0FF890C8FC1606913807FC0E160C913803FE1C913801FF185E -6E13B016E0157F6F5AB3A24B7E023FB512C0A33B397FB83E>I<003FB7FCA39039FC0001 -FE01C0130349495A003EC7FC003C4A5A5E0038141F00784A5A12704B5A5E006014FF4A90 -C7FCA24A5A5DC712074A5AA24A5A5D143F4A5AA24A5A92C8FC5B495AA2495A5C130F4948 -EB0180A2495A5C137F495A16034890C7FC5B1203485AEE0700485A495C001F5D48485C5E -4848495A49130FB8FCA329397BB833>I<007FB81280B912C0A26C17803204797041>95 +007C137CA8003C137800381338A700181330171E77BA2A>34 D<121C127FEAFF80A213C0 +A3127F121C1200A412011380A2120313005A1206120E5A5A5A12600A1979B917>39 +D<146014E0EB01C0EB0380EB0700130E131E5B5BA25B485AA2485AA212075B120F90C7FC +A25A121EA2123EA35AA65AB2127CA67EA3121EA2121F7EA27F12077F1203A26C7EA26C7E +1378A27F7F130E7FEB0380EB01C0EB00E01460135278BD20>I<12C07E12707E7E7E120F +6C7E6C7EA26C7E6C7EA21378A2137C133C133E131EA2131F7FA21480A3EB07C0A6EB03E0 +B2EB07C0A6EB0F80A31400A25B131EA2133E133C137C1378A25BA2485A485AA2485A48C7 +FC120E5A5A5A5A5A13527CBD20>I<EB0380497EA7397803803C00FC147E00FE14FE397F +8383FC393FC387F8390FE38FE03903FBBF803900FFFE00EB3FF8EB0FE0A2EB3FF8EBFFFE +3903FBBF80390FE38FE0393FC387F8397F8383FC39FE0380FE00FC147E0078143C390007 +C000A76D5A1F247BBD2A>I<121C127FEAFF80A213C0A3127F121C1200A412011380A212 +0313005A1206120E5A5A5A12600A19798817>44 D<B512FCA516057F941C>I<121C127F +EAFF80A5EA7F00121C0909798817>I<1506A2150E150CA2151C151815381530A2157015 +60A215E015C0A214011580A2140315005C1406A2140E140CA2141C1418A214381430A214 +70146014E05CA213015CA2130391C7FCA25B1306A2130E130C131C1318A213381330A213 +701360A213E05BA212015B120390C8FCA25A1206A2120E120CA2121C1218A21238123012 +701260A212E05AA21F537BBD2A>I<EB03F8EB1FFF90387E0FC09038F803E03901E000F0 +484813780007147C48487FA248C77EA2481580A3007EEC0FC0A500FE15E0B3007E15C0A4 +007F141F6C1580A36C1500A26C6C133EA26C6C5B6C6C5BEBF0013900F803E090387E0FC0 +D91FFFC7FCEB03F823397DB62A>I<EB01C013031307131F13FFB5FCA2131F1200B3B3A7 +497E007FB512F0A31C3779B62A>I<EB0FF0EB7FFE48B57E3903E03FE0390F000FF0001E +6D7E001C6D7E486D7E5A6E7E126012FE6CEC7F807FA56CC7FC121CC8FCEDFF00A25D1401 +5D14035D4A5A4A5A5D4A5A4AC7FC147E5C495A14E0495A495A49C8FC011EEB01805B5B49 +130348481400485A485A90C75A48B6FC5A5A485CB6FCA321377CB62A>I<EB07F8EB3FFF +90B512C03901F80FF03903C007F848486C7E390E0001FEEA0F80391FE000FF7FA56C5A6C +5AC7485AA25D14035D4A5A5DEC0F80027FC7FCEB1FFCECFF809038000FE06E7EEC01FC81 +6E7EED7F80A216C0A2153F16E0A2121EEA7F80A2487EA316C0157F491480007EC7FC0070 +ECFF006C495A121E390F8003F83907F00FF00001B512C06C6C90C7FCEB0FF823397DB62A +>I<1538A2157815F8A2140114031407A2140F141F141B14331473146314C313011483EB +030313071306130C131C131813301370136013C01201EA038013005A120E120C5A123812 +305A12E0B712F8A3C73803F800AA4A7E0103B512F8A325387EB72A>I<0006140CD80780 +133C9038F003F890B5FC5D5D158092C7FC14FC38067FE090C9FCAAEB07F8EB1FFE903878 +0F809038E007E03907C003F0496C7E130000066D7E81C8FC8181A21680A4121C127F5A7F +A390C713005D12FC00605C12704A5A6C5C6C1303001E495A6C6C485A3907E03F800001B5 +C7FC38007FFCEB1FE021397CB62A>I<EC3FC0903801FFF0010713FC90380FE03E90383F +800790387E001F49EB3F804848137F485A12075B000FEC3F0049131E001F91C7FC5B123F +A3127F90C9FCEB01FC903807FF8039FF1E07E090383801F0496C7E01607F01E0137E497F +16805BED1FC0A390C713E0A57EA47F123F16C0A2001FEC3F807F000F15006D5B000714FE +6C6C5B6C6C485A3900FE07F090387FFFC0011F90C7FCEB03FC23397DB62A>I<12301238 +123E003FB612E0A316C05A168016000070C712060060140E5D5D00E014304814705D5DC7 +12014A5A4AC7FC1406140E5CA25C1478147014F05C1301A213035C1307A2130FA3131F5C +A2133FA5137FA96DC8FC131E233A7BB72A>I<EB03F8EB1FFF017F13C09038FC07F03901 +E001F83903C0007C4848133C90C7123E48141E000E141F001E80A3121FA26D5B6D131E7F +D80FF85B6D137C01FF13786C6D5A6CEBE3E0ECF780C601FFC7FC6D5A6D6C7E010F13E001 +3F7F01F97F3901E07FFE48486C7E380F800F48486C1380001E010113C0487F007C143F00 +78EC1FE0150F00F81407481403A21501A36C15C0A200781403007C15806C14076CEC0F00 +6C6C131ED807E0137C3903F803F0C6B55A013F1380D907FCC7FC23397DB62A>I<EB03F8 +EB1FFF017F13C03901FC07E048486C7E3907E001F8000F6D7E4848137E5B003F80A248C7 +1380A25AED1FC0A516E0A56C143FA36C7E157F121F6C6C13FF6C6C13DF000313013901F0 +039F3900FC0F1FD93FFC13C0EB07F090C7FCA2153F1680A216005D120F486C137E486C5B +A24A5A4A5A49485A381F000F001CEB1F80260F807FC7FC3807FFFE000113F838003FC023 +397DB62A>I<121C127FEAFF80A5EA7F00121CC7FCB2121C127FEAFF80A5EA7F00121C09 +2479A317>I<121C127FEAFF80A5EA7F00121CC7FCB2121C127FEAFF80A213C0A3127F12 +1C1200A412011380A2120313005A1206120E5A5A5A12600A3479A317>I<007FB812F8B9 +12FCCCFCB0B912FC6C17F836147B9E41>61 D<EC03FF021F13E09138FC00FCD901E0131E +D90780EB0780011EC7EA01E00138EC00704981498148488148488190C97E48D901FC1480 +000ED907FFEB01C0000C90391F03C000001C90267E00E013E000184901701360263801F8 +6D13700030496D13300103EC0FE0267007E00107133800601718495AA200E0171C484848 +150CAA6C6C7E1260A26D6C151C00701718263003F0130F0101141F00386D013F13382618 +00FC01771330001C017E9038E3F070000C90261F03C113E0000E903A07FF00FFC06CD901 +FCEB3F006C90CAFC7F6C7E6C7E13706D167C011EED03FCD90780EC1FF0D901E0ECFF80D9 +00FC90383FFC00021FB51280020301E0C7FC363C7BBA41>64 D<1538A3157CA315FEA34A +7EA34A6C7EA202077FEC063FA2020E7FEC0C1FA2021C7FEC180FA202387FEC3007A20270 +7FEC6003A202C07F1501A2D901807F81A249C77F167FA20106810107B6FCA24981010CC7 +121FA2496E7EA3496E7EA3496E7EA213E0707E1201486C81D80FFC02071380B56C90B512 +FEA3373C7DBB3E>I<B712E016FC16FF0001903980007FC06C90C7EA1FE0707E707E707E +A2707EA283A75F16035F4C5A4C5A4C5A4C5AEEFF8091B500FCC7FCA291C7EA7F80EE1FE0 +EE07F0707E707E83707EA21880177F18C0A7188017FFA24C13005F16034C5AEE1FF8486D +EB7FF0B812C094C7FC16F832397DB83B>I<913A01FF800180020FEBE003027F13F8903A +01FF807E07903A03FC000F0FD90FF0EB039F4948EB01DFD93F80EB00FF49C8127F01FE15 +3F12014848151F4848150FA248481507A2485A1703123F5B007F1601A35B00FF93C7FCAD +127F6DED0180A3123F7F001F160318006C7E5F6C7E17066C6C150E6C6C5D00001618017F +15386D6C5CD91FE05C6D6CEB03C0D903FCEB0F80902701FF803FC7FC9039007FFFFC020F +13F002011380313D7BBA3C>I<B712C016F816FE000190398001FF806C90C7EA3FE0EE0F +F0EE03F8707E707E177FA2EF3F8018C0171F18E0170F18F0A3EF07F8A418FCAC18F8A4EF +0FF0A218E0A2171F18C0EF3F80A2EF7F0017FE4C5A4C5AEE0FF0EE3FE0486DEBFF80B8C7 +FC16F816C036397DB83F>I<B812FEA3000190388000076C90C8FC173F838383A383A318 +80170116C0A394C7FCA31501A21503150F91B5FCA3EC000F15031501A21500A21860A318 +E093C712C0A41701A3EF0380A21707A2170F173F177F486D903807FF00B9FCA333397EB8 +38>I<B812F8A30001903880001F6C90C71201EE00FC177C173C171CA2170CA4170E1706 +A2ED0180A21700A41503A21507151F91B5FCA3EC001F15071503A21501A692C8FCAD4813 +C0B612C0A32F397DB836>I<DBFF8013C0020FEBF001023F13FC9139FF803F03903A03FC +000787D90FF0EB03CF4948EB00EF4948147F4948143F49C8121F485A4848150F48481507 +A248481503A2485A1701123F5B007F1600A448481600AB93B6FCA26C7E9338007FE0EF3F +C0A2123F7F121FA26C7EA26C7EA26C7E6C7E6C6C157F6D7E6D6C14FF6D6C14EFD90FF8EB +03C7D903FEEB0783903A00FFC03F0191393FFFFC00020F01F0130002001380383D7CBA41 +>I<B648B512FEA30001902680000313006C90C76C5AB3A491B6FCA391C71201B3A6486D +497EB648B512FEA337397DB83E>I<B612C0A3C6EBC0006D5AB3B3AD497EB612C0A31A39 +7EB81E>I<B649B5FCA3000101809038007FF06C90C8EA3F80053EC7FC173C17385F5F4C +5A4C5A4CC8FC160E5E5E5E5E4B5AED0780030EC9FC5D153E157E15FF5C4A7F4A6C7E140E +4A6C7E4A6C7E14704A6C7E4A6C7E14804A6C7E6F7EA26F7F707EA2707E707EA2707EA270 +7E707EA2707E707F8484486D497FB6011FEBFF80A339397DB841>75 +D<B612E0A3000101C0C8FC6C90C9FCB3AD1718A517381730A31770A317F0A21601160316 +0FEE1FE0486D13FFB8FCA32D397DB834>I<B5933807FFF86E5DA20001F0FC002600DFC0 +ED1BF8A2D9CFE01533A3D9C7F01563A3D9C3F815C3A2D9C1FCEC0183A3D9C0FEEC0303A2 +027F1406A36E6C130CA36E6C1318A26E6C1330A36E6C1360A26E6C13C0A3913901FC0180 +A3913900FE0300A2ED7F06A3ED3F8CA2ED1FD8A3ED0FF0A3486C6D5A487ED80FFC6D4849 +7EB500C00203B512F8A2ED018045397DB84C>I<B5913807FFFE8080C69238007FE06EEC +1F80D9DFF0EC0F001706EBCFF8EBC7FCA2EBC3FEEBC1FFA201C07F6E7EA26E7E6E7E8114 +0F6E7E8114036E7E168080ED7FC016E0153FED1FF0ED0FF8A2ED07FCED03FEA2ED01FF6F +1386A2EE7FC6EE3FE6A2EE1FF6EE0FFEA216071603A216011600A2177E486C153E487ED8 +0FFC151EB500C0140EA2170637397DB83E>I<EC03FF021F13E09138FE01FC903901F800 +7ED907E0EB1F8049486D7ED93F80EB07F049C76C7E01FE6E7E48486E7E49157E0003167F +4848ED3F80A24848ED1FC0A2001F17E049150F003F17F0A3007F17F8491507A300FF17FC +AC007F17F86D150FA3003F17F0A26C6CED1FE0A36C6CED3FC0000717806D157F00031700 +6C6C15FEA26C6C4A5A017F4A5A6D6C495A6D6C495AD907E0EB1F80D903F8017FC7FC9039 +00FE01FC91381FFFE0020390C8FC363D7BBA41>I<B712C016FC16FF0001D9800013C06C +90C7EA1FE0707EEE03F883707EA2707EA21880A71800A24C5AA24C5A5FEE0FF04C5AEEFF +8091B548C7FC16F091CAFCB3A5487FB6FCA331397EB838>I<EC03FF021F13E09138FE01 +FC903901F8007ED907E0EB1F8049486D7ED93F80EB07F049C76C7E01FE6E7E48486E7EA2 +4848157F0007178049153F000F17C049151F001F17E0A24848ED0FF0A3007F17F8A24915 +07A200FF17FCAC007F17F8A26D150FA2003F17F0A26C6CED1FE0A36C6CED3FC00007027C +14804AB4FC3C03F80383807F003B01FC0701C0FEEC0E002600FE0CEBE1FC017FEC63F8D9 +3F8CEB77F0D91FCCEB3FE0D907EE14806DB449C7FC0100D981FC130CEC1FFF0203131C91 +C7001E131C161F183CEF807CEFC0F8EE0FFFA318F08218E07013C07013809338007E0036 +4B7BBA41>I<B612FEEDFFE016F8000190388007FE6C90C76C7EEE3FC0707E707E707EA2 +707EA283A65FA24C5AA24C5A4C5AEE3F8004FFC8FCED07FC91B512E05E9138000FF0ED03 +F8ED00FE82707E707EA2161F83A583A6F00180A217F8160F1803486D01071400B66D6C5A +04011306933800FE0ECAEA3FFCEF07F0393B7DB83D>I<D90FF813C090383FFE0190B512 +813903F807E33907E000F74848137F4848133F48C7121F003E140F007E1407A2007C1403 +12FC1501A36C1400A37E6D14006C7E7F13F86CB47E6C13F8ECFF806C14E06C14F86C14FE +C680013F1480010714C0EB007F020713E0EC007FED3FF0151F150FED07F8A200C01403A2 +1501A37EA216F07E15036C15E06C14076C15C06C140F6DEB1F80D8FBF0EB3F00D8F0FE13 +FE39E03FFFF8010F13E0D8C00190C7FC253D7CBA2E>I<003FB812E0A3D9C003EB001F27 +3E0001FE130348EE01F00078160000701770A300601730A400E01738481718A4C71600B3 +B0913807FF80011FB612E0A335397DB83C>I<B6903807FFFEA3000101809038007FE06C +90C8EA1F80EF0F001706B3B2170E6D150C80171C133F17186D6C14385F6D6C14F06D6C5C +6D6C495A6D6CEB07806D6C49C7FC91387F807E91381FFFF8020713E09138007F80373B7D +B83E>I<B500FC91387FFF80A30003018091380FFC006C90C8EA07E0715A6C705A6E1403 +017F93C7FCA280013F1506A26E140E011F150C80010F5DA28001075DA26E147001031560 +A26D6C5CA2806D4A5AA2ED8003027F91C8FCA291383FC006A215E0021F5BA2EDF01C020F +1318A26E6C5AA215FC02035BA2EDFEE002015BA26E6C5AA36FC9FCA3153EA2151CA3393B +7EB83E>I<B5D8FC07B5D8F001B5FCA30007902780001FFEC7EA1FF86C48C7D80FF8EC07 +E000010307ED03C01B807F6C6F6C1500A26E5F017F6E6C1406A280013F4A6C5CA280011F +4A6D5BEE067FA26D6C010E6D5BEE0C3FA26D6C011C6D5BEE181FA26D6C6F5BEE300FA26D +6C6F485AEE6007A26D6C4CC7FC9338C003FCA203805D913B7F818001FE06A203C1150EDA +3FC3C7EAFF0CA203E3151CDA1FE6EC7F98A215F6DA0FFCEC3FF0A302075E4B141FA20203 +5E4B140FA202015E4B1407A2020093C8FC4B80503B7EB855>I<007FB590383FFFFCA3C6 +01F801071380D97FE0D903FCC7FC013FEC01F06D6C5C5F6D6C5C6D6C13034CC8FC6D6C13 +06160E6D6C5B6DEB8018163891387FC0306E6C5A16E06E6C5A91380FF18015FB6EB4C9FC +5D14036E7EA26E7F6F7EA24B7E15DF9138019FF09138038FF8150F91380607FC91380E03 +FE140C4A6C7EEC38000230804A6D7E14E04A6D7E49486D7E130391C76C7E01066E7E130E +010C6E7E011C1401013C8101FE822607FF80010713E0B500E0013FEBFF80A339397EB83E +>I<B500FE91383FFFE0A3000301E0913807FE00C649EC03F0017F6F5A606D6C5D6D6C14 +0395C7FC6D6C1406A26D6C5C6D6C141C17186D6C143817306D6D5B6E6C13E05F91383FE0 +015F91381FF003DA0FF890C8FC1606913807FC0E160C913803FE1C913801FF185E6E13B0 +16E0157F6F5AB3A24B7E023FB512C0A33B397FB83E>I<003FB7FCA39039FC0001FE01C0 +130349495A003EC7FC003C4A5A5E0038141F00784A5A12704B5A5E006014FF4A90C7FCA2 +4A5A5DC712074A5AA24A5A5D143F4A5AA24A5A92C8FC5B495AA2495A5C130F4948EB0180 +A2495A5C137F495A16034890C7FC5B1203485AEE0700485A495C001F5D48485C5E484849 +5A49130FB8FCA329397BB833>I<007FB81280B912C0A26C17803204797041>95 D<EB1FE0EBFFFC3803E03F3907000F80390F8007E0486C6C7E13E06E7EA26E7E6C5A6C5A C8FCA4147FEB07FFEB3FE0EBFE00EA03F8EA0FF0EA1FC0123F485A90C7FC160C12FEA314 01A26C13036CEB077C903980063E18383FC01E3A0FE0781FF03A03FFF00FE03A007F8007 @@ -1023,6 +992,49 @@ ECC070010F1360A26D6C5AA214F101035BA2D901FBC7FCA214FF6D5AA2147CA31438A214 A2485A485A0007140E5B4848130C4848131CA24848133C48C7127C48EB03FC90B5FCA21F 247EA325>I E %EndDVIPSBitmapFont +%DVIPSBitmapFont: Fg ecss2074 20.74 10 +/Fg 10 116 df<EAFFC0B3B3B3B3B3B390B912FCA83E7570F456>76 +D<D8FFC0F03FF0B3B3B3B3AD6C6CF07FE0A46C6CF0FFC0A36D5F001F1A80A26C6C4D1300 +A26C6C4D5A6D170F6C616E161F6C6D4C5A6C6D4C5A6E16FF6D6C4B5B6D6C4B5B6D6C4B5B +6D6C6C021F90C7FC6D01E0EC7FFE6D01F849485A6D9026FF801F5B6D91B65A6E5E021F16 +8002074BC8FC020115F86E6C14E0030F91C9FC030013F04C7770F46D>85 +D<91380FFF8049B512F0010F14FC017F14FF48B712C0000782001F824882DAE0007F49C7 +EA3FFE01F8140FD81FC06E7E90C86C1380121E00186F13C0001081CAFCEF7FE0A318F017 +3FAD93B5FC157F0207B6FC143F49B7FC1307011F153F017FEBF80090B512804801F8C7FC +4813C04890C8FCEA0FFC485A485A5B485A5BA248C9FCA5177FA26D15FFA26C6C5C6D5C6D +140F6C6C5C01FF91B5FC6CEBE00791B612BF6CEDFE3F16FC6C15F06C15C06CECFE006C6C +13F0D91FFCC9FC344C77CA4C>97 D<EAFFC0B3B3ADED0FFC92B57E020714E0021F80027F +14FC91B67E01C38101C7829026CFFE0080D9DFF0131FD9FFC001037F4A6D7F49C86C7E49 +153F496F7E170F496F7E5B717E4981A2711380A2187FA219C0183FA419E0181FAD183F19 +C0A3187FA2198018FFA24D1300A25F6D5E17076D4B5A6D151F4D5A6D4B5A6D15FF6D0203 +5B6E495BD9DFE0013F5B9026CFFC01B5C7FC01C7B65A01C35D01C15D01C05D023F14C002 +0F5C020301FCC8FCC8EA3FE03B7C72FA52>I<ED3FFF4AB512F8020F14FF023F15C04A15 +F049B712FC4916FF49178049EBE0004990C7120FD93FFC02011300D97FF06E7E4948151F +0280814890C912034894C7FC5B485A5B120F5B121F5B123F5BA3485AA548CCFCAD6C7EA4 +7F123FA27F121F7FA26C7EA26C6C17806D1601000317036C6C160F6E151F6C01E0ED7FC0 +6D6CEC01FFD93FFC14076DB4143F6DD9E003B512806D90B6EAFE006D5E6D16F06D6C5D6E +1580020F02FCC7FC020114E09126003FFCC8FC3A4C78CA47>I<DB1FE04AB4FC912601FF +FE143F02079026FF8003B5FC4AECC01F023F02F0B6FC4A02FB158091BAFC49EBE01F49D9 +000302FCC7FC49486D01F8C8FC02F89038007F8049486E7E49486E7E4A140F013F824A14 +07A249C86C7EA401FE6F7EAA017F4B5AA46D6C4A5AA26E140F011F5E6E141F6D6C4A5A6D +6C4A5A02FEEB01FF496C4990C9FC499038E01FFE92B55A495D02BF5C020F14C0496C5CD9 +7E0149CAFC9138001FE001FE90CCFCA67FA27F8080EB3FF091B612FE6DEDFFF818FF6D17 +C019F0013F17FC498390BA7E48854801E0C71203480180DA001F7F4848C900037F484816 +0049EF3FF84848171F49717E127F4917078648481703A76D1707007F616D170F003F616D +171FD81FFCEF7FF06C6C4D5A6D5E6C01C003075B6C01F8033F5BC601FF4AB448C7FC6D01 +F0011F5B6D90B75A010F17E00103178001004CC8FC021F15F002031580DA000F01E0C9FC +496D7CC950>103 D<EAFFE0ABC7FCB3A9EA7FE0B3B3B3B30B6F74EE25>105 +D<EAFFC0B3B3B3B3B3B3AF0A7B73FA25>108 D<ED1FF826FFC001B57E020714E0021F14 +F8027F8091B67E01C18101C316809038C7FE00D9CFF0011F13C0D9DFE0010713E0D9FF80 +130191C8FC18F049157F5B173F4916F8A249151FA35BA45BB3B3AC354A72C952>110 +D<91380FFFC091B512FE0107ECFFC0011F15F8017F15FE90B812804817C05A489038F000 +3F4890C70003138049EC007FD81FF8151F491507003F16014992C7FCA2485AA77FA26C7E +7F7F6CB4FC6C13C014F86CEBFF806C14FC6CECFFE06C15FC6D14FF6D15C0010F81010315 +F8010081020F80DA007F7F03071480DB003F13C0160F040313E01600EF7FF0173FA2EF1F +F8A2170FA7EF1FF0A20070163F127C007FEE7FE001C015FF01F0020313C0B5020F138002 +F0137F91B712006C5E001F5E000716F0C65E011F1580010302FCC7FCD9000F13C0354C7C +CA3D>115 D E +%EndDVIPSBitmapFont end %%EndProlog %%BeginSetup @@ -1034,534 +1046,1033 @@ letter %%EndSetup %%Page: 1 1 -1 0 bop 0 162 a Fh(11)17 b(11)h(T)249 180 y(E)295 162 -y(X)h(L)398 145 y Fg(A)435 162 y Fh(T)481 180 y(E)527 -162 y(X)0 353 y Ff(Using)54 b(Libical)p 0 467 3900 24 -v 0 580 a Fh(Eric)28 b(Busb)r(o)r(om)f(\(eric@soft)n(w)n -(arestudio.org\))2054 b(Ma)n(y)26 b(2000)0 1217 y Fe(1)131 -b(In)l(tro)t(duction)0 1456 y Fh(Libical)23 b(is)f(an)h(Op)r(en)g -(Source)f(implemen)n(tation)h(of)g(the)g(iCalendar)f(proto)r(cols)f -(and)i(proto)r(col)e(data)i(units.)35 b(The)23 b(iCalendar)0 -1570 y(sp)r(eci\034cation)k(describ)r(es)g(ho)n(w)f(calendar)g(clien)n -(ts)i(can)f(comm)n(unicate)f(with)i(calendar)e(serv)n(ers)f(for)i -(users)g(can)g(store)f(their)0 1683 y(calendar)g(data)h(and)h(arrange)d -(meetings)i(with)h(other)f(users.)0 1840 y(Libical)g(implemen)n(ts)h +1 0 bop 0 201 a Fg(Using)54 b(Libical)p 0 315 3900 24 +v 0 428 a Ff(Eric)28 b(Busb)r(o)r(om)f(\(eric@soft)n(w)n +(arestudio.org\))1876 b(No)n(v)n(em)n(b)r(er)26 b(2000)0 +1072 y Fe(Con)l(ten)l(ts)0 1312 y Fd(1)77 b(In)m(tro)s(duction)3201 +b(2)125 1468 y Ff(1.1)83 b(The)28 b(libical)f(pro)5 b(ject)67 +b(.)41 b(.)h(.)g(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)g(.)f(.)h(.)f(.)h(.) +f(.)h(.)g(.)f(.)h(.)f(.)h(.)f(.)h(.)g(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h +(.)g(.)f(.)h(.)f(.)h(.)f(.)h(.)134 b(3)125 1625 y(1.2)83 +b(License)22 b(.)41 b(.)h(.)g(.)f(.)h(.)f(.)h(.)f(.)h(.)g(.)f(.)h(.)f +(.)h(.)f(.)h(.)f(.)h(.)g(.)f(.)h(.)f(.)h(.)f(.)h(.)g(.)f(.)h(.)f(.)h(.) +f(.)h(.)g(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)g(.)f(.)h(.)f(.)h(.)f(.)h +(.)134 b(3)125 1781 y(1.3)83 b(Example)28 b(Co)r(de)78 +b(.)41 b(.)h(.)f(.)h(.)g(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)g(.)f(.)h(.) +f(.)h(.)f(.)h(.)g(.)f(.)h(.)f(.)h(.)f(.)h(.)g(.)f(.)h(.)f(.)h(.)f(.)h +(.)f(.)h(.)g(.)f(.)h(.)f(.)h(.)f(.)h(.)134 b(3)0 2021 +y Fd(2)77 b(Building)30 b(the)h(Library)2865 b(3)0 2260 +y(3)77 b(Structure)3330 b(4)125 2417 y Ff(3.1)83 b(Core)27 +b(iCal)g(classes)62 b(.)42 b(.)f(.)h(.)g(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.) +h(.)g(.)f(.)h(.)f(.)h(.)f(.)h(.)g(.)f(.)h(.)f(.)h(.)f(.)h(.)g(.)f(.)h +(.)f(.)h(.)f(.)h(.)f(.)h(.)g(.)f(.)h(.)f(.)h(.)f(.)h(.)134 +b(5)315 2573 y(3.1.1)94 b(Comp)r(onen)n(ts)84 b(.)42 +b(.)g(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)g(.)f(.)h(.)f(.)h(.)f(.)h(.)g +(.)f(.)h(.)f(.)h(.)f(.)h(.)g(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)g(.)f(.) +h(.)f(.)h(.)f(.)h(.)134 b(5)315 2730 y(3.1.2)94 b(Prop)r(erties)99 +b(.)41 b(.)h(.)g(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)g(.)f(.)h(.)f(.)h(.) +f(.)h(.)g(.)f(.)h(.)f(.)h(.)f(.)h(.)g(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h +(.)g(.)f(.)h(.)f(.)h(.)f(.)h(.)134 b(5)315 2886 y(3.1.3)94 +b(V)-7 b(alues)108 b(.)41 b(.)h(.)f(.)h(.)g(.)f(.)h(.)f(.)h(.)f(.)h(.)f +(.)h(.)g(.)f(.)h(.)f(.)h(.)f(.)h(.)g(.)f(.)h(.)f(.)h(.)f(.)h(.)g(.)f(.) +h(.)f(.)h(.)f(.)h(.)f(.)h(.)g(.)f(.)h(.)f(.)h(.)f(.)h(.)134 +b(5)315 3043 y(3.1.4)94 b(P)n(arameters)61 b(.)41 b(.)h(.)g(.)f(.)h(.)f +(.)h(.)f(.)h(.)f(.)h(.)g(.)f(.)h(.)f(.)h(.)f(.)h(.)g(.)f(.)h(.)f(.)h(.) +f(.)h(.)g(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)g(.)f(.)h(.)f(.)h(.)f(.)h +(.)134 b(5)125 3199 y(3.2)83 b(Other)27 b(elemen)n(ts)h(of)f(libical)42 +b(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)g(.)f(.)h(.)f(.)h(.)f(.)h(.)g(.)f +(.)h(.)f(.)h(.)f(.)h(.)g(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)g(.)f(.)h(.) +f(.)h(.)f(.)h(.)134 b(5)315 3356 y(3.2.1)94 b(En)n(umerations)34 +b(.)42 b(.)g(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)g(.)f(.)h(.)f(.)h(.)f(.) +h(.)g(.)f(.)h(.)f(.)h(.)f(.)h(.)g(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)g +(.)f(.)h(.)f(.)h(.)f(.)h(.)134 b(5)315 3512 y(3.2.2)94 +b(T)n(yp)r(es)59 b(.)42 b(.)f(.)h(.)f(.)h(.)g(.)f(.)h(.)f(.)h(.)f(.)h +(.)f(.)h(.)g(.)f(.)h(.)f(.)h(.)f(.)h(.)g(.)f(.)h(.)f(.)h(.)f(.)h(.)g(.) +f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)g(.)f(.)h(.)f(.)h(.)f(.)h(.)134 +b(5)315 3669 y(3.2.3)94 b(The)28 b(parser)78 b(.)41 b(.)h(.)g(.)f(.)h +(.)f(.)h(.)f(.)h(.)f(.)h(.)g(.)f(.)h(.)f(.)h(.)f(.)h(.)g(.)f(.)h(.)f(.) +h(.)f(.)h(.)g(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)g(.)f(.)h(.)f(.)h(.)f +(.)h(.)134 b(5)315 3825 y(3.2.4)94 b(Restrictions)41 +b(.)g(.)h(.)g(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)g(.)f(.)h(.)f(.)h(.)f +(.)h(.)g(.)f(.)h(.)f(.)h(.)f(.)h(.)g(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.) +g(.)f(.)h(.)f(.)h(.)f(.)h(.)134 b(5)315 3981 y(3.2.5)94 +b(Error)26 b(ob)5 b(jects)57 b(.)42 b(.)g(.)f(.)h(.)f(.)h(.)f(.)h(.)f +(.)h(.)g(.)f(.)h(.)f(.)h(.)f(.)h(.)g(.)f(.)h(.)f(.)h(.)f(.)h(.)g(.)f(.) +h(.)f(.)h(.)f(.)h(.)f(.)h(.)g(.)f(.)h(.)f(.)h(.)f(.)h(.)134 +b(5)315 4138 y(3.2.6)94 b(Memory)27 b(Managemen)n(t)65 +b(.)42 b(.)f(.)h(.)f(.)h(.)g(.)f(.)h(.)f(.)h(.)f(.)h(.)g(.)f(.)h(.)f(.) +h(.)f(.)h(.)g(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)g(.)f(.)h(.)f(.)h(.)f +(.)h(.)134 b(5)315 4294 y(3.2.7)94 b(Storage)26 b(classes)64 +b(.)42 b(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)g(.)f(.)h(.)f(.)h(.)f(.)h(.) +g(.)f(.)h(.)f(.)h(.)f(.)h(.)g(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)g(.)f +(.)h(.)f(.)h(.)f(.)h(.)134 b(5)0 4534 y Fd(4)77 b(Di\033erences)30 +b(F)-8 b(rom)31 b(RF)m(Cs)2750 b(5)125 4690 y Ff(4.1)83 +b(Pseudo)28 b(Comp)r(onen)n(ts)62 b(.)42 b(.)g(.)f(.)h(.)f(.)h(.)f(.)h +(.)f(.)h(.)g(.)f(.)h(.)f(.)h(.)f(.)h(.)g(.)f(.)h(.)f(.)h(.)f(.)h(.)g(.) +f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)g(.)f(.)h(.)f(.)h(.)f(.)h(.)134 +b(5)125 4847 y(4.2)83 b(Com)n(bined)28 b(V)-7 b(alues)108 +b(.)41 b(.)h(.)g(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)g(.)f(.)h(.)f(.)h(.) +f(.)h(.)g(.)f(.)h(.)f(.)h(.)f(.)h(.)g(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h +(.)g(.)f(.)h(.)f(.)h(.)f(.)h(.)134 b(6)125 5003 y(4.3)83 +b(Multi-V)-7 b(alued)28 b(Prop)r(erties)54 b(.)41 b(.)h(.)f(.)h(.)f(.)h +(.)f(.)h(.)g(.)f(.)h(.)f(.)h(.)f(.)h(.)g(.)f(.)h(.)f(.)h(.)f(.)h(.)g(.) +f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)g(.)f(.)h(.)f(.)h(.)f(.)h(.)134 +b(6)0 5243 y Fd(5)77 b(Implemen)m(tation)28 b(Limitations)2557 +b(7)p eop +%%Page: 2 2 +2 1 bop 0 -167 3900 5 v 0 -200 a Fd(1.)73 b(In)m(tro)s(duction)3184 +b Ff(2)0 162 y Fd(6)77 b(Using)31 b(libical)3208 b(7)125 +318 y Ff(6.1)83 b(Creating)27 b(Comp)r(onen)n(ts)73 b(.)42 +b(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)g(.)f(.)h(.)f(.)h(.)f(.)h(.)g(.)f +(.)h(.)f(.)h(.)f(.)h(.)g(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)g(.)f(.)h(.) +f(.)h(.)f(.)h(.)134 b(7)315 475 y(6.1.1)94 b(Constructor)26 +b(In)n(terfaces)48 b(.)42 b(.)f(.)h(.)f(.)h(.)g(.)f(.)h(.)f(.)h(.)f(.)h +(.)g(.)f(.)h(.)f(.)h(.)f(.)h(.)g(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)g(.) +f(.)h(.)f(.)h(.)f(.)h(.)134 b(7)315 631 y(6.1.2)94 b(v)-5 +b(aargs)26 b(Constructors)70 b(.)41 b(.)h(.)f(.)h(.)f(.)h(.)g(.)f(.)h +(.)f(.)h(.)f(.)h(.)g(.)f(.)h(.)f(.)h(.)f(.)h(.)g(.)f(.)h(.)f(.)h(.)f(.) +h(.)f(.)h(.)g(.)f(.)h(.)f(.)h(.)f(.)h(.)134 b(7)315 788 +y(6.1.3)94 b(P)n(arsing)26 b(T)-7 b(ext)28 b(Files)68 +b(.)42 b(.)f(.)h(.)f(.)h(.)f(.)h(.)g(.)f(.)h(.)f(.)h(.)f(.)h(.)g(.)f(.) +h(.)f(.)h(.)f(.)h(.)g(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)g(.)f(.)h(.)f +(.)h(.)f(.)h(.)134 b(8)125 944 y(6.2)83 b(A)n(ccessing)27 +b(Comp)r(onen)n(ts)105 b(.)41 b(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)g(.)f(.)h +(.)f(.)h(.)f(.)h(.)g(.)f(.)h(.)f(.)h(.)f(.)h(.)g(.)f(.)h(.)f(.)h(.)f(.) +h(.)f(.)h(.)g(.)f(.)h(.)f(.)h(.)f(.)h(.)93 b(10)315 1101 +y(6.2.1)h(Finding)28 b(Comp)r(onen)n(ts)99 b(.)42 b(.)f(.)h(.)f(.)h(.)g +(.)f(.)h(.)f(.)h(.)f(.)h(.)g(.)f(.)h(.)f(.)h(.)f(.)h(.)g(.)f(.)h(.)f(.) +h(.)f(.)h(.)f(.)h(.)g(.)f(.)h(.)f(.)h(.)f(.)h(.)93 b(10)315 +1257 y(6.2.2)h(In)n(terating)27 b(Through)f(Comp)r(onen)n(ts)66 +b(.)41 b(.)h(.)f(.)h(.)f(.)h(.)g(.)f(.)h(.)f(.)h(.)f(.)h(.)g(.)f(.)h(.) +f(.)h(.)f(.)h(.)f(.)h(.)g(.)f(.)h(.)f(.)h(.)f(.)h(.)93 +b(10)315 1413 y(6.2.3)h(Using)27 b(Comp)r(onen)n(t)h(Iterators)59 +b(.)41 b(.)h(.)g(.)f(.)h(.)f(.)h(.)f(.)h(.)g(.)f(.)h(.)f(.)h(.)f(.)h(.) +g(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)g(.)f(.)h(.)f(.)h(.)f(.)h(.)93 +b(11)315 1570 y(6.2.4)h(Remo)n(ving)27 b(Comp)r(onen)n(ts)83 +b(.)41 b(.)h(.)f(.)h(.)g(.)f(.)h(.)f(.)h(.)f(.)h(.)g(.)f(.)h(.)f(.)h(.) +f(.)h(.)g(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)g(.)f(.)h(.)f(.)h(.)f(.)h +(.)93 b(11)315 1726 y(6.2.5)h(W)-7 b(orking)27 b(with)h(prop)r(erties)e +(and)i(parameters)e(.)41 b(.)h(.)g(.)f(.)h(.)f(.)h(.)f(.)h(.)g(.)f(.)h +(.)f(.)h(.)f(.)h(.)f(.)h(.)g(.)f(.)h(.)f(.)h(.)f(.)h(.)93 +b(12)315 1883 y(6.2.6)h(W)-7 b(orking)27 b(with)h(v)-5 +b(alues)52 b(.)41 b(.)h(.)f(.)h(.)f(.)h(.)g(.)f(.)h(.)f(.)h(.)f(.)h(.)g +(.)f(.)h(.)f(.)h(.)f(.)h(.)g(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)g(.)f(.) +h(.)f(.)h(.)f(.)h(.)93 b(12)315 2039 y(6.2.7)h(W)-7 b(orking)27 +b(with)h(parameters)61 b(.)42 b(.)f(.)h(.)g(.)f(.)h(.)f(.)h(.)f(.)h(.)g +(.)f(.)h(.)f(.)h(.)f(.)h(.)g(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)g(.)f(.) +h(.)f(.)h(.)f(.)h(.)93 b(13)315 2196 y(6.2.8)h(Chec)n(king)27 +b(Comp)r(onen)n(t)g(V)-7 b(alidit)n(y)25 b(.)42 b(.)g(.)f(.)h(.)f(.)h +(.)f(.)h(.)g(.)f(.)h(.)f(.)h(.)f(.)h(.)g(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.) +h(.)g(.)f(.)h(.)f(.)h(.)f(.)h(.)93 b(13)315 2352 y(6.2.9)h(Con)n(v)n +(erting)26 b(Comp)r(onen)n(ts)h(to)g(T)-7 b(ext)74 b(.)41 +b(.)h(.)f(.)h(.)f(.)h(.)g(.)f(.)h(.)f(.)h(.)f(.)h(.)g(.)f(.)h(.)f(.)h +(.)f(.)h(.)f(.)h(.)g(.)f(.)h(.)f(.)h(.)f(.)h(.)93 b(14)125 +2509 y(6.3)83 b(Time)33 b(.)42 b(.)f(.)h(.)g(.)f(.)h(.)f(.)h(.)f(.)h(.) +g(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)g(.)f(.)h(.)f(.)h(.)f(.)h(.)g(.)f +(.)h(.)f(.)h(.)f(.)h(.)g(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)g(.)f(.)h(.) +f(.)h(.)f(.)h(.)93 b(14)315 2665 y(6.3.1)h(Time)28 b(structure)56 +b(.)42 b(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)g(.)f(.)h(.)f(.)h(.)f(.)h(.) +g(.)f(.)h(.)f(.)h(.)f(.)h(.)g(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)g(.)f +(.)h(.)f(.)h(.)f(.)h(.)93 b(14)315 2822 y(6.3.2)h(Time)28 +b(manipulating)f(routines)38 b(.)j(.)h(.)g(.)f(.)h(.)f(.)h(.)f(.)h(.)g +(.)f(.)h(.)f(.)h(.)f(.)h(.)g(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)g(.)f(.) +h(.)f(.)h(.)f(.)h(.)93 b(14)125 2978 y(6.4)83 b(Storing)27 +b(Ob)5 b(jects)39 b(.)i(.)h(.)f(.)h(.)g(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h +(.)g(.)f(.)h(.)f(.)h(.)f(.)h(.)g(.)f(.)h(.)f(.)h(.)f(.)h(.)g(.)f(.)h(.) +f(.)h(.)f(.)h(.)f(.)h(.)g(.)f(.)h(.)f(.)h(.)f(.)h(.)93 +b(16)125 3135 y(6.5)83 b(Memory)27 b(Managemen)n(t)73 +b(.)42 b(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)g(.)f(.)h(.)f(.)h(.)f(.)h(.) +g(.)f(.)h(.)f(.)h(.)f(.)h(.)g(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)g(.)f +(.)h(.)f(.)h(.)f(.)h(.)93 b(16)125 3291 y(6.6)83 b(Error)27 +b(Handling)56 b(.)41 b(.)h(.)f(.)h(.)g(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h +(.)g(.)f(.)h(.)f(.)h(.)f(.)h(.)g(.)f(.)h(.)f(.)h(.)f(.)h(.)g(.)f(.)h(.) +f(.)h(.)f(.)h(.)f(.)h(.)g(.)f(.)h(.)f(.)h(.)f(.)h(.)93 +b(16)315 3448 y(6.6.1)h(Return)28 b(v)-5 b(alues)34 b(.)42 +b(.)g(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)g(.)f(.)h(.)f(.)h(.)f(.)h(.)g +(.)f(.)h(.)f(.)h(.)f(.)h(.)g(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)g(.)f(.) +h(.)f(.)h(.)f(.)h(.)93 b(16)315 3604 y(6.6.2)h(icalerrno)28 +b(.)41 b(.)h(.)f(.)h(.)g(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)g(.)f(.)h(.) +f(.)h(.)f(.)h(.)g(.)f(.)h(.)f(.)h(.)f(.)h(.)g(.)f(.)h(.)f(.)h(.)f(.)h +(.)f(.)h(.)g(.)f(.)h(.)f(.)h(.)f(.)h(.)93 b(17)315 3760 +y(6.6.3)h(X-LIC-ERR)n(OR)27 b(and)g(X-LIC-INV)-9 b(ALID-COMPONENT)70 +b(.)42 b(.)g(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)g(.)f(.)h(.)f(.)h(.)f(.) +h(.)93 b(17)125 3917 y(6.7)83 b(Naming)28 b(Standard)h(.)42 +b(.)f(.)h(.)g(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)g(.)f(.)h(.)f(.)h(.)f +(.)h(.)g(.)f(.)h(.)f(.)h(.)f(.)h(.)g(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.) +g(.)f(.)h(.)f(.)h(.)f(.)h(.)93 b(18)0 4156 y Fd(7)77 +b(Useful)31 b(Recipies)3038 b(18)0 4396 y(8)77 b(P)m(erformance)3153 +b(18)0 4635 y(9)77 b(Hac)m(ks)32 b(and)g(Bugs)3009 b(18)0 +4974 y Fe(1)131 b(In)l(tro)t(duction)0 5212 y Ff(Libical)23 +b(is)f(an)h(Op)r(en)g(Source)f(implemen)n(tation)h(of)g(the)g +(iCalendar)f(proto)r(cols)f(and)i(proto)r(col)e(data)i(units.)35 +b(The)23 b(iCalendar)0 5326 y(sp)r(eci\034cation)k(describ)r(es)g(ho)n +(w)f(calendar)g(clien)n(ts)i(can)f(comm)n(unicate)f(with)i(calendar)e +(serv)n(ers)f(for)i(users)g(can)g(store)f(their)p eop +%%Page: 3 3 +3 2 bop 0 -167 3900 5 v 0 -200 a Fd(2.)73 b(Building)31 +b(the)g(Library)2847 b Ff(3)0 162 y(calendar)26 b(data)h(and)h(arrange) +d(meetings)i(with)h(other)f(users.)0 318 y(Libical)g(implemen)n(ts)h (RF)n(C2445)e(and)h(RF)n(C2446.)35 b(Ev)n(en)n(tually)-7 b(,)27 b(it)h(will)g(also)e(implemen)n(t)j(iRIP)f(and)f(CAP)-7 -b(.)0 1996 y(This)32 b(do)r(cumen)n(tation)g(assumes)g(that)g(y)n(ou)g +b(.)0 475 y(This)32 b(do)r(cumen)n(tation)g(assumes)g(that)g(y)n(ou)g (are)f(familiar)h(with)h(the)f(iCalendar)f(standards)g(RF)n(C2445)g -(and)h(RF)n(C2446.)0 2110 y(these)c(sp)r(eci\034cations)e(are)h(online) -g(on)h(the)g(CALSCH)g(w)n(ebpage)e(at:)0 2308 y Fd(http://www.imc.o)o -(rg)o(/ie)o(tf)o(-c)o(ale)o(nd)o(ar)o(/)0 2706 y Fc(1.1)112 -b(The)38 b(libical)c(pro)6 b(ject)0 2916 y Fh(This)29 +(and)h(RF)n(C2446.)0 588 y(these)c(sp)r(eci\034cations)e(are)h(online)g +(on)h(the)g(CALSCH)g(w)n(ebpage)e(at:)0 828 y Fc(http://www.imc.o)o(rg) +o(/ie)o(tf)o(-c)o(ale)o(nd)o(ar)o(/)0 1119 y Fb(1.1)112 +b(The)38 b(libical)c(pro)6 b(ject)0 1329 y Ff(This)29 b(co)r(de)g(is)g(under)g(activ)n(e)f(dev)n(elopmen)n(t.)40 b(If)30 b(y)n(ou)e(w)n(ould)h(lik)n(e)f(to)h(con)n(tribute)g(to)g(the)g (pro)5 b(ject,)29 b(y)n(ou)f(can)h(con)n(tact)f(me,)0 -3029 y(Eric)g(Busb)r(o)r(om,)f(at)g(eric@soft)n(w)n(arestudio.org.)33 +1443 y(Eric)g(Busb)r(o)r(om,)f(at)g(eric@soft)n(w)n(arestudio.org.)33 b(The)27 b(pro)5 b(ject)27 b(has)g(a)g(w)n(ebpage)g(at)0 -3227 y Fd(http://softwares)o(tu)o(dio)o(.o)o(rg)o(/li)o(bi)o(ca)o(l/i)o -(nd)o(ex)o(.ht)o(ml)0 3539 y Fh(and)g(a)h(mailing)f(list)g(that)h(y)n +1682 y Fc(http://softwares)o(tu)o(dio)o(.o)o(rg)o(/li)o(bi)o(ca)o(l/i)o +(nd)o(ex)o(.ht)o(ml)0 1922 y Ff(and)g(a)h(mailing)f(list)g(that)h(y)n (ou)f(can)g(join)h(b)n(y)f(sending)g(the)h(follo)n(wing)f(mail:)0 -3737 y Fd(To:)42 b(minimalist@softwa)o(re)o(st)o(udi)o(o.)o(or)o(g)0 -3850 y(Subject:)e(subscribe)g(libical)0 4248 y Fc(1.2)112 -b(License)0 4458 y Fh(The)60 b(co)r(de)f(and)h(data\034les)f(in)h(this) +2161 y Fc(To:)42 b(minimalist@softwa)o(re)o(st)o(udi)o(o.)o(or)o(g)0 +2275 y(Subject:)e(subscribe)g(libical)0 2566 y Fb(1.2)112 +b(License)0 2777 y Ff(The)60 b(co)r(de)f(and)h(data\034les)f(in)h(this) g(distribution)g(are)e(licensed)i(under)g(the)g(Mozilla)f(Public)h -(License.)133 b(See)0 4572 y(h)n(ttp://www.mozilla.org/NPL/MPL-1.0.h)n +(License.)133 b(See)0 2890 y(h)n(ttp://www.mozilla.org/NPL/MPL-1.0.h)n (tml)37 b(for)j(a)h(cop)n(y)f(of)g(the)i(license.)76 b(Alternately)-7 b(,)44 b(y)n(ou)c(ma)n(y)g(use)g(libical)0 -4686 y(under)32 b(the)g(terms)g(of)g(the)g(GNU)h(Library)d(General)h +3004 y(under)32 b(the)g(terms)g(of)g(the)g(GNU)h(Library)d(General)h (Public)i(License.)50 b(See)32 b(h)n(ttp://www.fsf.org/cop)n -(yleft/lesser.h)n(tml)0 4799 y(for)27 b(a)g(cop)n(y)g(of)g(the)h(LGPL.) -0 4956 y(This)j(dual)g(license)f(ensures)h(that)g(the)g(library)f(can)g +(yleft/lesser.h)n(tml)0 3117 y(for)27 b(a)g(cop)n(y)g(of)g(the)h(LGPL.) +0 3274 y(This)j(dual)g(license)f(ensures)h(that)g(the)g(library)f(can)g (b)r(e)i(incorp)r(orated)d(in)n(to)i(b)r(oth)g(proprietary)e(co)r(de)i -(and)f(GPL'd)i(pro-)0 5069 y(grams,)23 b(and)h(will)h(b)r(ene\034t)g +(and)f(GPL'd)i(pro-)0 3387 y(grams,)23 b(and)h(will)h(b)r(ene\034t)g (from)f(impro)n(v)n(emen)n(ts)e(made)i(b)n(y)g(programmers)e(in)i(b)r (oth)h(realms.)34 b(I)25 b(will)f(only)g(accept)g(c)n(hanges)0 -5183 y(in)n(to)j(m)n(y)h(v)n(ersion)e(of)h(the)h(library)e(if)i(they)g -(are)f(similarly)f(dual-licensed.)0 5467 y Fc(1.3)112 -b(Example)37 b(Co)s(de)0 5677 y Fh(A)h(lot)f(of)h(the)g(do)r(cumen)n +3501 y(in)n(to)j(m)n(y)h(v)n(ersion)e(of)h(the)h(library)e(if)i(they)g +(are)f(similarly)f(dual-licensed.)0 3792 y Fb(1.3)112 +b(Example)37 b(Co)s(de)0 4003 y Ff(A)h(lot)f(of)h(the)g(do)r(cumen)n (tation)f(for)g(this)h(library)e(is)i(in)g(the)g(form)f(of)g(example)g (co)r(de.)67 b(These)37 b(examples)g(are)g(in)h(the)0 -5791 y("examples")26 b(directory)g(of)i(the)g(distribution.)36 +4116 y("examples")26 b(directory)g(of)i(the)g(distribution.)36 b(Also)28 b(lo)r(ok)e(in)i("src/test")e(for)h(more)g(annotated)g -(examples.)0 6122 y Fe(2)131 b(Building)46 b(the)e(Library)0 -6361 y Fh(Libical)37 b(uses)g(auto)r(conf)h(to)f(generate)f(mak)n +(examples.)0 4454 y Fe(2)131 b(Building)46 b(the)e(Library)0 +4693 y Ff(Libical)37 b(uses)g(auto)r(conf)h(to)f(generate)f(mak)n (e\034les,)k(although)c(it)i(uses)g(none)f(of)h(the)g(auto)r(conf)f -(\035ags)f(to)i(in\035uence)g(the)0 6474 y(compilation.)e(It)28 -b(should)f(built)i(with)f(no)f(adjustmen)n(ts)h(on)f(Lin)n(ux,)g(F)-7 -b(reeBSD)28 b(and)f(Solaris.)0 6805 y Fe(3)131 b(Structure)0 -7044 y Fh(The)28 b(iCal)f(calendar)f(mo)r(del)i(is)f(based)g(on)h(four) -f(t)n(yp)r(es)g(of)h(ob)5 b(jects:)36 b(comp)r(onen)n(ts,)27 -b(prop)r(erties,)g(v)-5 b(alues)27 b(and)g(parameters.)0 -7201 y(Prop)r(erties)32 b(are)f(the)i(fundamen)n(tal)f(unit)i(of)e -(information)g(in)g(iCal,)i(and)e(they)g(w)n(ork)f(a)h(bit)h(lik)n(e)f -(a)g(hash)g(en)n(try)-7 b(,)34 b(with)e(a)0 7314 y(constan)n(t)21 -b(k)n(ey)h(and)g(a)f(v)-5 b(ariable)21 b(v)-5 b(alue.)35 -b(Prop)r(erties)21 b(ma)n(y)h(also)f(ha)n(v)n(e)g(mo)r(di\034ers,)h -(called)g(parameters.)33 b(In)22 b(the)h(iCal)f(con)n(ten)n(t)0 -7428 y(line)0 7626 y Fd(ORGANIZER;ROLE=C)o(HA)o(IR:)o(MA)o(IL)o(TO:)o -(mr)o(bi)o(g@h)o(os)o(t.)o(com)p eop -%%Page: 2 2 -2 1 bop 0 -167 3900 5 v 0 -200 a Fb(3.)73 b(Structure)3313 -b Fh(2)0 162 y(The)34 b(prop)r(ert)n(y)f(name)h(is)g("OR)n(GANIZER,")g -(the)g(v)-5 b(alue)34 b(of)h(the)f(prop)r(ert)n(y)f(is)h -("mrbig@host.com")e(and)i(the)g("R)n(OLE")0 275 y(parameter)26 -b(sp)r(eci\034es)h(that)h(Mr)g(Big)f(is)g(the)h(c)n(hair)e(of)i(the)g -(meetings)f(asso)r(ciated)f(with)i(this)g(prop)r(ert)n(y)-7 -b(.)0 432 y(Comp)r(onen)n(ts)26 b(are)f(groups)g(of)h(prop)r(erties)f -(that)i(represen)n(t)e(the)i(core)e(ob)5 b(jects)26 b(of)g(a)g -(calendar)f(system,)h(suc)n(h)g(as)g(ev)n(en)n(ts)f(or)0 -545 y(timezones.)0 702 y(The)k(cen)n(tral)f(goal)g(of)h(libical)g(is)g -(to)g(parse)f(iTIP)i(data)e(in)n(to)h(an)g(in)n(ternal)f(represen)n -(tation)g(of)h(Comp)r(onen)n(ts,)g(Prop)r(erties,)0 815 -y(P)n(arameters)d(an)h(V)-7 b(alues,)27 b(and)h(to)f(allo)n(w)g(the)h -(user)f(to)g(manipulate)g(the)h(data)g(in)f(v)-5 b(arious)27 -b(w)n(a)n(ys)0 942 y Fg(1)37 972 y Fh(When)h(a)f(comp)r(onen)n(t)h(is)f -(sen)n(t)h(across)d(a)i(net)n(w)n(ork,)f(if)j(it)f(is)f(un-encrypted,)g -(it)h(will)g(lo)r(ok)f(something)g(lik)n(e:)p 0 1041 -3900 4 v 0 1218 a Fd(BEGIN:VEVENT)0 1331 y(DTSTAMP:19980309)o(T2)o(310) -o(00)o(Z)0 1445 y(UID:guid-1.host1)o(.c)o(om)0 1558 y(ORGANIZER;ROLE=C) +(\035ags)f(to)i(in\035uence)g(the)0 4807 y(compilation.)44 +b(It)31 b(should)f(built)h(with)g(no)f(adjustmen)n(ts)h(on)f(Lin)n(ux,) +h(F)-7 b(reeBSD)30 b(and)g(Solaris)f(under)h(gcc.)45 +b(Some)30 b(v)n(ersion)0 4920 y(ha)n(v)n(e)36 b(b)r(een)h(successfully) +f(b)r(een)i(build)f(on)f(MacOS,)h(Solaris)e(and)i(UnixW)-7 +b(are)36 b(without)h(gcc,)i(but)e(y)n(ou)g(ma)n(y)f(run)g(in)n(to)0 +5034 y(problems)27 b(with)h(a)f(particular)f(later)h(v)n(ersion.)0 +5190 y(F)-7 b(or)27 b(a)g(more)g(complete)g(guide)h(to)f(building)h +(the)g(library)-7 b(,)26 b(see)h(the)h(README)i(\034le)e(in)f(the)h +(distribution.)p eop +%%Page: 4 4 +4 3 bop 0 -167 3900 5 v 0 -200 a Fd(3.)73 b(Structure)3313 +b Ff(4)0 162 y Fe(3)131 b(Structure)0 400 y Ff(The)28 +b(iCal)f(calendar)f(mo)r(del)i(is)f(based)g(on)h(four)f(t)n(yp)r(es)g +(of)h(ob)5 b(jects:)36 b(comp)r(onen)n(ts,)27 b(prop)r(erties,)g(v)-5 +b(alues)27 b(and)g(parameters.)0 557 y(Prop)r(erties)32 +b(are)f(the)i(fundamen)n(tal)f(unit)i(of)e(information)g(in)g(iCal,)i +(and)e(they)g(w)n(ork)f(a)h(bit)h(lik)n(e)f(a)g(hash)g(en)n(try)-7 +b(,)34 b(with)e(a)0 670 y(constan)n(t)21 b(k)n(ey)h(and)g(a)f(v)-5 +b(ariable)21 b(v)-5 b(alue.)35 b(Prop)r(erties)21 b(ma)n(y)h(also)f(ha) +n(v)n(e)g(mo)r(di\034ers,)h(called)g(parameters.)33 b(In)22 +b(the)h(iCal)f(con)n(ten)n(t)0 784 y(line)0 1023 y Fc(ORGANIZER;ROLE=C) o(HA)o(IR:)o(MA)o(IL)o(TO:)o(mr)o(bi)o(g@h)o(os)o(t.)o(com)0 -1672 y(ATTENDEE;RSVP=TR)o(UE)o(;RO)o(LE)o(=R)o(EQ-)o(PA)o(RT)o(ICI)o -(PA)o(NT)o(;CU)o(TY)o(PE)o(=GR)o(OU)o(P:)87 1786 y(MAILTO:employee-)o -(A@h)o(os)o(t.)o(com)0 1899 y(DESCRIPTION:Proj)o(ec)o(t)38 -b(XYZ)k(Review)f(Meeting)0 2013 y(CATEGORIES:MEETI)o(NG)0 -2126 y(CLASS:PUBLIC)0 2240 y(CREATED:19980309)o(T1)o(300)o(00)o(Z)0 -2353 y(SUMMARY:XYZ)e(Project)i(Review)0 2467 y(DTSTART;TZID=US-)o(Ea)o -(ste)o(rn)o(:1)o(998)o(03)o(12)o(T08)o(30)o(00)0 2581 +1263 y Ff(The)34 b(prop)r(ert)n(y)f(name)h(is)g("OR)n(GANIZER,")g(the)g +(v)-5 b(alue)34 b(of)h(the)f(prop)r(ert)n(y)f(is)h("mrbig@host.com")e +(and)i(the)g("R)n(OLE")0 1377 y(parameter)26 b(sp)r(eci\034es)h(that)h +(Mr)g(Big)f(is)g(the)h(c)n(hair)e(of)i(the)g(meetings)f(asso)r(ciated)f +(with)i(this)g(prop)r(ert)n(y)-7 b(.)0 1533 y(Comp)r(onen)n(ts)26 +b(are)f(groups)g(of)h(prop)r(erties)f(that)i(represen)n(t)e(the)i(core) +e(ob)5 b(jects)26 b(of)g(a)g(calendar)f(system,)h(suc)n(h)g(as)g(ev)n +(en)n(ts)f(or)0 1647 y(timezones.)0 1803 y(The)k(cen)n(tral)f(goal)g +(of)h(libical)g(is)g(to)g(parse)f(iTIP)i(data)e(in)n(to)h(an)g(in)n +(ternal)f(represen)n(tation)g(of)h(Comp)r(onen)n(ts,)g(Prop)r(erties,)0 +1917 y(P)n(arameters)d(an)h(V)-7 b(alues,)27 b(and)h(to)f(allo)n(w)g +(the)h(user)f(to)g(manipulate)g(the)h(data)g(in)f(v)-5 +b(arious)27 b(w)n(a)n(ys)0 2073 y(When)h(a)f(comp)r(onen)n(t)g(is)h +(sen)n(t)f(across)f(a)h(net)n(w)n(ork,)f(if)i(it)g(is)g(un-encrypted,)f +(it)h(will)g(lo)r(ok)f(something)g(lik)n(e:)0 2313 y +Fc(BEGIN:VEVENT)0 2426 y(DTSTAMP:19980309)o(T2)o(310)o(00)o(Z)0 +2540 y(UID:guid-1.host1)o(.c)o(om)0 2653 y(ORGANIZER;ROLE=C)o(HA)o(IR:) +o(MA)o(IL)o(TO:)o(mr)o(bi)o(g@h)o(os)o(t.)o(com)0 2767 +y(ATTENDEE;RSVP=TR)o(UE)o(;RO)o(LE)o(=R)o(EQ-)o(PA)o(RT)o(ICI)o(PA)o +(NT)o(;CU)o(TY)o(PE)o(=GR)o(OU)o(P:)87 2880 y(MAILTO:employee-)o(A@h)o +(os)o(t.)o(com)0 2994 y(DESCRIPTION:Proj)o(ec)o(t)38 +b(XYZ)k(Review)f(Meeting)0 3108 y(CATEGORIES:MEETI)o(NG)0 +3221 y(CLASS:PUBLIC)0 3335 y(CREATED:19980309)o(T1)o(300)o(00)o(Z)0 +3448 y(SUMMARY:XYZ)e(Project)i(Review)0 3562 y(DTSTART;TZID=US-)o(Ea)o +(ste)o(rn)o(:1)o(998)o(03)o(12)o(T08)o(30)o(00)0 3675 y(DTEND;TZID=US-Ea)o(st)o(ern)o(:1)o(99)o(803)o(12)o(T0)o(930)o(00)0 -2694 y(LOCATION:1CP)d(Conference)i(Room)i(4350)0 2808 -y(END:VEVENT)p 0 3008 V 0 3235 a Fc(3.1)112 b(Core)37 -b(iCal)f(classes)0 3446 y Fb(3.1.1)94 b(Comp)s(onen)m(ts)0 -3656 y(3.1.2)g(Prop)s(erties)0 3866 y(3.1.3)g(V)-8 b(alues)0 -4076 y(3.1.4)94 b(P)m(arameters)0 4305 y Fc(3.2)112 b(Other)37 -b(elemen)m(ts)g(of)g(libical)0 4515 y Fh(In)26 b(addition)f(to)h(the)g +3789 y(LOCATION:1CP)d(Conference)i(Room)i(4350)0 3903 +y(END:VEVENT)p eop +%%Page: 5 5 +5 4 bop 0 -167 3900 5 v 0 -200 a Fd(4.)73 b(Di\033erences)31 +b(F)-8 b(rom)31 b(RF)m(Cs)2732 b Ff(5)0 162 y Fb(3.1)112 +b(Core)37 b(iCal)f(classes)0 372 y Fd(3.1.1)94 b(Comp)s(onen)m(ts)0 +582 y(3.1.2)g(Prop)s(erties)0 792 y(3.1.3)g(V)-8 b(alues)0 +1002 y(3.1.4)94 b(P)m(arameters)0 1231 y Fb(3.2)112 b(Other)37 +b(elemen)m(ts)g(of)g(libical)0 1441 y Ff(In)26 b(addition)f(to)h(the)g (core)e(iCal)h(classes,)g(libical)g(has)g(man)n(y)g(other)g(t)n(yp)r (es,)h(structures,)g(classes)e(that)i(aid)f(in)h(creating)e(and)0 -4628 y(using)j(iCal)g(comp)r(onen)n(ts.)104 4735 y Fa(1)p -eop -%%Page: 3 3 -3 2 bop 0 -167 3900 5 v 0 -200 a Fb(4.)73 b(Di\033erences)31 -b(F)-8 b(rom)31 b(RF)m(Cs)2732 b Fh(3)0 162 y Fb(3.2.1)94 -b(En)m(umerations)0 372 y(3.2.2)g(T)m(yp)s(es)0 582 y(3.2.3)g(The)32 -b(P)m(arser)0 792 y(3.2.4)94 b(Restrictions)0 1002 y(3.2.5)g(Error)32 -b(ob)5 b(jects)0 1212 y(3.2.6)94 b(Memory)30 b(Managemen)m(t)0 -1422 y(3.2.7)94 b(Storage)32 b(classes)0 1689 y Fe(4)131 -b(Di\033erences)44 b(F)-11 b(rom)43 b(RF)l(Cs)0 1928 -y Fh(Libical)c(has)f(b)r(een)h(designed)g(to)f(follo)n(w)h(the)g -(standards)e(as)i(closely)f(as)g(p)r(ossible,)j(so)e(that)g(the)g(k)n -(ey)f(ob)5 b(jects)39 b(in)g(the)0 2041 y(standards)30 -b(are)g(also)g(k)n(eey)g(ob)5 b(jects)31 b(in)h(the)f(library)-7 -b(.)47 b(Ho)n(w)n(ev)n(er,)30 b(there)h(are)f(a)h(few)g(areas)e(where)i -(the)h(sp)r(eci\034cations)e(are)0 2155 y(\(arguably\))g(irregular,)h -(and)g(follo)n(wing)g(them)h(exactly)f(w)n(ould)g(result)h(in)g(an)f -(unfriendly)h(in)n(terface.)49 b(These)31 b(deviations)0 -2268 y(mak)n(e)c(libical)g(easier)f(to)i(use)f(b)n(y)h(main)n(taining)e -(a)h(self-similar)g(in)n(terface.)0 2560 y Fc(4.1)112 -b(Pseudo)38 b(Comp)s(onen)m(ts)0 2770 y Fh(Libical)29 -b(de\034nes)g(comp)r(onen)n(ts)g(for)g(groups)f(of)h(prop)r(erties)f -(that)i(lo)r(ok)f(and)g(act)g(lik)n(e)g(comp)r(onen)n(ts,)g(but)h(are)e -(not)i(de\034ned)0 2884 y(as)e(comp)r(onen)n(ts)h(in)g(the)g(sp)r -(eci\034cation.)41 b(XD)n(A)-7 b(YLIGHT)30 b(and)f(XST)-7 -b(AND)n(ARD)30 b(are)e(notable)h(examples.)40 b(These)29 -b(pseudo)0 2997 y(comp)r(onen)n(ts)d(group)f(prop)r(erties)g(within)i -(the)g(VTIMEZONE)g(comp)r(onen)n(ts.)36 b(F)-7 b(or)25 -b(instanace,)h(the)h(timezone)f(prop)r(erties)0 3111 -y(asso)r(ciated)f(with)i(da)n(yligh)n(t)e(sa)n(vings)g(time)i(starts)e -(with)i("BEGIN:D)n(A)-7 b(YLIGHT")27 b(and)f(ends)h(with)f("END:D)n(A) --7 b(YLIGHT,)0 3224 y(just)32 b(lik)n(e)g(other)f(comp)r(onen)n(ts,)h -(but)g(is)g(not)g(de\034ned)g(as)f(a)g(comp)r(onen)n(t)g(in)h(RF)n -(C2445.)48 b(\()32 b(See)f(RF)n(C2445,)g(page)g(61)g(\))h(In)0 -3338 y(Libical,this)d(grouping)e(is)i(represen)n(ted)e(b)n(y)i(the)g +1555 y(using)j(iCal)g(comp)r(onen)n(ts.)0 1827 y Fd(3.2.1)94 +b(En)m(umerations)0 2037 y(3.2.2)g(T)m(yp)s(es)0 2247 +y(3.2.3)g(The)32 b(parser)0 2457 y(3.2.4)94 b(Restrictions)0 +2668 y(3.2.5)g(Error)32 b(ob)5 b(jects)0 2878 y(3.2.6)94 +b(Memory)30 b(Managemen)m(t)0 3088 y(3.2.7)94 b(Storage)32 +b(classes)0 3355 y Fe(4)131 b(Di\033erences)44 b(F)-11 +b(rom)43 b(RF)l(Cs)0 3593 y Ff(Libical)c(has)f(b)r(een)h(designed)g(to) +f(follo)n(w)h(the)g(standards)e(as)i(closely)f(as)g(p)r(ossible,)j(so)e +(that)g(the)g(k)n(ey)f(ob)5 b(jects)39 b(in)g(the)0 3707 +y(standards)30 b(are)g(also)g(k)n(eey)g(ob)5 b(jects)31 +b(in)h(the)f(library)-7 b(.)47 b(Ho)n(w)n(ev)n(er,)30 +b(there)h(are)f(a)h(few)g(areas)e(where)i(the)h(sp)r(eci\034cations)e +(are)0 3820 y(\(arguably\))g(irregular,)h(and)g(follo)n(wing)g(them)h +(exactly)f(w)n(ould)g(result)h(in)g(an)f(unfriendly)h(in)n(terface.)49 +b(These)31 b(deviations)0 3934 y(mak)n(e)c(libical)g(easier)f(to)i(use) +f(b)n(y)h(main)n(taining)e(a)h(self-similar)g(in)n(terface.)0 +4225 y Fb(4.1)112 b(Pseudo)38 b(Comp)s(onen)m(ts)0 4436 +y Ff(Libical)29 b(de\034nes)g(comp)r(onen)n(ts)g(for)g(groups)f(of)h +(prop)r(erties)f(that)i(lo)r(ok)f(and)g(act)g(lik)n(e)g(comp)r(onen)n +(ts,)g(but)h(are)e(not)i(de\034ned)0 4549 y(as)e(comp)r(onen)n(ts)h(in) +g(the)g(sp)r(eci\034cation.)41 b(XD)n(A)-7 b(YLIGHT)30 +b(and)f(XST)-7 b(AND)n(ARD)30 b(are)e(notable)h(examples.)40 +b(These)29 b(pseudo)0 4663 y(comp)r(onen)n(ts)d(group)f(prop)r(erties)g +(within)i(the)g(VTIMEZONE)g(comp)r(onen)n(ts.)36 b(F)-7 +b(or)25 b(instanace,)h(the)h(timezone)f(prop)r(erties)0 +4776 y(asso)r(ciated)f(with)i(da)n(yligh)n(t)e(sa)n(vings)g(time)i +(starts)e(with)i("BEGIN:D)n(A)-7 b(YLIGHT")27 b(and)f(ends)h(with)f +("END:D)n(A)-7 b(YLIGHT,)0 4890 y(just)32 b(lik)n(e)g(other)f(comp)r +(onen)n(ts,)h(but)g(is)g(not)g(de\034ned)g(as)f(a)g(comp)r(onen)n(t)g +(in)h(RF)n(C2445.)48 b(\()32 b(See)f(RF)n(C2445,)g(page)g(61)g(\))h(In) +0 5003 y(Libical,this)d(grouping)e(is)i(represen)n(ted)e(b)n(y)i(the)g (XD)n(A)-7 b(YLIGHT)30 b(comp)r(onen)n(t.)41 b(Standard)28 -b(iCAL)h(comp)r(onen)n(ts)f(all)h(start)0 3451 y(with)f(the)g(letter)g -("V,")f(while)g(pseudo)g(comp)r(onen)n(ts)g(start)g(with"X.")0 -3608 y(There)35 b(are)g(also)g(pseudo)h(comp)r(onen)n(ts)f(that)i(are)e -(conceptually)g(deriv)n(ed)g(classess)f(of)i(V)-9 b(ALARM.)37 -b(RF)n(C2446)d(de\034nes)0 3721 y(what)d(prop)r(erties)f(ma)n(y)g(b)r -(e)h(included)g(in)g(eac)n(h)f(comp)r(onen)n(t,)i(and)e(for)h(V)-9 -b(ALARM,)31 b(the)g(set)g(of)g(prop)r(erties)f(it)h(ma)n(y)f(ha)n(v)n -(e)0 3835 y(dep)r(ends)e(on)f(the)h(v)-5 b(alue)28 b(of)f(the)h(A)n -(CTION)f(prop)r(ert)n(y)-7 b(.)0 3992 y(F)g(or)19 b(instance,)j(if)e(a) -g(V)-9 b(ALARM)20 b(comp)r(onen)n(t)g(has)f(an)h(A)n(CTION)g(prop)r -(ert)n(y)e(with)j(the)f(v)-5 b(alue)20 b(of)g("A)n(UDIO,")f(the)h(comp) -r(onen)n(t)0 4105 y(m)n(ust)h(also)g(ha)n(v)n(e)f(an)h("A)-7 -b(TT)g(A)n(CH")21 b(prop)r(ert)n(y)-7 b(.)34 b(Ho)n(w)n(ev)n(er,)20 -b(if)i(the)g(A)n(CTION)f(v)-5 b(alue)21 b(is)g("DISPLA)-7 -b(Y,")22 b(the)g(comp)r(onen)n(t)f(m)n(ust)0 4219 y(ha)n(v)n(e)26 -b(a)i(DESCRIPTION)g(prop)r(ert)n(y)-7 b(.)0 4375 y(T)g(o)28 -b(handle)g(these)g(v)-5 b(arious,)27 b(complex)h(restrictions,)f -(libical)h(has)g(pseudo)g(comp)r(onen)n(ts)f(for)h(eac)n(h)f(t)n(yp)r -(e)i(of)f(alarm:)37 b(XA)n(U-)0 4489 y(DIO)n(ALARM,)28 -b(XDISPLA)-7 b(Y)g(ALARM,)30 b(XEMAILALARM)f(and)f(XPR)n(OCEDUREALARM.) -0 4780 y Fc(4.2)112 b(Com)m(bined)37 b(V)-9 b(alues)0 -4990 y Fh(Man)n(y)34 b(v)-5 b(alues)34 b(can)g(tak)n(e)g(more)g(than)g -(one)h(t)n(yp)r(e.)58 b(TRIGGER,)35 b(for)f(instance,)i(can)e(ha)n(v)n -(e)g(a)g(v)-5 b(alue)34 b(t)n(yp)r(e)h(of)g(with)g(DU-)0 -5104 y(RA)-7 b(TION)32 b(or)f(of)h(D)n(A)-7 b(TE-TIME.)33 -b(These)f(m)n(ultiple)g(t)n(yp)r(es)g(mak)n(e)f(it)i(di\036cult)g(to)e -(create)g(routines)h(to)f(return)h(the)g(v)-5 b(alue)0 -5217 y(asso)r(ciated)26 b(with)i(a)f(prop)r(ert)n(y)-7 -b(.)0 5374 y(It)30 b(is)g(natural)g(to)f(ha)n(v)n(e)g(in)n(terfaces)g -(that)i(w)n(ould)e(return)h(the)g(v)-5 b(alue)30 b(of)g(a)g(prop)r(ert) -n(y)-7 b(,)29 b(but)i(it)f(is)g(cum)n(b)r(ersone)f(for)h(a)g(single)0 -5488 y(routine)i(to)g(return)g(m)n(ultiple)h(t)n(yp)r(es.)51 -b(So,)33 b(in)g(libical,)g(prop)r(erties)e(that)i(can)f(ha)n(v)n(e)f(m) -n(ultiple)i(t)n(yp)r(es)f(are)f(giv)n(en)h(a)g(single)0 -5601 y(t)n(yp)r(e)26 b(that)g(is)g(the)g(union)g(of)g(their)g(RF)n -(C2445)e(t)n(yp)r(es.)36 b(F)-7 b(or)26 b(instance,)g(in)g(libical,)g -(the)g(v)-5 b(alue)26 b(of)g(the)g(TRIGGER)h(prop)r(ert)n(y)0 -5715 y(resolv)n(es)e(to)j(struct)f(icaltriggert)n(yp)r(e.)35 -b(This)28 b(t)n(yp)r(e)f(is)h(a)f(union)h(of)f(a)g(DURA)-7 -b(TION)29 b(and)e(a)g(D)n(A)-7 b(TE-TIME.)p eop -%%Page: 4 4 -4 3 bop 0 -167 3900 5 v 0 -200 a Fb(5.)73 b(Implemen)m(tation)29 -b(Limitations)2539 b Fh(4)0 162 y Fc(4.3)112 b(Multi-V)-9 -b(alued)36 b(Prop)s(erties)0 372 y Fh(Some)31 b(prop)r(erties,)h(suc)n -(h)f(as)g(CA)-7 b(TEGORIES)33 b(ha)n(v)n(e)d(only)h(one)g(v)-5 -b(alue)32 b(t)n(yp)r(e,)h(but)f(eac)n(h)e(CA)-7 b(TEGORIES)33 -b(prop)r(ert)n(y)d(can)0 485 y(ha)n(v)n(e)24 b(m)n(ultiple)h(v)-5 -b(alue)25 b(instances.)35 b(This)25 b(also)f(results)g(in)h(a)g(cum)n -(b)r(ersome)f(in)n(terface)g(\025)g(CA)-7 b(TEGORIES)26 -b(accessors)d(w)n(ould)0 599 y(ha)n(v)n(e)k(to)i(return)f(a)g(list)g -(while)h(all)f(other)g(accessors)e(returned)i(a)g(single)g(v)-5 -b(alue.)39 b(In)29 b(libical,)g(all)f(prop)r(erties)f(ha)n(v)n(e)h(a)g -(single)0 712 y(v)-5 b(alue,)35 b(and)e(m)n(ulti-v)-5 -b(alued)33 b(prop)r(erties)f(are)h(brok)n(en)f(do)n(wn)g(in)n(to)h(m)n -(ultiple)h(single)f(v)-5 b(alued)33 b(prop)r(erties)g(during)f -(parsing.)0 826 y(That)c(is,)f(an)g(input)i(line)e(lik)n(e,)0 -1035 y Fd(CATEGORIES:)39 b(work,)i(home)0 1357 y Fh(b)r(ecomes)27 +b(iCAL)h(comp)r(onen)n(ts)f(all)h(start)0 5117 y(with)f(the)g(letter)g +("V,")f(while)g(pseudo)g(comp)r(onen)n(ts)g(start)g(with"X.")p +eop +%%Page: 6 6 +6 5 bop 0 -167 3900 5 v 0 -200 a Fd(4.)73 b(Di\033erences)31 +b(F)-8 b(rom)31 b(RF)m(Cs)2732 b Ff(6)0 162 y(There)35 +b(are)g(also)g(pseudo)h(comp)r(onen)n(ts)f(that)i(are)e(conceptually)g +(deriv)n(ed)g(classess)f(of)i(V)-9 b(ALARM.)37 b(RF)n(C2446)d +(de\034nes)0 275 y(what)d(prop)r(erties)f(ma)n(y)g(b)r(e)h(included)g +(in)g(eac)n(h)f(comp)r(onen)n(t,)i(and)e(for)h(V)-9 b(ALARM,)31 +b(the)g(set)g(of)g(prop)r(erties)f(it)h(ma)n(y)f(ha)n(v)n(e)0 +389 y(dep)r(ends)e(on)f(the)h(v)-5 b(alue)28 b(of)f(the)h(A)n(CTION)f +(prop)r(ert)n(y)-7 b(.)0 545 y(F)g(or)19 b(instance,)j(if)e(a)g(V)-9 +b(ALARM)20 b(comp)r(onen)n(t)g(has)f(an)h(A)n(CTION)g(prop)r(ert)n(y)e +(with)j(the)f(v)-5 b(alue)20 b(of)g("A)n(UDIO,")f(the)h(comp)r(onen)n +(t)0 659 y(m)n(ust)h(also)g(ha)n(v)n(e)f(an)h("A)-7 b(TT)g(A)n(CH")21 +b(prop)r(ert)n(y)-7 b(.)34 b(Ho)n(w)n(ev)n(er,)20 b(if)i(the)g(A)n +(CTION)f(v)-5 b(alue)21 b(is)g("DISPLA)-7 b(Y,")22 b(the)g(comp)r(onen) +n(t)f(m)n(ust)0 772 y(ha)n(v)n(e)26 b(a)i(DESCRIPTION)g(prop)r(ert)n(y) +-7 b(.)0 929 y(T)g(o)28 b(handle)g(these)g(v)-5 b(arious,)27 +b(complex)h(restrictions,)f(libical)h(has)g(pseudo)g(comp)r(onen)n(ts)f +(for)h(eac)n(h)f(t)n(yp)r(e)i(of)f(alarm:)37 b(XA)n(U-)0 +1043 y(DIO)n(ALARM,)28 b(XDISPLA)-7 b(Y)g(ALARM,)30 b(XEMAILALARM)f +(and)f(XPR)n(OCEDUREALARM.)0 1334 y Fb(4.2)112 b(Com)m(bined)37 +b(V)-9 b(alues)0 1544 y Ff(Man)n(y)34 b(v)-5 b(alues)34 +b(can)g(tak)n(e)g(more)g(than)g(one)h(t)n(yp)r(e.)58 +b(TRIGGER,)35 b(for)f(instance,)i(can)e(ha)n(v)n(e)g(a)g(v)-5 +b(alue)34 b(t)n(yp)r(e)h(of)g(with)g(DU-)0 1658 y(RA)-7 +b(TION)32 b(or)f(of)h(D)n(A)-7 b(TE-TIME.)33 b(These)f(m)n(ultiple)g(t) +n(yp)r(es)g(mak)n(e)f(it)i(di\036cult)g(to)e(create)g(routines)h(to)f +(return)h(the)g(v)-5 b(alue)0 1771 y(asso)r(ciated)26 +b(with)i(a)f(prop)r(ert)n(y)-7 b(.)0 1928 y(It)30 b(is)g(natural)g(to)f +(ha)n(v)n(e)g(in)n(terfaces)g(that)i(w)n(ould)e(return)h(the)g(v)-5 +b(alue)30 b(of)g(a)g(prop)r(ert)n(y)-7 b(,)29 b(but)i(it)f(is)g(cum)n +(b)r(ersone)f(for)h(a)g(single)0 2041 y(routine)i(to)g(return)g(m)n +(ultiple)h(t)n(yp)r(es.)51 b(So,)33 b(in)g(libical,)g(prop)r(erties)e +(that)i(can)f(ha)n(v)n(e)f(m)n(ultiple)i(t)n(yp)r(es)f(are)f(giv)n(en)h +(a)g(single)0 2155 y(t)n(yp)r(e)26 b(that)g(is)g(the)g(union)g(of)g +(their)g(RF)n(C2445)e(t)n(yp)r(es.)36 b(F)-7 b(or)26 +b(instance,)g(in)g(libical,)g(the)g(v)-5 b(alue)26 b(of)g(the)g +(TRIGGER)h(prop)r(ert)n(y)0 2268 y(resolv)n(es)e(to)j(struct)f +(icaltriggert)n(yp)r(e.)35 b(This)28 b(t)n(yp)r(e)f(is)h(a)f(union)h +(of)f(a)g(DURA)-7 b(TION)29 b(and)e(a)g(D)n(A)-7 b(TE-TIME.)0 +2560 y Fb(4.3)112 b(Multi-V)-9 b(alued)36 b(Prop)s(erties)0 +2770 y Ff(Some)31 b(prop)r(erties,)h(suc)n(h)f(as)g(CA)-7 +b(TEGORIES)33 b(ha)n(v)n(e)d(only)h(one)g(v)-5 b(alue)32 +b(t)n(yp)r(e,)h(but)f(eac)n(h)e(CA)-7 b(TEGORIES)33 b(prop)r(ert)n(y)d +(can)0 2884 y(ha)n(v)n(e)24 b(m)n(ultiple)h(v)-5 b(alue)25 +b(instances.)35 b(This)25 b(also)f(results)g(in)h(a)g(cum)n(b)r(ersome) +f(in)n(terface)g(\025)g(CA)-7 b(TEGORIES)26 b(accessors)d(w)n(ould)0 +2997 y(ha)n(v)n(e)k(to)i(return)f(a)g(list)g(while)h(all)f(other)g +(accessors)e(returned)i(a)g(single)g(v)-5 b(alue.)39 +b(In)29 b(libical,)g(all)f(prop)r(erties)f(ha)n(v)n(e)h(a)g(single)0 +3111 y(v)-5 b(alue,)35 b(and)e(m)n(ulti-v)-5 b(alued)33 +b(prop)r(erties)f(are)h(brok)n(en)f(do)n(wn)g(in)n(to)h(m)n(ultiple)h +(single)f(v)-5 b(alued)33 b(prop)r(erties)g(during)f(parsing.)0 +3224 y(That)c(is,)f(an)g(input)i(line)e(lik)n(e,)0 3464 +y Fc(CATEGORIES:)39 b(work,)i(home)0 3703 y Ff(b)r(ecomes)27 b(in)h(libical's)f(in)n(ternal)g(represen)n(tation)0 -1566 y Fd(CATEGORIES:)39 b(work)0 1680 y(CATEGORIES:)g(home)0 -2002 y Fh(Oddly)-7 b(,)34 b(RF)n(C2445)d(allo)n(ws)g(some)h(m)n(ulti-v) +3943 y Fc(CATEGORIES:)39 b(work)0 4056 y(CATEGORIES:)g(home)0 +4296 y Ff(Oddly)-7 b(,)34 b(RF)n(C2445)d(allo)n(ws)g(some)h(m)n(ulti-v) -5 b(alued)33 b(prop)r(erties)f(\()h(lik)n(e)g(FREEBUSY)h(\))f(to)g -(exist)g(as)f(b)r(oth)h(a)f(m)n(ulti-v)-5 b(alues)0 2116 +(exist)g(as)f(b)r(oth)h(a)f(m)n(ulti-v)-5 b(alues)0 4409 y(prop)r(ert)n(y)24 b(and)h(as)f(m)n(ultiple)h(single)g(v)-5 b(alue)24 b(prop)r(erties,)h(while)g(others)f(\()i(lik)n(e)e(CA)-7 b(TEGORIES)26 b(\))f(can)g(only)g(exist)f(as)h(single)0 -2229 y(m)n(ulti-v)-5 b(alued)32 b(prop)r(erties.)48 b(This)31 +4523 y(m)n(ulti-v)-5 b(alued)32 b(prop)r(erties.)48 b(This)31 b(mak)n(es)g(the)h(in)n(ternal)f(represen)n(tation)e(for)i(CA)-7 b(TEGORIES)33 b(illegal.)48 b(Ho)n(w)n(ev)n(er)30 b(when)0 -2343 y(y)n(ou)d(con)n(v)n(ert)f(a)h(comp)r(onen)n(t)g(to)h(a)f(string,) +4637 y(y)n(ou)d(con)n(v)n(ert)f(a)h(comp)r(onen)n(t)g(to)h(a)f(string,) g(the)h(library)e(will)i(collect)f(all)g(of)h(the)g(CA)-7 -b(TEGORIES)28 b(prop)r(erties)f(in)n(to)g(one.)0 2676 -y Fe(5)131 b(Implemen)l(tation)44 b(Limitations)0 2971 -y(6)131 b(Using)44 b(libical)0 3229 y Fc(6.1)112 b(Creating)37 -b(Comp)s(onen)m(ts)0 3439 y Fh(There)e(are)g(three)h(w)n(a)n(ys)e(to)i -(create)e(comp)r(onen)n(ts)i(in)g(Libical:)53 b(creating)34 -b(individual)i(ob)5 b(jects)35 b(and)h(assem)n(bling)e(them,)0 -3553 y(building)28 b(en)n(tire)f(ob)5 b(jects)27 b(in)h(massiv)n(e)e(v) --5 b(aargs)26 b(calls,)h(and)g(parsing)f(a)h(text)h(\034le)g(con)n -(taining)e(iCalendar)h(data.)0 3820 y Fb(6.1.1)94 b(Constructor)32 -b(In)m(terfaces)0 4030 y Fh(Using)d(constructor)f(in)n(terfaces,)h(y)n -(ou)f(create)h(eac)n(h)f(of)i(the)f(ob)5 b(jects)29 b(sep)r(erately)g -(and)g(them)h(assem)n(ble)e(them)i(in)g(to)f(com-)0 4143 -y(p)r(onen)n(ts:)p 0 4201 3900 4 v 0 4346 a Fd(icalcomponent)38 -b(*event;)0 4460 y(icalproperty)g(*prop;)0 4574 y(icalparameter)g -(*param;)0 4687 y(struct)j(icaltimetype)e(atime;)0 4801 -y(event)i(=)j(icalcomponent_n)o(ew)o(\(IC)o(AL)o(_V)o(EVE)o(NT)o(_C)o -(OMP)o(ON)o(EN)o(T\);)0 4914 y(prop)e(=)h(icalproperty_new)o(_d)o(tst)o -(am)o(p\()o(ati)o(me)o(\))37 b(;)0 5028 y(icalcomponent_ad)o(d_)o(pro)o -(pe)o(rt)o(y\(e)o(ve)o(nt)o(,)h(prop\);)0 5141 y(prop)k(=)h -(icalproperty_new)o(_u)o(id\()o(st)o(rd)o(up\()o("g)o(ui)o(d-1)o(.h)o -(os)o(t1.)o(co)o(m"\))o(\))37 b(\);)0 5255 y(icalcomponent_ad)o(d_)o -(pro)o(pe)o(rt)o(y\(e)o(ve)o(nt)o(,pr)o(op)o(\);)0 5369 -y(prop=icalpropert)o(y_)o(new)o(_o)o(rg)o(ani)o(ze)o(r\()o(str)o(du)o -(p\()o("mr)o(bi)o(g@)o(hos)o(t.)o(com)o("\))o(\);)0 5482 -y(param)k(=)j(icalparameter_n)o(ew)o(_ro)o(le)o(\(I)o(CAL)o(_R)o(OL)o -(E_C)o(HA)o(IR)o(\))0 5596 y(icalproperty_add)o(_p)o(ara)o(me)o(te)o -(r\(p)o(ro)o(p,)37 b(param\);)0 5709 y(icalcomponent_ad)o(d_)o(pro)o -(pe)o(rt)o(y\(e)o(ve)o(nt)o(,pr)o(op)o(\);)p eop -%%Page: 5 5 -5 4 bop 0 -167 3900 5 v 0 -200 a Fb(6.)73 b(Using)32 -b(libical)3190 b Fh(5)p 0 162 3900 4 v 0 312 a(While)31 -b(w)n(e)g(are)f(on)h(this)g(example,)g(y)n(ou)g(should)f(notice)h(that) -g(libical)g(uses)g(a)f(semi-ob)5 b(ject-orien)n(ted)29 -b(st)n(yle)i(of)g(in)n(terface.)0 425 y(Most)23 b(things)h(y)n(ou)f(w)n -(ork)g(with)h(are)f(ob)5 b(jects,)24 b(that)g(are)f(instan)n(tiated)g -(with)h(a)g(constructor)e(that)i(has)f("new")g(in)h(the)g(name.)0 -539 y(Also)h(note)h(that,)g(other)f(than)h(the)g(ob)5 -b(ject)26 b(reference,)f(most)g(structure)g(data)g(is)h(passed)f(in)h -(to)f(libical)h(routines)f(b)n(y)g(v)-5 b(alue.)0 652 -y(Strings,)24 b(of)g(course,)f(are)g(passed)g(in)h(b)n(y)g(reference,)f -(but)i(libical)f(will)g(tak)n(e)f(o)n(wnership)f(of)i(the)g(memory)-7 -b(,)24 b(so)f(y)n(ou)g(had)h(b)r(eter)0 766 y(strdup\(\))30 -b(the)f(data)g(unless)g(y)n(ou)f(w)n(an)n(t)h(a)f(core)g(dump)i(when)f -(the)h(memory)e(is)h(freed)g(for)g(the)g(second)g(time.)42 -b(Libical)29 b(has)0 879 y(some)e(complex)g(but)h(v)n(ery)f(regular)e -(memory)i(handling)g(rules.)37 b(These)27 b(are)f(detailed)i(in)g -(section)f(6.4)g(\(\).)0 1036 y(If)33 b(an)n(y)e(of)h(the)h +b(TEGORIES)28 b(prop)r(erties)f(in)n(to)g(one.)p eop +%%Page: 7 7 +7 6 bop 0 -167 3900 5 v 0 -200 a Fd(5.)73 b(Implemen)m(tation)29 +b(Limitations)2539 b Ff(7)0 162 y Fe(5)131 b(Implemen)l(tation)44 +b(Limitations)0 457 y(6)131 b(Using)44 b(libical)0 715 +y Fb(6.1)112 b(Creating)37 b(Comp)s(onen)m(ts)0 925 y +Ff(There)e(are)g(three)h(w)n(a)n(ys)e(to)i(create)e(comp)r(onen)n(ts)i +(in)g(Libical:)53 b(creating)34 b(individual)i(ob)5 b(jects)35 +b(and)h(assem)n(bling)e(them,)0 1038 y(building)28 b(en)n(tire)f(ob)5 +b(jects)27 b(in)h(massiv)n(e)e(v)-5 b(aargs)26 b(calls,)h(and)g +(parsing)f(a)h(text)h(\034le)g(con)n(taining)e(iCalendar)h(data.)0 +1311 y Fd(6.1.1)94 b(Constructor)32 b(In)m(terfaces)0 +1521 y Ff(Using)d(constructor)f(in)n(terfaces,)h(y)n(ou)f(create)h(eac) +n(h)f(of)i(the)f(ob)5 b(jects)29 b(sep)r(erately)g(and)g(them)h(assem)n +(ble)e(them)i(in)g(to)f(com-)0 1635 y(p)r(onen)n(ts:)p +0 1704 3900 4 v 0 1881 a Fc(icalcomponent)38 b(*event;)0 +1994 y(icalproperty)g(*prop;)0 2108 y(icalparameter)g(*param;)0 +2221 y(struct)j(icaltimetype)e(atime;)0 2335 y(event)i(=)j +(icalcomponent_n)o(ew)o(\(IC)o(AL)o(_V)o(EVE)o(NT)o(_C)o(OMP)o(ON)o(EN) +o(T\);)0 2448 y(prop)e(=)h(icalproperty_new)o(_d)o(tst)o(am)o(p\()o +(ati)o(me)o(\))37 b(;)0 2562 y(icalcomponent_ad)o(d_)o(pro)o(pe)o(rt)o +(y\(e)o(ve)o(nt)o(,)h(prop\);)0 2676 y(prop)k(=)h(icalproperty_new)o +(_u)o(id\()o(st)o(rd)o(up\()o(gu)o(id)o(-1.)o(ho)o(st)o(1.c)o(om)o +(\)\))37 b(\);)0 2789 y(icalcomponent_ad)o(d_)o(pro)o(pe)o(rt)o(y\(e)o +(ve)o(nt)o(,pr)o(op)o(\);)0 2903 y(prop=icalpropert)o(y_)o(new)o(_o)o +(rg)o(ani)o(ze)o(r\()o(str)o(du)o(p\()o(mrb)o(ig)o(@h)o(ost)o(.c)o +(om\))o(\);)0 3016 y(param)k(=)j(icalparameter_n)o(ew)o(_ro)o(le)o(\(I) +o(CAL)o(_R)o(OL)o(E_C)o(HA)o(IR)o(\))0 3130 y(icalproperty_add)o(_p)o +(ara)o(me)o(te)o(r\(p)o(ro)o(p,)37 b(param\);)0 3243 +y(icalcomponent_ad)o(d_)o(pro)o(pe)o(rt)o(y\(e)o(ve)o(nt)o(,pr)o(op)o +(\);)p 0 3348 V 0 3498 a Ff(While)31 b(w)n(e)g(are)f(on)h(this)g +(example,)g(y)n(ou)g(should)f(notice)h(that)g(libical)g(uses)g(a)f +(semi-ob)5 b(ject-orien)n(ted)29 b(st)n(yle)i(of)g(in)n(terface.)0 +3612 y(Most)23 b(things)h(y)n(ou)f(w)n(ork)g(with)h(are)f(ob)5 +b(jects,)24 b(that)g(are)f(instan)n(tiated)g(with)h(a)g(constructor)e +(that)i(has)f("new")g(in)h(the)g(name.)0 3725 y(Also)h(note)h(that,)g +(other)f(than)h(the)g(ob)5 b(ject)26 b(reference,)f(most)g(structure)g +(data)g(is)h(passed)f(in)h(to)f(libical)h(routines)f(b)n(y)g(v)-5 +b(alue.)0 3839 y(Strings,)24 b(of)g(course,)f(are)g(passed)g(in)h(b)n +(y)g(reference,)f(but)i(libical)f(will)g(tak)n(e)f(o)n(wnership)f(of)i +(the)g(memory)-7 b(,)24 b(so)f(y)n(ou)g(had)h(b)r(eter)0 +3952 y(strdup\(\))30 b(the)f(data)g(unless)g(y)n(ou)f(w)n(an)n(t)h(a)f +(core)g(dump)i(when)f(the)h(memory)e(is)h(freed)g(for)g(the)g(second)g +(time.)42 b(Libical)29 b(has)0 4066 y(some)e(complex)g(but)h(v)n(ery)f +(regular)e(memory)i(handling)g(rules.)37 b(These)27 b(are)f(detailed)i +(in)g(section)f(6.5)g(\(\).)0 4222 y(If)33 b(an)n(y)e(of)h(the)h (constructors)d(fail,)k(they)f(will)f(return)g(0.)50 b(If)33 b(y)n(ou)f(try)g(to)g(insert)g(0)f(in)n(to)h(a)g(prop)r(ert)n -(y)f(or)h(comp)r(onen)n(t,)h(or)0 1149 y(use)j(a)g(zero-v)-5 +(y)f(or)h(comp)r(onen)n(t,)h(or)0 4336 y(use)j(a)g(zero-v)-5 b(alued)34 b(ob)5 b(ject)36 b(reference,)h(libical)f(will)h(either)f (silen)n(tly)f(ignore)g(the)i(error)d(or)h(will)h(ab)r(ort)g(with)g(an) -g(error)0 1263 y(message.)61 b(This)36 b(b)r(eha)n(vior)e(is)i(con)n +g(error)0 4450 y(message.)61 b(This)36 b(b)r(eha)n(vior)e(is)i(con)n (trolled)f(b)n(y)g(a)h(compile)g(time)g(\035ag)f(\(ICAL_ERR)n -(ORS_ARE_F)-9 b(A)i(T)g(AL\),)37 b(and)f(will)0 1377 -y(ab)r(ort)27 b(b)n(y)g(default.)0 1649 y Fb(6.1.2)94 -b(v)-5 b(aargs)32 b(Constructors)0 1859 y Fh(There)24 +(ORS_ARE_F)-9 b(A)i(T)g(AL\),)37 b(and)f(will)0 4563 +y(ab)r(ort)27 b(b)n(y)g(default.)0 4836 y Fd(6.1.2)94 +b(v)-5 b(aargs)32 b(Constructors)0 5046 y Ff(There)24 b(is)h(another)f(w)n(a)n(y)g(to)h(create)f(complex)g(comp)r(onen)n(ts,) h(whic)n(h)g(is)g(arguable)e(more)h(elegan)n(t,)h(if)g(y)n(ou)f(are)g -(not)h(horri\034ed)0 1973 y(b)n(y)f(v)-5 b(arargs.)33 +(not)h(horri\034ed)0 5159 y(b)n(y)f(v)-5 b(arargs.)33 b(The)24 b(v)-5 b(arargs)22 b(constructor)g(in)n(terface)i(all)g(y)n (ou)f(to)h(create)f(in)n(tricate)h(comp)r(onen)n(ts)f(in)i(a)e(single)h -(blo)r(c)n(k)g(of)g(text.)p 0 2042 V 174 2219 a Fd(calendar)40 -b(=)349 2332 y(icalcomponent_v)o(an)o(ew\()523 2446 y(ICAL_VCALENDAR_C) -o(OM)o(PO)o(NEN)o(T,)523 2560 y(icalproperty_new)o(_v)o(er)o(sio)o(n\() -o(st)o(rdu)o(p\()o("2)o(.0")o(\)\))o(,)523 2673 y(icalproperty_new)o -(_p)o(ro)o(did)o(\(s)o(tr)o(dup)o(\(")o(-/)o(/RD)o(U)d -(Software//NONSGML)g(HandCal//EN"\)\),)523 2787 y(icalcomponent_va)o -(ne)o(w\()697 2900 y(ICAL_VEVENT_COMP)o(ONE)o(NT)o(,)697 -3014 y(icalproperty_new)o(_dt)o(st)o(am)o(p\(a)o(ti)o(me)o(\),)697 -3127 y(icalproperty_new)o(_ui)o(d\()o(st)o(rdu)o(p\()o("g)o(uid)o(-1)o -(.ho)o(st)o(1.)o(com)o("\))o(\),)697 3241 y(icalproperty_van)o(ew_)o -(or)o(ga)o(niz)o(er)o(\()872 3355 y(strdup\("mrbig@h)o(os)o(t.)o(com)o -("\))o(,)872 3468 y(icalparameter_n)o(ew)o(_r)o(ole)o(\(I)o(CA)o(L_R)o -(OL)o(E_C)o(HA)o(IR)o(\),)872 3582 y(0)872 3695 y(\),)697 -3809 y(icalproperty_van)o(ew_)o(at)o(te)o(nde)o(e\()872 -3922 y(strdup\("employe)o(e-)o(A@)o(hos)o(t.)o(co)o(m"\))o(,)872 -4036 y(icalparameter_n)o(ew)o(_r)o(ole)o(\(I)o(CA)o(L_R)o(OL)o(E_R)o -(EQ)o(PA)o(RTI)o(CI)o(PA)o(NT\))o(,)872 4150 y(icalparameter_n)o(ew)o -(_r)o(svp)o(\(1)o(\),)872 4263 y(icalparameter_n)o(ew)o(_c)o(uty)o(pe)o -(\(I)o(CAL)o(_C)o(UTY)o(PE)o(_G)o(ROU)o(P\))o(,)872 4377 -y(0)872 4490 y(\),)697 4604 y(icalproperty_new)o(_lo)o(ca)o(ti)o(on\()o -(st)o(rd)o(up\()o("1)o(CP)g(Conference)i(Room)j(4350"\)\),)697 -4717 y(0)697 4831 y(\),)523 4945 y(0)523 5058 y(\);)p -0 5258 V 0 5408 a Fh(This)23 b(form)g(is)h(similar)e(to)i(the)f -(regular)f(constructor,)h(except)g(that)h(they)f(ha)n(v)n(e)g("v)-5 -b(anew")22 b(instead)h(of)g("new")g(in)g(the)h(name.)0 -5522 y(The)32 b(argumen)n(ts)f(are)g(similar)g(to)r(o,)j(except)e(that) -g(the)h(comp)r(onen)n(t)e(con)n(tstructor)g(can)h(ha)n(v)n(e)f(a)g -(list)i(of)f(prop)r(erties,)g(and)0 5635 y(the)f(prop)r(ert)n(y)f -(constructor)f(can)h(ha)n(v)n(e)f(a)i(list)g(or)f(parameters.)44 -b(Be)30 b(sure)g(to)h(terminate)g(ev)n(ery)e(list)i(with)g(a)f('0',)i -(or)d(y)n(our)0 5749 y(co)r(de)e(will)h(crash,)f(if)h(y)n(ou)e(are)h -(luc)n(ky)-7 b(.)p eop -%%Page: 6 6 -6 5 bop 0 -167 3900 5 v 0 -200 a Fb(6.)73 b(Using)32 -b(libical)3190 b Fh(6)0 162 y Fb(6.1.3)94 b(P)m(arsing)32 -b(T)-8 b(ext)32 b(Files)0 372 y Fh(The)g(\034nal)g(w)n(a)n(y)f(to)h -(create)f(comp)r(onen)n(ts)h(will)g(probably)f(b)r(e)h(the)h(most)f -(common;)i(y)n(ou)d(can)h(create)f(comp)r(onen)n(ts)g(from)0 -485 y(RF)n(C2445)26 b(complian)n(t)h(text.)37 b(If)28 -b(y)n(ou)f(ha)n(v)n(e)f(the)i(string)f(in)h(memory)-7 -b(,)26 b(use)0 725 y Fd(icalcomponent*)38 b(icalparser_pars)o(e_)o(str) -o(in)o(g\()o(cha)o(r*)f(str\);)0 1078 y Fh(This)30 b(ma)n(y)f(seem)g(w) -n(asteful)h(if)g(y)n(ou)f(w)n(an)n(t)g(to)g(pull)i(a)e(large)f(comp)r -(onen)n(t)i(o\033)f(of)h(the)g(net)n(w)n(ork;)g(y)n(ou)f(ma)n(y)g -(prefer)g(to)g(parse)0 1191 y(the)f(comp)r(onen)n(t)f(line)h(b)n(y)f -(line.)37 b(This)28 b(is)f(p)r(ossible)g(to)r(o)h(b)n(y)f(using:)0 -1431 y Fd(icalparser_get_l)o(in)o(e\(p)o(ar)o(se)o(r,r)o(ea)o(d_)o(str) -o(ea)o(m\))o(;)0 1545 y(icalparser_add_l)o(in)o(e\(p)o(ar)o(se)o(r,l)o -(in)o(e\))o(;)0 1658 y(icalparser_set_g)o(en)o(_da)o(ta)o(\(p)o(ars)o -(er)o(,s)o(tre)o(am)o(\))0 2011 y Fh(F)-7 b(or)27 b(an)g(example)g(of)h -(ho)n(w)f(to)g(use)h(this)f(t)n(yp)r(e)h(of)g(parsing,)e(see)h -(examples/parse_text.c)e(for)i(an)g(example.)0 2303 y -Fc(6.2)112 b(A)m(ccessing)37 b(Comp)s(onen)m(ts)0 2513 -y Fh(Giv)n(en)30 b(a)g(reference)f(to)i(a)e(comp)r(onen)n(t,)i(y)n(ou)f -(probably)f(will)h(w)n(an)n(t)g(to)g(access)f(the)i(prop)r(erties,)f -(parameters)e(and)j(v)-5 b(alues)0 2626 y(inside.)35 -b(Libical)22 b(in)n(terface)g(let)h(y)n(ou)e(\034nd)i(sub-comp)r(onen)n -(t,)g(add)f(and)g(remo)n(v)n(e)f(sub-comp)r(onen)n(ts,)h(and)h(do)f -(the)h(same)e(three)0 2740 y(op)r(erations)26 b(on)h(prop)r(erties.)0 -3013 y Fb(6.2.1)94 b(Finding)30 b(Comp)s(onen)m(ts)0 -3223 y Fh(T)-7 b(o)27 b(\034nd)h(a)f(sub-comp)r(onen)n(t)g(of)h(a)f -(comp)r(onen)n(t,)g(use:)0 3462 y Fd(icalproperty*)38 -b(icalcomponent_ge)o(t_)o(fir)o(st)o(_c)o(omp)o(on)o(en)o(t\()1482 -3576 y(icalcomponent*)f(component,)1482 3689 y(icalcomponent_k)o(in)o -(d)h(kind\);)0 4042 y Fh(This)27 b(routine)g(will)h(return)f(a)g -(reference)g(to)g(the)h(\034rst)f(comp)r(onen)n(t)g(of)h(the)f(t)n(yp)r -(e)h('kind.')37 b(The)28 b(k)n(ey)e(kind)i(v)-5 b(alues,)27 -b(listed)h(in)0 4156 y(icalen)n(ums.h)f(are:)p 0 4209 -3900 4 v 0 4386 a Fd(ICAL_ANY_COMPONE)o(NT)0 4499 y(ICAL_VEVENT_COMP)o -(ON)o(ENT)0 4613 y(ICAL_VTODO_COMPO)o(NE)o(NT)0 4726 -y(ICAL_VJOURNAL_CO)o(MP)o(ONE)o(NT)0 4840 y(ICAL_VCALENDAR_C)o(OM)o -(PON)o(EN)o(T)0 4954 y(ICAL_VFREEBUSY_C)o(OM)o(PON)o(EN)o(T)0 -5067 y(ICAL_VALARM_COMP)o(ON)o(ENT)p 0 5267 V 0 5417 -a Fh(These)g(are)g(only)g(the)h(most)f(common)g(comp)r(onen)n(ts;)g -(there)h(are)e(man)n(y)h(more)g(listed)h(in)g(icalen)n(ums.h.)0 -5573 y(As)h(y)n(ou)f(migh)n(t)h(guess,)g(if)g(there)g(is)g(more)f(than) -h(one)f(sub)r(comp)r(onen)n(t)h(of)g(the)h(t)n(yp)r(e)f(y)n(ou)f(ha)n -(v)n(e)g(c)n(hosen,)g(this)h(routine)g(will)0 5687 y(return)e(only)g -(the)h(\034rst.)37 b(to)27 b(get)h(at)f(the)h(others,)f(y)n(ou)f(need)i -(to)g(iterate)f(through)f(the)i(comp)r(onen)n(t.)p eop -%%Page: 7 7 -7 6 bop 0 -167 3900 5 v 0 -200 a Fb(6.)73 b(Using)32 -b(libical)3190 b Fh(7)0 162 y Fb(6.2.2)94 b(In)m(terating)32 -b(Through)g(Comp)s(onen)m(ts)0 372 y Fh(Iteration)27 -b(requires)f(a)h(second)g(routine)g(to)h(get)f(the)h(next)g(sub)r(comp) -r(onen)n(t)f(after)g(the)h(\034rst:)0 611 y Fd(icalcomponent*)38 -b(icalcomponent_g)o(et)o(_ne)o(xt)o(_c)o(omp)o(on)o(en)o(t\(i)o(ca)o -(lco)o(mp)o(on)o(ent)o(*)f(component,)0 725 y(icalcomponent_ki)o(nd)g -(kind\);)0 1078 y Fh(With)25 b(the)g('\034rst')f(and)g('next')h -(routines,)g(y)n(ou)e(can)h(create)g(a)g(for)f(lo)r(op)h(to)h(iterate)f -(through)f(all)h(of)h(a)f(comp)r(onen)n(ts)g(sub)r(com-)0 -1191 y(p)r(onen)n(ts)p 0 1261 3900 4 v 87 1444 a Fd(for\(c)42 -b(=)h(icalcomponent_g)o(et_)o(fi)o(rs)o(t_c)o(om)o(po)o(nen)o(t\()o(co) -o(mp,)o(IC)o(AL_)o(AN)o(Y_)o(COM)o(PO)o(NE)o(NT\))o(;)392 -1558 y(c)g(!=)g(0;)392 1671 y(c)g(=)g(icalcomponent_get)o(_n)o(ext)o -(_c)o(om)o(pon)o(en)o(t\()o(com)o(p,)o(ICA)o(L_)o(AN)o(Y_C)o(OM)o(PO)o -(NEN)o(T\))o(\))0 1785 y({)261 1899 y(do_something\(c\);)0 -2012 y(})p 0 2212 V 0 2362 a Fh(This)32 b(co)r(de)f(bit)h(wil)g -(iterate)g(through)f(all)g(of)h(the)g(sub)r(comp)r(onen)n(ts)f(in)h -('comp')g(but)g(y)n(ou)f(can)g(select)h(a)f(sp)r(eci\034c)h(t)n(yp)r(e) -g(of)0 2476 y(comp)r(onen)n(t)27 b(b)n(y)h(c)n(hanging)e -(ICAL_ANY_COMPONENT)i(to)f(another)g(comp)r(onen)n(t)g(t)n(yp)r(e.)0 -2748 y Fb(6.2.3)94 b(Remo)m(ving)29 b(Comp)s(onen)m(ts)0 -2958 y Fh(Libical)h(comp)r(onen)n(t)g(ha)n(v)n(e)f(in)n(ternal)h +(blo)r(c)n(k)g(of)g(text.)174 5399 y Fc(calendar)40 b(=)p +eop +%%Page: 8 8 +8 7 bop 0 -167 3900 5 v 0 -200 a Fd(6.)73 b(Using)32 +b(libical)3190 b Ff(8)349 162 y Fc(icalcomponent_v)o(an)o(ew\()523 +275 y(ICAL_VCALENDAR_C)o(OM)o(PO)o(NEN)o(T,)523 389 y(icalproperty_new) +o(_v)o(er)o(sio)o(n\()o(st)o(rdu)o(p\()o(2.)o(0\)\))o(,)523 +502 y(icalproperty_new)o(_p)o(ro)o(did)o(\(s)o(tr)o(dup)o(\()741 +616 y(-//RDU)41 b(Software//NONSG)o(ML)c(HandCal//EN\)\),)523 +730 y(icalcomponent_va)o(ne)o(w\()697 843 y(ICAL_VEVENT_COMP)o(ONE)o +(NT)o(,)697 957 y(icalproperty_new)o(_dt)o(st)o(am)o(p\(a)o(ti)o(me)o +(\),)697 1070 y(icalproperty_new)o(_ui)o(d\()o(st)o(rdu)o(p\()o(gu)o +(id-)o(1.)o(hos)o(t1)o(.c)o(om\))o(\),)697 1184 y(icalproperty_van)o +(ew_)o(or)o(ga)o(niz)o(er)o(\()872 1297 y(strdup\(mrbig@ho)o(st)o(.c)o +(om\))o(,)872 1411 y(icalparameter_n)o(ew)o(_r)o(ole)o(\(I)o(CA)o(L_R)o +(OL)o(E_C)o(HA)o(IR)o(\),)872 1525 y(0)872 1638 y(\),)697 +1752 y(icalproperty_van)o(ew_)o(at)o(te)o(nde)o(e\()872 +1865 y(strdup\(employee)o(-A)o(@h)o(ost)o(.c)o(om)o(\),)872 +1979 y(icalparameter_n)o(ew)o(_r)o(ole)o(\()1046 2092 +y(ICAL_ROLE_REQPA)o(RTI)o(CI)o(PA)o(NT\))o(,)872 2206 +y(icalparameter_n)o(ew)o(_r)o(svp)o(\(1)o(\),)872 2320 +y(icalparameter_n)o(ew)o(_c)o(uty)o(pe)o(\(I)o(CAL)o(_C)o(UTY)o(PE)o +(_G)o(ROU)o(P\))o(,)872 2433 y(0)872 2547 y(\),)697 2660 +y(icalproperty_new)o(_lo)o(ca)o(ti)o(on\()o(st)o(rd)o(up\()828 +2774 y(1CP)42 b(Conference)e(Room)h(4350\)\),)697 2887 +y(0)697 3001 y(\),)523 3115 y(0)523 3228 y(\);)0 3454 +y Ff(This)23 b(form)g(is)h(similar)e(to)i(the)f(regular)f(constructor,) +h(except)g(that)h(they)f(ha)n(v)n(e)g("v)-5 b(anew")22 +b(instead)h(of)g("new")g(in)g(the)h(name.)0 3568 y(The)32 +b(argumen)n(ts)f(are)g(similar)g(to)r(o,)j(except)e(that)g(the)h(comp)r +(onen)n(t)e(con)n(tstructor)g(can)h(ha)n(v)n(e)f(a)g(list)i(of)f(prop)r +(erties,)g(and)0 3681 y(the)f(prop)r(ert)n(y)f(constructor)f(can)h(ha)n +(v)n(e)f(a)i(list)g(or)f(parameters.)44 b(Be)30 b(sure)g(to)h +(terminate)g(ev)n(ery)e(list)i(with)g(a)f('0',)i(or)d(y)n(our)0 +3795 y(co)r(de)e(will)h(crash,)f(if)h(y)n(ou)e(are)h(luc)n(ky)-7 +b(.)0 4065 y Fd(6.1.3)94 b(P)m(arsing)32 b(T)-8 b(ext)32 +b(Files)0 4275 y Ff(The)g(\034nal)g(w)n(a)n(y)f(to)h(create)f(comp)r +(onen)n(ts)h(will)g(probably)f(b)r(e)h(the)h(most)f(common;)i(y)n(ou)d +(can)h(create)f(comp)r(onen)n(ts)g(from)0 4389 y(RF)n(C2445)26 +b(complian)n(t)h(text.)37 b(If)28 b(y)n(ou)f(ha)n(v)n(e)f(the)i(string) +f(in)h(memory)-7 b(,)26 b(use)0 4615 y Fc(icalcomponent*)38 +b(icalparser_pars)o(e_)o(str)o(in)o(g\()o(cha)o(r*)f(str\);)0 +4841 y Ff(This)30 b(ma)n(y)f(seem)g(w)n(asteful)h(if)g(y)n(ou)f(w)n(an) +n(t)g(to)g(pull)i(a)e(large)f(comp)r(onen)n(t)i(o\033)f(of)h(the)g(net) +n(w)n(ork;)g(y)n(ou)f(ma)n(y)g(prefer)g(to)g(parse)0 +4954 y(the)f(comp)r(onen)n(t)f(line)h(b)n(y)f(line.)37 +b(This)28 b(is)f(p)r(ossible)g(to)r(o)h(b)n(y)f(using:)0 +5180 y Fc(icalparser*)39 b(icalparser_new\(\))o(;)0 5294 +y(void)j(icalparser_free\()o(ic)o(al)o(par)o(se)o(r*)37 +b(parser\);)0 5407 y(icalparser_get_l)o(in)o(e\(p)o(ar)o(se)o(r,r)o(ea) +o(d_)o(str)o(ea)o(m\))o(;)p eop +%%Page: 9 9 +9 8 bop 0 -167 3900 5 v 0 -200 a Fd(6.)73 b(Using)32 +b(libical)3190 b Ff(9)0 162 y Fc(icalparser_add_l)o(in)o(e\(p)o(ar)o +(se)o(r,l)o(in)o(e\))o(;)0 275 y(icalparser_set_g)o(en)o(_da)o(ta)o +(\(p)o(ars)o(er)o(,s)o(tre)o(am)o(\))0 515 y Ff(These)21 +b(routines)f(will)i(construct)f(a)f(parser)g(ob)5 b(ject)21 +b(to)g(whic)n(h)g(y)n(ou)g(can)g(add)g(lines)g(of)g(input)h(and)f +(retriev)n(e)f(an)n(y)h(comp)r(onen)n(ts)0 628 y(that)28 +b(the)g(parser)e(creates)g(from)h(the)h(input.)38 b(F)-7 +b(or)27 b(an)g(example:)0 868 y Fc(char*)41 b(read_stream\(char)c(*s,) +43 b(size_t)e(size,)g(void)h(*d\))87 1095 y(char)g(*c)h(=)g +(fgets\(s,size,)38 b(\(FILE*\)d\);)87 1209 y(return)j(c;)0 +1436 y(main\(\))87 1549 y(char*)h(line;)87 1663 y(icalcomponent)c(*c;) +87 1776 y(icalparser)h(*parser)i(=)i(icalparser_new\(\))o(;)87 +1890 y(FILE*)f(stream)f(=)i(fopen\(argv1,r\);)87 2004 +y(icalparser_set_g)o(en_)o(da)o(ta)o(\(pa)o(rs)o(er)o(,st)o(re)o(am)o +(\);)87 2117 y(do)174 2231 y(line)f(=)h(icalparser_get_li)o(ne)o(\(p)o +(ars)o(er)o(,r)o(ead)o(_s)o(tr)o(eam)o(\);)174 2344 y(c)g(=)h +(icalparser_add_)o(li)o(ne\()o(pa)o(rs)o(er,)o(li)o(ne)o(\);)174 +2458 y(if)f(\(c)g(!=)f(0\))218 2571 y(printf\(s,icalcom)o(po)o(ne)o +(nt_)o(as)o(_i)o(cal)o(_s)o(tr)o(ing)o(\(c)o(\)\))o(;)218 +2685 y(icalparser_claim)o(\(p)o(ar)o(ser)o(\);)218 2799 +y(printf\(n--------)o(--)o(--)o(---)o(n\))o(;)218 2912 +y(icalcomponent_fr)o(ee)o(\(c)o(\);)131 3139 y(while)f(\()i(line)f(!=)h +(0\);)0 3379 y Ff(The)48 b(parser)f(ob)5 b(ject)48 b(parameterizes)f +(the)i(routine)f(used)g(to)g(get)h(input)g(lines)f(with)h +(icalparser_set_gen_data\(\))0 3492 y(andicalparser_get_line\(\).)81 +b(In)44 b(this)f(example,)k(the)d(routine)f(read_stream\(\))e(will)j +(fetc)n(h)g(the)f(next)h(line)g(from)e(a)0 3606 y(stream,)51 +b(with)d(the)f(stream)g(passed)f(in)h(as)g(the)g(v)n(oid*)f(parameter)f +(d.)96 b(The)47 b(parser)f(calls)g(read_stream\(\))f(from)0 +3720 y(icalparser_get_line\(\),)e(but)g(it)g(also)e(needs)h(to)h(kno)n +(w)e(what)h(stream)g(to)g(use.)81 b(This)42 b(is)h(set)f(b)n(y)g(the)h +(call)f(to)g(ical-)0 3833 y(parser_set_gen_data\(\).)0 +3990 y(Using)18 b(the)h(same)f(mec)n(hanism,)i(other)e(implmen)n +(tations)h(could)f(read)g(from)g(memory)g(bu\033ers,)i(so)r(c)n(k)n +(ets)d(or)h(other)g(in)n(terfaces.)0 4146 y(Since)28 +b(the)g(example)f(co)r(de)g(is)h(a)f(v)n(ery)f(common)h(w)n(a)n(y)f(to) +i(use)f(the)h(parser,)e(there)i(is)f(a)g(con)n(vienience)g(routine;)0 +4386 y Fc(icalcomponent*)38 b(icalparser_pars)o(e\()o(ica)o(lp)o(ar)o +(ser)f(*parser,)654 4499 y(char*)k(\(*line_gen_func\))o(\(c)o(har)c +(*s,)42 b(size_t)f(sise,)85 b(void*)42 b(d\)\))0 4739 +y Ff(T)-7 b(o)36 b(use)h(this)g(routine,)i(y)n(ou)d(still)h(m)n(ust)g +(construct)f(the)h(parser)f(ob)5 b(ject)36 b(and)h(pass)f(in)h(a)f +(reference)g(to)h(a)f(line)h(reading)0 4852 y(routine.)50 +b(If)33 b(the)f(parser)f(can)h(create)f(a)h(single)f(comp)r(onen)n(t)h +(from)g(the)g(input,)i(it)f(will)f(return)g(a)g(p)r(oin)n(ter)g(to)g +(the)g(newly)0 4966 y(constructed)j(comp)r(onen)n(t.)62 +b(If)36 b(the)g(parser)e(can)i(construct)f(m)n(ultiple)i(cmp)r(onen)n +(ts)e(from)h(the)g(input,)j(it)d(will)g(return)f(a)0 +5079 y(reference)28 b(to)h(an)g(XR)n(OOT)g(comp)r(onen)n(t)g(\()h(of)f +(t)n(yp)r(e)g(ICAL_XR)n(OOT_COMPONENT.\))g(This)g(XR)n(OOT)f(comp)r +(onen)n(t)0 5193 y(will)h(hold)g(all)g(of)g(the)h(comp)r(onen)n(ts)e +(constructed)h(from)f(the)i(input)g(as)e(c)n(hildren.)41 +b(See)29 b(section)g(6.2.2)f(for)g(ho)n(w)h(to)g(iterate)0 +5306 y(through)e(the)h(c)n(hild)f(comp)r(onen)n(ts.)p +eop +%%Page: 10 10 +10 9 bop 0 -167 3900 5 v 0 -200 a Fd(6.)73 b(Using)32 +b(libical)3149 b Ff(10)0 162 y Fb(6.2)112 b(A)m(ccessing)37 +b(Comp)s(onen)m(ts)0 372 y Ff(Giv)n(en)30 b(a)g(reference)f(to)i(a)e +(comp)r(onen)n(t,)i(y)n(ou)f(probably)f(will)h(w)n(an)n(t)g(to)g +(access)f(the)i(prop)r(erties,)f(parameters)e(and)j(v)-5 +b(alues)0 485 y(inside.)35 b(Libical)22 b(in)n(terface)g(let)h(y)n(ou)e +(\034nd)i(sub-comp)r(onen)n(t,)g(add)f(and)g(remo)n(v)n(e)f(sub-comp)r +(onen)n(ts,)h(and)h(do)f(the)h(same)e(three)0 599 y(op)r(erations)26 +b(on)h(prop)r(erties.)0 866 y Fd(6.2.1)94 b(Finding)30 +b(Comp)s(onen)m(ts)0 1076 y Ff(T)-7 b(o)27 b(\034nd)h(a)f(sub-comp)r +(onen)n(t)g(of)h(a)f(comp)r(onen)n(t,)g(use:)0 1283 y +Fc(icalcomponent*)38 b(icalcomponent_g)o(et)o(_fi)o(rs)o(t_)o(com)o(po) +o(ne)o(nt\()1525 1396 y(icalcomponent*)g(component,)1525 +1510 y(icalcomponent_ki)o(nd)f(kind\);)0 1716 y Ff(This)27 +b(routine)g(will)h(return)f(a)g(reference)g(to)g(the)h(\034rst)f(comp)r +(onen)n(t)g(of)h(the)f(t)n(yp)r(e)h('kind.')37 b(The)28 +b(k)n(ey)e(kind)i(v)-5 b(alues,)27 b(listed)h(in)0 1830 +y(icalen)n(ums.h)f(are:)0 2037 y Fc(ICAL_ANY_COMPONE)o(NT)0 +2150 y(ICAL_VEVENT_COMP)o(ON)o(ENT)0 2264 y(ICAL_VTODO_COMPO)o(NE)o(NT) +0 2377 y(ICAL_VJOURNAL_CO)o(MP)o(ONE)o(NT)0 2491 y(ICAL_VCALENDAR_C)o +(OM)o(PON)o(EN)o(T)0 2605 y(ICAL_VFREEBUSY_C)o(OM)o(PON)o(EN)o(T)0 +2718 y(ICAL_VALARM_COMP)o(ON)o(ENT)0 2925 y Ff(These)g(are)g(only)g +(the)h(most)f(common)g(comp)r(onen)n(ts;)g(there)h(are)e(man)n(y)h +(more)g(listed)h(in)g(icalen)n(ums.h.)0 3081 y(As)h(y)n(ou)f(migh)n(t)h +(guess,)g(if)g(there)g(is)g(more)f(than)h(one)f(sub)r(comp)r(onen)n(t)h +(of)g(the)h(t)n(yp)r(e)f(y)n(ou)f(ha)n(v)n(e)g(c)n(hosen,)g(this)h +(routine)g(will)0 3195 y(return)e(only)g(the)h(\034rst.)37 +b(to)27 b(get)h(at)f(the)h(others,)f(y)n(ou)f(need)i(to)g(iterate)f +(through)f(the)i(comp)r(onen)n(t.)0 3462 y Fd(6.2.2)94 +b(In)m(terating)32 b(Through)g(Comp)s(onen)m(ts)0 3672 +y Ff(Iteration)27 b(requires)f(a)h(second)g(routine)g(to)h(get)f(the)h +(next)g(sub)r(comp)r(onen)n(t)f(after)g(the)h(\034rst:)0 +3879 y Fc(icalcomponent*)38 b(icalcomponent_g)o(et)o(_ne)o(xt)o(_c)o +(omp)o(on)o(en)o(t\()654 3992 y(icalcomponent*)f(component,)654 +4106 y(icalcomponent_k)o(in)o(d)h(kind\);)0 4312 y Ff(With)25 +b(the)g('\034rst')f(and)g('next')h(routines,)g(y)n(ou)e(can)h(create)g +(a)g(for)f(lo)r(op)h(to)h(iterate)f(through)f(all)h(of)h(a)f(comp)r +(onen)n(ts)g(sub)r(com-)0 4426 y(p)r(onen)n(ts)87 4633 +y Fc(for\(c)42 b(=)h(icalcomponent_g)o(et_)o(fi)o(rs)o(t_c)o(om)o(po)o +(nen)o(t\()o(co)o(mp,)o(IC)o(AL_)o(AN)o(Y_)o(COM)o(PO)o(NE)o(NT\))o(;) +392 4746 y(c)g(!=)g(0;)44 4860 y(c)g(=)g(icalcomponent_ge)o(t_)o(ne)o +(xt_)o(co)o(mp)o(one)o(nt)o(\(c)o(omp)o(,I)o(CA)o(L_A)o(NY)o(_CO)o(MP)o +(ON)o(ENT)o(\)\))261 5087 y(do_something\(c\);)0 5294 +y Ff(This)32 b(co)r(de)f(bit)h(wil)g(iterate)g(through)f(all)g(of)h +(the)g(sub)r(comp)r(onen)n(ts)f(in)h('comp')g(but)g(y)n(ou)f(can)g +(select)h(a)f(sp)r(eci\034c)h(t)n(yp)r(e)g(of)0 5407 +y(comp)r(onen)n(t)27 b(b)n(y)h(c)n(hanging)e(ICAL_ANY_COMPONENT)i(to)f +(another)g(comp)r(onen)n(t)g(t)n(yp)r(e.)p eop +%%Page: 11 11 +11 10 bop 0 -167 3900 5 v 0 -200 a Fd(6.)73 b(Using)32 +b(libical)3149 b Ff(11)0 162 y Fd(6.2.3)94 b(Using)31 +b(Comp)s(onen)m(t)f(Iterators)0 372 y Ff(The)h(iteration)f(mo)r(del)h +(in)h(the)f(previous)f(section)g(requires)g(the)h(comp)r(onen)n(t)g(to) +g(k)n(eep)f(the)i(state)f(of)g(the)g(iteration.)46 b(So,)0 +485 y(y)n(ou)32 b(could)g(not)h(use)f(this)h(mo)r(del)g(to)f(p)r +(erform)g(a)g(sorting)f(op)r(erations,)i(since)f(y)n(ou'd)g(need)h(t)n +(w)n(o)f(iterators)f(and)h(there)g(is)0 599 y(only)25 +b(space)f(for)h(one.)36 b(If)26 b(y)n(ou)e(ev)n(er)g(call)h(icalcomp)r +(onen)n(t_get_\034rst_comp)r(onen)n(t\(\))e(whic)n(h)i(an)g(iteration)g +(is)g(in)g(progress,)0 712 y(the)j(p)r(oin)n(ter)f(will)h(b)r(e)g +(reset)f(to)g(the)h(b)r(eginning.)0 869 y(T)-7 b(o)28 +b(solv)n(e)g(this)h(problem,)g(there)f(are)g(also)g(external)f +(iterators)h(for)g(comp)r(onen)n(ts.)40 b(The)28 b(routines)g(asso)r +(ciated)g(with)h(these)0 983 y(external)e(iterators)f(are:)0 +1209 y Fc(icalcompiter)38 b(icalcomponent_beg)o(in)o(_co)o(mp)o(on)o +(ent)o(\(i)o(ca)o(lco)o(mp)o(one)o(nt)o(*)f(component,)j +(icalcomponent_k)o(ind)d(kind\);)0 1322 y(icalcompiter)h +(icalcomponent_end)o(_c)o(omp)o(on)o(en)o(t\(i)o(ca)o(lc)o(omp)o(on)o +(ent)o(*)f(component,)j(icalcomponent_k)o(in)o(d)e(kind\);)0 +1436 y(icalcomponent*)g(icalcompiter_ne)o(xt)o(\(ic)o(al)o(co)o(mpi)o +(te)o(r*)f(i\);)0 1550 y(icalcomponent*)h(icalcompiter_pr)o(io)o(r\(i)o +(ca)o(lc)o(omp)o(it)o(er)o(*)g(i\);)0 1663 y(icalcomponent*)g +(icalcompiter_de)o(re)o(f\(i)o(ca)o(lc)o(omp)o(it)o(er)o(*)g(i\);)0 +1890 y Ff(The)30 b(_b)r(egin_\(\))g(and)f(_end_\(\))h(routines)g +(return)f(a)h(new)g(iterator)e(that)i(p)r(oin)n(ts)g(to)g(the)g(b)r +(egining)g(and)g(ending)g(of)g(the)0 2003 y(list)36 b(of)f(sub)r(comp)r +(onen)n(t)h(for)f(the)h(giv)n(en)f(comp)r(onen)n(t,)i(and)e(the)h(kind) +g(argumen)n(t)e(w)n(orks)g(lik)n(e)h(the)h(kind)g(argumen)n(t)f(for)0 +2117 y(in)n(ternal)27 b(iterators.)0 2273 y(After)f(creating)e(an)h +(iterators,)g(use)g(_next_\(\))g(and)h(_prior_\(\))e(to)h(step)h(forw)n +(ard)d(and)j(bac)n(kw)n(ard)d(through)i(the)h(list)f(and)0 +2387 y(get)30 b(the)g(comp)r(onen)n(t)g(that)g(the)g(iterator)e(p)r +(oin)n(ts)i(to,)h(and)e(use)h(_deref\(\))g(to)g(return)f(the)h(comp)r +(onen)n(t)g(that)g(the)g(iterator)0 2500 y(p)r(oin)n(ts)c(to)g(without) +h(mo)n(ving)e(the)i(iterator.)35 b(All)27 b(routines)f(will)g(return)g +(0)g(when)g(they)h(mo)n(v)n(e)e(to)h(p)r(oin)n(t)h(o\033)f(the)h(end)f +(of)h(the)0 2614 y(list.)0 2770 y(Here)g(is)h(an)f(example)g(of)h(a)f +(lo)r(op)g(using)g(these)h(routines:)0 2997 y Fc(for\()131 +3110 y(i)43 b(=)g(icalcomponent_be)o(gi)o(n_c)o(om)o(po)o(nen)o(t\()o +(im)o(pl-)o(cl)o(us)o(ter)o(,I)o(CAL)o(_A)o(NY)o(_CO)o(MP)o(ON)o(ENT)o +(\);)131 3224 y(icalcompiter_de)o(ref)o(\(i)o(\)!)o(=)38 +b(0;)131 3337 y(icalcompiter_ne)o(xt\()o(i\))0 3451 y(\))261 +3565 y(icalcomponent)h(*this)i(=)i(icalcompiter_der)o(ef)o(\(i\))o(;)0 +3835 y Fd(6.2.4)94 b(Remo)m(ving)29 b(Comp)s(onen)m(ts)0 +4045 y Ff(Libical)h(comp)r(onen)n(t)g(ha)n(v)n(e)f(in)n(ternal)h (iterators,)f(so)h(y)n(ou)g(can)g(only)g(ha)n(v)n(e)f(one)h(iteration)g (o)n(v)n(er)e(a)i(comp)r(onen)n(t)g(at)h(a)f(time.)0 -3072 y(Remo)n(ving)23 b(an)h(elemen)n(t)h(from)f(a)g(list)g(while)h +4159 y(Remo)n(ving)23 b(an)h(elemen)n(t)h(from)f(a)g(list)g(while)h (iterating)e(through)h(the)h(list)f(can)g(cause)g(problems,)g(since)g -(y)n(ou)g(will)g(probably)0 3185 y(b)r(e)e(remo)n(ving)e(the)i(elemen)n -(t)g(that)g(the)g(in)n(ternal)f(iterator)f(p)r(oin)n(ts)i(to.)34 -b(This)22 b(will)g(result)f(in)h(the)g(iteration)f(lo)r(op)h -(terminating)0 3299 y(immediately)29 b(after)f(remo)n(ving)g(the)h -(elemen)n(t.)41 b(T)-7 b(o)28 b(a)n(v)n(oid)g(the)h(problem,)f(y)n(ou)h -(will)g(need)g(to)f(step)h(the)h(iterator)d(ahead)h(of)0 -3413 y(the)g(elemen)n(t)g(y)n(ou)e(are)h(going)f(to)i(remo)n(v)n(e,)e -(lik)n(e)h(this:)p 0 3482 V 0 3665 a Fd(for\(c)41 b(=)j -(icalcomponent_g)o(et)o(_fi)o(rs)o(t_)o(com)o(po)o(ne)o(nt\()o(pa)o(re) -o(nt_)o(co)o(mp,)o(IC)o(AL)o(_AN)o(Y_)o(CO)o(MPO)o(NE)o(NT)o(\);)305 -3779 y(c)f(!=)g(0;)305 3893 y(c)g(=)g(next)0 4006 y({)174 -4120 y(next)f(=)h(icalcomponent_get)o(_n)o(ex)o(t_c)o(om)o(po)o(nen)o -(t\()o(pa)o(ren)o(t_)o(com)o(p,)o(IC)o(AL_)o(AN)o(Y_)o(COM)o(PO)o(NE)o -(NT\))o(;)174 4233 y(icalcomponent_rem)o(ov)o(e_)o(com)o(po)o(ne)o -(nt\()o(pa)o(re)o(nt_)o(co)o(mp)o(,c\))o(;)0 4347 y(})p -0 4547 V 0 4763 a Fb(6.2.4)94 b(W)-8 b(orking)31 b(with)g(prop)s -(erties)g(and)h(parameters)0 4973 y Fh(Finding,)g(iterating)f(and)g -(remo)n(ving)e(prop)r(erties)h(w)n(orks)g(the)h(same)g(as)f(it)i(do)r -(es)e(for)h(comp)r(onen)n(ts,)g(using)g(the)h(prop)r(ert)n(y-)0 -5087 y(sp)r(eci\034c)c(or)e(parameter-sp)r(eci\034c)g(in)n(terfaces:)0 -5326 y Fd(icalproperty*)38 b(icalcomponent_ge)o(t_)o(fir)o(st)o(_p)o -(rop)o(er)o(ty)o(\()218 5440 y(icalcomponent*)g(component,)218 -5553 y(icalproperty_kin)o(d)f(kind\);)0 5667 y(icalproperty*)h -(icalcomponent_ge)o(t_)o(nex)o(t_)o(pr)o(ope)o(rt)o(y\()218 -5780 y(icalcomponent*)g(component,)p eop -%%Page: 8 8 -8 7 bop 0 -167 3900 5 v 0 -200 a Fb(6.)73 b(Using)32 -b(libical)3190 b Fh(8)218 162 y Fd(icalproperty_kin)o(d)37 -b(kind\);)0 275 y(void)42 b(icalcomponent_ad)o(d_)o(pr)o(ope)o(rt)o -(y\()218 389 y(icalcomponent*)c(component,)218 502 y(icalproperty*)g -(property\);)0 616 y(void)k(icalcomponent_re)o(mo)o(ve)o(_pr)o(op)o(er) -o(ty\()218 730 y(icalcomponent*)c(component,)218 843 -y(icalproperty*)g(property\);)0 957 y(icalparameter*)g(icalproperty_ge) -o(t_)o(fir)o(st)o(_p)o(ara)o(me)o(te)o(r\()218 1070 y(icalproperty*)g -(prop,)218 1184 y(icalparameter_ki)o(nd)f(kind\);)0 1297 -y(icalparameter*)h(icalproperty_ge)o(t_)o(nex)o(t_)o(pa)o(ram)o(et)o -(er)o(\()218 1411 y(icalproperty*)g(prop,)218 1525 y(icalparameter_ki)o -(nd)f(kind\);)0 1638 y(void)42 b(icalproperty_add)o(_p)o(ar)o(ame)o(te) -o(r\()218 1752 y(icalproperty*)c(prop,)218 1865 y(icalparameter*)g -(parameter\);)0 1979 y(void)k(icalproperty_rem)o(ov)o(e_)o(par)o(am)o -(et)o(er\()218 2092 y(icalproperty*)c(prop,)218 2206 -y(icalparameter_ki)o(nd)f(kind\);)0 2589 y Fb(6.2.5)94 -b(Getting)31 b(V)-8 b(alues)0 2799 y(6.2.6)94 b(Setting)31 -b(V)-8 b(alues)0 3009 y(6.2.7)94 b(Getting)31 b(P)m(arameters)0 -3219 y(6.2.8)94 b(Setting)31 b(P)m(arameters)0 3429 y(6.2.9)94 -b(Remo)m(ving)29 b(P)m(arameters)0 3639 y(6.2.10)93 b(Chec)m(king)32 -b(Comp)s(onen)m(t)e(V)-8 b(alidit)m(y)0 3868 y Fc(6.3)112 -b(Storing)37 b(Ob)6 b(jects)0 4078 y Fh(The)27 b(libical)g -(distribution)h(inclues)f(a)g(sep)r(erate)f(library)-7 -b(,)26 b(libicalss,)h(that)g(allo)n(ws)f(y)n(ou)g(to)i(store)e(iCal)h -(comp)r(onen)n(t)g(data)f(to)0 4192 y(disk)h(in)h(a)f(v)-5 -b(ariet)n(y)27 b(of)h(w)n(a)n(ys.)35 b(This)27 b(library)g(is)g(do)r -(cumen)n(ted)h(sep)r(erately)-7 b(.)36 b(\()28 b(&)f(curren)n(tly)-7 -b(,)27 b(not)g(at)h(all.)36 b(\))0 4480 y Fc(6.4)112 -b(Memory)37 b(Managemen)m(t)0 4690 y Fh(Libical)25 b(relies)f(hea)n -(vily)g(on)h(dynamic)g(allo)r(cation)f(for)h(b)r(oth)h(the)f(core)f(ob) -5 b(jects)25 b(and)g(for)f(the)i(strings)e(used)h(to)g(hold)g(v)-5 -b(alues.)0 4804 y(Some)34 b(of)f(this)h(memory)f(the)h(library)f +(y)n(ou)g(will)g(probably)0 4272 y(b)r(e)30 b(remo)n(ving)e(the)h +(elemen)n(t)h(that)g(the)f(in)n(ternal)g(iterator)f(p)r(oin)n(ts)i(to.) +42 b(The)29 b(_remo)n(v)n(e\(\))f(routine)h(will)h(k)n(eep)f(the)g +(iterator)0 4386 y(v)-5 b(alid)22 b(b)n(y)g(mo)n(ving)g(it)g(to)h(the)f +(next)h(comp)r(onen)n(t,)g(but)g(in)g(a)e(normal)h(lo)r(op,)h(this)f +(will)h(result)f(in)h(t)n(w)n(o)e(adv)-5 b(ances)22 b(p)r(er)g +(iteration,)0 4499 y(and)29 b(y)n(ou)g(will)g(remo)n(v)n(e)f(only)h(ev) +n(ery)f(other)h(comp)r(onen)n(t.)42 b(T)-7 b(o)29 b(a)n(v)n(oid)e(the)j +(problem,)f(y)n(ou)g(will)h(need)f(to)g(step)h(the)f(iterator)0 +4613 y(ahead)e(of)g(the)h(elemen)n(t)g(y)n(ou)f(are)f(going)h(to)g +(remo)n(v)n(e,)f(lik)n(e)h(this:)0 4839 y Fc(for\(c)41 +b(=)j(icalcomponent_g)o(et)o(_fi)o(rs)o(t_)o(com)o(po)o(ne)o(nt\()o(pa) +o(re)o(nt_)o(co)o(mp,)o(IC)o(AL)o(_AN)o(Y_)o(CO)o(MPO)o(NE)o(NT)o(\);) +305 4953 y(c)f(!=)g(0;)305 5066 y(c)g(=)g(next)174 5294 +y(next)f(=)h(icalcomponent_get)o(_n)o(ex)o(t_c)o(om)o(po)o(nen)o(t\()o +(pa)o(ren)o(t_)o(com)o(p,)o(IC)o(AL_)o(AN)o(Y_)o(COM)o(PO)o(NE)o(NT\))o +(;)174 5407 y(icalcomponent_rem)o(ov)o(e_)o(com)o(po)o(ne)o(nt\()o(pa)o +(re)o(nt_)o(co)o(mp)o(,c\))o(;)p eop +%%Page: 12 12 +12 11 bop 0 -167 3900 5 v 0 -200 a Fd(6.)73 b(Using)32 +b(libical)3149 b Ff(12)0 162 y(Another)32 b(w)n(a)n(y)e(to)i(remo)n(v)n +(e)e(comp)r(onen)n(ts)i(is)g(to)f(rely)h(on)f(the)i(side)f(e\033ect)g +(of)g(icalcomp)r(onen)n(t_remo)n(v)n(e_comp)r(onen)n(t:)42 +b(if)0 275 y(comp)r(onen)n(t)28 b(iterator)g(in)h(the)g(paren)n(t)f +(comp)r(onen)n(t)h(is)f(p)r(oin)n(ting)h(to)g(the)g(c)n(hild)g(that)g +(will)g(b)r(e)g(remo)n(v)n(ed,)f(it)h(will)g(mo)n(v)n(e)f(the)0 +389 y(iterator)e(to)i(the)g(comp)r(onen)n(t)f(after)g(the)h(c)n(hild.) +37 b(The)27 b(follo)n(wing)g(co)r(de)g(will)h(exploit)f(this)h(b)r(eha) +n(vior:)0 628 y Fc(icalcomponent_ge)o(t_)o(fir)o(st)o(_c)o(omp)o(on)o +(en)o(t\(p)o(ar)o(en)o(t_c)o(om)o(p,)o(ICA)o(L_)o(VEV)o(EN)o(T_)o(COM)o +(PO)o(NE)o(NT\))o(;)0 742 y(while\(\(c=icalcom)o(po)o(nen)o(t_)o(ge)o +(t_c)o(ur)o(re)o(nt_)o(co)o(mp)o(one)o(nt)o(\(c)o(\)\))37 +b(!=)43 b(0)g(\))131 855 y(if\(icalcomponen)o(t_i)o(sa)o(\(c)o(\))38 +b(==)k(ICAL_VEVENT_COMP)o(ONE)o(NT)o(\))261 969 y(icalcomponent_rem)o +(ov)o(e_c)o(om)o(po)o(nen)o(t\()o(pa)o(ren)o(t_)o(co)o(mp,)o(in)o(ner)o +(\);)174 1083 y(else)261 1196 y(icalcomponent_get)o(_n)o(ext)o(_c)o(om) +o(pon)o(en)o(t\()o(par)o(en)o(t_)o(com)o(p,)o(ICA)o(L_)o(VE)o(VEN)o(T_) +o(CO)o(MPO)o(NE)o(NT)o(\);)0 1582 y Fd(6.2.5)94 b(W)-8 +b(orking)31 b(with)g(prop)s(erties)g(and)h(parameters)0 +1792 y Ff(Finding,)g(iterating)f(and)g(remo)n(ving)e(prop)r(erties)h(w) +n(orks)g(the)h(same)g(as)f(it)i(do)r(es)e(for)h(comp)r(onen)n(ts,)g +(using)g(the)h(prop)r(ert)n(y-)0 1906 y(sp)r(eci\034c)c(or)e +(parameter-sp)r(eci\034c)g(in)n(terfaces:)0 2146 y Fc(icalproperty*)38 +b(icalcomponent_ge)o(t_)o(fir)o(st)o(_p)o(rop)o(er)o(ty)o(\()218 +2259 y(icalcomponent*)g(component,)218 2373 y(icalproperty_kin)o(d)f +(kind\);)0 2486 y(icalproperty*)h(icalcomponent_ge)o(t_)o(nex)o(t_)o +(pr)o(ope)o(rt)o(y\()218 2600 y(icalcomponent*)g(component,)218 +2713 y(icalproperty_kin)o(d)f(kind\);)0 2827 y(void)42 +b(icalcomponent_ad)o(d_)o(pr)o(ope)o(rt)o(y\()218 2941 +y(icalcomponent*)c(component,)218 3054 y(icalproperty*)g(property\);)0 +3168 y(void)k(icalcomponent_re)o(mo)o(ve)o(_pr)o(op)o(er)o(ty\()218 +3281 y(icalcomponent*)c(component,)218 3395 y(icalproperty*)g +(property\);)0 3508 y(icalparameter*)g(icalproperty_ge)o(t_)o(fir)o(st) +o(_p)o(ara)o(me)o(te)o(r\()218 3622 y(icalproperty*)g(prop,)218 +3736 y(icalparameter_ki)o(nd)f(kind\);)0 3849 y(icalparameter*)h +(icalproperty_ge)o(t_)o(nex)o(t_)o(pa)o(ram)o(et)o(er)o(\()218 +3963 y(icalproperty*)g(prop,)218 4076 y(icalparameter_ki)o(nd)f +(kind\);)0 4190 y(void)42 b(icalproperty_add)o(_p)o(ar)o(ame)o(te)o +(r\()218 4303 y(icalproperty*)c(prop,)218 4417 y(icalparameter*)g +(parameter\);)0 4531 y(void)k(icalproperty_rem)o(ov)o(e_)o(par)o(am)o +(et)o(er\()218 4644 y(icalproperty*)c(prop,)218 4758 +y(icalparameter_ki)o(nd)f(kind\);)0 5030 y Fd(6.2.6)94 +b(W)-8 b(orking)31 b(with)g(v)-5 b(alues)0 5240 y Ff(V)e(alues)32 +b(are)g(t)n(ypically)g(part)g(of)g(a)g(prop)r(ert)n(y)-7 +b(,)33 b(although)f(they)h(can)f(exist)g(on)h(their)f(o)n(wn.)51 +b(Y)-7 b(ou)33 b(can)f(maniplulate)h(them)0 5354 y(either)27 +b(as)g(part)g(of)h(the)g(prop)r(ert)n(y)e(or)h(indep)r(endan)n(tly)-7 +b(.)p eop +%%Page: 13 13 +13 12 bop 0 -167 3900 5 v 0 -200 a Fd(6.)73 b(Using)32 +b(libical)3149 b Ff(13)0 162 y(The)25 b(most)f(common)g(w)n(a)n(y)f(to) +i(w)n(ork)e(with)i(v)-5 b(alues)24 b(to)g(is)h(to)f(maniplate)g(them)h +(from)g(they)f(prop)r(erties)g(that)h(con)n(tain)e(them.)0 +275 y(This)31 b(in)n(v)n(olv)n(es)d(few)n(er)j(routine)f(calls)g(and)g +(in)n(termediate)h(v)-5 b(ariables)29 b(than)i(w)n(orking)e(with)i +(them)g(indep)r(enden)n(tly)-7 b(,)32 b(and)f(it)0 389 +y(is)c(t)n(yp)r(e-safe.)0 545 y(F)-7 b(or)28 b(eac)n(h)h(prop)r(ert)n +(y)-7 b(,)28 b(there)h(are)f(a)g(_get_)g(and)h(a)g(_set_)f(routine)g +(that)i(access)d(the)j(in)n(ternal)e(v)-5 b(alue.)41 +b(F)-7 b(or)29 b(instnace,)g(for)0 659 y(the)f(UID)g(prop)r(ert)n(y)-7 +b(,)27 b(the)h(routines)f(are:)0 886 y Fc(void)42 b(icalproperty_set)o +(_u)o(id)o(\(ic)o(al)o(pr)o(ope)o(rt)o(y*)37 b(prop,)k(const)h(char*)f +(v\))0 999 y(const)g(char*)h(icalproperty_get)o(_u)o(id)o(\(ic)o(al)o +(pr)o(ope)o(rt)o(y*)37 b(prop\))0 1226 y Ff(F)-7 b(or)21 +b(m)n(ultiv)-5 b(alued)22 b(prop)r(erties,)g(lik)n(e)f(A)-7 +b(TT)g(A)n(CH,)23 b(the)f(v)-5 b(alue)21 b(t)n(yp)r(e)h(is)g(usually)f +(a)g(struct)h(or)e(union)i(that)g(holds)f(b)r(oth)h(p)r(ossible)0 +1340 y(t)n(yp)r(es.)0 1496 y(If)28 b(y)n(ou)f(w)n(an)n(t)g(to)g(w)n +(ork)f(with)i(the)g(underlying)f(v)-5 b(alue)28 b(ob)5 +b(ject,)27 b(y)n(ou)g(can)g(get)g(and)h(set)f(it)h(with:)0 +1723 y Fc(icalvalue*)39 b(icalproperty_get_)o(va)o(lu)o(e)f +(\(icalproperty*)f(prop\))0 1836 y(void)42 b(icalproperty_set)o(_v)o +(al)o(ue\()o(ic)o(al)o(pro)o(pe)o(rt)o(y*)37 b(prop,)42 +b(icalvalue*)d(value\);)0 2063 y Ff(Icalprop)r(ert)n(y_get_v)-5 +b(alue\(\))36 b(will)i(return)g(a)g(reference)f(that)h(y)n(ou)g(can)g +(manipluate)g(with)h(other)e(icalv)-5 b(alue)38 b(routines.)0 +2177 y(Most)30 b(of)h(the)g(time,)g(y)n(ou)f(will)h(ha)n(v)n(e)e(to)i +(kno)n(w)e(what)i(the)g(t)n(yp)r(e)f(of)h(the)g(v)-5 +b(alue)30 b(is.)46 b(F)-7 b(or)30 b(instance,)g(if)i(y)n(ou)d(kno)n(w)h +(that)h(the)0 2290 y(v)-5 b(alue)27 b(is)h(a)f(D)n(A)-7 +b(TETIME)29 b(t)n(yp)r(e,)f(y)n(ou)f(can)g(manipluate)g(it)h(with:)0 +2517 y Fc(struct)41 b(icaltimetype)e(icalvalue_get_d)o(at)o(et)o(ime)o +(\(i)o(ca)o(lva)o(lu)o(e*)e(value\);)0 2631 y(void)42 +b(icalvalue_set_da)o(te)o(ti)o(me\()o(ic)o(al)o(val)o(ue)o(*)37 +b(value,)k(struct)h(icaltimetype)c(v\);)0 2858 y Ff(When)21 +b(w)n(orking)e(with)i(an)f(extension)g(prop)r(ert)n(y)f(or)h(v)-5 +b(alue)20 b(\(and)h(X-PR)n(OPER)-7 b(TY)21 b(or)f(a)g(prop)r(ert)n(y)f +(that)i(has)f(the)h(parameter)0 2971 y(V)-9 b(ALUE=x-name)27 +b(\))h(the)g(v)-5 b(alue)28 b(t)n(yp)r(e)f(is)h(alw)n(a)n(ys)d(a)j +(string.)36 b(T)-7 b(o)27 b(get)g(and)h(set)f(the)h(v)-5 +b(alue,)28 b(use:)0 3198 y Fc(void)42 b(icalproperty_set)o(_x)o(\(i)o +(cal)o(pr)o(op)o(ert)o(y*)37 b(prop,)k(char*)h(v\);)0 +3312 y(char*)f(icalproperty_get_)o(x\()o(ica)o(lp)o(ro)o(per)o(ty)o(*)c +(prop\);)0 3582 y Fd(6.2.7)94 b(W)-8 b(orking)31 b(with)g(parameters)0 +3792 y(6.2.8)94 b(Chec)m(king)32 b(Comp)s(onen)m(t)d(V)-8 +b(alidit)m(y)0 4002 y Ff(RF)n(C)27 b(2446)e(de\034nes)i(rules)g(for)f +(what)h(prop)r(erties)f(m)n(ust)h(exist)g(in)h(a)e(comp)r(onen)n(t)h +(to)g(b)r(e)g(used)g(for)g(transfering)f(sc)n(heduling)0 +4116 y(data.)58 b(Most)35 b(of)g(these)g(rules)f(relate)g(to)h(the)g +(existence)f(of)h(prop)r(erties)f(relativ)n(e)g(to)h(the)g(METHOD)h +(prop)r(ert)n(y)-7 b(,)35 b(whic)n(h)0 4229 y(declares)22 +b(what)h(op)r(eration)f(a)h(remote)g(reciev)n(er)f(should)h(use)g(to)g +(pro)r(cess)f(a)h(comp)r(onen)n(t.)35 b(F)-7 b(or)23 +b(instance,)h(if)g(the)f(METHOD)0 4343 y(is)36 b(REQUEST)h(and)e(the)i +(comp)r(onen)n(t)e(is)h(a)f(VEVENT,)j(the)e(sender)f(is)h(probably)f +(asking)f(the)j(reciev)n(er)d(to)h(join)h(in)g(a)0 4456 +y(meeting.)g(In)25 b(this)g(case,)g(RF)n(C2446)d(sa)n(ys)i(that)h(the)g +(comp)r(onen)n(t)g(m)n(ust)g(sp)r(ecify)g(a)f(start)g(time)i(\(DTST)-7 +b(AR)g(T\))26 b(and)f(list)g(the)0 4570 y(reciev)n(er)h(as)h(an)g +(attendee)h(\(A)-7 b(TTENDEE\).)0 4726 y(Libical)27 b(can)g(c)n(hec)n +(k)g(these)h(restrictions)e(with)i(the)g(routine:)0 4953 +y Fc(int)42 b(icalrestriction_c)o(he)o(ck)o(\(ic)o(al)o(co)o(mpo)o(ne)o +(nt)o(*)c(comp\);)0 5180 y Ff(This)19 b(routine)f(returns)g(0)h(if)g +(the)g(comp)r(onen)n(t)g(do)r(es)f(not)h(pass)f(RF)n(C2446)f +(restrictions,)i(or)f(if)h(the)g(comp)r(onen)n(t)g(is)g(malformed.)0 +5294 y(The)38 b(comp)r(onen)n(t)g(y)n(ou)f(pass)g(in)h +Fa(must)45 b Ff(b)r(e)38 b(a)g(V)n(CALEND)n(AR,)h(with)g(one)e(or)g +(more)h(c)n(hildren,)i(lik)n(e)d(the)i(examples)e(in)0 +5407 y(RF)n(C2446.)p eop +%%Page: 14 14 +14 13 bop 0 -167 3900 5 v 0 -200 a Fd(6.)73 b(Using)32 +b(libical)3149 b Ff(14)0 162 y(When)28 b(this)f(routine)g(runs,)f(it)i +(will)f(insert)g(new)g(prop)r(erties)f(in)n(to)h(the)h(comp)r(onen)n(t) +e(to)h(indicate)h(an)n(y)e(errors)f(it)i(\034nds.)37 +b(See)0 275 y(section)27 b(6.5.3,)f(X-LIC-ERR)n(OR)i(for)f(more)f +(information)h(ab)r(out)h(these)f(error)f(prop)r(erties.)0 +548 y Fd(6.2.9)94 b(Con)m(v)m(erting)32 b(Comp)s(onen)m(ts)d(to)j(T)-8 +b(ext)0 758 y Ff(T)h(o)22 b(create)g(an)g(RF)n(C2445)f(complian)n(t)h +(text)h(represen)n(ttion)e(of)i(an)f(ob)5 b(ject,)23 +b(use)g(one)f(of)g(the)h(*_as_ical_string\(\))d(routines:)0 +997 y Fc(char*)41 b(icalcomponent_as_)o(ic)o(al_)o(st)o(ri)o(ng)c +(\(icalcomponent*)g(component\))0 1111 y(char*)k(icalproperty_as_i)o +(ca)o(l_s)o(tr)o(in)o(g)d(\(icalproperty*)f(property\))0 +1225 y(char*)k(icalparameter_as_)o(ic)o(al_)o(st)o(ri)o(ng)c +(\(icalparameter*)g(parameter\))0 1338 y(char*)k(icalvalue_as_ical)o +(_s)o(tri)o(ng)c(\(icalvalue*)i(value\))0 1578 y Ff(In)32 +b(most)h(cases,)f(y)n(ou)f(will)i(only)f(use)g(icalcomp)r(onen)n +(t_as_ical_string)c(\(\),)34 b(since)e(it)h(will)f(cascade)f(and)h(con) +n(v)n(ert)f(all)h(of)0 1691 y(the)c(parameters,)e(prop)r(erties)g(and)i +(v)-5 b(alues)27 b(that)h(are)e(attac)n(hed)h(to)h(the)g(ro)r(ot)e +(comp)r(onen)n(t.)0 1848 y(Icalprop)r(ert)n(y_as_ical_string\(\))34 +b(will)k(terminate)g(eac)n(h)g(line)g(with)h(the)g(RF)n(C2445)d(sp)r +(eci\034ed)j(line)f(terminator)f("rn")0 1961 y(Ho)n(w)n(ev)n(er,)24 +b(if)i(y)n(ou)f(compile)g(with)h(the)g(sym)n(b)r(ol)f +(ICAL_UNIX_NEWLINE)i(de\034ned,)f(it)g(will)g(terminate)f(lines)h(with) +g("n")0 2118 y(Remem)n(b)r(er)35 b(that)h(the)f(string)g(returned)f(b)n +(y)h(these)h(routines)e(is)h(o)n(wned)g(b)n(y)g(the)h(library)-7 +b(,)36 b(and)f(will)g(ev)n(en)n(tually)f(b)r(e)i(re-)0 +2231 y(written.)h(Y)-7 b(ou)28 b(should)f(cop)n(y)g(it)h(if)g(y)n(ou)e +(w)n(an)n(t)h(to)h(preserv)n(e)e(it.)0 2523 y Fb(6.3)112 +b(Time)0 2733 y Fd(6.3.1)94 b(Time)30 b(structure)0 2943 +y Ff(LIbical)d(de\034nes)g(it's)g(o)n(wn)f(time)i(structure)e(for)h +(storing)f(all)h(dates)f(and)h(times.)37 b(It)28 b(w)n(ould)e(ha)n(v)n +(e)g(b)r(een)i(nice)f(to)g(re-use)f(the)0 3057 y(C)j(library's)e +Fa(struct)j(tm,)h Ff(but)e(that)h(structure)e(do)r(es)g(not)h +(di\033eren)n(tiate)g(b)r(et)n(w)n(een)g(dates)f(and)h(times,)g(and)g +(b)r(et)n(w)n(een)g(lo)r(cal)0 3170 y(time)f(and)f(UTC.)h(The)g +(libical)f(structure)g(is:)0 3410 y Fc(struct)41 b(icaltimetype)87 +3523 y(int)h(year;)87 3637 y(int)g(month;)87 3750 y(int)g(day;)87 +3864 y(int)g(hour;)87 3978 y(int)g(minute;)87 4091 y(int)g(second;)87 +4205 y(int)g(is_utc;)f(/*)i(1-)g(time)e(is)i(in)g(UTC)f(timezone)e(*/) +87 4318 y(int)i(is_date;)f(/*)h(1)i(-)f(interpret)c(this)j(as)h(date.)e +(*/)i(;)0 4558 y Ff(The)35 b(y)n(ear,)h(mon)n(th,)g(da)n(y)-7 +b(,)37 b(hour,)f(min)n(ute)f(and)g(second)g(\034elds)g(ho)n(w)f(the)h +(brok)n(en-out)f(time)h(v)-5 b(alues.)59 b(The)35 b(is_utc)g(\034eld)0 +4671 y(distinguishes)30 b(b)r(et)n(w)n(een)h(times)g(UTC)g(and)g(a)f +(lo)r(cal)g(time)i(zone.)45 b(The)31 b(is_date)f(\034eld)h(indicates)g +(if)g(the)g(in)n(tra-da)n(y)e(\034elds)0 4785 y(hold)e(v)-5 +b(alid)28 b(data.)0 5057 y Fd(6.3.2)94 b(Time)30 b(manipulating)f +(routines)0 5268 y Ff(The)f(n)n(ull)f(time)h(v)-5 b(alue)28 +b(is)f(used)h(to)f(indicate)h(that)g(the)g(data)f(in)g(the)h(structure) +f(is)h(not)f(a)h(v)-5 b(alid)27 b(time.)p eop +%%Page: 15 15 +15 14 bop 0 -167 3900 5 v 0 -200 a Fd(6.)73 b(Using)32 +b(libical)3149 b Ff(15)0 162 y Fc(struct)41 b(icaltimetype)e +(icaltime_null_t)o(im)o(e\()o(voi)o(d\))o(;)0 275 y(int)j +(icaltime_is_null_)o(ti)o(me)o(\(st)o(ru)o(ct)37 b(icaltimetype)h(t\);) +0 515 y Ff(It)33 b(is)g(sensible)g(for)g(the)g(brok)n(en-out)f(time)h +(\034elds)g(to)g(con)n(tain)g(v)-5 b(alues)32 b(that)i(are)e(not)h(p)r +(ermitted)h(in)f(an)g(ISO)g(complian)n(t)0 628 y(time)g(string.)53 +b(F)-7 b(or)32 b(instance,)i(the)g(seconds)e(\034eld)h(can)g(hold)g(v) +-5 b(alues)32 b(greater)f(than)j(59,)f(and)g(the)g(hours)f(\034eld)i +(can)e(hold)0 742 y(v)-5 b(alues)29 b(larger)e(than)j(24.)41 +b(The)29 b(excessiv)n(e)f(v)-5 b(alues)29 b(will)g(b)r(e)h(rolled)e(o)n +(v)n(er)g(in)n(to)h(the)g(next)h(larger)d(\034eld)j(when)f(the)h +(structure)0 855 y(is)d(normalized.)0 1095 y Fc(struct)41 +b(icaltimetype)e(icaltime_normal)o(iz)o(e\()o(str)o(uc)o(t)e +(icaltimetype)i(t\);)0 1334 y Ff(There)27 b(are)g(sev)n(eral)e +(routines)i(to)h(get)f(the)h(da)n(y)f(of)g(the)h(w)n(eek)f(or)g(mon)n +(th,)g(etc,)h(from)f(a)h(time)g(structure.)0 1574 y Fc(short)41 +b(icaltime_day_of_y)o(ea)o(r\(s)o(tr)o(uc)o(t)d(icaltimetype)g(t\);)0 +1688 y(struct)j(icaltimetype)e(icaltime_from_d)o(ay)o(_o)o(f_y)o(ea)o +(r\()o(sho)o(rt)e(doy,)42 b(short)f(year\);)0 1801 y(short)g +(icaltime_day_of_w)o(ee)o(k\(s)o(tr)o(uc)o(t)d(icaltimetype)g(t\);)0 +1915 y(short)j(icaltime_start_do)o(y_)o(of_)o(we)o(ek)o(\(st)o(ru)o(ct) +c(icaltimetype)i(t\);)0 2028 y(short)i(icaltime_week_num)o(be)o(r\(s)o +(ho)o(rt)c(day_of_month,)h(short)k(month,)f(short)g(year\);)0 +2142 y(struct)g(icaltimetype)e(icaltime_from_w)o(ee)o(k_)o(num)o(be)o +(r\()o(sho)o(rt)e(week_number,)h(short)k(year\);)0 2255 +y(short)f(icaltime_days_in_)o(mo)o(nth)o(\(s)o(ho)o(rt)c(month,short)i +(year\);)0 2495 y Ff(T)-7 b(w)n(o)37 b(routines)g(con)n(v)n(ert)g(time) +h(structures)f(to)h(and)f(from)h(the)g(n)n(um)n(b)r(er)g(of)f(seconds)g +(since)h(the)g(POSIX)g(ep)r(o)r(c)n(h.)68 b(The)0 2608 +y(is_date)31 b(\034eld)g(indicates)g(w)n(ether)g(or)f(not)h(the)h +(hour,)g(min)n(ute)f(and)g(second)g(\034elds)g(should)g(b)r(e)h(used)f +(in)h(the)f(con)n(v)n(ersion,)0 2722 y(and)h(is_utc)g(indicates)g(if)h +(the)g(v)-5 b(alue)32 b(should)g(b)r(e)h(con)n(v)n(erted)d(to)i(a)g(lo) +r(cal)g(time)h(or)e(a)h(UTC)h(time,)h(using)e(the)g(op)r(erating)0 +2836 y(system)27 b(suppled)h(notion)f(of)h(the)g(lo)r(cal)f(timezone.)0 +3075 y Fc(struct)41 b(icaltimetype)e(icaltime_from_t)o(im)o(et)o(\(ti)o +(me)o(_t)e(v,)43 b(int)f(is_date,)e(int)j(is_utc\);)0 +3189 y(time_t)e(icaltime_as_time)o(t\()o(str)o(uc)o(t)c +(icaltimetype\);)0 3428 y Ff(The)28 b(compare)e(routine)h(w)n(orks)f +(exactly)h(lik)n(e)g(strcmp,)g(but)h(on)g(time)g(structures.)0 +3668 y Fc(int)42 b(icaltime_compare\()o(st)o(ru)o(ct)37 +b(icaltimetype)i(a,struct)h(icaltimetype)e(b\);)0 3907 +y Ff(The)d(follo)n(wing)e(routines)h(con)n(v)n(ert)g(b)r(et)n(w)n(een)g +(UTC)h(and)g(a)f(named)h(timezone.)58 b(The)35 b(tzid)g(\034eld)g(m)n +(ust)g(b)r(e)g(a)f(timezone)0 4021 y(name)27 b(from)h(the)f(Olsen)h +(database,)e(suc)n(h)h(as)g("America/Los_Angeles.")0 +4177 y(The)h(utc_o\033set)f(routine)g(returns)g(the)h(o\033set)f(of)h +(the)g(named)f(time)h(zone)f(from)h(UTC,)f(in)h(seconds.)0 +4334 y(The)e(tt)h(parmeter)f(in)g(the)h(fonllo)n(wing)e(routines)h +(indicates)g(the)h(date)f(on)g(whic)n(h)g(the)h(con)n(v)n(ersion)d +(should)i(b)r(e)h(made.)36 b(The)0 4447 y(tt)23 b(parameter)e(is)h +(necessary)f(b)r(ecause)h(timezones)g(ha)n(v)n(e)f(man)n(y)g +(di\033eren)n(t)i(rules)f(for)g(when)g(da)n(yligh)n(t)f(sa)n(vings)g +(time)i(is)f(used,)0 4561 y(and)27 b(these)h(rules)f(can)g(c)n(hange)f +(o)n(v)n(er)g(time.)37 b(So,)27 b(for)g(a)g(single)g(timezone)g(one)g +(y)n(ear)f(ma)n(y)h(ha)n(v)n(e)f(da)n(yligh)n(t)h(sa)n(vings)e(time)j +(on)0 4674 y(Marc)n(h)f(15,)f(but)j(for)e(other)g(y)n(ears)f(Marc)n(h)g +(15)h(ma)n(y)g(b)r(e)h(standard)f(time,)h(and)f(some)g(y)n(ears)f(ma)n +(y)h(ha)n(v)n(e)g(standard)f(time)i(all)0 4788 y(y)n(ear.)0 +5027 y Fc(int)42 b(icaltime_utc_offs)o(et)o(\(s)o(tru)o(ct)37 +b(icaltimetype)h(tt,)43 b(char*)e(tzid\))0 5141 y(struct)g +(icaltimetype)e(icaltime_as_utc)o(\(s)o(tr)o(uct)e(icaltimetype)h +(tt,char*)i(tzid\);)0 5255 y(struct)h(icaltimetype)e(icaltime_as_zon)o +(e\()o(st)o(ruc)o(t)e(icaltimetype)i(tt,char*)h(tzid\);)p +eop +%%Page: 16 16 +16 15 bop 0 -167 3900 5 v 0 -200 a Fd(6.)73 b(Using)32 +b(libical)3149 b Ff(16)0 162 y Fb(6.4)112 b(Storing)37 +b(Ob)6 b(jects)0 372 y Ff(The)27 b(libical)g(distribution)h(inclues)f +(a)g(sep)r(erate)f(library)-7 b(,)26 b(libicalss,)h(that)g(allo)n(ws)f +(y)n(ou)g(to)i(store)e(iCal)h(comp)r(onen)n(t)g(data)f(to)0 +485 y(disk)h(in)h(a)f(v)-5 b(ariet)n(y)27 b(of)h(w)n(a)n(ys.)35 +b(This)27 b(library)g(is)g(do)r(cumen)n(ted)h(sep)r(erately)-7 +b(.)36 b(\()28 b(curren)n(tly)-7 b(,)26 b(not)i(at)f(all.)37 +b(\))0 777 y Fb(6.5)112 b(Memory)37 b(Managemen)m(t)0 +987 y Ff(Libical)25 b(relies)f(hea)n(vily)g(on)h(dynamic)g(allo)r +(cation)f(for)h(b)r(oth)h(the)f(core)f(ob)5 b(jects)25 +b(and)g(for)f(the)i(strings)e(used)h(to)g(hold)g(v)-5 +b(alues.)0 1101 y(Some)34 b(of)f(this)h(memory)f(the)h(library)f (caller)g(o)n(wns)g(and)g(m)n(ust)h(free,)h(and)f(some)f(of)h(the)g -(memory)f(is)h(managed)e(b)n(y)i(the)0 4917 y(library)-7 +(memory)f(is)h(managed)e(b)n(y)i(the)0 1214 y(library)-7 b(.)36 b(Here)27 b(is)g(a)g(summary)g(of)h(the)g(memory)e(rules.)0 -5138 y Fb(1\))208 5281 y Fh(If)k(the)g(function)g(name)g(has)f -Fd(")p Fh(new)p Fd(")g Fh(in)h(it,)h(the)f(caller)f(gets)g(con)n(trol)g -(of)h(the)g(memory)-7 b(.)42 b(\()31 b(suc)n(h)e(as)g(icalcomp)r(onen-) -208 5394 y(t_new\(\),)f(or)e(icalprop)r(ert)n(y_new_clone\(\))f(\))0 -5566 y Fb(2\))208 5709 y Fh(If)j(y)n(ou)g(got)g(the)h(memory)f(from)g +1454 y Fd(1\))208 1600 y Ff(If)40 b(the)h(function)g(name)g(has)f(new)g +(in)h(it,)j(the)d(caller)e(gets)h(con)n(trol)f(of)i(the)g(memory)-7 +b(.)75 b(\()40 b(suc)n(h)h(as)e(icalcomp)r(o-)208 1714 +y(nen)n(t_new\(\),)27 b(or)g(icalprop)r(ert)n(y_new_clone\(\))e(\))0 +1894 y Fd(2\))208 2041 y Ff(If)j(y)n(ou)g(got)g(the)h(memory)f(from)g (a)g(routine)g(with)h(new)f(in)h(it,)g(y)n(ou)f(m)n(ust)h(call)f(the)h -(corresp)r(onding)d(*_free)i(routine)208 5823 y(to)f(free)g(the)h +(corresp)r(onding)d(*_free)i(routine)208 2154 y(to)f(free)g(the)h (memory)-7 b(.)36 b(\()28 b(Use)g(icalcomp)r(onen)n(t_free\(\))e(to)i (free)f(ob)5 b(jects)27 b(created)g(with)h(icalcomp)r(onen)n -(t_new\(\)\))p eop -%%Page: 9 9 -9 8 bop 0 -167 3900 5 v 0 -200 a Fb(6.)73 b(Using)32 -b(libical)3190 b Fh(9)0 162 y Fb(3\))208 307 y Fh(If)29 -b(the)g(function)g(name)f(has)g Fd(")p Fh(add)p Fd(")g -Fh(in)h(it,)g(the)g(caller)e(is)i(transfering)e(con)n(trol)g(of)i(the)g -(memory)f(to)g(the)h(routine.)40 b(\()208 420 y(icalprop)r(ert)n -(y_add_parameter\(\))23 b(\))0 596 y Fb(4\))208 741 y -Fh(If)29 b(the)h(function)g(name)f(has)g Fd(")p Fh(remo)n(v)n(e)p -Fd(")e Fh(in)j(it,)g(the)g(caller)f(passes)f(in)i(a)f(p)r(oin)n(ter)g -(to)g(an)g(ob)5 b(ject)29 b(and)h(after)f(the)g(call)208 -855 y(returns,)j(the)h(caller)e(o)n(wns)g(the)h(ob)5 +(t_new\(\)\))0 2334 y Fd(3\))208 2481 y Ff(If)33 b(the)g(function)g +(name)f(has)h(add)f(in)h(it,)i(the)e(caller)e(is)i(transfering)e(con)n +(trol)h(of)g(the)h(memory)f(to)h(the)g(routine.)52 b(\()208 +2595 y(icalprop)r(ert)n(y_add_parameter\(\))23 b(\))0 +2775 y Fd(4\))208 2921 y Ff(If)34 b(the)g(function)g(name)g(has)f(remo) +n(v)n(e)f(in)i(it,)i(the)e(caller)f(passes)f(in)i(a)g(p)r(oin)n(ter)f +(to)g(an)h(ob)5 b(ject)33 b(and)h(after)f(the)h(call)208 +3035 y(returns,)e(the)h(caller)e(o)n(wns)g(the)h(ob)5 b(ject.)50 b(So,)33 b(b)r(efore)f(y)n(ou)f(call)h(icalcomp)r(onen)n -(t_remo)n(v)n(e_prop)r(ert)n(y\(comp,fo)r(o\),)208 968 -y(y)n(ou)26 b(do)i(not)f(o)n(wn)g Fd(")p Fh(fo)r(o)p -Fd(")g Fh(and)g(after)g(the)h(call)f(returns,)g(y)n(ou)g(do.)0 -1145 y Fb(5\))208 1290 y Fh(If)d(the)g(routine)f(returns)g(a)g(string,) -h(libical)g(o)n(wns)f(the)h(memory)f(and)g(will)h(put)g(it)h(on)e(a)g -(ring)g(bu\033er)h(to)g(reclaim)f(later.)208 1403 y(Y)-7 -b(ou'd)27 b(b)r(etter)h(strdup\(\))g(it)g(if)g(y)n(ou)f(w)n(an)n(t)g -(to)h(k)n(eep)f(it,)h(and)f(y)n(ou)g(don't)h(ha)n(v)n(e)e(to)h(delete)h -(it.)0 1693 y Fc(6.5)112 b(Error)36 b(Handling)0 1903 -y Fh(Libical)27 b(has)g(sev)n(eral)e(error)h(handling)h(mec)n(hanisms)f -(for)h(the)h(v)-5 b(arioust)n(yp)r(es)25 b(of)j(programming,)d(seman)n -(tic)i(and)g(syn)n(tactic)0 2017 y(errors)e(y)n(ou)i(ma)n(y)g(encoun)n -(ter.)0 2288 y Fb(6.5.1)94 b(Return)31 b(v)-5 b(alues)0 -2498 y Fh(Man)n(y)29 b(library)f(routines)g(signal)h(errors)e(through)h -(their)h(return)g(v)-5 b(alues.)42 b(All)30 b(routines)e(that)i(return) -f(a)f(p)r(oin)n(ter,)i(suc)n(h)f(as)0 2611 y(icalcomp)r(onen)n -(t_new\(\),)36 b(will)f(return)f(0)g(\()h(zero)f(\))h(on)f(a)g(fatal)h -(error.)56 b(Some)35 b(routines)f(will)g(return)h(a)f(v)-5 -b(alue)34 b(of)h(en)n(um)0 2725 y(icalerroren)n(um.)0 -2996 y Fb(6.5.2)94 b(icalerrno)0 3206 y Fh(Most)23 b(routines)f(will)h -(set)g(the)g(global)f(error)f(v)-5 b(alue)23 b(icalerrno)e(on)h -(errors.)33 b(This)23 b(v)-5 b(ariable)22 b(is)h(an)f(en)n(umeration;)i -(p)r(ermissable)0 3320 y(v)-5 b(alues)21 b(can)h(b)r(e)g(found)g(in)g +(t_remo)n(v)n(e_prop)r(ert)n(y\(comp,fo)r(o\),)208 3149 +y(y)n(ou)26 b(do)i(not)f(o)n(wn)g(fo)r(o)g(and)h(after)f(the)h(call)f +(returns,)g(y)n(ou)g(do.)0 3329 y Fd(5\))208 3475 y Ff(If)d(the)g +(routine)f(returns)g(a)g(string,)h(libical)g(o)n(wns)f(the)h(memory)f +(and)g(will)h(put)g(it)h(on)e(a)g(ring)g(bu\033er)h(to)g(reclaim)f +(later.)208 3589 y(Y)-7 b(ou'd)27 b(b)r(etter)h(strdup\(\))g(it)g(if)g +(y)n(ou)f(w)n(an)n(t)g(to)h(k)n(eep)f(it,)h(and)f(y)n(ou)g(don't)h(ha)n +(v)n(e)e(to)h(delete)h(it.)0 3880 y Fb(6.6)112 b(Error)36 +b(Handling)0 4091 y Ff(Libical)27 b(has)g(sev)n(eral)e(error)h +(handling)h(mec)n(hanisms)f(for)h(the)h(v)-5 b(arioust)n(yp)r(es)25 +b(of)j(programming,)d(seman)n(tic)i(and)g(syn)n(tactic)0 +4204 y(errors)e(y)n(ou)i(ma)n(y)g(encoun)n(ter.)0 4477 +y Fd(6.6.1)94 b(Return)31 b(v)-5 b(alues)0 4687 y Ff(Man)n(y)29 +b(library)f(routines)g(signal)h(errors)e(through)h(their)h(return)g(v) +-5 b(alues.)42 b(All)30 b(routines)e(that)i(return)f(a)f(p)r(oin)n +(ter,)i(suc)n(h)f(as)0 4800 y(icalcomp)r(onen)n(t_new\(\),)36 +b(will)f(return)f(0)g(\()h(zero)f(\))h(on)f(a)g(fatal)h(error.)56 +b(Some)35 b(routines)f(will)g(return)h(a)f(v)-5 b(alue)34 +b(of)h(en)n(um)0 4914 y(icalerroren)n(um.)p eop +%%Page: 17 17 +17 16 bop 0 -167 3900 5 v 0 -200 a Fd(6.)73 b(Using)32 +b(libical)3149 b Ff(17)0 162 y Fd(6.6.2)94 b(icalerrno)0 +372 y Ff(Most)23 b(routines)f(will)h(set)g(the)g(global)f(error)f(v)-5 +b(alue)23 b(icalerrno)e(on)h(errors.)33 b(This)23 b(v)-5 +b(ariable)22 b(is)h(an)f(en)n(umeration;)i(p)r(ermissable)0 +485 y(v)-5 b(alues)21 b(can)h(b)r(e)g(found)g(in)g (libical/icalerror.h.)32 b(If)22 b(the)g(routine)g(returns)f(an)g(en)n (um)h(icalerroren)n(um,)f(then)h(the)g(return)f(v)-5 -b(alue)0 3433 y(will)28 b(b)r(e)g(the)g(same)f(as)g(icalerrno.)35 +b(alue)0 599 y(will)28 b(b)r(e)g(the)g(same)f(as)g(icalerrno.)35 b(Y)-7 b(ou)27 b(can)g(use)h(icalerror_strerror\(\))22 b(to)28 b(get)f(a)g(string)g(that)h(describ)r(es)f(the)h(error)0 -3704 y Fb(6.5.3)94 b(X-LIC-ERR)m(OR)0 3914 y Fh(The)38 -b(library)f(handles)g(seman)n(tic)g(and)h(syn)n(tactic)f(errors)f(in)i -(comp)r(onen)n(ts)g(b)n(y)f(inserting)g(errors)f(prop)r(erties)h(in)n -(to)h(the)0 4028 y(comp)r(onen)n(ts.)k(If)30 b(the)g(parser)d(cannot)i -(parse)g(incoming)g(text)g(\()h(a)f(syn)n(tactic)g(error)e(\))j(or)f -(if)h(the)g(icalrestriction_c)n(hec)n(k\(\))0 4141 y(routine)j -(indicates)h(that)f(the)h(comp)r(onen)n(t)g(do)r(es)f(not)h(meet)g(the) -g(requirmen)n(ts)e(of)i(RF)n(C2446)d(\()j(a)g(seman)n(tic)f(error\))f -(the)0 4255 y(library)g(will)h(insert)g(prop)r(erties)f(of)h(the)h(t)n -(yp)r(e)f(X-LIC-ERR)n(OR)g(to)g(describ)r(e)g(the)g(error.)52 -b(Here)33 b(is)g(an)g(example)g(of)g(the)0 4368 y(error)26 -b(prop)r(ert)n(y:)0 4598 y Fd(X-LIC-ERROR;X-LI)o(C-)o(ERR)o(OR)o(TY)o +868 y Fd(6.6.3)94 b(X-LIC-ERR)m(OR)30 b(and)j(X-LIC-INV)-11 +b(ALID-COMPONENT)0 1078 y Ff(The)38 b(library)f(handles)g(seman)n(tic)g +(and)h(syn)n(tactic)f(errors)f(in)i(comp)r(onen)n(ts)g(b)n(y)f +(inserting)g(errors)f(prop)r(erties)h(in)n(to)h(the)0 +1192 y(comp)r(onen)n(ts.)k(If)30 b(the)g(parser)d(cannot)i(parse)g +(incoming)g(text)g(\()h(a)f(syn)n(tactic)g(error)e(\))j(or)f(if)h(the)g +(icalrestriction_c)n(hec)n(k\(\))0 1305 y(routine)j(indicates)h(that)f +(the)h(comp)r(onen)n(t)g(do)r(es)f(not)h(meet)g(the)g(requirmen)n(ts)e +(of)i(RF)n(C2446)d(\()j(a)g(seman)n(tic)f(error\))f(the)0 +1419 y(library)g(will)h(insert)g(prop)r(erties)f(of)h(the)h(t)n(yp)r(e) +f(X-LIC-ERR)n(OR)g(to)g(describ)r(e)g(the)g(error.)52 +b(Here)33 b(is)g(an)g(example)g(of)g(the)0 1532 y(error)26 +b(prop)r(ert)n(y:)0 1752 y Fc(X-LIC-ERROR;X-LI)o(C-)o(ERR)o(OR)o(TY)o (PE=)o(IN)o(VA)o(LID)o(_I)o(TI)o(P)38 b(:Failed)i(iTIP)i(restrictions)d (for)j(property)e(DTSTART.)g(Expected)g(1)k(instances)39 -b(of)k(the)f(property)f(and)h(got)g(0)0 4942 y Fh(This)35 +b(of)k(the)f(property)f(and)h(got)g(0)0 1971 y Ff(This)35 b(error)f(resulted)h(from)g(a)g(call)g(to)h(icalrestriction_c)n(hec)n (k\(\),)f(whic)n(h)g(disco)n(v)n(ered)e(that)j(the)g(comp)r(onen)n(t)f -(do)r(es)g(not)0 5056 y(ha)n(v)n(e)26 b(a)i(DTST)-7 b(AR)g(T)28 +(do)r(es)g(not)0 2084 y(ha)n(v)n(e)26 b(a)i(DTST)-7 b(AR)g(T)28 b(prop)r(ert)n(y)-7 b(,)27 b(as)g(required)f(b)n(y)h(RF)n(C2445.)0 -5212 y(There)g(are)g(a)g(few)h(routines)e(to)i(manipulate)f(error)f -(prop)r(erties:)0 5369 y(Routine)g(Purp)r(ose)g(v)n(oid)f -(icalrestriction_c)n(hec)n(k\(\))e(Chec)n(k)i(a)h(comp)r(onen)n(t)f -(against)g(RF)n(C2446)e(and)j(insert)g(error)d(prop)r(er-)0 -5482 y(ties)e(to)g(indicate)g(an)n(y)f(non-complianes)g(in)n(t)h -(icalcomp)r(onen)n(t_coun)n(t_errors\(\))d(Return)j(the)g(n)n(um)n(b)r -(er)g(of)g(error)e(prop)r(erties)0 5596 y(in)33 b(a)f(comp)r(onen)n(t)h -(v)n(oid)f(icalcomp)r(onen)n(t_strip_errors\(\))d(Remo)n(v)n(e)j(all)g -(error)f(prop)r(erties)h(in)h(a)f(comp)r(onen)n(t)h(v)n(oid)f(ical-)0 -5709 y(comp)r(onen)n(t_con)n(v)n(ert_errors\(\))18 b(Con)n(v)n(ert)k -(some)g(error)f(prop)r(erties)h(in)n(to)h(REQUEST-ST)-7 -b(A)g(TUS)24 b(prop)r(erties)e(to)h(indicate)0 5823 y(the)28 -b(inabilit)n(y)f(to)h(pro)r(cess)e(the)i(comp)r(onen)n(t)f(as)g(an)h -(iTIP)g(request.)p eop -%%Page: 10 10 -10 9 bop 0 -167 3900 5 v 0 -200 a Fb(7.)73 b(Useful)32 -b(Recipies)3026 b Fh(10)0 162 y Fc(6.6)112 b(Naming)36 -b(Standard)0 372 y Fh(Structures)26 b(that)i(y)n(ou)e(access)f(with)j +2241 y(There)g(are)g(a)g(few)h(routines)e(to)i(manipulate)f(error)f +(prop)r(erties:)0 2397 y(Routine)i(Purp)r(ose)f(v)n(oid)g +(icalrestriction_c)n(hec)n(k\(\))e(Chec)n(k)i(a)g(comp)r(onen)n(t)g +(against)g(RF)n(C2446)e(and)j(insert)0 2554 y(error)g(prop)r(erties)g +(to)i(indicate)f(non)g(compliance)g(in)n(t)h(icalcomp)r(onen)n(t_coun)n +(t_errors\(\))c(Return)j(the)h(n)n(um)n(b)r(er)g(of)f(error)0 +2667 y(prop)r(erties)0 2824 y(in)f(a)f(comp)r(onen)n(t)g(v)n(oid)g +(icalcomp)r(onen)n(t_strip_errors\(\))d(Remo)n(v)n(e)i(all)i(error)d +(prop)r(erties)i(in)h(as)0 2980 y(comp)r(onen)n(t)f(v)n(oid)g(icalcomp) +r(onen)n(t_con)n(v)n(ert_errors\(\))c(Con)n(v)n(ert)j(some)h(error)e +(prop)r(erties)i(in)n(to)0 3137 y(REQUESTS-ST)-7 b(A)g(TUS)29 +b(to)f(indicate)f(the)h(inabilit)n(y)g(to)0 3293 y(pro)r(cess)e(the)i +(comp)r(onen)n(t)g(as)e(an)i(iTIP)g(request.)0 3450 y(The)g(t)n(yp)r +(es)f(of)h(errors)d(are)i(listed)g(in)h(icalerror.h.)35 +b(They)27 b(are:)0 3669 y Fc(ICAL_XLICERRORTY)o(PE)o(_CO)o(MP)o(ON)o +(ENT)o(PA)o(RS)o(EER)o(RO)o(R)0 3782 y(ICAL_XLICERRORTY)o(PE)o(_PA)o +(RA)o(ME)o(TER)o(VA)o(LU)o(EPA)o(RS)o(EE)o(RRO)o(R)0 +3896 y(ICAL_XLICERRORTY)o(PE)o(_PA)o(RA)o(ME)o(TER)o(NA)o(ME)o(PAR)o +(SE)o(ER)o(ROR)0 4009 y(ICAL_XLICERRORTY)o(PE)o(_PR)o(OP)o(ER)o(TYP)o +(AR)o(SE)o(ERR)o(OR)0 4123 y(ICAL_XLICERRORTY)o(PE)o(_VA)o(LU)o(EP)o +(ARS)o(EE)o(RR)o(OR)0 4237 y(ICAL_XLICERRORTY)o(PE)o(_UN)o(KV)o(CA)o +(LPR)o(OP)0 4350 y(ICAL_XLICERRORTY)o(PE)o(_IN)o(VA)o(LI)o(DIT)o(IP)0 +4569 y Ff(The)46 b(libical)f(parser)f(will)i(generate)e(the)i(error)d +(that)j(end)g(in)g(P)-7 b(ARSEERR)n(OR)47 b(when)e(it)h(encoun)n(ters)f +(garbage)e(in)0 4683 y(the)d(input)g(steam.)72 b(ICAL_XLICERR)n(OR)-7 +b(TYPE_INV)e(ALIDITIP)42 b(is)d(inserted)g(b)n(y)g(icalrestriction_c)n +(hec)n(k\(\),)h(and)0 4796 y(ICAL_XLICERR)n(OR)-7 b(TYPE_UNKV)n(CALPR)n +(OP)21 b(is)e(generated)f(b)n(y)i(icalv)n(cal_con)n(v)n(ert\(\))c(when) +k(it)g(encoun)n(ters)f(a)g(vCal)0 4910 y(prop)r(ert)n(y)26 +b(that)i(it)g(cannot)f(con)n(v)n(ert)f(or)h(do)r(es)g(not)h(kno)n(w)f +(ab)r(out.)0 5066 y(Icalcomp)r(onen)n(t_con)n(v)n(ert_errors\(\))37 +b(con)n(v)n(erts)j(some)i(of)g(the)g(error)f(prop)r(erties)g(ina)h +(comp)r(onen)n(t)g(in)n(to)f(REQUEST-)0 5180 y(ST)-7 +b(A)g(TUS)29 b(prop)r(erties)e(that)h(indicate)g(a)g(failure.)38 +b(As)28 b(of)g(libical)g(v)n(ersion0.18,)e(this)i(routine)g(only)f(con) +n(v)n(ert)g(*P)-7 b(ARSEER-)0 5294 y(R)n(OR)29 b(errors)d(and)j(it)h +(alw)n(a)n(ys)d(generates)h(a)g(3.x)h(\()g(failure)g(\))g(co)r(de.)42 +b(This)29 b(mak)n(es)f(it)h(more)f(of)h(a)g(go)r(o)r(d)g(idea)f(than)h +(a)g(really)0 5407 y(useful)f(bit)g(of)g(co)r(de.)p eop +%%Page: 18 18 +18 17 bop 0 -167 3900 5 v 0 -200 a Fd(7.)73 b(Useful)32 +b(Recipies)3026 b Ff(18)0 162 y Fb(6.7)112 b(Naming)36 +b(Standard)0 372 y Ff(Structures)26 b(that)i(y)n(ou)e(access)f(with)j (the)f("struct")f(k)n(eyw)n(ord,)f(suc)n(h)h(as)h("struct)f(icaltimet)n (yp)r(e")g(are)g(things)h(that)g(y)n(ou)f(are)0 485 y(allo)n(w)n(ed)g (to)i(see)f(inside)g(and)h(p)r(ok)n(e)f(at.)0 642 y(Structures)33 @@ -1577,28 +2088,28 @@ b(Ho)n(w)n(ev)n(er,)0 1139 y(they)34 b(lo)r(ok)f(and)g(act)h(lik)n(e)f (libical.)55 b(Names)33 b(that)h(start)f(with)h("XLIC")f(or)0 1253 y("X-LIC")26 b(are)h(not)h(part)f(of)g(an)n(y)g(iCal)g(sp)r(ec.)37 b(They)27 b(are)g(used)h(in)n(ternally)e(b)n(y)i(libical.)0 -1409 y(En)n(ums)d(that)f(iden)n(tify)h(a)f(comp)r(onen)n(t,)h(prop)r -(ert)n(y)-7 b(,)24 b(v)-5 b(alue)24 b(or)g(parameter)e(end)j(with)g -("_COMPONENT,")e("_PR)n(OPER-)0 1523 y(TY,")k("_V)-9 -b(ALUE,")28 b(or)e("_P)-7 b(ARAMETER"s)0 1679 y(En)n(ums)31 -b(that)f(iden)n(tify)h(a)f(parameter)f(v)-5 b(alue)30 -b(ha)n(v)n(e)f(the)i(name)f(of)h(the)f(parameter)f(as)h(the)h(second)e -(w)n(ord.)45 b(F)-7 b(or)29 b(instance:)0 1793 y(ICAL_R)n(OLE_REQP)-7 -b(AR)g(TICIP)g(ANT)29 b(or)d(ICAL_P)-7 b(AR)g(TST)g(A)g(T_A)n(CCEPTED.) -0 1949 y(The)28 b(en)n(ums)f(for)g(the)h(parts)f(of)g(a)g(recurarance)e -(rule)j(and)f(request)g(statuses)g(are)f(irregular.)0 -2287 y Fe(7)131 b(Useful)44 b(Recipies)0 2526 y Fh(Iteration)0 -2683 y(Cop)n(ying)24 b(comp)r(onen)n(ts.)36 b(Remem)n(b)r(er)25 -b(that)g(y)n(ou)g(m)n(ust)g(clone)g(or)f(remo)n(v)n(e)g(an)h(ob)5 -b(ject)25 b(b)r(efore)g(putting)h(in)f(on)h(another)e(list.)0 -2839 y(Finding)k(compliance)f(errors)0 3177 y Fe(8)131 -b(P)l(erformance)0 3416 y Fh(Chec)n(king)27 b(restrictions)f(is)h -(computationally)g(exp)r(ensiv)n(e.)0 3754 y Fe(9)131 -b(Hac)l(ks)45 b(and)e(Bugs)0 3993 y Fh(There)22 b(are)f(a)g(lot)h(of)g -(hac)n(ks)f(in)i(the)f(library)f(\025)h(bits)g(of)g(co)r(de)g(that)g(I) -g(am)g(not)g(proud)g(of)g(and)g(should)g(propbably)f(b)r(e)h(c)n -(hanged.)0 4107 y(These)27 b(are)g(mark)n(ed)f(with)i(the)g(commen)n(t) -g(string)e("HA)n(CK.")p eop +1409 y(En)n(ums)34 b(that)h(iden)n(tify)f(a)g(comp)r(onen)n(t,)h(prop)r +(ert)n(y)-7 b(,)35 b(v)-5 b(alue)33 b(or)h(parameter)e(end)i(with)h +("_COMPONENT,")e("_PR)n(OP-)0 1523 y(ER)-7 b(TY,")28 +b("_V)-9 b(ALUE,")27 b(or)g("_P)-7 b(ARAMETER"s)0 1679 +y(En)n(ums)31 b(that)f(iden)n(tify)h(a)f(parameter)f(v)-5 +b(alue)30 b(ha)n(v)n(e)f(the)i(name)f(of)h(the)f(parameter)f(as)h(the)h +(second)e(w)n(ord.)45 b(F)-7 b(or)29 b(instance:)0 1793 +y(ICAL_R)n(OLE_REQP)-7 b(AR)g(TICIP)g(ANT)29 b(or)d(ICAL_P)-7 +b(AR)g(TST)g(A)g(T_A)n(CCEPTED.)0 1949 y(The)28 b(en)n(ums)f(for)g(the) +h(parts)f(of)g(a)g(recurarance)e(rule)j(and)f(request)g(statuses)g(are) +f(irregular.)0 2287 y Fe(7)131 b(Useful)44 b(Recipies)0 +2526 y Ff(Iteration)0 2683 y(Cop)n(ying)24 b(comp)r(onen)n(ts.)36 +b(Remem)n(b)r(er)25 b(that)g(y)n(ou)g(m)n(ust)g(clone)g(or)f(remo)n(v)n +(e)g(an)h(ob)5 b(ject)25 b(b)r(efore)g(putting)h(in)f(on)h(another)e +(list.)0 2839 y(Finding)k(compliance)f(errors)0 3177 +y Fe(8)131 b(P)l(erformance)0 3416 y Ff(Chec)n(king)27 +b(restrictions)f(is)h(computationally)g(exp)r(ensiv)n(e.)0 +3754 y Fe(9)131 b(Hac)l(ks)45 b(and)e(Bugs)0 3993 y Ff(There)22 +b(are)f(a)g(lot)h(of)g(hac)n(ks)f(in)i(the)f(library)f(\025)h(bits)g +(of)g(co)r(de)g(that)g(I)g(am)g(not)g(proud)g(of)g(and)g(should)g +(propbably)f(b)r(e)h(c)n(hanged.)0 4107 y(These)27 b(are)g(mark)n(ed)f +(with)i(the)g(commen)n(t)g(string)e("HA)n(CK.")p eop %%Trailer end userdict /end-hook known{end-hook}if diff --git a/libical/doc/UsingLibical.txt b/libical/doc/UsingLibical.txt index de803cbfde..ea5726f401 100644 --- a/libical/doc/UsingLibical.txt +++ b/libical/doc/UsingLibical.txt @@ -4,9 +4,9 @@ Using Libical Eric Busboom (eric@softwarestudio.org) -May 2000 +November 2000 + -\tableofcontents{} 1 Introduction @@ -54,14 +54,20 @@ my version of the library if they are similarly dual-licensed. 1.3 Example Code A lot of the documentation for this library is in the form of example -code. These examples are in the ``examples'' directory of the distribution. -Also look in ``src/test'' for more annotated examples. +code. These examples are in the "examples" directory of the distribution. +Also look in "src/test" for more annotated examples. 2 Building the Library Libical uses autoconf to generate makefiles, although it uses none of the autoconf flags to influence the compilation. It should built -with no adjustments on Linux, FreeBSD and Solaris. +with no adjustments on Linux, FreeBSD and Solaris under gcc. Some +version have been successfully been build on MacOS, Solaris and UnixWare +without gcc, but you may run into problems with a particular later +version. + +For a more complete guide to building the library, see the README file +in the distribution. 3 Structure @@ -75,8 +81,8 @@ content line ORGANIZER;ROLE=CHAIR:MAILTO:mrbig@host.com -The property name is ``ORGANIZER,'' the value of the property is ``mrbig@host.com'' -and the ``ROLE'' parameter specifies that Mr Big is the chair of the +The property name is "ORGANIZER," the value of the property is "mrbig@host.com" +and the "ROLE" parameter specifies that Mr Big is the chair of the meetings associated with this property. Components are groups of properties that represent the core objects @@ -84,9 +90,10 @@ of a calendar system, such as events or timezones. The central goal of libical is to parse iTIP data into an internal representation of Components, Properties, Parameters an Values, and -to allow the user to manipulate the data in various ways ([fig] \includegraphics{icaluml.eps} ) When -a component is sent across a network, if it is un-encrypted, it will -look something like: +to allow the user to manipulate the data in various ways + +When a component is sent across a network, if it is un-encrypted, it +will look something like: BEGIN:VEVENT @@ -137,7 +144,7 @@ structures, classes that aid in creating and using iCal components. 3.2.2 Types -3.2.3 The Parser +3.2.3 The parser 3.2.4 Restrictions @@ -163,11 +170,11 @@ like components, but are not defined as components in the specification. XDAYLIGHT and XSTANDARD are notable examples. These pseudo components group properties within the VTIMEZONE components. For instanace, the timezone properties associated with daylight savings time starts with -``BEGIN:DAYLIGHT'' and ends with ``END:DAYLIGHT, just like other components, +"BEGIN:DAYLIGHT" and ends with "END:DAYLIGHT, just like other components, but is not defined as a component in RFC2445. ( See RFC2445, page 61 ) In Libical,this grouping is represented by the XDAYLIGHT component. -Standard iCAL components all start with the letter ``V,'' while pseudo -components start with''X.'' +Standard iCAL components all start with the letter "V," while pseudo +components start with"X." There are also pseudo components that are conceptually derived classess of VALARM. RFC2446 defines what properties may be included in each @@ -175,8 +182,8 @@ component, and for VALARM, the set of properties it may have depends on the value of the ACTION property. For instance, if a VALARM component has an ACTION property with the -value of ``AUDIO,'' the component must also have an ``ATTACH'' property. -However, if the ACTION value is ``DISPLAY,'' the component must have +value of "AUDIO," the component must also have an "ATTACH" property. +However, if the ACTION value is "DISPLAY," the component must have a DESCRIPTION property. To handle these various, complex restrictions, libical has pseudo components @@ -266,14 +273,14 @@ icalcomponent_add_property(event,prop); While we are on this example, you should notice that libical uses a semi-object-oriented style of interface. Most things you work with -are objects, that are instantiated with a constructor that has ``new'' +are objects, that are instantiated with a constructor that has "new" in the name. Also note that, other than the object reference, most structure data is passed in to libical routines by value. Strings, of course, are passed in by reference, but libical will take ownership of the memory, so you had beter strdup() the data unless you want a core dump when the memory is freed for the second time. Libical has some complex but very regular memory handling rules. These are -detailed in section \ref{sec:memory}. +detailed in section [sec:memory]. If any of the constructors fail, they will return 0. If you try to insert 0 into a property or component, or use a zero-valued object @@ -296,7 +303,9 @@ of text. icalproperty_new_version(strdup("2.0")), - icalproperty_new_prodid(strdup("-//RDU Software//NONSGML HandCal//EN")), + icalproperty_new_prodid(strdup( + + "-//RDU Software//NONSGML HandCal//EN")), icalcomponent_vanew( @@ -320,7 +329,9 @@ of text. strdup("employee-A@host.com"), - icalparameter_new_role(ICAL_ROLE_REQPARTICIPANT), + icalparameter_new_role( + + ICAL_ROLE_REQPARTICIPANT), icalparameter_new_rsvp(1), @@ -330,7 +341,9 @@ of text. ), - icalproperty_new_location(strdup("1CP Conference Room 4350")), + icalproperty_new_location(strdup( + + "1CP Conference Room 4350")), 0 @@ -341,8 +354,8 @@ of text. ); This form is similar to the regular constructor, except that they have -``vanew'' instead of ``new'' in the name. The arguments are similar -too, except that the component contstructor can have a list of properties, +"vanew" instead of "new" in the name. The arguments are similar too, +except that the component contstructor can have a list of properties, and the property constructor can have a list or parameters. Be sure to terminate every list with a '0', or your code will crash, if you are lucky. @@ -432,7 +445,8 @@ is a convienience routine; icalcomponent* icalparser_parse(icalparser *parser, - char* (*line_gen_func)(char *s, size_t size, void* d)) + char* (*line_gen_func)(char *s, size_t sise, void* +d)) To use this routine, you still must construct the parser object and pass in a reference to a line reading routine. If the parser can create @@ -456,9 +470,9 @@ To find a sub-component of a component, use: icalcomponent* icalcomponent_get_first_component( - icalcomponent* component, + icalcomponent* component, - icalcomponent_kind kind); + icalcomponent_kind kind); This routine will return a reference to the first component of the type 'kind.' The key kind values, listed in icalenums.h are: @@ -491,7 +505,9 @@ the first: icalcomponent* icalcomponent_get_next_component( - icalcomponent* component, icalcomponent_kind kind); + icalcomponent* component, + + icalcomponent_kind kind); With the 'first' and 'next' routines, you can create a for loop to iterate through all of a components subcomponents @@ -500,7 +516,7 @@ iterate through all of a components subcomponents c != 0; - c = icalcomponent_get_next_component(comp,ICAL_ANY_COMPONENT)) + c = icalcomponent_get_next_component(comp,ICAL_ANY_COMPONENT)) { @@ -512,16 +528,68 @@ This code bit wil iterate through all of the subcomponents in 'comp' but you can select a specific type of component by changing ICAL_ANY_COMPONENT to another component type. -6.2.3 Removing Components +6.2.3 Using Component Iterators + +The iteration model in the previous section requires the component +to keep the state of the iteration. So, you could not use this model +to perform a sorting operations, since you'd need two iterators and +there is only space for one. If you ever call icalcomponent_get_first_component() +which an iteration is in progress, the pointer will be reset to the +beginning. + +To solve this problem, there are also external iterators for components. +The routines associated with these external iterators are: + +icalcompiter icalcomponent_begin_component(icalcomponent* component, +icalcomponent_kind kind); + +icalcompiter icalcomponent_end_component(icalcomponent* component, +icalcomponent_kind kind); + +icalcomponent* icalcompiter_next(icalcompiter* i); + +icalcomponent* icalcompiter_prior(icalcompiter* i); + +icalcomponent* icalcompiter_deref(icalcompiter* i); + +The _begin_() and _end_() routines return a new iterator that points +to the begining and ending of the list of subcomponent for the given +component, and the kind argument works like the kind argument for +internal iterators. + +After creating an iterators, use _next_() and _prior_() to step forward +and backward through the list and get the component that the iterator +points to, and use _deref() to return the component that the iterator +points to without moving the iterator. All routines will return 0 +when they move to point off the end of the list. + +Here is an example of a loop using these routines: + +for( + + i = icalcomponent_begin_component(impl->cluster,ICAL_ANY_COMPONENT); + + icalcompiter_deref(&i)!= 0; + + icalcompiter_next(&i) + +) { + + icalcomponent *this = icalcompiter_deref(&i); + +} + +6.2.4 Removing Components Libical component have internal iterators, so you can only have one iteration over a component at a time. Removing an element from a list while iterating through the list can cause problems, since you will probably be removing the element that the internal iterator points -to. This will result in the iteration loop terminating immediately -after removing the element. To avoid the problem, you will need to -step the iterator ahead of the element you are going to remove, like -this: +to. The _remove() routine will keep the iterator valid by moving it +to the next component, but in a normal loop, this will result in two +advances per iteration, and you will remove only every other component. + To avoid the problem, you will need to step the iterator ahead of +the element you are going to remove, like this: for(c = icalcomponent_get_first_component(parent_comp,ICAL_ANY_COMPONENT); @@ -537,7 +605,28 @@ for(c = icalcomponent_get_first_component(parent_comp,ICAL_ANY_COMPONENT); } -6.2.4 Working with properties and parameters +Another way to remove components is to rely on the side effect of icalcomponent_remove_component: +if component iterator in the parent component is pointing to the child +that will be removed, it will move the iterator to the component after +the child. The following code will exploit this behavior: + +icalcomponent_get_first_component(parent_comp,ICAL_VEVENT_COMPONENT); + +while((c=icalcomponent_get_current_component(c)) != 0 ){ + + if(icalcomponent_isa(c) == ICAL_VEVENT_COMPONENT){ + + icalcomponent_remove_component(parent_comp,inner); + + } else { + + icalcomponent_get_next_component(parent_comp,ICAL_VEVENT_COMPONENT); + + } + +} + +6.2.5 Working with properties and parameters Finding, iterating and removing properties works the same as it does for components, using the property-specific or parameter-specific @@ -591,17 +680,55 @@ void icalproperty_remove_parameter( icalparameter_kind kind); -6.2.5 Getting Values +6.2.6 Working with values + +Values are typically part of a property, although they can exist on +their own. You can maniplulate them either as part of the property +or independantly. + +The most common way to work with values to is to maniplate them from +they properties that contain them. This involves fewer routine calls +and intermediate variables than working with them independently, and +it is type-safe. + +For each property, there are a _get_ and a _set_ routine that access +the internal value. For instnace, for the UID property, the routines +are: + +void icalproperty_set_uid(icalproperty* prop, const char* v) + +const char* icalproperty_get_uid(icalproperty* prop) + +For multivalued properties, like ATTACH, the value type is usually +a struct or union that holds both possible types. + +If you want to work with the underlying value object, you can get and +set it with: -6.2.6 Setting Values +icalvalue* icalproperty_get_value (icalproperty* prop) -6.2.7 Getting Parameters +void icalproperty_set_value(icalproperty* prop, icalvalue* value); -6.2.8 Setting Parameters +Icalproperty_get_value() will return a reference that you can manipluate +with other icalvalue routines. Most of the time, you will have to +know what the type of the value is. For instance, if you know that +the value is a DATETIME type, you can manipluate it with: -6.2.9 Removing Parameters +struct icaltimetype icalvalue_get_datetime(icalvalue* value); -6.2.10 Checking Component Validity +void icalvalue_set_datetime(icalvalue* value, struct icaltimetype v); + +When working with an extension property or value (and X-PROPERTY or +a property that has the parameter VALUE=x-name ) the value type is +always a string. To get and set the value, use: + +void icalproperty_set_x(icalproperty* prop, char* v); + +char* icalproperty_get_x(icalproperty* prop); + +6.2.7 Working with parameters + +6.2.8 Checking Component Validity RFC 2446 defines rules for what properties must exist in a component to be used for transfering scheduling data. Most of these rules relate @@ -609,7 +736,7 @@ to the existence of properties relative to the METHOD property, which declares what operation a remote reciever should use to process a component. For instance, if the METHOD is REQUEST and the component is a VEVENT, the sender is probably asking the reciever to join in -a meeting. I this case, RFC2446 says that the component must specify +a meeting. In this case, RFC2446 says that the component must specify a start time (DTSTART) and list the reciever as an attendee (ATTENDEE). Libical can check these restrictions with the routine: @@ -624,7 +751,7 @@ When this routine runs, it will insert new properties into the component to indicate any errors it finds. See section 6.5.3, X-LIC-ERROR for more information about these error properties. -6.2.11 Converting Components to Text +6.2.9 Converting Components to Text To create an RFC2445 compliant text representtion of an object, use one of the *_as_ical_string() routines: @@ -642,21 +769,125 @@ it will cascade and convert all of the parameters, properties and values that are attached to the root component. Icalproperty_as_ical_string() will terminate each line with the RFC2445 -specified line terminator ``\r\n'' However, if you compile with the -symbol ICAL_UNIX_NEWLINE defined, it will terminate lines with ``\n'' +specified line terminator "\r\n" However, if you compile with the symbol +ICAL_UNIX_NEWLINE defined, it will terminate lines with "\n" Remember that the string returned by these routines is owned by the library, and will eventually be re-written. You should copy it if you want to preserve it. -6.3 Storing Objects +6.3 Time + +6.3.1 Time structure + +LIbical defines it's own time structure for storing all dates and times. +It would have been nice to re-use the C library's struct tm, but that +structure does not differentiate between dates and times, and between +local time and UTC. The libical structure is: + +struct icaltimetype { + + int year; + + int month; + + int day; + + int hour; + + int minute; + + int second; + + int is_utc; /* 1-> time is in UTC timezone */ + + int is_date; /* 1 -> interpret this as date. */ }; + +The year, month, day, hour, minute and second fields how the broken-out +time values. The is_utc field distinguishes between times UTC and +a local time zone. The is_date field indicates if the intra-day fields +hold valid data. + +6.3.2 Time manipulating routines + +The null time value is used to indicate that the data in the structure +is not a valid time. + +struct icaltimetype icaltime_null_time(void); + +int icaltime_is_null_time(struct icaltimetype t); + +It is sensible for the broken-out time fields to contain values that +are not permitted in an ISO compliant time string. For instance, the +seconds field can hold values greater than 59, and the hours field +can hold values larger than 24. The excessive values will be rolled +over into the next larger field when the structure is normalized. + +struct icaltimetype icaltime_normalize(struct icaltimetype t); + +There are several routines to get the day of the week or month, etc, +from a time structure. + +short icaltime_day_of_year(struct icaltimetype t); + +struct icaltimetype icaltime_from_day_of_year(short doy, short year); + +short icaltime_day_of_week(struct icaltimetype t); + +short icaltime_start_doy_of_week(struct icaltimetype t); + +short icaltime_week_number(short day_of_month, short month, short year); + +struct icaltimetype icaltime_from_week_number(short week_number, short +year); + +short icaltime_days_in_month(short month,short year); + +Two routines convert time structures to and from the number of seconds +since the POSIX epoch. The is_date field indicates wether or not the +hour, minute and second fields should be used in the conversion, and +is_utc indicates if the value should be converted to a local time +or a UTC time, using the operating system suppled notion of the local +timezone. + +struct icaltimetype icaltime_from_timet(time_t v, int is_date, int +is_utc); + +time_t icaltime_as_timet(struct icaltimetype); + +The compare routine works exactly like strcmp, but on time structures. + +int icaltime_compare(struct icaltimetype a,struct icaltimetype b); + +The following routines convert between UTC and a named timezone. The +tzid field must be a timezone name from the Olsen database, such as +"America/Los_Angeles." + +The utc_offset routine returns the offset of the named time zone from +UTC, in seconds. + +The tt parmeter in the fonllowing routines indicates the date on which +the conversion should be made. The tt parameter is necessary because +timezones have many different rules for when daylight savings time +is used, and these rules can change over time. So, for a single timezone +one year may have daylight savings time on March 15, but for other +years March 15 may be standard time, and some years may have standard +time all year. + +int icaltime_utc_offset(struct icaltimetype tt, char* tzid) + +struct icaltimetype icaltime_as_utc(struct icaltimetype tt,char* tzid); + +struct icaltimetype icaltime_as_zone(struct icaltimetype tt,char* tzid); + +6.4 Storing Objects The libical distribution inclues a seperate library, libicalss, that allows you to store iCal component data to disk in a variety of ways. This library is documented seperately. ( & currently, not at all. ) -6.4 \label{sec:memory}Memory Management +6.5 <sec:memory>Memory Management Libical relies heavily on dynamic allocation for both the core objects and for the strings used to hold values. Some of this memory the library @@ -683,19 +914,19 @@ library. Here is a summary of the memory rules. put it on a ring buffer to reclaim later. You'd better strdup() it if you want to keep it, and you don't have to delete it. -6.5 Error Handling +6.6 Error Handling Libical has several error handling mechanisms for the varioustypes of programming, semantic and syntactic errors you may encounter. -6.5.1 Return values +6.6.1 Return values Many library routines signal errors through their return values. All routines that return a pointer, such as icalcomponent_new(), will return 0 ( zero ) on a fatal error. Some routines will return a value of enum icalerrorenum. -6.5.2 icalerrno +6.6.2 icalerrno Most routines will set the global error value icalerrno on errors. This variable is an enumeration; permissable values can be found in @@ -703,7 +934,7 @@ libical/icalerror.h. If the routine returns an enum icalerrorenum, then the return value will be the same as icalerrno. You can use icalerror_strerror() to get a string that describes the error -6.5.3 X-LIC-ERROR and X-LIC-INVALID-COMPONENT +6.6.3 X-LIC-ERROR and X-LIC-INVALID-COMPONENT The library handles semantic and syntactic errors in components by inserting errors properties into the components. If the parser cannot @@ -723,27 +954,27 @@ RFC2445. There are a few routines to manipulate error properties: -+------------------------------------+--------------------------------+ -|Routine | Purpose | -+------------------------------------+--------------------------------+ -+------------------------------------+--------------------------------+ -|void icalrestriction_check() | Check a component against | -| | RFC2446 and insert error prop | -| | erties to indicate non compli | -| | ance | -|int icalcomponent_count_errors() | Return the number of error | -| | properties in a component | -|void icalcomponent_strip_errors() | Remove all error properties in | -| | as component | -+------------------------------------+--------------------------------+ -|void icalcomponent_convert_errors() | Convert some error properties | -| | into REQUESTS-STATUS to indi | -| | cate the inability to process | -| | the component as an iTIP re | -| | quest. | -+------------------------------------+--------------------------------+ -| | | -+------------------------------------+--------------------------------+ ++-------------------------------------+-----------------------------------------------+ +| Routine | Purpose | ++-------------------------------------+-----------------------------------------------+ +| void icalrestriction_check() | Check a component against RFC2446 and insert | ++-------------------------------------+-----------------------------------------------+ +| | error properties to indicate non compliance | ++-------------------------------------+-----------------------------------------------+ +| int icalcomponent_count_errors() | Return the number of error properties | ++-------------------------------------+-----------------------------------------------+ +| | in a component | ++-------------------------------------+-----------------------------------------------+ +| void icalcomponent_strip_errors() | Remove all error properties in as | ++-------------------------------------+-----------------------------------------------+ +| | component | ++-------------------------------------+-----------------------------------------------+ +| void icalcomponent_convert_errors() | Convert some error properties into | ++-------------------------------------+-----------------------------------------------+ +| | REQUESTS-STATUS to indicate the inability to | ++-------------------------------------+-----------------------------------------------+ +| | process the component as an iTIP request. | ++-------------------------------------+-----------------------------------------------+ The types of errors are listed in icalerror.h. They are: @@ -774,24 +1005,24 @@ As of libical version0.18, this routine only convert *PARSEERROR errors and it always generates a 3.x ( failure ) code. This makes it more of a good idea than a really useful bit of code. -6.6 Naming Standard +6.7 Naming Standard -Structures that you access with the ``struct'' keyword, such as ``struct -icaltimetype'' are things that you are allowed to see inside and poke +Structures that you access with the "struct" keyword, such as "struct +icaltimetype" are things that you are allowed to see inside and poke at. -Structures that you access though a typedef, such as ``icalcomponent'' +Structures that you access though a typedef, such as "icalcomponent" are things where all of the data is hidden. -Component names that start with ``V'' are part of RFC 2445 or another -iCal standard. Component names that start with ``X'' are also part -of the spec, but they are not actually components in the spec. However, +Component names that start with "V" are part of RFC 2445 or another +iCal standard. Component names that start with "X" are also part of +the spec, but they are not actually components in the spec. However, they look and act like components, so they are components in libical. -Names that start with ``XLIC'' or ``X-LIC'' are not part of any iCal -spec. They are used internally by libical. +Names that start with "XLIC" or "X-LIC" are not part of any iCal spec. +They are used internally by libical. Enums that identify a component, property, value or parameter end with -``_COMPONENT,'' ``_PROPERTY,'' ``_VALUE,'' or ``_PARAMETER''s +"_COMPONENT," "_PROPERTY," "_VALUE," or "_PARAMETER"s Enums that identify a parameter value have the name of the parameter as the second word. For instance: ICAL_ROLE_REQPARTICIPANT or ICAL_PARTSTAT_ACCEPTED. @@ -816,4 +1047,4 @@ Checking restrictions is computationally expensive. There are a lot of hacks in the library -- bits of code that I am not proud of and should propbably be changed. These are marked with the -comment string ``HACK.'' +comment string "HACK." diff --git a/libical/examples/access_properties_and_parameters.c b/libical/examples/access_properties_and_parameters.c index 176b49a109..8591786bf0 100644 --- a/libical/examples/access_properties_and_parameters.c +++ b/libical/examples/access_properties_and_parameters.c @@ -12,7 +12,6 @@ void get_required_attendees(icalcomponent* event) { icalproperty* p; icalparameter* parameter; - int c=0; assert(event != 0); assert(icalcomponent_isa(event) == ICAL_VEVENT_COMPONENT); @@ -60,7 +59,7 @@ void update_attendees(icalcomponent* event) icalparameter* parameter; assert(event != 0); - assert(icalcomponent_isa(event) == ICAL_VEVENT_COMPONENT); + assert(icalcomponent_isa(event) == ICAL_VEVENT_COMPONENT); for( p = icalcomponent_get_first_property(event,ICAL_ATTENDEE_PROPERTY); @@ -109,7 +108,7 @@ void test_properties() /* Create a new property */ prop = icalproperty_vanew_comment( - strdup("Another Comment"), + "Another Comment", icalparameter_new_cn("A Common Name 1"), icalparameter_new_cn("A Common Name 2"), icalparameter_new_cn("A Common Name 3"), diff --git a/libical/scripts/mkderivedparameters.pl b/libical/scripts/mkderivedparameters.pl index 2b505c878a..5715220ea3 100755 --- a/libical/scripts/mkderivedparameters.pl +++ b/libical/scripts/mkderivedparameters.pl @@ -272,6 +272,6 @@ EOM if ($opt_h){ print <<EOM; -#endif ICALPARAMETER_H +#endif /*ICALPARAMETER_H*/ EOM } diff --git a/libical/scripts/mkderivedproperties.pl b/libical/scripts/mkderivedproperties.pl index 010e35d178..9778c30a77 100755 --- a/libical/scripts/mkderivedproperties.pl +++ b/libical/scripts/mkderivedproperties.pl @@ -30,6 +30,7 @@ while (<F>){ my @v = split(/\t+/,$_); my $value = shift @v; + my $mode = shift @v; my $type = shift @v; my $comment = join(" ",@v); @@ -284,7 +285,7 @@ if ($opt_p) if ($opt_h){ print <<EOM; -#endif ICALPROPERTY_H +#endif /*ICALPROPERTY_H*/ EOM } diff --git a/libical/scripts/mkderivedvalues.pl b/libical/scripts/mkderivedvalues.pl index 103c54a8e2..a04928ab59 100755 --- a/libical/scripts/mkderivedvalues.pl +++ b/libical/scripts/mkderivedvalues.pl @@ -128,6 +128,7 @@ while(<F>) my @v = split(/\t+/,$_); my $value = shift @v; + my $mode = shift @v; my $type = shift @v; my $comment = join(" ",@v); @@ -155,7 +156,7 @@ while(<F>) $union_data = $lc; } - if ($opt_c) { + if ($opt_c && $mode eq "std") { print <<EOM; icalvalue* @@ -182,7 +183,7 @@ icalvalue_set_${lc}(icalvalue* value, $type v) EOM if( ${union_data} eq 'string'){ -print" if(impl->data.v_${union_data}!=0) {free(impl->data.v_${union_data});}\n"; +print" if(impl->data.v_${union_data}!=0) {free((void*)impl->data.v_${union_data});}\n"; } print <<EOM; @@ -216,15 +217,15 @@ EOM if ( $ud{$union_data}++ == 0) { print<<EOM; -char* icalvalue_${union_data}_as_ical_string(icalvalue* value) { +const char* icalvalue_${union_data}_as_ical_string(icalvalue* value) { $type data; char temp[1024]; char *str; - icalerror_check_arg( (value!=0),"value"); + icalerror_check_airg( (value!=0),"value"); data = ((struct icalvalue_impl*)value)->data.v_${union_data} - str = strdup(temp); + str = icalmemory_strdup(temp); return str; } @@ -306,7 +307,7 @@ if ($opt_p) if ($opt_h){ print <<EOM; -#endif ICALVALUE_H +#endif /*ICALVALUE_H*/ EOM } diff --git a/libical/scripts/mkrestrictiontable.pl b/libical/scripts/mkrestrictiontable.pl index 1dab5709b9..e1e1a0ca53 100755 --- a/libical/scripts/mkrestrictiontable.pl +++ b/libical/scripts/mkrestrictiontable.pl @@ -46,10 +46,12 @@ while(<F>) if(!$sub) { $sub = "0"; + } else { + $sub = "icalrestriction_".$sub; } if($prop ne "NONE"){ - print(" \{ICAL_METHOD_${method},ICAL_${targetcomp}_COMPONENT,ICAL_${prop}_PROPERTY,ICAL_RESTRICTION_${restr},$sub\},\n"); + print(" \{ICAL_METHOD_${method},ICAL_${targetcomp}_COMPONENT,ICAL_${prop}_PROPERTY,ICAL_RESTRICTION_${restr},$sub},\n"); } } @@ -80,6 +82,8 @@ while(<F>) if(!$sub) { $sub = "0"; + } else { + $sub = "icalrestriction_".$sub; } diff --git a/libical/src/libical/Makefile.am b/libical/src/libical/Makefile.am index 35a08effc7..ee87c992e1 100644 --- a/libical/src/libical/Makefile.am +++ b/libical/src/libical/Makefile.am @@ -1,106 +1,175 @@ - -#AUTOMAKE_OPTIONS = no-dependencies - -#noinst_LTLIBRARIES = libical.la -lib_LIBRARIES = libical.a - -YFLAGS =-d -v -t - -libical_a_SOURCES = \ - ical.h \ - icalcomponent.c \ - icalcomponent.h \ - icalenums.c \ - icalenums.h \ - icalerror.c \ - icalerror.h \ - icalyacc.y \ - icallexer.l \ - icalmemory.c \ - icalmemory.h \ - icalparameter.c \ - icalparameter.h \ - icalparser.c \ - icalparser.h \ - icalproperty.c \ - icalproperty.h \ - icalrestriction.c \ - icalrestriction.h \ - icaltypes.c \ - icaltypes.h \ - icalvalue.c \ - icalvalue.h \ - icalrecur.c \ - icalrecur.h \ - icaltime.h \ - icaltime.c \ - pvl.c \ - pvl.h \ - sspm.c \ - sspm.h \ - icalmime.c \ - icalmime.h - -include_HEADERS=\ - ical.h \ - icalcomponent.h \ - icalenums.h \ - icalerror.h \ - icalmemory.h \ - icalparameter.h \ - icalparser.h \ - icalproperty.h \ - icalrestriction.h \ - icaltypes.h \ - icalvalue.h \ - icalrecur.h \ - icalversion.h \ - icaltime.h \ - pvl.h \ - sspm.h \ - icalmime.h - - -# -# static convenience library for use in conduits -# - -noinst_LTLIBRARIES = libical-static.la -libical_static_la_SOURCES = $(libical_a_SOURCES) -libical_static_la_LDFLAGS = --all-static - -EXTRA_DIST = icallexer.c icalyacc.c icalyacc.h - -CONFIG_CLEAN_FILES = y.output *~ - -DESIGNDATA = ../../design-data -ICALSCRIPTS = ../../scripts -derived: icalproperty icalparameter icalvalue icalrestriction - -icalproperty: - $(ICALSCRIPTS)/mkderivedproperties.pl -i icalproperty.h -h $(DESIGNDATA)/prop-to-value.txt ${DESIGNDATA}/value-c-types.txt > icalproperty.newh - mv icalproperty.newh icalproperty.h - - $(ICALSCRIPTS)/mkderivedproperties.pl -i icalproperty.c -c $(DESIGNDATA)/prop-to-value.txt ${DESIGNDATA}/value-c-types.txt > icalproperty.newc - mv icalproperty.newc icalproperty.c - - -icalparameter: - $(ICALSCRIPTS)/mkderivedparameters.pl -i icalparameter.h -h $(DESIGNDATA)/param-c-types.txt > icalparameter.newh - mv icalparameter.newh icalparameter.h - - $(ICALSCRIPTS)/mkderivedparameters.pl -i icalparameter.c -c $(DESIGNDATA)/param-c-types.txt > icalparameter.newc - mv icalparameter.newc icalparameter.c - -icalvalue: - $(ICALSCRIPTS)/mkderivedvalues.pl -i icalvalue.h -h $(DESIGNDATA)/value-c-types.txt > icalvalue.newh - mv icalvalue.newh icalvalue.h - - $(ICALSCRIPTS)/mkderivedvalues.pl -i icalvalue.c -c $(DESIGNDATA)/value-c-types.txt > icalvalue.newc - mv icalvalue.newc icalvalue.c - -icalrestriction: - $(ICALSCRIPTS)/mkrestrictiontable.pl -i icalrestriction.c $(DESIGNDATA)/restrictions.csv > icalrestriction.newc - mv icalrestriction.newc icalrestriction.c - - +DESIGNDATA = $(top_srcdir)/design-data +ICALSCRIPTS = $(top_srcdir)/scripts + +lib_LTLIBRARIES = libical.la + +YFLAGS = -d -v -t -pical_yy +LFLAGS = -Pical_yy +LEX_OUTPUT_ROOT = lex.ical_yy + +all: ical.h + +INCLUDES = \ + -I$(top_builddir) \ + -I$(top_srcdir)/src \ + -I$(top_builddir)/src \ + -I$(srcdir) + +libical_la_LDFLAGS = -version-info 0:0:0 + +libical_la_SOURCES = \ + icalcomponent.c \ + icalcomponent.h \ + icalenums.c \ + icalenums.h \ + icalerror.c \ + icalerror.h \ + icallexer.l \ + icalmemory.c \ + icalmemory.h \ + icalmime.c \ + icalmime.h \ + icalparameter.c \ + icalparameter.h \ + icalparser.c \ + icalparser.h \ + icalproperty.c \ + icalproperty.h \ + icalrecur.c \ + icalrecur.h \ + icalrestriction.c \ + icalrestriction.h \ + icaltime.c \ + icaltime.h \ + icaltypes.c \ + icaltypes.h \ + icalvalue.c \ + icalvalue.h \ + icalyacc.h \ + icalyacc.y \ + pvl.c \ + pvl.h \ + sspm.c \ + sspm.h + +libicalincludedir = $(includedir) + +libicalinclude_HEADERS = ical.h + +# ORDERING OF HEADERS IS SIGNIFICANT. Don't change this ordering. It +# is required to make the combined header ical.h properly +COMBINEDHEADERS = \ + $(top_builddir)/src/libical/icalversion.h \ + $(top_srcdir)/src/libical/icaltime.h \ + $(top_srcdir)/src/libical/icalenums.h \ + $(top_srcdir)/src/libical/icaltypes.h \ + $(top_srcdir)/src/libical/icalrecur.h \ + $(top_srcdir)/src/libical/icalvalue.h \ + $(top_srcdir)/src/libical/icalparameter.h \ + $(top_srcdir)/src/libical/icalproperty.h \ + $(top_srcdir)/src/libical/pvl.h \ + $(top_srcdir)/src/libical/icalcomponent.h \ + $(top_srcdir)/src/libical/icalparser.h \ + $(top_srcdir)/src/libical/icalmemory.h \ + $(top_srcdir)/src/libical/icalerror.h \ + $(top_srcdir)/src/libical/icalrestriction.h \ + $(top_srcdir)/src/libical/sspm.h \ + $(top_srcdir)/src/libical/icalmime.h + +BUILT_SOURCES = \ + icalparameter.c \ + icalparameter.h \ + icalproperty.c \ + icalproperty.h \ + icalrestriction.c \ + icalvalue.c \ + icalvalue.h + +ical.h: $(COMBINEDHEADERS) $(BUILT_SOURCES) + cat $(COMBINEDHEADERS) \ + | egrep -v "#include.*\"ical" \ + | egrep -v "#include.*\"pvl\.h\"" > ical.h + +icallexer.c : icalyacc.h + + +# parameters + +PARAMETERDEPS = \ + $(ICALSCRIPTS)/mkderivedparameters.pl \ + $(DESIGNDATA)/param-c-types.txt \ + icalparameter.c.in \ + icalparameter.h.in + +icalparameter.h: $(PARAMETERDEPS) + $(PERL) $(ICALSCRIPTS)/mkderivedparameters.pl -i icalparameter.h.in -h $(DESIGNDATA)/param-c-types.txt > icalparameter.newh \ + && mv icalparameter.newh icalparameter.h + +icalparameter.c: $(PARAMETERDEPS) icalparameter.h + $(PERL) $(ICALSCRIPTS)/mkderivedparameters.pl -i icalparameter.c.in -c $(DESIGNDATA)/param-c-types.txt > icalparameter.newc \ + && mv icalparameter.newc icalparameter.c + +# properties + +PROPERTYDEPS = \ + $(ICALSCRIPTS)/mkderivedproperties.pl \ + $(DESIGNDATA)/prop-to-value.txt \ + $(DESIGNDATA)/value-c-types.txt \ + icalproperty.c.in \ + icalproperty.h.in + + +icalproperty.h: $(PROPERTYDEPS) + $(PERL) $(ICALSCRIPTS)/mkderivedproperties.pl -i icalproperty.h.in -h \ + $(DESIGNDATA)/prop-to-value.txt \ + ${DESIGNDATA}/value-c-types.txt > icalproperty.h + +icalproperty.c: $(PROPERTYDEPS) icalproperty.h + $(PERL) $(ICALSCRIPTS)/mkderivedproperties.pl -i icalproperty.c.in -c \ + $(DESIGNDATA)/prop-to-value.txt \ + ${DESIGNDATA}/value-c-types.txt > icalproperty.c + +# restrictions + +RESTRICTIONDEPS = \ + $(ICALSCRIPTS)/mkrestrictiontable.pl \ + $(DESIGNDATA)/restrictions.csv \ + icalrestriction.c.in + +icalrestriction.c: $(RESTRICTIONDEPS) + $(PERL) $(ICALSCRIPTS)/mkrestrictiontable.pl -i icalrestriction.c.in \ + $(DESIGNDATA)/restrictions.csv > icalrestriction.c + +# values + +VALUEDEPS = \ + $(ICALSCRIPTS)/mkderivedvalues.pl \ + $(DESIGNDATA)/value-c-types.txt \ + icalvalue.c.in \ + icalvalue.h.in + +icalvalue.h: $(VALUEDEPS) + $(PERL) $(ICALSCRIPTS)/mkderivedvalues.pl -i icalvalue.h.in -h \ + $(DESIGNDATA)/value-c-types.txt > icalvalue.h + +icalvalue.c: $(VALUEDEPS) icalvalue.h + $(PERL) $(ICALSCRIPTS)/mkderivedvalues.pl -i icalvalue.c.in -c \ + $(DESIGNDATA)/value-c-types.txt > icalvalue.c + + + +# housekeeping +CONFIG_CLEAN_FILES = y.output + +EXTRA_DIST = \ + icalparameter.c.in \ + icalparameter.h.in \ + icalproperty.c.in \ + icalproperty.h.in \ + icalrestriction.c.in \ + icalvalue.c.in \ + icalvalue.h.in \ + icalversion.h.in \ + $(BUILT_SOURCES) \ + icallexer.c \ + icalyacc.c diff --git a/libical/src/libical/ical.h b/libical/src/libical/ical.h index 05e7ca82bc..506d69a6db 100644 --- a/libical/src/libical/ical.h +++ b/libical/src/libical/ical.h @@ -1,6 +1,596 @@ +#ifndef ICAL_VERSION_H +#define ICAL_VERSION_H + +#define ICAL_PACKAGE "libical" +#define ICAL_VERSION "0.21a" + +#endif +/* -*- Mode: C -*- */ +/*====================================================================== + FILE: icaltime.h + CREATOR: eric 02 June 2000 + + + $Id$ + $Locker$ + + (C) COPYRIGHT 2000, Eric Busboom, http://www.softwarestudio.org + + This program is free software; you can redistribute it and/or modify + it under the terms of either: + + The LGPL as published by the Free Software Foundation, version + 2.1, available at: http://www.fsf.org/copyleft/lesser.html + + Or: + + The Mozilla Public License Version 1.0. You may obtain a copy of + the License at http://www.mozilla.org/MPL/ + + The Original Code is eric. The Initial Developer of the Original + Code is Eric Busboom + + +======================================================================*/ + +#ifndef ICALTIME_H +#define ICALTIME_H + +#include <time.h> + +/* icaltime_span is returned by icalcomponent_get_span() */ +struct icaltime_span { + time_t start; /* in UTC */ + time_t end; /* in UTC */ + int is_busy; /* 1->busy time, 0-> free time */ +}; + +struct icaltimetype +{ + int year; + int month; + int day; + int hour; + int minute; + int second; + + int is_utc; /* 1-> time is in UTC timezone */ + + int is_date; /* 1 -> interpret this as date. */ +}; + +struct icaltimetype icaltime_null_time(void); + +int icaltime_is_null_time(struct icaltimetype t); + +struct icaltimetype icaltime_normalize(struct icaltimetype t); + +short icaltime_day_of_year(struct icaltimetype t); +struct icaltimetype icaltime_from_day_of_year(short doy, short year); + +short icaltime_day_of_week(struct icaltimetype t); +short icaltime_start_doy_of_week(struct icaltimetype t); + +struct icaltimetype icaltime_from_timet(time_t v, int is_date, int is_utc); +struct icaltimetype icaltime_from_string(const char* str); +time_t icaltime_as_timet(struct icaltimetype); +char* icaltime_as_ctime(struct icaltimetype); + +short icaltime_week_number(short day_of_month, short month, short year); + +struct icaltimetype icaltime_from_week_number(short week_number, short year); + +int icaltime_compare(struct icaltimetype a,struct icaltimetype b); + +int icaltime_compare_date_only(struct icaltimetype a, struct icaltimetype b); + + +short icaltime_days_in_month(short month,short year); + +/* Routines for handling timezones */ + +/* Return the offset of the named zone as seconds. tt is a time + indicating the date for which you want the offset */ +time_t icaltime_utc_offset(struct icaltimetype tt, const char* tzid); + +time_t icaltime_local_utc_offset(); + + +/* convert tt, of timezone tzid, into a utc time */ +struct icaltimetype icaltime_as_utc(struct icaltimetype tt,const char* tzid); + +/* convert tt, a time in UTC, into a time in timezone tzid */ +struct icaltimetype icaltime_as_zone(struct icaltimetype tt,const char* tzid); + + + +struct icaldurationtype +{ + int is_neg; + unsigned int days; + unsigned int weeks; + unsigned int hours; + unsigned int minutes; + unsigned int seconds; +}; + +struct icaldurationtype icaldurationtype_from_timet(time_t t); +struct icaldurationtype icaldurationtype_from_string(const char*); +time_t icaldurationtype_as_timet(struct icaldurationtype duration); + + +struct icalperiodtype +{ + struct icaltimetype start; /* Must be absolute */ + struct icaltimetype end; /* Must be absolute */ + struct icaldurationtype duration; +}; + +time_t icalperiodtype_duration(struct icalperiodtype period); +time_t icalperiodtype_end(struct icalperiodtype period); + + + +struct icaltimetype icaltime_add(struct icaltimetype t, + struct icaldurationtype d); + +struct icaldurationtype icaltime_subtract(struct icaltimetype t1, + struct icaltimetype t2); + + +#endif /* !ICALTIME_H */ + + + + +/* -*- Mode: C -*-*/ +/*====================================================================== + FILE: icalenums.h + + + + (C) COPYRIGHT 2000, Eric Busboom, http://www.softwarestudio.org + + This program is free software; you can redistribute it and/or modify + it under the terms of either: + + The LGPL as published by the Free Software Foundation, version + 2.1, available at: http://www.fsf.org/copyleft/lesser.html + + Or: + + The Mozilla Public License Version 1.0. You may obtain a copy of + the License at http://www.mozilla.org/MPL/ + + The original code is icalenums.h + + Contributions from: + Graham Davison (g.m.davison@computer.org) + +======================================================================*/ + +#ifndef ICALENUMS_H +#define ICALENUMS_H + + + +/*********************************************************************** + * Component enumerations +**********************************************************************/ + +typedef enum icalcomponent_kind { + ICAL_NO_COMPONENT, + ICAL_ANY_COMPONENT, /* Used to select all components*/ + ICAL_XROOT_COMPONENT, + ICAL_XATTACH_COMPONENT, /* MIME attached data, returned by parser. */ + ICAL_VEVENT_COMPONENT, + ICAL_VTODO_COMPONENT, + ICAL_VJOURNAL_COMPONENT, + ICAL_VCALENDAR_COMPONENT, + ICAL_VFREEBUSY_COMPONENT, + ICAL_VALARM_COMPONENT, + ICAL_XAUDIOALARM_COMPONENT, + ICAL_XDISPLAYALARM_COMPONENT, + ICAL_XEMAILALARM_COMPONENT, + ICAL_XPROCEDUREALARM_COMPONENT, + ICAL_VTIMEZONE_COMPONENT, + ICAL_XSTANDARD_COMPONENT, + ICAL_XDAYLIGHT_COMPONENT, + ICAL_X_COMPONENT, + ICAL_VSCHEDULE_COMPONENT, + ICAL_VQUERY_COMPONENT, + ICAL_VCAR_COMPONENT, + ICAL_VCOMMAND_COMPONENT, + ICAL_XLICINVALID_COMPONENT, + ICAL_XLICMIMEPART_COMPONENT /* a non-stardard component that mirrors + structure of MIME data */ + +} icalcomponent_kind; + +/*********************************************************************** + * Property Enumerations +**********************************************************************/ + +typedef enum icalproperty_kind { + ICAL_ANY_PROPERTY = 0, /* This must be the first enum, for iteration */ + ICAL_CALSCALE_PROPERTY, + ICAL_METHOD_PROPERTY, + ICAL_PRODID_PROPERTY, + ICAL_VERSION_PROPERTY, + ICAL_ATTACH_PROPERTY, + ICAL_CATEGORIES_PROPERTY, + ICAL_CLASS_PROPERTY, + ICAL_COMMENT_PROPERTY, + ICAL_DESCRIPTION_PROPERTY, + ICAL_GEO_PROPERTY, + ICAL_LOCATION_PROPERTY, + ICAL_PERCENTCOMPLETE_PROPERTY, + ICAL_PRIORITY_PROPERTY, + ICAL_RESOURCES_PROPERTY, + ICAL_STATUS_PROPERTY, + ICAL_SUMMARY_PROPERTY, + ICAL_COMPLETED_PROPERTY, + ICAL_DTEND_PROPERTY, + ICAL_DUE_PROPERTY, + ICAL_DTSTART_PROPERTY, + ICAL_DURATION_PROPERTY, + ICAL_FREEBUSY_PROPERTY, + ICAL_TRANSP_PROPERTY, + ICAL_TZID_PROPERTY, + ICAL_TZNAME_PROPERTY, + ICAL_TZOFFSETFROM_PROPERTY, + ICAL_TZOFFSETTO_PROPERTY, + ICAL_TZURL_PROPERTY, + ICAL_ATTENDEE_PROPERTY, + ICAL_CONTACT_PROPERTY, + ICAL_ORGANIZER_PROPERTY, + ICAL_RECURRENCEID_PROPERTY, + ICAL_RELATEDTO_PROPERTY, + ICAL_URL_PROPERTY, + ICAL_UID_PROPERTY, + ICAL_EXDATE_PROPERTY, + ICAL_EXRULE_PROPERTY, + ICAL_RDATE_PROPERTY, + ICAL_RRULE_PROPERTY, + ICAL_ACTION_PROPERTY, + ICAL_REPEAT_PROPERTY, + ICAL_TRIGGER_PROPERTY, + ICAL_CREATED_PROPERTY, + ICAL_DTSTAMP_PROPERTY, + ICAL_LASTMODIFIED_PROPERTY, + ICAL_SEQUENCE_PROPERTY, + ICAL_REQUESTSTATUS_PROPERTY, + ICAL_X_PROPERTY, + + /* CAP Properties */ + ICAL_SCOPE_PROPERTY, + ICAL_MAXRESULTS_PROPERTY, + ICAL_MAXRESULTSSIZE_PROPERTY, + ICAL_QUERY_PROPERTY, + ICAL_QUERYNAME_PROPERTY, + ICAL_TARGET_PROPERTY, + + /* libical private properties */ + ICAL_XLICERROR_PROPERTY, + ICAL_XLICCLUSTERCOUNT_PROPERTY, + ICAL_XLICMIMECONTENTTYPE_PROPERTY, + ICAL_XLICMIMEENCODING_PROPERTY, + ICAL_XLICMIMECID_PROPERTY, + ICAL_XLICMIMEFILENAME_PROPERTY, + ICAL_XLICMIMECHARSET_PROPERTY, + ICAL_XLICMIMEOPTINFO_PROPERTY, + + ICAL_NO_PROPERTY /* This must be the last enum, for iteration */ + +} icalproperty_kind; + +/*********************************************************************** + * Enumerations for the values of properties + ***********************************************************************/ + +typedef enum icalproperty_method { + ICAL_METHOD_PUBLISH, + ICAL_METHOD_REQUEST, + ICAL_METHOD_REPLY, + ICAL_METHOD_ADD, + ICAL_METHOD_CANCEL, + ICAL_METHOD_REFRESH, + ICAL_METHOD_COUNTER, + ICAL_METHOD_DECLINECOUNTER, + /* CAP Methods */ + ICAL_METHOD_CREATE, + ICAL_METHOD_READ, + ICAL_METHOD_RESPONSE, + ICAL_METHOD_MOVE, + ICAL_METHOD_MODIFY, + ICAL_METHOD_GENERATEUID, + ICAL_METHOD_DELETE, + ICAL_METHOD_NONE +} icalproperty_method ; + +typedef enum icalproperty_transp { + ICAL_TRANSP_OPAQUE, + ICAL_TRANS_TRANSPARENT +} icalproperty_trans; + +typedef enum icalproperty_calscale { + ICAL_CALSCALE_GREGORIAN +} icalproperty_calscale ; + + +typedef enum icalproperty_class { + ICAL_CLASS_PUBLIC, + ICAL_CLASS_PRIVATE, + ICAL_CLASS_CONFIDENTIAL, + ICAL_CLASS_XNAME +} icalproperty_class; + + +typedef enum icalproperty_status { + ICAL_STATUS_NONE, + ICAL_STATUS_TENTATIVE, + ICAL_STATUS_CONFIRMED, + ICAL_STATUS_CANCELLED, /* CANCELED? SIC from RFC*/ + ICAL_STATUS_NEEDSACTION, + ICAL_STATUS_COMPLETED, + ICAL_STATUS_INPROCESS, + ICAL_STATUS_DRAFT, + ICAL_STATUS_FINAL +} icalproperty_status; + +typedef enum icalproperty_action { + ICAL_ACTION_AUDIO, + ICAL_ACTION_DISPLAY, + ICAL_ACTION_EMAIL, + ICAL_ACTION_PROCEDURE, + ICAL_ACTION_XNAME +} icalproperty_action; + +/*********************************************************************** + * Value enumerations +**********************************************************************/ + +typedef enum icalvalue_kind { + ICAL_NO_VALUE, + ICAL_ATTACH_VALUE, /* Non-Standard*/ + ICAL_BINARY_VALUE, + ICAL_BOOLEAN_VALUE, + ICAL_CALADDRESS_VALUE, + ICAL_DATE_VALUE, + ICAL_DATETIME_VALUE, + ICAL_DATETIMEDATE_VALUE, /* Non-Standard */ + ICAL_DATETIMEPERIOD_VALUE, /* Non-Standard */ + ICAL_DURATION_VALUE, + ICAL_FLOAT_VALUE, + ICAL_GEO_VALUE, /* Non-Standard */ + ICAL_INTEGER_VALUE, + ICAL_METHOD_VALUE, /* Non-Standard */ + ICAL_STATUS_VALUE, /* Non-Standard */ + ICAL_PERIOD_VALUE, + ICAL_RECUR_VALUE, + ICAL_STRING_VALUE, /* Non-Standard */ + ICAL_TEXT_VALUE, + ICAL_TIME_VALUE, + ICAL_TRIGGER_VALUE, /* Non-Standard */ + ICAL_URI_VALUE, + ICAL_UTCOFFSET_VALUE, + ICAL_QUERY_VALUE, + ICAL_XNAME_VALUE +} icalvalue_kind; + + +/*********************************************************************** + * Parameter Enumerations + **********************************************************************/ + + +typedef enum icalparameter_kind { + ICAL_NO_PARAMETER, + ICAL_ANY_PARAMETER, + ICAL_ALTREP_PARAMETER, /* DQUOTE uri DQUOTE */ + ICAL_CN_PARAMETER, /* text */ + ICAL_CUTYPE_PARAMETER, /*INDIVIDUAL, GROUP, RESOURCE,ROOM,UNKNOWN, x-name*/ + ICAL_DELEGATEDFROM_PARAMETER, /* *("," DQUOTE cal-address DQUOTE) */ + ICAL_DELEGATEDTO_PARAMETER, /* *("," DQUOTE cal-address DQUOTE) */ + ICAL_DIR_PARAMETER, /* DQUOTE uri DQUOTE */ + ICAL_ENCODING_PARAMETER, /* *BIT, BASE64, x-name */ + ICAL_FMTTYPE_PARAMETER, /* registered MINE content type */ + ICAL_FBTYPE_PARAMETER, /* FREE, BUSY, BUSY-UNAVAILABLE, BUSY-TENTATIVE,x-name */ + ICAL_LANGUAGE_PARAMETER, /* text from RFC 1766 */ + ICAL_MEMBER_PARAMETER, /* DQUOTE cal-address DQUOTE */ + ICAL_PARTSTAT_PARAMETER, /* NEEDS-ACTION, ACCEPTED, DECLINED, TENTATIVE, DELEGATED, x-name */ + ICAL_RANGE_PARAMETER, /* THISANDPRIOR, THISANDFUTURE */ + ICAL_RELATED_PARAMETER, /* START, END */ + ICAL_RELTYPE_PARAMETER, /* PARENT, CHILD, SIBLING,x-name */ + ICAL_ROLE_PARAMETER, /* CHAIR, REQ_PARTICIPANT, OPT_PARTICIPANT, NON_PARTICIPANT, x-name */ + ICAL_RSVP_PARAMETER, /* TRUE. FALSE */ + ICAL_SENTBY_PARAMETER, /* DQUOTE uri DQUOTE */ + ICAL_TZID_PARAMETER, /* [tzidprefix] paramtext CRLF */ + ICAL_VALUE_PARAMETER, /* BINARY, BOOLEAN, CAL_ADDRESS, DATE, DATE-TIME, DURATION, FLOAT, INTEGER, PERIOD, RECUR, TEXT, TIME, UTC_OFFSET, x-name */ + ICAL_XLICERRORTYPE_PARAMETER, /*ICAL_XLICERROR_PARSE_ERROR,ICAL_XLICERROR_INVALID_ITIP*/ + ICAL_XLICCOMPARETYPE_PARAMETER, /**/ + ICAL_X_PARAMETER /* text */ +} icalparameter_kind; + +typedef enum icalparameter_cutype { + ICAL_CUTYPE_INDIVIDUAL, + ICAL_CUTYPE_GROUP, + ICAL_CUTYPE_RESOURCE, + ICAL_CUTYPE_ROOM, + ICAL_CUTYPE_UNKNOWN, + ICAL_CUTYPE_XNAME +} icalparameter_cutype; + + +typedef enum icalparameter_encoding { + ICAL_ENCODING_8BIT, + ICAL_ENCODING_BASE64, + ICAL_ENCODING_XNAME +} icalparameter_encoding; + +typedef enum icalparameter_fbtype { + ICAL_FBTYPE_FREE, + ICAL_FBTYPE_BUSY, + ICAL_FBTYPE_BUSYUNAVAILABLE, + ICAL_FBTYPE_BUSYTENTATIVE, + ICAL_FBTYPE_XNAME +} icalparameter_fbtype; + +typedef enum icalparameter_partstat { + ICAL_PARTSTAT_NEEDSACTION, + ICAL_PARTSTAT_ACCEPTED, + ICAL_PARTSTAT_DECLINED, + ICAL_PARTSTAT_TENTATIVE, + ICAL_PARTSTAT_DELEGATED, + ICAL_PARTSTAT_COMPLETED, + ICAL_PARTSTAT_INPROCESS, + ICAL_PARTSTAT_XNAME, + ICAL_PARTSTAT_NONE +} icalparameter_partstat; + +typedef enum icalparameter_range { + ICAL_RANGE_THISANDPRIOR, + ICAL_RANGE_THISANDFUTURE +} icalparameter_range; + +typedef enum icalparameter_related { + ICAL_RELATED_START, + ICAL_RELATED_END +} icalparameter_related; + +typedef enum icalparameter_reltype { + ICAL_RELTYPE_PARENT, + ICAL_RELTYPE_CHILD, + ICAL_RELTYPE_SIBLING, + ICAL_RELTYPE_XNAME +} icalparameter_reltype; + +typedef enum icalparameter_role { + ICAL_ROLE_CHAIR, + ICAL_ROLE_REQPARTICIPANT, + ICAL_ROLE_OPTPARTICIPANT, + ICAL_ROLE_NONPARTICIPANT, + ICAL_ROLE_XNAME +} icalparameter_role; + +typedef enum icalparameter_xlicerrortype { + ICAL_XLICERRORTYPE_COMPONENTPARSEERROR, + ICAL_XLICERRORTYPE_PARAMETERVALUEPARSEERROR, + ICAL_XLICERRORTYPE_PARAMETERNAMEPARSEERROR, + ICAL_XLICERRORTYPE_PROPERTYPARSEERROR, + ICAL_XLICERRORTYPE_VALUEPARSEERROR, + ICAL_XLICERRORTYPE_UNKVCALPROP, + ICAL_XLICERRORTYPE_INVALIDITIP, + ICAL_XLICERRORTYPE_MIMEPARSEERROR +} icalparameter_xlicerrortype; + +typedef enum icalparameter_xliccomparetype { + ICAL_XLICCOMPARETYPE_EQUAL=0, + ICAL_XLICCOMPARETYPE_LESS=-1, + ICAL_XLICCOMPARETYPE_LESSEQUAL=2, + ICAL_XLICCOMPARETYPE_GREATER=1, + ICAL_XLICCOMPARETYPE_GREATEREQUAL=3, + ICAL_XLICCOMPARETYPE_NOTEQUAL=4, + ICAL_XLICCOMPARETYPE_REGEX=5 +} icalparameter_xliccomparetype; + +typedef enum icalparameter_value { + ICAL_VALUE_XNAME = ICAL_XNAME_VALUE, + ICAL_VALUE_BINARY = ICAL_BINARY_VALUE, + ICAL_VALUE_BOOLEAN = ICAL_BOOLEAN_VALUE, + ICAL_VALUE_CALADDRESS = ICAL_CALADDRESS_VALUE, + ICAL_VALUE_DATE = ICAL_DATE_VALUE, + ICAL_VALUE_DATETIME = ICAL_DATETIME_VALUE, + ICAL_VALUE_DURATION = ICAL_DURATION_VALUE, + ICAL_VALUE_FLOAT = ICAL_FLOAT_VALUE, + ICAL_VALUE_INTEGER = ICAL_INTEGER_VALUE, + ICAL_VALUE_PERIOD = ICAL_PERIOD_VALUE, + ICAL_VALUE_RECUR = ICAL_RECUR_VALUE, + ICAL_VALUE_TEXT = ICAL_TEXT_VALUE, + ICAL_VALUE_TIME = ICAL_TIME_VALUE, + ICAL_VALUE_UTCOFFSET = ICAL_UTCOFFSET_VALUE, + ICAL_VALUE_URI = ICAL_URI_VALUE, + ICAL_VALUE_ERROR = ICAL_NO_VALUE +} icalparameter_value; + + +/*********************************************************************** + * Request Status codes + **********************************************************************/ + +typedef enum icalrequeststatus { + ICAL_UNKNOWN_STATUS, + ICAL_2_0_SUCCESS_STATUS, + ICAL_2_1_FALLBACK_STATUS, + ICAL_2_2_IGPROP_STATUS, + ICAL_2_3_IGPARAM_STATUS, + ICAL_2_4_IGXPROP_STATUS, + ICAL_2_5_IGXPARAM_STATUS, + ICAL_2_6_IGCOMP_STATUS, + ICAL_2_7_FORWARD_STATUS, + ICAL_2_8_ONEEVENT_STATUS, + ICAL_2_9_TRUNC_STATUS, + ICAL_2_10_ONETODO_STATUS, + ICAL_2_11_TRUNCRRULE_STATUS, + ICAL_3_0_INVPROPNAME_STATUS, + ICAL_3_1_INVPROPVAL_STATUS, + ICAL_3_2_INVPARAM_STATUS, + ICAL_3_3_INVPARAMVAL_STATUS, + ICAL_3_4_INVCOMP_STATUS, + ICAL_3_5_INVTIME_STATUS, + ICAL_3_6_INVRULE_STATUS, + ICAL_3_7_INVCU_STATUS, + ICAL_3_8_NOAUTH_STATUS, + ICAL_3_9_BADVERSION_STATUS, + ICAL_3_10_TOOBIG_STATUS, + ICAL_3_11_MISSREQCOMP_STATUS, + ICAL_3_12_UNKCOMP_STATUS, + ICAL_3_13_BADCOMP_STATUS, + ICAL_3_14_NOCAP_STATUS, + ICAL_4_0_BUSY_STATUS, + ICAL_5_0_MAYBE_STATUS, + ICAL_5_1_UNAVAIL_STATUS, + ICAL_5_2_NOSERVICE_STATUS, + ICAL_5_3_NOSCHED_STATUS +} icalrequeststatus; + + +const char* icalenum_reqstat_desc(icalrequeststatus stat); +short icalenum_reqstat_major(icalrequeststatus stat); +short icalenum_reqstat_minor(icalrequeststatus stat); +icalrequeststatus icalenum_num_to_reqstat(short major, short minor); + +/*********************************************************************** + * Conversion functions +**********************************************************************/ + +const char* icalenum_property_kind_to_string(icalproperty_kind kind); +icalproperty_kind icalenum_string_to_property_kind(char* string); + +const char* icalenum_value_kind_to_string(icalvalue_kind kind); +icalvalue_kind icalenum_value_kind_by_prop(icalproperty_kind kind); + +const char* icalenum_parameter_kind_to_string(icalparameter_kind kind); +icalparameter_kind icalenum_string_to_parameter_kind(char* string); + +const char* icalenum_component_kind_to_string(icalcomponent_kind kind); +icalcomponent_kind icalenum_string_to_component_kind(char* string); + +icalvalue_kind icalenum_property_kind_to_value_kind(icalproperty_kind kind); + +const char* icalenum_method_to_string(icalproperty_method); +icalproperty_method icalenum_string_to_method(const char* string); + +const char* icalenum_status_to_string(icalproperty_status); +icalproperty_status icalenum_string_to_status(const char* string); + +#endif /* !ICALENUMS_H */ + + + /* -*- Mode: C -*- */ /*====================================================================== - FILE: ical.h + FILE: icaltypes.h CREATOR: eric 20 March 1999 @@ -17,34 +607,1836 @@ The Mozilla Public License Version 1.0. You may obtain a copy of the License at http://www.mozilla.org/MPL/ - The original code is ical.h + The original code is icaltypes.h ======================================================================*/ -#ifndef ICAL_H -#define ICAL_H +#ifndef ICALTYPES_H +#define ICALTYPES_H + +#include <time.h> + +/* This type type should probably be an opaque type... */ +struct icalattachtype +{ + void* binary; + int owns_binary; + + char* base64; + int owns_base64; + + char* url; + + int refcount; + +}; + +/* converts base64 to binary, fetches url and stores as binary, or + just returns data */ + +struct icalattachtype* icalattachtype_new(void); +void icalattachtype_add_reference(struct icalattachtype* v); +void icalattachtype_free(struct icalattachtype* v); + +void icalattachtype_set_url(struct icalattachtype* v, char* url); +char* icalattachtype_get_url(struct icalattachtype* v); + +void icalattachtype_set_base64(struct icalattachtype* v, char* base64, + int owns); +char* icalattachtype_get_base64(struct icalattachtype* v); + +void icalattachtype_set_binary(struct icalattachtype* v, char* binary, + int owns); +void* icalattachtype_get_binary(struct icalattachtype* v); + +struct icalgeotype +{ + float lat; + float lon; +}; + + + +union icaltriggertype +{ + struct icaltimetype time; + struct icaldurationtype duration; +}; + + + +/* struct icalreqstattype. This struct contains two string pointers, +but don't try to free either of them. The "desc" string is a pointer +to a static table inside the library. Don't try to free it. The +"debug" string is a pointer into the string that the called passed +into to icalreqstattype_from_string. Don't try to free it either, and +don't use it after the original string has been freed. + +BTW, you would get that original string from +*icalproperty_get_requeststatus() or icalvalue_get_text(), when +operating on a the value of a request_status property. */ + +struct icalreqstattype { + + icalrequeststatus code; + const char* desc; + const char* debug; +}; + +struct icalreqstattype icalreqstattype_from_string(char* str); +char* icalreqstattype_as_string(struct icalreqstattype); + +#endif /* !ICALTYPES_H */ +/* -*- Mode: C -*- */ +/*====================================================================== + FILE: icalrecur.h + CREATOR: eric 20 March 2000 + + + (C) COPYRIGHT 2000, Eric Busboom, http://www.softwarestudio.org + + This program is free software; you can redistribute it and/or modify + it under the terms of either: + + The LGPL as published by the Free Software Foundation, version + 2.1, available at: http://www.fsf.org/copyleft/lesser.html + + Or: + + The Mozilla Public License Version 1.0. You may obtain a copy of + the License at http://www.mozilla.org/MPL/ + + +======================================================================*/ + +#ifndef ICALRECUR_H +#define ICALRECUR_H + +#include <time.h> + + +/*********************************************************************** + * Recurrance enumerations +**********************************************************************/ + +typedef enum icalrecurrencetype_frequency +{ + /* These enums are used to index an array, so don't change the + order or the integers */ + + ICAL_SECONDLY_RECURRENCE=0, + ICAL_MINUTELY_RECURRENCE=1, + ICAL_HOURLY_RECURRENCE=2, + ICAL_DAILY_RECURRENCE=3, + ICAL_WEEKLY_RECURRENCE=4, + ICAL_MONTHLY_RECURRENCE=5, + ICAL_YEARLY_RECURRENCE=6, + ICAL_NO_RECURRENCE=7 + +} icalrecurrencetype_frequency; + +typedef enum icalrecurrencetype_weekday +{ + ICAL_NO_WEEKDAY, + ICAL_SUNDAY_WEEKDAY, + ICAL_MONDAY_WEEKDAY, + ICAL_TUESDAY_WEEKDAY, + ICAL_WEDNESDAY_WEEKDAY, + ICAL_THURSDAY_WEEKDAY, + ICAL_FRIDAY_WEEKDAY, + ICAL_SATURDAY_WEEKDAY +} icalrecurrencetype_weekday; + +enum { + ICAL_RECURRENCE_ARRAY_MAX = 0x7f7f, + ICAL_RECURRENCE_ARRAY_MAX_BYTE = 0x7f +}; + +const char* icalrecur_recurrence_to_string(icalrecurrencetype_frequency kind); +const char* icalrecur_weekday_to_string(icalrecurrencetype_weekday kind); + + +/********************** Recurrence type routines **************/ + +/* See RFC 2445 Section 4.3.10, RECUR Value, for an explaination of + the values and fields in struct icalrecurrencetype */ + + +struct icalrecurrencetype +{ + icalrecurrencetype_frequency freq; + + + /* until and count are mutually exclusive. */ + struct icaltimetype until; /* Hack. Must be time_t for general use */ + int count; + + short interval; + + icalrecurrencetype_weekday week_start; + + /* The BY* parameters can each take a list of values. Here I + * assume that the list of values will not be larger than the + * range of the value -- that is, the client will not name a + * value more than once. + + * Each of the lists is terminated with the value + * ICALRECURRENCE_ARRAY_MAX unless the the list is full. + */ + + short by_second[61]; + short by_minute[61]; + short by_hour[25]; + short by_day[8]; /* Encoded value, see below */ + short by_month_day[32]; + short by_year_day[367]; + short by_week_no[54]; + short by_month[13]; + short by_set_pos[367]; +}; + + +void icalrecurrencetype_clear(struct icalrecurrencetype *r); + +/* The 'day' element of icalrecurrencetype_weekday is encoded to allow +representation of both the day of the week ( Monday, Tueday), but also +the Nth day of the week ( First tuesday of the month, last thursday of +the year) These routines decode the day values */ + +/* 1 == Monday, etc. */ +enum icalrecurrencetype_weekday icalrecurrencetype_day_day_of_week(short day); + +/* 0 == any of day of week. 1 == first, 2 = second, -2 == second to last, etc */ +short icalrecurrencetype_day_position(short day); + +/* Return the next occurance of 'r' after the time specified by 'after' */ +struct icaltimetype icalrecurrencetype_next_occurance( + struct icalrecurrencetype *r, + struct icaltimetype *after); + + + +typedef void icalrecur_iterator; +void icalrecurrencetype_test(); + + +/********** recurrence routines ********************/ + +icalrecur_iterator* icalrecur_iterator_new(struct icalrecurrencetype rule, struct icaltimetype dtstart); + +struct icaltimetype icalrecur_iterator_next(icalrecur_iterator*); + +int icalrecur_iterator_count(icalrecur_iterator*); + +void icalrecur_iterator_free(icalrecur_iterator*); -#include "icalversion.h" -#include "icalenums.h" -#include "icalvalue.h" -#include "icalparameter.h" -#include "icalproperty.h" -#include "icalcomponent.h" -#include "icaltypes.h" -#include "icalparser.h" -#include "icalmemory.h" -#include "icalerror.h" -#include "icalrestriction.h" -#include "icaltime.h" -#include "icalrecur.h" -#ifdef DMALLOC -#include "dmalloc.h" #endif +/* -*- Mode: C -*- */ +/*====================================================================== + FILE: icalvalue.h + CREATOR: eric 20 March 1999 + + + $Id$ + $Locker$ + + + + (C) COPYRIGHT 2000, Eric Busboom, http://www.softwarestudio.org + + This program is free software; you can redistribute it and/or modify + it under the terms of either: + + The LGPL as published by the Free Software Foundation, version + 2.1, available at: http://www.fsf.org/copyleft/lesser.html + + Or: + + The Mozilla Public License Version 1.0. You may obtain a copy of + the License at http://www.mozilla.org/MPL/ + + The original code is icalvalue.h + + ======================================================================*/ + +#ifndef ICALVALUE_H +#define ICALVALUE_H + +#include <time.h> + +typedef void icalvalue; + +icalvalue* icalvalue_new(icalvalue_kind kind); + +icalvalue* icalvalue_new_clone(icalvalue* value); + +icalvalue* icalvalue_new_from_string(icalvalue_kind kind, const char* str); + +void icalvalue_free(icalvalue* value); + +int icalvalue_is_valid(icalvalue* value); + +const char* icalvalue_as_ical_string(icalvalue* value); + +icalvalue_kind icalvalue_isa(icalvalue* value); + +int icalvalue_isa_value(void*); + +icalparameter_xliccomparetype +icalvalue_compare(icalvalue* a, icalvalue *b); + +/* Everything below this line is machine generated. Do not edit. */ +/* ATTACH # Non-std */ +icalvalue* icalvalue_new_attach(struct icalattachtype v); +struct icalattachtype icalvalue_get_attach(icalvalue* value); +void icalvalue_set_attach(icalvalue* value, struct icalattachtype v); + +/* BINARY */ +icalvalue* icalvalue_new_binary(const char* v); +const char* icalvalue_get_binary(icalvalue* value); +void icalvalue_set_binary(icalvalue* value, const char* v); + +/* BOOLEAN */ +icalvalue* icalvalue_new_boolean(int v); +int icalvalue_get_boolean(icalvalue* value); +void icalvalue_set_boolean(icalvalue* value, int v); + +/* CAL-ADDRESS */ +icalvalue* icalvalue_new_caladdress(const char* v); +const char* icalvalue_get_caladdress(icalvalue* value); +void icalvalue_set_caladdress(icalvalue* value, const char* v); + +/* DATE */ +icalvalue* icalvalue_new_date(struct icaltimetype v); +struct icaltimetype icalvalue_get_date(icalvalue* value); +void icalvalue_set_date(icalvalue* value, struct icaltimetype v); + +/* DATE-TIME */ +icalvalue* icalvalue_new_datetime(struct icaltimetype v); +struct icaltimetype icalvalue_get_datetime(icalvalue* value); +void icalvalue_set_datetime(icalvalue* value, struct icaltimetype v); + +/* DATE-TIME-DATE # Non-std */ +icalvalue* icalvalue_new_datetimedate(struct icaltimetype v); +struct icaltimetype icalvalue_get_datetimedate(icalvalue* value); +void icalvalue_set_datetimedate(icalvalue* value, struct icaltimetype v); + +/* DATE-TIME-PERIOD # Non-std */ +icalvalue* icalvalue_new_datetimeperiod(struct icalperiodtype v); +struct icalperiodtype icalvalue_get_datetimeperiod(icalvalue* value); +void icalvalue_set_datetimeperiod(icalvalue* value, struct icalperiodtype v); + +/* DURATION */ +icalvalue* icalvalue_new_duration(struct icaldurationtype v); +struct icaldurationtype icalvalue_get_duration(icalvalue* value); +void icalvalue_set_duration(icalvalue* value, struct icaldurationtype v); + +/* FLOAT */ +icalvalue* icalvalue_new_float(float v); +float icalvalue_get_float(icalvalue* value); +void icalvalue_set_float(icalvalue* value, float v); + +/* GEO # Non-std */ +icalvalue* icalvalue_new_geo(struct icalgeotype v); +struct icalgeotype icalvalue_get_geo(icalvalue* value); +void icalvalue_set_geo(icalvalue* value, struct icalgeotype v); + +/* INTEGER */ +icalvalue* icalvalue_new_integer(int v); +int icalvalue_get_integer(icalvalue* value); +void icalvalue_set_integer(icalvalue* value, int v); + +/* METHOD # Non-std */ +icalvalue* icalvalue_new_method(icalproperty_method v); +icalproperty_method icalvalue_get_method(icalvalue* value); +void icalvalue_set_method(icalvalue* value, icalproperty_method v); + +/* PERIOD */ +icalvalue* icalvalue_new_period(struct icalperiodtype v); +struct icalperiodtype icalvalue_get_period(icalvalue* value); +void icalvalue_set_period(icalvalue* value, struct icalperiodtype v); + +/* RECUR */ +icalvalue* icalvalue_new_recur(struct icalrecurrencetype v); +struct icalrecurrencetype icalvalue_get_recur(icalvalue* value); +void icalvalue_set_recur(icalvalue* value, struct icalrecurrencetype v); + +/* STRING # Non-std */ +icalvalue* icalvalue_new_string(const char* v); +const char* icalvalue_get_string(icalvalue* value); +void icalvalue_set_string(icalvalue* value, const char* v); + +/* TEXT */ +icalvalue* icalvalue_new_text(const char* v); +const char* icalvalue_get_text(icalvalue* value); +void icalvalue_set_text(icalvalue* value, const char* v); + +/* TIME */ +icalvalue* icalvalue_new_time(struct icaltimetype v); +struct icaltimetype icalvalue_get_time(icalvalue* value); +void icalvalue_set_time(icalvalue* value, struct icaltimetype v); + +/* TRIGGER # Non-std */ +icalvalue* icalvalue_new_trigger(union icaltriggertype v); +union icaltriggertype icalvalue_get_trigger(icalvalue* value); +void icalvalue_set_trigger(icalvalue* value, union icaltriggertype v); + +/* URI */ +icalvalue* icalvalue_new_uri(const char* v); +const char* icalvalue_get_uri(icalvalue* value); +void icalvalue_set_uri(icalvalue* value, const char* v); + +/* UTC-OFFSET */ +icalvalue* icalvalue_new_utcoffset(int v); +int icalvalue_get_utcoffset(icalvalue* value); +void icalvalue_set_utcoffset(icalvalue* value, int v); + +/* QUERY */ +icalvalue* icalvalue_new_query(const char* v); +const char* icalvalue_get_query(icalvalue* value); +void icalvalue_set_query(icalvalue* value, const char* v); + +/* STATUS #Non-st */ +icalvalue* icalvalue_new_status(icalproperty_status v); +icalproperty_status icalvalue_get_status(icalvalue* value); +void icalvalue_set_status(icalvalue* value, icalproperty_status v); + +#endif /*ICALVALUE_H*/ +/* -*- Mode: C -*- */ +/*====================================================================== + FILE: icalparam.h + CREATOR: eric 20 March 1999 + + + $Id$ + $Locker$ + + + + (C) COPYRIGHT 2000, Eric Busboom, http://www.softwarestudio.org + + This program is free software; you can redistribute it and/or modify + it under the terms of either: + + The LGPL as published by the Free Software Foundation, version + 2.1, available at: http://www.fsf.org/copyleft/lesser.html + + Or: + + The Mozilla Public License Version 1.0. You may obtain a copy of + the License at http://www.mozilla.org/MPL/ + + The original code is icalparam.h + + ======================================================================*/ + +#ifndef ICALPARAM_H +#define ICALPARAM_H + + +typedef void icalparameter; + +icalparameter* icalparameter_new(icalparameter_kind kind); +icalparameter* icalparameter_new_clone(icalparameter* p); +icalparameter* icalparameter_new_from_string(icalparameter_kind kind, char* value); + +void icalparameter_free(icalparameter* parameter); + +char* icalparameter_as_ical_string(icalparameter* parameter); + +int icalparameter_is_valid(icalparameter* parameter); + +icalparameter_kind icalparameter_isa(icalparameter* parameter); + +int icalparameter_isa_parameter(void* param); + +/* Acess the name of an X parameer */ +void icalparameter_set_xname (icalparameter* param, const char* v); +const char* icalparameter_get_xname(icalparameter* param); +void icalparameter_set_xvalue (icalparameter* param, const char* v); +const char* icalparameter_get_xvalue(icalparameter* param); + + +/* Everything below this line is machine generated. Do not edit. */ +/* ALTREP */ +icalparameter* icalparameter_new_altrep(const char* v); +const char* icalparameter_get_altrep(icalparameter* value); +void icalparameter_set_altrep(icalparameter* value, const char* v); + +/* CN */ +icalparameter* icalparameter_new_cn(const char* v); +const char* icalparameter_get_cn(icalparameter* value); +void icalparameter_set_cn(icalparameter* value, const char* v); + +/* CUTYPE */ +icalparameter* icalparameter_new_cutype(icalparameter_cutype v); +icalparameter_cutype icalparameter_get_cutype(icalparameter* value); +void icalparameter_set_cutype(icalparameter* value, icalparameter_cutype v); + +/* DELEGATED-FROM */ +icalparameter* icalparameter_new_delegatedfrom(const char* v); +const char* icalparameter_get_delegatedfrom(icalparameter* value); +void icalparameter_set_delegatedfrom(icalparameter* value, const char* v); + +/* DELEGATED-TO */ +icalparameter* icalparameter_new_delegatedto(const char* v); +const char* icalparameter_get_delegatedto(icalparameter* value); +void icalparameter_set_delegatedto(icalparameter* value, const char* v); + +/* DIR */ +icalparameter* icalparameter_new_dir(const char* v); +const char* icalparameter_get_dir(icalparameter* value); +void icalparameter_set_dir(icalparameter* value, const char* v); + +/* ENCODING */ +icalparameter* icalparameter_new_encoding(icalparameter_encoding v); +icalparameter_encoding icalparameter_get_encoding(icalparameter* value); +void icalparameter_set_encoding(icalparameter* value, icalparameter_encoding v); + +/* FBTYPE */ +icalparameter* icalparameter_new_fbtype(icalparameter_fbtype v); +icalparameter_fbtype icalparameter_get_fbtype(icalparameter* value); +void icalparameter_set_fbtype(icalparameter* value, icalparameter_fbtype v); + +/* FMTTYPE */ +icalparameter* icalparameter_new_fmttype(const char* v); +const char* icalparameter_get_fmttype(icalparameter* value); +void icalparameter_set_fmttype(icalparameter* value, const char* v); + +/* LANGUAGE */ +icalparameter* icalparameter_new_language(const char* v); +const char* icalparameter_get_language(icalparameter* value); +void icalparameter_set_language(icalparameter* value, const char* v); + +/* MEMBER */ +icalparameter* icalparameter_new_member(const char* v); +const char* icalparameter_get_member(icalparameter* value); +void icalparameter_set_member(icalparameter* value, const char* v); + +/* PARTSTAT */ +icalparameter* icalparameter_new_partstat(icalparameter_partstat v); +icalparameter_partstat icalparameter_get_partstat(icalparameter* value); +void icalparameter_set_partstat(icalparameter* value, icalparameter_partstat v); + +/* RANGE */ +icalparameter* icalparameter_new_range(icalparameter_range v); +icalparameter_range icalparameter_get_range(icalparameter* value); +void icalparameter_set_range(icalparameter* value, icalparameter_range v); + +/* RELATED */ +icalparameter* icalparameter_new_related(icalparameter_related v); +icalparameter_related icalparameter_get_related(icalparameter* value); +void icalparameter_set_related(icalparameter* value, icalparameter_related v); + +/* RELTYPE */ +icalparameter* icalparameter_new_reltype(icalparameter_reltype v); +icalparameter_reltype icalparameter_get_reltype(icalparameter* value); +void icalparameter_set_reltype(icalparameter* value, icalparameter_reltype v); + +/* ROLE */ +icalparameter* icalparameter_new_role(icalparameter_role v); +icalparameter_role icalparameter_get_role(icalparameter* value); +void icalparameter_set_role(icalparameter* value, icalparameter_role v); + +/* RSVP */ +icalparameter* icalparameter_new_rsvp(int v); +int icalparameter_get_rsvp(icalparameter* value); +void icalparameter_set_rsvp(icalparameter* value, int v); + +/* SENT-BY */ +icalparameter* icalparameter_new_sentby(const char* v); +const char* icalparameter_get_sentby(icalparameter* value); +void icalparameter_set_sentby(icalparameter* value, const char* v); + +/* TZID */ +icalparameter* icalparameter_new_tzid(const char* v); +const char* icalparameter_get_tzid(icalparameter* value); +void icalparameter_set_tzid(icalparameter* value, const char* v); + +/* VALUE */ +icalparameter* icalparameter_new_value(icalparameter_value v); +icalparameter_value icalparameter_get_value(icalparameter* value); +void icalparameter_set_value(icalparameter* value, icalparameter_value v); + +/* X */ +icalparameter* icalparameter_new_x(const char* v); +const char* icalparameter_get_x(icalparameter* value); +void icalparameter_set_x(icalparameter* value, const char* v); + +/* X-LIC-ERRORTYPE */ +icalparameter* icalparameter_new_xlicerrortype(icalparameter_xlicerrortype v); +icalparameter_xlicerrortype icalparameter_get_xlicerrortype(icalparameter* value); +void icalparameter_set_xlicerrortype(icalparameter* value, icalparameter_xlicerrortype v); + +/* X-LIC-COMPARETYPE */ +icalparameter* icalparameter_new_xliccomparetype(icalparameter_xliccomparetype v); +icalparameter_xliccomparetype icalparameter_get_xliccomparetype(icalparameter* value); +void icalparameter_set_xliccomparetype(icalparameter* value, icalparameter_xliccomparetype v); + +#endif /*ICALPARAMETER_H*/ +/* -*- Mode: C -*- + ====================================================================== + FILE: icalderivedproperties.{c,h} + CREATOR: eric 09 May 1999 + + $Id$ + + (C) COPYRIGHT 2000, Eric Busboom, http://www.softwarestudio.org + ======================================================================*/ + + +#ifndef ICALPROPERTY_H +#define ICALPROPERTY_H + +#include <time.h> + +typedef void icalproperty; + +icalproperty* icalproperty_new(icalproperty_kind kind); + +icalproperty* icalproperty_new_clone(icalproperty * prop); + +icalproperty* icalproperty_new_from_string(char* str); + +char* icalproperty_as_ical_string(icalproperty* prop); + +void icalproperty_free(icalproperty* prop); + +icalproperty_kind icalproperty_isa(icalproperty* property); +int icalproperty_isa_property(void* property); + +void icalproperty_add_parameter(icalproperty* prop,icalparameter* parameter); +void icalproperty_set_parameter(icalproperty* prop,icalparameter* parameter); + +void icalproperty_remove_parameter(icalproperty* prop, + icalparameter_kind kind); + +int icalproperty_count_parameters(icalproperty* prop); + +/* Iterate through the parameters */ +icalparameter* icalproperty_get_first_parameter(icalproperty* prop, + icalparameter_kind kind); +icalparameter* icalproperty_get_next_parameter(icalproperty* prop, + icalparameter_kind kind); +/* Access the value of the property */ +void icalproperty_set_value(icalproperty* prop, icalvalue* value); +icalvalue* icalproperty_get_value(icalproperty* prop); + +/* Deal with X properties */ + +void icalproperty_set_x_name(icalproperty* prop, char* name); +char* icalproperty_get_x_name(icalproperty* prop); + +/* Everything below this line is machine generated. Do not edit. */ + +/* METHOD */ +icalproperty* icalproperty_new_method(icalproperty_method v); +icalproperty* icalproperty_vanew_method(icalproperty_method v, ...); +void icalproperty_set_method(icalproperty* prop, icalproperty_method v); +icalproperty_method icalproperty_get_method(icalproperty* prop); + +/* X-LIC-MIMECID */ +icalproperty* icalproperty_new_xlicmimecid(const char* v); +icalproperty* icalproperty_vanew_xlicmimecid(const char* v, ...); +void icalproperty_set_xlicmimecid(icalproperty* prop, const char* v); +const char* icalproperty_get_xlicmimecid(icalproperty* prop); + +/* LAST-MODIFIED */ +icalproperty* icalproperty_new_lastmodified(struct icaltimetype v); +icalproperty* icalproperty_vanew_lastmodified(struct icaltimetype v, ...); +void icalproperty_set_lastmodified(icalproperty* prop, struct icaltimetype v); +struct icaltimetype icalproperty_get_lastmodified(icalproperty* prop); + +/* UID */ +icalproperty* icalproperty_new_uid(const char* v); +icalproperty* icalproperty_vanew_uid(const char* v, ...); +void icalproperty_set_uid(icalproperty* prop, const char* v); +const char* icalproperty_get_uid(icalproperty* prop); + +/* PRODID */ +icalproperty* icalproperty_new_prodid(const char* v); +icalproperty* icalproperty_vanew_prodid(const char* v, ...); +void icalproperty_set_prodid(icalproperty* prop, const char* v); +const char* icalproperty_get_prodid(icalproperty* prop); + +/* STATUS */ +icalproperty* icalproperty_new_status(icalproperty_status v); +icalproperty* icalproperty_vanew_status(icalproperty_status v, ...); +void icalproperty_set_status(icalproperty* prop, icalproperty_status v); +icalproperty_status icalproperty_get_status(icalproperty* prop); + +/* DESCRIPTION */ +icalproperty* icalproperty_new_description(const char* v); +icalproperty* icalproperty_vanew_description(const char* v, ...); +void icalproperty_set_description(icalproperty* prop, const char* v); +const char* icalproperty_get_description(icalproperty* prop); + +/* DURATION */ +icalproperty* icalproperty_new_duration(struct icaldurationtype v); +icalproperty* icalproperty_vanew_duration(struct icaldurationtype v, ...); +void icalproperty_set_duration(icalproperty* prop, struct icaldurationtype v); +struct icaldurationtype icalproperty_get_duration(icalproperty* prop); + +/* CATEGORIES */ +icalproperty* icalproperty_new_categories(const char* v); +icalproperty* icalproperty_vanew_categories(const char* v, ...); +void icalproperty_set_categories(icalproperty* prop, const char* v); +const char* icalproperty_get_categories(icalproperty* prop); + +/* VERSION */ +icalproperty* icalproperty_new_version(const char* v); +icalproperty* icalproperty_vanew_version(const char* v, ...); +void icalproperty_set_version(icalproperty* prop, const char* v); +const char* icalproperty_get_version(icalproperty* prop); + +/* TZOFFSETFROM */ +icalproperty* icalproperty_new_tzoffsetfrom(int v); +icalproperty* icalproperty_vanew_tzoffsetfrom(int v, ...); +void icalproperty_set_tzoffsetfrom(icalproperty* prop, int v); +int icalproperty_get_tzoffsetfrom(icalproperty* prop); + +/* RRULE */ +icalproperty* icalproperty_new_rrule(struct icalrecurrencetype v); +icalproperty* icalproperty_vanew_rrule(struct icalrecurrencetype v, ...); +void icalproperty_set_rrule(icalproperty* prop, struct icalrecurrencetype v); +struct icalrecurrencetype icalproperty_get_rrule(icalproperty* prop); + +/* ATTENDEE */ +icalproperty* icalproperty_new_attendee(const char* v); +icalproperty* icalproperty_vanew_attendee(const char* v, ...); +void icalproperty_set_attendee(icalproperty* prop, const char* v); +const char* icalproperty_get_attendee(icalproperty* prop); + +/* CONTACT */ +icalproperty* icalproperty_new_contact(const char* v); +icalproperty* icalproperty_vanew_contact(const char* v, ...); +void icalproperty_set_contact(icalproperty* prop, const char* v); +const char* icalproperty_get_contact(icalproperty* prop); + +/* X-LIC-MIMECONTENTTYPE */ +icalproperty* icalproperty_new_xlicmimecontenttype(const char* v); +icalproperty* icalproperty_vanew_xlicmimecontenttype(const char* v, ...); +void icalproperty_set_xlicmimecontenttype(icalproperty* prop, const char* v); +const char* icalproperty_get_xlicmimecontenttype(icalproperty* prop); + +/* X-LIC-MIMEOPTINFO */ +icalproperty* icalproperty_new_xlicmimeoptinfo(const char* v); +icalproperty* icalproperty_vanew_xlicmimeoptinfo(const char* v, ...); +void icalproperty_set_xlicmimeoptinfo(icalproperty* prop, const char* v); +const char* icalproperty_get_xlicmimeoptinfo(icalproperty* prop); + +/* RELATED-TO */ +icalproperty* icalproperty_new_relatedto(const char* v); +icalproperty* icalproperty_vanew_relatedto(const char* v, ...); +void icalproperty_set_relatedto(icalproperty* prop, const char* v); +const char* icalproperty_get_relatedto(icalproperty* prop); + +/* ORGANIZER */ +icalproperty* icalproperty_new_organizer(const char* v); +icalproperty* icalproperty_vanew_organizer(const char* v, ...); +void icalproperty_set_organizer(icalproperty* prop, const char* v); +const char* icalproperty_get_organizer(icalproperty* prop); + +/* COMMENT */ +icalproperty* icalproperty_new_comment(const char* v); +icalproperty* icalproperty_vanew_comment(const char* v, ...); +void icalproperty_set_comment(icalproperty* prop, const char* v); +const char* icalproperty_get_comment(icalproperty* prop); + +/* X-LIC-ERROR */ +icalproperty* icalproperty_new_xlicerror(const char* v); +icalproperty* icalproperty_vanew_xlicerror(const char* v, ...); +void icalproperty_set_xlicerror(icalproperty* prop, const char* v); +const char* icalproperty_get_xlicerror(icalproperty* prop); + +/* TRIGGER */ +icalproperty* icalproperty_new_trigger(union icaltriggertype v); +icalproperty* icalproperty_vanew_trigger(union icaltriggertype v, ...); +void icalproperty_set_trigger(icalproperty* prop, union icaltriggertype v); +union icaltriggertype icalproperty_get_trigger(icalproperty* prop); + +/* CLASS */ +icalproperty* icalproperty_new_class(const char* v); +icalproperty* icalproperty_vanew_class(const char* v, ...); +void icalproperty_set_class(icalproperty* prop, const char* v); +const char* icalproperty_get_class(icalproperty* prop); + +/* X */ +icalproperty* icalproperty_new_x(const char* v); +icalproperty* icalproperty_vanew_x(const char* v, ...); +void icalproperty_set_x(icalproperty* prop, const char* v); +const char* icalproperty_get_x(icalproperty* prop); + +/* TZOFFSETTO */ +icalproperty* icalproperty_new_tzoffsetto(int v); +icalproperty* icalproperty_vanew_tzoffsetto(int v, ...); +void icalproperty_set_tzoffsetto(icalproperty* prop, int v); +int icalproperty_get_tzoffsetto(icalproperty* prop); + +/* TRANSP */ +icalproperty* icalproperty_new_transp(const char* v); +icalproperty* icalproperty_vanew_transp(const char* v, ...); +void icalproperty_set_transp(icalproperty* prop, const char* v); +const char* icalproperty_get_transp(icalproperty* prop); + +/* X-LIC-MIMEENCODING */ +icalproperty* icalproperty_new_xlicmimeencoding(const char* v); +icalproperty* icalproperty_vanew_xlicmimeencoding(const char* v, ...); +void icalproperty_set_xlicmimeencoding(icalproperty* prop, const char* v); +const char* icalproperty_get_xlicmimeencoding(icalproperty* prop); + +/* SEQUENCE */ +icalproperty* icalproperty_new_sequence(int v); +icalproperty* icalproperty_vanew_sequence(int v, ...); +void icalproperty_set_sequence(icalproperty* prop, int v); +int icalproperty_get_sequence(icalproperty* prop); + +/* LOCATION */ +icalproperty* icalproperty_new_location(const char* v); +icalproperty* icalproperty_vanew_location(const char* v, ...); +void icalproperty_set_location(icalproperty* prop, const char* v); +const char* icalproperty_get_location(icalproperty* prop); + +/* REQUEST-STATUS */ +icalproperty* icalproperty_new_requeststatus(const char* v); +icalproperty* icalproperty_vanew_requeststatus(const char* v, ...); +void icalproperty_set_requeststatus(icalproperty* prop, const char* v); +const char* icalproperty_get_requeststatus(icalproperty* prop); + +/* EXDATE */ +icalproperty* icalproperty_new_exdate(struct icaltimetype v); +icalproperty* icalproperty_vanew_exdate(struct icaltimetype v, ...); +void icalproperty_set_exdate(icalproperty* prop, struct icaltimetype v); +struct icaltimetype icalproperty_get_exdate(icalproperty* prop); + +/* TZID */ +icalproperty* icalproperty_new_tzid(const char* v); +icalproperty* icalproperty_vanew_tzid(const char* v, ...); +void icalproperty_set_tzid(icalproperty* prop, const char* v); +const char* icalproperty_get_tzid(icalproperty* prop); + +/* RESOURCES */ +icalproperty* icalproperty_new_resources(const char* v); +icalproperty* icalproperty_vanew_resources(const char* v, ...); +void icalproperty_set_resources(icalproperty* prop, const char* v); +const char* icalproperty_get_resources(icalproperty* prop); + +/* TZURL */ +icalproperty* icalproperty_new_tzurl(const char* v); +icalproperty* icalproperty_vanew_tzurl(const char* v, ...); +void icalproperty_set_tzurl(icalproperty* prop, const char* v); +const char* icalproperty_get_tzurl(icalproperty* prop); + +/* REPEAT */ +icalproperty* icalproperty_new_repeat(int v); +icalproperty* icalproperty_vanew_repeat(int v, ...); +void icalproperty_set_repeat(icalproperty* prop, int v); +int icalproperty_get_repeat(icalproperty* prop); + +/* PRIORITY */ +icalproperty* icalproperty_new_priority(int v); +icalproperty* icalproperty_vanew_priority(int v, ...); +void icalproperty_set_priority(icalproperty* prop, int v); +int icalproperty_get_priority(icalproperty* prop); + +/* FREEBUSY */ +icalproperty* icalproperty_new_freebusy(struct icalperiodtype v); +icalproperty* icalproperty_vanew_freebusy(struct icalperiodtype v, ...); +void icalproperty_set_freebusy(icalproperty* prop, struct icalperiodtype v); +struct icalperiodtype icalproperty_get_freebusy(icalproperty* prop); + +/* DTSTART */ +icalproperty* icalproperty_new_dtstart(struct icaltimetype v); +icalproperty* icalproperty_vanew_dtstart(struct icaltimetype v, ...); +void icalproperty_set_dtstart(icalproperty* prop, struct icaltimetype v); +struct icaltimetype icalproperty_get_dtstart(icalproperty* prop); + +/* RECURRENCE-ID */ +icalproperty* icalproperty_new_recurrenceid(struct icaltimetype v); +icalproperty* icalproperty_vanew_recurrenceid(struct icaltimetype v, ...); +void icalproperty_set_recurrenceid(icalproperty* prop, struct icaltimetype v); +struct icaltimetype icalproperty_get_recurrenceid(icalproperty* prop); + +/* SUMMARY */ +icalproperty* icalproperty_new_summary(const char* v); +icalproperty* icalproperty_vanew_summary(const char* v, ...); +void icalproperty_set_summary(icalproperty* prop, const char* v); +const char* icalproperty_get_summary(icalproperty* prop); + +/* DTEND */ +icalproperty* icalproperty_new_dtend(struct icaltimetype v); +icalproperty* icalproperty_vanew_dtend(struct icaltimetype v, ...); +void icalproperty_set_dtend(icalproperty* prop, struct icaltimetype v); +struct icaltimetype icalproperty_get_dtend(icalproperty* prop); + +/* TZNAME */ +icalproperty* icalproperty_new_tzname(const char* v); +icalproperty* icalproperty_vanew_tzname(const char* v, ...); +void icalproperty_set_tzname(icalproperty* prop, const char* v); +const char* icalproperty_get_tzname(icalproperty* prop); + +/* RDATE */ +icalproperty* icalproperty_new_rdate(struct icalperiodtype v); +icalproperty* icalproperty_vanew_rdate(struct icalperiodtype v, ...); +void icalproperty_set_rdate(icalproperty* prop, struct icalperiodtype v); +struct icalperiodtype icalproperty_get_rdate(icalproperty* prop); + +/* X-LIC-MIMEFILENAME */ +icalproperty* icalproperty_new_xlicmimefilename(const char* v); +icalproperty* icalproperty_vanew_xlicmimefilename(const char* v, ...); +void icalproperty_set_xlicmimefilename(icalproperty* prop, const char* v); +const char* icalproperty_get_xlicmimefilename(icalproperty* prop); + +/* URL */ +icalproperty* icalproperty_new_url(const char* v); +icalproperty* icalproperty_vanew_url(const char* v, ...); +void icalproperty_set_url(icalproperty* prop, const char* v); +const char* icalproperty_get_url(icalproperty* prop); + +/* X-LIC-CLUSTERCOUNT */ +icalproperty* icalproperty_new_xlicclustercount(int v); +icalproperty* icalproperty_vanew_xlicclustercount(int v, ...); +void icalproperty_set_xlicclustercount(icalproperty* prop, int v); +int icalproperty_get_xlicclustercount(icalproperty* prop); + +/* ATTACH */ +icalproperty* icalproperty_new_attach(struct icalattachtype v); +icalproperty* icalproperty_vanew_attach(struct icalattachtype v, ...); +void icalproperty_set_attach(icalproperty* prop, struct icalattachtype v); +struct icalattachtype icalproperty_get_attach(icalproperty* prop); + +/* EXRULE */ +icalproperty* icalproperty_new_exrule(struct icalrecurrencetype v); +icalproperty* icalproperty_vanew_exrule(struct icalrecurrencetype v, ...); +void icalproperty_set_exrule(icalproperty* prop, struct icalrecurrencetype v); +struct icalrecurrencetype icalproperty_get_exrule(icalproperty* prop); + +/* QUERY */ +icalproperty* icalproperty_new_query(const char* v); +icalproperty* icalproperty_vanew_query(const char* v, ...); +void icalproperty_set_query(icalproperty* prop, const char* v); +const char* icalproperty_get_query(icalproperty* prop); + +/* PERCENT-COMPLETE */ +icalproperty* icalproperty_new_percentcomplete(int v); +icalproperty* icalproperty_vanew_percentcomplete(int v, ...); +void icalproperty_set_percentcomplete(icalproperty* prop, int v); +int icalproperty_get_percentcomplete(icalproperty* prop); + +/* CALSCALE */ +icalproperty* icalproperty_new_calscale(const char* v); +icalproperty* icalproperty_vanew_calscale(const char* v, ...); +void icalproperty_set_calscale(icalproperty* prop, const char* v); +const char* icalproperty_get_calscale(icalproperty* prop); + +/* CREATED */ +icalproperty* icalproperty_new_created(struct icaltimetype v); +icalproperty* icalproperty_vanew_created(struct icaltimetype v, ...); +void icalproperty_set_created(icalproperty* prop, struct icaltimetype v); +struct icaltimetype icalproperty_get_created(icalproperty* prop); + +/* GEO */ +icalproperty* icalproperty_new_geo(struct icalgeotype v); +icalproperty* icalproperty_vanew_geo(struct icalgeotype v, ...); +void icalproperty_set_geo(icalproperty* prop, struct icalgeotype v); +struct icalgeotype icalproperty_get_geo(icalproperty* prop); + +/* X-LIC-MIMECHARSET */ +icalproperty* icalproperty_new_xlicmimecharset(const char* v); +icalproperty* icalproperty_vanew_xlicmimecharset(const char* v, ...); +void icalproperty_set_xlicmimecharset(icalproperty* prop, const char* v); +const char* icalproperty_get_xlicmimecharset(icalproperty* prop); + +/* COMPLETED */ +icalproperty* icalproperty_new_completed(struct icaltimetype v); +icalproperty* icalproperty_vanew_completed(struct icaltimetype v, ...); +void icalproperty_set_completed(icalproperty* prop, struct icaltimetype v); +struct icaltimetype icalproperty_get_completed(icalproperty* prop); + +/* DTSTAMP */ +icalproperty* icalproperty_new_dtstamp(struct icaltimetype v); +icalproperty* icalproperty_vanew_dtstamp(struct icaltimetype v, ...); +void icalproperty_set_dtstamp(icalproperty* prop, struct icaltimetype v); +struct icaltimetype icalproperty_get_dtstamp(icalproperty* prop); + +/* DUE */ +icalproperty* icalproperty_new_due(struct icaltimetype v); +icalproperty* icalproperty_vanew_due(struct icaltimetype v, ...); +void icalproperty_set_due(icalproperty* prop, struct icaltimetype v); +struct icaltimetype icalproperty_get_due(icalproperty* prop); + +/* ACTION */ +icalproperty* icalproperty_new_action(const char* v); +icalproperty* icalproperty_vanew_action(const char* v, ...); +void icalproperty_set_action(icalproperty* prop, const char* v); +const char* icalproperty_get_action(icalproperty* prop); +#endif /*ICALPROPERTY_H*/ +/*====================================================================== + FILE: pvl.h + CREATOR: eric November, 1995 + + + (C) COPYRIGHT 2000, Eric Busboom, http://www.softwarestudio.org +======================================================================*/ + + +#ifndef __PVL_H__ +#define __PVL_H__ + +typedef void* pvl_list; +typedef void* pvl_elem; + +/* + struct pvl_elem_t + + This type is private. Always use pvl_elem instead. The struct would + not even appear in this header except to make code in the USE_MACROS + blocks work + + */ +typedef struct pvl_elem_t +{ + int MAGIC; /* Magic Identifier */ + void *d; /* Pointer to data user is storing */ + struct pvl_elem_t *next; /* Next element */ + struct pvl_elem_t *prior; /* prior element */ +} pvl_elem_t; + + + +/* This global is incremented for each call to pvl_new_element(); it gives each + * list a unique identifer */ + +extern int pvl_elem_count; +extern int pvl_list_count; + +/* Create new lists or elements */ +pvl_elem pvl_new_element(void* d, pvl_elem next,pvl_elem prior); +pvl_list pvl_newlist(void); +void pvl_free(pvl_list); + +/* Add, remove, or get the head of the list */ +void pvl_unshift(pvl_list l,void *d); +void* pvl_shift(pvl_list l); +pvl_elem pvl_head(pvl_list); + +/* Add, remove or get the tail of the list */ +void pvl_push(pvl_list l,void *d); +void* pvl_pop(pvl_list l); +pvl_elem pvl_tail(pvl_list); + +/* Insert elements in random places */ +typedef int (*pvl_comparef)(void* a, void* b); /* a, b are of the data type*/ +void pvl_insert_ordered(pvl_list l,pvl_comparef f,void *d); +void pvl_insert_after(pvl_list l,pvl_elem e,void *d); +void pvl_insert_before(pvl_list l,pvl_elem e,void *d); + +/* Remove an element, or clear the entire list */ +void* pvl_remove(pvl_list,pvl_elem); /* Remove element, return data */ +void pvl_clear(pvl_list); /* Remove all elements, de-allocate all data */ + +int pvl_count(pvl_list); + +/* Navagate the list */ +pvl_elem pvl_next(pvl_elem e); +pvl_elem pvl_prior(pvl_elem e); + +/* get the data in the list */ +#ifndef PVL_USE_MACROS +void* pvl_data(pvl_elem); +#else +#define pvl_data(x) x==0 ? 0 : ((struct pvl_elem_t *)x)->d; +#endif + + +/* Find an element for which a function returns true */ +typedef int (*pvl_findf)(void* a, void* b); /*a is list elem, b is other data*/ +pvl_elem pvl_find(pvl_list l,pvl_findf f,void* v); +pvl_elem pvl_find_next(pvl_list l,pvl_findf f,void* v); + +/* Pass each element in the list to a function */ +typedef void (*pvl_applyf)(void* a, void* b); /*a is list elem, b is other data*/ +void pvl_apply(pvl_list l,pvl_applyf f, void *v); + + +#endif /* __PVL_H__ */ + + + + + +/* -*- Mode: C -*- */ +/*====================================================================== + FILE: icalcomponent.h + CREATOR: eric 20 March 1999 + + + (C) COPYRIGHT 2000, Eric Busboom, http://www.softwarestudio.org + + This program is free software; you can redistribute it and/or modify + it under the terms of either: + + The LGPL as published by the Free Software Foundation, version + 2.1, available at: http://www.fsf.org/copyleft/lesser.html + + Or: + + The Mozilla Public License Version 1.0. You may obtain a copy of + the License at http://www.mozilla.org/MPL/ + + The original code is icalcomponent.h + +======================================================================*/ + +#ifndef ICALCOMPONENT_H +#define ICALCOMPONENT_H + + +typedef void icalcomponent; + +/* This is exposed so that callers will not have to allocate and + deallocate iterators. Pretend that you can't see it. */ +typedef struct icalcompiter +{ + icalcomponent_kind kind; + pvl_elem iter; + +} icalcompiter; + +icalcomponent* icalcomponent_new(icalcomponent_kind kind); +icalcomponent* icalcomponent_new_clone(icalcomponent* component); +icalcomponent* icalcomponent_new_from_string(char* str); +icalcomponent* icalcomponent_vanew(icalcomponent_kind kind, ...); +void icalcomponent_free(icalcomponent* component); + +char* icalcomponent_as_ical_string(icalcomponent* component); + +int icalcomponent_is_valid(icalcomponent* component); + +icalcomponent_kind icalcomponent_isa(icalcomponent* component); + +int icalcomponent_isa_component (void* component); + +/* + * Working with properties + */ + +void icalcomponent_add_property(icalcomponent* component, + icalproperty* property); + +void icalcomponent_remove_property(icalcomponent* component, + icalproperty* property); + +int icalcomponent_count_properties(icalcomponent* component, + icalproperty_kind kind); + +/* Iterate through the properties */ +icalproperty* icalcomponent_get_current_property(icalcomponent* component); + +icalproperty* icalcomponent_get_first_property(icalcomponent* component, + icalproperty_kind kind); +icalproperty* icalcomponent_get_next_property(icalcomponent* component, + icalproperty_kind kind); + +/* Return a null-terminated array of icalproperties*/ + +icalproperty** icalcomponent_get_properties(icalcomponent* component, + icalproperty_kind kind); + + +/* + * Working with components + */ + + +void icalcomponent_add_component(icalcomponent* parent, + icalcomponent* child); + +void icalcomponent_remove_component(icalcomponent* parent, + icalcomponent* child); + +int icalcomponent_count_components(icalcomponent* component, + icalcomponent_kind kind); + +/* Iteration Routines. There are two forms of iterators, internal and +external. The internal ones came first, and are almost completely +sufficient, but they fail badly when you want to construct a loop that +removes components from the container. + +The internal iterators are deprecated. */ + +/* Using external iterators */ +icalcompiter icalcomponent_begin_component(icalcomponent* component, + icalcomponent_kind kind); + +icalcompiter icalcomponent_end_component(icalcomponent* component, + icalcomponent_kind kind); + +/* Iterate through components */ +icalcomponent* icalcomponent_get_current_component (icalcomponent* component); + +icalcomponent* icalcomponent_get_first_component(icalcomponent* component, + icalcomponent_kind kind); +icalcomponent* icalcomponent_get_next_component(icalcomponent* component, + icalcomponent_kind kind); + + + + +/* Working with embedded error properties */ + +int icalcomponent_count_errors(icalcomponent* component); + +/* Remove all X-LIC-ERROR properties*/ +void icalcomponent_strip_errors(icalcomponent* component); + +/* Convert some X-LIC-ERROR properties into RETURN-STATUS properties*/ +void icalcomponent_convert_errors(icalcomponent* component); + +/* Internal operations. You don't see these... */ +icalcomponent* icalcomponent_get_parent(icalcomponent* component); +void icalcomponent_set_parent(icalcomponent* component, + icalcomponent* parent); +/* External component iterator */ +icalcomponent* icalcompiter_next(icalcompiter* i); +icalcomponent* icalcompiter_prior(icalcompiter* i); +icalcomponent* icalcompiter_deref(icalcompiter* i); + +/************* Derived class methods. **************************** + +If the code was in an OO language, the remaining routines would be +members of classes derived from icalcomponent. Don't call them on the +wrong component subtypes. */ + +/* For VCOMPONENT: Return a reference to the first VEVENT, VTODO or + VJOURNAL */ +icalcomponent* icalcomponent_get_first_real_component(icalcomponent *c); + +/* For VEVENT, VTODO, VJOURNAL and VTIMEZONE: report the start and end + times of an event in UTC */ +struct icaltime_span icalcomponent_get_span(icalcomponent* comp); + +/******************** Convienience routines **********************/ + +void icalcomponent_set_dtstart(icalcomponent* comp, struct icaltimetype v); +struct icaltimetype icalcomponent_get_dtstart(icalcomponent* comp); + +/* For the icalcomponent routines only, dtend and duration are tied + together. If you call the set routine for one and the other exists, + the routine will calculate the change to the other. That is, if + there is a DTEND and you call set_duration, the routine will modify + DTEND to be the sum of DTSTART and the duration. If you call a get + routine for one and the other exists, the routine will calculate + the return value. If you call a set routine and neither exists, the + routine will create the apcompriate comperty */ + + +struct icaltimetype icalcomponent_get_dtend(icalcomponent* comp); +void icalcomponent_set_dtend(icalcomponent* comp, struct icaltimetype v); + +void icalcomponent_set_duration(icalcomponent* comp, + struct icaldurationtype v); +struct icaldurationtype icalcomponent_get_duration(icalcomponent* comp); + +void icalcomponent_set_method(icalcomponent* comp, icalproperty_method method); +icalproperty_method icalcomponent_get_method(icalcomponent* comp); + +struct icaltimetype icalcomponent_get_dtstamp(icalcomponent* comp); +void icalcomponent_set_dtstamp(icalcomponent* comp, struct icaltimetype v); + + +void icalcomponent_set_summary(icalcomponent* comp, const char* v); +const char* icalcomponent_get_summary(icalcomponent* comp); + +void icalcomponent_set_comment(icalcomponent* comp, const char* v); +const char* icalcomponent_get_comment(icalcomponent* comp); + +void icalcomponent_set_organizer(icalcomponent* comp, const char* v); +const char* icalcomponent_get_organizer(icalcomponent* comp); + +void icalcomponent_set_uid(icalcomponent* comp, const char* v); +const char* icalcomponent_get_uid(icalcomponent* comp); + +void icalcomponent_set_recurrenceid(icalcomponent* comp, + struct icaltimetype v); +struct icaltimetype icalcomponent_get_recurrenceid(icalcomponent* comp); + +/*************** Type Specific routines ***************/ + +icalcomponent* icalcomponent_new_vcalendar(); +icalcomponent* icalcomponent_new_vevent(); +icalcomponent* icalcomponent_new_vtodo(); +icalcomponent* icalcomponent_new_vjournal(); +icalcomponent* icalcomponent_new_vfreebusy(); +icalcomponent* icalcomponent_new_vtimezone(); +icalcomponent* icalcomponent_new_xstandard(); +icalcomponent* icalcomponent_new_xdaylight(); + + + +#endif /* !ICALCOMPONENT_H */ + + + +/* -*- Mode: C -*- */ +/*====================================================================== + FILE: icalparser.h + CREATOR: eric 20 April 1999 + + $Id$ + + + (C) COPYRIGHT 2000, Eric Busboom, http://www.softwarestudio.org + + This program is free software; you can redistribute it and/or modify + it under the terms of either: + + The LGPL as published by the Free Software Foundation, version + 2.1, available at: http://www.fsf.org/copyleft/lesser.html + + Or: + + The Mozilla Public License Version 1.0. You may obtain a copy of + the License at http://www.mozilla.org/MPL/ + + The original code is icalparser.h + +======================================================================*/ + + +#ifndef ICALPARSER_H +#define ICALPARSER_H + + +#include <stdio.h> /* For FILE* */ + +typedef void* icalparser; + + +/*********************************************************************** + * Line-oriented parsing. + * + * Create a new parser via icalparse_new_parser, then add ines one at + * a time with icalparse_add_line(). icalparser_add_line() will return + * non-zero when it has finished with a component. + ***********************************************************************/ + +typedef enum icalparser_state { + ICALPARSER_ERROR, + ICALPARSER_SUCCESS, + ICALPARSER_BEGIN_COMP, + ICALPARSER_END_COMP, + ICALPARSER_IN_PROGRESS +} icalparser_state; + +icalparser* icalparser_new(void); +icalcomponent* icalparser_add_line(icalparser* parser, char* str ); +icalcomponent* icalparser_claim(icalparser* parser); +icalcomponent* icalparser_clean(icalparser* parser); +icalparser_state icalparser_get_state(icalparser* parser); +void icalparser_free(icalparser* parser); + + +/*********************************************************************** + * Message oriented parsing. icalparser_parse takes a string that + * holds the text ( in RFC 2445 format ) and returns a pointer to an + * icalcomponent. The caller owns the memory. line_gen_func is a + * pointer to a function that returns one content line per invocation + **********************************************************************/ + +icalcomponent* icalparser_parse(icalparser *parser, + char* (*line_gen_func)(char *s, size_t size, void *d)); + +/* Set the data that icalparser_parse will give to the line_gen_func + as the parameter 'd'*/ +void icalparser_set_gen_data(icalparser* parser, void* data); + + +icalcomponent* icalparser_parse_string(char* str); + + +/*********************************************************************** + * Parser support functions + ***********************************************************************/ + +/* Use the flex/bison parser to turn a string into a value type */ +icalvalue* icalparser_parse_value(icalvalue_kind kind, + const char* str, icalcomponent** errors); + +/* Given a line generator function, return a single iCal content line.*/ +char* icalparser_get_line(icalparser* parser, char* (*line_gen_func)(char *s, size_t size, void *d)); + +char* string_line_generator(char *out, size_t buf_size, void *d); + +#endif /* !ICALPARSE_H */ +/* -*- Mode: C -*- */ +/*====================================================================== + FILE: icalmemory.h + CREATOR: eric 30 June 1999 + + + $Id$ + $Locker$ + + This program is free software; you can redistribute it and/or modify + it under the terms of either: + + The LGPL as published by the Free Software Foundation, version + 2.1, available at: http://www.fsf.org/copyleft/lesser.html + + Or: + + The Mozilla Public License Version 1.0. You may obtain a copy of + the License at http://www.mozilla.org/MPL/ + + The Initial Developer of the Original Code is Eric Busboom + + (C) COPYRIGHT 2000, Eric Busboom, http://www.softwarestudio.org +======================================================================*/ + +#ifndef ICALMEMORY_H +#define ICALMEMORY_H + +#include <sys/types.h> /* for size_t */ + + +/* Tmp buffers are managed by ical. References can be returned to the + caller, although the caller will not own the memory. */ + +void* icalmemory_tmp_buffer(size_t size); +char* icalmemory_tmp_copy(const char* str); + +/* Add an externally allocated buffer to the ring. */ +void icalmemory_add_tmp_buffer(void*); + + +/* Free all memory used in the ring */ +void icalmemory_free_ring(void); + +/* Non-tmp buffers must be freed. These are mostly wrappers around + * malloc, etc, but are used so the caller can change the memory + * allocators in a future version of the library */ + +void* icalmemory_new_buffer(size_t size); +void* icalmemory_resize_buffer(void* buf, size_t size); +void icalmemory_free_buffer(void* buf); + +/* icalmemory_append_string will copy the string 'string' to the + buffer 'buf' starting at position 'pos', reallocing 'buf' if it is + too small. 'buf_size' is the size of 'buf' and will be changed if + 'buf' is reallocated. 'pos' will point to the last byte of the new + string in 'buf', usually a '\0' */ + +/* THESE ROUTINES CAN NOT BE USED ON TMP BUFFERS. Only use them on + normally allocated memory, or on buffers created from + icalmemory_new_buffer, never with buffers created by + icalmemory_tmp_buffer. If icalmemory_append_string has to resize a + buffer on the ring, the ring will loose track of it an you will + have memory problems. */ + +void icalmemory_append_string(char** buf, char** pos, size_t* buf_size, + const char* string); + +/* icalmemory_append_char is similar, but is appends a character instead of a string */ +void icalmemory_append_char(char** buf, char** pos, size_t* buf_size, + char ch); + +/* A wrapper around strdup */ +char* icalmemory_strdup(const char *s); + +#endif /* !ICALMEMORY_H */ + + + +/* -*- Mode: C -*- */ +/*====================================================================== + FILE: icalerror.h + CREATOR: eric 09 May 1999 + + $Id$ + + + (C) COPYRIGHT 2000, Eric Busboom, http://www.softwarestudio.org + + This program is free software; you can redistribute it and/or modify + it under the terms of either: + + The LGPL as published by the Free Software Foundation, version + 2.1, available at: http://www.fsf.org/copyleft/lesser.html + + Or: + + The Mozilla Public License Version 1.0. You may obtain a copy of + the License at http://www.mozilla.org/MPL/ + + The original code is icalerror.h + +======================================================================*/ + + +#ifndef ICALERROR_H +#define ICALERROR_H + +#include <assert.h> +#include <stdio.h> /* For icalerror_warn() */ + + +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + + +/* This routine is called before any error is triggered. It is called + by icalerror_set_errno, so it does not appear in all of the macros + below */ +void icalerror_stop_here(void); + +void icalerror_crash_here(void); + +#ifdef ICAL_ERRORS_ARE_FATAL +#undef NDEBUG +#endif + +#define icalerror_check_value_type(value,type); +#define icalerror_check_property_type(value,type); +#define icalerror_check_parameter_type(value,type); +#define icalerror_check_component_type(value,type); + +/* Assert with a message */ +#ifdef ICAL_ERRORS_ARE_FATAL + +#ifdef __GNUC__ +#define icalerror_assert(test,message) if(!(test)){fprintf(stderr,"%s(), %s:%d: %s\n",__FUNCTION__,__FILE__,__LINE__,message);icalerror_stop_here(); abort();} +#else /*__GNUC__*/ +#define icalerror_assert(test,message) if(!(test)){fprintf(stderr,"%s:%d: %s\n",__FILE__,__LINE__,message);icalerror_stop_here(); abort();} +#endif /*__GNUC__*/ +#else +#define icalerror_assert(test,message) +#endif + +/* Check & abort if check fails */ +#ifdef ICAL_ERRORS_ARE_FATAL +#define icalerror_check_arg(test,arg) icalerror_stop_here();assert(test) +#else +#define icalerror_check_arg(test,arg) +#endif +/* Check & return void if check fails*/ + +#ifdef ICAL_ERRORS_ARE_FATAL +#define icalerror_check_arg_rv(test,arg) icalerror_stop_here();assert(test); +#else +#define icalerror_check_arg_rv(test,arg) if(!(test)) { icalerror_set_errno(ICAL_BADARG_ERROR); return; } +#endif + +/* Check & return 0 if check fails*/ +#ifdef ICAL_ERRORS_ARE_FATAL +#define icalerror_check_arg_rz(test,arg) icalerror_stop_here();assert(test); +#else +#define icalerror_check_arg_rz(test,arg) if(!(test)) {icalerror_set_errno(ICAL_BADARG_ERROR); return 0;} +#endif + + +/* Check & return an error if check fails*/ +#ifdef ICAL_ERRORS_ARE_FATAL +#define icalerror_check_arg_re(test,arg,error) icalerror_stop_here();assert(test); +#else +#define icalerror_check_arg_re(test,arg,error) if(!(test)) {icalerror_stop_here(); return error;} +#endif + + +/* Warning messages */ + +#ifdef ICAL_ERRORS_ARE_FATAL + +#ifdef __GNUC__ +#define icalerror_warn(message) {fprintf(stderr,"%s(), %s:%d: %s\n",__FUNCTION__,__FILE__,__LINE__,message); abort();} +#else /* __GNU_C__ */ +#define icalerror_warn(message) {fprintf(stderr,"%s:%d: %s\n",__FILE__,__LINE__,message); abort();} +#endif /* __GNU_C__ */ + +#else /*ICAL_ERRORS_ARE_FATAL */ + +#ifdef __GNUC__ +#define icalerror_warn(message) {fprintf(stderr,"%s(), %s:%d: %s\n",__FUNCTION__,__FILE__,__LINE__,message);} +#else /* __GNU_C__ */ +#define icalerror_warn(message) {fprintf(stderr,"%s:%d: %s\n",__FILE__,__LINE__,message);} +#endif /* __GNU_C__ */ + +#endif /*ICAL_ERRORS_ARE_FATAL*/ + +typedef enum icalerrorenum { + + ICAL_BADARG_ERROR, + ICAL_NEWFAILED_ERROR, + ICAL_MALFORMEDDATA_ERROR, + ICAL_PARSE_ERROR, + ICAL_INTERNAL_ERROR, /* Like assert --internal consist. prob */ + ICAL_FILE_ERROR, + ICAL_ALLOCATION_ERROR, + ICAL_USAGE_ERROR, + ICAL_NO_ERROR, + ICAL_MULTIPLEINCLUSION_ERROR, + ICAL_TIMEDOUT_ERROR, + ICAL_UNKNOWN_ERROR /* Used for problems in input to icalerror_strerror()*/ + +} icalerrorenum; + +extern icalerrorenum icalerrno; + + +void icalerror_clear_errno(void); +void icalerror_set_errno(icalerrorenum); + +char* icalerror_strerror(icalerrorenum e); + + +#endif /* !ICALERROR_H */ + + + +/* -*- Mode: C -*- */ +/*====================================================================== + FILE: icalrestriction.h + CREATOR: eric 24 April 1999 + + $Id$ + + + (C) COPYRIGHT 2000, Eric Busboom, http://www.softwarestudio.org + + This program is free software; you can redistribute it and/or modify + it under the terms of either: + + The LGPL as published by the Free Software Foundation, version + 2.1, available at: http://www.fsf.org/copyleft/lesser.html + + Or: + + The Mozilla Public License Version 1.0. You may obtain a copy of + the License at http://www.mozilla.org/MPL/ + + The original code is icalrestriction.h + + Contributions from: + Graham Davison (g.m.davison@computer.org) + + +======================================================================*/ + + +#ifndef ICALRESTRICTION_H +#define ICALRESTRICTION_H + +/* These must stay in this order for icalrestriction_compare to work */ +typedef enum icalrestriction_kind { + ICAL_RESTRICTION_NONE=0, /* 0 */ + ICAL_RESTRICTION_ZERO, /* 1 */ + ICAL_RESTRICTION_ONE, /* 2 */ + ICAL_RESTRICTION_ZEROPLUS, /* 3 */ + ICAL_RESTRICTION_ONEPLUS, /* 4 */ + ICAL_RESTRICTION_ZEROORONE, /* 5 */ + ICAL_RESTRICTION_ONEEXCLUSIVE, /* 6 */ + ICAL_RESTRICTION_ONEMUTUAL, /* 7 */ + ICAL_RESTRICTION_UNKNOWN /* 8 */ +} icalrestriction_kind; + +int +icalrestriction_compare(icalrestriction_kind restr, int count); + + +int +icalrestriction_is_parameter_allowed(icalproperty_kind property, + icalparameter_kind parameter); + +int icalrestriction_check(icalcomponent* comp); + + +#endif /* !ICALRESTRICTION_H */ + + + +/* -*- Mode: C -*- + ====================================================================== + FILE: sspm.h Mime Parser + CREATOR: eric 25 June 2000 + + $Id$ + $Locker$ + + The contents of this file are subject to the Mozilla Public License + Version 1.0 (the "License"); you may not use this file except in + compliance with the License. You may obtain a copy of the License at + http://www.mozilla.org/MPL/ + + Software distributed under the License is distributed on an "AS IS" + basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See + the License for the specific language governing rights and + limitations under the License. + + + This program is free software; you can redistribute it and/or modify + it under the terms of either: + + The LGPL as published by the Free Software Foundation, version + 2.1, available at: http://www.fsf.org/copyleft/lesser.html + + Or: + + The Mozilla Public License Version 1.0. You may obtain a copy of + the License at http://www.mozilla.org/MPL/ + + The Initial Developer of the Original Code is Eric Busboom + + (C) COPYRIGHT 2000, Eric Busboom, http://www.softwarestudio.org + ======================================================================*/ + +#ifndef SSPM_H +#define SSPM_H + +enum sspm_major_type { + SSPM_NO_MAJOR_TYPE, + SSPM_TEXT_MAJOR_TYPE, + SSPM_IMAGE_MAJOR_TYPE, + SSPM_AUDIO_MAJOR_TYPE, + SSPM_VIDEO_MAJOR_TYPE, + SSPM_APPLICATION_MAJOR_TYPE, + SSPM_MULTIPART_MAJOR_TYPE, + SSPM_MESSAGE_MAJOR_TYPE, + SSPM_UNKNOWN_MAJOR_TYPE +}; + +enum sspm_minor_type { + SSPM_NO_MINOR_TYPE, + SSPM_ANY_MINOR_TYPE, + SSPM_PLAIN_MINOR_TYPE, + SSPM_RFC822_MINOR_TYPE, + SSPM_DIGEST_MINOR_TYPE, + SSPM_CALENDAR_MINOR_TYPE, + SSPM_MIXED_MINOR_TYPE, + SSPM_RELATED_MINOR_TYPE, + SSPM_ALTERNATIVE_MINOR_TYPE, + SSPM_PARALLEL_MINOR_TYPE, + SSPM_UNKNOWN_MINOR_TYPE +}; + +enum sspm_encoding { + SSPM_NO_ENCODING, + SSPM_QUOTED_PRINTABLE_ENCODING, + SSPM_8BIT_ENCODING, + SSPM_7BIT_ENCODING, + SSPM_BINARY_ENCODING, + SSPM_BASE64_ENCODING, + SSPM_UNKNOWN_ENCODING +}; + +enum sspm_error{ + SSPM_NO_ERROR, + SSPM_UNEXPECTED_BOUNDARY_ERROR, + SSPM_WRONG_BOUNDARY_ERROR, + SSPM_NO_BOUNDARY_ERROR, + SSPM_NO_HEADER_ERROR, + SSPM_MALFORMED_HEADER_ERROR +}; + + +struct sspm_header +{ + int def; + char* boundary; + enum sspm_major_type major; + enum sspm_minor_type minor; + char *minor_text; + char ** content_type_params; + char* charset; + enum sspm_encoding encoding; + char* filename; + char* content_id; + enum sspm_error error; + char* error_text; +}; + +struct sspm_part { + struct sspm_header header; + int level; + size_t data_size; + void *data; +}; + +struct sspm_action_map { + enum sspm_major_type major; + enum sspm_minor_type minor; + void* (*new_part)(); + void (*add_line)(void *part, struct sspm_header *header, + char* line, size_t size); + void* (*end_part)(void* part); + void (*free_part)(void *part); +}; + +char* sspm_major_type_string(enum sspm_major_type type); +char* sspm_minor_type_string(enum sspm_major_type type); +char* sspm_encoding_string(enum sspm_encoding type); + +int sspm_parse_mime(struct sspm_part *parts, + size_t max_parts, + struct sspm_action_map *actions, + char* (*get_string)(char *s, size_t size, void* data), + void *get_string_data, + struct sspm_header *first_header + ); + +void sspm_free_parts(struct sspm_part *parts, size_t max_parts); + +char *decode_quoted_printable(char *dest, + char *src, + size_t *size); +char *decode_base64(char *dest, + char *src, + size_t *size); + + +int sspm_write_mime(struct sspm_part *parts,size_t num_parts, + char **output_string, char* header); + +#endif /*SSPM_H*/ +/* -*- Mode: C -*- */ +/*====================================================================== + FILE: icalmime.h + CREATOR: eric 26 July 2000 + + + $Id$ + $Locker$ + + (C) COPYRIGHT 2000, Eric Busboom, http://www.softwarestudio.org + + This program is free software; you can redistribute it and/or modify + it under the terms of either: + + The LGPL as published by the Free Software Foundation, version + 2.1, available at: http://www.fsf.org/copyleft/lesser.html + + Or: + + The Mozilla Public License Version 1.0. You may obtain a copy of + the License at http://www.mozilla.org/MPL/ + +======================================================================*/ + +#ifndef ICALMIME_H +#define ICALMIME_H + + +icalcomponent* icalmime_parse( char* (*line_gen_func)(char *s, size_t size, + void *d), + void *data); + +/* The inverse of icalmime_parse, not implemented yet. Use sspm.h directly. */ +char* icalmime_as_mime_string(char* component); -#endif /* !ICAL_H */ +#endif /* !ICALMIME_H */ diff --git a/libical/src/libical/icalcomponent.c b/libical/src/libical/icalcomponent.c index 65d1d55e36..2b8ddb5137 100644 --- a/libical/src/libical/icalcomponent.c +++ b/libical/src/libical/icalcomponent.c @@ -26,28 +26,21 @@ #include "config.h" #endif -#include "ical.h" +#include "icalcomponent.h" #include "pvl.h" /* "Pointer-to-void list" */ +#include "icalerror.h" +#include "icalmemory.h" +#include "icalenums.h" +#include "icaltime.h" + #include <stdlib.h> /* for malloc */ #include <stdarg.h> /* for va_list, etc */ #include <errno.h> -#include "icalerror.h" #include <assert.h> #include <stdio.h> /* for fprintf */ -#include "icalmemory.h" -#include "icalenums.h" #define MAX_TMP 1024 - -/* icalproperty functions that only components get to use */ -void icalproperty_set_parent(icalproperty* property, - icalcomponent* component); - -icalcomponent* icalproperty_get_parent(icalproperty* property); - - - struct icalcomponent_impl { char id[5]; @@ -60,6 +53,15 @@ struct icalcomponent_impl icalcomponent* parent; }; +/* icalproperty functions that only components get to use */ +void icalproperty_set_parent(icalproperty* property, + icalcomponent* component); +icalcomponent* icalproperty_get_parent(icalproperty* property); +void icalcomponent_add_children(struct icalcomponent_impl *impl,va_list args); +icalcomponent* icalcomponent_new_impl (icalcomponent_kind kind); +int icalcomponent_property_sorter(void *a, void *b); + + void icalcomponent_add_children(struct icalcomponent_impl *impl,va_list args) { void* vp; @@ -255,7 +257,7 @@ icalcomponent_as_ical_string (icalcomponent* component) icalproperty *p; icalcomponent_kind kind = icalcomponent_isa(component); - char* kind_string; + const char* kind_string; buf = icalmemory_new_buffer(buf_size); buf_ptr = buf; @@ -359,7 +361,7 @@ icalcomponent_isa_component (void* component) int icalcomponent_property_sorter(void *a, void *b) { icalproperty_kind kinda, kindb; - char *ksa, *ksb; + const char *ksa, *ksb; kinda = icalproperty_isa((icalproperty*)a); kindb = icalproperty_isa((icalproperty*)b); @@ -530,7 +532,7 @@ icalcomponent_add_component (icalcomponent* parent, icalcomponent* child) impl = (struct icalcomponent_impl*)parent; cimpl = (struct icalcomponent_impl*)child; - icalerror_assert( (cimpl->parent ==0),"The child component has already been added to a parent component. Remove the component with icalcomponent_remove_componenet before calling icalcomponent_add_component"); + icalerror_assert( (cimpl->parent ==0),"The child component has already been added to a parent component. Remove the component with icalcomponent_remove_component before calling icalcomponent_add_component"); cimpl->parent = parent; @@ -580,8 +582,7 @@ icalcomponent_count_components (icalcomponent* component, { int count=0; pvl_elem itr; - struct icalcomponent_impl *impl = - (struct icalcomponent_impl*)component; + struct icalcomponent_impl *impl = (struct icalcomponent_impl*)component; icalerror_check_arg_rz( (component!=0), "component"); @@ -662,9 +663,186 @@ icalcomponent_get_next_component (icalcomponent* component, icalcomponent_kind k return 0; } +icalcomponent* icalcomponent_get_first_real_component(icalcomponent *c) +{ + icalcomponent *comp; -icalproperty** -icalcomponent_get_component (icalcomponent* component, icalproperty_kind kind); + for(comp = icalcomponent_get_first_component(c,ICAL_ANY_COMPONENT); + comp != 0; + comp = icalcomponent_get_next_component(c,ICAL_ANY_COMPONENT)){ + + icalcomponent_kind kind = icalcomponent_isa(comp); + + if(kind == ICAL_VEVENT_COMPONENT || + kind == ICAL_VTODO_COMPONENT || + kind == ICAL_VJOURNAL_COMPONENT ){ + return comp; + } + } + return 0; +} + +time_t icalcomponent_convert_time(icalproperty *p) +{ + struct icaltimetype sict; + time_t convt; + icalproperty *tzp; + + + /* Though it says _dtstart, it will work for dtend too */ + sict = icalproperty_get_dtstart(p); + + tzp = icalproperty_get_first_parameter(p,ICAL_TZID_PARAMETER); + + if (sict.is_utc == 1 && tzp != 0){ + icalerror_set_errno(ICAL_MALFORMEDDATA_ERROR); + icalerror_warn("icalcomponent_get_span: component has a UTC DTSTART with a timezone specified "); + return 0; + } + + if(sict.is_utc == 1){ + /* _as_timet will use gmtime() to do the conversion */ + convt = icaltime_as_timet(sict); + +#ifdef TEST_CONVERT_TIME + printf("convert time: use as_timet:\n %s\n %s", + icalproperty_as_ical_string(p), ctime(&convt)); +#endif + + } else if (sict.is_utc == 0 && tzp == 0 ) { + time_t offset; + + /* _as_timet will use localtime() to do the conversion */ + convt = icaltime_as_timet(sict); + offset = icaltime_local_utc_offset(); + convt += offset; + +#ifdef TEST_CONVERT_TIME + printf("convert time: use as_timet and adjust:\n %s\n %s", + icalproperty_as_ical_string(p), ctime(&convt)); +#endif + } else { + /* Convert the time to UTC for the named timezone*/ + const char* timezone = icalparameter_get_tzid(tzp); + convt = icaltime_as_timet(icaltime_as_utc(sict,timezone)); + +#ifdef TEST_CONVERT_TIME + printf("convert time: use _as_utc:\n %s\n %s", + icalproperty_as_ical_string(p), ctime(&convt)); +#endif + } + + return convt; +} +struct icaltime_span icalcomponent_get_span(icalcomponent* comp) +{ + icalcomponent *inner; + icalproperty *p, *duration; + icalcomponent_kind kind; + struct icaltime_span span; + struct icaltimetype start; + + span.start = 0; + span.end = 0; + span.is_busy= 1; + + /* initial Error checking */ + +/* icalerror_check_arg_rz( (comp!=0),"comp");*/ + + kind = icalcomponent_isa(comp); + + if(kind == ICAL_VCALENDAR_COMPONENT){ + inner = icalcomponent_get_first_real_component(comp); + + /* Maybe there is a VTIMEZONE in there */ + if (inner == 0){ + inner = icalcomponent_get_first_component(comp, + ICAL_VTIMEZONE_COMPONENT); + } + + } else { + inner = comp; + } + + if (inner == 0){ + icalerror_set_errno(ICAL_MALFORMEDDATA_ERROR); + /*icalerror_warn("icalcomponent_get_span: no component specified, or empty VCALENDAR component");*/ + return span; + } + + kind = icalcomponent_isa(inner); + + if( !( kind == ICAL_VEVENT_COMPONENT || + kind == ICAL_VJOURNAL_COMPONENT || + kind == ICAL_VTODO_COMPONENT || + kind == ICAL_VFREEBUSY_COMPONENT )) { + icalerror_set_errno(ICAL_MALFORMEDDATA_ERROR); + /*icalerror_warn("icalcomponent_get_span: no component specified, or empty VCALENDAR component");*/ + return span; + + } + + + + /* Get to work. starting with DTSTART */ + + p = icalcomponent_get_first_property(inner, ICAL_DTSTART_PROPERTY); + + if (p ==0 ) { + icalerror_set_errno(ICAL_MALFORMEDDATA_ERROR); + /*icalerror_warn("icalcomponent_get_span: component has no DTSTART time");*/ + return span; + } + + + start = icalproperty_get_dtstart(p); + + icalerror_clear_errno(); + + span.start = icalcomponent_convert_time(p); + +#ifdef TEST_CONVERT_TIME + printf("convert time:\n %s %s", + icalproperty_as_ical_string(p), ctime(&span.start)); +#endif + + if(icalerrno != ICAL_NO_ERROR){ + span.start = 0; + return span; + } + + /* The end time could be specified as either a DTEND or a DURATION */ + p = icalcomponent_get_first_property(inner, ICAL_DTEND_PROPERTY); + duration = icalcomponent_get_first_property(inner, ICAL_DURATION_PROPERTY); + + if (p==0 && duration == 0 && start.is_date != 1) { + icalerror_set_errno(ICAL_MALFORMEDDATA_ERROR); + /*icalerror_warn("icalcomponent_get_span: component has neither DTEND nor DURATION time");*/ + span.start = 0; + return span; + } + + if (p!=0){ + span.end = icalcomponent_convert_time(p); + } else if (start.is_date == 1) { + /* Duration is all day */ + span.end = span.start + 60*60*24; + } else { + /* Use the duration */ + struct icaldurationtype dur; + time_t durt; + + + dur = icalproperty_get_duration(duration); + + durt = icaldurationtype_as_timet(dur); + span.end = span.start+durt; + } + + return span; + +} int icalcomponent_count_errors(icalcomponent* component) @@ -840,7 +1018,7 @@ icalcomponent_begin_component(icalcomponent* component,icalcomponent_kind kind) } } - return icalcompiter_null;; + return icalcompiter_null; } icalcompiter @@ -876,6 +1054,8 @@ icalcomponent* icalcompiter_next(icalcompiter* i) return 0; } + icalerror_check_arg_rz( (i!=0),"i"); + for( i->iter = pvl_next(i->iter); i->iter != 0; i->iter = pvl_next(i->iter)) { @@ -923,3 +1103,298 @@ icalcomponent* icalcompiter_deref(icalcompiter* i) return pvl_data(i->iter); } + +icalcomponent* icalcomponent_get_inner(icalcomponent* comp) +{ + if (icalcomponent_isa(comp) == ICAL_VCALENDAR_COMPONENT){ + return icalcomponent_get_first_real_component(comp); + } else { + return comp; + } +} + + +void icalcomponent_set_dtstart(icalcomponent* comp, struct icaltimetype v) +{ + + icalcomponent *inner = icalcomponent_get_inner(comp); + icalproperty *prop + = icalcomponent_get_first_property(inner, ICAL_DTSTART_PROPERTY); + + + if (prop == 0){ + prop = icalproperty_new_dtstart(v); + icalcomponent_add_property(inner, prop); + } + + icalproperty_set_dtstart(prop,v); + +} + + +struct icaltimetype icalcomponent_get_dtstart(icalcomponent* comp) +{ + icalcomponent *inner = icalcomponent_get_inner(comp); + icalproperty *prop + = icalcomponent_get_first_property(inner,ICAL_DTSTART_PROPERTY); + + if (prop == 0){ + return icaltime_null_time(); + } + + return icalproperty_get_dtstart(prop); +} + + +struct icaltimetype icalcomponent_get_dtend(icalcomponent* comp) +{ + icalcomponent *inner = icalcomponent_get_inner(comp); + + icalproperty *end_prop + = icalcomponent_get_first_property(inner,ICAL_DTEND_PROPERTY); + + icalproperty *dur_prop + = icalcomponent_get_first_property(inner, ICAL_DURATION_PROPERTY); + + + if( end_prop == 0 && dur_prop == 0){ + return icaltime_null_time(); + } else if ( end_prop != 0) { + return icalproperty_get_dtend(end_prop); + } else if ( dur_prop != 0) { + struct icaltimetype start = + icalcomponent_get_dtstart(inner); + time_t startt = icaltime_as_timet(start); + struct icaldurationtype duration = + icalproperty_get_duration(dur_prop); + time_t durt = icaldurationtype_as_timet(duration); + + return icaltime_from_timet(startt+durt,start.is_date,start.is_utc); + } else { + /* Error, both duration and dtend have been specified */ + icalerror_set_errno(ICAL_MALFORMEDDATA_ERROR); + return icaltime_null_time(); + + } + +} + + +void icalcomponent_set_dtend(icalcomponent* comp, struct icaltimetype v) +{ + icalcomponent *inner = icalcomponent_get_inner(comp); + + icalproperty *end_prop + = icalcomponent_get_first_property(inner,ICAL_DTEND_PROPERTY); + + icalproperty *dur_prop + = icalcomponent_get_first_property(inner,ICAL_DURATION_PROPERTY); + + + if( end_prop == 0 && dur_prop == 0){ + end_prop = icalproperty_new_dtend(v); + icalcomponent_add_property(inner,end_prop); + } else if ( end_prop != 0) { + icalproperty_set_dtend(end_prop,v); + } else if ( dur_prop != 0) { + struct icaltimetype start = + icalcomponent_get_dtstart(inner); + time_t startt = icaltime_as_timet(start); + + struct icaltimetype end = + icalcomponent_get_dtend(inner); + time_t endt = icaltime_as_timet(end); + + struct icaldurationtype dur + = icaldurationtype_from_timet(endt-startt); + + icalproperty_set_duration(dur_prop,dur); + + } else { + /* Error, both duration and dtend have been specified */ + icalerror_set_errno(ICAL_MALFORMEDDATA_ERROR); + } +} + +void icalcomponent_set_duration(icalcomponent* comp, + struct icaldurationtype v) +{ + icalcomponent *inner = icalcomponent_get_inner(comp); + + icalproperty *end_prop + = icalcomponent_get_first_property(inner,ICAL_DTEND_PROPERTY); + + icalproperty *dur_prop + = icalcomponent_get_first_property(inner,ICAL_DURATION_PROPERTY); + + + if( end_prop == 0 && dur_prop == 0){ + dur_prop = icalproperty_new_duration(v); + icalcomponent_add_property(inner, dur_prop); + } else if ( end_prop != 0) { + struct icaltimetype start = + icalcomponent_get_dtstart(inner); + time_t startt = icaltime_as_timet(start); + + time_t durt = icaldurationtype_as_timet(v); + + struct icaltimetype new_end + = icaltime_from_timet(startt+durt,start.is_date,start.is_utc); + + icalproperty_set_dtend(end_prop,new_end); + + } else if ( dur_prop != 0) { + icalproperty_set_duration(end_prop,v); + } else { + /* Error, both duration and dtend have been specified */ + icalerror_set_errno(ICAL_MALFORMEDDATA_ERROR); + } +} + +struct icaldurationtype icalcomponent_get_duration(icalcomponent* comp) +{ + icalcomponent *inner = icalcomponent_get_inner(comp); + + icalproperty *end_prop + = icalcomponent_get_first_property(inner,ICAL_DTEND_PROPERTY); + + icalproperty *dur_prop + = icalcomponent_get_first_property(inner,ICAL_DURATION_PROPERTY); + + struct icaldurationtype null_duration; + memset(&null_duration,0,sizeof(struct icaldurationtype)); + + + if( end_prop == 0 && dur_prop == 0){ + return null_duration; + } else if ( end_prop != 0) { + struct icaltimetype start = + icalcomponent_get_dtstart(inner); + time_t startt = icaltime_as_timet(start); + + struct icaltimetype end = + icalcomponent_get_dtend(inner); + time_t endt = icaltime_as_timet(end); + + return icaldurationtype_from_timet(endt-startt); + } else if ( dur_prop != 0) { + return icalproperty_get_duration(dur_prop); + } else { + /* Error, both duration and dtend have been specified */ + icalerror_set_errno(ICAL_MALFORMEDDATA_ERROR); + return null_duration; + } +} + + + +void icalcomponent_set_method(icalcomponent* comp, icalproperty_method method) +{ + icalproperty *prop + = icalcomponent_get_first_property(comp, ICAL_METHOD_PROPERTY); + + + if (prop == 0){ + prop = icalproperty_new_method(method); + icalcomponent_add_property(comp, prop); + } + + icalproperty_set_method(prop,method); + +} + +icalproperty_method icalcomponent_get_method(icalcomponent* comp) +{ + icalproperty *prop + = icalcomponent_get_first_property(comp,ICAL_METHOD_PROPERTY); + + if (prop == 0){ + return ICAL_METHOD_NONE; + } + + return icalproperty_get_method(prop); +} + +void icalcomponent_set_dtstamp(icalcomponent* comp, struct icaltimetype v) +{ + + icalcomponent *inner = icalcomponent_get_inner(comp); + icalproperty *prop + = icalcomponent_get_first_property(inner, ICAL_DTSTAMP_PROPERTY); + + + if (prop == 0){ + prop = icalproperty_new_dtstamp(v); + icalcomponent_add_property(inner, prop); + } + + icalproperty_set_dtstamp(prop,v); + +} + + +struct icaltimetype icalcomponent_get_dtstamp(icalcomponent* comp) +{ + icalcomponent *inner = icalcomponent_get_inner(comp); + icalproperty *prop + = icalcomponent_get_first_property(inner,ICAL_DTSTAMP_PROPERTY); + + if (prop == 0){ + return icaltime_null_time(); + } + + return icalproperty_get_dtstamp(prop); +} + + +void icalcomponent_set_summary(icalcomponent* comp, const char* v); +const char* icalcomponent_get_summary(icalcomponent* comp); + +void icalcomponent_set_comment(icalcomponent* comp, const char* v); +const char* icalcomponent_get_comment(icalcomponent* comp); + +void icalcomponent_set_organizer(icalcomponent* comp, const char* v); +const char* icalcomponent_get_organizer(icalcomponent* comp); + +void icalcomponent_set_uid(icalcomponent* comp, const char* v); +const char* icalcomponent_get_uid(icalcomponent* comp); + +void icalcomponent_set_recurrenceid(icalcomponent* comp, + struct icaltimetype v); +struct icaltimetype icalcomponent_get_recurrenceid(icalcomponent* comp); + + + + +icalcomponent* icalcomponent_new_vcalendar() +{ + return icalcomponent_new(ICAL_VCALENDAR_COMPONENT); +} +icalcomponent* icalcomponent_new_vevent() +{ + return icalcomponent_new(ICAL_VEVENT_COMPONENT); +} +icalcomponent* icalcomponent_new_vtodo() +{ + return icalcomponent_new(ICAL_VTODO_COMPONENT); +} +icalcomponent* icalcomponent_new_vjournal() +{ + return icalcomponent_new(ICAL_VJOURNAL_COMPONENT); +} +icalcomponent* icalcomponent_new_vfreebusy() +{ + return icalcomponent_new(ICAL_VFREEBUSY_COMPONENT); +} +icalcomponent* icalcomponent_new_vtimezone() +{ + return icalcomponent_new(ICAL_VTIMEZONE_COMPONENT); +} +icalcomponent* icalcomponent_new_xstandard() +{ + return icalcomponent_new(ICAL_XSTANDARD_COMPONENT); +} +icalcomponent* icalcomponent_new_xdaylight() +{ + return icalcomponent_new(ICAL_XDAYLIGHT_COMPONENT); +} diff --git a/libical/src/libical/icalcomponent.h b/libical/src/libical/icalcomponent.h index b0d1e33630..b08d488db3 100644 --- a/libical/src/libical/icalcomponent.h +++ b/libical/src/libical/icalcomponent.h @@ -119,9 +119,6 @@ icalcomponent* icalcomponent_get_next_component(icalcomponent* component, -/* Return a null-terminated array of icalproperties*/ -icalproperty** icalcomponent_get_component(icalcomponent* component, - icalproperty_kind kind); /* Working with embedded error properties */ @@ -137,14 +134,82 @@ void icalcomponent_convert_errors(icalcomponent* component); icalcomponent* icalcomponent_get_parent(icalcomponent* component); void icalcomponent_set_parent(icalcomponent* component, icalcomponent* parent); - - - /* External component iterator */ icalcomponent* icalcompiter_next(icalcompiter* i); icalcomponent* icalcompiter_prior(icalcompiter* i); icalcomponent* icalcompiter_deref(icalcompiter* i); +/************* Derived class methods. **************************** + +If the code was in an OO language, the remaining routines would be +members of classes derived from icalcomponent. Don't call them on the +wrong component subtypes. */ + +/* For VCOMPONENT: Return a reference to the first VEVENT, VTODO or + VJOURNAL */ +icalcomponent* icalcomponent_get_first_real_component(icalcomponent *c); + +/* For VEVENT, VTODO, VJOURNAL and VTIMEZONE: report the start and end + times of an event in UTC */ +struct icaltime_span icalcomponent_get_span(icalcomponent* comp); + +/******************** Convienience routines **********************/ + +void icalcomponent_set_dtstart(icalcomponent* comp, struct icaltimetype v); +struct icaltimetype icalcomponent_get_dtstart(icalcomponent* comp); + +/* For the icalcomponent routines only, dtend and duration are tied + together. If you call the set routine for one and the other exists, + the routine will calculate the change to the other. That is, if + there is a DTEND and you call set_duration, the routine will modify + DTEND to be the sum of DTSTART and the duration. If you call a get + routine for one and the other exists, the routine will calculate + the return value. If you call a set routine and neither exists, the + routine will create the apcompriate comperty */ + + +struct icaltimetype icalcomponent_get_dtend(icalcomponent* comp); +void icalcomponent_set_dtend(icalcomponent* comp, struct icaltimetype v); + +void icalcomponent_set_duration(icalcomponent* comp, + struct icaldurationtype v); +struct icaldurationtype icalcomponent_get_duration(icalcomponent* comp); + +void icalcomponent_set_method(icalcomponent* comp, icalproperty_method method); +icalproperty_method icalcomponent_get_method(icalcomponent* comp); + +struct icaltimetype icalcomponent_get_dtstamp(icalcomponent* comp); +void icalcomponent_set_dtstamp(icalcomponent* comp, struct icaltimetype v); + + +void icalcomponent_set_summary(icalcomponent* comp, const char* v); +const char* icalcomponent_get_summary(icalcomponent* comp); + +void icalcomponent_set_comment(icalcomponent* comp, const char* v); +const char* icalcomponent_get_comment(icalcomponent* comp); + +void icalcomponent_set_organizer(icalcomponent* comp, const char* v); +const char* icalcomponent_get_organizer(icalcomponent* comp); + +void icalcomponent_set_uid(icalcomponent* comp, const char* v); +const char* icalcomponent_get_uid(icalcomponent* comp); + +void icalcomponent_set_recurrenceid(icalcomponent* comp, + struct icaltimetype v); +struct icaltimetype icalcomponent_get_recurrenceid(icalcomponent* comp); + +/*************** Type Specific routines ***************/ + +icalcomponent* icalcomponent_new_vcalendar(); +icalcomponent* icalcomponent_new_vevent(); +icalcomponent* icalcomponent_new_vtodo(); +icalcomponent* icalcomponent_new_vjournal(); +icalcomponent* icalcomponent_new_vfreebusy(); +icalcomponent* icalcomponent_new_vtimezone(); +icalcomponent* icalcomponent_new_xstandard(); +icalcomponent* icalcomponent_new_xdaylight(); + + #endif /* !ICALCOMPONENT_H */ diff --git a/libical/src/libical/icalenums.c b/libical/src/libical/icalenums.c index 50d23c8d41..2e04214739 100644 --- a/libical/src/libical/icalenums.c +++ b/libical/src/libical/icalenums.c @@ -5,6 +5,7 @@ $Id$ + (C) COPYRIGHT 2000, Eric Busboom, http://www.softwarestudio.org This program is free software; you can redistribute it and/or modify @@ -29,9 +30,13 @@ #include "icalenums.h" +#include <stdio.h> /* For fprintf */ +#include <stdio.h> /* For stderr */ +#include <assert.h> + struct icalproperty_kind_map { icalproperty_kind kind; - char *name; + const char *name; }; static struct icalproperty_kind_map property_map[] = @@ -107,7 +112,7 @@ static struct icalproperty_kind_map property_map[] = }; -char* icalenum_property_kind_to_string(icalproperty_kind kind) +const char* icalenum_property_kind_to_string(icalproperty_kind kind) { int i; @@ -179,7 +184,7 @@ static struct icalparameter_kind_map parameter_map[] = { ICAL_NO_PARAMETER, ""} }; -char* icalenum_parameter_kind_to_string(icalparameter_kind kind) +const char* icalenum_parameter_kind_to_string(icalparameter_kind kind) { int i; @@ -232,6 +237,7 @@ static struct icalvalue_kind_map value_map[] = { ICAL_URI_VALUE, "URI"}, { ICAL_UTCOFFSET_VALUE, "UTC-OFFSET"}, { ICAL_METHOD_VALUE, "METHOD"}, /* Not an RFC2445 type */ + { ICAL_STATUS_VALUE, "STATUS"}, /* Not an RFC2445 type */ { ICAL_GEO_VALUE, "FLOAT"}, /* Not an RFC2445 type */ { ICAL_ATTACH_VALUE, "XATTACH"}, /* Not an RFC2445 type */ { ICAL_DATETIMEDATE_VALUE, "XDATETIMEDATE"}, /* Not an RFC2445 type */ @@ -240,7 +246,7 @@ static struct icalvalue_kind_map value_map[] = { ICAL_NO_VALUE, ""}, }; -char* icalenum_value_kind_to_string(icalvalue_kind kind) +const char* icalenum_value_kind_to_string(icalvalue_kind kind) { int i; @@ -256,7 +262,9 @@ char* icalenum_value_kind_to_string(icalvalue_kind kind) icalvalue_kind icalenum_value_kind_by_prop(icalproperty_kind kind) { - + fprintf(stderr,"icalenum_value_kind_by_prop is not implemented\n"); + assert(0) ; + kind = ICAL_NO_VALUE; return ICAL_NO_VALUE; } @@ -297,7 +305,7 @@ static struct icalcomponent_kind_map component_map[] = { ICAL_NO_COMPONENT, "" }, }; -char* icalenum_component_kind_to_string(icalcomponent_kind kind) +const char* icalenum_component_kind_to_string(icalcomponent_kind kind) { int i; @@ -347,7 +355,7 @@ static struct icalproperty_kind_value_map propval_map[] = { ICAL_PERCENTCOMPLETE_PROPERTY, ICAL_INTEGER_VALUE }, { ICAL_PRIORITY_PROPERTY, ICAL_INTEGER_VALUE }, { ICAL_RESOURCES_PROPERTY, ICAL_TEXT_VALUE }, - { ICAL_STATUS_PROPERTY, ICAL_TEXT_VALUE }, + { ICAL_STATUS_PROPERTY, ICAL_STATUS_VALUE }, { ICAL_SUMMARY_PROPERTY, ICAL_TEXT_VALUE }, { ICAL_COMPLETED_PROPERTY, ICAL_DATETIME_VALUE }, { ICAL_FREEBUSY_PROPERTY, ICAL_PERIOD_VALUE }, @@ -416,65 +424,13 @@ icalvalue_kind icalenum_property_kind_to_value_kind(icalproperty_kind kind) return ICAL_NO_VALUE; } -struct {icalrecurrencetype_weekday wd; char * str; } -wd_map[] = { - {ICAL_SUNDAY_WEEKDAY,"SU"}, - {ICAL_MONDAY_WEEKDAY,"MO"}, - {ICAL_TUESDAY_WEEKDAY,"TU"}, - {ICAL_WEDNESDAY_WEEKDAY,"WE"}, - {ICAL_THURSDAY_WEEKDAY,"TH"}, - {ICAL_FRIDAY_WEEKDAY,"FR"}, - {ICAL_SATURDAY_WEEKDAY,"SA"}, - {ICAL_NO_WEEKDAY,0} -}; - -char* icalenum_weekday_to_string(icalrecurrencetype_weekday kind) -{ - int i; - - for (i=0; wd_map[i].wd != ICAL_NO_WEEKDAY; i++) { - if ( wd_map[i].wd == kind) { - return wd_map[i].str; - } - } - - return 0; -} - - -struct { - icalrecurrencetype_frequency kind; - char* str; -} freq_map[] = { - {ICAL_SECONDLY_RECURRENCE,"SECONDLY"}, - {ICAL_MINUTELY_RECURRENCE,"MINUTELY"}, - {ICAL_HOURLY_RECURRENCE,"HOURLY"}, - {ICAL_DAILY_RECURRENCE,"DAILY"}, - {ICAL_WEEKLY_RECURRENCE,"WEEKLY"}, - {ICAL_MONTHLY_RECURRENCE,"MONTHLY"}, - {ICAL_YEARLY_RECURRENCE,"YEARLY"}, - {ICAL_NO_RECURRENCE,0} -}; - -char* icalenum_recurrence_to_string(icalrecurrencetype_frequency kind) -{ - int i; - - for (i=0; freq_map[i].kind != ICAL_NO_RECURRENCE ; i++) { - if ( freq_map[i].kind == kind ) { - return freq_map[i].str; - } - } - return 0; -} - struct { - icalrecurrencetype_frequency kind; + enum icalrequeststatus kind; int major; int minor; - char* str; -} status_map[] = { + const char* str; +} request_status_map[] = { {ICAL_2_0_SUCCESS_STATUS, 2,0,"Success."}, {ICAL_2_1_FALLBACK_STATUS, 2,1,"Success but fallback taken on one or more property values."}, {ICAL_2_2_IGPROP_STATUS, 2,2,"Success, invalid property ignored."}, @@ -511,14 +467,14 @@ struct { }; -char* icalenum_reqstat_desc(icalrequeststatus stat) +const char* icalenum_reqstat_desc(icalrequeststatus stat) { int i; - for (i=0; status_map[i].kind != ICAL_UNKNOWN_STATUS; i++) { - if ( status_map[i].kind == stat) { - return status_map[i].str; + for (i=0; request_status_map[i].kind != ICAL_UNKNOWN_STATUS; i++) { + if ( request_status_map[i].kind == stat) { + return request_status_map[i].str; } } @@ -530,9 +486,9 @@ short icalenum_reqstat_major(icalrequeststatus stat) { int i; - for (i=0; status_map[i].kind != ICAL_UNKNOWN_STATUS; i++) { - if ( status_map[i].kind == stat) { - return status_map[i].major; + for (i=0; request_status_map[i].kind != ICAL_UNKNOWN_STATUS; i++) { + if ( request_status_map[i].kind == stat) { + return request_status_map[i].major; } } return -1; @@ -542,9 +498,9 @@ short icalenum_reqstat_minor(icalrequeststatus stat) { int i; - for (i=0; status_map[i].kind != ICAL_UNKNOWN_STATUS; i++) { - if ( status_map[i].kind == stat) { - return status_map[i].minor; + for (i=0; request_status_map[i].kind != ICAL_UNKNOWN_STATUS; i++) { + if ( request_status_map[i].kind == stat) { + return request_status_map[i].minor; } } return -1; @@ -555,9 +511,9 @@ icalrequeststatus icalenum_num_to_reqstat(short major, short minor) { int i; - for (i=0; status_map[i].kind != ICAL_UNKNOWN_STATUS; i++) { - if ( status_map[i].major == major && status_map[i].minor == minor) { - return status_map[i].kind; + for (i=0; request_status_map[i].kind != ICAL_UNKNOWN_STATUS; i++) { + if ( request_status_map[i].major == major && request_status_map[i].minor == minor) { + return request_status_map[i].kind; } } return 0; @@ -565,7 +521,7 @@ icalrequeststatus icalenum_num_to_reqstat(short major, short minor) -struct {icalproperty_method method; char* str;} method_map[] = { +struct {icalproperty_method method; const char* str;} method_map[] = { {ICAL_METHOD_PUBLISH,"PUBLISH"}, {ICAL_METHOD_REQUEST,"REQUEST"}, {ICAL_METHOD_REPLY,"REPLY"}, @@ -586,7 +542,7 @@ struct {icalproperty_method method; char* str;} method_map[] = { }; -char* icalenum_method_to_string(icalproperty_method method) +const char* icalenum_method_to_string(icalproperty_method method) { int i; @@ -599,7 +555,7 @@ char* icalenum_method_to_string(icalproperty_method method) return method_map[i].str; /* should be ICAL_METHOD_NONE */ } -icalproperty_method icalenum_string_to_method(char* str) +icalproperty_method icalenum_string_to_method(const char* str) { int i; @@ -616,3 +572,46 @@ icalproperty_method icalenum_string_to_method(char* str) return ICAL_METHOD_NONE; } + + +struct {icalproperty_status status; const char* str;} status_map[] = { + {ICAL_STATUS_TENTATIVE,"TENTATIVE"}, + {ICAL_STATUS_CONFIRMED,"CONFIRMED"}, + {ICAL_STATUS_NEEDSACTION,"NEEDS-ACTION"}, + {ICAL_STATUS_COMPLETED,"COMPLETED"}, + {ICAL_STATUS_INPROCESS,"IN-PROCESS"}, + {ICAL_STATUS_DRAFT,"DRAFT"}, + {ICAL_STATUS_FINAL,"FINAL"}, + {ICAL_STATUS_NONE,"NONE"} +}; + +const char* icalenum_status_to_string(icalproperty_status status) +{ + int i; + + for (i=0; status_map[i].status != ICAL_STATUS_NONE; i++) { + if ( status_map[i].status == status) { + return status_map[i].str; + } + } + + return status_map[i].str; /* should be ICAL_STATUS_NONE */ +} + +icalproperty_status icalenum_string_to_status(const char* str) +{ + int i; + + while(*str == ' '){ + str++; + } + + + for (i=0; status_map[i].status != ICAL_STATUS_NONE; i++) { + if ( strcmp(status_map[i].str, str) == 0) { + return status_map[i].status; + } + } + + return ICAL_STATUS_NONE; +} diff --git a/libical/src/libical/icalenums.h b/libical/src/libical/icalenums.h index ba3137803e..ab25532cf6 100644 --- a/libical/src/libical/icalenums.h +++ b/libical/src/libical/icalenums.h @@ -183,9 +183,10 @@ typedef enum icalproperty_class { typedef enum icalproperty_status { + ICAL_STATUS_NONE, ICAL_STATUS_TENTATIVE, ICAL_STATUS_CONFIRMED, - ICAL_STATUS_CANCELLED, /* CANCELED? SIC */ + ICAL_STATUS_CANCELLED, /* CANCELED? SIC from RFC*/ ICAL_STATUS_NEEDSACTION, ICAL_STATUS_COMPLETED, ICAL_STATUS_INPROCESS, @@ -220,6 +221,7 @@ typedef enum icalvalue_kind { ICAL_GEO_VALUE, /* Non-Standard */ ICAL_INTEGER_VALUE, ICAL_METHOD_VALUE, /* Non-Standard */ + ICAL_STATUS_VALUE, /* Non-Standard */ ICAL_PERIOD_VALUE, ICAL_RECUR_VALUE, ICAL_STRING_VALUE, /* Non-Standard */ @@ -298,7 +300,8 @@ typedef enum icalparameter_partstat { ICAL_PARTSTAT_DELEGATED, ICAL_PARTSTAT_COMPLETED, ICAL_PARTSTAT_INPROCESS, - ICAL_PARTSTAT_XNAME + ICAL_PARTSTAT_XNAME, + ICAL_PARTSTAT_NONE } icalparameter_partstat; typedef enum icalparameter_range { @@ -334,7 +337,7 @@ typedef enum icalparameter_xlicerrortype { ICAL_XLICERRORTYPE_VALUEPARSEERROR, ICAL_XLICERRORTYPE_UNKVCALPROP, ICAL_XLICERRORTYPE_INVALIDITIP, - ICAL_XLICERRORTYPE_MIMEPARSEERROR, + ICAL_XLICERRORTYPE_MIMEPARSEERROR } icalparameter_xlicerrortype; typedef enum icalparameter_xliccomparetype { @@ -366,46 +369,6 @@ typedef enum icalparameter_value { ICAL_VALUE_ERROR = ICAL_NO_VALUE } icalparameter_value; -/*********************************************************************** - * Recurrances -**********************************************************************/ - -typedef enum icalrecurrencetype_frequency -{ - /* These enums are used to index an array, so don't change the - order or the integers */ - - ICAL_SECONDLY_RECURRENCE=0, - ICAL_MINUTELY_RECURRENCE=1, - ICAL_HOURLY_RECURRENCE=2, - ICAL_DAILY_RECURRENCE=3, - ICAL_WEEKLY_RECURRENCE=4, - ICAL_MONTHLY_RECURRENCE=5, - ICAL_YEARLY_RECURRENCE=6, - ICAL_NO_RECURRENCE=7 - -} icalrecurrencetype_frequency; - -typedef enum icalrecurrencetype_weekday -{ - ICAL_NO_WEEKDAY, - ICAL_SUNDAY_WEEKDAY, - ICAL_MONDAY_WEEKDAY, - ICAL_TUESDAY_WEEKDAY, - ICAL_WEDNESDAY_WEEKDAY, - ICAL_THURSDAY_WEEKDAY, - ICAL_FRIDAY_WEEKDAY, - ICAL_SATURDAY_WEEKDAY -} icalrecurrencetype_weekday; - -enum { - ICAL_RECURRENCE_ARRAY_MAX = 0x7f7f, - ICAL_RECURRENCE_ARRAY_MAX_BYTE = 0x7f -}; - - -char* icalenum_recurrence_to_string(icalrecurrencetype_frequency kind); -char* icalenum_weekday_to_string(icalrecurrencetype_weekday kind); /*********************************************************************** * Request Status codes @@ -448,7 +411,7 @@ typedef enum icalrequeststatus { } icalrequeststatus; -char* icalenum_reqstat_desc(icalrequeststatus stat); +const char* icalenum_reqstat_desc(icalrequeststatus stat); short icalenum_reqstat_major(icalrequeststatus stat); short icalenum_reqstat_minor(icalrequeststatus stat); icalrequeststatus icalenum_num_to_reqstat(short major, short minor); @@ -457,22 +420,25 @@ icalrequeststatus icalenum_num_to_reqstat(short major, short minor); * Conversion functions **********************************************************************/ -char* icalenum_property_kind_to_string(icalproperty_kind kind); +const char* icalenum_property_kind_to_string(icalproperty_kind kind); icalproperty_kind icalenum_string_to_property_kind(char* string); -char* icalenum_value_kind_to_string(icalvalue_kind kind); +const char* icalenum_value_kind_to_string(icalvalue_kind kind); icalvalue_kind icalenum_value_kind_by_prop(icalproperty_kind kind); -char* icalenum_parameter_kind_to_string(icalparameter_kind kind); +const char* icalenum_parameter_kind_to_string(icalparameter_kind kind); icalparameter_kind icalenum_string_to_parameter_kind(char* string); -char* icalenum_component_kind_to_string(icalcomponent_kind kind); +const char* icalenum_component_kind_to_string(icalcomponent_kind kind); icalcomponent_kind icalenum_string_to_component_kind(char* string); icalvalue_kind icalenum_property_kind_to_value_kind(icalproperty_kind kind); -char* icalenum_method_to_string(icalproperty_method); -icalproperty_method icalenum_string_to_method(char* string); +const char* icalenum_method_to_string(icalproperty_method); +icalproperty_method icalenum_string_to_method(const char* string); + +const char* icalenum_status_to_string(icalproperty_status); +icalproperty_status icalenum_string_to_status(const char* string); #endif /* !ICALENUMS_H */ diff --git a/libical/src/libical/icalerror.c b/libical/src/libical/icalerror.c index c7641da504..de9ea4392b 100644 --- a/libical/src/libical/icalerror.c +++ b/libical/src/libical/icalerror.c @@ -5,9 +5,6 @@ $Id$ - $Locker$ - - (C) COPYRIGHT 2000, Eric Busboom, http://www.softwarestudio.org This program is free software; you can redistribute it and/or modify @@ -56,6 +53,11 @@ void icalerror_clear_errno() { void icalerror_set_errno(icalerrorenum e) { +#ifdef ICAL_ERRORS_ARE_FATAL + fprintf(stderr,"libical: icalerrno_set_error: %s",icalerror_strerror(e)); + icalerror_crash_here(); +#endif + icalerror_stop_here(); icalerrno = e; } @@ -68,9 +70,9 @@ struct icalerror_string_map { static struct icalerror_string_map string_map[] = { - {ICAL_BADARG_ERROR,"Bad argumnet to function"}, + {ICAL_BADARG_ERROR,"Bad argument to function"}, {ICAL_NEWFAILED_ERROR,"Failed to create a new object via a *_new() routine"}, - {ICAL_MALFORMEDDATA_ERROR,"An input string was not correctly formed"}, + {ICAL_MALFORMEDDATA_ERROR,"An input string was not correctly formed or a component has missing or extra properties"}, {ICAL_PARSE_ERROR,"Failed to parse a part of an iCal componet"}, {ICAL_INTERNAL_ERROR,"Random internal error. This indicates an error in the library code, not an error in use"}, {ICAL_FILE_ERROR,"An operation on a file failed. Check errno for more detail."}, diff --git a/libical/src/libical/icalerror.h b/libical/src/libical/icalerror.h index fbf6076dd6..d954b4d7f3 100644 --- a/libical/src/libical/icalerror.h +++ b/libical/src/libical/icalerror.h @@ -30,6 +30,12 @@ #include <assert.h> #include <stdio.h> /* For icalerror_warn() */ + +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + + /* This routine is called before any error is triggered. It is called by icalerror_set_errno, so it does not appear in all of the macros below */ @@ -58,14 +64,13 @@ void icalerror_crash_here(void); #define icalerror_assert(test,message) #endif - /* Check & abort if check fails */ #ifdef ICAL_ERRORS_ARE_FATAL #define icalerror_check_arg(test,arg) icalerror_stop_here();assert(test) #else #define icalerror_check_arg(test,arg) #endif -/* Check & return void if check failes*/ +/* Check & return void if check fails*/ #ifdef ICAL_ERRORS_ARE_FATAL #define icalerror_check_arg_rv(test,arg) icalerror_stop_here();assert(test); @@ -73,7 +78,7 @@ void icalerror_crash_here(void); #define icalerror_check_arg_rv(test,arg) if(!(test)) { icalerror_set_errno(ICAL_BADARG_ERROR); return; } #endif -/* Check & return 0 if check failes*/ +/* Check & return 0 if check fails*/ #ifdef ICAL_ERRORS_ARE_FATAL #define icalerror_check_arg_rz(test,arg) icalerror_stop_here();assert(test); #else @@ -81,7 +86,7 @@ void icalerror_crash_here(void); #endif -/* Check & return an error if check failes*/ +/* Check & return an error if check fails*/ #ifdef ICAL_ERRORS_ARE_FATAL #define icalerror_check_arg_re(test,arg,error) icalerror_stop_here();assert(test); #else @@ -113,7 +118,7 @@ typedef enum icalerrorenum { ICAL_BADARG_ERROR, ICAL_NEWFAILED_ERROR, - ICAL_MALFORMEDDATA_ERROR, + ICAL_MALFORMEDDATA_ERROR, ICAL_PARSE_ERROR, ICAL_INTERNAL_ERROR, /* Like assert --internal consist. prob */ ICAL_FILE_ERROR, @@ -129,7 +134,7 @@ typedef enum icalerrorenum { extern icalerrorenum icalerrno; -void icalerror_clear_errno(); +void icalerror_clear_errno(void); void icalerror_set_errno(icalerrorenum); char* icalerror_strerror(icalerrorenum e); diff --git a/libical/src/libical/icallexer.l b/libical/src/libical/icallexer.l index 8a6db2f93b..6f922ae428 100644 --- a/libical/src/libical/icallexer.l +++ b/libical/src/libical/icallexer.l @@ -6,8 +6,7 @@ DESCRIPTION: - $Id: icallexer.l,v 1.4 2000/06/06 22:48:09 alves Exp $ - $Locker: $ + $Id: icallexer.l,v 1.5 2000/12/11 23:01:19 federico Exp $ (C) COPYRIGHT 1999 Eric Busboom http://www.softwarestudio.org @@ -28,16 +27,16 @@ ======================================================================*/ -#include "icalyacc.h" #include "icalparser.h" #include "icalenums.h" #include "icalmemory.h" #include "assert.h" +#include "icalyacc.h" #include <string.h> /* For strdup() */ int icalparser_flex_input(char* buf, int max_size); -void icalparser_clear_flex_input(); +void icalparser_clear_flex_input(void); #define ICAL_MAX_STR_CONST 1024 @@ -47,15 +46,15 @@ void icalparser_clear_flex_input(); #undef yywrap #undef YY_FATAL_ERROR -#define YY_FATAL_ERROR(msg) yyerror(msg) +#define YY_FATAL_ERROR(msg) ical_yyerror(msg) icalvalue_kind value_kind=ICAL_NO_VALUE; -void set_parser_value_state(); +void set_parser_value_state(icalvalue_kind kind); extern int yydebug; -void yyerror(char *s); +void ical_yyerror(char *s); -void init_str_buf(); +void init_str_buf(void); int last_state; @@ -63,6 +62,11 @@ char *str_buf; char *str_buf_p; size_t buf_sz; /* = ICAL_MAX_STR_CONST;*/ +/* Define routines that were not propertly defined because of the +renaming hack applied in icalyacc.y */ +YY_BUFFER_STATE ical_yy_scan_buffer ( char *base, yy_size_t size ); +YY_BUFFER_STATE ical_yy_scan_string ( yyconst char *yy_str ); +YY_BUFFER_STATE ical_yy_scan_bytes ( yyconst char *bytes, int len ); %} @@ -96,7 +100,7 @@ digit [0-9] <binary_value>{ -.* { yylval.v_string= icalmemory_tmp_copy(yytext); +.* { ical_yylval.v_string= icalmemory_tmp_copy(yytext); return STRING;} {crlf} { return EOL;} @@ -109,7 +113,7 @@ digit [0-9] } <uri_value>{ -.* { yylval.v_string= icalmemory_tmp_copy(yytext); +.* { ical_yylval.v_string= icalmemory_tmp_copy(yytext); return STRING;} {crlf} { return EOL;} @@ -117,7 +121,7 @@ digit [0-9] <time_value>{ -{digit}* { yylval.v_string= icalmemory_tmp_copy(yytext); +{digit}* { ical_yylval.v_string= icalmemory_tmp_copy(yytext); return DIGITS; } T { return TIME_CHAR; } Z { return UTC_CHAR; } @@ -127,7 +131,7 @@ Z { return UTC_CHAR; } } <duration_value>{ -{digit}+ { yylval.v_string =icalmemory_tmp_copy(yytext); +{digit}+ { ical_yylval.v_string =icalmemory_tmp_copy(yytext); return DIGITS; } T { return TIME_CHAR; } [\+\-PTWHMSD] { return yytext[0]; } @@ -136,14 +140,14 @@ T { return TIME_CHAR; } } <number_value>{ -[\+\-\.0-9]+ { yylval.v_int=atoi(yytext); return INTNUMBER; } +[\+\-\.0-9]+ { ical_yylval.v_int=atoi(yytext); return INTNUMBER; } {crlf} { return EOL;} . { return CHARACTER; } } <period_value>{ -{digit}+ { yylval.v_string =icalmemory_tmp_copy(yytext) ; +{digit}+ { ical_yylval.v_string =icalmemory_tmp_copy(yytext) ; return DIGITS; } T { return TIME_CHAR; } Z { return UTC_CHAR; } @@ -184,7 +188,8 @@ FR { return FR; } = { return EQUALS; } , { return COMMA; } ; { return SEMICOLON; } -[\-\+0-9]+ { yylval.v_string= icalmemory_tmp_copy(yytext); +- { return MINUS; } +[\+0-9]+ { ical_yylval.v_string= icalmemory_tmp_copy(yytext); return DIGITS; } T { return TIME_CHAR; } Z { return UTC_CHAR; } @@ -194,7 +199,7 @@ Z { return UTC_CHAR; } <utcoffset_value>{ {crlf} { return EOL;} \-|\+ { return yytext[0]; } -{digit}{digit} { yylval.v_int=atoi(yytext); return INTNUMBER; } +{digit}{digit} { ical_yylval.v_int=atoi(yytext); return INTNUMBER; } } @@ -275,7 +280,7 @@ void set_parser_value_state(icalvalue_kind kind) } } -void init_str_buf() +void init_str_buf(void) { str_buf = icalmemory_tmp_buffer(ICAL_MAX_STR_CONST); str_buf_p = str_buf; diff --git a/libical/src/libical/icalmemory.c b/libical/src/libical/icalmemory.c index e13c2c42ca..97cefe65c6 100644 --- a/libical/src/libical/icalmemory.c +++ b/libical/src/libical/icalmemory.c @@ -4,8 +4,6 @@ CREATOR: eric 30 June 1999 $Id$ - - $Locker$ The contents of this file are subject to the Mozilla Public License Version 1.0 (the "License"); you may not use this file except in @@ -31,20 +29,6 @@ The Original Code is icalmemory.h - This program is free software; you can redistribute it and/or modify - it under the terms of either: - - The LGPL as published by the Free Software Foundation, version - 2.1, available at: http://www.fsf.org/copyleft/lesser.html - - Or: - - The Mozilla Public License Version 1.0. You may obtain a copy of - the License at http://www.mozilla.org/MPL/ - - The Initial Developer of the Original Code is Eric Busboom - - (C) COPYRIGHT 2000, Eric Busboom, http://www.softwarestudio.org ======================================================================*/ /* libical often passes strings back to the caller. To make these @@ -73,11 +57,14 @@ #include <stdio.h> /* for printf (debugging) */ #include <stdlib.h> /* for malloc, realloc */ -#include <string.h> /* for memset() */ +#include <string.h> /* for memset(), strdup */ #define BUFFER_RING_SIZE 25 #define MIN_BUFFER_SIZE 200 +void icalmemory_free_tmp_buffer (void* buf); + + /* HACK. Not threadsafe */ void* buffer_ring[BUFFER_RING_SIZE]; int buffer_pos = -1; @@ -155,7 +142,7 @@ void icalmemory_free_ring() /* Like strdup, but the buffer is on the ring. */ char* -icalmemory_tmp_copy(char* str) +icalmemory_tmp_copy(const char* str) { char* b = icalmemory_tmp_buffer(strlen(str)+1); @@ -218,7 +205,7 @@ void icalmemory_free_buffer(void* buf) void icalmemory_append_string(char** buf, char** pos, size_t* buf_size, - char* string) + const char* string) { char *new_buf; char *new_pos; diff --git a/libical/src/libical/icalmemory.h b/libical/src/libical/icalmemory.h index 6c974cdc95..678f018b52 100644 --- a/libical/src/libical/icalmemory.h +++ b/libical/src/libical/icalmemory.h @@ -3,33 +3,7 @@ FILE: icalmemory.h CREATOR: eric 30 June 1999 - $Id$ - $Locker$ - - The contents of this file are subject to the Mozilla Public License - Version 1.0 (the "License"); you may not use this file except in - compliance with the License. You may obtain a copy of the License at - http://www.mozilla.org/MPL/ - - Software distributed under the License is distributed on an "AS IS" - basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See - the License for the specific language governing rights and - limitations under the License. - - - This program is free software; you can redistribute it and/or modify - it under the terms of either: - - The LGPL as published by the Free Software Foundation, version - 2.1, available at: http://www.fsf.org/copyleft/lesser.html - - Or: - - The Mozilla Public License Version 1.0. You may obtain a copy of - the License at http://www.mozilla.org/MPL/ - - The Original Code is icalmemory.h This program is free software; you can redistribute it and/or modify it under the terms of either: @@ -52,18 +26,19 @@ #include <sys/types.h> /* for size_t */ + /* Tmp buffers are managed by ical. References can be returned to the caller, although the caller will not own the memory. */ void* icalmemory_tmp_buffer(size_t size); -char* icalmemory_tmp_copy(char* str); +char* icalmemory_tmp_copy(const char* str); /* Add an externally allocated buffer to the ring. */ void icalmemory_add_tmp_buffer(void*); /* Free all memory used in the ring */ -void icalmemory_free_ring(); +void icalmemory_free_ring(void); /* Non-tmp buffers must be freed. These are mostly wrappers around * malloc, etc, but are used so the caller can change the memory @@ -87,7 +62,7 @@ void icalmemory_free_buffer(void* buf); have memory problems. */ void icalmemory_append_string(char** buf, char** pos, size_t* buf_size, - char* string); + const char* string); /* icalmemory_append_char is similar, but is appends a character instead of a string */ void icalmemory_append_char(char** buf, char** pos, size_t* buf_size, diff --git a/libical/src/libical/icalparameter.c b/libical/src/libical/icalparameter.c index 5bbaff68ef..cee4259099 100644 --- a/libical/src/libical/icalparameter.c +++ b/libical/src/libical/icalparameter.c @@ -5,9 +5,6 @@ $Id$ - $Locker$ - - (C) COPYRIGHT 2000, Eric Busboom, http://www.softwarestudio.org This program is free software; you can redistribute it and/or modify @@ -27,42 +24,47 @@ Graham Davison (g.m.davison@computer.org) ======================================================================*/ - +#line 29 "icalparameter.c.in" #ifdef HAVE_CONFIG_H -#include "config.h" +#include <config.h> #endif -#include "ical.h" + +#include "icalparameter.h" +#include "icalproperty.h" #include "icalerror.h" +#include "icalmemory.h" + #include <stdlib.h> /* for malloc() */ #include <errno.h> #include <string.h> /* for memset() */ -#include "icalmemory.h" + +union icalparameter_impl_data { + int v_int; + int v_rsvp; + icalparameter_cutype v_cutype; + icalparameter_encoding v_encoding; + icalparameter_fbtype v_fbtype; + icalparameter_partstat v_partstat; + icalparameter_range v_range; + icalparameter_related v_related; + icalparameter_reltype v_reltype; + icalparameter_role v_role; + icalparameter_value v_value; + icalparameter_xlicerrortype v_xlicerrortype; + icalparameter_xliccomparetype v_xliccomparetype; +} data; struct icalparameter_impl { icalparameter_kind kind; char id[5]; int size; - char* string; - char* x_name; + const char* string; + const char* x_name; icalproperty* parent; - union data { - int v_int; - int v_rsvp; - icalparameter_cutype v_cutype; - icalparameter_encoding v_encoding; - icalparameter_fbtype v_fbtype; - icalparameter_partstat v_partstat; - icalparameter_range v_range; - icalparameter_related v_related; - icalparameter_reltype v_reltype; - icalparameter_role v_role; - icalparameter_value v_value; - icalparameter_xlicerrortype v_xlicerrortype; - icalparameter_xliccomparetype v_xliccomparetype; - } data; + union icalparameter_impl_data data; }; struct icalparameter_impl* icalparameter_new_impl(icalparameter_kind kind) @@ -134,10 +136,16 @@ icalparameter_new_clone(icalparameter* param) #if 0 +<<<<<<< icalparameter.c +======= +#if 1 +/* The following code is meant to replace most of the case-switch + statements, but it is still a work in progress */ +>>>>>>> 1.1.1.5 struct param_string_map { icalparameter_kind kind; int val; /* Actually, union of several types of enums */ - char* str; + const char* str; } param_string_map[] = { {ICAL_CUTYPE_PARAMETER,ICAL_CUTYPE_INDIVIDUAL,"INDIVIDUAL"}, @@ -164,6 +172,9 @@ struct param_string_map { {ICAL_RELTYPE_PARAMETER,ICAL_RELTYPE_CHILD,"CHILD"}, {ICAL_RELTYPE_PARAMETER,ICAL_RELTYPE_SIBLING,"SIBLING"}, {ICAL_ROLE_PARAMETER,ICAL_ROLE_CHAIR,"CHAIR"}, + {ICAL_ROLE_PARAMETER,ICAL_ROLE_REQPARTICIPANT,"REQ-PARTICIPANT"}, + {ICAL_ROLE_PARAMETER,ICAL_ROLE_OPTPARTICIPANT,"OPT-PARTICIPANT"}, + {ICAL_ROLE_PARAMETER,ICAL_ROLE_NONPARTICIPANT,"NON-PARTICIPANT"}, {ICAL_RSVP_PARAMETER,ICAL_RSVP_PARAMETER,"TRUE"}, {ICAL_RSVP_PARAMETER,ICAL_RSVP_PARAMETER,"FALSE"}, {ICAL_VALUE_PARAMETER,ICAL_VALUE_BINARY,"BINARY"}, @@ -197,8 +208,39 @@ struct param_string_map { }; +void icalparameter_set_impl_data(icalparameter_kind kind, + union icalparameter_impl_data *data, + int value) +{ -icalparameter* icalparameter_new_from_string(icalparameter_kind kind, char* val) + switch (kind){ + case ICAL_CUTYPE_PARAMETER: + data->v_cutype=value; break; + case ICAL_FBTYPE_PARAMETER: + data->v_fbtype=value; break; + case ICAL_PARTSTAT_PARAMETER: + data->v_partstat=value; break; + case ICAL_RANGE_PARAMETER: + data->v_range=value; break; + case ICAL_RELATED_PARAMETER: + data->v_related=value; break; + case ICAL_RELTYPE_PARAMETER: + data->v_reltype=value; break; + case ICAL_ROLE_PARAMETER: + data->v_role=value; break; + case ICAL_RSVP_PARAMETER: + data->v_rsvp=value; break; + case ICAL_VALUE_PARAMETER: + data->v_value=value; break; + case ICAL_XLICERRORTYPE_PARAMETER: + data->v_xlicerrortype=value; break; + case ICAL_XLICCOMPARETYPE_PARAMETER: + data->v_xliccomparetype=value; break; + default: + } +} + +icalparameter* icalparameter_new_from_string_test(icalparameter_kind kind, char* val) { int i =0; icalparameter* param=0; @@ -206,6 +248,8 @@ icalparameter* icalparameter_new_from_string(icalparameter_kind kind, char* val) icalerror_check_arg_rz((val!=0),"val"); switch(kind){ + + /* These are all string values parameters */ case ICAL_SENTBY_PARAMETER: case ICAL_TZID_PARAMETER: case ICAL_X_PARAMETER: @@ -218,9 +262,15 @@ icalparameter* icalparameter_new_from_string(icalparameter_kind kind, char* val) case ICAL_ALTREP_PARAMETER: case ICAL_CN_PARAMETER: { - if (impl->string == 0){ return no_parameter;} - strcpy(tend,impl->string);break; - break; + struct icalparameter_impl *impl = icalparameter_new_impl(kind); + if (impl == 0) { + return 0; + } + ((struct icalparameter_impl*)param)->string = + icalmemory_strdup(val); + + return (icalparameter*) impl; + } case ICAL_NO_PARAMETER: @@ -229,18 +279,41 @@ icalparameter* icalparameter_new_from_string(icalparameter_kind kind, char* val) } default: { + int found = 0; /* All other types are enumerated */ - for(i = 0; param_string_map[i].kind != ICAL_NO_PARAMETER){ + for(i = 0; param_string_map[i].kind != ICAL_NO_PARAMETER; i++){ + if(kind == param_string_map[i].kind && - strcmp(val,param_string_map[i].str) == 0){ - - - } + strcmp(val,param_string_map[i].str) == 0){ + + struct icalparameter_impl *impl = + icalparameter_new_impl(kind); + found = 1; + + icalparameter_set_impl_data(kind,&impl->data, + param_string_map[i].val); + + return (icalparameter*)impl; + } } + + /* Didn't find the standard enumerated type, so it must be + an X parameter */ + if (found ==0) { + icalparameter *param = icalparameter_new(kind); + + icalparameter_set_xvalue(param,val); + + return param; + + } } + } + + return 0; } - -#endif + +#endif icalparameter* icalparameter_new_from_string(icalparameter_kind kind, char* val) @@ -616,11 +689,11 @@ icalparameter_free (icalparameter* parameter) if (impl->string != 0){ - free (impl->string); + free ((void*)impl->string); } if (impl->x_name != 0){ - free (impl->x_name); + free ((void*)impl->x_name); } memset(impl,0,sizeof(impl)); @@ -640,7 +713,7 @@ icalparameter_as_ical_string (icalparameter* parameter) char* buf; char* buf_ptr; char *out_buf; - char *kind_string; + const char *kind_string; char tend[1024]; /* HACK . Should be using memory buffer ring */ @@ -1085,14 +1158,14 @@ icalparameter_isa_parameter (void* parameter) void -icalparameter_set_xname (icalparameter* param, char* v) +icalparameter_set_xname (icalparameter* param, const char* v) { struct icalparameter_impl *impl = (struct icalparameter_impl*)param; icalerror_check_arg_rv( (param!=0),"param"); icalerror_check_arg_rv( (v!=0),"v"); if (impl->x_name != 0){ - free(impl->x_name); + free((void*)impl->x_name); } impl->x_name = icalmemory_strdup(v); @@ -1103,7 +1176,7 @@ icalparameter_set_xname (icalparameter* param, char* v) } -char* +const char* icalparameter_get_xname (icalparameter* param) { struct icalparameter_impl *impl = (struct icalparameter_impl*)param; @@ -1113,7 +1186,7 @@ icalparameter_get_xname (icalparameter* param) } void -icalparameter_set_xvalue (icalparameter* param, char* v) +icalparameter_set_xvalue (icalparameter* param, const char* v) { struct icalparameter_impl *impl = (struct icalparameter_impl*)param; @@ -1121,7 +1194,7 @@ icalparameter_set_xvalue (icalparameter* param, char* v) icalerror_check_arg_rv( (v!=0),"v"); if (impl->string != 0){ - free(impl->string); + free((void*)impl->string); } impl->string = icalmemory_strdup(v); @@ -1132,7 +1205,7 @@ icalparameter_set_xvalue (icalparameter* param, char* v) } -char* +const char* icalparameter_get_xvalue (icalparameter* param) { struct icalparameter_impl *impl = (struct icalparameter_impl*)param; @@ -1165,7 +1238,7 @@ icalproperty* icalparameter_get_parent(icalparameter* param) /* Everything below this line is machine generated. Do not edit. */ /* ALTREP */ -icalparameter* icalparameter_new_altrep(char* v) +icalparameter* icalparameter_new_altrep(const char* v) { struct icalparameter_impl *impl; icalerror_clear_errno(); @@ -1184,24 +1257,24 @@ icalparameter* icalparameter_new_altrep(char* v) return (icalparameter*) impl; } -char* icalparameter_get_altrep(icalparameter* param) +const char* icalparameter_get_altrep(icalparameter* param) { icalerror_clear_errno(); icalerror_check_arg_rz( (param!=0), "param"); return ((struct icalparameter_impl*)param)->string; } -void icalparameter_set_altrep(icalparameter* param, char* v) +void icalparameter_set_altrep(icalparameter* param, const char* v) { icalerror_check_arg_rv( (v!=0),"v"); icalerror_check_arg_rv( (param!=0), "param"); icalerror_clear_errno(); - ((struct icalparameter_impl*)param)->string = icalmemory_strdup(v); + ((struct icalparameter_impl*)param)->string = strdup(v); } /* CN */ -icalparameter* icalparameter_new_cn(char* v) +icalparameter* icalparameter_new_cn(const char* v) { struct icalparameter_impl *impl; icalerror_clear_errno(); @@ -1220,20 +1293,20 @@ icalparameter* icalparameter_new_cn(char* v) return (icalparameter*) impl; } -char* icalparameter_get_cn(icalparameter* param) +const char* icalparameter_get_cn(icalparameter* param) { icalerror_clear_errno(); icalerror_check_arg_rz( (param!=0), "param"); return ((struct icalparameter_impl*)param)->string; } -void icalparameter_set_cn(icalparameter* param, char* v) +void icalparameter_set_cn(icalparameter* param, const char* v) { icalerror_check_arg_rv( (v!=0),"v"); icalerror_check_arg_rv( (param!=0), "param"); icalerror_clear_errno(); - ((struct icalparameter_impl*)param)->string = icalmemory_strdup(v); + ((struct icalparameter_impl*)param)->string = strdup(v); } /* CUTYPE */ @@ -1278,7 +1351,7 @@ void icalparameter_set_cutype(icalparameter* param, icalparameter_cutype v) } /* DELEGATED-FROM */ -icalparameter* icalparameter_new_delegatedfrom(char* v) +icalparameter* icalparameter_new_delegatedfrom(const char* v) { struct icalparameter_impl *impl; icalerror_clear_errno(); @@ -1297,24 +1370,24 @@ icalparameter* icalparameter_new_delegatedfrom(char* v) return (icalparameter*) impl; } -char* icalparameter_get_delegatedfrom(icalparameter* param) +const char* icalparameter_get_delegatedfrom(icalparameter* param) { icalerror_clear_errno(); icalerror_check_arg_rz( (param!=0), "param"); return ((struct icalparameter_impl*)param)->string; } -void icalparameter_set_delegatedfrom(icalparameter* param, char* v) +void icalparameter_set_delegatedfrom(icalparameter* param, const char* v) { icalerror_check_arg_rv( (v!=0),"v"); icalerror_check_arg_rv( (param!=0), "param"); icalerror_clear_errno(); - ((struct icalparameter_impl*)param)->string = icalmemory_strdup(v); + ((struct icalparameter_impl*)param)->string = strdup(v); } /* DELEGATED-TO */ -icalparameter* icalparameter_new_delegatedto(char* v) +icalparameter* icalparameter_new_delegatedto(const char* v) { struct icalparameter_impl *impl; icalerror_clear_errno(); @@ -1333,24 +1406,24 @@ icalparameter* icalparameter_new_delegatedto(char* v) return (icalparameter*) impl; } -char* icalparameter_get_delegatedto(icalparameter* param) +const char* icalparameter_get_delegatedto(icalparameter* param) { icalerror_clear_errno(); icalerror_check_arg_rz( (param!=0), "param"); return ((struct icalparameter_impl*)param)->string; } -void icalparameter_set_delegatedto(icalparameter* param, char* v) +void icalparameter_set_delegatedto(icalparameter* param, const char* v) { icalerror_check_arg_rv( (v!=0),"v"); icalerror_check_arg_rv( (param!=0), "param"); icalerror_clear_errno(); - ((struct icalparameter_impl*)param)->string = icalmemory_strdup(v); + ((struct icalparameter_impl*)param)->string = strdup(v); } /* DIR */ -icalparameter* icalparameter_new_dir(char* v) +icalparameter* icalparameter_new_dir(const char* v) { struct icalparameter_impl *impl; icalerror_clear_errno(); @@ -1369,20 +1442,20 @@ icalparameter* icalparameter_new_dir(char* v) return (icalparameter*) impl; } -char* icalparameter_get_dir(icalparameter* param) +const char* icalparameter_get_dir(icalparameter* param) { icalerror_clear_errno(); icalerror_check_arg_rz( (param!=0), "param"); return ((struct icalparameter_impl*)param)->string; } -void icalparameter_set_dir(icalparameter* param, char* v) +void icalparameter_set_dir(icalparameter* param, const char* v) { icalerror_check_arg_rv( (v!=0),"v"); icalerror_check_arg_rv( (param!=0), "param"); icalerror_clear_errno(); - ((struct icalparameter_impl*)param)->string = icalmemory_strdup(v); + ((struct icalparameter_impl*)param)->string = strdup(v); } /* ENCODING */ @@ -1468,7 +1541,7 @@ void icalparameter_set_fbtype(icalparameter* param, icalparameter_fbtype v) } /* FMTTYPE */ -icalparameter* icalparameter_new_fmttype(char* v) +icalparameter* icalparameter_new_fmttype(const char* v) { struct icalparameter_impl *impl; icalerror_clear_errno(); @@ -1487,24 +1560,24 @@ icalparameter* icalparameter_new_fmttype(char* v) return (icalparameter*) impl; } -char* icalparameter_get_fmttype(icalparameter* param) +const char* icalparameter_get_fmttype(icalparameter* param) { icalerror_clear_errno(); icalerror_check_arg_rz( (param!=0), "param"); return ((struct icalparameter_impl*)param)->string; } -void icalparameter_set_fmttype(icalparameter* param, char* v) +void icalparameter_set_fmttype(icalparameter* param, const char* v) { icalerror_check_arg_rv( (v!=0),"v"); icalerror_check_arg_rv( (param!=0), "param"); icalerror_clear_errno(); - ((struct icalparameter_impl*)param)->string = icalmemory_strdup(v); + ((struct icalparameter_impl*)param)->string = strdup(v); } /* LANGUAGE */ -icalparameter* icalparameter_new_language(char* v) +icalparameter* icalparameter_new_language(const char* v) { struct icalparameter_impl *impl; icalerror_clear_errno(); @@ -1523,24 +1596,24 @@ icalparameter* icalparameter_new_language(char* v) return (icalparameter*) impl; } -char* icalparameter_get_language(icalparameter* param) +const char* icalparameter_get_language(icalparameter* param) { icalerror_clear_errno(); icalerror_check_arg_rz( (param!=0), "param"); return ((struct icalparameter_impl*)param)->string; } -void icalparameter_set_language(icalparameter* param, char* v) +void icalparameter_set_language(icalparameter* param, const char* v) { icalerror_check_arg_rv( (v!=0),"v"); icalerror_check_arg_rv( (param!=0), "param"); icalerror_clear_errno(); - ((struct icalparameter_impl*)param)->string = icalmemory_strdup(v); + ((struct icalparameter_impl*)param)->string = strdup(v); } /* MEMBER */ -icalparameter* icalparameter_new_member(char* v) +icalparameter* icalparameter_new_member(const char* v) { struct icalparameter_impl *impl; icalerror_clear_errno(); @@ -1559,20 +1632,20 @@ icalparameter* icalparameter_new_member(char* v) return (icalparameter*) impl; } -char* icalparameter_get_member(icalparameter* param) +const char* icalparameter_get_member(icalparameter* param) { icalerror_clear_errno(); icalerror_check_arg_rz( (param!=0), "param"); return ((struct icalparameter_impl*)param)->string; } -void icalparameter_set_member(icalparameter* param, char* v) +void icalparameter_set_member(icalparameter* param, const char* v) { icalerror_check_arg_rv( (v!=0),"v"); icalerror_check_arg_rv( (param!=0), "param"); icalerror_clear_errno(); - ((struct icalparameter_impl*)param)->string = icalmemory_strdup(v); + ((struct icalparameter_impl*)param)->string = strdup(v); } /* PARTSTAT */ @@ -1813,7 +1886,7 @@ void icalparameter_set_rsvp(icalparameter* param, int v) } /* SENT-BY */ -icalparameter* icalparameter_new_sentby(char* v) +icalparameter* icalparameter_new_sentby(const char* v) { struct icalparameter_impl *impl; icalerror_clear_errno(); @@ -1832,24 +1905,24 @@ icalparameter* icalparameter_new_sentby(char* v) return (icalparameter*) impl; } -char* icalparameter_get_sentby(icalparameter* param) +const char* icalparameter_get_sentby(icalparameter* param) { icalerror_clear_errno(); icalerror_check_arg_rz( (param!=0), "param"); return ((struct icalparameter_impl*)param)->string; } -void icalparameter_set_sentby(icalparameter* param, char* v) +void icalparameter_set_sentby(icalparameter* param, const char* v) { icalerror_check_arg_rv( (v!=0),"v"); icalerror_check_arg_rv( (param!=0), "param"); icalerror_clear_errno(); - ((struct icalparameter_impl*)param)->string = icalmemory_strdup(v); + ((struct icalparameter_impl*)param)->string = strdup(v); } /* TZID */ -icalparameter* icalparameter_new_tzid(char* v) +icalparameter* icalparameter_new_tzid(const char* v) { struct icalparameter_impl *impl; icalerror_clear_errno(); @@ -1868,20 +1941,20 @@ icalparameter* icalparameter_new_tzid(char* v) return (icalparameter*) impl; } -char* icalparameter_get_tzid(icalparameter* param) +const char* icalparameter_get_tzid(icalparameter* param) { icalerror_clear_errno(); icalerror_check_arg_rz( (param!=0), "param"); return ((struct icalparameter_impl*)param)->string; } -void icalparameter_set_tzid(icalparameter* param, char* v) +void icalparameter_set_tzid(icalparameter* param, const char* v) { icalerror_check_arg_rv( (v!=0),"v"); icalerror_check_arg_rv( (param!=0), "param"); icalerror_clear_errno(); - ((struct icalparameter_impl*)param)->string = icalmemory_strdup(v); + ((struct icalparameter_impl*)param)->string = strdup(v); } /* VALUE */ @@ -1926,7 +1999,7 @@ void icalparameter_set_value(icalparameter* param, icalparameter_value v) } /* X */ -icalparameter* icalparameter_new_x(char* v) +icalparameter* icalparameter_new_x(const char* v) { struct icalparameter_impl *impl; icalerror_clear_errno(); @@ -1945,20 +2018,20 @@ icalparameter* icalparameter_new_x(char* v) return (icalparameter*) impl; } -char* icalparameter_get_x(icalparameter* param) +const char* icalparameter_get_x(icalparameter* param) { icalerror_clear_errno(); icalerror_check_arg_rz( (param!=0), "param"); return ((struct icalparameter_impl*)param)->string; } -void icalparameter_set_x(icalparameter* param, char* v) +void icalparameter_set_x(icalparameter* param, const char* v) { icalerror_check_arg_rv( (v!=0),"v"); icalerror_check_arg_rv( (param!=0), "param"); icalerror_clear_errno(); - ((struct icalparameter_impl*)param)->string = icalmemory_strdup(v); + ((struct icalparameter_impl*)param)->string = strdup(v); } /* X-LIC-ERRORTYPE */ diff --git a/libical/src/libical/icalparameter.h b/libical/src/libical/icalparameter.h index ad97f34e58..7e1da4e1fe 100644 --- a/libical/src/libical/icalparameter.h +++ b/libical/src/libical/icalparameter.h @@ -5,8 +5,6 @@ $Id$ - $Locker$ - (C) COPYRIGHT 2000, Eric Busboom, http://www.softwarestudio.org @@ -29,7 +27,7 @@ #ifndef ICALPARAM_H #define ICALPARAM_H -#include "icalenums.h" /* defined icalparameter_kind and other enums */ +#include "icalenums.h" typedef void icalparameter; @@ -48,22 +46,22 @@ icalparameter_kind icalparameter_isa(icalparameter* parameter); int icalparameter_isa_parameter(void* param); /* Acess the name of an X parameer */ -void icalparameter_set_xname (icalparameter* param, char* v); -char* icalparameter_get_xname(icalparameter* param); -void icalparameter_set_xvalue (icalparameter* param, char* v); -char* icalparameter_get_xvalue(icalparameter* param); +void icalparameter_set_xname (icalparameter* param, const char* v); +const char* icalparameter_get_xname(icalparameter* param); +void icalparameter_set_xvalue (icalparameter* param, const char* v); +const char* icalparameter_get_xvalue(icalparameter* param); /* Everything below this line is machine generated. Do not edit. */ /* ALTREP */ -icalparameter* icalparameter_new_altrep(char* v); -char* icalparameter_get_altrep(icalparameter* value); -void icalparameter_set_altrep(icalparameter* value, char* v); +icalparameter* icalparameter_new_altrep(const char* v); +const char* icalparameter_get_altrep(icalparameter* value); +void icalparameter_set_altrep(icalparameter* value, const char* v); /* CN */ -icalparameter* icalparameter_new_cn(char* v); -char* icalparameter_get_cn(icalparameter* value); -void icalparameter_set_cn(icalparameter* value, char* v); +icalparameter* icalparameter_new_cn(const char* v); +const char* icalparameter_get_cn(icalparameter* value); +void icalparameter_set_cn(icalparameter* value, const char* v); /* CUTYPE */ icalparameter* icalparameter_new_cutype(icalparameter_cutype v); @@ -71,19 +69,19 @@ icalparameter_cutype icalparameter_get_cutype(icalparameter* value); void icalparameter_set_cutype(icalparameter* value, icalparameter_cutype v); /* DELEGATED-FROM */ -icalparameter* icalparameter_new_delegatedfrom(char* v); -char* icalparameter_get_delegatedfrom(icalparameter* value); -void icalparameter_set_delegatedfrom(icalparameter* value, char* v); +icalparameter* icalparameter_new_delegatedfrom(const char* v); +const char* icalparameter_get_delegatedfrom(icalparameter* value); +void icalparameter_set_delegatedfrom(icalparameter* value, const char* v); /* DELEGATED-TO */ -icalparameter* icalparameter_new_delegatedto(char* v); -char* icalparameter_get_delegatedto(icalparameter* value); -void icalparameter_set_delegatedto(icalparameter* value, char* v); +icalparameter* icalparameter_new_delegatedto(const char* v); +const char* icalparameter_get_delegatedto(icalparameter* value); +void icalparameter_set_delegatedto(icalparameter* value, const char* v); /* DIR */ -icalparameter* icalparameter_new_dir(char* v); -char* icalparameter_get_dir(icalparameter* value); -void icalparameter_set_dir(icalparameter* value, char* v); +icalparameter* icalparameter_new_dir(const char* v); +const char* icalparameter_get_dir(icalparameter* value); +void icalparameter_set_dir(icalparameter* value, const char* v); /* ENCODING */ icalparameter* icalparameter_new_encoding(icalparameter_encoding v); @@ -96,19 +94,19 @@ icalparameter_fbtype icalparameter_get_fbtype(icalparameter* value); void icalparameter_set_fbtype(icalparameter* value, icalparameter_fbtype v); /* FMTTYPE */ -icalparameter* icalparameter_new_fmttype(char* v); -char* icalparameter_get_fmttype(icalparameter* value); -void icalparameter_set_fmttype(icalparameter* value, char* v); +icalparameter* icalparameter_new_fmttype(const char* v); +const char* icalparameter_get_fmttype(icalparameter* value); +void icalparameter_set_fmttype(icalparameter* value, const char* v); /* LANGUAGE */ -icalparameter* icalparameter_new_language(char* v); -char* icalparameter_get_language(icalparameter* value); -void icalparameter_set_language(icalparameter* value, char* v); +icalparameter* icalparameter_new_language(const char* v); +const char* icalparameter_get_language(icalparameter* value); +void icalparameter_set_language(icalparameter* value, const char* v); /* MEMBER */ -icalparameter* icalparameter_new_member(char* v); -char* icalparameter_get_member(icalparameter* value); -void icalparameter_set_member(icalparameter* value, char* v); +icalparameter* icalparameter_new_member(const char* v); +const char* icalparameter_get_member(icalparameter* value); +void icalparameter_set_member(icalparameter* value, const char* v); /* PARTSTAT */ icalparameter* icalparameter_new_partstat(icalparameter_partstat v); @@ -141,14 +139,14 @@ int icalparameter_get_rsvp(icalparameter* value); void icalparameter_set_rsvp(icalparameter* value, int v); /* SENT-BY */ -icalparameter* icalparameter_new_sentby(char* v); -char* icalparameter_get_sentby(icalparameter* value); -void icalparameter_set_sentby(icalparameter* value, char* v); +icalparameter* icalparameter_new_sentby(const char* v); +const char* icalparameter_get_sentby(icalparameter* value); +void icalparameter_set_sentby(icalparameter* value, const char* v); /* TZID */ -icalparameter* icalparameter_new_tzid(char* v); -char* icalparameter_get_tzid(icalparameter* value); -void icalparameter_set_tzid(icalparameter* value, char* v); +icalparameter* icalparameter_new_tzid(const char* v); +const char* icalparameter_get_tzid(icalparameter* value); +void icalparameter_set_tzid(icalparameter* value, const char* v); /* VALUE */ icalparameter* icalparameter_new_value(icalparameter_value v); @@ -156,9 +154,9 @@ icalparameter_value icalparameter_get_value(icalparameter* value); void icalparameter_set_value(icalparameter* value, icalparameter_value v); /* X */ -icalparameter* icalparameter_new_x(char* v); -char* icalparameter_get_x(icalparameter* value); -void icalparameter_set_x(icalparameter* value, char* v); +icalparameter* icalparameter_new_x(const char* v); +const char* icalparameter_get_x(icalparameter* value); +void icalparameter_set_x(icalparameter* value, const char* v); /* X-LIC-ERRORTYPE */ icalparameter* icalparameter_new_xlicerrortype(icalparameter_xlicerrortype v); @@ -170,4 +168,4 @@ icalparameter* icalparameter_new_xliccomparetype(icalparameter_xliccomparetype v icalparameter_xliccomparetype icalparameter_get_xliccomparetype(icalparameter* value); void icalparameter_set_xliccomparetype(icalparameter* value, icalparameter_xliccomparetype v); -#endif ICALPARAMETER_H +#endif /*ICALPARAMETER_H*/ diff --git a/libical/src/libical/icalparser.c b/libical/src/libical/icalparser.c index 11a505244f..1de5945e7b 100644 --- a/libical/src/libical/icalparser.c +++ b/libical/src/libical/icalparser.c @@ -4,8 +4,6 @@ CREATOR: eric 04 August 1999 $Id$ - - $Locker$ The contents of this file are subject to the Mozilla Public License Version 1.0 (the "License"); you may not use this file except in @@ -39,10 +37,15 @@ #endif -#include "ical.h" -#include "pvl.h" #include "icalparser.h" +#include "pvl.h" #include "icalmemory.h" +#include "icalerror.h" +#include "icalvalue.h" +#include "icalparameter.h" +#include "icalproperty.h" +#include "icalcomponent.h" + #include <string.h> /* For strncpy & size_t */ #include <stdio.h> /* For FILE and fgets and sprintf */ #include <stdlib.h> /* for free */ @@ -50,7 +53,7 @@ extern icalvalue* icalparser_yy_value; void set_parser_value_state(icalvalue_kind kind); -int ical_yy_parse(void); +int ical_yyparse(void); char* icalparser_get_next_char(char c, char *str); char* icalparser_get_next_parameter(char* line,char** end); @@ -78,10 +81,9 @@ struct icalparser_impl }; -icalparser* icalparser_new() +icalparser* icalparser_new(void) { struct icalparser_impl* impl = 0; - if ( ( impl = (struct icalparser_impl*) malloc(sizeof(struct icalparser_impl))) == 0) { icalerror_set_errno(ICAL_NEWFAILED_ERROR); @@ -178,8 +180,8 @@ char* make_segment(char* start, char* end) } -char* input_buffer; -char* input_buffer_p; +const char* input_buffer; +const char* input_buffer_p; #define min(a,b) ((a) < (b) ? (a) : (b)) int icalparser_flex_input(char* buf, int max_size) @@ -195,7 +197,7 @@ int icalparser_flex_input(char* buf, int max_size) } } -void icalparser_clear_flex_input() +void icalparser_clear_flex_input(void) { input_buffer_p = input_buffer+strlen(input_buffer); } @@ -203,7 +205,7 @@ void icalparser_clear_flex_input() /* Cal the flex parser to parse a complex value */ icalvalue* icalparser_parse_value(icalvalue_kind kind, - char* str, icalproperty** error) + const char* str, icalproperty** error) { int r; input_buffer_p = input_buffer = str; @@ -211,7 +213,7 @@ icalvalue* icalparser_parse_value(icalvalue_kind kind, set_parser_value_state(kind); icalparser_yy_value = 0; - r = ical_yy_parse(); + r = ical_yyparse(); /* Error. Parse failed */ if( icalparser_yy_value == 0 || r != 0){ diff --git a/libical/src/libical/icalparser.h b/libical/src/libical/icalparser.h index 161127379f..7940bc8cca 100644 --- a/libical/src/libical/icalparser.h +++ b/libical/src/libical/icalparser.h @@ -5,7 +5,6 @@ $Id$ - (C) COPYRIGHT 2000, Eric Busboom, http://www.softwarestudio.org This program is free software; you can redistribute it and/or modify @@ -27,7 +26,10 @@ #ifndef ICALPARSER_H #define ICALPARSER_H -#include "ical.h" +#include "icalenums.h" +#include "icaltypes.h" +#include"icalcomponent.h" + #include <stdio.h> /* For FILE* */ typedef void* icalparser; @@ -49,7 +51,7 @@ typedef enum icalparser_state { ICALPARSER_IN_PROGRESS } icalparser_state; -icalparser* icalparser_new(); +icalparser* icalparser_new(void); icalcomponent* icalparser_add_line(icalparser* parser, char* str ); icalcomponent* icalparser_claim(icalparser* parser); icalcomponent* icalparser_clean(icalparser* parser); @@ -80,7 +82,8 @@ icalcomponent* icalparser_parse_string(char* str); ***********************************************************************/ /* Use the flex/bison parser to turn a string into a value type */ -icalvalue* icalparser_parse_value(icalvalue_kind kind, char* str, icalcomponent** errors); +icalvalue* icalparser_parse_value(icalvalue_kind kind, + const char* str, icalcomponent** errors); /* Given a line generator function, return a single iCal content line.*/ char* icalparser_get_line(icalparser* parser, char* (*line_gen_func)(char *s, size_t size, void *d)); diff --git a/libical/src/libical/icalproperty.c b/libical/src/libical/icalproperty.c index b63c8a960a..84d6605160 100644 --- a/libical/src/libical/icalproperty.c +++ b/libical/src/libical/icalproperty.c @@ -6,7 +6,6 @@ $Id$ - (C) COPYRIGHT 2000, Eric Busboom, http://www.softwarestudio.org This program is free software; you can redistribute it and/or modify @@ -23,24 +22,26 @@ The original code is icalproperty.c ======================================================================*/ +#line 27 "icalproperty.c.in" #ifdef HAVE_CONFIG_H -#include "config.h" +#include <config.h> #endif -#include <string.h> /* For icalmemory_strdup, rindex */ -#include <assert.h> -#include <stdlib.h> -#include <errno.h> -#include <stdio.h> /* for printf */ -#include <stdarg.h> /* for va_list, va_start, etc. */ - -#include "ical.h" +#include "icalproperty.h" +#include "icalcomponent.h" #include "pvl.h" #include "icalenums.h" #include "icalerror.h" #include "icalmemory.h" +#include <string.h> /* For icalmemory_strdup, rindex */ +#include <assert.h> +#include <stdlib.h> +#include <errno.h> +#include <stdio.h> /* for printf */ +#include <stdarg.h> /* for va_list, va_start, etc. */ + #define TMP_BUF_SIZE 1024 /* Private routines for icalproperty */ @@ -87,6 +88,7 @@ void icalproperty_add_parameters(struct icalproperty_impl *impl,va_list args) } + struct icalproperty_impl* icalproperty_new_impl (icalproperty_kind kind) { @@ -251,18 +253,14 @@ icalproperty_as_ical_string (icalproperty* prop) by libical, so it can be given to the caller without fear of the caller forgetting to free it */ - char* property_name = 0; + const char* property_name = 0; size_t buf_size = 1024; char* buf = icalmemory_new_buffer(buf_size); char* buf_ptr = buf; icalvalue* value; char *out_buf; -#ifdef ICAL_UNIX_NEWLINE char newline[] = "\n"; -#else - char newline[] = "\r\n"; -#endif struct icalproperty_impl *impl = (struct icalproperty_impl*)prop; @@ -315,7 +313,7 @@ icalproperty_as_ical_string (icalproperty* prop) value = icalproperty_get_value(prop); if (value != 0){ - char *str = icalvalue_as_ical_string(value); + const char *str = icalvalue_as_ical_string(value); icalerror_assert((str !=0),"Could not get string representation of a value"); icalmemory_append_string(&buf, &buf_ptr, &buf_size, str); } else { @@ -378,14 +376,32 @@ icalproperty_add_parameter (icalproperty* prop,icalparameter* parameter) } +void +icalproperty_set_parameter (icalproperty* prop,icalparameter* parameter) +{ + icalproperty_kind kind; + + kind = icalparameter_isa(parameter); + + icalproperty_remove_parameter(prop,kind); + + icalproperty_add_parameter(prop,parameter); +} + void icalproperty_remove_parameter (icalproperty* prop, icalparameter_kind kind) { +<<<<<<< icalproperty.c struct icalproperty_impl *p = (struct icalproperty_impl*)prop; icalparameter *param; pvl_elem elem; +======= + pvl_elem p; + struct icalproperty_impl *impl = (struct icalproperty_impl*)prop; +>>>>>>> 1.1.1.5 +<<<<<<< icalproperty.c icalerror_check_arg_rv((prop!=0),"prop"); /* This routine is now implemented, so disregard the following @@ -402,6 +418,18 @@ icalproperty_remove_parameter (icalproperty* prop, icalparameter_kind kind) } elem = pvl_next (elem); } +======= + icalerror_check_arg_rv((prop!=0),"prop"); + + for(p=pvl_head(impl->parameters);p != 0; p = pvl_next(p)){ + icalparameter* param = (icalparameter *)pvl_data (p); + if (icalparameter_isa(param) == kind) { + pvl_remove (impl->parameters, p); + icalparameter_free (param); + break; + } + } +>>>>>>> 1.1.1.5 } @@ -432,27 +460,45 @@ icalproperty_get_first_parameter (icalproperty* prop, icalparameter_kind kind) return 0; } - return (icalparameter*) pvl_data(p->parameter_iterator); + for( p->parameter_iterator = pvl_head(p->parameters); + p->parameter_iterator !=0; + p->parameter_iterator = pvl_next(p->parameter_iterator)){ + + icalparameter *param = (icalparameter*)pvl_data(p->parameter_iterator); + + if(icalparameter_isa(param) == kind || kind == ICAL_ANY_PARAMETER){ + return param; + } + } + + return 0; } icalparameter* icalproperty_get_next_parameter (icalproperty* prop, icalparameter_kind kind) { - struct icalproperty_impl *p = (struct icalproperty_impl*)prop; - icalerror_check_arg_rz( (prop!=0),"prop"); - - if (p->parameter_iterator == 0 ) { - return 0; - } - - p->parameter_iterator = pvl_next(p->parameter_iterator); - - if (p->parameter_iterator == 0 ) { - return 0; - } + struct icalproperty_impl *p = (struct icalproperty_impl*)prop; + + icalerror_check_arg_rz( (prop!=0),"prop"); + + if (p->parameter_iterator == 0) { + return 0; + } + + for( p->parameter_iterator = pvl_next(p->parameter_iterator); + p->parameter_iterator !=0; + p->parameter_iterator = pvl_next(p->parameter_iterator)){ + + icalparameter *param = (icalparameter*)pvl_data(p->parameter_iterator); + + if(icalparameter_isa(param) == kind || kind == ICAL_ANY_PARAMETER){ + return param; + } + } + + return 0; - return (icalparameter*) pvl_data(p->parameter_iterator); } void @@ -589,7 +635,7 @@ icalproperty_method icalproperty_get_method(icalproperty* prop) /* X-LIC-MIMECID */ -icalproperty* icalproperty_new_xlicmimecid(char* v) +icalproperty* icalproperty_new_xlicmimecid(const char* v) { struct icalproperty_impl *impl = icalproperty_new_impl(ICAL_XLICMIMECID_PROPERTY); icalerror_check_arg_rz( (v!=0),"v"); @@ -600,7 +646,7 @@ icalproperty* icalproperty_new_xlicmimecid(char* v) return (icalproperty*)impl; } -icalproperty* icalproperty_vanew_xlicmimecid(char* v, ...) +icalproperty* icalproperty_vanew_xlicmimecid(const char* v, ...) { va_list args; struct icalproperty_impl *impl = icalproperty_new_impl(ICAL_XLICMIMECID_PROPERTY); @@ -616,7 +662,7 @@ icalproperty* icalproperty_vanew_xlicmimecid(char* v, ...) return (icalproperty*)impl; } -void icalproperty_set_xlicmimecid(icalproperty* prop, char* v) +void icalproperty_set_xlicmimecid(icalproperty* prop, const char* v) { icalvalue *value; @@ -630,7 +676,7 @@ void icalproperty_set_xlicmimecid(icalproperty* prop, char* v) } -char* icalproperty_get_xlicmimecid(icalproperty* prop) +const char* icalproperty_get_xlicmimecid(icalproperty* prop) { icalvalue *value; icalerror_check_arg( (prop!=0),"prop"); @@ -692,7 +738,7 @@ struct icaltimetype icalproperty_get_lastmodified(icalproperty* prop) /* UID */ -icalproperty* icalproperty_new_uid(char* v) +icalproperty* icalproperty_new_uid(const char* v) { struct icalproperty_impl *impl = icalproperty_new_impl(ICAL_UID_PROPERTY); icalerror_check_arg_rz( (v!=0),"v"); @@ -703,7 +749,7 @@ icalproperty* icalproperty_new_uid(char* v) return (icalproperty*)impl; } -icalproperty* icalproperty_vanew_uid(char* v, ...) +icalproperty* icalproperty_vanew_uid(const char* v, ...) { va_list args; struct icalproperty_impl *impl = icalproperty_new_impl(ICAL_UID_PROPERTY); @@ -719,7 +765,7 @@ icalproperty* icalproperty_vanew_uid(char* v, ...) return (icalproperty*)impl; } -void icalproperty_set_uid(icalproperty* prop, char* v) +void icalproperty_set_uid(icalproperty* prop, const char* v) { icalvalue *value; @@ -733,7 +779,7 @@ void icalproperty_set_uid(icalproperty* prop, char* v) } -char* icalproperty_get_uid(icalproperty* prop) +const char* icalproperty_get_uid(icalproperty* prop) { icalvalue *value; icalerror_check_arg( (prop!=0),"prop"); @@ -745,7 +791,7 @@ char* icalproperty_get_uid(icalproperty* prop) /* PRODID */ -icalproperty* icalproperty_new_prodid(char* v) +icalproperty* icalproperty_new_prodid(const char* v) { struct icalproperty_impl *impl = icalproperty_new_impl(ICAL_PRODID_PROPERTY); icalerror_check_arg_rz( (v!=0),"v"); @@ -756,7 +802,7 @@ icalproperty* icalproperty_new_prodid(char* v) return (icalproperty*)impl; } -icalproperty* icalproperty_vanew_prodid(char* v, ...) +icalproperty* icalproperty_vanew_prodid(const char* v, ...) { va_list args; struct icalproperty_impl *impl = icalproperty_new_impl(ICAL_PRODID_PROPERTY); @@ -772,7 +818,7 @@ icalproperty* icalproperty_vanew_prodid(char* v, ...) return (icalproperty*)impl; } -void icalproperty_set_prodid(icalproperty* prop, char* v) +void icalproperty_set_prodid(icalproperty* prop, const char* v) { icalvalue *value; @@ -786,7 +832,7 @@ void icalproperty_set_prodid(icalproperty* prop, char* v) } -char* icalproperty_get_prodid(icalproperty* prop) +const char* icalproperty_get_prodid(icalproperty* prop) { icalvalue *value; icalerror_check_arg( (prop!=0),"prop"); @@ -798,23 +844,21 @@ char* icalproperty_get_prodid(icalproperty* prop) /* STATUS */ -icalproperty* icalproperty_new_status(char* v) +icalproperty* icalproperty_new_status(icalproperty_status v) { struct icalproperty_impl *impl = icalproperty_new_impl(ICAL_STATUS_PROPERTY); - icalerror_check_arg_rz( (v!=0),"v"); - + icalproperty_set_status((icalproperty*)impl,v); return (icalproperty*)impl; } -icalproperty* icalproperty_vanew_status(char* v, ...) +icalproperty* icalproperty_vanew_status(icalproperty_status v, ...) { va_list args; struct icalproperty_impl *impl = icalproperty_new_impl(ICAL_STATUS_PROPERTY); - icalerror_check_arg_rz( (v!=0),"v"); - + icalproperty_set_status((icalproperty*)impl,v); @@ -825,33 +869,32 @@ icalproperty* icalproperty_vanew_status(char* v, ...) return (icalproperty*)impl; } -void icalproperty_set_status(icalproperty* prop, char* v) +void icalproperty_set_status(icalproperty* prop, icalproperty_status v) { icalvalue *value; - icalerror_check_arg_rv( (v!=0),"v"); - + icalerror_check_arg_rv( (prop!=0),"prop"); - value = icalvalue_new_text(v); + value = icalvalue_new_status(v); icalproperty_set_value(prop,value); } -char* icalproperty_get_status(icalproperty* prop) +icalproperty_status icalproperty_get_status(icalproperty* prop) { icalvalue *value; icalerror_check_arg( (prop!=0),"prop"); value = icalproperty_get_value(prop); - return icalvalue_get_text(value); + return icalvalue_get_status(value); } /* DESCRIPTION */ -icalproperty* icalproperty_new_description(char* v) +icalproperty* icalproperty_new_description(const char* v) { struct icalproperty_impl *impl = icalproperty_new_impl(ICAL_DESCRIPTION_PROPERTY); icalerror_check_arg_rz( (v!=0),"v"); @@ -862,7 +905,7 @@ icalproperty* icalproperty_new_description(char* v) return (icalproperty*)impl; } -icalproperty* icalproperty_vanew_description(char* v, ...) +icalproperty* icalproperty_vanew_description(const char* v, ...) { va_list args; struct icalproperty_impl *impl = icalproperty_new_impl(ICAL_DESCRIPTION_PROPERTY); @@ -878,7 +921,7 @@ icalproperty* icalproperty_vanew_description(char* v, ...) return (icalproperty*)impl; } -void icalproperty_set_description(icalproperty* prop, char* v) +void icalproperty_set_description(icalproperty* prop, const char* v) { icalvalue *value; @@ -892,7 +935,7 @@ void icalproperty_set_description(icalproperty* prop, char* v) } -char* icalproperty_get_description(icalproperty* prop) +const char* icalproperty_get_description(icalproperty* prop) { icalvalue *value; icalerror_check_arg( (prop!=0),"prop"); @@ -954,7 +997,7 @@ struct icaldurationtype icalproperty_get_duration(icalproperty* prop) /* CATEGORIES */ -icalproperty* icalproperty_new_categories(char* v) +icalproperty* icalproperty_new_categories(const char* v) { struct icalproperty_impl *impl = icalproperty_new_impl(ICAL_CATEGORIES_PROPERTY); icalerror_check_arg_rz( (v!=0),"v"); @@ -965,7 +1008,7 @@ icalproperty* icalproperty_new_categories(char* v) return (icalproperty*)impl; } -icalproperty* icalproperty_vanew_categories(char* v, ...) +icalproperty* icalproperty_vanew_categories(const char* v, ...) { va_list args; struct icalproperty_impl *impl = icalproperty_new_impl(ICAL_CATEGORIES_PROPERTY); @@ -981,7 +1024,7 @@ icalproperty* icalproperty_vanew_categories(char* v, ...) return (icalproperty*)impl; } -void icalproperty_set_categories(icalproperty* prop, char* v) +void icalproperty_set_categories(icalproperty* prop, const char* v) { icalvalue *value; @@ -995,7 +1038,7 @@ void icalproperty_set_categories(icalproperty* prop, char* v) } -char* icalproperty_get_categories(icalproperty* prop) +const char* icalproperty_get_categories(icalproperty* prop) { icalvalue *value; icalerror_check_arg( (prop!=0),"prop"); @@ -1007,7 +1050,7 @@ char* icalproperty_get_categories(icalproperty* prop) /* VERSION */ -icalproperty* icalproperty_new_version(char* v) +icalproperty* icalproperty_new_version(const char* v) { struct icalproperty_impl *impl = icalproperty_new_impl(ICAL_VERSION_PROPERTY); icalerror_check_arg_rz( (v!=0),"v"); @@ -1018,7 +1061,7 @@ icalproperty* icalproperty_new_version(char* v) return (icalproperty*)impl; } -icalproperty* icalproperty_vanew_version(char* v, ...) +icalproperty* icalproperty_vanew_version(const char* v, ...) { va_list args; struct icalproperty_impl *impl = icalproperty_new_impl(ICAL_VERSION_PROPERTY); @@ -1034,7 +1077,7 @@ icalproperty* icalproperty_vanew_version(char* v, ...) return (icalproperty*)impl; } -void icalproperty_set_version(icalproperty* prop, char* v) +void icalproperty_set_version(icalproperty* prop, const char* v) { icalvalue *value; @@ -1048,7 +1091,7 @@ void icalproperty_set_version(icalproperty* prop, char* v) } -char* icalproperty_get_version(icalproperty* prop) +const char* icalproperty_get_version(icalproperty* prop) { icalvalue *value; icalerror_check_arg( (prop!=0),"prop"); @@ -1160,7 +1203,7 @@ struct icalrecurrencetype icalproperty_get_rrule(icalproperty* prop) /* ATTENDEE */ -icalproperty* icalproperty_new_attendee(char* v) +icalproperty* icalproperty_new_attendee(const char* v) { struct icalproperty_impl *impl = icalproperty_new_impl(ICAL_ATTENDEE_PROPERTY); icalerror_check_arg_rz( (v!=0),"v"); @@ -1171,7 +1214,7 @@ icalproperty* icalproperty_new_attendee(char* v) return (icalproperty*)impl; } -icalproperty* icalproperty_vanew_attendee(char* v, ...) +icalproperty* icalproperty_vanew_attendee(const char* v, ...) { va_list args; struct icalproperty_impl *impl = icalproperty_new_impl(ICAL_ATTENDEE_PROPERTY); @@ -1187,7 +1230,7 @@ icalproperty* icalproperty_vanew_attendee(char* v, ...) return (icalproperty*)impl; } -void icalproperty_set_attendee(icalproperty* prop, char* v) +void icalproperty_set_attendee(icalproperty* prop, const char* v) { icalvalue *value; @@ -1201,7 +1244,7 @@ void icalproperty_set_attendee(icalproperty* prop, char* v) } -char* icalproperty_get_attendee(icalproperty* prop) +const char* icalproperty_get_attendee(icalproperty* prop) { icalvalue *value; icalerror_check_arg( (prop!=0),"prop"); @@ -1213,7 +1256,7 @@ char* icalproperty_get_attendee(icalproperty* prop) /* CONTACT */ -icalproperty* icalproperty_new_contact(char* v) +icalproperty* icalproperty_new_contact(const char* v) { struct icalproperty_impl *impl = icalproperty_new_impl(ICAL_CONTACT_PROPERTY); icalerror_check_arg_rz( (v!=0),"v"); @@ -1224,7 +1267,7 @@ icalproperty* icalproperty_new_contact(char* v) return (icalproperty*)impl; } -icalproperty* icalproperty_vanew_contact(char* v, ...) +icalproperty* icalproperty_vanew_contact(const char* v, ...) { va_list args; struct icalproperty_impl *impl = icalproperty_new_impl(ICAL_CONTACT_PROPERTY); @@ -1240,7 +1283,7 @@ icalproperty* icalproperty_vanew_contact(char* v, ...) return (icalproperty*)impl; } -void icalproperty_set_contact(icalproperty* prop, char* v) +void icalproperty_set_contact(icalproperty* prop, const char* v) { icalvalue *value; @@ -1254,7 +1297,7 @@ void icalproperty_set_contact(icalproperty* prop, char* v) } -char* icalproperty_get_contact(icalproperty* prop) +const char* icalproperty_get_contact(icalproperty* prop) { icalvalue *value; icalerror_check_arg( (prop!=0),"prop"); @@ -1266,7 +1309,7 @@ char* icalproperty_get_contact(icalproperty* prop) /* X-LIC-MIMECONTENTTYPE */ -icalproperty* icalproperty_new_xlicmimecontenttype(char* v) +icalproperty* icalproperty_new_xlicmimecontenttype(const char* v) { struct icalproperty_impl *impl = icalproperty_new_impl(ICAL_XLICMIMECONTENTTYPE_PROPERTY); icalerror_check_arg_rz( (v!=0),"v"); @@ -1277,7 +1320,7 @@ icalproperty* icalproperty_new_xlicmimecontenttype(char* v) return (icalproperty*)impl; } -icalproperty* icalproperty_vanew_xlicmimecontenttype(char* v, ...) +icalproperty* icalproperty_vanew_xlicmimecontenttype(const char* v, ...) { va_list args; struct icalproperty_impl *impl = icalproperty_new_impl(ICAL_XLICMIMECONTENTTYPE_PROPERTY); @@ -1293,7 +1336,7 @@ icalproperty* icalproperty_vanew_xlicmimecontenttype(char* v, ...) return (icalproperty*)impl; } -void icalproperty_set_xlicmimecontenttype(icalproperty* prop, char* v) +void icalproperty_set_xlicmimecontenttype(icalproperty* prop, const char* v) { icalvalue *value; @@ -1307,7 +1350,7 @@ void icalproperty_set_xlicmimecontenttype(icalproperty* prop, char* v) } -char* icalproperty_get_xlicmimecontenttype(icalproperty* prop) +const char* icalproperty_get_xlicmimecontenttype(icalproperty* prop) { icalvalue *value; icalerror_check_arg( (prop!=0),"prop"); @@ -1319,7 +1362,7 @@ char* icalproperty_get_xlicmimecontenttype(icalproperty* prop) /* X-LIC-MIMEOPTINFO */ -icalproperty* icalproperty_new_xlicmimeoptinfo(char* v) +icalproperty* icalproperty_new_xlicmimeoptinfo(const char* v) { struct icalproperty_impl *impl = icalproperty_new_impl(ICAL_XLICMIMEOPTINFO_PROPERTY); icalerror_check_arg_rz( (v!=0),"v"); @@ -1330,7 +1373,7 @@ icalproperty* icalproperty_new_xlicmimeoptinfo(char* v) return (icalproperty*)impl; } -icalproperty* icalproperty_vanew_xlicmimeoptinfo(char* v, ...) +icalproperty* icalproperty_vanew_xlicmimeoptinfo(const char* v, ...) { va_list args; struct icalproperty_impl *impl = icalproperty_new_impl(ICAL_XLICMIMEOPTINFO_PROPERTY); @@ -1346,7 +1389,7 @@ icalproperty* icalproperty_vanew_xlicmimeoptinfo(char* v, ...) return (icalproperty*)impl; } -void icalproperty_set_xlicmimeoptinfo(icalproperty* prop, char* v) +void icalproperty_set_xlicmimeoptinfo(icalproperty* prop, const char* v) { icalvalue *value; @@ -1360,7 +1403,7 @@ void icalproperty_set_xlicmimeoptinfo(icalproperty* prop, char* v) } -char* icalproperty_get_xlicmimeoptinfo(icalproperty* prop) +const char* icalproperty_get_xlicmimeoptinfo(icalproperty* prop) { icalvalue *value; icalerror_check_arg( (prop!=0),"prop"); @@ -1372,7 +1415,7 @@ char* icalproperty_get_xlicmimeoptinfo(icalproperty* prop) /* RELATED-TO */ -icalproperty* icalproperty_new_relatedto(char* v) +icalproperty* icalproperty_new_relatedto(const char* v) { struct icalproperty_impl *impl = icalproperty_new_impl(ICAL_RELATEDTO_PROPERTY); icalerror_check_arg_rz( (v!=0),"v"); @@ -1383,7 +1426,7 @@ icalproperty* icalproperty_new_relatedto(char* v) return (icalproperty*)impl; } -icalproperty* icalproperty_vanew_relatedto(char* v, ...) +icalproperty* icalproperty_vanew_relatedto(const char* v, ...) { va_list args; struct icalproperty_impl *impl = icalproperty_new_impl(ICAL_RELATEDTO_PROPERTY); @@ -1399,7 +1442,7 @@ icalproperty* icalproperty_vanew_relatedto(char* v, ...) return (icalproperty*)impl; } -void icalproperty_set_relatedto(icalproperty* prop, char* v) +void icalproperty_set_relatedto(icalproperty* prop, const char* v) { icalvalue *value; @@ -1413,7 +1456,7 @@ void icalproperty_set_relatedto(icalproperty* prop, char* v) } -char* icalproperty_get_relatedto(icalproperty* prop) +const char* icalproperty_get_relatedto(icalproperty* prop) { icalvalue *value; icalerror_check_arg( (prop!=0),"prop"); @@ -1425,7 +1468,7 @@ char* icalproperty_get_relatedto(icalproperty* prop) /* ORGANIZER */ -icalproperty* icalproperty_new_organizer(char* v) +icalproperty* icalproperty_new_organizer(const char* v) { struct icalproperty_impl *impl = icalproperty_new_impl(ICAL_ORGANIZER_PROPERTY); icalerror_check_arg_rz( (v!=0),"v"); @@ -1436,7 +1479,7 @@ icalproperty* icalproperty_new_organizer(char* v) return (icalproperty*)impl; } -icalproperty* icalproperty_vanew_organizer(char* v, ...) +icalproperty* icalproperty_vanew_organizer(const char* v, ...) { va_list args; struct icalproperty_impl *impl = icalproperty_new_impl(ICAL_ORGANIZER_PROPERTY); @@ -1452,7 +1495,7 @@ icalproperty* icalproperty_vanew_organizer(char* v, ...) return (icalproperty*)impl; } -void icalproperty_set_organizer(icalproperty* prop, char* v) +void icalproperty_set_organizer(icalproperty* prop, const char* v) { icalvalue *value; @@ -1466,7 +1509,7 @@ void icalproperty_set_organizer(icalproperty* prop, char* v) } -char* icalproperty_get_organizer(icalproperty* prop) +const char* icalproperty_get_organizer(icalproperty* prop) { icalvalue *value; icalerror_check_arg( (prop!=0),"prop"); @@ -1478,7 +1521,7 @@ char* icalproperty_get_organizer(icalproperty* prop) /* COMMENT */ -icalproperty* icalproperty_new_comment(char* v) +icalproperty* icalproperty_new_comment(const char* v) { struct icalproperty_impl *impl = icalproperty_new_impl(ICAL_COMMENT_PROPERTY); icalerror_check_arg_rz( (v!=0),"v"); @@ -1489,7 +1532,7 @@ icalproperty* icalproperty_new_comment(char* v) return (icalproperty*)impl; } -icalproperty* icalproperty_vanew_comment(char* v, ...) +icalproperty* icalproperty_vanew_comment(const char* v, ...) { va_list args; struct icalproperty_impl *impl = icalproperty_new_impl(ICAL_COMMENT_PROPERTY); @@ -1505,7 +1548,7 @@ icalproperty* icalproperty_vanew_comment(char* v, ...) return (icalproperty*)impl; } -void icalproperty_set_comment(icalproperty* prop, char* v) +void icalproperty_set_comment(icalproperty* prop, const char* v) { icalvalue *value; @@ -1519,7 +1562,7 @@ void icalproperty_set_comment(icalproperty* prop, char* v) } -char* icalproperty_get_comment(icalproperty* prop) +const char* icalproperty_get_comment(icalproperty* prop) { icalvalue *value; icalerror_check_arg( (prop!=0),"prop"); @@ -1531,7 +1574,7 @@ char* icalproperty_get_comment(icalproperty* prop) /* X-LIC-ERROR */ -icalproperty* icalproperty_new_xlicerror(char* v) +icalproperty* icalproperty_new_xlicerror(const char* v) { struct icalproperty_impl *impl = icalproperty_new_impl(ICAL_XLICERROR_PROPERTY); icalerror_check_arg_rz( (v!=0),"v"); @@ -1542,7 +1585,7 @@ icalproperty* icalproperty_new_xlicerror(char* v) return (icalproperty*)impl; } -icalproperty* icalproperty_vanew_xlicerror(char* v, ...) +icalproperty* icalproperty_vanew_xlicerror(const char* v, ...) { va_list args; struct icalproperty_impl *impl = icalproperty_new_impl(ICAL_XLICERROR_PROPERTY); @@ -1558,7 +1601,7 @@ icalproperty* icalproperty_vanew_xlicerror(char* v, ...) return (icalproperty*)impl; } -void icalproperty_set_xlicerror(icalproperty* prop, char* v) +void icalproperty_set_xlicerror(icalproperty* prop, const char* v) { icalvalue *value; @@ -1572,7 +1615,7 @@ void icalproperty_set_xlicerror(icalproperty* prop, char* v) } -char* icalproperty_get_xlicerror(icalproperty* prop) +const char* icalproperty_get_xlicerror(icalproperty* prop) { icalvalue *value; icalerror_check_arg( (prop!=0),"prop"); @@ -1634,7 +1677,7 @@ union icaltriggertype icalproperty_get_trigger(icalproperty* prop) /* CLASS */ -icalproperty* icalproperty_new_class(char* v) +icalproperty* icalproperty_new_class(const char* v) { struct icalproperty_impl *impl = icalproperty_new_impl(ICAL_CLASS_PROPERTY); icalerror_check_arg_rz( (v!=0),"v"); @@ -1645,7 +1688,7 @@ icalproperty* icalproperty_new_class(char* v) return (icalproperty*)impl; } -icalproperty* icalproperty_vanew_class(char* v, ...) +icalproperty* icalproperty_vanew_class(const char* v, ...) { va_list args; struct icalproperty_impl *impl = icalproperty_new_impl(ICAL_CLASS_PROPERTY); @@ -1661,7 +1704,7 @@ icalproperty* icalproperty_vanew_class(char* v, ...) return (icalproperty*)impl; } -void icalproperty_set_class(icalproperty* prop, char* v) +void icalproperty_set_class(icalproperty* prop, const char* v) { icalvalue *value; @@ -1675,7 +1718,7 @@ void icalproperty_set_class(icalproperty* prop, char* v) } -char* icalproperty_get_class(icalproperty* prop) +const char* icalproperty_get_class(icalproperty* prop) { icalvalue *value; icalerror_check_arg( (prop!=0),"prop"); @@ -1687,7 +1730,7 @@ char* icalproperty_get_class(icalproperty* prop) /* X */ -icalproperty* icalproperty_new_x(char* v) +icalproperty* icalproperty_new_x(const char* v) { struct icalproperty_impl *impl = icalproperty_new_impl(ICAL_X_PROPERTY); icalerror_check_arg_rz( (v!=0),"v"); @@ -1698,7 +1741,7 @@ icalproperty* icalproperty_new_x(char* v) return (icalproperty*)impl; } -icalproperty* icalproperty_vanew_x(char* v, ...) +icalproperty* icalproperty_vanew_x(const char* v, ...) { va_list args; struct icalproperty_impl *impl = icalproperty_new_impl(ICAL_X_PROPERTY); @@ -1714,7 +1757,7 @@ icalproperty* icalproperty_vanew_x(char* v, ...) return (icalproperty*)impl; } -void icalproperty_set_x(icalproperty* prop, char* v) +void icalproperty_set_x(icalproperty* prop, const char* v) { icalvalue *value; @@ -1728,7 +1771,7 @@ void icalproperty_set_x(icalproperty* prop, char* v) } -char* icalproperty_get_x(icalproperty* prop) +const char* icalproperty_get_x(icalproperty* prop) { icalvalue *value; icalerror_check_arg( (prop!=0),"prop"); @@ -1790,7 +1833,7 @@ int icalproperty_get_tzoffsetto(icalproperty* prop) /* TRANSP */ -icalproperty* icalproperty_new_transp(char* v) +icalproperty* icalproperty_new_transp(const char* v) { struct icalproperty_impl *impl = icalproperty_new_impl(ICAL_TRANSP_PROPERTY); icalerror_check_arg_rz( (v!=0),"v"); @@ -1801,7 +1844,7 @@ icalproperty* icalproperty_new_transp(char* v) return (icalproperty*)impl; } -icalproperty* icalproperty_vanew_transp(char* v, ...) +icalproperty* icalproperty_vanew_transp(const char* v, ...) { va_list args; struct icalproperty_impl *impl = icalproperty_new_impl(ICAL_TRANSP_PROPERTY); @@ -1817,7 +1860,7 @@ icalproperty* icalproperty_vanew_transp(char* v, ...) return (icalproperty*)impl; } -void icalproperty_set_transp(icalproperty* prop, char* v) +void icalproperty_set_transp(icalproperty* prop, const char* v) { icalvalue *value; @@ -1831,7 +1874,7 @@ void icalproperty_set_transp(icalproperty* prop, char* v) } -char* icalproperty_get_transp(icalproperty* prop) +const char* icalproperty_get_transp(icalproperty* prop) { icalvalue *value; icalerror_check_arg( (prop!=0),"prop"); @@ -1843,7 +1886,7 @@ char* icalproperty_get_transp(icalproperty* prop) /* X-LIC-MIMEENCODING */ -icalproperty* icalproperty_new_xlicmimeencoding(char* v) +icalproperty* icalproperty_new_xlicmimeencoding(const char* v) { struct icalproperty_impl *impl = icalproperty_new_impl(ICAL_XLICMIMEENCODING_PROPERTY); icalerror_check_arg_rz( (v!=0),"v"); @@ -1854,7 +1897,7 @@ icalproperty* icalproperty_new_xlicmimeencoding(char* v) return (icalproperty*)impl; } -icalproperty* icalproperty_vanew_xlicmimeencoding(char* v, ...) +icalproperty* icalproperty_vanew_xlicmimeencoding(const char* v, ...) { va_list args; struct icalproperty_impl *impl = icalproperty_new_impl(ICAL_XLICMIMEENCODING_PROPERTY); @@ -1870,7 +1913,7 @@ icalproperty* icalproperty_vanew_xlicmimeencoding(char* v, ...) return (icalproperty*)impl; } -void icalproperty_set_xlicmimeencoding(icalproperty* prop, char* v) +void icalproperty_set_xlicmimeencoding(icalproperty* prop, const char* v) { icalvalue *value; @@ -1884,7 +1927,7 @@ void icalproperty_set_xlicmimeencoding(icalproperty* prop, char* v) } -char* icalproperty_get_xlicmimeencoding(icalproperty* prop) +const char* icalproperty_get_xlicmimeencoding(icalproperty* prop) { icalvalue *value; icalerror_check_arg( (prop!=0),"prop"); @@ -1946,7 +1989,7 @@ int icalproperty_get_sequence(icalproperty* prop) /* LOCATION */ -icalproperty* icalproperty_new_location(char* v) +icalproperty* icalproperty_new_location(const char* v) { struct icalproperty_impl *impl = icalproperty_new_impl(ICAL_LOCATION_PROPERTY); icalerror_check_arg_rz( (v!=0),"v"); @@ -1957,7 +2000,7 @@ icalproperty* icalproperty_new_location(char* v) return (icalproperty*)impl; } -icalproperty* icalproperty_vanew_location(char* v, ...) +icalproperty* icalproperty_vanew_location(const char* v, ...) { va_list args; struct icalproperty_impl *impl = icalproperty_new_impl(ICAL_LOCATION_PROPERTY); @@ -1973,7 +2016,7 @@ icalproperty* icalproperty_vanew_location(char* v, ...) return (icalproperty*)impl; } -void icalproperty_set_location(icalproperty* prop, char* v) +void icalproperty_set_location(icalproperty* prop, const char* v) { icalvalue *value; @@ -1987,7 +2030,7 @@ void icalproperty_set_location(icalproperty* prop, char* v) } -char* icalproperty_get_location(icalproperty* prop) +const char* icalproperty_get_location(icalproperty* prop) { icalvalue *value; icalerror_check_arg( (prop!=0),"prop"); @@ -1999,7 +2042,7 @@ char* icalproperty_get_location(icalproperty* prop) /* REQUEST-STATUS */ -icalproperty* icalproperty_new_requeststatus(char* v) +icalproperty* icalproperty_new_requeststatus(const char* v) { struct icalproperty_impl *impl = icalproperty_new_impl(ICAL_REQUESTSTATUS_PROPERTY); icalerror_check_arg_rz( (v!=0),"v"); @@ -2010,7 +2053,7 @@ icalproperty* icalproperty_new_requeststatus(char* v) return (icalproperty*)impl; } -icalproperty* icalproperty_vanew_requeststatus(char* v, ...) +icalproperty* icalproperty_vanew_requeststatus(const char* v, ...) { va_list args; struct icalproperty_impl *impl = icalproperty_new_impl(ICAL_REQUESTSTATUS_PROPERTY); @@ -2026,7 +2069,7 @@ icalproperty* icalproperty_vanew_requeststatus(char* v, ...) return (icalproperty*)impl; } -void icalproperty_set_requeststatus(icalproperty* prop, char* v) +void icalproperty_set_requeststatus(icalproperty* prop, const char* v) { icalvalue *value; @@ -2040,7 +2083,7 @@ void icalproperty_set_requeststatus(icalproperty* prop, char* v) } -char* icalproperty_get_requeststatus(icalproperty* prop) +const char* icalproperty_get_requeststatus(icalproperty* prop) { icalvalue *value; icalerror_check_arg( (prop!=0),"prop"); @@ -2102,7 +2145,7 @@ struct icaltimetype icalproperty_get_exdate(icalproperty* prop) /* TZID */ -icalproperty* icalproperty_new_tzid(char* v) +icalproperty* icalproperty_new_tzid(const char* v) { struct icalproperty_impl *impl = icalproperty_new_impl(ICAL_TZID_PROPERTY); icalerror_check_arg_rz( (v!=0),"v"); @@ -2113,7 +2156,7 @@ icalproperty* icalproperty_new_tzid(char* v) return (icalproperty*)impl; } -icalproperty* icalproperty_vanew_tzid(char* v, ...) +icalproperty* icalproperty_vanew_tzid(const char* v, ...) { va_list args; struct icalproperty_impl *impl = icalproperty_new_impl(ICAL_TZID_PROPERTY); @@ -2129,7 +2172,7 @@ icalproperty* icalproperty_vanew_tzid(char* v, ...) return (icalproperty*)impl; } -void icalproperty_set_tzid(icalproperty* prop, char* v) +void icalproperty_set_tzid(icalproperty* prop, const char* v) { icalvalue *value; @@ -2143,7 +2186,7 @@ void icalproperty_set_tzid(icalproperty* prop, char* v) } -char* icalproperty_get_tzid(icalproperty* prop) +const char* icalproperty_get_tzid(icalproperty* prop) { icalvalue *value; icalerror_check_arg( (prop!=0),"prop"); @@ -2155,7 +2198,7 @@ char* icalproperty_get_tzid(icalproperty* prop) /* RESOURCES */ -icalproperty* icalproperty_new_resources(char* v) +icalproperty* icalproperty_new_resources(const char* v) { struct icalproperty_impl *impl = icalproperty_new_impl(ICAL_RESOURCES_PROPERTY); icalerror_check_arg_rz( (v!=0),"v"); @@ -2166,7 +2209,7 @@ icalproperty* icalproperty_new_resources(char* v) return (icalproperty*)impl; } -icalproperty* icalproperty_vanew_resources(char* v, ...) +icalproperty* icalproperty_vanew_resources(const char* v, ...) { va_list args; struct icalproperty_impl *impl = icalproperty_new_impl(ICAL_RESOURCES_PROPERTY); @@ -2182,7 +2225,7 @@ icalproperty* icalproperty_vanew_resources(char* v, ...) return (icalproperty*)impl; } -void icalproperty_set_resources(icalproperty* prop, char* v) +void icalproperty_set_resources(icalproperty* prop, const char* v) { icalvalue *value; @@ -2196,7 +2239,7 @@ void icalproperty_set_resources(icalproperty* prop, char* v) } -char* icalproperty_get_resources(icalproperty* prop) +const char* icalproperty_get_resources(icalproperty* prop) { icalvalue *value; icalerror_check_arg( (prop!=0),"prop"); @@ -2208,7 +2251,7 @@ char* icalproperty_get_resources(icalproperty* prop) /* TZURL */ -icalproperty* icalproperty_new_tzurl(char* v) +icalproperty* icalproperty_new_tzurl(const char* v) { struct icalproperty_impl *impl = icalproperty_new_impl(ICAL_TZURL_PROPERTY); icalerror_check_arg_rz( (v!=0),"v"); @@ -2219,7 +2262,7 @@ icalproperty* icalproperty_new_tzurl(char* v) return (icalproperty*)impl; } -icalproperty* icalproperty_vanew_tzurl(char* v, ...) +icalproperty* icalproperty_vanew_tzurl(const char* v, ...) { va_list args; struct icalproperty_impl *impl = icalproperty_new_impl(ICAL_TZURL_PROPERTY); @@ -2235,7 +2278,7 @@ icalproperty* icalproperty_vanew_tzurl(char* v, ...) return (icalproperty*)impl; } -void icalproperty_set_tzurl(icalproperty* prop, char* v) +void icalproperty_set_tzurl(icalproperty* prop, const char* v) { icalvalue *value; @@ -2249,7 +2292,7 @@ void icalproperty_set_tzurl(icalproperty* prop, char* v) } -char* icalproperty_get_tzurl(icalproperty* prop) +const char* icalproperty_get_tzurl(icalproperty* prop) { icalvalue *value; icalerror_check_arg( (prop!=0),"prop"); @@ -2511,7 +2554,7 @@ struct icaltimetype icalproperty_get_recurrenceid(icalproperty* prop) /* SUMMARY */ -icalproperty* icalproperty_new_summary(char* v) +icalproperty* icalproperty_new_summary(const char* v) { struct icalproperty_impl *impl = icalproperty_new_impl(ICAL_SUMMARY_PROPERTY); icalerror_check_arg_rz( (v!=0),"v"); @@ -2522,7 +2565,7 @@ icalproperty* icalproperty_new_summary(char* v) return (icalproperty*)impl; } -icalproperty* icalproperty_vanew_summary(char* v, ...) +icalproperty* icalproperty_vanew_summary(const char* v, ...) { va_list args; struct icalproperty_impl *impl = icalproperty_new_impl(ICAL_SUMMARY_PROPERTY); @@ -2538,7 +2581,7 @@ icalproperty* icalproperty_vanew_summary(char* v, ...) return (icalproperty*)impl; } -void icalproperty_set_summary(icalproperty* prop, char* v) +void icalproperty_set_summary(icalproperty* prop, const char* v) { icalvalue *value; @@ -2552,7 +2595,7 @@ void icalproperty_set_summary(icalproperty* prop, char* v) } -char* icalproperty_get_summary(icalproperty* prop) +const char* icalproperty_get_summary(icalproperty* prop) { icalvalue *value; icalerror_check_arg( (prop!=0),"prop"); @@ -2614,7 +2657,7 @@ struct icaltimetype icalproperty_get_dtend(icalproperty* prop) /* TZNAME */ -icalproperty* icalproperty_new_tzname(char* v) +icalproperty* icalproperty_new_tzname(const char* v) { struct icalproperty_impl *impl = icalproperty_new_impl(ICAL_TZNAME_PROPERTY); icalerror_check_arg_rz( (v!=0),"v"); @@ -2625,7 +2668,7 @@ icalproperty* icalproperty_new_tzname(char* v) return (icalproperty*)impl; } -icalproperty* icalproperty_vanew_tzname(char* v, ...) +icalproperty* icalproperty_vanew_tzname(const char* v, ...) { va_list args; struct icalproperty_impl *impl = icalproperty_new_impl(ICAL_TZNAME_PROPERTY); @@ -2641,7 +2684,7 @@ icalproperty* icalproperty_vanew_tzname(char* v, ...) return (icalproperty*)impl; } -void icalproperty_set_tzname(icalproperty* prop, char* v) +void icalproperty_set_tzname(icalproperty* prop, const char* v) { icalvalue *value; @@ -2655,7 +2698,7 @@ void icalproperty_set_tzname(icalproperty* prop, char* v) } -char* icalproperty_get_tzname(icalproperty* prop) +const char* icalproperty_get_tzname(icalproperty* prop) { icalvalue *value; icalerror_check_arg( (prop!=0),"prop"); @@ -2717,7 +2760,7 @@ struct icalperiodtype icalproperty_get_rdate(icalproperty* prop) /* X-LIC-MIMEFILENAME */ -icalproperty* icalproperty_new_xlicmimefilename(char* v) +icalproperty* icalproperty_new_xlicmimefilename(const char* v) { struct icalproperty_impl *impl = icalproperty_new_impl(ICAL_XLICMIMEFILENAME_PROPERTY); icalerror_check_arg_rz( (v!=0),"v"); @@ -2728,7 +2771,7 @@ icalproperty* icalproperty_new_xlicmimefilename(char* v) return (icalproperty*)impl; } -icalproperty* icalproperty_vanew_xlicmimefilename(char* v, ...) +icalproperty* icalproperty_vanew_xlicmimefilename(const char* v, ...) { va_list args; struct icalproperty_impl *impl = icalproperty_new_impl(ICAL_XLICMIMEFILENAME_PROPERTY); @@ -2744,7 +2787,7 @@ icalproperty* icalproperty_vanew_xlicmimefilename(char* v, ...) return (icalproperty*)impl; } -void icalproperty_set_xlicmimefilename(icalproperty* prop, char* v) +void icalproperty_set_xlicmimefilename(icalproperty* prop, const char* v) { icalvalue *value; @@ -2758,7 +2801,7 @@ void icalproperty_set_xlicmimefilename(icalproperty* prop, char* v) } -char* icalproperty_get_xlicmimefilename(icalproperty* prop) +const char* icalproperty_get_xlicmimefilename(icalproperty* prop) { icalvalue *value; icalerror_check_arg( (prop!=0),"prop"); @@ -2770,7 +2813,7 @@ char* icalproperty_get_xlicmimefilename(icalproperty* prop) /* URL */ -icalproperty* icalproperty_new_url(char* v) +icalproperty* icalproperty_new_url(const char* v) { struct icalproperty_impl *impl = icalproperty_new_impl(ICAL_URL_PROPERTY); icalerror_check_arg_rz( (v!=0),"v"); @@ -2781,7 +2824,7 @@ icalproperty* icalproperty_new_url(char* v) return (icalproperty*)impl; } -icalproperty* icalproperty_vanew_url(char* v, ...) +icalproperty* icalproperty_vanew_url(const char* v, ...) { va_list args; struct icalproperty_impl *impl = icalproperty_new_impl(ICAL_URL_PROPERTY); @@ -2797,7 +2840,7 @@ icalproperty* icalproperty_vanew_url(char* v, ...) return (icalproperty*)impl; } -void icalproperty_set_url(icalproperty* prop, char* v) +void icalproperty_set_url(icalproperty* prop, const char* v) { icalvalue *value; @@ -2811,7 +2854,7 @@ void icalproperty_set_url(icalproperty* prop, char* v) } -char* icalproperty_get_url(icalproperty* prop) +const char* icalproperty_get_url(icalproperty* prop) { icalvalue *value; icalerror_check_arg( (prop!=0),"prop"); @@ -2973,7 +3016,7 @@ struct icalrecurrencetype icalproperty_get_exrule(icalproperty* prop) /* QUERY */ -icalproperty* icalproperty_new_query(char* v) +icalproperty* icalproperty_new_query(const char* v) { struct icalproperty_impl *impl = icalproperty_new_impl(ICAL_QUERY_PROPERTY); icalerror_check_arg_rz( (v!=0),"v"); @@ -2984,7 +3027,7 @@ icalproperty* icalproperty_new_query(char* v) return (icalproperty*)impl; } -icalproperty* icalproperty_vanew_query(char* v, ...) +icalproperty* icalproperty_vanew_query(const char* v, ...) { va_list args; struct icalproperty_impl *impl = icalproperty_new_impl(ICAL_QUERY_PROPERTY); @@ -3000,7 +3043,7 @@ icalproperty* icalproperty_vanew_query(char* v, ...) return (icalproperty*)impl; } -void icalproperty_set_query(icalproperty* prop, char* v) +void icalproperty_set_query(icalproperty* prop, const char* v) { icalvalue *value; @@ -3014,7 +3057,7 @@ void icalproperty_set_query(icalproperty* prop, char* v) } -char* icalproperty_get_query(icalproperty* prop) +const char* icalproperty_get_query(icalproperty* prop) { icalvalue *value; icalerror_check_arg( (prop!=0),"prop"); @@ -3076,7 +3119,7 @@ int icalproperty_get_percentcomplete(icalproperty* prop) /* CALSCALE */ -icalproperty* icalproperty_new_calscale(char* v) +icalproperty* icalproperty_new_calscale(const char* v) { struct icalproperty_impl *impl = icalproperty_new_impl(ICAL_CALSCALE_PROPERTY); icalerror_check_arg_rz( (v!=0),"v"); @@ -3087,7 +3130,7 @@ icalproperty* icalproperty_new_calscale(char* v) return (icalproperty*)impl; } -icalproperty* icalproperty_vanew_calscale(char* v, ...) +icalproperty* icalproperty_vanew_calscale(const char* v, ...) { va_list args; struct icalproperty_impl *impl = icalproperty_new_impl(ICAL_CALSCALE_PROPERTY); @@ -3103,7 +3146,7 @@ icalproperty* icalproperty_vanew_calscale(char* v, ...) return (icalproperty*)impl; } -void icalproperty_set_calscale(icalproperty* prop, char* v) +void icalproperty_set_calscale(icalproperty* prop, const char* v) { icalvalue *value; @@ -3117,7 +3160,7 @@ void icalproperty_set_calscale(icalproperty* prop, char* v) } -char* icalproperty_get_calscale(icalproperty* prop) +const char* icalproperty_get_calscale(icalproperty* prop) { icalvalue *value; icalerror_check_arg( (prop!=0),"prop"); @@ -3229,7 +3272,7 @@ struct icalgeotype icalproperty_get_geo(icalproperty* prop) /* X-LIC-MIMECHARSET */ -icalproperty* icalproperty_new_xlicmimecharset(char* v) +icalproperty* icalproperty_new_xlicmimecharset(const char* v) { struct icalproperty_impl *impl = icalproperty_new_impl(ICAL_XLICMIMECHARSET_PROPERTY); icalerror_check_arg_rz( (v!=0),"v"); @@ -3240,7 +3283,7 @@ icalproperty* icalproperty_new_xlicmimecharset(char* v) return (icalproperty*)impl; } -icalproperty* icalproperty_vanew_xlicmimecharset(char* v, ...) +icalproperty* icalproperty_vanew_xlicmimecharset(const char* v, ...) { va_list args; struct icalproperty_impl *impl = icalproperty_new_impl(ICAL_XLICMIMECHARSET_PROPERTY); @@ -3256,7 +3299,7 @@ icalproperty* icalproperty_vanew_xlicmimecharset(char* v, ...) return (icalproperty*)impl; } -void icalproperty_set_xlicmimecharset(icalproperty* prop, char* v) +void icalproperty_set_xlicmimecharset(icalproperty* prop, const char* v) { icalvalue *value; @@ -3270,7 +3313,7 @@ void icalproperty_set_xlicmimecharset(icalproperty* prop, char* v) } -char* icalproperty_get_xlicmimecharset(icalproperty* prop) +const char* icalproperty_get_xlicmimecharset(icalproperty* prop) { icalvalue *value; icalerror_check_arg( (prop!=0),"prop"); @@ -3432,7 +3475,7 @@ struct icaltimetype icalproperty_get_due(icalproperty* prop) /* ACTION */ -icalproperty* icalproperty_new_action(char* v) +icalproperty* icalproperty_new_action(const char* v) { struct icalproperty_impl *impl = icalproperty_new_impl(ICAL_ACTION_PROPERTY); icalerror_check_arg_rz( (v!=0),"v"); @@ -3443,7 +3486,7 @@ icalproperty* icalproperty_new_action(char* v) return (icalproperty*)impl; } -icalproperty* icalproperty_vanew_action(char* v, ...) +icalproperty* icalproperty_vanew_action(const char* v, ...) { va_list args; struct icalproperty_impl *impl = icalproperty_new_impl(ICAL_ACTION_PROPERTY); @@ -3459,7 +3502,7 @@ icalproperty* icalproperty_vanew_action(char* v, ...) return (icalproperty*)impl; } -void icalproperty_set_action(icalproperty* prop, char* v) +void icalproperty_set_action(icalproperty* prop, const char* v) { icalvalue *value; @@ -3473,7 +3516,7 @@ void icalproperty_set_action(icalproperty* prop, char* v) } -char* icalproperty_get_action(icalproperty* prop) +const char* icalproperty_get_action(icalproperty* prop) { icalvalue *value; icalerror_check_arg( (prop!=0),"prop"); diff --git a/libical/src/libical/icalproperty.h b/libical/src/libical/icalproperty.h index 278c4d533f..633a48f148 100644 --- a/libical/src/libical/icalproperty.h +++ b/libical/src/libical/icalproperty.h @@ -13,6 +13,9 @@ #define ICALPROPERTY_H #include <time.h> +#include "icalparameter.h" +#include "icalvalue.h" +#include "icalrecur.h" typedef void icalproperty; @@ -30,6 +33,7 @@ icalproperty_kind icalproperty_isa(icalproperty* property); int icalproperty_isa_property(void* property); void icalproperty_add_parameter(icalproperty* prop,icalparameter* parameter); +void icalproperty_set_parameter(icalproperty* prop,icalparameter* parameter); void icalproperty_remove_parameter(icalproperty* prop, icalparameter_kind kind); @@ -59,10 +63,10 @@ void icalproperty_set_method(icalproperty* prop, icalproperty_method v); icalproperty_method icalproperty_get_method(icalproperty* prop); /* X-LIC-MIMECID */ -icalproperty* icalproperty_new_xlicmimecid(char* v); -icalproperty* icalproperty_vanew_xlicmimecid(char* v, ...); -void icalproperty_set_xlicmimecid(icalproperty* prop, char* v); -char* icalproperty_get_xlicmimecid(icalproperty* prop); +icalproperty* icalproperty_new_xlicmimecid(const char* v); +icalproperty* icalproperty_vanew_xlicmimecid(const char* v, ...); +void icalproperty_set_xlicmimecid(icalproperty* prop, const char* v); +const char* icalproperty_get_xlicmimecid(icalproperty* prop); /* LAST-MODIFIED */ icalproperty* icalproperty_new_lastmodified(struct icaltimetype v); @@ -71,28 +75,28 @@ void icalproperty_set_lastmodified(icalproperty* prop, struct icaltimetype v); struct icaltimetype icalproperty_get_lastmodified(icalproperty* prop); /* UID */ -icalproperty* icalproperty_new_uid(char* v); -icalproperty* icalproperty_vanew_uid(char* v, ...); -void icalproperty_set_uid(icalproperty* prop, char* v); -char* icalproperty_get_uid(icalproperty* prop); +icalproperty* icalproperty_new_uid(const char* v); +icalproperty* icalproperty_vanew_uid(const char* v, ...); +void icalproperty_set_uid(icalproperty* prop, const char* v); +const char* icalproperty_get_uid(icalproperty* prop); /* PRODID */ -icalproperty* icalproperty_new_prodid(char* v); -icalproperty* icalproperty_vanew_prodid(char* v, ...); -void icalproperty_set_prodid(icalproperty* prop, char* v); -char* icalproperty_get_prodid(icalproperty* prop); +icalproperty* icalproperty_new_prodid(const char* v); +icalproperty* icalproperty_vanew_prodid(const char* v, ...); +void icalproperty_set_prodid(icalproperty* prop, const char* v); +const char* icalproperty_get_prodid(icalproperty* prop); /* STATUS */ -icalproperty* icalproperty_new_status(char* v); -icalproperty* icalproperty_vanew_status(char* v, ...); -void icalproperty_set_status(icalproperty* prop, char* v); -char* icalproperty_get_status(icalproperty* prop); +icalproperty* icalproperty_new_status(icalproperty_status v); +icalproperty* icalproperty_vanew_status(icalproperty_status v, ...); +void icalproperty_set_status(icalproperty* prop, icalproperty_status v); +icalproperty_status icalproperty_get_status(icalproperty* prop); /* DESCRIPTION */ -icalproperty* icalproperty_new_description(char* v); -icalproperty* icalproperty_vanew_description(char* v, ...); -void icalproperty_set_description(icalproperty* prop, char* v); -char* icalproperty_get_description(icalproperty* prop); +icalproperty* icalproperty_new_description(const char* v); +icalproperty* icalproperty_vanew_description(const char* v, ...); +void icalproperty_set_description(icalproperty* prop, const char* v); +const char* icalproperty_get_description(icalproperty* prop); /* DURATION */ icalproperty* icalproperty_new_duration(struct icaldurationtype v); @@ -101,16 +105,16 @@ void icalproperty_set_duration(icalproperty* prop, struct icaldurationtype v); struct icaldurationtype icalproperty_get_duration(icalproperty* prop); /* CATEGORIES */ -icalproperty* icalproperty_new_categories(char* v); -icalproperty* icalproperty_vanew_categories(char* v, ...); -void icalproperty_set_categories(icalproperty* prop, char* v); -char* icalproperty_get_categories(icalproperty* prop); +icalproperty* icalproperty_new_categories(const char* v); +icalproperty* icalproperty_vanew_categories(const char* v, ...); +void icalproperty_set_categories(icalproperty* prop, const char* v); +const char* icalproperty_get_categories(icalproperty* prop); /* VERSION */ -icalproperty* icalproperty_new_version(char* v); -icalproperty* icalproperty_vanew_version(char* v, ...); -void icalproperty_set_version(icalproperty* prop, char* v); -char* icalproperty_get_version(icalproperty* prop); +icalproperty* icalproperty_new_version(const char* v); +icalproperty* icalproperty_vanew_version(const char* v, ...); +void icalproperty_set_version(icalproperty* prop, const char* v); +const char* icalproperty_get_version(icalproperty* prop); /* TZOFFSETFROM */ icalproperty* icalproperty_new_tzoffsetfrom(int v); @@ -125,52 +129,52 @@ void icalproperty_set_rrule(icalproperty* prop, struct icalrecurrencetype v); struct icalrecurrencetype icalproperty_get_rrule(icalproperty* prop); /* ATTENDEE */ -icalproperty* icalproperty_new_attendee(char* v); -icalproperty* icalproperty_vanew_attendee(char* v, ...); -void icalproperty_set_attendee(icalproperty* prop, char* v); -char* icalproperty_get_attendee(icalproperty* prop); +icalproperty* icalproperty_new_attendee(const char* v); +icalproperty* icalproperty_vanew_attendee(const char* v, ...); +void icalproperty_set_attendee(icalproperty* prop, const char* v); +const char* icalproperty_get_attendee(icalproperty* prop); /* CONTACT */ -icalproperty* icalproperty_new_contact(char* v); -icalproperty* icalproperty_vanew_contact(char* v, ...); -void icalproperty_set_contact(icalproperty* prop, char* v); -char* icalproperty_get_contact(icalproperty* prop); +icalproperty* icalproperty_new_contact(const char* v); +icalproperty* icalproperty_vanew_contact(const char* v, ...); +void icalproperty_set_contact(icalproperty* prop, const char* v); +const char* icalproperty_get_contact(icalproperty* prop); /* X-LIC-MIMECONTENTTYPE */ -icalproperty* icalproperty_new_xlicmimecontenttype(char* v); -icalproperty* icalproperty_vanew_xlicmimecontenttype(char* v, ...); -void icalproperty_set_xlicmimecontenttype(icalproperty* prop, char* v); -char* icalproperty_get_xlicmimecontenttype(icalproperty* prop); +icalproperty* icalproperty_new_xlicmimecontenttype(const char* v); +icalproperty* icalproperty_vanew_xlicmimecontenttype(const char* v, ...); +void icalproperty_set_xlicmimecontenttype(icalproperty* prop, const char* v); +const char* icalproperty_get_xlicmimecontenttype(icalproperty* prop); /* X-LIC-MIMEOPTINFO */ -icalproperty* icalproperty_new_xlicmimeoptinfo(char* v); -icalproperty* icalproperty_vanew_xlicmimeoptinfo(char* v, ...); -void icalproperty_set_xlicmimeoptinfo(icalproperty* prop, char* v); -char* icalproperty_get_xlicmimeoptinfo(icalproperty* prop); +icalproperty* icalproperty_new_xlicmimeoptinfo(const char* v); +icalproperty* icalproperty_vanew_xlicmimeoptinfo(const char* v, ...); +void icalproperty_set_xlicmimeoptinfo(icalproperty* prop, const char* v); +const char* icalproperty_get_xlicmimeoptinfo(icalproperty* prop); /* RELATED-TO */ -icalproperty* icalproperty_new_relatedto(char* v); -icalproperty* icalproperty_vanew_relatedto(char* v, ...); -void icalproperty_set_relatedto(icalproperty* prop, char* v); -char* icalproperty_get_relatedto(icalproperty* prop); +icalproperty* icalproperty_new_relatedto(const char* v); +icalproperty* icalproperty_vanew_relatedto(const char* v, ...); +void icalproperty_set_relatedto(icalproperty* prop, const char* v); +const char* icalproperty_get_relatedto(icalproperty* prop); /* ORGANIZER */ -icalproperty* icalproperty_new_organizer(char* v); -icalproperty* icalproperty_vanew_organizer(char* v, ...); -void icalproperty_set_organizer(icalproperty* prop, char* v); -char* icalproperty_get_organizer(icalproperty* prop); +icalproperty* icalproperty_new_organizer(const char* v); +icalproperty* icalproperty_vanew_organizer(const char* v, ...); +void icalproperty_set_organizer(icalproperty* prop, const char* v); +const char* icalproperty_get_organizer(icalproperty* prop); /* COMMENT */ -icalproperty* icalproperty_new_comment(char* v); -icalproperty* icalproperty_vanew_comment(char* v, ...); -void icalproperty_set_comment(icalproperty* prop, char* v); -char* icalproperty_get_comment(icalproperty* prop); +icalproperty* icalproperty_new_comment(const char* v); +icalproperty* icalproperty_vanew_comment(const char* v, ...); +void icalproperty_set_comment(icalproperty* prop, const char* v); +const char* icalproperty_get_comment(icalproperty* prop); /* X-LIC-ERROR */ -icalproperty* icalproperty_new_xlicerror(char* v); -icalproperty* icalproperty_vanew_xlicerror(char* v, ...); -void icalproperty_set_xlicerror(icalproperty* prop, char* v); -char* icalproperty_get_xlicerror(icalproperty* prop); +icalproperty* icalproperty_new_xlicerror(const char* v); +icalproperty* icalproperty_vanew_xlicerror(const char* v, ...); +void icalproperty_set_xlicerror(icalproperty* prop, const char* v); +const char* icalproperty_get_xlicerror(icalproperty* prop); /* TRIGGER */ icalproperty* icalproperty_new_trigger(union icaltriggertype v); @@ -179,16 +183,16 @@ void icalproperty_set_trigger(icalproperty* prop, union icaltriggertype v); union icaltriggertype icalproperty_get_trigger(icalproperty* prop); /* CLASS */ -icalproperty* icalproperty_new_class(char* v); -icalproperty* icalproperty_vanew_class(char* v, ...); -void icalproperty_set_class(icalproperty* prop, char* v); -char* icalproperty_get_class(icalproperty* prop); +icalproperty* icalproperty_new_class(const char* v); +icalproperty* icalproperty_vanew_class(const char* v, ...); +void icalproperty_set_class(icalproperty* prop, const char* v); +const char* icalproperty_get_class(icalproperty* prop); /* X */ -icalproperty* icalproperty_new_x(char* v); -icalproperty* icalproperty_vanew_x(char* v, ...); -void icalproperty_set_x(icalproperty* prop, char* v); -char* icalproperty_get_x(icalproperty* prop); +icalproperty* icalproperty_new_x(const char* v); +icalproperty* icalproperty_vanew_x(const char* v, ...); +void icalproperty_set_x(icalproperty* prop, const char* v); +const char* icalproperty_get_x(icalproperty* prop); /* TZOFFSETTO */ icalproperty* icalproperty_new_tzoffsetto(int v); @@ -197,16 +201,16 @@ void icalproperty_set_tzoffsetto(icalproperty* prop, int v); int icalproperty_get_tzoffsetto(icalproperty* prop); /* TRANSP */ -icalproperty* icalproperty_new_transp(char* v); -icalproperty* icalproperty_vanew_transp(char* v, ...); -void icalproperty_set_transp(icalproperty* prop, char* v); -char* icalproperty_get_transp(icalproperty* prop); +icalproperty* icalproperty_new_transp(const char* v); +icalproperty* icalproperty_vanew_transp(const char* v, ...); +void icalproperty_set_transp(icalproperty* prop, const char* v); +const char* icalproperty_get_transp(icalproperty* prop); /* X-LIC-MIMEENCODING */ -icalproperty* icalproperty_new_xlicmimeencoding(char* v); -icalproperty* icalproperty_vanew_xlicmimeencoding(char* v, ...); -void icalproperty_set_xlicmimeencoding(icalproperty* prop, char* v); -char* icalproperty_get_xlicmimeencoding(icalproperty* prop); +icalproperty* icalproperty_new_xlicmimeencoding(const char* v); +icalproperty* icalproperty_vanew_xlicmimeencoding(const char* v, ...); +void icalproperty_set_xlicmimeencoding(icalproperty* prop, const char* v); +const char* icalproperty_get_xlicmimeencoding(icalproperty* prop); /* SEQUENCE */ icalproperty* icalproperty_new_sequence(int v); @@ -215,16 +219,16 @@ void icalproperty_set_sequence(icalproperty* prop, int v); int icalproperty_get_sequence(icalproperty* prop); /* LOCATION */ -icalproperty* icalproperty_new_location(char* v); -icalproperty* icalproperty_vanew_location(char* v, ...); -void icalproperty_set_location(icalproperty* prop, char* v); -char* icalproperty_get_location(icalproperty* prop); +icalproperty* icalproperty_new_location(const char* v); +icalproperty* icalproperty_vanew_location(const char* v, ...); +void icalproperty_set_location(icalproperty* prop, const char* v); +const char* icalproperty_get_location(icalproperty* prop); /* REQUEST-STATUS */ -icalproperty* icalproperty_new_requeststatus(char* v); -icalproperty* icalproperty_vanew_requeststatus(char* v, ...); -void icalproperty_set_requeststatus(icalproperty* prop, char* v); -char* icalproperty_get_requeststatus(icalproperty* prop); +icalproperty* icalproperty_new_requeststatus(const char* v); +icalproperty* icalproperty_vanew_requeststatus(const char* v, ...); +void icalproperty_set_requeststatus(icalproperty* prop, const char* v); +const char* icalproperty_get_requeststatus(icalproperty* prop); /* EXDATE */ icalproperty* icalproperty_new_exdate(struct icaltimetype v); @@ -233,22 +237,22 @@ void icalproperty_set_exdate(icalproperty* prop, struct icaltimetype v); struct icaltimetype icalproperty_get_exdate(icalproperty* prop); /* TZID */ -icalproperty* icalproperty_new_tzid(char* v); -icalproperty* icalproperty_vanew_tzid(char* v, ...); -void icalproperty_set_tzid(icalproperty* prop, char* v); -char* icalproperty_get_tzid(icalproperty* prop); +icalproperty* icalproperty_new_tzid(const char* v); +icalproperty* icalproperty_vanew_tzid(const char* v, ...); +void icalproperty_set_tzid(icalproperty* prop, const char* v); +const char* icalproperty_get_tzid(icalproperty* prop); /* RESOURCES */ -icalproperty* icalproperty_new_resources(char* v); -icalproperty* icalproperty_vanew_resources(char* v, ...); -void icalproperty_set_resources(icalproperty* prop, char* v); -char* icalproperty_get_resources(icalproperty* prop); +icalproperty* icalproperty_new_resources(const char* v); +icalproperty* icalproperty_vanew_resources(const char* v, ...); +void icalproperty_set_resources(icalproperty* prop, const char* v); +const char* icalproperty_get_resources(icalproperty* prop); /* TZURL */ -icalproperty* icalproperty_new_tzurl(char* v); -icalproperty* icalproperty_vanew_tzurl(char* v, ...); -void icalproperty_set_tzurl(icalproperty* prop, char* v); -char* icalproperty_get_tzurl(icalproperty* prop); +icalproperty* icalproperty_new_tzurl(const char* v); +icalproperty* icalproperty_vanew_tzurl(const char* v, ...); +void icalproperty_set_tzurl(icalproperty* prop, const char* v); +const char* icalproperty_get_tzurl(icalproperty* prop); /* REPEAT */ icalproperty* icalproperty_new_repeat(int v); @@ -281,10 +285,10 @@ void icalproperty_set_recurrenceid(icalproperty* prop, struct icaltimetype v); struct icaltimetype icalproperty_get_recurrenceid(icalproperty* prop); /* SUMMARY */ -icalproperty* icalproperty_new_summary(char* v); -icalproperty* icalproperty_vanew_summary(char* v, ...); -void icalproperty_set_summary(icalproperty* prop, char* v); -char* icalproperty_get_summary(icalproperty* prop); +icalproperty* icalproperty_new_summary(const char* v); +icalproperty* icalproperty_vanew_summary(const char* v, ...); +void icalproperty_set_summary(icalproperty* prop, const char* v); +const char* icalproperty_get_summary(icalproperty* prop); /* DTEND */ icalproperty* icalproperty_new_dtend(struct icaltimetype v); @@ -293,10 +297,10 @@ void icalproperty_set_dtend(icalproperty* prop, struct icaltimetype v); struct icaltimetype icalproperty_get_dtend(icalproperty* prop); /* TZNAME */ -icalproperty* icalproperty_new_tzname(char* v); -icalproperty* icalproperty_vanew_tzname(char* v, ...); -void icalproperty_set_tzname(icalproperty* prop, char* v); -char* icalproperty_get_tzname(icalproperty* prop); +icalproperty* icalproperty_new_tzname(const char* v); +icalproperty* icalproperty_vanew_tzname(const char* v, ...); +void icalproperty_set_tzname(icalproperty* prop, const char* v); +const char* icalproperty_get_tzname(icalproperty* prop); /* RDATE */ icalproperty* icalproperty_new_rdate(struct icalperiodtype v); @@ -305,16 +309,16 @@ void icalproperty_set_rdate(icalproperty* prop, struct icalperiodtype v); struct icalperiodtype icalproperty_get_rdate(icalproperty* prop); /* X-LIC-MIMEFILENAME */ -icalproperty* icalproperty_new_xlicmimefilename(char* v); -icalproperty* icalproperty_vanew_xlicmimefilename(char* v, ...); -void icalproperty_set_xlicmimefilename(icalproperty* prop, char* v); -char* icalproperty_get_xlicmimefilename(icalproperty* prop); +icalproperty* icalproperty_new_xlicmimefilename(const char* v); +icalproperty* icalproperty_vanew_xlicmimefilename(const char* v, ...); +void icalproperty_set_xlicmimefilename(icalproperty* prop, const char* v); +const char* icalproperty_get_xlicmimefilename(icalproperty* prop); /* URL */ -icalproperty* icalproperty_new_url(char* v); -icalproperty* icalproperty_vanew_url(char* v, ...); -void icalproperty_set_url(icalproperty* prop, char* v); -char* icalproperty_get_url(icalproperty* prop); +icalproperty* icalproperty_new_url(const char* v); +icalproperty* icalproperty_vanew_url(const char* v, ...); +void icalproperty_set_url(icalproperty* prop, const char* v); +const char* icalproperty_get_url(icalproperty* prop); /* X-LIC-CLUSTERCOUNT */ icalproperty* icalproperty_new_xlicclustercount(int v); @@ -335,10 +339,10 @@ void icalproperty_set_exrule(icalproperty* prop, struct icalrecurrencetype v); struct icalrecurrencetype icalproperty_get_exrule(icalproperty* prop); /* QUERY */ -icalproperty* icalproperty_new_query(char* v); -icalproperty* icalproperty_vanew_query(char* v, ...); -void icalproperty_set_query(icalproperty* prop, char* v); -char* icalproperty_get_query(icalproperty* prop); +icalproperty* icalproperty_new_query(const char* v); +icalproperty* icalproperty_vanew_query(const char* v, ...); +void icalproperty_set_query(icalproperty* prop, const char* v); +const char* icalproperty_get_query(icalproperty* prop); /* PERCENT-COMPLETE */ icalproperty* icalproperty_new_percentcomplete(int v); @@ -347,10 +351,10 @@ void icalproperty_set_percentcomplete(icalproperty* prop, int v); int icalproperty_get_percentcomplete(icalproperty* prop); /* CALSCALE */ -icalproperty* icalproperty_new_calscale(char* v); -icalproperty* icalproperty_vanew_calscale(char* v, ...); -void icalproperty_set_calscale(icalproperty* prop, char* v); -char* icalproperty_get_calscale(icalproperty* prop); +icalproperty* icalproperty_new_calscale(const char* v); +icalproperty* icalproperty_vanew_calscale(const char* v, ...); +void icalproperty_set_calscale(icalproperty* prop, const char* v); +const char* icalproperty_get_calscale(icalproperty* prop); /* CREATED */ icalproperty* icalproperty_new_created(struct icaltimetype v); @@ -365,10 +369,10 @@ void icalproperty_set_geo(icalproperty* prop, struct icalgeotype v); struct icalgeotype icalproperty_get_geo(icalproperty* prop); /* X-LIC-MIMECHARSET */ -icalproperty* icalproperty_new_xlicmimecharset(char* v); -icalproperty* icalproperty_vanew_xlicmimecharset(char* v, ...); -void icalproperty_set_xlicmimecharset(icalproperty* prop, char* v); -char* icalproperty_get_xlicmimecharset(icalproperty* prop); +icalproperty* icalproperty_new_xlicmimecharset(const char* v); +icalproperty* icalproperty_vanew_xlicmimecharset(const char* v, ...); +void icalproperty_set_xlicmimecharset(icalproperty* prop, const char* v); +const char* icalproperty_get_xlicmimecharset(icalproperty* prop); /* COMPLETED */ icalproperty* icalproperty_new_completed(struct icaltimetype v); @@ -389,8 +393,8 @@ void icalproperty_set_due(icalproperty* prop, struct icaltimetype v); struct icaltimetype icalproperty_get_due(icalproperty* prop); /* ACTION */ -icalproperty* icalproperty_new_action(char* v); -icalproperty* icalproperty_vanew_action(char* v, ...); -void icalproperty_set_action(icalproperty* prop, char* v); -char* icalproperty_get_action(icalproperty* prop); -#endif ICALPROPERTY_H +icalproperty* icalproperty_new_action(const char* v); +icalproperty* icalproperty_vanew_action(const char* v, ...); +void icalproperty_set_action(icalproperty* prop, const char* v); +const char* icalproperty_get_action(icalproperty* prop); +#endif /*ICALPROPERTY_H*/ diff --git a/libical/src/libical/icalrestriction.c b/libical/src/libical/icalrestriction.c index be0e292d28..8607c3adab 100644 --- a/libical/src/libical/icalrestriction.c +++ b/libical/src/libical/icalrestriction.c @@ -4,20 +4,29 @@ (C) COPYRIGHT 2000, Eric Busboom, http://www.softwarestudio.org ======================================================================*/ +/*#line 7 "icalrestriction.c.in"*/ #ifdef HAVE_CONFIG_H -#include "config.h" +#include <config.h> #endif -#include "icalenums.h" #include "icalrestriction.h" +#include "icalenums.h" +#include "icalerror.h" + +#include <assert.h> +#include <stdio.h> /* For snprintf */ #define TMP_BUF_SIZE 1024 + /* Define the structs for the restrictions. these data are filled out in machine generated code below */ -typedef int (*restriction_func)(icalcomponent* comp); +struct icalrestriction_property_record; + +typedef char* (*restriction_func)(struct icalrestriction_property_record* rec,icalcomponent* comp,icalproperty* prop); + typedef struct icalrestriction_property_record { icalproperty_method method; @@ -36,9 +45,22 @@ typedef struct icalrestriction_component_record { restriction_func function; } icalrestriction_component_record; +icalrestriction_property_record* +icalrestriction_get_property_restriction(icalproperty_method method, + icalcomponent_kind component, + icalproperty_kind property); +icalrestriction_component_record* +icalrestriction_get_component_restriction(icalproperty_method method, + icalcomponent_kind component, + icalcomponent_kind subcomponent); + icalrestriction_component_record icalrestriction_component_records[]; icalrestriction_property_record icalrestriction_property_records[]; +icalrestriction_property_record null_prop_record = {ICAL_METHOD_NONE,ICAL_NO_COMPONENT,ICAL_NO_PROPERTY,ICAL_RESTRICTION_UNKNOWN,0}; +icalrestriction_component_record null_comp_record = {ICAL_METHOD_NONE,ICAL_NO_COMPONENT,ICAL_NO_COMPONENT,ICAL_RESTRICTION_UNKNOWN,0}; + + /* The each row gives the result of comparing a restriction against a count. The columns in each row represent 0,1,2+. '-1' indicates 'invalid, 'don't care' or 'needs more analysis' So, for @@ -86,22 +108,173 @@ icalrestriction_compare(icalrestriction_kind restr, int count){ } -int icalrestriction_check_mutual(icalcomponent *comp){ - /* HACK. This function does nothing */ - return 1; +/* Special case routines */ + +char* icalrestriction_may_be_draft_final_canceled( + icalrestriction_property_record *rec, + icalcomponent* comp, + icalproperty* prop) +{ + + icalproperty_status stat = icalproperty_get_status(prop); + + if( !( stat == ICAL_STATUS_DRAFT || + stat == ICAL_STATUS_FINAL || + stat == ICAL_STATUS_CANCELLED )){ + + return "Failed iTIP restrictions for STATUS property. Value must be one of DRAFT, FINAL, or CANCELED"; + + } + + return 0; } -int icalrestriction_check_exclusive(icalcomponent *comp){ - /* HACK. This function does nothing */ - return 1; +char* icalrestriction_may_be_comp_need_process( + icalrestriction_property_record *rec, + icalcomponent* comp, + icalproperty* prop) +{ + icalproperty_status stat = icalproperty_get_status(prop); + + if( !( stat == ICAL_STATUS_COMPLETED || + stat == ICAL_STATUS_NEEDSACTION || + stat == ICAL_STATUS_INPROCESS )){ + + return "Failed iTIP restrictions for STATUS property. Value must be one of COMPLETED, NEEDS-ACTION or IN-PROCESS"; + + } + + return 0; +} +char* icalrestriction_may_be_tent_conf(icalrestriction_property_record *rec, + icalcomponent* comp, + icalproperty* prop){ + icalproperty_status stat = icalproperty_get_status(prop); + + if( !( stat == ICAL_STATUS_TENTATIVE || + stat == ICAL_STATUS_CONFIRMED )){ + + return "Failed iTIP restrictions for STATUS property. Value must be one of TENTATIVE or CONFIRMED"; + + } + + return 0; +} +char* icalrestriction_may_be_tent_conf_cancel( + icalrestriction_property_record *rec, + icalcomponent* comp, + icalproperty* prop) +{ + icalproperty_status stat = icalproperty_get_status(prop); + + if( !( stat == ICAL_STATUS_TENTATIVE || + stat == ICAL_STATUS_CONFIRMED || + stat == ICAL_STATUS_CANCELLED )){ + + return "Failed iTIP restrictions for STATUS property. Value must be one of TENTATIVE, CONFIRMED or CANCELED"; + + } + + return 0; +} + +char* icalrestriction_must_be_cancel_if_present( + icalrestriction_property_record *rec, + icalcomponent* comp, + icalproperty* prop) +{ + /* This routine will not be called if prop == 0 */ + icalproperty_status stat = icalproperty_get_status(prop); + + if( stat != ICAL_STATUS_CANCELLED) + { + return "Failed iTIP restrictions for STATUS property. Value must be CANCELLED"; + + } + + + return 0; } +char* icalrestriction_must_be_canceled_no_attendee( + icalrestriction_property_record *rec, + icalcomponent* comp, + icalproperty* prop) +{ + + /* Hack. see rfc2446, 3.2.5 CANCEL for porperty STATUS. I don't + understand the note */ + + return 0; +} +char* icalrestriction_must_be_recurring(icalrestriction_property_record *rec, + icalcomponent* comp, + icalproperty* prop){ + /* Hack */ + return 0; +} +char* icalrestriction_must_have_duration(icalrestriction_property_record *rec, + icalcomponent* comp, + icalproperty* prop){ + + if( !icalcomponent_get_first_property(comp,ICAL_DURATION_PROPERTY)){ + + return "Failed iTIP restrictions for STATUS property. This component must have a DURATION property"; + + } + + return 0; +} +char* icalrestriction_must_have_repeat(icalrestriction_property_record *rec, + icalcomponent* comp, + icalproperty* prop){ + if( !icalcomponent_get_first_property(comp,ICAL_REPEAT_PROPERTY)){ + + return "Failed iTIP restrictions for STATUS property. This component must have a REPEAT property"; + + } + + return 0; +} +char* icalrestriction_must_if_tz_ref(icalrestriction_property_record *rec, + icalcomponent* comp, + icalproperty* prop){ + + /* Hack */ + return 0; +} +char* icalrestriction_no_dtend(icalrestriction_property_record *rec, + icalcomponent* comp, + icalproperty* prop){ + + if( icalcomponent_get_first_property(comp,ICAL_DTEND_PROPERTY)){ + + return "Failed iTIP restrictions for DTEND property. The component must not have both DURATION and DTEND"; + + } + + return 0; +} +char* icalrestriction_no_duration(icalrestriction_property_record *rec, + icalcomponent* comp, + icalproperty* prop){ + + /* _no_dtend takes care of this one */ + return 0; +} + + int icalrestriction_check_component(icalproperty_method method, icalcomponent* comp) { icalproperty_kind kind; icalcomponent_kind comp_kind; icalrestriction_kind restr; + icalrestriction_property_record *prop_record; + icalrestriction_component_record *comp_record; + char* funcr = 0; + icalproperty *prop; + int count; int compare; int valid = 1; @@ -113,30 +286,30 @@ int icalrestriction_check_component(icalproperty_method method, for(kind = ICAL_ANY_PROPERTY+1; kind != ICAL_NO_PROPERTY; kind++){ count = icalcomponent_count_properties(comp, kind); - restr = icalrestriction_get_property_restriction(method, + prop_record = icalrestriction_get_property_restriction(method, comp_kind, kind); + restr = prop_record->restriction; - if(restr == ICAL_RESTRICTION_ONEEXCLUSIVE ) { - /* HACK. Treat this as a 0/1 restriction */ - restr = ICAL_RESTRICTION_ZEROORONE; - compare = icalrestriction_compare(restr,count); - } else if (restr == ICAL_RESTRICTION_ONEMUTUAL ) { - /* HACK. Treat this as a 0/1 restriction */ + if(restr == ICAL_RESTRICTION_ONEEXCLUSIVE || + restr == ICAL_RESTRICTION_ONEMUTUAL) { + + /* First treat is as a 0/1 restriction */ restr = ICAL_RESTRICTION_ZEROORONE; compare = icalrestriction_compare(restr,count); + } else { + compare = icalrestriction_compare(restr,count); } assert(compare != -1); - if (compare == 0){ char temp[TMP_BUF_SIZE]; - snprintf(temp, TMP_BUF_SIZE,"Failed iTIP restrictions for property %s. Expected %s instances of the property and got %d", + snprintf(temp, TMP_BUF_SIZE,"Failed iTIP restrictions for %s property. Expected %s instances of the property and got %d", icalenum_property_kind_to_string(kind), restr_string_map[restr], count); @@ -149,6 +322,25 @@ int icalrestriction_check_component(icalproperty_method method, } + prop = icalcomponent_get_first_property(comp, kind); + + if (prop != 0 && prop_record->function !=0 ){ + funcr = prop_record->function(prop_record,comp,prop); + } + + if(funcr !=0){ + icalcomponent_add_property + (comp, + icalproperty_vanew_xlicerror( + funcr, + icalparameter_new_xlicerrortype( + ICAL_XLICERRORTYPE_INVALIDITIP), + 0)); + + compare = 0; + funcr = 0; + } + valid = valid && compare; } @@ -210,7 +402,7 @@ int icalrestriction_check(icalcomponent* outer_comp) } -icalrestriction_kind +icalrestriction_property_record* icalrestriction_get_property_restriction(icalproperty_method method, icalcomponent_kind component, icalproperty_kind property) @@ -224,19 +416,20 @@ icalrestriction_get_property_restriction(icalproperty_method method, if (method == icalrestriction_property_records[i].method && component == icalrestriction_property_records[i].component && property == icalrestriction_property_records[i].property ){ - return icalrestriction_property_records[i].restriction; + return &icalrestriction_property_records[i]; } } - return ICAL_RESTRICTION_UNKNOWN; + return &null_prop_record; } -icalrestriction_kind + +icalrestriction_component_record* icalrestriction_get_component_restriction(icalproperty_method method, icalcomponent_kind component, icalcomponent_kind subcomponent) { - + int i; for(i = 0; @@ -246,11 +439,11 @@ icalrestriction_get_component_restriction(icalproperty_method method, if (method == icalrestriction_component_records[i].method && component == icalrestriction_component_records[i].component && subcomponent == icalrestriction_component_records[i].subcomponent ){ - return icalrestriction_component_records[i].restriction; + return &icalrestriction_component_records[i]; } } - return ICAL_RESTRICTION_UNKNOWN; + return &null_comp_record; } /* Everything below this line is machine generated. Do not edit. */ @@ -260,7 +453,7 @@ icalrestriction_property_record icalrestriction_property_records[] = { {ICAL_METHOD_PUBLISH,ICAL_VEVENT_COMPONENT,ICAL_ORGANIZER_PROPERTY,ICAL_RESTRICTION_ONE,0}, {ICAL_METHOD_PUBLISH,ICAL_VEVENT_COMPONENT,ICAL_SUMMARY_PROPERTY,ICAL_RESTRICTION_ONE,0}, {ICAL_METHOD_PUBLISH,ICAL_VEVENT_COMPONENT,ICAL_UID_PROPERTY,ICAL_RESTRICTION_ONE,0}, - {ICAL_METHOD_PUBLISH,ICAL_VEVENT_COMPONENT,ICAL_RECURRENCEID_PROPERTY,ICAL_RESTRICTION_ZEROORONE,0}, + {ICAL_METHOD_PUBLISH,ICAL_VEVENT_COMPONENT,ICAL_RECURRENCEID_PROPERTY,ICAL_RESTRICTION_ZEROORONE,icalrestriction_must_be_recurring}, {ICAL_METHOD_PUBLISH,ICAL_VEVENT_COMPONENT,ICAL_SEQUENCE_PROPERTY,ICAL_RESTRICTION_ZEROORONE,0}, {ICAL_METHOD_PUBLISH,ICAL_VEVENT_COMPONENT,ICAL_ATTACH_PROPERTY,ICAL_RESTRICTION_ZEROPLUS,0}, {ICAL_METHOD_PUBLISH,ICAL_VEVENT_COMPONENT,ICAL_CATEGORIES_PROPERTY,ICAL_RESTRICTION_ZEROPLUS ,0}, @@ -281,7 +474,7 @@ icalrestriction_property_record icalrestriction_property_records[] = { {ICAL_METHOD_PUBLISH,ICAL_VEVENT_COMPONENT,ICAL_RELATEDTO_PROPERTY,ICAL_RESTRICTION_ZEROPLUS,0}, {ICAL_METHOD_PUBLISH,ICAL_VEVENT_COMPONENT,ICAL_RESOURCES_PROPERTY,ICAL_RESTRICTION_ZEROORONE,0}, {ICAL_METHOD_PUBLISH,ICAL_VEVENT_COMPONENT,ICAL_RRULE_PROPERTY,ICAL_RESTRICTION_ZEROPLUS,0}, - {ICAL_METHOD_PUBLISH,ICAL_VEVENT_COMPONENT,ICAL_STATUS_PROPERTY,ICAL_RESTRICTION_ZEROORONE,0}, + {ICAL_METHOD_PUBLISH,ICAL_VEVENT_COMPONENT,ICAL_STATUS_PROPERTY,ICAL_RESTRICTION_ZEROORONE,icalrestriction_may_be_tent_conf_cancel}, {ICAL_METHOD_PUBLISH,ICAL_VEVENT_COMPONENT,ICAL_TRANSP_PROPERTY,ICAL_RESTRICTION_ZEROORONE,0}, {ICAL_METHOD_PUBLISH,ICAL_VEVENT_COMPONENT,ICAL_URL_PROPERTY,ICAL_RESTRICTION_ZEROORONE,0}, {ICAL_METHOD_PUBLISH,ICAL_VEVENT_COMPONENT,ICAL_X_PROPERTY,ICAL_RESTRICTION_ZEROPLUS,0}, @@ -301,8 +494,8 @@ icalrestriction_property_record icalrestriction_property_records[] = { {ICAL_METHOD_REQUEST,ICAL_VEVENT_COMPONENT,ICAL_CONTACT_PROPERTY,ICAL_RESTRICTION_ZEROPLUS,0}, {ICAL_METHOD_REQUEST,ICAL_VEVENT_COMPONENT,ICAL_CREATED_PROPERTY,ICAL_RESTRICTION_ZEROORONE,0}, {ICAL_METHOD_REQUEST,ICAL_VEVENT_COMPONENT,ICAL_DESCRIPTION_PROPERTY,ICAL_RESTRICTION_ZEROORONE,0}, - {ICAL_METHOD_REQUEST,ICAL_VEVENT_COMPONENT,ICAL_DTEND_PROPERTY,ICAL_RESTRICTION_ONEEXCLUSIVE,icalrestriction_check_exclusive}, - {ICAL_METHOD_REQUEST,ICAL_VEVENT_COMPONENT,ICAL_DURATION_PROPERTY,ICAL_RESTRICTION_ONEEXCLUSIVE,icalrestriction_check_exclusive}, + {ICAL_METHOD_REQUEST,ICAL_VEVENT_COMPONENT,ICAL_DTEND_PROPERTY,ICAL_RESTRICTION_ONEEXCLUSIVE,icalrestriction_no_duration}, + {ICAL_METHOD_REQUEST,ICAL_VEVENT_COMPONENT,ICAL_DURATION_PROPERTY,ICAL_RESTRICTION_ONEEXCLUSIVE,icalrestriction_no_dtend}, {ICAL_METHOD_REQUEST,ICAL_VEVENT_COMPONENT,ICAL_EXDATE_PROPERTY,ICAL_RESTRICTION_ZEROPLUS,0}, {ICAL_METHOD_REQUEST,ICAL_VEVENT_COMPONENT,ICAL_EXRULE_PROPERTY,ICAL_RESTRICTION_ZEROPLUS,0}, {ICAL_METHOD_REQUEST,ICAL_VEVENT_COMPONENT,ICAL_GEO_PROPERTY,ICAL_RESTRICTION_ZEROORONE,0}, @@ -310,19 +503,19 @@ icalrestriction_property_record icalrestriction_property_records[] = { {ICAL_METHOD_REQUEST,ICAL_VEVENT_COMPONENT,ICAL_LOCATION_PROPERTY,ICAL_RESTRICTION_ZEROORONE,0}, {ICAL_METHOD_REQUEST,ICAL_VEVENT_COMPONENT,ICAL_PRIORITY_PROPERTY,ICAL_RESTRICTION_ZEROORONE,0}, {ICAL_METHOD_REQUEST,ICAL_VEVENT_COMPONENT,ICAL_RDATE_PROPERTY,ICAL_RESTRICTION_ZEROPLUS,0}, - {ICAL_METHOD_REQUEST,ICAL_VEVENT_COMPONENT,ICAL_RECURRENCEID_PROPERTY,ICAL_RESTRICTION_ZEROORONE,0}, + {ICAL_METHOD_REQUEST,ICAL_VEVENT_COMPONENT,ICAL_RECURRENCEID_PROPERTY,ICAL_RESTRICTION_ZEROORONE,icalrestriction_must_be_recurring}, {ICAL_METHOD_REQUEST,ICAL_VEVENT_COMPONENT,ICAL_RELATEDTO_PROPERTY,ICAL_RESTRICTION_ZEROPLUS,0}, {ICAL_METHOD_REQUEST,ICAL_VEVENT_COMPONENT,ICAL_REQUESTSTATUS_PROPERTY,ICAL_RESTRICTION_ZEROPLUS,0}, {ICAL_METHOD_REQUEST,ICAL_VEVENT_COMPONENT,ICAL_RESOURCES_PROPERTY,ICAL_RESTRICTION_ZEROORONE,0}, {ICAL_METHOD_REQUEST,ICAL_VEVENT_COMPONENT,ICAL_RRULE_PROPERTY,ICAL_RESTRICTION_ZEROPLUS,0}, - {ICAL_METHOD_REQUEST,ICAL_VEVENT_COMPONENT,ICAL_STATUS_PROPERTY,ICAL_RESTRICTION_ZEROORONE,0}, + {ICAL_METHOD_REQUEST,ICAL_VEVENT_COMPONENT,ICAL_STATUS_PROPERTY,ICAL_RESTRICTION_ZEROORONE,icalrestriction_may_be_tent_conf}, {ICAL_METHOD_REQUEST,ICAL_VEVENT_COMPONENT,ICAL_TRANSP_PROPERTY,ICAL_RESTRICTION_ZEROORONE,0}, {ICAL_METHOD_REQUEST,ICAL_VEVENT_COMPONENT,ICAL_URL_PROPERTY,ICAL_RESTRICTION_ZEROORONE,0}, {ICAL_METHOD_REQUEST,ICAL_VEVENT_COMPONENT,ICAL_X_PROPERTY,ICAL_RESTRICTION_ZEROPLUS,0}, {ICAL_METHOD_REPLY,ICAL_VEVENT_COMPONENT,ICAL_ATTENDEE_PROPERTY,ICAL_RESTRICTION_ONE,0}, {ICAL_METHOD_REPLY,ICAL_VEVENT_COMPONENT,ICAL_DTSTAMP_PROPERTY,ICAL_RESTRICTION_ONE,0}, {ICAL_METHOD_REPLY,ICAL_VEVENT_COMPONENT,ICAL_ORGANIZER_PROPERTY,ICAL_RESTRICTION_ONE,0}, - {ICAL_METHOD_REPLY,ICAL_VEVENT_COMPONENT,ICAL_RECURRENCEID_PROPERTY,ICAL_RESTRICTION_ZEROORONE,0}, + {ICAL_METHOD_REPLY,ICAL_VEVENT_COMPONENT,ICAL_RECURRENCEID_PROPERTY,ICAL_RESTRICTION_ZEROORONE,icalrestriction_must_be_recurring}, {ICAL_METHOD_REPLY,ICAL_VEVENT_COMPONENT,ICAL_UID_PROPERTY,ICAL_RESTRICTION_ONE,0}, {ICAL_METHOD_REPLY,ICAL_VEVENT_COMPONENT,ICAL_SEQUENCE_PROPERTY,ICAL_RESTRICTION_ZEROORONE,0}, {ICAL_METHOD_REPLY,ICAL_VEVENT_COMPONENT,ICAL_ATTACH_PROPERTY,ICAL_RESTRICTION_ZEROPLUS,0}, @@ -332,9 +525,9 @@ icalrestriction_property_record icalrestriction_property_records[] = { {ICAL_METHOD_REPLY,ICAL_VEVENT_COMPONENT,ICAL_CONTACT_PROPERTY,ICAL_RESTRICTION_ZEROPLUS,0}, {ICAL_METHOD_REPLY,ICAL_VEVENT_COMPONENT,ICAL_CREATED_PROPERTY,ICAL_RESTRICTION_ZEROORONE,0}, {ICAL_METHOD_REPLY,ICAL_VEVENT_COMPONENT,ICAL_DESCRIPTION_PROPERTY,ICAL_RESTRICTION_ZEROORONE,0}, - {ICAL_METHOD_REPLY,ICAL_VEVENT_COMPONENT,ICAL_DTEND_PROPERTY,ICAL_RESTRICTION_ONEEXCLUSIVE,icalrestriction_check_exclusive}, + {ICAL_METHOD_REPLY,ICAL_VEVENT_COMPONENT,ICAL_DTEND_PROPERTY,ICAL_RESTRICTION_ONEEXCLUSIVE,icalrestriction_no_duration}, {ICAL_METHOD_REPLY,ICAL_VEVENT_COMPONENT,ICAL_DTSTART_PROPERTY,ICAL_RESTRICTION_ZEROORONE,0}, - {ICAL_METHOD_REPLY,ICAL_VEVENT_COMPONENT,ICAL_DURATION_PROPERTY,ICAL_RESTRICTION_ONEEXCLUSIVE,icalrestriction_check_exclusive}, + {ICAL_METHOD_REPLY,ICAL_VEVENT_COMPONENT,ICAL_DURATION_PROPERTY,ICAL_RESTRICTION_ONEEXCLUSIVE,icalrestriction_no_dtend}, {ICAL_METHOD_REPLY,ICAL_VEVENT_COMPONENT,ICAL_EXDATE_PROPERTY,ICAL_RESTRICTION_ZEROPLUS,0}, {ICAL_METHOD_REPLY,ICAL_VEVENT_COMPONENT,ICAL_EXRULE_PROPERTY,ICAL_RESTRICTION_ZEROPLUS,0}, {ICAL_METHOD_REPLY,ICAL_VEVENT_COMPONENT,ICAL_GEO_PROPERTY,ICAL_RESTRICTION_ZEROORONE,0}, @@ -365,8 +558,8 @@ icalrestriction_property_record icalrestriction_property_records[] = { {ICAL_METHOD_ADD,ICAL_VEVENT_COMPONENT,ICAL_CONTACT_PROPERTY,ICAL_RESTRICTION_ZEROPLUS,0}, {ICAL_METHOD_ADD,ICAL_VEVENT_COMPONENT,ICAL_CREATED_PROPERTY,ICAL_RESTRICTION_ZEROORONE,0}, {ICAL_METHOD_ADD,ICAL_VEVENT_COMPONENT,ICAL_DESCRIPTION_PROPERTY,ICAL_RESTRICTION_ZEROORONE,0}, - {ICAL_METHOD_ADD,ICAL_VEVENT_COMPONENT,ICAL_DTEND_PROPERTY,ICAL_RESTRICTION_ONEEXCLUSIVE, icalrestriction_check_exclusive}, - {ICAL_METHOD_ADD,ICAL_VEVENT_COMPONENT,ICAL_DURATION_PROPERTY,ICAL_RESTRICTION_ONEEXCLUSIVE, icalrestriction_check_exclusive}, + {ICAL_METHOD_ADD,ICAL_VEVENT_COMPONENT,ICAL_DTEND_PROPERTY,ICAL_RESTRICTION_ONEEXCLUSIVE,icalrestriction_no_duration}, + {ICAL_METHOD_ADD,ICAL_VEVENT_COMPONENT,ICAL_DURATION_PROPERTY,ICAL_RESTRICTION_ONEEXCLUSIVE,icalrestriction_no_duration}, {ICAL_METHOD_ADD,ICAL_VEVENT_COMPONENT,ICAL_EXDATE_PROPERTY,ICAL_RESTRICTION_ZEROPLUS,0}, {ICAL_METHOD_ADD,ICAL_VEVENT_COMPONENT,ICAL_EXRULE_PROPERTY,ICAL_RESTRICTION_ZEROPLUS,0}, {ICAL_METHOD_ADD,ICAL_VEVENT_COMPONENT,ICAL_GEO_PROPERTY,ICAL_RESTRICTION_ZEROORONE,0}, @@ -377,11 +570,11 @@ icalrestriction_property_record icalrestriction_property_records[] = { {ICAL_METHOD_ADD,ICAL_VEVENT_COMPONENT,ICAL_RELATEDTO_PROPERTY,ICAL_RESTRICTION_ZEROPLUS,0}, {ICAL_METHOD_ADD,ICAL_VEVENT_COMPONENT,ICAL_RESOURCES_PROPERTY,ICAL_RESTRICTION_ZEROORONE,0}, {ICAL_METHOD_ADD,ICAL_VEVENT_COMPONENT,ICAL_RRULE_PROPERTY,ICAL_RESTRICTION_ZEROPLUS,0}, - {ICAL_METHOD_ADD,ICAL_VEVENT_COMPONENT,ICAL_STATUS_PROPERTY,ICAL_RESTRICTION_ZEROORONE,0}, + {ICAL_METHOD_ADD,ICAL_VEVENT_COMPONENT,ICAL_STATUS_PROPERTY,ICAL_RESTRICTION_ZEROORONE,icalrestriction_may_be_tent_conf}, {ICAL_METHOD_ADD,ICAL_VEVENT_COMPONENT,ICAL_TRANSP_PROPERTY,ICAL_RESTRICTION_ZEROORONE,0}, {ICAL_METHOD_ADD,ICAL_VEVENT_COMPONENT,ICAL_URL_PROPERTY,ICAL_RESTRICTION_ZEROORONE,0}, {ICAL_METHOD_ADD,ICAL_VEVENT_COMPONENT,ICAL_X_PROPERTY,ICAL_RESTRICTION_ZEROPLUS,0}, - {ICAL_METHOD_ADD,ICAL_VEVENT_COMPONENT,ICAL_RECURRENCEID_PROPERTY,ICAL_RESTRICTION_ZERO,0}, + {ICAL_METHOD_ADD,ICAL_VEVENT_COMPONENT,ICAL_RECURRENCEID_PROPERTY,ICAL_RESTRICTION_ZERO,icalrestriction_must_be_recurring}, {ICAL_METHOD_ADD,ICAL_VEVENT_COMPONENT,ICAL_REQUESTSTATUS_PROPERTY,ICAL_RESTRICTION_ZERO,0}, {ICAL_METHOD_CANCEL,ICAL_VEVENT_COMPONENT,ICAL_ATTENDEE_PROPERTY,ICAL_RESTRICTION_ZEROPLUS,0}, {ICAL_METHOD_CANCEL,ICAL_VEVENT_COMPONENT,ICAL_DTSTAMP_PROPERTY,ICAL_RESTRICTION_ONE,0}, @@ -395,9 +588,9 @@ icalrestriction_property_record icalrestriction_property_records[] = { {ICAL_METHOD_CANCEL,ICAL_VEVENT_COMPONENT,ICAL_CONTACT_PROPERTY,ICAL_RESTRICTION_ZEROPLUS,0}, {ICAL_METHOD_CANCEL,ICAL_VEVENT_COMPONENT,ICAL_CREATED_PROPERTY,ICAL_RESTRICTION_ZEROORONE,0}, {ICAL_METHOD_CANCEL,ICAL_VEVENT_COMPONENT,ICAL_DESCRIPTION_PROPERTY,ICAL_RESTRICTION_ZEROORONE,0}, - {ICAL_METHOD_CANCEL,ICAL_VEVENT_COMPONENT,ICAL_DTEND_PROPERTY,ICAL_RESTRICTION_ONEEXCLUSIVE, icalrestriction_check_exclusive}, + {ICAL_METHOD_CANCEL,ICAL_VEVENT_COMPONENT,ICAL_DTEND_PROPERTY,ICAL_RESTRICTION_ONEEXCLUSIVE ,icalrestriction_no_duration}, {ICAL_METHOD_CANCEL,ICAL_VEVENT_COMPONENT,ICAL_DTSTART_PROPERTY,ICAL_RESTRICTION_ZEROORONE,0}, - {ICAL_METHOD_CANCEL,ICAL_VEVENT_COMPONENT,ICAL_DURATION_PROPERTY,ICAL_RESTRICTION_ONEEXCLUSIVE, icalrestriction_check_exclusive}, + {ICAL_METHOD_CANCEL,ICAL_VEVENT_COMPONENT,ICAL_DURATION_PROPERTY,ICAL_RESTRICTION_ONEEXCLUSIVE,icalrestriction_no_duration}, {ICAL_METHOD_CANCEL,ICAL_VEVENT_COMPONENT,ICAL_EXDATE_PROPERTY,ICAL_RESTRICTION_ZEROPLUS,0}, {ICAL_METHOD_CANCEL,ICAL_VEVENT_COMPONENT,ICAL_EXRULE_PROPERTY,ICAL_RESTRICTION_ZEROPLUS,0}, {ICAL_METHOD_CANCEL,ICAL_VEVENT_COMPONENT,ICAL_GEO_PROPERTY,ICAL_RESTRICTION_ZEROORONE,0}, @@ -405,11 +598,11 @@ icalrestriction_property_record icalrestriction_property_records[] = { {ICAL_METHOD_CANCEL,ICAL_VEVENT_COMPONENT,ICAL_LOCATION_PROPERTY,ICAL_RESTRICTION_ZEROORONE,0}, {ICAL_METHOD_CANCEL,ICAL_VEVENT_COMPONENT,ICAL_PRIORITY_PROPERTY,ICAL_RESTRICTION_ZEROORONE,0}, {ICAL_METHOD_CANCEL,ICAL_VEVENT_COMPONENT,ICAL_RDATE_PROPERTY,ICAL_RESTRICTION_ZEROPLUS,0}, - {ICAL_METHOD_CANCEL,ICAL_VEVENT_COMPONENT,ICAL_RECURRENCEID_PROPERTY,ICAL_RESTRICTION_ZEROORONE,0}, + {ICAL_METHOD_CANCEL,ICAL_VEVENT_COMPONENT,ICAL_RECURRENCEID_PROPERTY,ICAL_RESTRICTION_ZEROORONE,icalrestriction_must_be_recurring}, {ICAL_METHOD_CANCEL,ICAL_VEVENT_COMPONENT,ICAL_RELATEDTO_PROPERTY,ICAL_RESTRICTION_ZEROPLUS,0}, {ICAL_METHOD_CANCEL,ICAL_VEVENT_COMPONENT,ICAL_RESOURCES_PROPERTY,ICAL_RESTRICTION_ZEROORONE,0}, {ICAL_METHOD_CANCEL,ICAL_VEVENT_COMPONENT,ICAL_RRULE_PROPERTY,ICAL_RESTRICTION_ZEROPLUS,0}, - {ICAL_METHOD_CANCEL,ICAL_VEVENT_COMPONENT,ICAL_STATUS_PROPERTY,ICAL_RESTRICTION_ZEROORONE,0}, + {ICAL_METHOD_CANCEL,ICAL_VEVENT_COMPONENT,ICAL_STATUS_PROPERTY,ICAL_RESTRICTION_ZEROORONE,icalrestriction_must_be_canceled_no_attendee}, {ICAL_METHOD_CANCEL,ICAL_VEVENT_COMPONENT,ICAL_SUMMARY_PROPERTY,ICAL_RESTRICTION_ZEROORONE,0}, {ICAL_METHOD_CANCEL,ICAL_VEVENT_COMPONENT,ICAL_TRANSP_PROPERTY,ICAL_RESTRICTION_ZEROORONE,0}, {ICAL_METHOD_CANCEL,ICAL_VEVENT_COMPONENT,ICAL_URL_PROPERTY,ICAL_RESTRICTION_ZEROORONE,0}, @@ -420,7 +613,7 @@ icalrestriction_property_record icalrestriction_property_records[] = { {ICAL_METHOD_REFRESH,ICAL_VEVENT_COMPONENT,ICAL_ORGANIZER_PROPERTY,ICAL_RESTRICTION_ONE,0}, {ICAL_METHOD_REFRESH,ICAL_VEVENT_COMPONENT,ICAL_UID_PROPERTY,ICAL_RESTRICTION_ONE,0}, {ICAL_METHOD_REFRESH,ICAL_VEVENT_COMPONENT,ICAL_COMMENT_PROPERTY,ICAL_RESTRICTION_ZEROORONE,0}, - {ICAL_METHOD_REFRESH,ICAL_VEVENT_COMPONENT,ICAL_RECURRENCEID_PROPERTY,ICAL_RESTRICTION_ZEROORONE,0}, + {ICAL_METHOD_REFRESH,ICAL_VEVENT_COMPONENT,ICAL_RECURRENCEID_PROPERTY,ICAL_RESTRICTION_ZEROORONE,icalrestriction_must_be_recurring}, {ICAL_METHOD_REFRESH,ICAL_VEVENT_COMPONENT,ICAL_X_PROPERTY,ICAL_RESTRICTION_ZEROPLUS,0}, {ICAL_METHOD_REFRESH,ICAL_VEVENT_COMPONENT,ICAL_ATTACH_PROPERTY,ICAL_RESTRICTION_ZERO,0}, {ICAL_METHOD_REFRESH,ICAL_VEVENT_COMPONENT,ICAL_CATEGORIES_PROPERTY,ICAL_RESTRICTION_ZERO,0}, @@ -461,8 +654,8 @@ icalrestriction_property_record icalrestriction_property_records[] = { {ICAL_METHOD_COUNTER,ICAL_VEVENT_COMPONENT,ICAL_CONTACT_PROPERTY,ICAL_RESTRICTION_ZEROPLUS,0}, {ICAL_METHOD_COUNTER,ICAL_VEVENT_COMPONENT,ICAL_CREATED_PROPERTY,ICAL_RESTRICTION_ZEROORONE,0}, {ICAL_METHOD_COUNTER,ICAL_VEVENT_COMPONENT,ICAL_DESCRIPTION_PROPERTY,ICAL_RESTRICTION_ZEROORONE,0}, - {ICAL_METHOD_COUNTER,ICAL_VEVENT_COMPONENT,ICAL_DTEND_PROPERTY,ICAL_RESTRICTION_ONEEXCLUSIVE, icalrestriction_check_exclusive}, - {ICAL_METHOD_COUNTER,ICAL_VEVENT_COMPONENT,ICAL_DURATION_PROPERTY,ICAL_RESTRICTION_ONEEXCLUSIVE, icalrestriction_check_exclusive}, + {ICAL_METHOD_COUNTER,ICAL_VEVENT_COMPONENT,ICAL_DTEND_PROPERTY,ICAL_RESTRICTION_ONEEXCLUSIVE,icalrestriction_no_duration}, + {ICAL_METHOD_COUNTER,ICAL_VEVENT_COMPONENT,ICAL_DURATION_PROPERTY,ICAL_RESTRICTION_ONEEXCLUSIVE,icalrestriction_no_duration}, {ICAL_METHOD_COUNTER,ICAL_VEVENT_COMPONENT,ICAL_EXDATE_PROPERTY,ICAL_RESTRICTION_ZEROPLUS,0}, {ICAL_METHOD_COUNTER,ICAL_VEVENT_COMPONENT,ICAL_EXRULE_PROPERTY,ICAL_RESTRICTION_ZEROPLUS,0}, {ICAL_METHOD_COUNTER,ICAL_VEVENT_COMPONENT,ICAL_GEO_PROPERTY,ICAL_RESTRICTION_ZEROORONE,0}, @@ -470,12 +663,12 @@ icalrestriction_property_record icalrestriction_property_records[] = { {ICAL_METHOD_COUNTER,ICAL_VEVENT_COMPONENT,ICAL_LOCATION_PROPERTY,ICAL_RESTRICTION_ZEROORONE,0}, {ICAL_METHOD_COUNTER,ICAL_VEVENT_COMPONENT,ICAL_PRIORITY_PROPERTY,ICAL_RESTRICTION_ZEROORONE,0}, {ICAL_METHOD_COUNTER,ICAL_VEVENT_COMPONENT,ICAL_RDATE_PROPERTY,ICAL_RESTRICTION_ZEROPLUS,0}, - {ICAL_METHOD_COUNTER,ICAL_VEVENT_COMPONENT,ICAL_RECURRENCEID_PROPERTY,ICAL_RESTRICTION_ZEROORONE,0}, + {ICAL_METHOD_COUNTER,ICAL_VEVENT_COMPONENT,ICAL_RECURRENCEID_PROPERTY,ICAL_RESTRICTION_ZEROORONE,icalrestriction_must_be_recurring}, {ICAL_METHOD_COUNTER,ICAL_VEVENT_COMPONENT,ICAL_RELATEDTO_PROPERTY,ICAL_RESTRICTION_ZEROPLUS,0}, {ICAL_METHOD_COUNTER,ICAL_VEVENT_COMPONENT,ICAL_REQUESTSTATUS_PROPERTY,ICAL_RESTRICTION_ZEROPLUS,0}, {ICAL_METHOD_COUNTER,ICAL_VEVENT_COMPONENT,ICAL_RESOURCES_PROPERTY,ICAL_RESTRICTION_ZEROORONE,0}, {ICAL_METHOD_COUNTER,ICAL_VEVENT_COMPONENT,ICAL_RRULE_PROPERTY,ICAL_RESTRICTION_ZEROPLUS,0}, - {ICAL_METHOD_COUNTER,ICAL_VEVENT_COMPONENT,ICAL_STATUS_PROPERTY,ICAL_RESTRICTION_ZEROORONE,0}, + {ICAL_METHOD_COUNTER,ICAL_VEVENT_COMPONENT,ICAL_STATUS_PROPERTY,ICAL_RESTRICTION_ZEROORONE,icalrestriction_may_be_tent_conf_cancel}, {ICAL_METHOD_COUNTER,ICAL_VEVENT_COMPONENT,ICAL_TRANSP_PROPERTY,ICAL_RESTRICTION_ZEROORONE,0}, {ICAL_METHOD_COUNTER,ICAL_VEVENT_COMPONENT,ICAL_URL_PROPERTY,ICAL_RESTRICTION_ZEROORONE,0}, {ICAL_METHOD_COUNTER,ICAL_VEVENT_COMPONENT,ICAL_X_PROPERTY,ICAL_RESTRICTION_ZEROPLUS,0}, @@ -483,7 +676,7 @@ icalrestriction_property_record icalrestriction_property_records[] = { {ICAL_METHOD_DECLINECOUNTER,ICAL_VEVENT_COMPONENT,ICAL_ORGANIZER_PROPERTY,ICAL_RESTRICTION_ONE,0}, {ICAL_METHOD_DECLINECOUNTER,ICAL_VEVENT_COMPONENT,ICAL_UID_PROPERTY,ICAL_RESTRICTION_ONE,0}, {ICAL_METHOD_DECLINECOUNTER,ICAL_VEVENT_COMPONENT,ICAL_COMMENT_PROPERTY,ICAL_RESTRICTION_ZEROORONE,0}, - {ICAL_METHOD_DECLINECOUNTER,ICAL_VEVENT_COMPONENT,ICAL_RECURRENCEID_PROPERTY,ICAL_RESTRICTION_ZEROORONE,0}, + {ICAL_METHOD_DECLINECOUNTER,ICAL_VEVENT_COMPONENT,ICAL_RECURRENCEID_PROPERTY,ICAL_RESTRICTION_ZEROORONE,icalrestriction_must_be_recurring}, {ICAL_METHOD_DECLINECOUNTER,ICAL_VEVENT_COMPONENT,ICAL_REQUESTSTATUS_PROPERTY,ICAL_RESTRICTION_ZEROPLUS,0}, {ICAL_METHOD_DECLINECOUNTER,ICAL_VEVENT_COMPONENT,ICAL_SEQUENCE_PROPERTY,ICAL_RESTRICTION_ZERO,0}, {ICAL_METHOD_DECLINECOUNTER,ICAL_VEVENT_COMPONENT,ICAL_X_PROPERTY,ICAL_RESTRICTION_ZEROPLUS,0}, @@ -574,7 +767,7 @@ icalrestriction_property_record icalrestriction_property_records[] = { {ICAL_METHOD_PUBLISH,ICAL_VTODO_COMPONENT,ICAL_LOCATION_PROPERTY,ICAL_RESTRICTION_ZEROORONE,0}, {ICAL_METHOD_PUBLISH,ICAL_VTODO_COMPONENT,ICAL_PERCENTCOMPLETE_PROPERTY,ICAL_RESTRICTION_ZEROORONE,0}, {ICAL_METHOD_PUBLISH,ICAL_VTODO_COMPONENT,ICAL_RDATE_PROPERTY,ICAL_RESTRICTION_ZEROPLUS,0}, - {ICAL_METHOD_PUBLISH,ICAL_VTODO_COMPONENT,ICAL_RECURRENCEID_PROPERTY,ICAL_RESTRICTION_ZEROORONE,0}, + {ICAL_METHOD_PUBLISH,ICAL_VTODO_COMPONENT,ICAL_RECURRENCEID_PROPERTY,ICAL_RESTRICTION_ZEROORONE,icalrestriction_must_be_recurring}, {ICAL_METHOD_PUBLISH,ICAL_VTODO_COMPONENT,ICAL_RELATEDTO_PROPERTY,ICAL_RESTRICTION_ZEROPLUS,0}, {ICAL_METHOD_PUBLISH,ICAL_VTODO_COMPONENT,ICAL_RESOURCES_PROPERTY,ICAL_RESTRICTION_ZEROORONE,0}, {ICAL_METHOD_PUBLISH,ICAL_VTODO_COMPONENT,ICAL_RRULE_PROPERTY,ICAL_RESTRICTION_ZEROPLUS,0}, @@ -607,11 +800,11 @@ icalrestriction_property_record icalrestriction_property_records[] = { {ICAL_METHOD_REQUEST,ICAL_VTODO_COMPONENT,ICAL_LOCATION_PROPERTY,ICAL_RESTRICTION_ZEROORONE,0}, {ICAL_METHOD_REQUEST,ICAL_VTODO_COMPONENT,ICAL_PERCENTCOMPLETE_PROPERTY,ICAL_RESTRICTION_ZEROORONE,0}, {ICAL_METHOD_REQUEST,ICAL_VTODO_COMPONENT,ICAL_RDATE_PROPERTY,ICAL_RESTRICTION_ZEROPLUS,0}, - {ICAL_METHOD_REQUEST,ICAL_VTODO_COMPONENT,ICAL_RECURRENCEID_PROPERTY,ICAL_RESTRICTION_ZEROORONE,0}, + {ICAL_METHOD_REQUEST,ICAL_VTODO_COMPONENT,ICAL_RECURRENCEID_PROPERTY,ICAL_RESTRICTION_ZEROORONE,icalrestriction_must_be_recurring}, {ICAL_METHOD_REQUEST,ICAL_VTODO_COMPONENT,ICAL_RELATEDTO_PROPERTY,ICAL_RESTRICTION_ZEROPLUS,0}, {ICAL_METHOD_REQUEST,ICAL_VTODO_COMPONENT,ICAL_RESOURCES_PROPERTY,ICAL_RESTRICTION_ZEROORONE,0}, {ICAL_METHOD_REQUEST,ICAL_VTODO_COMPONENT,ICAL_RRULE_PROPERTY,ICAL_RESTRICTION_ZEROPLUS,0}, - {ICAL_METHOD_REQUEST,ICAL_VTODO_COMPONENT,ICAL_STATUS_PROPERTY,ICAL_RESTRICTION_ZEROORONE,0}, + {ICAL_METHOD_REQUEST,ICAL_VTODO_COMPONENT,ICAL_STATUS_PROPERTY,ICAL_RESTRICTION_ZEROORONE,icalrestriction_may_be_comp_need_process}, {ICAL_METHOD_REQUEST,ICAL_VTODO_COMPONENT,ICAL_URL_PROPERTY,ICAL_RESTRICTION_ZEROORONE,0}, {ICAL_METHOD_REQUEST,ICAL_VTODO_COMPONENT,ICAL_X_PROPERTY,ICAL_RESTRICTION_ZEROPLUS,0}, {ICAL_METHOD_REQUEST,ICAL_VTODO_COMPONENT,ICAL_REQUESTSTATUS_PROPERTY,ICAL_RESTRICTION_ZERO,0}, @@ -641,7 +834,7 @@ icalrestriction_property_record icalrestriction_property_records[] = { {ICAL_METHOD_REPLY,ICAL_VTODO_COMPONENT,ICAL_RELATEDTO_PROPERTY,ICAL_RESTRICTION_ZEROPLUS,0}, {ICAL_METHOD_REPLY,ICAL_VTODO_COMPONENT,ICAL_RESOURCES_PROPERTY,ICAL_RESTRICTION_ZEROORONE,0}, {ICAL_METHOD_REPLY,ICAL_VTODO_COMPONENT,ICAL_RRULE_PROPERTY,ICAL_RESTRICTION_ZEROPLUS,0}, - {ICAL_METHOD_REPLY,ICAL_VTODO_COMPONENT,ICAL_RECURRENCEID_PROPERTY,ICAL_RESTRICTION_ZEROORONE,0}, + {ICAL_METHOD_REPLY,ICAL_VTODO_COMPONENT,ICAL_RECURRENCEID_PROPERTY,ICAL_RESTRICTION_ZEROORONE,icalrestriction_must_be_recurring}, {ICAL_METHOD_REPLY,ICAL_VTODO_COMPONENT,ICAL_SEQUENCE_PROPERTY,ICAL_RESTRICTION_ZEROORONE,0}, {ICAL_METHOD_REPLY,ICAL_VTODO_COMPONENT,ICAL_STATUS_PROPERTY,ICAL_RESTRICTION_ZEROORONE,0}, {ICAL_METHOD_REPLY,ICAL_VTODO_COMPONENT,ICAL_SUMMARY_PROPERTY,ICAL_RESTRICTION_ZEROORONE,0}, @@ -674,10 +867,10 @@ icalrestriction_property_record icalrestriction_property_records[] = { {ICAL_METHOD_ADD,ICAL_VTODO_COMPONENT,ICAL_RELATEDTO_PROPERTY,ICAL_RESTRICTION_ZEROPLUS,0}, {ICAL_METHOD_ADD,ICAL_VTODO_COMPONENT,ICAL_RESOURCES_PROPERTY,ICAL_RESTRICTION_ZEROORONE,0}, {ICAL_METHOD_ADD,ICAL_VTODO_COMPONENT,ICAL_RRULE_PROPERTY,ICAL_RESTRICTION_ZEROPLUS,0}, - {ICAL_METHOD_ADD,ICAL_VTODO_COMPONENT,ICAL_STATUS_PROPERTY,ICAL_RESTRICTION_ZEROORONE,0}, + {ICAL_METHOD_ADD,ICAL_VTODO_COMPONENT,ICAL_STATUS_PROPERTY,ICAL_RESTRICTION_ZEROORONE,icalrestriction_may_be_comp_need_process}, {ICAL_METHOD_ADD,ICAL_VTODO_COMPONENT,ICAL_URL_PROPERTY,ICAL_RESTRICTION_ZEROORONE,0}, {ICAL_METHOD_ADD,ICAL_VTODO_COMPONENT,ICAL_X_PROPERTY,ICAL_RESTRICTION_ZEROPLUS,0}, - {ICAL_METHOD_ADD,ICAL_VTODO_COMPONENT,ICAL_RECURRENCEID_PROPERTY,ICAL_RESTRICTION_ZERO,0}, + {ICAL_METHOD_ADD,ICAL_VTODO_COMPONENT,ICAL_RECURRENCEID_PROPERTY,ICAL_RESTRICTION_ZERO,icalrestriction_must_be_recurring}, {ICAL_METHOD_ADD,ICAL_VTODO_COMPONENT,ICAL_REQUESTSTATUS_PROPERTY,ICAL_RESTRICTION_ZERO,0}, {ICAL_METHOD_CANCEL,ICAL_VTODO_COMPONENT,ICAL_ATTENDEE_PROPERTY,ICAL_RESTRICTION_ZEROPLUS,0}, {ICAL_METHOD_CANCEL,ICAL_VTODO_COMPONENT,ICAL_UID_PROPERTY,ICAL_RESTRICTION_ONE,0}, @@ -701,19 +894,19 @@ icalrestriction_property_record icalrestriction_property_records[] = { {ICAL_METHOD_CANCEL,ICAL_VTODO_COMPONENT,ICAL_LOCATION_PROPERTY,ICAL_RESTRICTION_ZEROORONE,0}, {ICAL_METHOD_CANCEL,ICAL_VTODO_COMPONENT,ICAL_PERCENTCOMPLETE_PROPERTY,ICAL_RESTRICTION_ZEROORONE,0}, {ICAL_METHOD_CANCEL,ICAL_VTODO_COMPONENT,ICAL_RDATE_PROPERTY,ICAL_RESTRICTION_ZEROPLUS,0}, - {ICAL_METHOD_CANCEL,ICAL_VTODO_COMPONENT,ICAL_RECURRENCEID_PROPERTY,ICAL_RESTRICTION_ZEROORONE,0}, + {ICAL_METHOD_CANCEL,ICAL_VTODO_COMPONENT,ICAL_RECURRENCEID_PROPERTY,ICAL_RESTRICTION_ZEROORONE,icalrestriction_must_be_recurring}, {ICAL_METHOD_CANCEL,ICAL_VTODO_COMPONENT,ICAL_RELATEDTO_PROPERTY,ICAL_RESTRICTION_ZEROPLUS,0}, {ICAL_METHOD_CANCEL,ICAL_VTODO_COMPONENT,ICAL_RESOURCES_PROPERTY,ICAL_RESTRICTION_ZEROORONE,0}, {ICAL_METHOD_CANCEL,ICAL_VTODO_COMPONENT,ICAL_RRULE_PROPERTY,ICAL_RESTRICTION_ZEROPLUS,0}, {ICAL_METHOD_CANCEL,ICAL_VTODO_COMPONENT,ICAL_PRIORITY_PROPERTY,ICAL_RESTRICTION_ZEROORONE,0}, - {ICAL_METHOD_CANCEL,ICAL_VTODO_COMPONENT,ICAL_STATUS_PROPERTY,ICAL_RESTRICTION_ZEROORONE,0}, + {ICAL_METHOD_CANCEL,ICAL_VTODO_COMPONENT,ICAL_STATUS_PROPERTY,ICAL_RESTRICTION_ZEROORONE,icalrestriction_must_be_canceled_no_attendee}, {ICAL_METHOD_CANCEL,ICAL_VTODO_COMPONENT,ICAL_URL_PROPERTY,ICAL_RESTRICTION_ZEROORONE,0}, {ICAL_METHOD_CANCEL,ICAL_VTODO_COMPONENT,ICAL_X_PROPERTY,ICAL_RESTRICTION_ZEROPLUS,0}, {ICAL_METHOD_CANCEL,ICAL_VTODO_COMPONENT,ICAL_REQUESTSTATUS_PROPERTY,ICAL_RESTRICTION_ZERO,0}, {ICAL_METHOD_REFRESH,ICAL_VTODO_COMPONENT,ICAL_ATTENDEE_PROPERTY,ICAL_RESTRICTION_ONE,0}, {ICAL_METHOD_REFRESH,ICAL_VTODO_COMPONENT,ICAL_DTSTAMP_PROPERTY,ICAL_RESTRICTION_ONE,0}, {ICAL_METHOD_REFRESH,ICAL_VTODO_COMPONENT,ICAL_UID_PROPERTY,ICAL_RESTRICTION_ONE,0}, - {ICAL_METHOD_REFRESH,ICAL_VTODO_COMPONENT,ICAL_RECURRENCEID_PROPERTY,ICAL_RESTRICTION_ZEROORONE,0}, + {ICAL_METHOD_REFRESH,ICAL_VTODO_COMPONENT,ICAL_RECURRENCEID_PROPERTY,ICAL_RESTRICTION_ZEROORONE,icalrestriction_must_be_recurring}, {ICAL_METHOD_REFRESH,ICAL_VTODO_COMPONENT,ICAL_X_PROPERTY,ICAL_RESTRICTION_ZEROPLUS,0}, {ICAL_METHOD_REFRESH,ICAL_VTODO_COMPONENT,ICAL_ATTACH_PROPERTY,ICAL_RESTRICTION_ZERO,0}, {ICAL_METHOD_REFRESH,ICAL_VTODO_COMPONENT,ICAL_CATEGORIES_PROPERTY,ICAL_RESTRICTION_ZERO,0}, @@ -764,13 +957,13 @@ icalrestriction_property_record icalrestriction_property_records[] = { {ICAL_METHOD_COUNTER,ICAL_VTODO_COMPONENT,ICAL_LOCATION_PROPERTY,ICAL_RESTRICTION_ZEROORONE,0}, {ICAL_METHOD_COUNTER,ICAL_VTODO_COMPONENT,ICAL_PERCENTCOMPLETE_PROPERTY,ICAL_RESTRICTION_ZEROORONE,0}, {ICAL_METHOD_COUNTER,ICAL_VTODO_COMPONENT,ICAL_RDATE_PROPERTY,ICAL_RESTRICTION_ZEROPLUS,0}, - {ICAL_METHOD_COUNTER,ICAL_VTODO_COMPONENT,ICAL_RECURRENCEID_PROPERTY,ICAL_RESTRICTION_ZEROORONE,0}, + {ICAL_METHOD_COUNTER,ICAL_VTODO_COMPONENT,ICAL_RECURRENCEID_PROPERTY,ICAL_RESTRICTION_ZEROORONE,icalrestriction_must_be_recurring}, {ICAL_METHOD_COUNTER,ICAL_VTODO_COMPONENT,ICAL_RELATEDTO_PROPERTY,ICAL_RESTRICTION_ZEROPLUS,0}, {ICAL_METHOD_COUNTER,ICAL_VTODO_COMPONENT,ICAL_REQUESTSTATUS_PROPERTY,ICAL_RESTRICTION_ZEROPLUS,0}, {ICAL_METHOD_COUNTER,ICAL_VTODO_COMPONENT,ICAL_RESOURCES_PROPERTY,ICAL_RESTRICTION_ZEROORONE,0}, {ICAL_METHOD_COUNTER,ICAL_VTODO_COMPONENT,ICAL_RRULE_PROPERTY,ICAL_RESTRICTION_ZEROORONE,0}, {ICAL_METHOD_COUNTER,ICAL_VTODO_COMPONENT,ICAL_SEQUENCE_PROPERTY,ICAL_RESTRICTION_ZEROORONE,0}, - {ICAL_METHOD_COUNTER,ICAL_VTODO_COMPONENT,ICAL_STATUS_PROPERTY,ICAL_RESTRICTION_ZEROORONE,0}, + {ICAL_METHOD_COUNTER,ICAL_VTODO_COMPONENT,ICAL_STATUS_PROPERTY,ICAL_RESTRICTION_ZEROORONE,icalrestriction_may_be_comp_need_process}, {ICAL_METHOD_COUNTER,ICAL_VTODO_COMPONENT,ICAL_URL_PROPERTY,ICAL_RESTRICTION_ZEROORONE,0}, {ICAL_METHOD_COUNTER,ICAL_VTODO_COMPONENT,ICAL_X_PROPERTY,ICAL_RESTRICTION_ZEROPLUS,0}, {ICAL_METHOD_DECLINECOUNTER,ICAL_VTODO_COMPONENT,ICAL_ATTENDEE_PROPERTY,ICAL_RESTRICTION_ONEPLUS,0}, @@ -796,7 +989,7 @@ icalrestriction_property_record icalrestriction_property_records[] = { {ICAL_METHOD_DECLINECOUNTER,ICAL_VTODO_COMPONENT,ICAL_PERCENTCOMPLETE_PROPERTY,ICAL_RESTRICTION_ZEROORONE,0}, {ICAL_METHOD_DECLINECOUNTER,ICAL_VTODO_COMPONENT,ICAL_PRIORITY_PROPERTY,ICAL_RESTRICTION_ZEROORONE,0}, {ICAL_METHOD_DECLINECOUNTER,ICAL_VTODO_COMPONENT,ICAL_RDATE_PROPERTY,ICAL_RESTRICTION_ZEROPLUS,0}, - {ICAL_METHOD_DECLINECOUNTER,ICAL_VTODO_COMPONENT,ICAL_RECURRENCEID_PROPERTY,ICAL_RESTRICTION_ZEROORONE,0}, + {ICAL_METHOD_DECLINECOUNTER,ICAL_VTODO_COMPONENT,ICAL_RECURRENCEID_PROPERTY,ICAL_RESTRICTION_ZEROORONE,icalrestriction_must_be_recurring}, {ICAL_METHOD_DECLINECOUNTER,ICAL_VTODO_COMPONENT,ICAL_RELATEDTO_PROPERTY,ICAL_RESTRICTION_ZEROPLUS,0}, {ICAL_METHOD_DECLINECOUNTER,ICAL_VTODO_COMPONENT,ICAL_REQUESTSTATUS_PROPERTY,ICAL_RESTRICTION_ZEROPLUS,0}, {ICAL_METHOD_DECLINECOUNTER,ICAL_VTODO_COMPONENT,ICAL_RESOURCES_PROPERTY,ICAL_RESTRICTION_ZEROORONE,0}, @@ -819,11 +1012,11 @@ icalrestriction_property_record icalrestriction_property_records[] = { {ICAL_METHOD_PUBLISH,ICAL_VJOURNAL_COMPONENT,ICAL_EXRULE_PROPERTY,ICAL_RESTRICTION_ZEROPLUS,0}, {ICAL_METHOD_PUBLISH,ICAL_VJOURNAL_COMPONENT,ICAL_LASTMODIFIED_PROPERTY,ICAL_RESTRICTION_ZEROORONE,0}, {ICAL_METHOD_PUBLISH,ICAL_VJOURNAL_COMPONENT,ICAL_RDATE_PROPERTY,ICAL_RESTRICTION_ZEROPLUS,0}, - {ICAL_METHOD_PUBLISH,ICAL_VJOURNAL_COMPONENT,ICAL_RECURRENCEID_PROPERTY,ICAL_RESTRICTION_ZEROORONE,0}, + {ICAL_METHOD_PUBLISH,ICAL_VJOURNAL_COMPONENT,ICAL_RECURRENCEID_PROPERTY,ICAL_RESTRICTION_ZEROORONE,icalrestriction_must_be_recurring}, {ICAL_METHOD_PUBLISH,ICAL_VJOURNAL_COMPONENT,ICAL_RELATEDTO_PROPERTY,ICAL_RESTRICTION_ZEROPLUS,0}, {ICAL_METHOD_PUBLISH,ICAL_VJOURNAL_COMPONENT,ICAL_RRULE_PROPERTY,ICAL_RESTRICTION_ZEROPLUS,0}, {ICAL_METHOD_PUBLISH,ICAL_VJOURNAL_COMPONENT,ICAL_SEQUENCE_PROPERTY,ICAL_RESTRICTION_ZEROORONE,0}, - {ICAL_METHOD_PUBLISH,ICAL_VJOURNAL_COMPONENT,ICAL_STATUS_PROPERTY,ICAL_RESTRICTION_ZEROORONE,0}, + {ICAL_METHOD_PUBLISH,ICAL_VJOURNAL_COMPONENT,ICAL_STATUS_PROPERTY,ICAL_RESTRICTION_ZEROORONE,icalrestriction_may_be_draft_final_canceled}, {ICAL_METHOD_PUBLISH,ICAL_VJOURNAL_COMPONENT,ICAL_SUMMARY_PROPERTY,ICAL_RESTRICTION_ZEROORONE,0}, {ICAL_METHOD_PUBLISH,ICAL_VJOURNAL_COMPONENT,ICAL_URL_PROPERTY,ICAL_RESTRICTION_ZEROORONE,0}, {ICAL_METHOD_PUBLISH,ICAL_VJOURNAL_COMPONENT,ICAL_X_PROPERTY,ICAL_RESTRICTION_ZEROPLUS,0}, @@ -869,10 +1062,10 @@ icalrestriction_property_record icalrestriction_property_records[] = { {ICAL_METHOD_CANCEL,ICAL_VJOURNAL_COMPONENT,ICAL_EXRULE_PROPERTY,ICAL_RESTRICTION_ZEROPLUS,0}, {ICAL_METHOD_CANCEL,ICAL_VJOURNAL_COMPONENT,ICAL_LASTMODIFIED_PROPERTY,ICAL_RESTRICTION_ZEROORONE,0}, {ICAL_METHOD_CANCEL,ICAL_VJOURNAL_COMPONENT,ICAL_RDATE_PROPERTY,ICAL_RESTRICTION_ZEROPLUS,0}, - {ICAL_METHOD_CANCEL,ICAL_VJOURNAL_COMPONENT,ICAL_RECURRENCEID_PROPERTY,ICAL_RESTRICTION_ZEROORONE,0}, + {ICAL_METHOD_CANCEL,ICAL_VJOURNAL_COMPONENT,ICAL_RECURRENCEID_PROPERTY,ICAL_RESTRICTION_ZEROORONE,icalrestriction_must_be_recurring}, {ICAL_METHOD_CANCEL,ICAL_VJOURNAL_COMPONENT,ICAL_RELATEDTO_PROPERTY,ICAL_RESTRICTION_ZEROPLUS,0}, {ICAL_METHOD_CANCEL,ICAL_VJOURNAL_COMPONENT,ICAL_RRULE_PROPERTY,ICAL_RESTRICTION_ZEROPLUS,0}, - {ICAL_METHOD_CANCEL,ICAL_VJOURNAL_COMPONENT,ICAL_STATUS_PROPERTY,ICAL_RESTRICTION_ZEROORONE,0}, + {ICAL_METHOD_CANCEL,ICAL_VJOURNAL_COMPONENT,ICAL_STATUS_PROPERTY,ICAL_RESTRICTION_ZEROORONE,icalrestriction_must_be_cancel_if_present}, {ICAL_METHOD_CANCEL,ICAL_VJOURNAL_COMPONENT,ICAL_SUMMARY_PROPERTY,ICAL_RESTRICTION_ZEROORONE,0}, {ICAL_METHOD_CANCEL,ICAL_VJOURNAL_COMPONENT,ICAL_URL_PROPERTY,ICAL_RESTRICTION_ZEROORONE,0}, {ICAL_METHOD_CANCEL,ICAL_VJOURNAL_COMPONENT,ICAL_X_PROPERTY,ICAL_RESTRICTION_ZEROPLUS,0}, @@ -936,11 +1129,11 @@ icalrestriction_property_record icalrestriction_property_records[] = { {ICAL_METHOD_NONE,ICAL_VEVENT_COMPONENT,ICAL_CONTACT_PROPERTY,ICAL_RESTRICTION_ZEROPLUS,0}, {ICAL_METHOD_NONE,ICAL_VEVENT_COMPONENT,ICAL_CREATED_PROPERTY,ICAL_RESTRICTION_ZEROORONE,0}, {ICAL_METHOD_NONE,ICAL_VEVENT_COMPONENT,ICAL_DESCRIPTION_PROPERTY,ICAL_RESTRICTION_ZEROORONE,0}, - {ICAL_METHOD_NONE,ICAL_VEVENT_COMPONENT,ICAL_DTEND_PROPERTY,ICAL_RESTRICTION_ONEEXCLUSIVE, icalrestriction_check_exclusive}, + {ICAL_METHOD_NONE,ICAL_VEVENT_COMPONENT,ICAL_DTEND_PROPERTY,ICAL_RESTRICTION_ONEEXCLUSIVE,icalrestriction_no_duration}, {ICAL_METHOD_NONE,ICAL_VEVENT_COMPONENT,ICAL_DTSTAMP_PROPERTY,ICAL_RESTRICTION_ZEROORONE,0}, {ICAL_METHOD_NONE,ICAL_VEVENT_COMPONENT,ICAL_DTSTART_PROPERTY,ICAL_RESTRICTION_ZEROORONE,0}, {ICAL_METHOD_NONE,ICAL_VEVENT_COMPONENT,ICAL_DUE_PROPERTY,ICAL_RESTRICTION_ZERO,0}, - {ICAL_METHOD_NONE,ICAL_VEVENT_COMPONENT,ICAL_DURATION_PROPERTY,ICAL_RESTRICTION_ONEEXCLUSIVE, icalrestriction_check_exclusive}, + {ICAL_METHOD_NONE,ICAL_VEVENT_COMPONENT,ICAL_DURATION_PROPERTY,ICAL_RESTRICTION_ONEEXCLUSIVE,icalrestriction_no_duration}, {ICAL_METHOD_NONE,ICAL_VEVENT_COMPONENT,ICAL_EXDATE_PROPERTY,ICAL_RESTRICTION_ZEROPLUS,0}, {ICAL_METHOD_NONE,ICAL_VEVENT_COMPONENT,ICAL_EXRULE_PROPERTY,ICAL_RESTRICTION_ZEROPLUS,0}, {ICAL_METHOD_NONE,ICAL_VEVENT_COMPONENT,ICAL_FREEBUSY_PROPERTY,ICAL_RESTRICTION_ZERO,0}, @@ -953,7 +1146,7 @@ icalrestriction_property_record icalrestriction_property_records[] = { {ICAL_METHOD_NONE,ICAL_VEVENT_COMPONENT,ICAL_PRIORITY_PROPERTY,ICAL_RESTRICTION_ZEROORONE,0}, {ICAL_METHOD_NONE,ICAL_VEVENT_COMPONENT,ICAL_PRODID_PROPERTY,ICAL_RESTRICTION_ZERO,0}, {ICAL_METHOD_NONE,ICAL_VEVENT_COMPONENT,ICAL_RDATE_PROPERTY,ICAL_RESTRICTION_ZEROPLUS,0}, - {ICAL_METHOD_NONE,ICAL_VEVENT_COMPONENT,ICAL_RECURRENCEID_PROPERTY,ICAL_RESTRICTION_ZEROORONE,0}, + {ICAL_METHOD_NONE,ICAL_VEVENT_COMPONENT,ICAL_RECURRENCEID_PROPERTY,ICAL_RESTRICTION_ZEROORONE,icalrestriction_must_be_recurring}, {ICAL_METHOD_NONE,ICAL_VEVENT_COMPONENT,ICAL_RELATEDTO_PROPERTY,ICAL_RESTRICTION_ZEROPLUS,0}, {ICAL_METHOD_NONE,ICAL_VEVENT_COMPONENT,ICAL_REPEAT_PROPERTY,ICAL_RESTRICTION_ZERO,0}, {ICAL_METHOD_NONE,ICAL_VEVENT_COMPONENT,ICAL_REQUESTSTATUS_PROPERTY,ICAL_RESTRICTION_ZEROPLUS,0}, @@ -1001,7 +1194,7 @@ icalrestriction_property_record icalrestriction_property_records[] = { {ICAL_METHOD_NONE,ICAL_VTODO_COMPONENT,ICAL_PRIORITY_PROPERTY,ICAL_RESTRICTION_ZEROORONE,0}, {ICAL_METHOD_NONE,ICAL_VTODO_COMPONENT,ICAL_PRODID_PROPERTY,ICAL_RESTRICTION_ZERO,0}, {ICAL_METHOD_NONE,ICAL_VTODO_COMPONENT,ICAL_RDATE_PROPERTY,ICAL_RESTRICTION_ZEROPLUS,0}, - {ICAL_METHOD_NONE,ICAL_VTODO_COMPONENT,ICAL_RECURRENCEID_PROPERTY,ICAL_RESTRICTION_ZEROORONE,0}, + {ICAL_METHOD_NONE,ICAL_VTODO_COMPONENT,ICAL_RECURRENCEID_PROPERTY,ICAL_RESTRICTION_ZEROORONE,icalrestriction_must_be_recurring}, {ICAL_METHOD_NONE,ICAL_VTODO_COMPONENT,ICAL_RELATEDTO_PROPERTY,ICAL_RESTRICTION_ZEROPLUS,0}, {ICAL_METHOD_NONE,ICAL_VTODO_COMPONENT,ICAL_REPEAT_PROPERTY,ICAL_RESTRICTION_ZERO,0}, {ICAL_METHOD_NONE,ICAL_VTODO_COMPONENT,ICAL_REQUESTSTATUS_PROPERTY,ICAL_RESTRICTION_ZEROPLUS,0}, @@ -1049,7 +1242,7 @@ icalrestriction_property_record icalrestriction_property_records[] = { {ICAL_METHOD_NONE,ICAL_VJOURNAL_COMPONENT,ICAL_PRIORITY_PROPERTY,ICAL_RESTRICTION_ZERO,0}, {ICAL_METHOD_NONE,ICAL_VJOURNAL_COMPONENT,ICAL_PRODID_PROPERTY,ICAL_RESTRICTION_ZERO,0}, {ICAL_METHOD_NONE,ICAL_VJOURNAL_COMPONENT,ICAL_RDATE_PROPERTY,ICAL_RESTRICTION_ZEROPLUS,0}, - {ICAL_METHOD_NONE,ICAL_VJOURNAL_COMPONENT,ICAL_RECURRENCEID_PROPERTY,ICAL_RESTRICTION_ZEROORONE,0}, + {ICAL_METHOD_NONE,ICAL_VJOURNAL_COMPONENT,ICAL_RECURRENCEID_PROPERTY,ICAL_RESTRICTION_ZEROORONE,icalrestriction_must_be_recurring}, {ICAL_METHOD_NONE,ICAL_VJOURNAL_COMPONENT,ICAL_RELATEDTO_PROPERTY,ICAL_RESTRICTION_ZEROPLUS,0}, {ICAL_METHOD_NONE,ICAL_VJOURNAL_COMPONENT,ICAL_REPEAT_PROPERTY,ICAL_RESTRICTION_ZERO,0}, {ICAL_METHOD_NONE,ICAL_VJOURNAL_COMPONENT,ICAL_REQUESTSTATUS_PROPERTY,ICAL_RESTRICTION_ZEROPLUS,0}, @@ -1276,8 +1469,8 @@ icalrestriction_property_record icalrestriction_property_records[] = { {ICAL_METHOD_NONE,ICAL_XAUDIOALARM_COMPONENT,ICAL_DTSTAMP_PROPERTY,ICAL_RESTRICTION_ZERO,0}, {ICAL_METHOD_NONE,ICAL_XAUDIOALARM_COMPONENT,ICAL_DTSTART_PROPERTY,ICAL_RESTRICTION_ZERO,0}, {ICAL_METHOD_NONE,ICAL_XAUDIOALARM_COMPONENT,ICAL_DUE_PROPERTY,ICAL_RESTRICTION_ZERO,0}, - {ICAL_METHOD_NONE,ICAL_XAUDIOALARM_COMPONENT,ICAL_DURATION_PROPERTY,ICAL_RESTRICTION_ONEMUTUAL,icalrestriction_check_mutual}, - {ICAL_METHOD_NONE,ICAL_XAUDIOALARM_COMPONENT,ICAL_REPEAT_PROPERTY,ICAL_RESTRICTION_ONEMUTUAL,icalrestriction_check_mutual}, + {ICAL_METHOD_NONE,ICAL_XAUDIOALARM_COMPONENT,ICAL_DURATION_PROPERTY,ICAL_RESTRICTION_ONEMUTUAL,icalrestriction_must_have_repeat}, + {ICAL_METHOD_NONE,ICAL_XAUDIOALARM_COMPONENT,ICAL_REPEAT_PROPERTY,ICAL_RESTRICTION_ONEMUTUAL,icalrestriction_must_have_duration}, {ICAL_METHOD_NONE,ICAL_XAUDIOALARM_COMPONENT,ICAL_EXDATE_PROPERTY,ICAL_RESTRICTION_ZERO,0}, {ICAL_METHOD_NONE,ICAL_XAUDIOALARM_COMPONENT,ICAL_EXRULE_PROPERTY,ICAL_RESTRICTION_ZERO,0}, {ICAL_METHOD_NONE,ICAL_XAUDIOALARM_COMPONENT,ICAL_FREEBUSY_PROPERTY,ICAL_RESTRICTION_ZERO,0}, @@ -1324,8 +1517,8 @@ icalrestriction_property_record icalrestriction_property_records[] = { {ICAL_METHOD_NONE,ICAL_XDISPLAYALARM_COMPONENT,ICAL_DTSTAMP_PROPERTY,ICAL_RESTRICTION_ZERO,0}, {ICAL_METHOD_NONE,ICAL_XDISPLAYALARM_COMPONENT,ICAL_DTSTART_PROPERTY,ICAL_RESTRICTION_ZERO,0}, {ICAL_METHOD_NONE,ICAL_XDISPLAYALARM_COMPONENT,ICAL_DUE_PROPERTY,ICAL_RESTRICTION_ZERO,0}, - {ICAL_METHOD_NONE,ICAL_XDISPLAYALARM_COMPONENT,ICAL_DURATION_PROPERTY,ICAL_RESTRICTION_ONEMUTUAL,icalrestriction_check_mutual}, - {ICAL_METHOD_NONE,ICAL_XDISPLAYALARM_COMPONENT,ICAL_REPEAT_PROPERTY,ICAL_RESTRICTION_ONEMUTUAL,icalrestriction_check_mutual}, + {ICAL_METHOD_NONE,ICAL_XDISPLAYALARM_COMPONENT,ICAL_DURATION_PROPERTY,ICAL_RESTRICTION_ONEMUTUAL,icalrestriction_must_have_repeat}, + {ICAL_METHOD_NONE,ICAL_XDISPLAYALARM_COMPONENT,ICAL_REPEAT_PROPERTY,ICAL_RESTRICTION_ONEMUTUAL,icalrestriction_must_have_duration}, {ICAL_METHOD_NONE,ICAL_XDISPLAYALARM_COMPONENT,ICAL_EXDATE_PROPERTY,ICAL_RESTRICTION_ZERO,0}, {ICAL_METHOD_NONE,ICAL_XDISPLAYALARM_COMPONENT,ICAL_EXRULE_PROPERTY,ICAL_RESTRICTION_ZERO,0}, {ICAL_METHOD_NONE,ICAL_XDISPLAYALARM_COMPONENT,ICAL_FREEBUSY_PROPERTY,ICAL_RESTRICTION_ZERO,0}, @@ -1372,8 +1565,8 @@ icalrestriction_property_record icalrestriction_property_records[] = { {ICAL_METHOD_NONE,ICAL_XEMAILALARM_COMPONENT,ICAL_DTSTAMP_PROPERTY,ICAL_RESTRICTION_ZERO,0}, {ICAL_METHOD_NONE,ICAL_XEMAILALARM_COMPONENT,ICAL_DTSTART_PROPERTY,ICAL_RESTRICTION_ZERO,0}, {ICAL_METHOD_NONE,ICAL_XEMAILALARM_COMPONENT,ICAL_DUE_PROPERTY,ICAL_RESTRICTION_ZERO,0}, - {ICAL_METHOD_NONE,ICAL_XEMAILALARM_COMPONENT,ICAL_DURATION_PROPERTY,ICAL_RESTRICTION_ONEMUTUAL,icalrestriction_check_mutual}, - {ICAL_METHOD_NONE,ICAL_XEMAILALARM_COMPONENT,ICAL_REPEAT_PROPERTY,ICAL_RESTRICTION_ONEMUTUAL,icalrestriction_check_mutual}, + {ICAL_METHOD_NONE,ICAL_XEMAILALARM_COMPONENT,ICAL_DURATION_PROPERTY,ICAL_RESTRICTION_ONEMUTUAL,icalrestriction_must_have_repeat}, + {ICAL_METHOD_NONE,ICAL_XEMAILALARM_COMPONENT,ICAL_REPEAT_PROPERTY,ICAL_RESTRICTION_ONEMUTUAL,icalrestriction_must_have_duration}, {ICAL_METHOD_NONE,ICAL_XEMAILALARM_COMPONENT,ICAL_EXDATE_PROPERTY,ICAL_RESTRICTION_ZERO,0}, {ICAL_METHOD_NONE,ICAL_XEMAILALARM_COMPONENT,ICAL_EXRULE_PROPERTY,ICAL_RESTRICTION_ZERO,0}, {ICAL_METHOD_NONE,ICAL_XEMAILALARM_COMPONENT,ICAL_FREEBUSY_PROPERTY,ICAL_RESTRICTION_ZERO,0}, @@ -1420,8 +1613,8 @@ icalrestriction_property_record icalrestriction_property_records[] = { {ICAL_METHOD_NONE,ICAL_XPROCEDUREALARM_COMPONENT,ICAL_DTSTAMP_PROPERTY,ICAL_RESTRICTION_ZERO,0}, {ICAL_METHOD_NONE,ICAL_XPROCEDUREALARM_COMPONENT,ICAL_DTSTART_PROPERTY,ICAL_RESTRICTION_ZERO,0}, {ICAL_METHOD_NONE,ICAL_XPROCEDUREALARM_COMPONENT,ICAL_DUE_PROPERTY,ICAL_RESTRICTION_ZERO,0}, - {ICAL_METHOD_NONE,ICAL_XPROCEDUREALARM_COMPONENT,ICAL_DURATION_PROPERTY,ICAL_RESTRICTION_ONEMUTUAL,icalrestriction_check_mutual}, - {ICAL_METHOD_NONE,ICAL_XPROCEDUREALARM_COMPONENT,ICAL_REPEAT_PROPERTY,ICAL_RESTRICTION_ONEMUTUAL,icalrestriction_check_mutual}, + {ICAL_METHOD_NONE,ICAL_XPROCEDUREALARM_COMPONENT,ICAL_DURATION_PROPERTY,ICAL_RESTRICTION_ONEMUTUAL,icalrestriction_must_have_repeat}, + {ICAL_METHOD_NONE,ICAL_XPROCEDUREALARM_COMPONENT,ICAL_REPEAT_PROPERTY,ICAL_RESTRICTION_ONEMUTUAL,icalrestriction_must_have_duration}, {ICAL_METHOD_NONE,ICAL_XPROCEDUREALARM_COMPONENT,ICAL_EXDATE_PROPERTY,ICAL_RESTRICTION_ZERO,0}, {ICAL_METHOD_NONE,ICAL_XPROCEDUREALARM_COMPONENT,ICAL_EXRULE_PROPERTY,ICAL_RESTRICTION_ZERO,0}, {ICAL_METHOD_NONE,ICAL_XPROCEDUREALARM_COMPONENT,ICAL_FREEBUSY_PROPERTY,ICAL_RESTRICTION_ZERO,0}, @@ -1453,34 +1646,34 @@ icalrestriction_property_record icalrestriction_property_records[] = { {ICAL_METHOD_NONE,ICAL_XPROCEDUREALARM_COMPONENT,ICAL_URL_PROPERTY,ICAL_RESTRICTION_ZERO,0}, {ICAL_METHOD_NONE,ICAL_XPROCEDUREALARM_COMPONENT,ICAL_VERSION_PROPERTY,ICAL_RESTRICTION_ZERO,0}, {ICAL_METHOD_NONE,ICAL_XPROCEDUREALARM_COMPONENT,ICAL_X_PROPERTY,ICAL_RESTRICTION_ZEROPLUS,0}, - {ICAL_METHOD_NONE,ICAL_NO_COMPONENT,ICAL_NO_PROPERTY,ICAL_RESTRICTION_NONE,0} + {ICAL_METHOD_NONE,ICAL_NO_COMPONENT,ICAL_NO_PROPERTY,ICAL_RESTRICTION_NONE} }; icalrestriction_component_record icalrestriction_component_records[] = { {ICAL_METHOD_PUBLISH,ICAL_VEVENT_COMPONENT,ICAL_VALARM_COMPONENT,ICAL_RESTRICTION_ZEROPLUS,0}, {ICAL_METHOD_PUBLISH,ICAL_VEVENT_COMPONENT,ICAL_VFREEBUSY_COMPONENT,ICAL_RESTRICTION_ZERO,0}, {ICAL_METHOD_PUBLISH,ICAL_VEVENT_COMPONENT,ICAL_VJOURNAL_COMPONENT,ICAL_RESTRICTION_ZERO,0}, {ICAL_METHOD_PUBLISH,ICAL_VEVENT_COMPONENT,ICAL_VTODO_COMPONENT,ICAL_RESTRICTION_ZERO,0}, - {ICAL_METHOD_PUBLISH,ICAL_VEVENT_COMPONENT,ICAL_VTIMEZONE_COMPONENT,ICAL_RESTRICTION_ZEROPLUS,0}, + {ICAL_METHOD_PUBLISH,ICAL_VEVENT_COMPONENT,ICAL_VTIMEZONE_COMPONENT,ICAL_RESTRICTION_ZEROPLUS,icalrestriction_must_if_tz_ref}, {ICAL_METHOD_PUBLISH,ICAL_VEVENT_COMPONENT,ICAL_X_COMPONENT,ICAL_RESTRICTION_ZEROPLUS,0}, {ICAL_METHOD_REQUEST,ICAL_VEVENT_COMPONENT,ICAL_VALARM_COMPONENT,ICAL_RESTRICTION_ZEROPLUS,0}, - {ICAL_METHOD_REQUEST,ICAL_VEVENT_COMPONENT,ICAL_VTIMEZONE_COMPONENT,ICAL_RESTRICTION_ZEROPLUS,0}, + {ICAL_METHOD_REQUEST,ICAL_VEVENT_COMPONENT,ICAL_VTIMEZONE_COMPONENT,ICAL_RESTRICTION_ZEROPLUS,icalrestriction_must_if_tz_ref}, {ICAL_METHOD_REQUEST,ICAL_VEVENT_COMPONENT,ICAL_X_COMPONENT,ICAL_RESTRICTION_ZEROPLUS,0}, {ICAL_METHOD_REQUEST,ICAL_VEVENT_COMPONENT,ICAL_VFREEBUSY_COMPONENT,ICAL_RESTRICTION_ZERO,0}, {ICAL_METHOD_REQUEST,ICAL_VEVENT_COMPONENT,ICAL_VJOURNAL_COMPONENT,ICAL_RESTRICTION_ZERO,0}, {ICAL_METHOD_REQUEST,ICAL_VEVENT_COMPONENT,ICAL_VTODO_COMPONENT,ICAL_RESTRICTION_ZERO,0}, - {ICAL_METHOD_REPLY,ICAL_VEVENT_COMPONENT,ICAL_VTIMEZONE_COMPONENT,ICAL_RESTRICTION_ZEROORONE,0}, + {ICAL_METHOD_REPLY,ICAL_VEVENT_COMPONENT,ICAL_VTIMEZONE_COMPONENT,ICAL_RESTRICTION_ZEROORONE,icalrestriction_must_if_tz_ref}, {ICAL_METHOD_REPLY,ICAL_VEVENT_COMPONENT,ICAL_X_COMPONENT,ICAL_RESTRICTION_ZEROPLUS,0}, {ICAL_METHOD_REPLY,ICAL_VEVENT_COMPONENT,ICAL_VALARM_COMPONENT,ICAL_RESTRICTION_ZERO,0}, {ICAL_METHOD_REPLY,ICAL_VEVENT_COMPONENT,ICAL_VFREEBUSY_COMPONENT,ICAL_RESTRICTION_ZERO,0}, {ICAL_METHOD_REPLY,ICAL_VEVENT_COMPONENT,ICAL_VJOURNAL_COMPONENT,ICAL_RESTRICTION_ZERO,0}, {ICAL_METHOD_REPLY,ICAL_VEVENT_COMPONENT,ICAL_VTODO_COMPONENT,ICAL_RESTRICTION_ZERO,0}, {ICAL_METHOD_ADD,ICAL_VEVENT_COMPONENT,ICAL_VALARM_COMPONENT,ICAL_RESTRICTION_ZEROPLUS,0}, - {ICAL_METHOD_ADD,ICAL_VEVENT_COMPONENT,ICAL_VTIMEZONE_COMPONENT,ICAL_RESTRICTION_ZEROPLUS,0}, + {ICAL_METHOD_ADD,ICAL_VEVENT_COMPONENT,ICAL_VTIMEZONE_COMPONENT,ICAL_RESTRICTION_ZEROPLUS,icalrestriction_must_if_tz_ref}, {ICAL_METHOD_ADD,ICAL_VEVENT_COMPONENT,ICAL_X_COMPONENT,ICAL_RESTRICTION_ZEROPLUS,0}, {ICAL_METHOD_ADD,ICAL_VEVENT_COMPONENT,ICAL_VFREEBUSY_COMPONENT,ICAL_RESTRICTION_ZERO,0}, {ICAL_METHOD_ADD,ICAL_VEVENT_COMPONENT,ICAL_VTODO_COMPONENT,ICAL_RESTRICTION_ZERO,0}, {ICAL_METHOD_ADD,ICAL_VEVENT_COMPONENT,ICAL_VJOURNAL_COMPONENT,ICAL_RESTRICTION_ZERO,0}, - {ICAL_METHOD_CANCEL,ICAL_VEVENT_COMPONENT,ICAL_VTIMEZONE_COMPONENT,ICAL_RESTRICTION_ZEROPLUS,0}, + {ICAL_METHOD_CANCEL,ICAL_VEVENT_COMPONENT,ICAL_VTIMEZONE_COMPONENT,ICAL_RESTRICTION_ZEROPLUS,icalrestriction_must_if_tz_ref}, {ICAL_METHOD_CANCEL,ICAL_VEVENT_COMPONENT,ICAL_X_COMPONENT,ICAL_RESTRICTION_ZEROPLUS,0}, {ICAL_METHOD_CANCEL,ICAL_VEVENT_COMPONENT,ICAL_VTODO_COMPONENT,ICAL_RESTRICTION_ZERO,0}, {ICAL_METHOD_CANCEL,ICAL_VEVENT_COMPONENT,ICAL_VJOURNAL_COMPONENT,ICAL_RESTRICTION_ZERO,0}, @@ -1490,10 +1683,10 @@ icalrestriction_component_record icalrestriction_component_records[] = { {ICAL_METHOD_REFRESH,ICAL_VEVENT_COMPONENT,ICAL_VTODO_COMPONENT,ICAL_RESTRICTION_ZERO,0}, {ICAL_METHOD_REFRESH,ICAL_VEVENT_COMPONENT,ICAL_VJOURNAL_COMPONENT,ICAL_RESTRICTION_ZERO,0}, {ICAL_METHOD_REFRESH,ICAL_VEVENT_COMPONENT,ICAL_VFREEBUSY_COMPONENT,ICAL_RESTRICTION_ZERO,0}, - {ICAL_METHOD_REFRESH,ICAL_VEVENT_COMPONENT,ICAL_VTIMEZONE_COMPONENT,ICAL_RESTRICTION_ZERO,0}, + {ICAL_METHOD_REFRESH,ICAL_VEVENT_COMPONENT,ICAL_VTIMEZONE_COMPONENT,ICAL_RESTRICTION_ZERO,icalrestriction_must_if_tz_ref}, {ICAL_METHOD_REFRESH,ICAL_VEVENT_COMPONENT,ICAL_VALARM_COMPONENT,ICAL_RESTRICTION_ZERO,0}, {ICAL_METHOD_COUNTER,ICAL_VEVENT_COMPONENT,ICAL_VALARM_COMPONENT,ICAL_RESTRICTION_ZEROPLUS,0}, - {ICAL_METHOD_COUNTER,ICAL_VEVENT_COMPONENT,ICAL_VTIMEZONE_COMPONENT,ICAL_RESTRICTION_ZEROPLUS,0}, + {ICAL_METHOD_COUNTER,ICAL_VEVENT_COMPONENT,ICAL_VTIMEZONE_COMPONENT,ICAL_RESTRICTION_ZEROPLUS,icalrestriction_must_if_tz_ref}, {ICAL_METHOD_COUNTER,ICAL_VEVENT_COMPONENT,ICAL_X_COMPONENT,ICAL_RESTRICTION_ZEROPLUS,0}, {ICAL_METHOD_COUNTER,ICAL_VEVENT_COMPONENT,ICAL_VTODO_COMPONENT,ICAL_RESTRICTION_ZERO,0}, {ICAL_METHOD_COUNTER,ICAL_VEVENT_COMPONENT,ICAL_VJOURNAL_COMPONENT,ICAL_RESTRICTION_ZERO,0}, @@ -1502,13 +1695,13 @@ icalrestriction_component_record icalrestriction_component_records[] = { {ICAL_METHOD_DECLINECOUNTER,ICAL_VEVENT_COMPONENT,ICAL_VTODO_COMPONENT,ICAL_RESTRICTION_ZERO,0}, {ICAL_METHOD_DECLINECOUNTER,ICAL_VEVENT_COMPONENT,ICAL_VJOURNAL_COMPONENT,ICAL_RESTRICTION_ZERO,0}, {ICAL_METHOD_DECLINECOUNTER,ICAL_VEVENT_COMPONENT,ICAL_VFREEBUSY_COMPONENT,ICAL_RESTRICTION_ZERO,0}, - {ICAL_METHOD_DECLINECOUNTER,ICAL_VEVENT_COMPONENT,ICAL_VTIMEZONE_COMPONENT,ICAL_RESTRICTION_ZERO,0}, + {ICAL_METHOD_DECLINECOUNTER,ICAL_VEVENT_COMPONENT,ICAL_VTIMEZONE_COMPONENT,ICAL_RESTRICTION_ZERO,icalrestriction_must_if_tz_ref}, {ICAL_METHOD_DECLINECOUNTER,ICAL_VEVENT_COMPONENT,ICAL_VALARM_COMPONENT,ICAL_RESTRICTION_ZERO,0}, {ICAL_METHOD_PUBLISH,ICAL_VFREEBUSY_COMPONENT,ICAL_X_COMPONENT,ICAL_RESTRICTION_ZEROPLUS,0}, {ICAL_METHOD_PUBLISH,ICAL_VFREEBUSY_COMPONENT,ICAL_VEVENT_COMPONENT,ICAL_RESTRICTION_ZERO,0}, {ICAL_METHOD_PUBLISH,ICAL_VFREEBUSY_COMPONENT,ICAL_VTODO_COMPONENT,ICAL_RESTRICTION_ZERO,0}, {ICAL_METHOD_PUBLISH,ICAL_VFREEBUSY_COMPONENT,ICAL_VJOURNAL_COMPONENT,ICAL_RESTRICTION_ZERO,0}, - {ICAL_METHOD_PUBLISH,ICAL_VFREEBUSY_COMPONENT,ICAL_VTIMEZONE_COMPONENT,ICAL_RESTRICTION_ZERO,0}, + {ICAL_METHOD_PUBLISH,ICAL_VFREEBUSY_COMPONENT,ICAL_VTIMEZONE_COMPONENT,ICAL_RESTRICTION_ZERO,icalrestriction_must_if_tz_ref}, {ICAL_METHOD_PUBLISH,ICAL_VFREEBUSY_COMPONENT,ICAL_VALARM_COMPONENT,ICAL_RESTRICTION_ZERO,0}, {ICAL_METHOD_REQUEST,ICAL_VFREEBUSY_COMPONENT,ICAL_X_COMPONENT,ICAL_RESTRICTION_ZEROPLUS,0}, {ICAL_METHOD_REQUEST,ICAL_VFREEBUSY_COMPONENT,ICAL_VALARM_COMPONENT,ICAL_RESTRICTION_ZERO,0}, @@ -1583,5 +1776,5 @@ icalrestriction_component_record icalrestriction_component_records[] = { {ICAL_METHOD_CANCEL,ICAL_VJOURNAL_COMPONENT,ICAL_VEVENT_COMPONENT,ICAL_RESTRICTION_ZERO,0}, {ICAL_METHOD_CANCEL,ICAL_VJOURNAL_COMPONENT,ICAL_VFREEBUSY_COMPONENT,ICAL_RESTRICTION_ZERO,0}, {ICAL_METHOD_CANCEL,ICAL_VJOURNAL_COMPONENT,ICAL_VTODO_COMPONENT,ICAL_RESTRICTION_ZERO,0}, - {ICAL_METHOD_NONE,ICAL_NO_COMPONENT,ICAL_NO_COMPONENT,ICAL_RESTRICTION_NONE,0} + {ICAL_METHOD_NONE,ICAL_NO_COMPONENT,ICAL_NO_COMPONENT,ICAL_RESTRICTION_NONE} }; diff --git a/libical/src/libical/icalrestriction.h b/libical/src/libical/icalrestriction.h index 12421d0f32..409334cf28 100644 --- a/libical/src/libical/icalrestriction.h +++ b/libical/src/libical/icalrestriction.h @@ -27,7 +27,8 @@ ======================================================================*/ -#include "ical.h" +#include "icalproperty.h" +#include "icalcomponent.h" #ifndef ICALRESTRICTION_H #define ICALRESTRICTION_H @@ -48,15 +49,6 @@ typedef enum icalrestriction_kind { int icalrestriction_compare(icalrestriction_kind restr, int count); -icalrestriction_kind -icalrestriction_get_property_restriction(icalproperty_method method, - icalcomponent_kind component, - icalproperty_kind property); - -icalrestriction_kind -icalrestriction_get_component_restriction(icalproperty_method method, - icalcomponent_kind component, - icalcomponent_kind subcomponent); int icalrestriction_is_parameter_allowed(icalproperty_kind property, diff --git a/libical/src/libical/icaltime.c b/libical/src/libical/icaltime.c index 6d651922d5..2fc965e1a8 100644 --- a/libical/src/libical/icaltime.c +++ b/libical/src/libical/icaltime.c @@ -4,7 +4,6 @@ CREATOR: eric 02 June 2000 $Id$ - $Locker$ (C) COPYRIGHT 2000, Eric Busboom, http://www.softwarestudio.org @@ -26,7 +25,12 @@ ======================================================================*/ #include "icaltime.h" +#include "icalvalue.h" #include <assert.h> +#include <string.h> +#include <stdlib.h> +#include <stdio.h> + struct icaltimetype icaltime_from_timet(time_t tm, int is_date, int is_utc) @@ -34,11 +38,12 @@ icaltime_from_timet(time_t tm, int is_date, int is_utc) struct icaltimetype tt; struct tm t; - if(is_utc == 1){ - t = *(gmtime(&tm)); - } else { - t = *(localtime(&tm)); + if(is_utc == 0){ + tm += icaltime_local_utc_offset(); } + + t = *(localtime(&tm)); + tt.second = t.tm_sec; tt.minute = t.tm_min; tt.hour = t.tm_hour; @@ -52,6 +57,7 @@ icaltime_from_timet(time_t tm, int is_date, int is_utc) return tt; } +/* Always returns time in UTC */ time_t icaltime_as_timet(struct icaltimetype tt) { struct tm stm; @@ -68,11 +74,47 @@ time_t icaltime_as_timet(struct icaltimetype tt) stm.tm_isdst = -1; /* prevents mktime from changing hour based on daylight savings */ + if(tt.is_utc == 0){ + stm.tm_sec -= icaltime_local_utc_offset(); + } + tut = mktime(&stm); return tut; } + + +struct icaltimetype icaltime_from_string(const char* str) +{ + struct icaltimetype tt; + icalvalue *v = icalvalue_new_from_string(ICAL_DATETIME_VALUE,str); + + if (v == 0){ + return icaltime_null_time(); + } + + tt = icalvalue_get_datetime(v); + + icalvalue_free(v); + + return tt; + +} + +char ctime_str[20]; +char* icaltime_as_ctime(struct icaltimetype t) +{ + time_t tt = icaltime_as_timet(t); + + sprintf(ctime_str,"%s",ctime(&tt)); + + ctime_str[strlen(ctime_str)-1] = 0; + + return ctime_str; +} + + short days_in_month[] = {0,31,28,31,30,31,30,31,31,30,31,30,31}; short icaltime_days_in_month(short month,short year) @@ -180,20 +222,187 @@ int icaltime_compare(struct icaltimetype a,struct icaltimetype b) } } - -int icaltime_compare_date_only(struct icaltimetype a, struct icaltimetype b) +int +icaltime_compare_date_only (struct icaltimetype a, struct icaltimetype b) { - time_t t1 = icaltime_as_timet(a); - time_t t2 = icaltime_as_timet(b); + time_t t1; + time_t t2; - if (a.year == b.year && a.month == b.month && a.day == b.day) { + if (a.year == b.year && a.month == b.month && a.day == b.day) return 0; - } - if (t1 > t2) { + t1 = icaltime_as_timet (a); + t2 = icaltime_as_timet (b); + + if (t1 > t2) return 1; - } else if (t1 < t2) { + else if (t1 < t2) return -1; + else { + /* not reached */ + assert (0); + return 0; + } +} + +/* convert tt, of timezone tzid, into a utc time */ +struct icaltimetype icaltime_as_utc(struct icaltimetype tt,const char* tzid) +{ + time_t offset, tm; + struct icaltimetype utc; + + offset = icaltime_utc_offset(tt,tzid); + tm = icaltime_as_timet(tt); + + tm += offset; + + utc = icaltime_from_timet(tm,0,0); + + return utc; +} + +/* convert tt, a time in UTC, into a time in timezone tzid */ +struct icaltimetype icaltime_as_zone(struct icaltimetype tt,const char* tzid) +{ + time_t offset, tm; + struct icaltimetype zone; + + offset = icaltime_utc_offset(tt,tzid); + tm = icaltime_as_timet(tt); + + tm -= offset; + + zone = icaltime_from_timet(tm,0,0); + + return zone; + +} + +/* Return the offset of the named zone as seconds. tt is a time + indicating the date for which you want the offset */ +time_t icaltime_utc_offset(struct icaltimetype tt, const char* tzid) +{ + extern long int timezone; + time_t now; + struct tm *stm; + + char *tzstr = 0; + char *tmp; + + /* Put the new time zone into the environment */ + if(getenv("TZ") != 0){ + tzstr = (char*)strdup(getenv("TZ")); + } + + tmp = (char*)malloc(1024); + snprintf(tmp,1024,"TZ=%s",tzid); + + putenv(tmp); + + /* Get the offset */ + + now = icaltime_as_timet(tt); + + stm = localtime(&now); /* This sets 'timezone'*/ + + /* restore the original environment */ + + if(tzstr!=0){ + putenv(tzstr); + } else { + putenv("TZ"); /* Delete from environment */ + } + + return timezone; +} + +time_t icaltime_local_utc_offset() +{ + time_t now; + struct tm *stm; + + stm = localtime(&now); /* This sets 'timezone'*/ + + return timezone; + +} + + + + + + +time_t +icalperiodtype_duration (struct icalperiodtype period); + + +time_t +icalperiodtype_end (struct icalperiodtype period); + + +/* From Russel Steinthal */ +time_t icaldurationtype_as_timet(struct icaldurationtype dur) +{ + return (time_t) (dur.seconds + + (60 * dur.minutes) + + (60 * 60 * dur.hours) + + (60 * 60 * 24 * dur.days) + + (60 * 60 * 24 * 7 * dur.weeks)); +} + +/* From Seth Alves, <alves@hungry.com> */ +struct icaldurationtype icaldurationtype_from_timet(time_t t) +{ + struct icaldurationtype dur; + time_t used = 0; + + dur.weeks = (t - used) / (60 * 60 * 24 * 7); + used += dur.weeks * (60 * 60 * 24 * 7); + dur.days = (t - used) / (60 * 60 * 24); + used += dur.days * (60 * 60 * 24); + dur.hours = (t - used) / (60 * 60); + used += dur.hours * (60 * 60); + dur.minutes = (t - used) / (60); + used += dur.minutes * (60); + dur.seconds = (t - used); + + return dur; +} + +struct icaldurationtype icaldurationtype_from_string(const char* str) +{ + + icalvalue *v = icalvalue_new_from_string(ICAL_DURATION_VALUE,str); + + if( v !=0){ + return icalvalue_get_duration(v); + } else { + struct icaldurationtype dur; + memset(&dur,0,sizeof(struct icaldurationtype)); + return dur; } + } + +struct icaltimetype icaltime_add(struct icaltimetype t, + struct icaldurationtype d) +{ + time_t tt = icaltime_as_timet(t); + time_t dt = icaldurationtype_as_timet(d); + + return icaltime_from_timet(tt + dt, t.is_date, t.is_utc); + +} + +struct icaldurationtype icaltime_subtract(struct icaltimetype t1, + struct icaltimetype t2) +{ + + time_t t1t = icaltime_as_timet(t1); + time_t t2t = icaltime_as_timet(t2); + + return icaldurationtype_from_timet(t1t-t2t); + + +} diff --git a/libical/src/libical/icaltime.h b/libical/src/libical/icaltime.h index 6c5b653c23..1402f65d4e 100644 --- a/libical/src/libical/icaltime.h +++ b/libical/src/libical/icaltime.h @@ -1,11 +1,9 @@ -// -*- Mode: C -*- +/* -*- Mode: C -*- */ /*====================================================================== FILE: icaltime.h CREATOR: eric 02 June 2000 - $Id$ - $Locker$ (C) COPYRIGHT 2000, Eric Busboom, http://www.softwarestudio.org @@ -31,6 +29,13 @@ #include <time.h> +/* icaltime_span is returned by icalcomponent_get_span() */ +struct icaltime_span { + time_t start; /* in UTC */ + time_t end; /* in UTC */ + int is_busy; /* 1->busy time, 0-> free time */ +}; + struct icaltimetype { int year; @@ -45,7 +50,7 @@ struct icaltimetype int is_date; /* 1 -> interpret this as date. */ }; -struct icaltimetype icaltime_null_time(); +struct icaltimetype icaltime_null_time(void); int icaltime_is_null_time(struct icaltimetype t); @@ -58,17 +63,71 @@ short icaltime_day_of_week(struct icaltimetype t); short icaltime_start_doy_of_week(struct icaltimetype t); struct icaltimetype icaltime_from_timet(time_t v, int is_date, int is_utc); +struct icaltimetype icaltime_from_string(const char* str); time_t icaltime_as_timet(struct icaltimetype); +char* icaltime_as_ctime(struct icaltimetype); short icaltime_week_number(short day_of_month, short month, short year); struct icaltimetype icaltime_from_week_number(short week_number, short year); int icaltime_compare(struct icaltimetype a,struct icaltimetype b); + int icaltime_compare_date_only(struct icaltimetype a, struct icaltimetype b); short icaltime_days_in_month(short month,short year); +/* Routines for handling timezones */ + +/* Return the offset of the named zone as seconds. tt is a time + indicating the date for which you want the offset */ +time_t icaltime_utc_offset(struct icaltimetype tt, const char* tzid); + +time_t icaltime_local_utc_offset(); + + +/* convert tt, of timezone tzid, into a utc time */ +struct icaltimetype icaltime_as_utc(struct icaltimetype tt,const char* tzid); + +/* convert tt, a time in UTC, into a time in timezone tzid */ +struct icaltimetype icaltime_as_zone(struct icaltimetype tt,const char* tzid); + + + +struct icaldurationtype +{ + int is_neg; + unsigned int days; + unsigned int weeks; + unsigned int hours; + unsigned int minutes; + unsigned int seconds; +}; + +struct icaldurationtype icaldurationtype_from_timet(time_t t); +struct icaldurationtype icaldurationtype_from_string(const char*); +time_t icaldurationtype_as_timet(struct icaldurationtype duration); + + +struct icalperiodtype +{ + struct icaltimetype start; /* Must be absolute */ + struct icaltimetype end; /* Must be absolute */ + struct icaldurationtype duration; +}; + +time_t icalperiodtype_duration(struct icalperiodtype period); +time_t icalperiodtype_end(struct icalperiodtype period); + + + +struct icaltimetype icaltime_add(struct icaltimetype t, + struct icaldurationtype d); + +struct icaldurationtype icaltime_subtract(struct icaltimetype t1, + struct icaltimetype t2); + + #endif /* !ICALTIME_H */ diff --git a/libical/src/libical/icaltypes.c b/libical/src/libical/icaltypes.c index c7017eb2af..dedde8d866 100644 --- a/libical/src/libical/icaltypes.c +++ b/libical/src/libical/icaltypes.c @@ -4,7 +4,6 @@ CREATOR: eric 16 May 1999 $Id$ - $Locker$ (C) COPYRIGHT 2000, Eric Busboom, http://www.softwarestudio.org @@ -34,7 +33,6 @@ #include <errno.h> /* for errno */ #include <string.h> /* for icalmemory_strdup */ #include <assert.h> -#include <limits.h> /* for SHRT_MAX */ #define TEMP_MAX 1024 @@ -151,75 +149,6 @@ void* icalattachtype_get_binary(struct icalattachtype* v) -time_t -icalperiodtype_duration (struct icalperiodtype period); - - -time_t -icalperiodtype_end (struct icalperiodtype period); - - -/* From Russel Steinthal */ -time_t icaldurationtype_as_timet(struct icaldurationtype dur) -{ - return (time_t) (dur.seconds + - (60 * dur.minutes) + - (60 * 60 * dur.hours) + - (60 * 60 * 24 * dur.days) + - (60 * 60 * 24 * 7 * dur.weeks)); -} - -/* From Seth Alves, <alves@hungry.com> */ -struct icaldurationtype icaldurationtype_from_timet(time_t t) -{ - struct icaldurationtype dur; - time_t used = 0; - - dur.weeks = (t - used) / (60 * 60 * 24 * 7); - used += dur.weeks * (60 * 60 * 24 * 7); - dur.days = (t - used) / (60 * 60 * 24); - used += dur.days * (60 * 60 * 24); - dur.hours = (t - used) / (60 * 60); - used += dur.hours * (60 * 60); - dur.minutes = (t - used) / (60); - used += dur.minutes * (60); - dur.seconds = (t - used); - - return dur; -} - -void icalrecurrencetype_clear(struct icalrecurrencetype *recur) -{ - memset(recur,ICAL_RECURRENCE_ARRAY_MAX_BYTE, - sizeof(struct icalrecurrencetype)); - - recur->week_start = ICAL_NO_WEEKDAY; - recur->freq = ICAL_NO_RECURRENCE; - recur->interval = 1; - memset(&(recur->until),0,sizeof(struct icaltimetype)); - recur->count = 0; -} - -/* The 'day' element of icalrecurrencetype_weekday is encoded to allow -reporesentation of both the day of the week ( Monday, Tueday), but -also the Nth day of the week ( First tuesday of the month, last -thursday of the year) These routines decode the day values. - -The day's position in the period ( Nth-ness) and the numerical value -of the day are encoded together as: pos*7 + dow - */ - -enum icalrecurrencetype_weekday icalrecurrencetype_day_day_of_week(short day) -{ - return abs(day)%8; -} - -short icalrecurrencetype_day_position(short day) -{ - return (day-icalrecurrencetype_day_day_of_week(day))/8; -} - - struct icalreqstattype icalreqstattype_from_string(char* str) { char *p1,*p2; diff --git a/libical/src/libical/icaltypes.h b/libical/src/libical/icaltypes.h index 1130ab2457..d2a106883b 100644 --- a/libical/src/libical/icaltypes.h +++ b/libical/src/libical/icaltypes.h @@ -46,7 +46,7 @@ struct icalattachtype /* converts base64 to binary, fetches url and stores as binary, or just returns data */ -struct icalattachtype* icalattachtype_new(); +struct icalattachtype* icalattachtype_new(void); void icalattachtype_add_reference(struct icalattachtype* v); void icalattachtype_free(struct icalattachtype* v); @@ -69,84 +69,6 @@ struct icalgeotype -/* See RFC 2445 Section 4.3.10, RECUR Value, for an explaination of - the values and fields in struct icalrecurrencetype */ - - -struct icalrecurrencetype -{ - icalrecurrencetype_frequency freq; - - - /* until and count are mutually exclusive. */ - struct icaltimetype until; - int count; - - short interval; - - icalrecurrencetype_weekday week_start; - - /* The BY* parameters can each take a list of values. Here I - * assume that the list of values will not be larger than the - * range of the value -- that is, the client will not name a - * value more than once. - - * Each of the lists is terminated with the value SHRT_MAX - * unless the the list is full. */ - - short by_second[61]; - short by_minute[61]; - short by_hour[25]; - short by_day[8]; /* Encoded value, see below */ - short by_month_day[32]; - short by_year_day[367]; - short by_week_no[54]; - short by_month[13]; - short by_set_pos[367]; -}; - - -void icalrecurrencetype_clear(struct icalrecurrencetype *r); - -/* The 'day' element of icalrecurrencetype_weekday is encoded to allow -reporesentation of both the day of the week ( Monday, Tueday), but -also the Nth day of the week ( First tuesday of the month, last -thursday of the year) These routines decode the day values */ - -/* 1 == Monday, etc. */ -enum icalrecurrencetype_weekday icalrecurrencetype_day_day_of_week(short day); - -/* 0 == any of day of week. 1 == first, 2 = second, -2 == second to last, etc */ -short icalrecurrencetype_day_position(short day); - -struct icaldurationtype -{ - unsigned int days; - unsigned int weeks; - unsigned int hours; - unsigned int minutes; - unsigned int seconds; -}; - -struct icaldurationtype icaldurationtype_from_timet(time_t t); -time_t icaldurationtype_as_timet(struct icaldurationtype duration); - -/* Return the next occurance of 'r' after the time specified by 'after' */ -struct icaltimetype icalrecurrencetype_next_occurance( - struct icalrecurrencetype *r, - struct icaltimetype *after); - - -struct icalperiodtype -{ - struct icaltimetype start; /* Must be absolute */ - struct icaltimetype end; /* Must be absolute */ - struct icaldurationtype duration; -}; - -time_t icalperiodtype_duration(struct icalperiodtype period); -time_t icalperiodtype_end(struct icalperiodtype period); - union icaltriggertype { struct icaltimetype time; @@ -154,6 +76,7 @@ union icaltriggertype }; + /* struct icalreqstattype. This struct contains two string pointers, but don't try to free either of them. The "desc" string is a pointer to a static table inside the library. Don't try to free it. The @@ -168,8 +91,8 @@ operating on a the value of a request_status property. */ struct icalreqstattype { icalrequeststatus code; - char* desc; - char* debug; + const char* desc; + const char* debug; }; struct icalreqstattype icalreqstattype_from_string(char* str); diff --git a/libical/src/libical/icalvalue.c b/libical/src/libical/icalvalue.c index 7c988a4d16..a1ebb64e30 100644 --- a/libical/src/libical/icalvalue.c +++ b/libical/src/libical/icalvalue.c @@ -27,11 +27,9 @@ ======================================================================*/ #ifdef HAVE_CONFIG_H -#include "config.h" +#include <config.h> #endif - -#include "ical.h" #include "icalerror.h" #include "icalmemory.h" #include "icalparser.h" @@ -44,7 +42,6 @@ #include <errno.h> #include <time.h> /* for mktime */ #include <stdlib.h> /* for atoi and atof */ -#include <limits.h> /* for SHRT_MAX */ #if _MAC_OS_ #include "icalmemory_strdup.h" @@ -66,7 +63,7 @@ struct icalvalue_impl { union data { struct icalattachtype v_attach; /* void *v_binary; */ /* use v_attach */ - char *v_string; + const char *v_string; /*char *v_text;*/ /*char *v_caladdress;*/ /*char *v_uri;*/ @@ -94,6 +91,7 @@ struct icalvalue_impl { struct icalrecurrencetype *v_recur; union icaltriggertype v_trigger; icalproperty_method v_method; + icalproperty_status v_status; } data; }; @@ -195,7 +193,7 @@ icalvalue* icalvalue_new_clone(icalvalue* value){ return new; } -char* icalmemory_strdup_and_dequote(char* str) +char* icalmemory_strdup_and_dequote(const char* str) { char* p; char* out = (char*)malloc(sizeof(char) * strlen(str) +1); @@ -253,7 +251,7 @@ char* icalmemory_strdup_and_dequote(char* str) return out; } -icalvalue* icalvalue_new_from_string_with_error(icalvalue_kind kind,char* str,icalproperty** error) +icalvalue* icalvalue_new_from_string_with_error(icalvalue_kind kind,const char* str,icalproperty** error) { icalvalue *value = 0; @@ -381,6 +379,21 @@ icalvalue* icalvalue_new_from_string_with_error(icalvalue_kind kind,char* str,ic break; } + + + case ICAL_STATUS_VALUE: + { + icalproperty_status status = icalenum_string_to_status(str); + + if(status == ICAL_STATUS_NONE){ + value = 0; + } else { + value = icalvalue_new_status(status); + } + + break; + + } case ICAL_GEO_VALUE: { value = 0; @@ -453,7 +466,7 @@ icalvalue* icalvalue_new_from_string_with_error(icalvalue_kind kind,char* str,ic } -icalvalue* icalvalue_new_from_string(icalvalue_kind kind,char* str) +icalvalue* icalvalue_new_from_string(icalvalue_kind kind,const char* str) { return icalvalue_new_from_string_with_error(kind,str,(icalproperty*)0); } @@ -487,7 +500,7 @@ icalvalue_free (icalvalue* value) case ICAL_URI_VALUE: { if (v->data.v_string != 0) { - free(v->data.v_string); + free((void*)v->data.v_string); v->data.v_string = 0; } break; @@ -495,7 +508,7 @@ icalvalue_free (icalvalue* value) case ICAL_RECUR_VALUE: { if(v->data.v_recur != 0){ - free(v->data.v_recur); + free((void*)v->data.v_recur); v->data.v_recur = 0; } break; @@ -529,7 +542,7 @@ icalvalue_is_valid (icalvalue* value) char* icalvalue_binary_as_ical_string(icalvalue* value) { - char* data; + const char* data; char* str; icalerror_check_arg_rz( (value!=0),"value"); data = icalvalue_get_binary(value); @@ -578,7 +591,7 @@ char* icalvalue_utcoffset_as_ical_string(icalvalue* value) char* icalvalue_string_as_ical_string(icalvalue* value) { - char* data; + const char* data; char* str = 0; icalerror_check_arg_rz( (value!=0),"value"); data = ((struct icalvalue_impl*)value)->data.v_string; @@ -628,7 +641,7 @@ char* icalvalue_recur_as_ical_string(icalvalue* value) icalmemory_append_string(&str,&str_p,&buf_sz,"FREQ="); icalmemory_append_string(&str,&str_p,&buf_sz, - icalenum_recurrence_to_string(recur->freq)); + icalrecur_recurrence_to_string(recur->freq)); if(recur->until.year != 0){ @@ -665,14 +678,14 @@ char* icalvalue_recur_as_ical_string(icalvalue* value) if (j == 3) { /* BYDAY */ short pos = icalrecurrencetype_day_position(array[i]); short dow = icalrecurrencetype_day_day_of_week(array[i]); - char *daystr = icalenum_weekday_to_string(dow); - + const char *daystr = icalrecur_weekday_to_string(dow); + if (pos == 0) icalmemory_append_string(&str,&str_p,&buf_sz,daystr); else { sprintf(temp,"%d%s",pos,daystr); icalmemory_append_string(&str,&str_p,&buf_sz,temp); - } + } } else { sprintf(temp,"%d",array[i]); icalmemory_append_string(&str,&str_p,&buf_sz, temp); @@ -694,7 +707,7 @@ char* icalvalue_text_as_ical_string(icalvalue* value) { char *str; char *str_p; char *rtrn; - char *p; + const char *p; size_t buf_sz; int line_length; @@ -1078,7 +1091,7 @@ char* icalvalue_trigger_as_ical_string(icalvalue* value) { return str; } -char* +const char* icalvalue_as_ical_string (icalvalue* value) { struct icalvalue_impl* v = (struct icalvalue_impl*)value; @@ -1143,6 +1156,10 @@ icalvalue_as_ical_string (icalvalue* value) case ICAL_METHOD_VALUE: return icalenum_method_to_string(v->data.v_method); + case ICAL_STATUS_VALUE: + return icalenum_status_to_string(v->data.v_status); + + case ICAL_NO_VALUE: default: { @@ -1267,6 +1284,17 @@ icalvalue_compare(icalvalue* a, icalvalue *b) } } + + case ICAL_STATUS_VALUE: + { + if (icalvalue_get_status(a) == icalvalue_get_status(b)){ + return ICAL_XLICCOMPARETYPE_EQUAL; + } else { + return ICAL_XLICCOMPARETYPE_NOTEQUAL; + } + + } + case ICAL_PERIOD_VALUE: case ICAL_GEO_VALUE: case ICAL_RECUR_VALUE: @@ -1392,7 +1420,7 @@ icalvalue_get_attach(icalvalue* value) icalvalue* -icalvalue_new_binary (char* v) +icalvalue_new_binary (const char* v) { struct icalvalue_impl* impl = icalvalue_new_impl(ICAL_BINARY_VALUE); @@ -1404,7 +1432,7 @@ icalvalue_new_binary (char* v) } void -icalvalue_set_binary(icalvalue* value, char* v) +icalvalue_set_binary(icalvalue* value, const char* v) { struct icalvalue_impl* impl; @@ -1414,7 +1442,7 @@ icalvalue_set_binary(icalvalue* value, char* v) icalerror_check_value_type(value, ICAL_BINARY_VALUE); impl = (struct icalvalue_impl*)value; - if(impl->data.v_string!=0) {free(impl->data.v_string);} + if(impl->data.v_string!=0) {free((void*)impl->data.v_string);} impl->data.v_string = strdup(v); @@ -1424,7 +1452,7 @@ icalvalue_set_binary(icalvalue* value, char* v) } -char* +const char* icalvalue_get_binary(icalvalue* value) { icalerror_check_arg( (value!=0),"value"); @@ -1470,7 +1498,7 @@ icalvalue_get_boolean(icalvalue* value) icalvalue* -icalvalue_new_caladdress (char* v) +icalvalue_new_caladdress (const char* v) { struct icalvalue_impl* impl = icalvalue_new_impl(ICAL_CALADDRESS_VALUE); @@ -1482,7 +1510,7 @@ icalvalue_new_caladdress (char* v) } void -icalvalue_set_caladdress(icalvalue* value, char* v) +icalvalue_set_caladdress(icalvalue* value, const char* v) { struct icalvalue_impl* impl; @@ -1492,7 +1520,7 @@ icalvalue_set_caladdress(icalvalue* value, char* v) icalerror_check_value_type(value, ICAL_CALADDRESS_VALUE); impl = (struct icalvalue_impl*)value; - if(impl->data.v_string!=0) {free(impl->data.v_string);} + if(impl->data.v_string!=0) {free((void*)impl->data.v_string);} impl->data.v_string = strdup(v); @@ -1502,7 +1530,7 @@ icalvalue_set_caladdress(icalvalue* value, char* v) } -char* +const char* icalvalue_get_caladdress(icalvalue* value) { icalerror_check_arg( (value!=0),"value"); @@ -1861,8 +1889,9 @@ icalvalue_get_period(icalvalue* value) return ((struct icalvalue_impl*)value)->data.v_period; } + icalvalue* -icalvalue_new_string (char* v) +icalvalue_new_string (const char* v) { struct icalvalue_impl* impl = icalvalue_new_impl(ICAL_STRING_VALUE); @@ -1874,7 +1903,7 @@ icalvalue_new_string (char* v) } void -icalvalue_set_string(icalvalue* value, char* v) +icalvalue_set_string(icalvalue* value, const char* v) { struct icalvalue_impl* impl; @@ -1884,7 +1913,7 @@ icalvalue_set_string(icalvalue* value, char* v) icalerror_check_value_type(value, ICAL_STRING_VALUE); impl = (struct icalvalue_impl*)value; - if(impl->data.v_string!=0) {free(impl->data.v_string);} + if(impl->data.v_string!=0) {free((void*)impl->data.v_string);} impl->data.v_string = strdup(v); @@ -1894,7 +1923,7 @@ icalvalue_set_string(icalvalue* value, char* v) } -char* +const char* icalvalue_get_string(icalvalue* value) { icalerror_check_arg( (value!=0),"value"); @@ -1905,7 +1934,7 @@ icalvalue_get_string(icalvalue* value) icalvalue* -icalvalue_new_text (char* v) +icalvalue_new_text (const char* v) { struct icalvalue_impl* impl = icalvalue_new_impl(ICAL_TEXT_VALUE); @@ -1917,7 +1946,7 @@ icalvalue_new_text (char* v) } void -icalvalue_set_text(icalvalue* value, char* v) +icalvalue_set_text(icalvalue* value, const char* v) { struct icalvalue_impl* impl; @@ -1927,7 +1956,7 @@ icalvalue_set_text(icalvalue* value, char* v) icalerror_check_value_type(value, ICAL_TEXT_VALUE); impl = (struct icalvalue_impl*)value; - if(impl->data.v_string!=0) {free(impl->data.v_string);} + if(impl->data.v_string!=0) {free((void*)impl->data.v_string);} impl->data.v_string = strdup(v); @@ -1937,7 +1966,7 @@ icalvalue_set_text(icalvalue* value, char* v) } -char* +const char* icalvalue_get_text(icalvalue* value) { icalerror_check_arg( (value!=0),"value"); @@ -2018,7 +2047,7 @@ icalvalue_get_trigger(icalvalue* value) icalvalue* -icalvalue_new_uri (char* v) +icalvalue_new_uri (const char* v) { struct icalvalue_impl* impl = icalvalue_new_impl(ICAL_URI_VALUE); @@ -2030,7 +2059,7 @@ icalvalue_new_uri (char* v) } void -icalvalue_set_uri(icalvalue* value, char* v) +icalvalue_set_uri(icalvalue* value, const char* v) { struct icalvalue_impl* impl; @@ -2040,7 +2069,7 @@ icalvalue_set_uri(icalvalue* value, char* v) icalerror_check_value_type(value, ICAL_URI_VALUE); impl = (struct icalvalue_impl*)value; - if(impl->data.v_string!=0) {free(impl->data.v_string);} + if(impl->data.v_string!=0) {free((void*)impl->data.v_string);} impl->data.v_string = strdup(v); @@ -2050,7 +2079,7 @@ icalvalue_set_uri(icalvalue* value, char* v) } -char* +const char* icalvalue_get_uri(icalvalue* value) { icalerror_check_arg( (value!=0),"value"); @@ -2096,7 +2125,7 @@ icalvalue_get_utcoffset(icalvalue* value) icalvalue* -icalvalue_new_query (char* v) +icalvalue_new_query (const char* v) { struct icalvalue_impl* impl = icalvalue_new_impl(ICAL_QUERY_VALUE); @@ -2108,7 +2137,7 @@ icalvalue_new_query (char* v) } void -icalvalue_set_query(icalvalue* value, char* v) +icalvalue_set_query(icalvalue* value, const char* v) { struct icalvalue_impl* impl; @@ -2118,7 +2147,7 @@ icalvalue_set_query(icalvalue* value, char* v) icalerror_check_value_type(value, ICAL_QUERY_VALUE); impl = (struct icalvalue_impl*)value; - if(impl->data.v_string!=0) {free(impl->data.v_string);} + if(impl->data.v_string!=0) {free((void*)impl->data.v_string);} impl->data.v_string = strdup(v); @@ -2128,7 +2157,7 @@ icalvalue_set_query(icalvalue* value, char* v) } -char* +const char* icalvalue_get_query(icalvalue* value) { icalerror_check_arg( (value!=0),"value"); @@ -2137,3 +2166,38 @@ icalvalue_get_query(icalvalue* value) return ((struct icalvalue_impl*)value)->data.v_string; } + +icalvalue* +icalvalue_new_status (icalproperty_status v) +{ + struct icalvalue_impl* impl = icalvalue_new_impl(ICAL_STATUS_VALUE); + + + icalvalue_set_status((icalvalue*)impl,v); + + return (icalvalue*)impl; +} + +void +icalvalue_set_status(icalvalue* value, icalproperty_status v) +{ + struct icalvalue_impl* impl; + + icalerror_check_arg_rv( (value!=0),"value"); + + icalerror_check_value_type(value, ICAL_STATUS_VALUE); + + impl = (struct icalvalue_impl*)value; + + impl->data.v_status = v; +} + +icalproperty_status +icalvalue_get_status(icalvalue* value) +{ + icalerror_check_arg( (value!=0),"value"); + icalerror_check_value_type(value, ICAL_STATUS_VALUE); + + return ((struct icalvalue_impl*)value)->data.v_status; +} + diff --git a/libical/src/libical/icalvalue.h b/libical/src/libical/icalvalue.h index 18c15abaf4..828e0c7ff5 100644 --- a/libical/src/libical/icalvalue.h +++ b/libical/src/libical/icalvalue.h @@ -5,8 +5,6 @@ $Id$ - $Locker$ - (C) COPYRIGHT 2000, Eric Busboom, http://www.softwarestudio.org @@ -32,20 +30,21 @@ #include <time.h> #include "icalenums.h" #include "icaltypes.h" - +#include "icalrecur.h" + typedef void icalvalue; icalvalue* icalvalue_new(icalvalue_kind kind); icalvalue* icalvalue_new_clone(icalvalue* value); -icalvalue* icalvalue_new_from_string(icalvalue_kind kind, char* str); +icalvalue* icalvalue_new_from_string(icalvalue_kind kind, const char* str); void icalvalue_free(icalvalue* value); int icalvalue_is_valid(icalvalue* value); -char* icalvalue_as_ical_string(icalvalue* value); +const char* icalvalue_as_ical_string(icalvalue* value); icalvalue_kind icalvalue_isa(icalvalue* value); @@ -61,9 +60,9 @@ struct icalattachtype icalvalue_get_attach(icalvalue* value); void icalvalue_set_attach(icalvalue* value, struct icalattachtype v); /* BINARY */ -icalvalue* icalvalue_new_binary(char* v); -char* icalvalue_get_binary(icalvalue* value); -void icalvalue_set_binary(icalvalue* value, char* v); +icalvalue* icalvalue_new_binary(const char* v); +const char* icalvalue_get_binary(icalvalue* value); +void icalvalue_set_binary(icalvalue* value, const char* v); /* BOOLEAN */ icalvalue* icalvalue_new_boolean(int v); @@ -71,9 +70,9 @@ int icalvalue_get_boolean(icalvalue* value); void icalvalue_set_boolean(icalvalue* value, int v); /* CAL-ADDRESS */ -icalvalue* icalvalue_new_caladdress(char* v); -char* icalvalue_get_caladdress(icalvalue* value); -void icalvalue_set_caladdress(icalvalue* value, char* v); +icalvalue* icalvalue_new_caladdress(const char* v); +const char* icalvalue_get_caladdress(icalvalue* value); +void icalvalue_set_caladdress(icalvalue* value, const char* v); /* DATE */ icalvalue* icalvalue_new_date(struct icaltimetype v); @@ -131,14 +130,14 @@ struct icalrecurrencetype icalvalue_get_recur(icalvalue* value); void icalvalue_set_recur(icalvalue* value, struct icalrecurrencetype v); /* STRING # Non-std */ -icalvalue* icalvalue_new_string(char* v); -char* icalvalue_get_string(icalvalue* value); -void icalvalue_set_string(icalvalue* value, char* v); +icalvalue* icalvalue_new_string(const char* v); +const char* icalvalue_get_string(icalvalue* value); +void icalvalue_set_string(icalvalue* value, const char* v); /* TEXT */ -icalvalue* icalvalue_new_text(char* v); -char* icalvalue_get_text(icalvalue* value); -void icalvalue_set_text(icalvalue* value, char* v); +icalvalue* icalvalue_new_text(const char* v); +const char* icalvalue_get_text(icalvalue* value); +void icalvalue_set_text(icalvalue* value, const char* v); /* TIME */ icalvalue* icalvalue_new_time(struct icaltimetype v); @@ -151,9 +150,9 @@ union icaltriggertype icalvalue_get_trigger(icalvalue* value); void icalvalue_set_trigger(icalvalue* value, union icaltriggertype v); /* URI */ -icalvalue* icalvalue_new_uri(char* v); -char* icalvalue_get_uri(icalvalue* value); -void icalvalue_set_uri(icalvalue* value, char* v); +icalvalue* icalvalue_new_uri(const char* v); +const char* icalvalue_get_uri(icalvalue* value); +void icalvalue_set_uri(icalvalue* value, const char* v); /* UTC-OFFSET */ icalvalue* icalvalue_new_utcoffset(int v); @@ -161,8 +160,13 @@ int icalvalue_get_utcoffset(icalvalue* value); void icalvalue_set_utcoffset(icalvalue* value, int v); /* QUERY */ -icalvalue* icalvalue_new_query(char* v); -char* icalvalue_get_query(icalvalue* value); -void icalvalue_set_query(icalvalue* value, char* v); +icalvalue* icalvalue_new_query(const char* v); +const char* icalvalue_get_query(icalvalue* value); +void icalvalue_set_query(icalvalue* value, const char* v); + +/* STATUS #Non-st */ +icalvalue* icalvalue_new_status(icalproperty_status v); +icalproperty_status icalvalue_get_status(icalvalue* value); +void icalvalue_set_status(icalvalue* value, icalproperty_status v); -#endif ICALVALUE_H +#endif /*ICALVALUE_H*/ diff --git a/libical/src/libical/icalversion.h.in b/libical/src/libical/icalversion.h.in index aaeeed6666..5d213693e5 100644 --- a/libical/src/libical/icalversion.h.in +++ b/libical/src/libical/icalversion.h.in @@ -1,3 +1,7 @@ +#ifndef ICAL_VERSION_H +#define ICAL_VERSION_H #define ICAL_PACKAGE "@PACKAGE@" #define ICAL_VERSION "@VERSION@" + +#endif diff --git a/libical/src/libical/icalyacc.c b/libical/src/libical/icalyacc.c index c93fcc3df1..8cfd94693f 100644 --- a/libical/src/libical/icalyacc.c +++ b/libical/src/libical/icalyacc.c @@ -4,6 +4,13 @@ #define YYBISON 1 /* Identify Bison output. */ +#define yyparse ical_yyparse +#define yylex ical_yylex +#define yyerror ical_yyerror +#define yylval ical_yylval +#define yychar ical_yychar +#define yydebug ical_yydebug +#define yynerrs ical_yynerrs #define DIGITS 257 #define INTNUMBER 258 #define FLOATNUMBER 259 @@ -164,20 +171,19 @@ - ================================b======================================*/ + =======================================================================*/ #include <stdlib.h> #include <string.h> /* for strdup() */ -#include <limits.h> /* for SHRT_MAX*/ #include "icalparser.h" -#include "ical.h" #include "pvl.h" -#define YYERROR_VERBOSE -#define YYDEBUG 1 - icalvalue *icalparser_yy_value; /* Current Value */ +void ical_yyerror(char* s); +void icalparser_clear_flex_input(); +int ical_yy_lex(void); + /* Globals for UTCOFFSET values */ int utc; int utc_b; @@ -201,7 +207,7 @@ void set_value_type(icalvalue_kind kind); void set_parser_value_state(); struct icaltimetype fill_datetime(char* d, char* t); void ical_yy_error(char *s); /* Don't know why I need this.... */ -/*int yylex(void); /* Or this. */ +int yylex(void); /* Or this. */ @@ -209,58 +215,11 @@ void ical_yy_error(char *s); /* Don't know why I need this.... */ VALUEs, that is, ) correctly. */ -#line 76 "icalyacc.y" +#line 75 "icalyacc.y" typedef union { float v_float; int v_int; char* v_string; - - /* Renaming hack */ -#define yymaxdepth ical_yy_maxdepth -#define yyparse ical_yy_parse -#define yylex ical_yy_lex -#define yyerror ical_yy_error -#define yylval ical_yy_lval -#define yychar ical_yy_char -#define yydebug ical_yy_debug -#define yypact ical_yy_pact -#define yyr1 ical_yy_r1 -#define yyr2 ical_yy_r2 -#define yydef ical_yy_def -#define yychk ical_yy_chk -#define yypgo ical_yy_pgo -#define yyact ical_yy_act -#define yyexca ical_yy_exca -#define yyerrflag ical_yy_errflag -#define yynerrs ical_yy_nerrs -#define yyps ical_yy_ps -#define yypv ical_yy_pv -#define yys ical_yy_s -#define yy_yys ical_yy_yys -#define yystate ical_yy_state -#define yytmp ical_yy_tmp -#define yyv ical_yy_v -#define yy_yyv ical_yy_yyv -#define yyval ical_yy_val -#define yylloc ical_yy_lloc -#define yyreds ical_yy_reds -#define yytoks ical_yy_toks -#define yylhs ical_yy_yylhs -#define yylen ical_yy_yylen -#define yydefred ical_yy_yydefred -#define yydgoto ical_yy_yydgoto -#define yydefred ical_yy_yydefred -#define yydgoto ical_yy_yydgoto -#define yysindex ical_yy_yysindex -#define yyrindex ical_yy_yyrindex -#define yygindex ical_yy_yygindex -#define yytable ical_yy_yytable -#define yycheck ical_yy_yycheck -#define yyname ical_yy_yyname -#define yyrule ical_yy_yyrule - - - } YYSTYPE; #ifndef YYDEBUG #define YYDEBUG 1 @@ -372,15 +331,15 @@ static const short yyrhs[] = { 143, #if YYDEBUG != 0 static const short yyrline[] = { 0, - 159, 161, 162, 163, 164, 165, 166, 167, 168, 174, - 176, 179, 182, 197, 199, 202, 204, 206, 222, 223, - 225, 230, 233, 236, 240, 244, 249, 253, 258, 263, - 268, 271, 274, 278, 283, 288, 297, 318, 350, 352, - 353, 354, 355, 356, 357, 361, 363, 364, 365, 366, - 367, 368, 373, 375, 377, 379, 380, 382, 387, 389, - 392, 394, 395, 396, 397, 398, 399, 400, 401, 402, - 403, 404, 405, 406, 407, 408, 409, 410, 413, 416, - 420, 422, 424, 432, 433, 435, 441 + 181, 183, 184, 185, 186, 187, 188, 189, 190, 196, + 198, 201, 204, 219, 221, 224, 226, 228, 244, 245, + 247, 252, 255, 258, 262, 266, 271, 275, 280, 285, + 290, 294, 298, 303, 308, 313, 322, 343, 375, 377, + 378, 379, 380, 381, 382, 386, 388, 389, 390, 391, + 392, 393, 398, 400, 402, 404, 405, 407, 411, 413, + 416, 418, 419, 420, 421, 422, 423, 424, 425, 426, + 427, 428, 429, 430, 431, 432, 433, 434, 437, 440, + 444, 446, 448, 456, 457, 459, 465 }; #endif @@ -1067,7 +1026,7 @@ yyreduce: switch (yyn) { case 9: -#line 168 "icalyacc.y" +#line 190 "icalyacc.y" { icalparser_yy_value = 0; icalparser_clear_flex_input(); @@ -1075,15 +1034,15 @@ case 9: ; break;} case 11: -#line 178 "icalyacc.y" +#line 200 "icalyacc.y" { icalparser_yy_value = icalvalue_new_boolean(1); ; break;} case 12: -#line 180 "icalyacc.y" +#line 202 "icalyacc.y" { icalparser_yy_value = icalvalue_new_boolean(0); ; break;} case 13: -#line 183 "icalyacc.y" +#line 205 "icalyacc.y" { struct icaltimetype stm; @@ -1099,23 +1058,23 @@ case 13: ; break;} case 14: -#line 198 "icalyacc.y" +#line 220 "icalyacc.y" {utc = 0;; break;} case 15: -#line 199 "icalyacc.y" +#line 221 "icalyacc.y" {utc = 1;; break;} case 16: -#line 203 "icalyacc.y" +#line 225 "icalyacc.y" {utc_b = 0;; break;} case 17: -#line 204 "icalyacc.y" +#line 226 "icalyacc.y" {utc_b = 1;; break;} case 18: -#line 208 "icalyacc.y" +#line 230 "icalyacc.y" { struct icaltimetype stm; stm = fill_datetime(yyvsp[-3].v_string, yyvsp[-1].v_string); @@ -1127,100 +1086,103 @@ case 18: ; break;} case 21: -#line 226 "icalyacc.y" +#line 248 "icalyacc.y" { duration.weeks = atoi(yyvsp[-1].v_string); ; break;} case 22: -#line 231 "icalyacc.y" +#line 253 "icalyacc.y" { ; break;} case 23: -#line 234 "icalyacc.y" +#line 256 "icalyacc.y" { ; break;} case 24: -#line 237 "icalyacc.y" +#line 259 "icalyacc.y" { ; break;} case 25: -#line 241 "icalyacc.y" +#line 263 "icalyacc.y" { duration.hours = atoi(yyvsp[-1].v_string); ; break;} case 26: -#line 245 "icalyacc.y" +#line 267 "icalyacc.y" { duration.hours = atoi(yyvsp[-2].v_string); ; break;} case 27: -#line 250 "icalyacc.y" +#line 272 "icalyacc.y" { duration.minutes = atoi(yyvsp[-1].v_string); ; break;} case 28: -#line 254 "icalyacc.y" +#line 276 "icalyacc.y" { duration.minutes = atoi(yyvsp[-2].v_string); ; break;} case 29: -#line 259 "icalyacc.y" +#line 281 "icalyacc.y" { duration.seconds = atoi(yyvsp[-1].v_string); ; break;} case 30: -#line 264 "icalyacc.y" +#line 286 "icalyacc.y" { duration.days = atoi(yyvsp[-1].v_string); ; break;} case 31: -#line 269 "icalyacc.y" +#line 291 "icalyacc.y" { + duration.is_neg = 0; ; break;} case 32: -#line 272 "icalyacc.y" +#line 295 "icalyacc.y" { + duration.is_neg = 0; ; break;} case 33: -#line 275 "icalyacc.y" -{ +#line 299 "icalyacc.y" +{ + duration.is_neg = 1; ; break;} case 34: -#line 279 "icalyacc.y" +#line 304 "icalyacc.y" { icalparser_yy_value = icalvalue_new_duration(duration); memset(&duration,0, sizeof(duration)); ; break;} case 35: -#line 284 "icalyacc.y" +#line 309 "icalyacc.y" { icalparser_yy_value = icalvalue_new_duration(duration); memset(&duration,0, sizeof(duration)); ; break;} case 36: -#line 289 "icalyacc.y" +#line 314 "icalyacc.y" { icalparser_yy_value = icalvalue_new_duration(duration); memset(&duration,0, sizeof(duration)); ; break;} case 37: -#line 298 "icalyacc.y" +#line 323 "icalyacc.y" { struct icalperiodtype p; @@ -1243,7 +1205,7 @@ case 37: ; break;} case 38: -#line 319 "icalyacc.y" +#line 344 "icalyacc.y" { struct icalperiodtype p; @@ -1272,199 +1234,199 @@ case 38: ; break;} case 39: -#line 351 "icalyacc.y" +#line 376 "icalyacc.y" {clear_recur();recur.freq = ICAL_SECONDLY_RECURRENCE;; break;} case 40: -#line 352 "icalyacc.y" +#line 377 "icalyacc.y" {clear_recur();recur.freq = ICAL_MINUTELY_RECURRENCE;; break;} case 41: -#line 353 "icalyacc.y" +#line 378 "icalyacc.y" {clear_recur();recur.freq = ICAL_HOURLY_RECURRENCE;; break;} case 42: -#line 354 "icalyacc.y" +#line 379 "icalyacc.y" {clear_recur();recur.freq = ICAL_DAILY_RECURRENCE;; break;} case 43: -#line 355 "icalyacc.y" +#line 380 "icalyacc.y" {clear_recur();recur.freq = ICAL_WEEKLY_RECURRENCE;; break;} case 44: -#line 356 "icalyacc.y" +#line 381 "icalyacc.y" {clear_recur();recur.freq = ICAL_MONTHLY_RECURRENCE;; break;} case 45: -#line 357 "icalyacc.y" +#line 382 "icalyacc.y" {clear_recur();recur.freq = ICAL_YEARLY_RECURRENCE;; break;} case 46: -#line 362 "icalyacc.y" +#line 387 "icalyacc.y" { skiplist[skippos]=ICAL_SUNDAY_WEEKDAY; ; break;} case 47: -#line 363 "icalyacc.y" +#line 388 "icalyacc.y" { skiplist[skippos]=ICAL_MONDAY_WEEKDAY; ; break;} case 48: -#line 364 "icalyacc.y" +#line 389 "icalyacc.y" { skiplist[skippos]=ICAL_TUESDAY_WEEKDAY; ; break;} case 49: -#line 365 "icalyacc.y" +#line 390 "icalyacc.y" { skiplist[skippos]=ICAL_WEDNESDAY_WEEKDAY; ; break;} case 50: -#line 366 "icalyacc.y" +#line 391 "icalyacc.y" { skiplist[skippos]=ICAL_THURSDAY_WEEKDAY; ; break;} case 51: -#line 367 "icalyacc.y" +#line 392 "icalyacc.y" { skiplist[skippos]=ICAL_FRIDAY_WEEKDAY; ; break;} case 52: -#line 368 "icalyacc.y" +#line 393 "icalyacc.y" { skiplist[skippos]=ICAL_SATURDAY_WEEKDAY; ; break;} case 53: -#line 374 "icalyacc.y" +#line 399 "icalyacc.y" {if( skippos<8) skippos++;; break;} case 54: -#line 375 "icalyacc.y" +#line 400 "icalyacc.y" { dow_pos = atoi(yyvsp[-1].v_string); skiplist[skippos] += 8*dow_pos; if( skippos<8) skippos++; ; break;} case 55: -#line 377 "icalyacc.y" +#line 402 "icalyacc.y" { dow_pos = atoi(yyvsp[-1].v_string); skiplist[skippos] -= 8*dow_pos; if( skippos<8) skippos++; ; break;} case 56: -#line 379 "icalyacc.y" +#line 404 "icalyacc.y" {if( skippos<8) skippos++;; break;} case 57: -#line 380 "icalyacc.y" +#line 405 "icalyacc.y" { dow_pos = atoi(yyvsp[-1].v_string); skiplist[skippos] += 8*dow_pos;if( skippos<8) skippos++;; break;} case 58: -#line 382 "icalyacc.y" +#line 407 "icalyacc.y" { dow_pos = atoi(yyvsp[-1].v_string); skiplist[skippos] -= 8*dow_pos;if( skippos<8) skippos++;; break;} case 59: -#line 388 "icalyacc.y" +#line 412 "icalyacc.y" { skiplist[skippos] = atoi(yyvsp[0].v_string); skippos++;; break;} case 60: -#line 389 "icalyacc.y" +#line 413 "icalyacc.y" { skiplist[skippos] = atoi(yyvsp[0].v_string); if (skippos<367) skippos++;; break;} case 61: -#line 393 "icalyacc.y" +#line 417 "icalyacc.y" {recur.interval = atoi(yyvsp[0].v_string);; break;} case 62: -#line 394 "icalyacc.y" +#line 418 "icalyacc.y" {recur.week_start = ICAL_SUNDAY_WEEKDAY;; break;} case 63: -#line 395 "icalyacc.y" +#line 419 "icalyacc.y" {recur.week_start = ICAL_MONDAY_WEEKDAY;; break;} case 64: -#line 396 "icalyacc.y" +#line 420 "icalyacc.y" {recur.week_start = ICAL_TUESDAY_WEEKDAY;; break;} case 65: -#line 397 "icalyacc.y" +#line 421 "icalyacc.y" {recur.week_start = ICAL_WEDNESDAY_WEEKDAY;; break;} case 66: -#line 398 "icalyacc.y" +#line 422 "icalyacc.y" {recur.week_start = ICAL_THURSDAY_WEEKDAY;; break;} case 67: -#line 399 "icalyacc.y" +#line 423 "icalyacc.y" {recur.week_start = ICAL_FRIDAY_WEEKDAY;; break;} case 68: -#line 400 "icalyacc.y" +#line 424 "icalyacc.y" {recur.week_start = ICAL_SATURDAY_WEEKDAY;; break;} case 69: -#line 401 "icalyacc.y" +#line 425 "icalyacc.y" {copy_list(recur.by_second,60);; break;} case 70: -#line 402 "icalyacc.y" +#line 426 "icalyacc.y" {copy_list(recur.by_minute,60);; break;} case 71: -#line 403 "icalyacc.y" +#line 427 "icalyacc.y" {copy_list(recur.by_hour,24);; break;} case 72: -#line 404 "icalyacc.y" +#line 428 "icalyacc.y" {copy_list(recur.by_day,7);; break;} case 73: -#line 405 "icalyacc.y" +#line 429 "icalyacc.y" {copy_list(recur.by_month,12);; break;} case 74: -#line 406 "icalyacc.y" +#line 430 "icalyacc.y" {copy_list(recur.by_month_day,31);; break;} case 75: -#line 407 "icalyacc.y" +#line 431 "icalyacc.y" {copy_list(recur.by_year_day,366);; break;} case 76: -#line 408 "icalyacc.y" +#line 432 "icalyacc.y" {copy_list(recur.by_week_no,53);; break;} case 77: -#line 409 "icalyacc.y" +#line 433 "icalyacc.y" {copy_list(recur.by_set_pos,366);; break;} case 78: -#line 411 "icalyacc.y" +#line 435 "icalyacc.y" { recur.until = icalvalue_get_datetime(icalparser_yy_value); icalvalue_free(icalparser_yy_value); icalparser_yy_value=0;; break;} case 79: -#line 414 "icalyacc.y" +#line 438 "icalyacc.y" { recur.until = icalvalue_get_date(icalparser_yy_value); icalvalue_free(icalparser_yy_value); icalparser_yy_value=0;; break;} case 80: -#line 417 "icalyacc.y" +#line 441 "icalyacc.y" { recur.count = atoi(yyvsp[0].v_string); ; break;} case 83: -#line 426 "icalyacc.y" +#line 450 "icalyacc.y" { icalparser_yy_value = icalvalue_new_recur(recur); ; break;} case 84: -#line 432 "icalyacc.y" +#line 456 "icalyacc.y" { utcsign = 1; ; break;} case 85: -#line 433 "icalyacc.y" +#line 457 "icalyacc.y" { utcsign = -1; ; break;} case 86: -#line 437 "icalyacc.y" +#line 461 "icalyacc.y" { icalparser_yy_value = icalvalue_new_utcoffset( utcsign * (yyvsp[-1].v_int*3600) + (yyvsp[0].v_int*60) ); ; break;} case 87: -#line 442 "icalyacc.y" +#line 466 "icalyacc.y" { icalparser_yy_value = icalvalue_new_utcoffset(utcsign * (yyvsp[-2].v_int*3600) + (yyvsp[-1].v_int*60) +(yyvsp[0].v_int)); ; @@ -1691,7 +1653,7 @@ yyerrhandle: } return 1; } -#line 448 "icalyacc.y" +#line 472 "icalyacc.y" @@ -1701,7 +1663,6 @@ void clear_recur() skippos = 0; icalrecurrencetype_clear(&recur); - recur.week_start = ICAL_MONDAY_WEEKDAY; } void copy_list(short* array, size_t size) @@ -1731,7 +1692,7 @@ struct icaltimetype fill_datetime(char* datestr, char* timestr) } -void yyerror(char* s) +void ical_yyerror(char* s) { /*fprintf(stderr,"Parse error \'%s\'\n", s);*/ } diff --git a/libical/src/libical/icalyacc.y b/libical/src/libical/icalyacc.y index ac1705bc52..d4d7c94b51 100644 --- a/libical/src/libical/icalyacc.y +++ b/libical/src/libical/icalyacc.y @@ -6,7 +6,7 @@ DESCRIPTION: - $Id: icalyacc.y,v 1.8 2000/11/22 05:11:26 federico Exp $ + $Id: icalyacc.y,v 1.9 2000/12/11 23:01:22 federico Exp $ $Locker: $ (C) COPYRIGHT 1999 Eric Busboom @@ -27,20 +27,19 @@ - ================================b======================================*/ + =======================================================================*/ #include <stdlib.h> #include <string.h> /* for strdup() */ -#include <limits.h> /* for SHRT_MAX*/ #include "icalparser.h" -#include "ical.h" #include "pvl.h" -#define YYERROR_VERBOSE -#define YYDEBUG 1 - icalvalue *icalparser_yy_value; /* Current Value */ +void ical_yyerror(char* s); +void icalparser_clear_flex_input(); +int ical_yy_lex(void); + /* Globals for UTCOFFSET values */ int utc; int utc_b; @@ -64,7 +63,7 @@ void set_value_type(icalvalue_kind kind); void set_parser_value_state(); struct icaltimetype fill_datetime(char* d, char* t); void ical_yy_error(char *s); /* Don't know why I need this.... */ -/*int yylex(void); /* Or this. */ +int yylex(void); /* Or this. */ @@ -77,11 +76,14 @@ void ical_yy_error(char *s); /* Don't know why I need this.... */ float v_float; int v_int; char* v_string; +} + /* Renaming hack */ + +/* #define yymaxdepth ical_yy_maxdepth #define yyparse ical_yy_parse -#define yylex ical_yy_lex #define yyerror ical_yy_error #define yylval ical_yy_lval #define yychar ical_yy_char @@ -121,11 +123,31 @@ void ical_yy_error(char *s); /* Don't know why I need this.... */ #define yycheck ical_yy_yycheck #define yyname ical_yy_yyname #define yyrule ical_yy_yyrule +#define yy_scan_bytes ical_yy_scan_bytes +#define yy_scan_string ical_yy_scan_string +#define yy_scan_buffer ical_yy_scan_buffer +*/ + +/* These are redefined with the -P option to flex */ +/* +#define yy_create_buffer ical_yy_create_buffer +#define yy_delete_buffer ical_yy_delete_buffer +#define yy_flex_debug ical_yy_flex_debug +#define yy_init_buffer ical_yy_init_buffer +#define yy_flush_buffer ical_yy_flush_buffer +#define yy_load_buffer_state ical_yy_load_buffer_state +#define yy_switch_to_buffer ical_yy_switch_to_buffer +#define yyin ical_yyin +#define yyleng ical_yyleng +#define yylex ical_yylex +#define yylineno ical_yylineno +#define yyout ical_yyout +#define yyrestart ical_yyrestart +#define yytext ical_yytext +#define yywrap ical_yywrap +*/ - -} - %token <v_string> DIGITS %token <v_int> INTNUMBER %token <v_float> FLOATNUMBER @@ -267,12 +289,15 @@ dur_day: DIGITS 'D' dur_prefix: /* empty */ { + duration.is_neg = 0; } | '+' { + duration.is_neg = 0; } | '-' - { + { + duration.is_neg = 1; } duration_value: dur_prefix 'P' dur_date @@ -366,7 +391,7 @@ weekday: | TH { skiplist[skippos]=ICAL_THURSDAY_WEEKDAY; } | FR { skiplist[skippos]=ICAL_FRIDAY_WEEKDAY; } | SA { skiplist[skippos]=ICAL_SATURDAY_WEEKDAY; } - ; + ; /* HACK. The skippos has only 8 positions, but the spec permits any number */ @@ -381,7 +406,6 @@ weekday_list: skiplist[skippos] += 8*dow_pos;if( skippos<8) skippos++;} | weekday_list COMMA MINUS DIGITS weekday { dow_pos = atoi($4); skiplist[skippos] -= 8*dow_pos;if( skippos<8) skippos++;} - ; recur_list: @@ -454,7 +478,6 @@ void clear_recur() skippos = 0; icalrecurrencetype_clear(&recur); - recur.week_start = ICAL_MONDAY_WEEKDAY; } void copy_list(short* array, size_t size) @@ -484,7 +507,7 @@ struct icaltimetype fill_datetime(char* datestr, char* timestr) } -void yyerror(char* s) +void ical_yyerror(char* s) { /*fprintf(stderr,"Parse error \'%s\'\n", s);*/ } diff --git a/libical/src/libical/pvl.c b/libical/src/libical/pvl.c index 94eaeac874..2a733e8aa9 100644 --- a/libical/src/libical/pvl.c +++ b/libical/src/libical/pvl.c @@ -309,14 +309,14 @@ pvl_insert_ordered(pvl_list l,pvl_comparef f,void *d) /* smaller than head, add to head */ - if ( ((*f)(d,L->head->d)) < 0) + if ( ((*f)(d,L->head->d)) <= 0) { pvl_unshift(l,d); return; } /* larger than tail, add to tail */ - if ( (*f)(d,L->tail->d) > 0) + if ( (*f)(d,L->tail->d) >= 0) { pvl_push(l,d); return; @@ -324,10 +324,10 @@ pvl_insert_ordered(pvl_list l,pvl_comparef f,void *d) /* Search for the first element that is smaller, and add before it */ - + for (P=L->head; P != 0; P = P->next) { - if ( (*f)(P->d,d) > 0) + if ( (*f)(P->d,d) >= 0) { pvl_insert_before(l,P,d); return; diff --git a/libical/src/libical/pvl.h b/libical/src/libical/pvl.h index 40ca516e9f..14a15a15eb 100644 --- a/libical/src/libical/pvl.h +++ b/libical/src/libical/pvl.h @@ -39,7 +39,7 @@ extern int pvl_list_count; /* Create new lists or elements */ pvl_elem pvl_new_element(void* d, pvl_elem next,pvl_elem prior); -pvl_list pvl_newlist(); +pvl_list pvl_newlist(void); void pvl_free(pvl_list); /* Add, remove, or get the head of the list */ diff --git a/libical/src/libicalss/Makefile.am b/libical/src/libicalss/Makefile.am index e4431cb492..0cbecbedea 100644 --- a/libical/src/libicalss/Makefile.am +++ b/libical/src/libicalss/Makefile.am @@ -1,36 +1,59 @@ +lib_LTLIBRARIES = libicalss.la +YFLAGS =-d -v -p ss +LFLAGS = -Pss +LEX_OUTPUT_ROOT = lex.ss -#noinst_LTLIBRARIES = libicalss.la -lib_LIBRARIES = libicalss.a - -libicalss_a_SOURCES =\ - icalcalendar.c \ - icalcalendar.h \ - icalset.h \ - icalset.c \ - icalfileset.c \ - icalfileset.h \ - icalfilesetimpl.h \ - icaldirset.c \ - icaldirset.h \ - icalcsdb.h \ - icalcstp.h \ - icalgauge.h \ - icalgauge.c - -include_HEADERS =\ - icalcalendar.h \ - icalset.h - icalfileset.h \ - icalfilesetimpl.h \ - icaldirset.h \ - icalcsdb.h \ - icalcstp.h \ - icalgauge.h - -INCLUDES = \ - -I ../libical/ \ - -I $(srcdir)/../libical/ \ - -I .. \ - -I$(srcdir)/.. +all: icalss.h +INCLUDES = \ + -I$(top_builddir) \ + -I$(top_srcdir)/src \ + -I$(top_builddir)/src \ + -I$(top_srcdir)/src/libical \ + -I$(srcdir)/libical + +libicalss_la_LDFLAGS = -version-info 0:0:0 + +libicalss_la_SOURCES = \ + icalclassify.c \ + icaldirset.c \ + icaldirsetimpl.h \ + icalfileset.c \ + icalfilesetimpl.h \ + icalgauge.c \ + icalgaugeimpl.h \ + icalset.c \ + icalsslexer.l \ + icalssutil.c \ + icalssyacc.h \ + icalssyacc.y \ + icalspanlist.c \ + icalmessage.c \ + icalcstp.c + +libicalssincludedir = $(includedir) + +COMBINEDHEADERS = \ + icalset.h \ + icalfileset.h \ + icaldirset.h \ + icalcalendar.h \ + icalgauge.h \ + icalssutil.h \ + icalclassify.h \ + icalspanlist.h \ + icalmessage.h \ + icalcstp.h + +icalss.h: $(COMBINEDHEADERS) + cat $(COMBINEDHEADERS) | egrep -v "#include.*\"ical" \ + | egrep -v "#include.*\"pvl\.h\"" > icalss.h + + +libicalssinclude_HEADERS = icalss.h + +CONFIG_CLEAN_FILES = y.output + +EXTRA_DIST = \ + $(COMBINEDHEADERS) \ diff --git a/libical/src/libicalss/icalcstp.h b/libical/src/libicalss/icalcstp.h index fea6c89616..63f5af913f 100644 --- a/libical/src/libicalss/icalcstp.h +++ b/libical/src/libicalss/icalcstp.h @@ -29,43 +29,15 @@ #include "ical.h" -typedef void* icalcstp; - -typedef struct icalcstp_stubs; - -icalcstp* icalcstp_new(icalcstp_stubs* stubs, - int incoming, int outgoing); - -void* icalcstp_free(icalcstp* cstp); - -/* Send or recieve data directly to/from the network. These calls are - needed for the AUTHENTICATE command and possibly others */ -ssize_t icalcstp_send(icalcstp* cstp, char* msg); -ssize_t icalcstp_recieve(icalcstp* cstp, char* msg); - -int icalcstp_set_timeout(icalcstp* cstp, int sec); - -typedef struct icalcstp_response { - icalrequeststatus code - char *arg; /* These strings are owned by libical */ - char *debug_text; - char *more_text; - void* result; -} icalcstp_response; - /********************** Server (Reciever) Interfaces *************************/ /* On the server side, the caller will recieve data from the incoming - socket and pass it to icalcstp_process_incoming. The caller then - takes the return from _process_incoming and sends it out through - the socket. This gives the caller a point of control. If the cstp - code connected to the socket itself, it would be hard for the - caller to do anything else after the cstp code was started. - - However, some commands will use the sockets directly, though the - _send and _recieve routines. Example is Authenticate and Starttls, - which need several exchanges of data + socket and pass it to icalcstps_next_input. The caller then takes + the return from icalcstps_next_outpu and sends it out through the + socket. This gives the caller a point of control. If the cstp code + connected to the socket itself, it would be hard for the caller to + do anything else after the cstp code was started. All of the server abd client command routines will generate response codes. On the server side, these responses will be turned @@ -73,63 +45,117 @@ typedef struct icalcstp_response { is the one sent from the server. Since each command can return multiple responses, the responses are - stored in the icalcstp object and are accesses by - icalcstp_first_response() and icalcstp_next_response() + stored in the icalcstps object and are accesses by + icalcstps_first_response() and icalcstps_next_response() + + How to use: + + 1) Construct a new icalcstps, bound to your code via stubs + 2) Repeat forever: + 2a) Get string from client & give to icalcstps_next_input() + 2b) Call icalcstps_next_output. Send string to client. */ - -/* Process a single line of incomming data */ -char* icalcstp_process_incoming(icalcstp* cstp, char* string); + +typedef void icalcstps; /* Er, they aren't really stubs, but pointers to the rountines that - icalcstp_process_incoming will call when it recognizes a CSTP + icalcstps_process_incoming will call when it recognizes a CSTP command in the data. BTW, the CONTINUE command is named 'cont' because 'continue' is a C keyword */ - -struct icalcstp_server_stubs { - icalerrorenum (*abort)(icalcstp* cstp); - icalerrorenum (*authenticate)(icalcstp* cstp, char* mechanism, +struct icalcstps_stubs { + icalerrorenum (*abort)(icalcstps* cstp); + icalerrorenum (*authenticate)(icalcstps* cstp, char* mechanism, char* data); - icalerrorenum (*calidexpand)(icalcstp* cstp, char* calid); - icalerrorenum (*capability)(icalcstp* cstp); - icalerrorenum (*cont)(icalcstp* cstp, unsigned int time); - icalerrorenum (*identify)(icalcstp* cstp, char* id); - icalerrorenum (*disconnect)(icalcstp* cstp); - icalerrorenum (*sendata)(icalcstp* cstp, unsigned int time, + icalerrorenum (*calidexpand)(icalcstps* cstp, char* calid); + icalerrorenum (*capability)(icalcstps* cstp); + icalerrorenum (*cont)(icalcstps* cstp, unsigned int time); + icalerrorenum (*identify)(icalcstps* cstp, char* id); + icalerrorenum (*disconnect)(icalcstps* cstp); + icalerrorenum (*sendata)(icalcstps* cstp, unsigned int time, icalcomponent *comp); - icalerrorenum (*starttls)(icalcstp* cstp, char* command, + icalerrorenum (*starttls)(icalcstps* cstp, char* command, char* data); - icalerrorenum (*upnexpand)(icalcstp* cstp, char* upn); - icalerrorenum (*unknown)(icalcstp* cstp, char* command, char* data); -} + icalerrorenum (*upnexpand)(icalcstps* cstp, char* upn); + icalerrorenum (*unknown)(icalcstps* cstp, char* command, char* data); +}; + + +icalcstps* icalcstps_new(struct icalcstps_stubs stubs); + +void icalcstps_free(icalcstps* cstp); + +int icalcstps_set_timeout(icalcstps* cstp, int sec); + +/* Get the next string to send to the client */ +char* icalcstps_next_output(icalcstps* cstp); + +/* process the next string from the client */ +int icalcstps_next_input(icalcstps* cstp); + /********************** Client (Sender) Interfaces **************************/ -/* On the client side, the cstp code is connected directly to the - socket, because the callers point of control is at the interfaces - below. */ - -icalerrorenum icalcstp_abort(icalcstp* cstp); -icalerrorenum icalcstp_authenticate(icalcstp* cstp, char* mechanism, - char* data); -icalerrorenum icalcstp_capability(icalcstp* cstp); -icalerrorenum icalcstp_calidexpand(icalcstp* cstp,char* calid); -icalerrorenum icalcstp_continue(icalcstp* cstp, unsigned int time); -icalerrorenum icalcstp_disconnect(icalcstp* cstp); -icalerrorenum icalcstp_identify(icalcstp* cstp, char* id); -icalerrorenum icalcstp_starttls(icalcstp* cstp, char* command, - char* data); -icalerrorenum icalcstp_senddata(icalcstp* cstp, unsigned int time, - icalcomponent *comp); -icalerrorenum icalcstp_upnexpand(icalcstp* cstp,char* calid); -icalerrorenum icalcstp_sendata(icalcstp* cstp, unsigned int time, - icalcomponent *comp); +/* How to use: + + 1) Construct a new icalcstpc + 2) Issue a command + 3) Repeat until both call icalcstpc_next_output and + icalcstpc_next_input return 0: + 3a) Call icalcstpc_next_output. Send string to server. + 3b) Get string from server, & give to icalcstp_next_input() + 4) Iterate with icalcstpc_first_response & icalcstp_next_response to + get the servers responses + 5) Repeat at #2 +*/ -icalcstp_response icalcstp_first_response(icalcstp* cstp); -icalcstp_response icalcstp_next_response(icalcstp* cstp); +typedef void* icalcstpc; +/* Response code sent by the server. */ +typedef struct icalcstpc_response { + icalrequeststatus code; + char *arg; /* These strings are owned by libical */ + char *debug_text; + char *more_text; + void* result; +} icalcstpc_response; + +icalcstps* icalcstpc_new(); + +void* icalcstpc_free(icalcstpc* cstpc); + +int icalcstpc_set_timeout(icalcstpc* cstp, int sec); + + +/* Get the next string to send to the server */ +char* icalcstpc_next_output(icalcstpc* cstp); + +/* process the next string from the server */ +int icalcstpc_next_input(icalcstpc* cstp); + +/* After icalcstpc_next_input returns a 0, there are responses + ready. use these to get them */ +icalcstpc_response icalcstpc_first_response(icalcstpc* cstp); +icalcstpc_response icalcstpc_next_response(icalcstpc* cstp); + +/* Issue a command */ +icalerrorenum icalcstpc_abort(icalcstpc* cstp); +icalerrorenum icalcstpc_authenticate(icalcstpc* cstp, char* mechanism, + char* init_data, char* f(char*) ); +icalerrorenum icalcstpc_capability(icalcstpc* cstp); +icalerrorenum icalcstpc_calidexpand(icalcstpc* cstp,char* calid); +icalerrorenum icalcstpc_continue(icalcstpc* cstp, unsigned int time); +icalerrorenum icalcstpc_disconnect(icalcstpc* cstp); +icalerrorenum icalcstpc_identify(icalcstpc* cstp, char* id); +icalerrorenum icalcstpc_starttls(icalcstpc* cstp, char* command, + char* init_data, char* f(char*)); +icalerrorenum icalcstpc_senddata(icalcstpc* cstp, unsigned int time, + icalcomponent *comp); +icalerrorenum icalcstpc_upnexpand(icalcstpc* cstp,char* calid); +icalerrorenum icalcstpc_sendata(icalcstpc* cstp, unsigned int time, + icalcomponent *comp); #endif /* !ICALCSTP_H */ diff --git a/libical/src/libicalvcal/Makefile.am b/libical/src/libicalvcal/Makefile.am index 862d77bcea..a4e9bba887 100644 --- a/libical/src/libicalvcal/Makefile.am +++ b/libical/src/libicalvcal/Makefile.am @@ -1,17 +1,29 @@ +lib_LTLIBRARIES = libicalvcal.la -lib_LIBRARIES = libicalvcal.a +INCLUDES = \ + -I$(top_builddir) \ + -I$(top_srcdir)/src/libical \ + -I$(top_srcdir)/src/libicalss \ + -I$(srcdir) -libicalvcal_a_SOURCES = \ - vcc.y \ - vcc.h \ - vobject.c \ - vobject.h \ - port.h \ - vcaltmp.c \ - vcaltmp.h \ - icalvcal.c \ - icalvcal.h +libicalvcal_la_LDFLAGS = -version-info 0:0:0 -EXTRA_DIST = README.TXT vcaltest.c vctest.c +libicalvcal_la_SOURCES = \ + icalvcal.c \ + vcc.y \ + vobject.c \ + vcaltmp.c -INCLUDES = -I ../libical -I $(srcdir)/../libical
\ No newline at end of file +libicalvcalincludedir = $(includedir)/libicalvcal + +libicalvcalinclude_HEADERS = \ + icalvcal.h \ + port.h \ + vcc.h \ + vobject.h \ + vcaltmp.h + +EXTRA_DIST = \ + README.TXT \ + vcaltest.c \ + vctest.c diff --git a/libical/src/libicalvcal/vcc.c b/libical/src/libicalvcal/vcc.c index cb57b6ed58..5c34395b83 100644 --- a/libical/src/libicalvcal/vcc.c +++ b/libical/src/libicalvcal/vcc.c @@ -187,7 +187,6 @@ enum LexMode { /**** Private Forward Declarations ****/ static int pushVObject(const char *prop); static VObject* popVObject(); -static char* lexDataFromBase64(); static void lexPopMode(int top); static int lexWithinMode(enum LexMode mode); static void lexPushMode(enum LexMode mode); @@ -197,7 +196,7 @@ static void enterValues(const char *value); static void mime_error_(char *s); -#line 179 "vcc.y" +#line 178 "vcc.y" typedef union { char *str; VObject *vobj; @@ -277,11 +276,11 @@ static const short yyrhs[] = { 22, #if YYDEBUG != 0 static const short yyrline[] = { 0, - 207, 210, 213, 213, 217, 218, 221, 227, 232, 238, - 244, 245, 248, 252, 258, 261, 266, 266, 272, 273, - 276, 279, 283, 290, 293, 294, 294, 298, 299, 302, - 306, 308, 311, 314, 315, 318, 320, 321, 324, 331, - 336, 342, 348, 355, 360, 366 + 206, 209, 212, 212, 216, 217, 220, 226, 231, 237, + 243, 244, 247, 251, 257, 260, 265, 265, 271, 272, + 275, 278, 282, 289, 292, 293, 293, 297, 298, 301, + 305, 307, 310, 313, 314, 317, 319, 320, 323, 330, + 335, 341, 347, 354, 359, 365 }; #endif @@ -368,7 +367,7 @@ static const short yycheck[] = { 7, 41, 11, 57, 23 }; /* -*-C-*- Note some compilers choke on comments on `#line' lines. */ -#line 3 "/usr/pkg/share/bison.simple" +#line 3 "/usr/lib/bison.simple" /* This file comes from bison-1.28. */ /* Skeleton output parser for bison, @@ -582,7 +581,7 @@ __yy_memcpy (char *to, char *from, unsigned int count) #endif #endif -#line 217 "/usr/pkg/share/bison.simple" +#line 217 "/usr/lib/bison.simple" /* The user can define YYPARSE_PARAM as the name of an argument to be passed into yyparse. The argument should have type void *. @@ -911,49 +910,49 @@ yyreduce: switch (yyn) { case 2: -#line 211 "vcc.y" +#line 210 "vcc.y" { addList(&vObjList, yyvsp[0].vobj); curObj = 0; ; break;} case 4: -#line 214 "vcc.y" +#line 213 "vcc.y" { addList(&vObjList, yyvsp[0].vobj); curObj = 0; ; break;} case 7: -#line 223 "vcc.y" +#line 222 "vcc.y" { lexPushMode(L_VCARD); if (!pushVObject(VCCardProp)) YYERROR; ; break;} case 8: -#line 228 "vcc.y" +#line 227 "vcc.y" { lexPopMode(0); yyval.vobj = popVObject(); ; break;} case 9: -#line 233 "vcc.y" +#line 232 "vcc.y" { lexPushMode(L_VCARD); if (!pushVObject(VCCardProp)) YYERROR; ; break;} case 10: -#line 238 "vcc.y" +#line 237 "vcc.y" { lexPopMode(0); yyval.vobj = popVObject(); ; break;} case 13: -#line 249 "vcc.y" +#line 248 "vcc.y" { lexPushMode(L_VALUES); ; break;} case 14: -#line 253 "vcc.y" +#line 252 "vcc.y" { if (lexWithinMode(L_BASE64) || lexWithinMode(L_QUOTED_PRINTABLE)) lexPopMode(0); @@ -961,109 +960,109 @@ case 14: ; break;} case 16: -#line 262 "vcc.y" +#line 261 "vcc.y" { enterProps(yyvsp[0].str); ; break;} case 18: -#line 267 "vcc.y" +#line 266 "vcc.y" { enterProps(yyvsp[0].str); ; break;} case 22: -#line 280 "vcc.y" +#line 279 "vcc.y" { enterAttr(yyvsp[0].str,0); ; break;} case 23: -#line 284 "vcc.y" +#line 283 "vcc.y" { enterAttr(yyvsp[-2].str,yyvsp[0].str); ; break;} case 25: -#line 293 "vcc.y" +#line 292 "vcc.y" { enterValues(yyvsp[-1].str); ; break;} case 27: -#line 295 "vcc.y" +#line 294 "vcc.y" { enterValues(yyvsp[0].str); ; break;} case 29: -#line 299 "vcc.y" +#line 298 "vcc.y" { yyval.str = 0; ; break;} case 30: -#line 304 "vcc.y" +#line 303 "vcc.y" { if (!pushVObject(VCCalProp)) YYERROR; ; break;} case 31: -#line 307 "vcc.y" +#line 306 "vcc.y" { yyval.vobj = popVObject(); ; break;} case 32: -#line 309 "vcc.y" +#line 308 "vcc.y" { if (!pushVObject(VCCalProp)) YYERROR; ; break;} case 33: -#line 311 "vcc.y" +#line 310 "vcc.y" { yyval.vobj = popVObject(); ; break;} case 39: -#line 326 "vcc.y" +#line 325 "vcc.y" { lexPushMode(L_VEVENT); if (!pushVObject(VCEventProp)) YYERROR; ; break;} case 40: -#line 332 "vcc.y" +#line 331 "vcc.y" { lexPopMode(0); popVObject(); ; break;} case 41: -#line 337 "vcc.y" +#line 336 "vcc.y" { lexPushMode(L_VEVENT); if (!pushVObject(VCEventProp)) YYERROR; ; break;} case 42: -#line 342 "vcc.y" +#line 341 "vcc.y" { lexPopMode(0); popVObject(); ; break;} case 43: -#line 350 "vcc.y" +#line 349 "vcc.y" { lexPushMode(L_VTODO); if (!pushVObject(VCTodoProp)) YYERROR; ; break;} case 44: -#line 356 "vcc.y" +#line 355 "vcc.y" { lexPopMode(0); popVObject(); ; break;} case 45: -#line 361 "vcc.y" +#line 360 "vcc.y" { lexPushMode(L_VTODO); if (!pushVObject(VCTodoProp)) YYERROR; ; break;} case 46: -#line 366 "vcc.y" +#line 365 "vcc.y" { lexPopMode(0); popVObject(); @@ -1071,7 +1070,7 @@ case 46: break;} } /* the action file gets copied in in place of this dollarsign */ -#line 543 "/usr/pkg/share/bison.simple" +#line 543 "/usr/lib/bison.simple" yyvsp -= yylen; yyssp -= yylen; @@ -1291,9 +1290,8 @@ yyerrhandle: } return 1; } -#line 372 "vcc.y" +#line 371 "vcc.y" -/*/////////////////////////////////////////////////////////////////////////*/ static int pushVObject(const char *prop) { VObject *newObj; @@ -1313,7 +1311,6 @@ static int pushVObject(const char *prop) } -/*/////////////////////////////////////////////////////////////////////////*/ /* This pops the recently built vCard off the stack and returns it. */ static VObject* popVObject() { @@ -1554,22 +1551,6 @@ static char* lexGetWord() { return lexStr(); } -static void lexPushLookahead(char *s, int len) { - int putptr; - if (len == 0) len = strlen(s); - putptr = (int)lexBuf.getPtr - len; - /* this function assumes that length of word to push back - / is not greater than MAX_LEX_LOOKAHEAD. - */ - if (putptr < 0) putptr += MAX_LEX_LOOKAHEAD; - lexBuf.getPtr = putptr; - while (*s) { - lexBuf.buf[putptr] = *s++; - putptr = (putptr + 1) % MAX_LEX_LOOKAHEAD; - } - lexBuf.len += len; - } - static void lexPushLookaheadc(int c) { int putptr; /* can't putback EOF, because it never leaves lookahead buffer */ @@ -1648,7 +1629,6 @@ static void handleMoreRFC822LineBreak(int c) { } static char* lexGet1Value() { - int size = 0; int c; lexSkipWhite(); c = lexLookahead(); @@ -1679,18 +1659,6 @@ static char* lexGet1Value() { } #endif -static char* lexGetStrUntil(char *termset) { - int size = 0; - int c = lexLookahead(); - lexClearToken(); - while (c != EOF && !strchr(termset,c)) { - lexAppendc(c); - lexSkipLookahead(); - c = lexLookahead(); - } - lexAppendc(0); - return c==EOF?0:lexStr(); - } static int match_begin_name(int end) { char *n = lexLookaheadWord(); @@ -1736,7 +1704,6 @@ static void finiLex() { } -/*/////////////////////////////////////////////////////////////////////////*/ /* This parses and converts the base64 format for binary encoding into * a decoded buffer (allocated with new). See RFC 1521. */ @@ -1865,7 +1832,6 @@ static int match_begin_end_name(int end) { static char* lexGetQuotedPrintable() { char cur; - unsigned long len = 0; lexClearToken(); do { @@ -1921,7 +1887,6 @@ EndString: } /* LexQuotedPrintable */ int yylex() { - int token = 0; int lexmode = LEXMODE(); if (lexmode == L_VALUES) { @@ -2054,7 +2019,6 @@ static VObject* Parse_MIMEHelper() return vObjList; } -/*/////////////////////////////////////////////////////////////////////////*/ DLLEXPORT(VObject*) Parse_MIME(const char *input, unsigned long len) { initLex(input, len, 0); @@ -2109,12 +2073,6 @@ DLLEXPORT(VObject*) Parse_MIME_FromFileName(char *fname) #endif -/*/////////////////////////////////////////////////////////////////////////*/ -static void YYDebug(const char *s) -{ -/* Parse_Debug(s); */ -} - static MimeErrorHandler mimeErrorHandler; diff --git a/libical/src/libicalvcal/vcc.y b/libical/src/libicalvcal/vcc.y index 1c800990c4..70feefab57 100644 --- a/libical/src/libicalvcal/vcc.y +++ b/libical/src/libicalvcal/vcc.y @@ -161,7 +161,6 @@ enum LexMode { /**** Private Forward Declarations ****/ static int pushVObject(const char *prop); static VObject* popVObject(); -static char* lexDataFromBase64(); static void lexPopMode(int top); static int lexWithinMode(enum LexMode mode); static void lexPushMode(enum LexMode mode); @@ -370,7 +369,6 @@ todoitem: ; %% -/*/////////////////////////////////////////////////////////////////////////*/ static int pushVObject(const char *prop) { VObject *newObj; @@ -390,7 +388,6 @@ static int pushVObject(const char *prop) } -/*/////////////////////////////////////////////////////////////////////////*/ /* This pops the recently built vCard off the stack and returns it. */ static VObject* popVObject() { @@ -631,22 +628,6 @@ static char* lexGetWord() { return lexStr(); } -static void lexPushLookahead(char *s, int len) { - int putptr; - if (len == 0) len = strlen(s); - putptr = (int)lexBuf.getPtr - len; - /* this function assumes that length of word to push back - / is not greater than MAX_LEX_LOOKAHEAD. - */ - if (putptr < 0) putptr += MAX_LEX_LOOKAHEAD; - lexBuf.getPtr = putptr; - while (*s) { - lexBuf.buf[putptr] = *s++; - putptr = (putptr + 1) % MAX_LEX_LOOKAHEAD; - } - lexBuf.len += len; - } - static void lexPushLookaheadc(int c) { int putptr; /* can't putback EOF, because it never leaves lookahead buffer */ @@ -725,7 +706,6 @@ static void handleMoreRFC822LineBreak(int c) { } static char* lexGet1Value() { - int size = 0; int c; lexSkipWhite(); c = lexLookahead(); @@ -756,18 +736,6 @@ static char* lexGet1Value() { } #endif -static char* lexGetStrUntil(char *termset) { - int size = 0; - int c = lexLookahead(); - lexClearToken(); - while (c != EOF && !strchr(termset,c)) { - lexAppendc(c); - lexSkipLookahead(); - c = lexLookahead(); - } - lexAppendc(0); - return c==EOF?0:lexStr(); - } static int match_begin_name(int end) { char *n = lexLookaheadWord(); @@ -813,7 +781,6 @@ static void finiLex() { } -/*/////////////////////////////////////////////////////////////////////////*/ /* This parses and converts the base64 format for binary encoding into * a decoded buffer (allocated with new). See RFC 1521. */ @@ -942,7 +909,6 @@ static int match_begin_end_name(int end) { static char* lexGetQuotedPrintable() { char cur; - unsigned long len = 0; lexClearToken(); do { @@ -998,7 +964,6 @@ EndString: } /* LexQuotedPrintable */ int yylex() { - int token = 0; int lexmode = LEXMODE(); if (lexmode == L_VALUES) { @@ -1131,7 +1096,6 @@ static VObject* Parse_MIMEHelper() return vObjList; } -/*/////////////////////////////////////////////////////////////////////////*/ DLLEXPORT(VObject*) Parse_MIME(const char *input, unsigned long len) { initLex(input, len, 0); @@ -1186,12 +1150,6 @@ DLLEXPORT(VObject*) Parse_MIME_FromFileName(char *fname) #endif -/*/////////////////////////////////////////////////////////////////////////*/ -static void YYDebug(const char *s) -{ -/* Parse_Debug(s); */ -} - static MimeErrorHandler mimeErrorHandler; diff --git a/libical/src/test/Makefile.am b/libical/src/test/Makefile.am index 7fc594ee84..a2ebea7610 100644 --- a/libical/src/test/Makefile.am +++ b/libical/src/test/Makefile.am @@ -1,18 +1,18 @@ -noinst_PROGRAMS = copycluster regression parser findobj storage stow recur testmime testvcal +noinst_PROGRAMS = copycluster regression parser storage stow recur testmime testvcal process testclassify + +LDADD = ../libicalss/libicalss.la ../libicalvcal/libicalvcal.la ../libical/libical.la -LDADD = ../libical/libical.a ../libicalss/libicalss.a ../libicalvcal/libicalvcal.a INCLUDES = \ - -I . \ - -I../libicalvcal \ - -I $(srcdir)/../libicalvcal \ - -I $(srcdir) \ - -I../libical \ - -I $(srcdir)/../libical \ - -I../libicalss \ - -I $(srcdir)/../libicalss + -I . \ + -I../libicalvcal \ + -I $(srcdir)/../libicalvcal \ + -I $(srcdir) \ + -I../libical \ + -I $(srcdir)/../libical \ + -I../libicalss \ + -I $(srcdir)/../libicalss -findobj_SOURCES = findobj.c copycluster_SOURCES = copycluster.c regression_SOURCES = regression.c parser_SOURCES = icaltestparser.c @@ -20,4 +20,6 @@ storage_SOURCES = storage.c stow_SOURCES = stow.c testvcal_SOURCES = testvcal.c recur_SOURCES = recur.c -test_mime = testmime.c +testmime_SOURCES = testmime.c +process_SOURCES = process.c +testclassify_SOURCES = testclassify.c diff --git a/libical/src/test/copycluster.c b/libical/src/test/copycluster.c index 11bd94c62d..0d6722fc94 100644 --- a/libical/src/test/copycluster.c +++ b/libical/src/test/copycluster.c @@ -4,7 +4,6 @@ CREATOR: eric 15 January 2000 $Id$ - $Locker$ (C) COPYRIGHT 2000 Eric Busboom http://www.softwarestudio.org @@ -27,6 +26,7 @@ #include <stdio.h> /* for printf */ #include "ical.h" +#include "icalss.h" #include "icalfileset.h" #include <errno.h> #include <string.h> /* For strerror */ @@ -72,11 +72,9 @@ int main(int c, char *argv[]){ } - for (itr = icalfileset_get_first_component(clusterin, - ICAL_ANY_COMPONENT); + for (itr = icalset_get_first_component(clusterin); itr != 0; - itr = icalfileset_get_next_component(clusterin, - ICAL_ANY_COMPONENT)){ + itr = icalset_get_next_component(clusterin)){ icalrestriction_check(itr); @@ -108,6 +106,7 @@ int main(int c, char *argv[]){ icalfileset_free(clusterout); } - return 0; + return 0; } + diff --git a/libical/src/test/regression.c b/libical/src/test/regression.c index dc6a5301f1..1d66ee4fc5 100644 --- a/libical/src/test/regression.c +++ b/libical/src/test/regression.c @@ -1,12 +1,11 @@ /* -*- Mode: C -*- ====================================================================== - FILE: usecases.c + FILE: regression.c CREATOR: eric 03 April 1999 DESCRIPTION: $Id$ - $Locker$ (C) COPYRIGHT 1999 Eric Busboom http://www.softwarestudio.org @@ -22,24 +21,20 @@ limitations under the License. The original author is Eric Busboom - The original code is usecases.c + The original code is regression.c ======================================================================*/ #include "ical.h" +#include "icalss.h" + #include <assert.h> #include <string.h> /* for strdup */ #include <stdlib.h> /* for malloc */ #include <stdio.h> /* for printf */ #include <time.h> /* for time() */ -#include "icalmemory.h" -#include "icalerror.h" -#include "icalrestriction.h" -#include "icalcalendar.h" -#include "icalgauge.h" -#include "icaldirset.h" -#include "icalfileset.h" + /* This example creates and minipulates the ical object that appears * in rfc 2445, page 137 */ @@ -829,11 +824,9 @@ int test_store() rtime.end = rtime.start; rtime.end.hour++; - for (itr = icalfileset_get_first_component(cluster, - ICAL_ANY_COMPONENT); + for (itr = icalfileset_get_first_component(cluster); itr != 0; - itr = icalfileset_get_next_component(cluster, - ICAL_ANY_COMPONENT)){ + itr = icalfileset_get_next_component(cluster)){ icalcomponent *clone; icalproperty *p; @@ -929,11 +922,11 @@ int test_store() #endif - for(c = icaldirset_get_first_component(s,ICAL_ANY_COMPONENT); + for(c = icaldirset_get_first_component(s); c != 0; c = next){ - next = icaldirset_get_next_component(s,ICAL_ANY_COMPONENT); + next = icaldirset_get_next_component(s); if (c != 0){ /*icaldirset_remove_component(s,c);*/ @@ -1023,34 +1016,6 @@ void test_restriction() rtime.end = icaltime_from_timet( time(0),0,0); rtime.end.hour++; - - - /* Property restrictions */ - assert(icalrestriction_get_property_restriction( - ICAL_METHOD_PUBLISH, - ICAL_VEVENT_COMPONENT, - ICAL_SEQUENCE_PROPERTY) == 5); /* ZEROORONE -> 5 */ - - assert(icalrestriction_get_property_restriction( - ICAL_METHOD_PUBLISH, - ICAL_VEVENT_COMPONENT, - ICAL_ATTACH_PROPERTY)==3); /* ZEROPLUS -> 3 */ - - assert(icalrestriction_get_property_restriction( - ICAL_METHOD_DECLINECOUNTER, - ICAL_VEVENT_COMPONENT, - ICAL_SEQUENCE_PROPERTY)==1); /* ZERO -> 1 */ - - /* Component restrictions */ - assert(icalrestriction_get_component_restriction( - ICAL_METHOD_PUBLISH, - ICAL_VJOURNAL_COMPONENT, - ICAL_X_COMPONENT) == 3); /* ZEROPLUS */ - - assert(icalrestriction_get_component_restriction( - ICAL_METHOD_CANCEL, - ICAL_VJOURNAL_COMPONENT, - ICAL_VEVENT_COMPONENT) == 1); /* ZERO */ comp = icalcomponent_vanew( @@ -1124,6 +1089,7 @@ void test_restriction() } +#if 0 void test_calendar() { icalcomponent *comp; @@ -1168,6 +1134,9 @@ void test_calendar() icalcalendar_free(calendar); } +#endif + +void test_increment(void); void test_recur() { @@ -1198,6 +1167,64 @@ void test_recur() printf("%s\n",icalvalue_as_ical_string(v)); + test_increment(); + +} + + +enum byrule { + NO_CONTRACTION = -1, + BY_SECOND = 0, + BY_MINUTE = 1, + BY_HOUR = 2, + BY_DAY = 3, + BY_MONTH_DAY = 4, + BY_YEAR_DAY = 5, + BY_WEEK_NO = 6, + BY_MONTH = 7, + BY_SET_POS +}; + +struct icalrecur_iterator_impl { + + struct icaltimetype dtstart; + struct icaltimetype last; /* last time return from _iterator_next*/ + int occurrence_no; /* number of step made on this iterator */ + struct icalrecurrencetype rule; + + short days[366]; + short days_index; + + enum byrule byrule; + short by_indices[9]; + + + short *by_ptrs[9]; /* Pointers into the by_* array elements of the rule */ +}; + +void icalrecurrencetype_test() +{ + icalvalue *v = icalvalue_new_from_string( + ICAL_RECUR_VALUE, + "FREQ=YEARLY;UNTIL=20060101T000000;INTERVAL=2;BYDAY=SU,WE;BYSECOND=15,30; BYMONTH=1,6,11"); + + struct icalrecurrencetype r = icalvalue_get_recur(v); + struct icaltimetype t = icaltime_from_timet( time(0), 0, 0); + struct icaltimetype next; + time_t tt; + + struct icalrecur_iterator_impl* itr + = (struct icalrecur_iterator_impl*) icalrecur_iterator_new(r,t); + + do { + + next = icalrecur_iterator_next(itr); + tt = icaltime_as_timet(next); + + printf("%s",ctime(&tt )); + + } while( ! icaltime_is_null_time(next)); + } void test_recur_expansion() @@ -1213,6 +1240,83 @@ void test_recur_expansion() icalrecurrencetype_test(); } +static const char test_icalcomp_str[] = +"BEGIN:VEVENT\r\n" +"UID\r\n" +" :20001121T203327-22955-2183-22933-0@guanabana.helixcode.com\r\n" +"DTSTAMP\r\n" +" :20001121T203327\r\n" +"DTSTART\r\n" +" :20001121T170000\r\n" +"DTEND\r\n" +" :20001121T180000\r\n" +"SUMMARY\r\n" +" :recur on the second Friday every month\\, forever\r\n" +"SEQUENCE\r\n" +" :3\r\n" +"CLASS\r\n" +" :PRIVATE\r\n" +"RRULE\r\n" +" :FREQ=MONTHLY;INTERVAL=1;BYDAY=-2WE,2FR,3SA,-2WE\n" +"END:VEVENT\r\n"; + +void test_recur_bug() +{ + icalcomponent *icalcomp; + char *str; + icalproperty *prop; + struct icalrecurrencetype r; + + /* Print the original stuff */ + + puts ("The original component is:\n\n"); + puts (test_icalcomp_str); + + /* Parse the component */ + + icalcomp = icalparser_parse_string ((char *) test_icalcomp_str); + + if (!icalcomp) { + fprintf (stderr, "main(): Could not parse the stuff\n"); + exit (EXIT_FAILURE); + } + + if (icalcomponent_isa (icalcomp) != ICAL_VEVENT_COMPONENT) { + fprintf (stderr, "main(): This is not the test data I want\n"); + exit (EXIT_FAILURE); + } + + /* Watch the property */ + + prop = icalcomponent_get_first_property (icalcomp, ICAL_RRULE_PROPERTY); + if (!prop) { + fprintf (stderr, "main(): This is not the test data I want\n"); + exit (EXIT_FAILURE); + } + + r = icalproperty_get_rrule (prop); + printf ("\nThe first BYDAY element is %d\n", r.by_day[0]); + + printf ("Position is %d, weekday is %d\n", + icalrecurrencetype_day_position (r.by_day[0]), + (int) icalrecurrencetype_day_day_of_week (r.by_day[0])); + + /* Re-stringify */ + + puts ("\nThe component looks like this after re-stringification:\n\n"); + + str = icalcomponent_as_ical_string (icalcomp); + if (!str) { + fprintf (stderr, "main(): Could not stringify the component\n"); + exit (EXIT_FAILURE); + } + + puts (str); + puts ("\n"); + +} + + void test_duration() { @@ -1223,6 +1327,12 @@ void test_duration() printf("%s\n",icalvalue_as_ical_string(v)); + + v = icalvalue_new_from_string(ICAL_DURATION_VALUE, + "-PT8H30M"); + + printf("%s\n",icalvalue_as_ical_string(v)); + icalvalue_free(v); v = icalvalue_new_from_string(ICAL_PERIOD_VALUE, "19971015T050000Z/PT8H30M"); @@ -1320,18 +1430,29 @@ void test_requeststat() } +char ictt_str[1024]; +char* ictt_as_string(struct icaltimetype t) +{ + + sprintf(ictt_str,"%02d-%02d-%02d %02d:%02d:%02d %c",t.year,t.month,t.day, + t.hour,t.minute,t.second,t.is_utc?'Z':' '); + + return ictt_str; +} void test_time() { - struct icaltimetype ictt; + struct icaltimetype ictt, icttutc, icttny,icttphoenix; time_t tt,tt2; icalvalue *v; short day_of_week,start_day_of_week, day_of_year; - tt = time(0); + tt = 973276230; /* Fri Nov 3 10:30:30 PST 2000 in UTC */ + + printf("\n Convert to and from lib c \n"); - printf("System time is: %s\n",ctime(&tt)); + printf("System time is: %s",ctime(&tt)); ictt = icaltime_from_timet(tt,0,0); @@ -1340,8 +1461,9 @@ void test_time() printf("System time from libical: %s\n",icalvalue_as_ical_string(v)); tt2 = icaltime_as_timet(ictt); - printf("Converted back to libc: %s\n",ctime(&tt2)); + printf("Converted back to libc: %s",ctime(&tt2)); + printf("\n Incrementing time \n"); ictt.year++; tt2 = icaltime_as_timet(ictt); @@ -1349,14 +1471,15 @@ void test_time() ictt.month+=13; tt2 = icaltime_as_timet(ictt); - printf("Add 13 months: %s\n",ctime(&tt2)); + printf("Add 13 months: %s",ctime(&tt2)); ictt.second+=90; tt2 = icaltime_as_timet(ictt); - printf("Add 90 seconds: %s\n",ctime(&tt2)); + printf("Add 90 seconds: %s",ctime(&tt2)); ictt = icaltime_from_timet(tt,0,0); + printf("\n Day Of week \n"); day_of_week = icaltime_day_of_week(ictt); start_day_of_week = icaltime_start_doy_of_week(ictt); @@ -1365,6 +1488,30 @@ void test_time() printf("Today is day of week %d, day of year %d\n",day_of_week,day_of_year); printf("Week started n doy of %d\n",start_day_of_week); + printf("\n To and From UTC\n"); + + ictt = icaltime_from_timet(tt,0,1); + printf("As utc : %s\n", ictt_as_string(ictt)); + ictt = icaltime_from_timet(tt,0,0); + printf("As local : %s\n", ictt_as_string(ictt)); + + + + printf("\n TimeZone Conversions \n"); + + ictt = icaltime_from_timet(tt,0,1); + + icttutc = icaltime_as_utc(ictt,"America/Los_Angeles"); + + icttny = icaltime_as_zone(icttutc,"America/New_York"); + + icttphoenix = icaltime_as_zone(icttutc,"America/Phoenix"); + + printf("Orig : %s", ctime(&tt) ); + printf("UTC : %s\n", ictt_as_string(icttutc)); + printf("Los Angeles: %s\n", ictt_as_string(ictt)); + printf("Phoenix : %s\n", ictt_as_string(icttphoenix)); + printf("New York : %s\n", ictt_as_string(icttny)); } @@ -1408,7 +1555,7 @@ void test_iterators() icalproperty *p = icalcomponent_get_first_property(this, ICAL_VERSION_PROPERTY); - char* s = icalproperty_get_version(p); + const char* s = icalproperty_get_version(p); printf("%s ",s); @@ -1452,7 +1599,7 @@ void test_iterators() icalproperty *p = icalcomponent_get_first_property(inner,ICAL_VERSION_PROPERTY); - char* s = icalproperty_get_version(p); + const char* s = icalproperty_get_version(p); printf("%s ",s); } @@ -1467,7 +1614,7 @@ void test_iterators() icalcomponent *this; icalproperty *p; - char* s; + const char* s; next = icalcomponent_get_next_component(c,ICAL_ANY_COMPONENT); p=icalcomponent_get_first_property(inner,ICAL_VERSION_PROPERTY); @@ -1498,7 +1645,7 @@ void test_iterators() icalproperty *p = icalcomponent_get_first_property(inner,ICAL_VERSION_PROPERTY); - char* s = icalproperty_get_version(p); + const char* s = icalproperty_get_version(p); printf("%s ",s); } @@ -1506,22 +1653,450 @@ void test_iterators() printf("\n"); } -int main(int argc, char *argv[]) + +void test_icalset() { + icalcomponent *c; - printf("\n------------Test Memory---------------\n"); - test_memory(); + icalset* f = icalset_new_file("2446.ics"); + icalset* d = icalset_new_dir("outdir"); -exit(0); + assert(f!=0); + assert(d!=0); + for(c = icalset_get_first_component(f); + c != 0; + c = icalset_get_next_component(f)){ - printf("\n------------Test Iterators-----------\n"); - test_iterators(); + icalcomponent *clone; + + clone = icalcomponent_new_clone(c); + + icalset_add_component(d,clone); + + printf(" class %d\n",icalclassify(c,0,"user")); + + } +} + +void test_classify() +{ + icalcomponent *c,*match; + + icalset* f = icalset_new_file("../../test-data/classify.ics"); + + assert(f!=0); + + c = icalset_get_first_component(f); + match = icalset_get_next_component(f); + + printf("Class %d\n",icalclassify(c,match,"A@example.com")); + + +} + +void print_span(int c, struct icaltime_span span ){ + + printf("#%02d start: %s",c,ctime(&span.start)); + printf(" end : %s",ctime(&span.end)); + +} + +void test_span() +{ + time_t tm1 = 973378800; /*Sat Nov 4 23:00:00 UTC 2000, + Sat Nov 4 15:00:00 PST 2000 */ + time_t tm2 = 973382400; /*Sat Nov 5 00:00:00 UTC 2000 + Sat Nov 4 16:00:00 PST 2000 */ + struct icaldurationtype dur; + struct icaltime_span span; + icalcomponent *c; + + memset(&dur,0,sizeof(dur)); + dur.minutes = 30; + + span.start = tm1; + span.end = tm2; + print_span(0,span); + + /* Specify save timezone as in commend above */ + c = + icalcomponent_vanew( + ICAL_VEVENT_COMPONENT, + icalproperty_vanew_dtstart(icaltime_from_timet(tm1,0,0), + icalparameter_new_tzid("US/Pacific"),0), + icalproperty_vanew_dtend(icaltime_from_timet(tm2,0,0), + icalparameter_new_tzid("US/Pacific"),0), + 0 + ); + + printf("%s\n",icalcomponent_as_ical_string(c)); + + span = icalcomponent_get_span(c); + + print_span(1,span); + + /* Use machine's local timezone. Same as above if run in US/Pacific */ + c = + icalcomponent_vanew( + ICAL_VEVENT_COMPONENT, + icalproperty_vanew_dtstart(icaltime_from_timet(tm1,0,0),0), + icalproperty_vanew_dtend(icaltime_from_timet(tm2,0,0),0), + 0 + ); + + span = icalcomponent_get_span(c); + + print_span(2,span); + + /* Specify different timezone */ + c = + icalcomponent_vanew( + ICAL_VEVENT_COMPONENT, + icalproperty_vanew_dtstart(icaltime_from_timet(tm1,0,0), + icalparameter_new_tzid("US/Eastern"),0), + icalproperty_vanew_dtend(icaltime_from_timet(tm2,0,0), + icalparameter_new_tzid("US/Eastern"),0), + 0 + ); + span = icalcomponent_get_span(c); + print_span(3,span); + + /* Specify different timezone for start and end*/ + c = + icalcomponent_vanew( + ICAL_VEVENT_COMPONENT, + icalproperty_vanew_dtstart(icaltime_from_timet(tm1,0,0), + icalparameter_new_tzid("US/Eastern"),0), + icalproperty_vanew_dtend(icaltime_from_timet(tm2,0,0), + icalparameter_new_tzid("US/Pacific"),0), + 0 + ); + span = icalcomponent_get_span(c); + print_span(4,span); + + + /* Use Duration */ + c = + icalcomponent_vanew( + ICAL_VEVENT_COMPONENT, + icalproperty_vanew_dtstart(icaltime_from_timet(tm1,0,0), + icalparameter_new_tzid("US/Pacific"),0), + icalproperty_new_duration(dur), + + 0 + ); + span = icalcomponent_get_span(c); + print_span(5,span); + +#ifndef ICAL_ERRORS_ARE_FATAL + /* Both UTC and Timezone -- an error */ + icalerror_clear_errno(); + c = + icalcomponent_vanew( + ICAL_VEVENT_COMPONENT, + icalproperty_vanew_dtstart(icaltime_from_timet(tm1,0,1), + icalparameter_new_tzid("US/Eastern"),0), + icalproperty_vanew_dtend(icaltime_from_timet(tm2,0,1), + icalparameter_new_tzid("US/Eastern"),0), + 0 + ); + + span = icalcomponent_get_span(c); + assert(icalerrno != ICAL_NO_ERROR); +#endif /*ICAL_ERRORS_ARE_FATAL*/ + +} + +icalcomponent* icalclassify_find_overlaps(icalset* set, icalcomponent* comp); + +void test_overlaps() +{ + icalcomponent *cset,*c; + icalset *set; + time_t tm1 = 973378800; /*Sat Nov 4 23:00:00 UTC 2000, + Sat Nov 4 15:00:00 PST 2000 */ + time_t tm2 = 973382400; /*Sat Nov 5 00:00:00 UTC 2000 + Sat Nov 4 16:00:00 PST 2000 */ + + time_t hh = 1800; /* one half hour */ + + set = icalset_new_file("../../test-data/overlaps.ics"); + + printf("-- 1 -- \n"); + c = icalcomponent_vanew( + ICAL_VEVENT_COMPONENT, + icalproperty_vanew_dtstart(icaltime_from_timet(tm1-hh,0,1),0), + icalproperty_vanew_dtend(icaltime_from_timet(tm2-hh,0,1),0), + 0 + ); + + cset = icalclassify_find_overlaps(set,c); + + printf("%s\n",icalcomponent_as_ical_string(cset)); + + printf("-- 2 -- \n"); + c = icalcomponent_vanew( + ICAL_VEVENT_COMPONENT, + icalproperty_vanew_dtstart(icaltime_from_timet(tm1-hh,0,1),0), + icalproperty_vanew_dtend(icaltime_from_timet(tm2,0,1),0), + 0 + ); + + cset = icalclassify_find_overlaps(set,c); + printf("%s\n",icalcomponent_as_ical_string(cset)); + + printf("-- 3 -- \n"); + c = icalcomponent_vanew( + ICAL_VEVENT_COMPONENT, + icalproperty_vanew_dtstart(icaltime_from_timet(tm1+5*hh,0,1),0), + icalproperty_vanew_dtend(icaltime_from_timet(tm2+5*hh,0,1),0), + 0 + ); + + cset = icalclassify_find_overlaps(set,c); + + printf("%s\n",icalcomponent_as_ical_string(cset)); + +} + +void test_fblist() +{ + icalspanlist *sl; + icalset* set = icalset_new_file("../../test-data/spanlist.ics"); + struct icalperiodtype period; + + sl = icalspanlist_new(set, + icaltime_from_string("19970324T1200Z"), + icaltime_from_string("19990424T020000Z")); + + printf("Restricted spanlist\n"); + icalspanlist_dump(sl); + + period= icalspanlist_next_free_time(sl, + icaltime_from_string("19970801T1200Z")); + + + printf("Next Free time: %s\n",icaltime_as_ctime(period.start)); + printf(" %s\n",icaltime_as_ctime(period.end)); + + + icalspanlist_free(sl); + + printf("Unrestricted spanlist\n"); + + sl = icalspanlist_new(set, + icaltime_from_string("19970324T1200Z"), + icaltime_null_time()); + + printf("Restricted spanlist\n"); + + icalspanlist_dump(sl); + + period= icalspanlist_next_free_time(sl, + icaltime_from_string("19970801T1200Z")); + + + printf("Next Free time: %s\n",icaltime_as_ctime(period.start)); + printf(" %s\n",icaltime_as_ctime(period.end)); + + + icalspanlist_free(sl); + + +} + +void test_convenience(){ + + icalcomponent *c; + int duration; + + c = icalcomponent_vanew( + ICAL_VCALENDAR_COMPONENT, + icalcomponent_vanew( + ICAL_VEVENT_COMPONENT, + icalproperty_new_dtstart(icaltime_from_string("19970801T1200")), + icalproperty_new_dtend(icaltime_from_string("19970801T1300")), + 0 + ), + 0); + + printf("** 1 DTSTART and DTEND **\n%s\n\n", + icalcomponent_as_ical_string(c)); + + duration = icaldurationtype_as_timet(icalcomponent_get_duration(c))/60; + + printf("Start: %s\n",ictt_as_string(icalcomponent_get_dtstart(c))); + printf("End: %s\n",ictt_as_string(icalcomponent_get_dtend(c))); + printf("Dur: %d m\n",duration); + + icalcomponent_free(c); + + c = icalcomponent_vanew( + ICAL_VCALENDAR_COMPONENT, + icalcomponent_vanew( + ICAL_VEVENT_COMPONENT, + icalproperty_new_dtstart(icaltime_from_string("19970801T1200Z")), + icalproperty_new_duration(icaldurationtype_from_string("PT1H30M")), + 0 + ), + 0); + + printf("\n** 2 DTSTART and DURATION **\n%s\n\n", + icalcomponent_as_ical_string(c)); + + duration = icaldurationtype_as_timet(icalcomponent_get_duration(c))/60; + + printf("Start: %s\n",ictt_as_string(icalcomponent_get_dtstart(c))); + printf("End: %s\n",ictt_as_string(icalcomponent_get_dtend(c))); + printf("Dur: %d m\n",duration); + + icalcomponent_free(c); + + c = icalcomponent_vanew( + ICAL_VCALENDAR_COMPONENT, + icalcomponent_vanew( + ICAL_VEVENT_COMPONENT, + icalproperty_new_dtstart(icaltime_from_string("19970801T1200")), + icalproperty_new_dtend(icaltime_from_string("19970801T1300")), + 0 + ), + 0); + + icalcomponent_set_duration(c,icaldurationtype_from_string("PT1H30M")); + + printf("** 3 DTSTART and DTEND, Set DURATION **\n%s\n\n", + icalcomponent_as_ical_string(c)); + + duration = icaldurationtype_as_timet(icalcomponent_get_duration(c))/60; + + printf("Start: %s\n",ictt_as_string(icalcomponent_get_dtstart(c))); + printf("End: %s\n",ictt_as_string(icalcomponent_get_dtend(c))); + printf("Dur: %d m\n",duration); + + icalcomponent_free(c); + + c = icalcomponent_vanew( + ICAL_VCALENDAR_COMPONENT, + icalcomponent_vanew( + ICAL_VEVENT_COMPONENT, + icalproperty_new_dtstart(icaltime_from_string("19970801T1200Z")), + icalproperty_new_duration(icaldurationtype_from_string("PT1H30M")), + 0 + ), + 0); + + icalcomponent_set_dtend(c,icaltime_from_string("19970801T1330Z")); + + printf("\n** 4 DTSTART and DURATION, set DTEND **\n%s\n\n", + icalcomponent_as_ical_string(c)); + + duration = icaldurationtype_as_timet(icalcomponent_get_duration(c))/60; + + printf("Start: %s\n",ictt_as_string(icalcomponent_get_dtstart(c))); + printf("End: %s\n",ictt_as_string(icalcomponent_get_dtend(c))); + printf("Dur: %d m\n",duration); + + icalcomponent_free(c); + + c = icalcomponent_vanew( + ICAL_VCALENDAR_COMPONENT, + icalcomponent_vanew( + ICAL_VEVENT_COMPONENT, + 0 + ), + 0); + + icalcomponent_set_dtstart(c,icaltime_from_string("19970801T1200Z")); + icalcomponent_set_dtend(c,icaltime_from_string("19970801T1330Z")); + + printf("\n** 5 Set DTSTART and DTEND **\n%s\n\n", + icalcomponent_as_ical_string(c)); + + + duration = icaldurationtype_as_timet(icalcomponent_get_duration(c))/60; + + printf("Start: %s\n",ictt_as_string(icalcomponent_get_dtstart(c))); + printf("End: %s\n",ictt_as_string(icalcomponent_get_dtend(c))); + printf("Dur: %d m\n",duration); + + icalcomponent_free(c); + + c = icalcomponent_vanew( + ICAL_VCALENDAR_COMPONENT, + icalcomponent_vanew( + ICAL_VEVENT_COMPONENT, + 0 + ), + 0); + + + icalcomponent_set_dtstart(c,icaltime_from_string("19970801T1200Z")); + icalcomponent_set_duration(c,icaldurationtype_from_string("PT1H30M")); + + printf("\n** 6 Set DTSTART and DURATION **\n%s\n\n", + icalcomponent_as_ical_string(c)); + + + duration = icaldurationtype_as_timet(icalcomponent_get_duration(c))/60; + + printf("Start: %s\n",ictt_as_string(icalcomponent_get_dtstart(c))); + printf("End: %s\n",ictt_as_string(icalcomponent_get_dtend(c))); + printf("Dur: %d m\n",duration); + + icalcomponent_free(c); + +} + +int main(int argc, char *argv[]) +{ + + printf("\n------------Test recur bug ----------\n"); + test_recur_bug(); + + exit(0); + + printf("\n------------Test recur---------------\n"); + test_recur(); + + printf("\n------------Test FBlist------------\n"); + test_fblist(); printf("\n------------Test time----------------\n"); test_time(); + + printf("\n------------Test Overlaps------------\n"); + test_overlaps(); + + + printf("\n------------Test Span----------------\n"); + test_span(); + + + printf("\n------------Test duration---------------\n"); + test_duration(); + + exit(0); + + + + printf("\n------------Test Convenience ------------\n"); + test_convenience(); + + + + printf("\n------------Test classify ---------------\n"); + test_classify(); + + printf("\n------------Test Memory---------------\n"); + test_memory(); + + + printf("\n------------Test Iterators-----------\n"); + test_iterators(); + printf("\n------------Test Restriction---------------\n"); test_restriction(); @@ -1531,12 +2106,6 @@ exit(0); printf("\n------------Test strings---------------\n"); test_strings(); - printf("\n------------Test recur---------------\n"); - test_recur(); - - printf("\n------------Test duration---------------\n"); - test_duration(); - printf("\n------------Test Compare---------------\n"); test_compare(); @@ -1559,9 +2128,13 @@ exit(0); create_new_component_with_va_args(); + return 0; + + printf("\n------------Test icalset ---------------\n"); + test_icalset(); + - return 0; } diff --git a/libical/src/test/storage.c b/libical/src/test/storage.c index d53001b574..b8eb48c30f 100644 --- a/libical/src/test/storage.c +++ b/libical/src/test/storage.c @@ -6,7 +6,6 @@ DESCRIPTION: $Id$ - $Locker$ (C) COPYRIGHT 1999 Eric Busboom http://www.softwarestudio.org @@ -162,11 +161,9 @@ void test_fileset() cout = icalfileset_new(OUTPUT_FILE); assert(cout != 0); - for (itr = icalfileset_get_first_component(cout, - ICAL_ANY_COMPONENT); + for (itr = icalfileset_get_first_component(cout); itr != 0; - itr = icalfileset_get_next_component(cout, - ICAL_ANY_COMPONENT)){ + itr = icalfileset_get_next_component(cout)){ icalcomponent *event; icalproperty *dtstart, *dtend; @@ -190,11 +187,9 @@ void test_fileset() cout = icalfileset_new(OUTPUT_FILE); assert(cout != 0); - for (itr = icalfileset_get_first_component(cout, - ICAL_ANY_COMPONENT); + for (itr = icalfileset_get_first_component(cout); itr != 0; - itr = icalfileset_get_next_component(cout, - ICAL_ANY_COMPONENT)){ + itr = icalfileset_get_next_component(cout)){ icalfileset_remove_component(cout, itr); @@ -209,11 +204,9 @@ void test_fileset() assert(cout != 0); count =0; - for (itr = icalfileset_get_first_component(cout, - ICAL_ANY_COMPONENT); + for (itr = icalfileset_get_first_component(cout); itr != 0; - itr = icalfileset_get_next_component(cout, - ICAL_ANY_COMPONENT)){ + itr = icalfileset_get_next_component(cout)){ icalcomponent *event; icalproperty *dtstart, *dtend; @@ -269,11 +262,9 @@ int test_dirset() rtime.end = rtime.start; rtime.end.hour++; - for (itr = icalfileset_get_first_component(cluster, - ICAL_ANY_COMPONENT); + for (itr = icalfileset_get_first_component(cluster); itr != 0; - itr = icalfileset_get_next_component(cluster, - ICAL_ANY_COMPONENT)){ + itr = icalfileset_get_next_component(cluster)){ icalcomponent *clone, *inner; icalproperty *p; @@ -370,9 +361,9 @@ int test_dirset() #endif - for(c = icaldirset_get_first_component(s,ICAL_ANY_COMPONENT); + for(c = icaldirset_get_first_component(s); c != 0; - c = icaldirset_get_next_component(s,ICAL_ANY_COMPONENT)){ + c = icaldirset_get_next_component(s)){ if (c != 0){ printf("%s", icalcomponent_as_ical_string(c));; @@ -395,6 +386,7 @@ int test_dirset() return 0; } +#if 0 void test_calendar() { icalcomponent *comp; @@ -439,6 +431,7 @@ void test_calendar() icalcalendar_free(calendar); } +#endif int main(int argc, char *argv[]) diff --git a/libical/src/test/stow.c b/libical/src/test/stow.c index f742b417a5..6c285afc77 100644 --- a/libical/src/test/stow.c +++ b/libical/src/test/stow.c @@ -4,7 +4,6 @@ CREATOR: eric 29 April 2000 $Id$ - $Locker$ (C) COPYRIGHT 2000 Eric Busboom http://www.softwarestudio.org @@ -47,6 +46,9 @@ char* program_name; #define TMPSIZE 2048 #define SENDMAIL "/usr/lib/sendmail -t" +void usage(char *message); + + enum options { STORE_IN_FILE, STORE_IN_DB, @@ -113,7 +115,7 @@ enum file_type test_file(char *path) return type; } -char* lowercase(char* str) +char* lowercase(const char* str) { char* p = 0; char* new = strdup(str); @@ -152,11 +154,6 @@ char* get_local_attendee(struct options_struct *opt) } #endif -void usage(char *message) -{ - fprintf(stderr,"Usage: %s [-emdcn] [-i inputfile] [-o outputfile] [-u calid]\n",program_name); - -} icalcomponent* get_first_real_component(icalcomponent *comp) { @@ -178,8 +175,9 @@ icalcomponent* get_first_real_component(icalcomponent *comp) -char* make_mime(char* to, char* from, char* subject, - char* text_message, char* method, char* ical_message) +char* make_mime(char* to, const char* from, const char* subject, + const char* text_message, const char* method, + const char* ical_message) { size_t size = strlen(to)+strlen(from)+strlen(subject)+ strlen(text_message)+ strlen(ical_message)+TMPSIZE; @@ -226,8 +224,8 @@ Content-Type: multipart/mixed; boundary=\"%s\"\n\ \n\ This is a multimedia message in MIME format\n\ \n\ ---%s -%s +--%s\n\ +%s\n\ ", to,from,subject,content_id,boundary,boundary, mime_part_1); @@ -251,7 +249,7 @@ void return_failure(icalcomponent* comp, char* message, icalcomponent *inner = get_first_real_component(comp); icalproperty *organizer_prop = icalcomponent_get_first_property(inner,ICAL_ORGANIZER_PROPERTY); - char *organizer = icalproperty_get_organizer(organizer_prop); + const char *organizer = icalproperty_get_organizer(organizer_prop); organizer += 7; @@ -347,7 +345,7 @@ icalcomponent* make_reply(icalcomponent *comp, icalproperty *return_status, } int check_attendee(icalproperty *p, struct options_struct *opt){ - char* s = icalproperty_get_attendee(p); + const char* s = icalproperty_get_attendee(p); char* lower_attendee = lowercase(s); char* local_attendee = opt->calid; @@ -481,6 +479,21 @@ char* check_component(icalcomponent* comp, icalproperty **return_status, } +void usage(char *message) +{ + fprintf(stderr,"Usage: %s [-emdcn] [-i inputfile] [-o outputfile] [-u calid]\n",program_name); + fprintf(stderr,"-e\tInput data is encapsulated in a MIME Message \n\ +-m\tInput is raw iCal \n\ +-i\tSpecify input file. Otherwise, input comed from stdin\n\ +-o\tSpecify file to save incoming message to\n\ +-d\tSpecify database to send data to\n\ +-u\tSet the calid to store the data to\n\ +-n\tSend errors to stdout instead of organizer\n\ +"); + +} + + void get_options(int argc, char* argv[], struct options_struct *opt) { int c; diff --git a/libical/test-data/1 b/libical/test-data/1 index 6a368d9997..3670e54141 100644 --- a/libical/test-data/1 +++ b/libical/test-data/1 @@ -11,7 +11,7 @@ TZOFFSETTO:-0500 TZNAME:EST END:STANDARD BEGIN:DAYLIGHT -DTSTART:19990404T020000 +DTSTAR:19990404T020000 RDATE:19990404T020000 TZOFFSETFROM:-0500 TZOFFSETTO:-0400 diff --git a/libical/test-data/2445.ics b/libical/test-data/2445.ics index f225f26331..7cce109ec3 100644 --- a/libical/test-data/2445.ics +++ b/libical/test-data/2445.ics @@ -50,6 +50,7 @@ CATEGORIES:FAMILY,FINANCE PRIORITY:1 STATUS:NEEDS-ACTION END:VTODO + BEGIN:VJOURNAL UID:19970901T130000Z-123405@host.com DTSTAMP:19970901T1300Z @@ -71,16 +72,20 @@ DTSTART:19971015T050000Z DTEND:19971016T050000Z DTSTAMP:19970901T083000Z END:VFREEBUSY + BEGIN:VFREEBUSY ORGANIZER:MAILTO:jane_doe@host1.com ATTENDEE:MAILTO:john_public@host2.com DTSTAMP:19970901T100000Z +DTSTART:19971015T050000Z +DTEND:19971016T050000Z FREEBUSY;VALUE=PERIOD:19971015T050000Z/PT8H30M, 19971015T160000Z/PT5H30M,19971015T223000Z/PT6H30M URL:http://host2.com/pub/busy/jpublic-01.ifb COMMENT:This iCalendar file contains busy time information for the next three months. END:VFREEBUSY + BEGIN:VFREEBUSY ORGANIZER:jsmith@host.com DTSTART:19980313T141711Z @@ -261,6 +266,7 @@ ATTACH;FMTTYPE=application/postscript:ftp://xyzCorp.com/pub/ conf/bkgrnd.ps END:VEVENT END:VCALENDAR + BEGIN:VCALENDAR VERSION:2.0 PRODID:-//ABC Corporation//NONSGML My Product//EN @@ -283,6 +289,7 @@ DURATION:PT1H END:VALARM END:VTODO END:VCALENDAR + BEGIN:VCALENDAR VERSION:2.0 PRODID:-//ABC Corporation//NONSGML My Product//EN diff --git a/libical/test-data/2446.ics b/libical/test-data/2446.ics index 0f816efeba..0b86aa42c1 100644 --- a/libical/test-data/2446.ics +++ b/libical/test-data/2446.ics @@ -230,6 +230,7 @@ UID:calsrv.example.com-873970198738777@example.com DTSTAMP:19970614T190000Z END:VEVENT END:VCALENDAR + BEGIN:VCALENDAR PRODID:-//ACME/DesktopCalendar//EN METHOD:REPLY @@ -244,6 +245,7 @@ REQUEST-STATUS:2.0;Success DTSTAMP:19970611T190000Z END:VEVENT END:VCALENDAR + BEGIN:VCALENDAR PRODID:-//ACME/DesktopCalendar//EN METHOD:REQUEST diff --git a/libical/test-data/Makefile.am b/libical/test-data/Makefile.am index 83a434b288..c3475a9c31 100644 --- a/libical/test-data/Makefile.am +++ b/libical/test-data/Makefile.am @@ -15,6 +15,12 @@ recur.txt \ user-cal.vcf \ complex-mime.txt \ simple-mime.txt \ -stresstest.ics +stresstest.ics \ +classify.ics \ +incoming.ics \ +process-incoming.ics \ +calendar.ics \ +restriction.ics \ +overlaps.ics |