diff options
author | JP Rosevear <jpr@src.gnome.org> | 2001-01-24 04:22:40 +0800 |
---|---|---|
committer | JP Rosevear <jpr@src.gnome.org> | 2001-01-24 04:22:40 +0800 |
commit | 4028f454b6c274fa093056180af8d11e5c7bfd1e (patch) | |
tree | 0152cebbfed39e61ca4fb959cbaa49b5a8b3f528 | |
parent | bf4a1512b2fc7b83ce723ecafbb02947e577e7d8 (diff) | |
download | gsoc2013-evolution-4028f454b6c274fa093056180af8d11e5c7bfd1e.tar gsoc2013-evolution-4028f454b6c274fa093056180af8d11e5c7bfd1e.tar.gz gsoc2013-evolution-4028f454b6c274fa093056180af8d11e5c7bfd1e.tar.bz2 gsoc2013-evolution-4028f454b6c274fa093056180af8d11e5c7bfd1e.tar.lz gsoc2013-evolution-4028f454b6c274fa093056180af8d11e5c7bfd1e.tar.xz gsoc2013-evolution-4028f454b6c274fa093056180af8d11e5c7bfd1e.tar.zst gsoc2013-evolution-4028f454b6c274fa093056180af8d11e5c7bfd1e.zip |
Import clean up
svn path=/trunk/; revision=7751
42 files changed, 5819 insertions, 2916 deletions
diff --git a/libical/ChangeLog b/libical/ChangeLog index 913490d97f..0b2d2e5e33 100644 --- a/libical/ChangeLog +++ b/libical/ChangeLog @@ -1,18 +1,41 @@ -2001-01-19 JP Rosevear <jpr@ximian.com> +2001-01-23 Eric Busboom <eric@softwarestudio.org> - * src/libical/icalvalue.c.in (icalvalue_duration_as_ical_string): add - -ve sign to output of duration if appropriate. - (icalvalue_trigger_as_ical_string): implement. not happy how this is - done with the -1 for is_date trick but it will do for now and period - does things in a similar way. + * icltime.c Removed all of the _local_ routines and simplified + icaltime_utc_offset and icaltime_as_timet -2000-12-21 JP Rosevear <jpr@helixcode.com> + * regression.c Added tests for triggers and improvements to icaltime.c - * src/libical/icaltime.c: include configure.h because HAVE_TIMEZONE - is used + * icaltypes.c Addedd icaltriggertype_from_string and changed + icaltriggertype to be a struct - * acconfig.h: Terminate variable comment so that the variable can - actually be seen +2001-01-22 Eric Busboom <eric@softwarestudio.org> + + * icaltime.c implemented icaldurationtype_from_string to parse the + string it self, rather than use lex/yacc + +2001-01-15 Eric Busboom <eric@softwarestudio.org> + + * icalfileset.c Many improvements. File locking now works, and so + does searching with icalfileset_select() + +2001-01-08 Eric Busboom <eric@softwarestudio.org> + + * Makefile.am Remove spaces after -I in several + Makefile.am routines. + + * icalset.c removed return statements from some void functions. + + * icalparameter.c.in Added break to default: case that had no + body. Compilers on Solaris and Tru64 UNIX complained. + +2001-01-02 Eric Busboom <eric@softwarestudio.org> + + * icaltime.c Changed icaldurationtype_from_time and _as_timet to + _from_int and _as_int. This is a change interface that may break + some code. + + * icalgauge.c icalgaugeimpl.h, icalgauge.h., Rewrote gauge code to + use pvl-lists directly, instead of trying to reuse icalcomponent. 2000-12-15 Ettore Perazzoli <ettore@helixcode.com> @@ -57,6 +80,23 @@ * src/libical/icalerror.h: Added a name to the parameter to icalerror_set_errno. +2000-12-12 Eric Busboom <eric@softwarestudio.org> + + * icalparser.c Addedd support for x-parameters. + + * icalenum.c Fixed icalenum_parameter_type_to_string and + icalenum_property_type_to_string to property identify X- parameers + and properties. + + * icalparameter.c Fixed icalparameter_as_ical_string to property + write out X-Parameters. + + +2000-12-11 Eric Busboom <eric@softwarestudio.org> + + * icalcstp.c added empty bodies to prep_* routines so that shared + libraries would build. + 2000-12-13 Federico Mena Quintero <federico@helixcode.com> * src/libical/Makefile.am (COMBINEDHEADERS): Removed the explicit @@ -143,6 +183,31 @@ * src/libical/icalyacc.y: Likewise. +2000-12-06 Eric Busboom <eric@softwarestudio.org> + + * icaltime.c added icaltime_as_local to convert a UTC time to a + local time + + * icaltime.h icaltime.c Removed is_utc argument from + icaltime_from_timet + + +2000-11-29 Eric Busboom <eric@softwarestudio.org> + + * icalrecur.c More testing and bug fixes. Many more of the rules + in recur.txt work correctly. + +2000-11-28 Eric Busboom <eric@softwarestudio.org> + + * icalrecur.c Several changes to extract icalrecur.c from + libical. I'd like to make it into a reference impl for recurrence + rules. CHanges include moving all of the recurrence type and + recurrence enums from icalenum and icaltypes into icalrecur, and + adding code to parse recurrence rule strings. + + * icaltime.c Changed icaltime_from_string to parse the string + directly. Now icaltime.c has no dependency on icalvalue.c + 2000-11-21 Eric Busboom <eric@softwarestudio.org> * icalrecur.c Fixed a bug in the increment_* routines that made diff --git a/libical/NEWS b/libical/NEWS index 9be3a9131f..c4bc3db38f 100644 --- a/libical/NEWS +++ b/libical/NEWS @@ -1,3 +1,28 @@ +Version 0.22, 15 Jan 01 ( cvs tag libical-0-22) +---------------------------------------------- + +Many improvements to the time routines in icaltime.c. I think that +they actually make sense now. Note that there is an interface change +with icaltime_from_timet() -- I removed the is_utc parameter, since +all timet values are in UTC. Use icaltime_from_int() if you really +want the old interface + +Major improvements to icalfileset. icalfileset_select now works and so +does file locking. + +Minor revision to the documentation, but it does include a new section +on file storage ( icalfileset ) and time ( icaltime.c) + +Lots of bug fixes and small patches. + +I improved the regression test in src/test/regression.c. It now have +command line switches to select specific tests ( undocumentated, of +course ) and more of the tests include asserts, so you can just run it +without looking at the output. If the test runs without crashing, it +is mostly OK. + + + Version 0.21, 20 Nov 00 ( cvs tag libical-0-21) ---------------------------------------------- diff --git a/libical/THANKS b/libical/THANKS index ee804111e9..5d9e9185fb 100644 --- a/libical/THANKS +++ b/libical/THANKS @@ -34,5 +34,15 @@ 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 +Martin Neimeier <nei@ibn.de> for correcting bugs in icalrecur.c +Tom Leitner <tom@radar.tu-graz.ac.at> For several bug fixes in +compiling on Tru64 UNIX. + +Patrick Lewis <plewis@inetarena.com> for several bug reports. + +Larry W. Virden <lvirden@cas.org> for several bug reports in compiling +on Solaris. + +Bryan Bartone <bsb@mesasys.com> for code changes based on porting +libical to Windows. diff --git a/libical/acconfig.h b/libical/acconfig.h index f03ba6005f..1d2bfa4060 100644 --- a/libical/acconfig.h +++ b/libical/acconfig.h @@ -11,6 +11,6 @@ /* Define if your libc defines a "timezone" variable */ #undef HAVE_TIMEZONE - -/* Define if your libc defines a struct tm containing a "tm_gmtoff" member */ + +/* Define if your libc defines a struct tm containing a "tm_gmtoff" member */ #undef HAVE_TM_GMTOFF diff --git a/libical/configure.in b/libical/configure.in index 3ce77c6ca5..83f3e1ed22 100644 --- a/libical/configure.in +++ b/libical/configure.in @@ -1,7 +1,7 @@ dnl Process this file with autoconf to produce a configure script. -AC_INIT(src/libical/icaltypes.h) +AC_INIT(src/libical/ical.h) +AM_INIT_AUTOMAKE(libical,0.22a) AM_CONFIG_HEADER(config.h) -AM_INIT_AUTOMAKE(libical,0.21helix1) dnl Initialize maintainer mode AM_MAINTAINER_MODE @@ -17,9 +17,11 @@ dnl Initialize libtool AM_PROG_LIBTOOL AC_SUBST(AR) + AC_CHECK_PROGS(AR, ar aal, ar) +AC_CHECK_PROGS(PERL, perl5 perl) -dnl AC_DEFINE(ICAL_ERRORS_ARE_FATAL,1) +AC_DEFINE(ICAL_ERRORS_ARE_FATAL,1) AC_DEFINE(ICAL_SAFESAVES,1) AC_DEFINE(ICAL_UNIX_NEWLINE,1) @@ -37,27 +39,30 @@ AC_TYPE_SIZE_T AC_STRUCT_TM AC_CACHE_CHECK(for timezone variable, ac_cv_var_timezone, - AC_TRY_COMPILE([ - #include <time.h> - ], [ - timezone = 1; - ], ac_cv_var_timezone=yes, ac_cv_var_timezone=no)) + AC_TRY_COMPILE([ +#include <time.h> + ], [ + timezone = 1; + ], ac_cv_var_timezone=yes, ac_cv_var_timezone=no)) if test $ac_cv_var_timezone = yes; then - AC_DEFINE(HAVE_TIMEZONE) + AC_DEFINE(HAVE_TIMEZONE) else - AC_CACHE_CHECK(for tm_gmtoff in struct tm, ac_cv_struct_tm_gmtoff, - AC_TRY_COMPILE([ - #include <time.h> - ], [ - struct tm tm; - tm.tm_gmtoff = 1; - ], ac_cv_struct_tm_gmtoff=yes, ac_cv_struct_tm_gmtoff=no)) - if test $ac_cv_struct_tm_gmtoff = yes; then - AC_DEFINE(HAVE_TM_GMTOFF) - else - AC_ERROR(unable to find a way to determine timezone) - fi -fi + AC_CACHE_CHECK(for tm_gmtoff in struct tm, ac_cv_struct_tm_gmtoff, + AC_TRY_COMPILE([ +#include <time.h> + ], [ + struct tm tm; + tm.tm_gmtoff = 1; + ], ac_cv_struct_tm_gmtoff=yes, ac_cv_struct_tm_gmtoff=no +)) + if test $ac_cv_struct_tm_gmtoff = yes; then + AC_DEFINE(HAVE_TM_GMTOFF) + else + AC_ERROR(unable to find a way to determine timezone) + fi +fi + + dnl Checks for library functions. AC_CHECK_FUNCS(strdup) @@ -76,3 +81,4 @@ src/libical/icalversion.h src/libicalvcal/Makefile test-data/Makefile ]) + diff --git a/libical/design-data/value-c-types.txt b/libical/design-data/value-c-types.txt index 76a1e7c9b7..ef1dc1265a 100644 --- a/libical/design-data/value-c-types.txt +++ b/libical/design-data/value-c-types.txt @@ -16,8 +16,8 @@ RECUR special struct icalrecurrencetype STRING std const char* # Non-std TEXT std const char* TIME std struct icaltimetype -TRIGGER std union icaltriggertype # Non-std +TRIGGER std struct 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 +STATUS std icalproperty_status #Non-std diff --git a/libical/doc/UsingLibical.lyx b/libical/doc/UsingLibical.lyx index 776f0d3835..aa299de3c8 100644 --- a/libical/doc/UsingLibical.lyx +++ b/libical/doc/UsingLibical.lyx @@ -30,7 +30,7 @@ Using Libical Eric Busboom (eric@softwarestudio.org) \layout Date -November 2000 +January 2001 \layout Standard @@ -47,13 +47,12 @@ Introduction Libical is an Open Source implementation of the iCalendar protocols and protocol data units. The iCalendar specification describes how calendar clients can communicate - with calendar servers for users can store their calendar data and arrange + with calendar servers so users can store their calendar data and arrange meetings with other users. \layout Standard -Libical implements RFC2445 and RFC2446. - Eventually, it will also implement iRIP and CAP. +Libical implements RFC2445, RFC2446 and some of RFC2447 and the CAP draft. \layout Standard @@ -125,19 +124,19 @@ src/test \begin_inset Quotes erd \end_inset - for more annotated examples. + for additional annotated examples. \layout Section Building the Library \layout Standard -Libical uses autoconf to generate makefiles, although it uses none of the - autoconf flags to influence the compilation. +Libical uses autoconf to generate makefiles. 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. + Some version have been successfully been build on MacOS, Solaris, UnixWare, + And Tru64 UNIX without gcc, but you may run into problems with a particular + later version. \layout Standard @@ -194,18 +193,39 @@ ROLE Components are groups of properties that represent the core objects of a calendar system, such as events or timezones. - -\layout Standard + Components are delimited by +\begin_inset Quotes eld +\end_inset + +BEGIN +\begin_inset Quotes erd +\end_inset + + and +\begin_inset Quotes eld +\end_inset + +END +\begin_inset Quotes erd +\end_inset -The central goal of libical is to parse iTIP data into an internal representatio -n of Components, Properties, Parameters an Values, and to allow the user - to manipulate the data in various ways + tags. + \layout Standard \added_space_bottom 0.3cm When a component is sent across a network, if it is un-encrypted, it will look something like: \layout Verbatim +BEGIN:VCALENDAR +\layout Verbatim + +METHOD:REQUEST +\layout Verbatim + +PRODID: -//hacksw/handcal//NONSGML v1.0//EN +\layout Verbatim + BEGIN:VEVENT \layout Verbatim @@ -249,21 +269,84 @@ LOCATION:1CP Conference Room 4350 \layout Verbatim END:VEVENT +\layout Verbatim + +END:VCALENDAR +\layout Standard + +Note that components can be nested; this example has both a VCALENDAR and + a VEVENT component, one nested inside the other. + \layout Subsection Core iCal classes +\layout Standard + +Libical is an object-based, data-oriented library. + Nearly all of the routines in the library are associated with an opaque + data types and perform some operation on that data type. + Although the library does not actually have classes, we will use those + terms since the behavior of these associations of data and routines is + very similar to a class. + \layout Subsubsection -Components +Properties +\layout Standard + +Properties are represented with the icalproperty class and its many +\begin_inset Quotes eld +\end_inset + +derived +\begin_inset Quotes erd +\end_inset + + classes with on +\begin_inset Quotes eld +\end_inset + +derived +\begin_inset Quotes erd +\end_inset + + class per property type in RFC2445. + Again, there is no actual inheritance relations, but there are clusters + of routines that make this term useful. + A property is a container for a single value and a set of parameters. + \layout Subsubsection -Properties +Components +\layout Standard + +In libical, components are represented with the icalcomponent class. + Icalcomponent is a container for a set of other components and properties. \layout Subsubsection Values +\layout Standard + +Values are represented in a similar way to properties; a base class and + many +\begin_inset Quotes eld +\end_inset + +derived +\begin_inset Quotes eld +\end_inset + + classes. + A value is essentially a abstract handle on a single fundamental type, + a structure or a union. + \layout Subsubsection Parameters +\layout Standard + +Parameters are represetned in a similar way to properties, except that they + contain only one value \layout Subsection Other elements of libical @@ -274,32 +357,53 @@ In addition to the core iCal classes, libical has many other types, structures, \layout Subsubsection -Enumerations -\layout Subsubsection +Enumerations and types +\layout Standard -Types +Libical is strongly typed, soo every component, property, parameter, and + value type has an enumeration, and some have an associated structure or + union. + \layout Subsubsection The parser -\layout Subsubsection +\layout Standard -Restrictions +The libical parser offers a variety of ways to convert RFC2445 text into + a libical iinsteral component structure. + the parser can parse blocks of text as a string, or it can parse lin-by-line. \layout Subsubsection Error objects +\layout Standard + +Libical has a substantial error reporting system for both programming errors + and component usage errors. + \layout Subsubsection Memory Management +\layout Standard + +Since many of libicals interfaces return strings, the library has its own + memory management system to elimiate the need to free every string returned + from the libraru. + \layout Subsubsection Storage classes +\layout Standard + +The library also offers several classes to store components to flies, memory + or databases. + \layout Section Differences From RFCs \layout Standard Libical has been designed to follow the standards as closely as possible, - so that the key objects in the standards are also keey objects in the library. + so that the key objects in the standards are also key objects in the library. However, there are a few areas where the specifications are (arguably) irregular, and following them exactly would result in an unfriendly interface. These deviations make libical easier to use by maintaining a self-similar @@ -350,8 +454,8 @@ X. \layout Standard -There are also pseudo components that are conceptually derived classess - of VALARM. +There are also pseudo components that are conceptually derived classes of + VALARM. RFC2446 defines what properties may be included in each component, and for VALARM, the set of properties it may have depends on the value of the ACTION property. @@ -405,7 +509,7 @@ Many values can take more than one type. \layout Standard It is natural to have interfaces that would return the value of a property, - but it is cumbersone for a single routine to return multiple types. + but it is cumbersome for a single routine to return multiple types. So, in libical, properties that can have multiple types are given a single type that is the union of their RFC2445 types. For instance, in libical, the value of the TRIGGER property resolves to @@ -452,9 +556,6 @@ Oddly, RFC2445 allows some multi-valued properties ( like FREEBUSY ) to \layout Section -Implementation Limitations -\layout Section - Using libical \layout Subsection @@ -470,51 +571,50 @@ There are three ways to create components in Libical: creating individual Constructor Interfaces \layout Standard -Using constructor interfaces, you create each of the objects seperately - and them assemble them in to components: -\layout Code +Using constructor interfaces, you create each of the objects separately + and then assemble them in to components: +\layout Verbatim icalcomponent *event; -\layout Code +\layout Verbatim icalproperty *prop; -\layout Code +\layout Verbatim icalparameter *param; -\layout Code +\layout Verbatim struct icaltimetype atime; -\layout Code +\layout Verbatim event = icalcomponent_new(ICAL_VEVENT_COMPONENT); -\layout Code +\layout Verbatim prop = icalproperty_new_dtstamp(atime) ; -\layout Code +\layout Verbatim icalcomponent_add_property(event, prop); -\layout Code +\layout Verbatim -prop = icalproperty_new_uid("guid-1.host1.com") ); -\layout Code +prop = icalproperty_new_uid(''guid-1.host1.com'') ); +\layout Verbatim icalcomponent_add_property(event,prop); -\layout Code +\layout Verbatim -prop=icalproperty_new_organizer("mrbig@host.com"); -\layout Code +prop=icalproperty_new_organizer(''mrbig@host.com''); +\layout Verbatim param = icalparameter_new_role(ICAL_ROLE_CHAIR) -\layout Code +\layout Verbatim icalproperty_add_parameter(prop, param); -\layout Code +\layout Verbatim icalcomponent_add_property(event,prop); \layout Standard -While we are on this example, you should notice that libical uses a semi-object- -oriented style of interface. +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 \begin_inset Quotes eld @@ -548,10 +648,11 @@ If any of the constructors fail, they will return 0. vaargs Constructors \layout Standard -There is another way to create complex components, which is arguable more +There is another way to create complex components, which is arguably more elegant, if you are not horrified by varargs. - The varargs constructor interface all you to create intricate components - in a single block of text. + The varargs constructor interface allows you to create intricate components + in a single block of code. + Here is the previous examples in the vaargs style. \layout Verbatim @@ -564,13 +665,13 @@ There is another way to create complex components, which is arguable more ICAL_VCALENDAR_COMPONENT, \layout Verbatim - icalproperty_new_version("2.0"), + icalproperty_new_version(''2.0''), \layout Verbatim icalproperty_new_prodid( \layout Verbatim - "-//RDU Software//NONSGML HandCal//EN"), + ''-//RDU Software//NONSGML HandCal//EN''), \layout Verbatim icalcomponent_vanew( @@ -582,13 +683,13 @@ There is another way to create complex components, which is arguable more icalproperty_new_dtstamp(atime), \layout Verbatim - icalproperty_new_uid("guid-1.host1.com"), + icalproperty_new_uid(''guid-1.host1.com''), \layout Verbatim icalproperty_vanew_organizer( \layout Verbatim - "mrbig@host.com"), + ''mrbig@host.com''), \layout Verbatim icalparameter_new_role(ICAL_ROLE_CHAIR), @@ -603,7 +704,7 @@ There is another way to create complex components, which is arguable more icalproperty_vanew_attendee( \layout Verbatim - "employee-A@host.com", + ''employee-A@host.com'', \layout Verbatim icalparameter_new_role( @@ -642,7 +743,8 @@ There is another way to create complex components, which is arguable more ); \layout Standard -This form is similar to the regular constructor, except that they have +This form is similar to the constructor form , except that the constructors + have \begin_inset Quotes eld \end_inset @@ -659,9 +761,9 @@ new \end_inset in the name. - The arguments are similar too, except that the component contstructor can + The arguments are similar too, except that the component constructor can have a list of properties, and the property constructor can have a list - or parameters. + of parameters. Be sure to terminate every list with a '0', or your code will crash, if you are lucky. @@ -678,8 +780,16 @@ The final way to create components will probably be the most common; you icalcomponent* icalparser_parse_string(char* str); \layout Standard -This may seem wasteful if you want to pull a large component off of the - network; you may prefer to parse the component line by line. +If the string contains only one component, the parser will return the component + in libical form. + If the string contains multiple components, the multiple components will + be returned as the children of an ICAL_XROOT_COMPONENT component. + +\layout Standard + +Parsing a whole string may seem wasteful if you want to pull a large component + off of the network or from a file; you may prefer to parse the component + line by line. This is possible too by using: \layout Verbatim @@ -700,6 +810,8 @@ icalparser_set_gen_data(parser,stream) These routines will construct a parser object to which you can add lines of input and retrieve any components that the parser creates from the input. + These routines work by specifing an adaptor routine to get string data + from a source. For an example: \layout Verbatim @@ -784,33 +896,34 @@ icalparser_get_line(). The parser calls read_stream() from icalparser_get_line(), but it also needs to know what stream to use. This is set by the call to icalparser_set_gen_data(). + By using a different routine for read_stream or passing in different data + with icalparser_set_gen_data, you can connect to any data source. \layout Standard -Using the same mechanism, other implmentations could read from memory buffers, +Using the same mechanism, other implementations could read from memory buffers, sockets or other interfaces. \layout Standard Since the example code is a very common way to use the parser, there is - a convienience routine; + a convenience routine; \layout Verbatim icalcomponent* icalparser_parse(icalparser *parser, \layout Verbatim - char* (*line_gen_func)(char *s, size_t sise, void* d)) + char* (*line_gen_func)(char *s, size_t size, void* d)) \layout Standard 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 a single component from the input, it will return a pointer to the newly constructed component. - If the parser can construct multiple cmponents from the input, it will + If the parser can construct multiple components from the input, it will return a reference to an XROOT component ( of type ICAL_XROOT_COMPONENT.) This XROOT component will hold all of the components constructed from the input as children. - See section 6.2.2 for how to iterate through the child components. \layout Subsection @@ -819,7 +932,7 @@ Accessing Components Given a reference to a component, you probably will want to access the propertie s, parameters and values inside. - Libical interface let you find sub-component, add and remove sub-components, + Libical interfaces let you find sub-component, add and remove sub-components, and do the same three operations on properties. \layout Subsubsection @@ -874,7 +987,7 @@ As you might guess, if there is more than one subcomponent of the type you \layout Subsubsection -Interating Through Components +Iterating Through Components \layout Standard Iteration requires a second routine to get the next subcomponent after the @@ -924,7 +1037,7 @@ 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 + If you ever call icalcomponent_get_first_component() when an iteration is in progress, the pointer will be reset to the beginning. \layout Standard @@ -951,7 +1064,7 @@ 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, + the beginning 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 @@ -992,11 +1105,9 @@ for( Removing Components \layout Standard -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. +Removing an element from a list while iterating through the list with the + internal iterators can cause problems, since you will probably be removing + the element that the internal iterator points 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. @@ -1100,6 +1211,9 @@ void icalcomponent_remove_property( \layout Verbatim icalproperty* property); +\layout Standard + +For parameters: \layout Verbatim icalparameter* icalproperty_get_first_parameter( @@ -1136,6 +1250,10 @@ void icalproperty_remove_parameter( \layout Verbatim icalparameter_kind kind); +\layout Standard + +Note that since there should be only one parameter of each type in a property, + you will rarely need to use icalparameter_get_nect_paameter. \layout Subsubsection Working with values @@ -1143,10 +1261,10 @@ 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. + You can manipulate them either as part of the property or independently. \layout Standard -The most common way to work with values to is to maniplate them from they +The most common way to work with values to is to manipulate 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. @@ -1155,7 +1273,7 @@ The most common way to work with values to is to maniplate them from they 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: + For instanace, for the UID property, the routines are: \layout Verbatim void icalproperty_set_uid(icalproperty* prop, const char* v) @@ -1164,7 +1282,7 @@ void icalproperty_set_uid(icalproperty* prop, const char* v) const char* icalproperty_get_uid(icalproperty* prop) \layout Standard -For multivalued properties, like ATTACH, the value type is usually a struct +For multi-valued properties, like ATTACH, the value type is usually a struct or union that holds both possible types. \layout Standard @@ -1179,10 +1297,10 @@ icalvalue* icalproperty_get_value (icalproperty* prop) void icalproperty_set_value(icalproperty* prop, icalvalue* value); \layout Standard -Icalproperty_get_value() will return a reference that you can manipluate +Icalproperty_get_value() will return a reference that you can manipulate 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 + For instance, if you know that the value is a DATETIME type, you can manipulate it with: \layout Verbatim @@ -1201,23 +1319,30 @@ void icalproperty_set_x(icalproperty* prop, char* v); \layout Verbatim char* icalproperty_get_x(icalproperty* prop); -\layout Subsubsection +\layout Standard + +All X properties have the type of ICAL_X_PROPERTY, so you will need these + routines to get and set the name of the property: +\layout Verbatim -Working with parameters +char* icalproperty_get_x_name(icalproperty* prop) +\layout Verbatim + +void icalproperty_set_x_name(icalproperty* prop, char* name); \layout Subsubsection Checking Component Validity \layout Standard RFC 2446 defines rules for what properties must exist in a component to - be used for transfering scheduling data. + be used for transferring scheduling data. Most of these rules relate to the existence of properties relative to the - METHOD property, which declares what operation a remote reciever should + METHOD property, which declares what operation a remote receiver 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. + sender is probably asking the receiver to join in a meeting. In this case, RFC2446 says that the component must specify a start time - (DTSTART) and list the reciever as an attendee (ATTENDEE). + (DTSTART) and list the receiver as an attendee (ATTENDEE). \layout Standard @@ -1246,7 +1371,7 @@ When this routine runs, it will insert new properties into the component Converting Components to Text \layout Standard -To create an RFC2445 compliant text representtion of an object, use one +To create an RFC2445 compliant text representation of an object, use one of the *_as_ical_string() routines: \layout Verbatim @@ -1274,20 +1399,26 @@ Icalproperty_as_ical_string() will terminate each line with the RFC2445 \backslash -r + \backslash n \begin_inset Quotes erd \end_inset - However, if you compile with the symbol ICAL_UNIX_NEWLINE defined, it will - terminate lines with + However, if you compile with the symbol ICAL_UNIX_NEWLINE undefined, ( + it is defined by default) it will terminate lines with \begin_inset Quotes eld \end_inset \backslash + +\backslash n +\backslash + +\backslash +r \begin_inset Quotes erd \end_inset @@ -1344,10 +1475,49 @@ struct icaltimetype { */ }; \layout Standard -The year, month, day, hour, minute and second fields how the broken-out +The year, month, day, hour, minute and second fields hold 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. + The is_utc field distinguishes between times in UTC and a local time zone. + The is_date field indicates if the time should be interpreted only as a + date. + If it is a date, the hour, minute and second fields are assumed to be zero, + regardless of their actual vaules. + +\layout Subsubsection + +Creating time structures +\layout Standard + +There are several ways to create a new icaltimetype structure: +\layout Verbatim + +struct icaltimetype icaltime_from_string(const char* str); +\layout Verbatim + +struct icaltimetype icaltime_from_timet(time_t v, int is_date); +\layout Verbatim + +struct icaltimetype icaltime_from_int(int v, int is_date, int is_utc); +\layout Standard + +Icaltime_from_string takes any RFC2445 compliant time string: +\layout Verbatim + +struct icaltimetype tt = icaltime_from_string("19970101T103000"); +\layout Standard + +Icaltime_from_timet takes a timet value, representing seconds past the POSIX + epoch, and a flag to indicate if the time is a date. + Dates have an identical structure to a time, but the time portion ( hours, + minuts and seconds ) is always 00:00:00. + Dates act differently in sorting an comparision, and they have a different + string representation in RFC2445. + +\layout Standard + +The icaltime_from_int is like icaltime_from_timet, but with an arbitrary + epoch. + This routine was a mistake and is deprecated. \layout Subsubsection @@ -1376,6 +1546,30 @@ It is sensible for the broken-out time fields to contain values that are struct icaltimetype icaltime_normalize(struct icaltimetype t); \layout Standard +Normalizing allows you to do arithmetic operations on time values. + +\layout Verbatim + +struct icaltimetype tt = icaltime_from_string( +\begin_inset Quotes eld +\end_inset + +19970101T103000 +\begin_inset Quotes erd +\end_inset + +); +\layout Verbatim + +tt.days +=3 +\layout Verbatim + +tt.second += 70; +\layout Verbatim + +tt = icaltime_normalize(tt); +\layout Standard + There are several routines to get the day of the week or month, etc, from a time structure. \layout Verbatim @@ -1403,15 +1597,11 @@ 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. - + The is_date field indicates whether or not the hour, minute and second + fields should be used in the conversion. \layout Verbatim -struct icaltimetype icaltime_from_timet(time_t v, int is_date, int is_utc); - +struct icaltimetype icaltime_from_timet(time_t v, int is_date); \layout Verbatim time_t icaltime_as_timet(struct icaltimetype); @@ -1442,7 +1632,7 @@ The utc_offset routine returns the offset of the named time zone from UTC, \layout Standard -The tt parmeter in the fonllowing routines indicates the date on which the +The tt parameter in the following 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 @@ -1453,7 +1643,10 @@ The tt parmeter in the fonllowing routines indicates the date on which the \layout Verbatim -int icaltime_utc_offset(struct icaltimetype tt, char* tzid) +int icaltime_utc_offset(struct icaltimetype tt, char* tzid); +\layout Verbatim + +int icaltime_local_utc_offset(); \layout Verbatim struct icaltimetype icaltime_as_utc(struct icaltimetype tt,char* tzid); @@ -1462,16 +1655,346 @@ struct icaltimetype icaltime_as_utc(struct icaltimetype tt,char* tzid); struct icaltimetype icaltime_as_zone(struct icaltimetype tt,char* tzid); \layout Verbatim +struct icaltimetype icaltime_as_local(struct icaltimetype tt); \layout Subsection Storing Objects \layout Standard -The libical distribution inclues a seperate library, libicalss, that allows +The libical distribution includes a separate 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. - ) + This library also includes code to implement the CSTP protocol of CAP and + has some routines for deciphering incomming messages. + +\layout Standard + +The file storage routines are organized in an inheritance heirarchy that + is rooted in icalset, with the derived class icalfileset and icaldirset. + Icalfileset stores components to a file, while icaldirset stores components + to multiple files, one per month based on DTSTAMP. + Other storages classess, for storage to a heap or a mysql database are + planned for the future. + +\layout Standard + +All of the icalset derived classes have the same interface: +\layout Verbatim + +\layout Verbatim + +icaldirset* icaldirset_new(const char* path); +\layout Verbatim + +void icaldirset_free(icaldirset* store); +\layout Verbatim + +const char* icaldirset_path(icaldirset* store); +\layout Verbatim + +void icaldirset_mark(icaldirset* store); +\layout Verbatim + +icalerrorenum icaldirset_commit(icaldirset* store); +\layout Verbatim + +icalerrorenum icaldirset_add_component(icaldirset* store, icalcomponent* + comp); +\layout Verbatim + +icalerrorenum icaldirset_remove_component(icaldirset* store, icalcomponent* + comp); +\layout Verbatim + +int icaldirset_count_components(icaldirset* store, icalcomponent_kind kind); +\layout Verbatim + +icalerrorenum icaldirset_select(icaldirset* store, icalcomponent* gauge); +\layout Verbatim + +void icaldirset_clear(icaldirset* store); +\layout Verbatim + +icalcomponent* icaldirset_fetch(icaldirset* store, const char* uid); +\layout Verbatim + +int icaldirset_has_uid(icaldirset* store, const char* uid); +\layout Verbatim + +icalcomponent* icaldirset_fetch_match(icaldirset* set, icalcomponent *c); +\layout Verbatim + +icalerrorenum icaldirset_modify(icaldirset* store, icalcomponent *oldc, + icalcomponent *newc); +\layout Verbatim + +icalcomponent* icaldirset_get_current_component(icaldirset* store); +\layout Verbatim + +icalcomponent* icaldirset_get_first_component(icaldirset* store); +\layout Verbatim + +icalcomponent* icaldirset_get_next_component(icaldirset* store); +\layout Subsubsection + +Creating a new set +\layout Standard + +You can create a new set from either the base class or the direved class. + From the base class use one of: +\layout Verbatim + +icalset* icalset_new_file(const char* path); +\layout Verbatim + +icalset* icalset_new_dir(const char* path); +\layout Verbatim + +icalset* icalset_new_heap(void); +\layout Verbatim + +icalset* icalset_new_mysql(const char* path); +\layout Standard + +You can also create a new set based on the derived class, For instance, + with icalfileset: +\layout Verbatim + +icalfileset* icalfileset_new(const char* path); +\layout Verbatim + +icalfileset* icalfileset_new_open(const char* path, int flags, mode_t mode); +\layout Standard + +Icaset_new_file is identical to icalfileset_new. + BOth routines will open an existing file for readinga and writing, or create + a new file if it does not exist. + Icalfilset_new_open takes the same arguments as the open() system routine + and behaves in the same way. + +\layout Standard + +The icalset and icalfilset objects are somewhat interchangable -- you can + use an icalfileset* as an argument to any of the icalset routines. +\layout Standard + +The following examples will all use icalfileset routines; using the other + icalset derived classess will be similar. + +\layout Subsubsection + +Adding, Finding and Removing Components +\layout Standard + +To add components to a set, use: +\layout Verbatim + +icalerrorenum icalfileset_add_component(icalfileset* cluster, icalcomponent* + child); +\layout Standard + +The fileset keeps an inmemory copy of the components, and this set must + be written back to the file ocassionally. + There are two routines to manage this: +\layout Verbatim + +void icalfileset_mark(icalfileset* cluster); +\layout Verbatim + +icalerrorenum icalfileset_commit(icalfileset* cluster); +\layout Standard + +Icalfileset_mark indicates that the in-memory components have changed. + Calling the _add_component routine will call _mark automatically, but you + may need to call it yourself if you have made a change to an existing component. + The _commit routine writes the data base to disk, but only if it is marked. + The _commit routine is called automatically when the icalfileset is freed. + +\layout Standard + +To iterate through the components in a set, use: +\layout Verbatim + +icalcomponent* icalfileset_get_first_component(icalfileset* cluster); +\layout Verbatim + +icalcomponent* icalfileset_get_next_component(icalfileset* cluster); +\layout Verbatim + +icalcomponent* icalfileset_get_current_component (icalfileset* cluster); + +\layout Standard + +These routines work like the corresponding routines from icalcomponent, + except that their output is filtered through a gauge. + A gauge is a test for the properties within a components; only components + that pass the test are returned. + A gauge can be constructed from a MINSQL string with: +\layout Verbatim + +icalgauge* icalgauge_new_from_sql(char* sql); +\layout Standard + +Then, you can add the gauge to the set with : +\layout Verbatim + +icalerrorenum icalfileset_select(icalfileset* store, icalgauge* gauge); +\layout Standard + +Here is an example that puts all of these routines together: +\layout Verbatim + + +\latex no_latex +void test_fileset() +\layout Verbatim + + +\latex no_latex +{ +\layout Verbatim + + +\latex no_latex + icalfileset *fs; +\layout Verbatim + + +\latex no_latex + icalcomponent *c; +\layout Verbatim + + +\latex no_latex + int i; +\layout Verbatim + + +\latex no_latex + char *path = "test_fileset.ics"; +\layout Verbatim + + +\latex no_latex + icalgauge *g = icalgauge_new_from_sql( +\layout Verbatim + + +\latex no_latex + "SELECT * FROM VEVENT WHERE DTSTART > '20000103T120000Z' AND DTSTART + <= '20000106T120000Z'"); +\layout Verbatim + + +\latex no_latex + +\layout Verbatim + + +\latex no_latex +fs = icalfileset_new(path); +\layout Verbatim + + +\layout Verbatim + + +\latex no_latex +for (i = 0; i!= 10; i++){ +\layout Verbatim + + +\latex no_latex + c = make_component(i); +\latex default + /* Make a new component where DTSTART has month of i */ +\layout Verbatim + + +\latex no_latex + icalfileset_add_component(fs,c); +\layout Verbatim + + +\latex no_latex + } +\layout Verbatim + +\layout Verbatim + + +\latex no_latex + icalfileset_commit(fs); +\latex default + /* Write to disk */ +\layout Verbatim + +\layout Verbatim + + +\latex no_latex + icalfileset_select(fs,g); +\latex default + /* Set the gauge to filter components */ +\layout Verbatim + + +\latex no_latex + +\layout Verbatim + + +\latex no_latex + for (c = icalfileset_get_first_component(fs); +\layout Verbatim + + +\latex no_latex + c != 0; +\layout Verbatim + + +\latex no_latex + c = icalfileset_get_next_component(fs)){ +\layout Verbatim + + +\latex no_latex + struct icaltimetype t = icalcomponent_get_dtstart(c); +\layout Verbatim + + +\latex no_latex + +\layout Verbatim + + +\latex no_latex + printf("%s +\backslash +n",icaltime_as_ctime(t)); +\layout Verbatim + + +\latex no_latex + } +\layout Verbatim + + +\latex no_latex +icalfileset_free(fs); +\layout Verbatim + + +\latex no_latex +} +\layout Subsubsection + +Other routines +\layout Standard + +There are several other routines in the icalset interface, but they not + fully implemented yet. + \layout Subsection @@ -1501,7 +2024,7 @@ Libical relies heavily on dynamic allocation for both the core objects and \layout Description -3) If the function name has "add" in it, the caller is transfering control +3) If the function name has "add" in it, the caller is transferring control of the memory to the routine. ( icalproperty_add_parameter() ) \layout Description @@ -1515,6 +2038,7 @@ Libical relies heavily on dynamic allocation for both the core objects and 5) If the routine returns a string, libical owns the memory and will put it on a ring buffer to reclaim later. + For example, icalcomponent_as_ical_string(). You'd better strdup() it if you want to keep it, and you don't have to delete it. @@ -1523,8 +2047,8 @@ Libical relies heavily on dynamic allocation for both the core objects and Error Handling \layout Standard -Libical has several error handling mechanisms for the varioustypes of programmin -g, semantic and syntactic errors you may encounter. +Libical has several error handling mechanisms for the various types of programmi +ng, semantic and syntactic errors you may encounter. \layout Subsubsection Return values @@ -1541,11 +2065,51 @@ icalerrno \layout Standard Most routines will set the global error value icalerrno on errors. - This variable is an enumeration; permissable values can be found in libical/ica + This variable is an enumeration; permissible values can be found in libical/ica lerror.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 + You can use icalerror_strerror() to get a string that describes the error. + The enumerations are: +\layout Itemize + +ICAL_BADARG_ERROR -- One of the argument to a routine was bad. + Typically for a null pointer. + +\layout Itemize + +ICAL_NEWFAILED_ERROR -- A new() or malloc() failed +\layout Itemize + +ICAL_MALFORMEDDATA_ERROR -- An input string was not in the correct format +\layout Itemize + +ICAL_PARSE_ERROR -- The parser failed to parse an incomming component +\layout Itemize + +ICAL_INTERNAL_ERROR -- Largely equivalent to an assert +\layout Itemize + +ICAL_FILE_ERROR -- A file operation failed. + Check errno for more detail. +\layout Itemize + +ICAL_ALLOCATION_ERROR -- ? +\layout Itemize + +ICAL_USAGE_ERROR -- ? +\layout Itemize + +ICAL_NO_ERROR -- No error +\layout Itemize + +ICAL_MULTIPLEINCLUSION_ERROR -- ? +\layout Itemize + +ICAL_TIMEDOUT_ERROR -- For CSTP and acquiring locks +\layout Itemize + +ICAL_UNKNOWN_ERROR -- ? \layout Subsubsection X-LIC-ERROR and X-LIC-INVALID-COMPONENT @@ -1555,14 +2119,17 @@ The library handles semantic and syntactic errors in components by inserting errors properties into the components. If the parser cannot parse incoming text ( a syntactic error ) or if the icalrestriction_check() routine indicates that the component does not meet - the requirments of RFC2446 ( a semantic error) the library will insert + the requirements of RFC2446 ( a semantic error) the library will insert properties of the type X-LIC-ERROR to describe the error. Here is an example of the error property: \layout Verbatim X-LIC-ERROR;X-LIC-ERRORTYPE=INVALID_ITIP :Failed iTIP restrictions for property DTSTART. - Expected 1 instances of the property and got 0 + +\layout Verbatim + +Expected 1 instances of the property and got 0 \layout Standard This error resulted from a call to icalrestriction_check(), which discovered @@ -1572,6 +2139,11 @@ This error resulted from a call to icalrestriction_check(), which discovered There are a few routines to manipulate error properties: \layout Standard + +[ The following data is supposed to be in a table. + It looks OK in LyX, but does not format propertly in output. + ] +\layout Standard \LyXTable multicol5 10 2 0 0 -1 -1 -1 -1 @@ -1642,7 +2214,7 @@ Convert some error properties into \newline \newline -REQUESTS-STATUS to indicate the inability to +REQUESTS-STATUS proprties to indicate the inability to \newline \newline @@ -1683,12 +2255,26 @@ The libical parser will generate the error that end in PARSEERROR when it \layout Standard -Icalcomponent_convert_errors() converts some of the error properties ina - component into REQUEST-STATUS properties that indicate a failure. +Icalcomponent_convert_errors() converts some of the error properties in + a component into REQUEST-STATUS properties that indicate a failure. 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. +\layout Subsubsection + +ICAL_ERRORS_ARE_FATAL and icalerror_errors_are_fatal +\layout Standard + +If the global variable icalerror_errors_are_fatal is set to 1, then any + error condition will cause the program to abort. + The abort occurs in icalerror_set_errno(), and is done with an assert(0) + if NDEBUG is undefined, and with icalerror_crash_here if NDEBUG is defined. + The default value of icalerror_errors_are_fatal is 1 when ICAL_ERRORS_ARE_FATAL + is defined, and 0 otherwise. + Since ICAL_ERRORS_ARE_FATAL is defined by default, icalerror_errors_are_fatal + is also defined by default. + \layout Subsection Naming Standard @@ -1811,32 +2397,11 @@ The enums for the parts of a recurarance rule and request statuses are irregular \layout Section -Useful Recipies -\layout Standard - -Iteration -\layout Standard - -Copying components. - Remember that you must clone or remove an object before putting in on another - list. - -\layout Standard - -Finding compliance errors -\layout Section - -Performance -\layout Standard - -Checking restrictions is computationally expensive. -\layout Section - Hacks and Bugs \layout Standard There are a lot of hacks in the library -- bits of code that I am not proud - of and should propbably be changed. + of and should probably be changed. These are marked with the comment string \begin_inset Quotes eld \end_inset diff --git a/libical/doc/UsingLibical.ps b/libical/doc/UsingLibical.ps index 5a618a0c7e..6223144e3a 100644 --- a/libical/doc/UsingLibical.ps +++ b/libical/doc/UsingLibical.ps @@ -1,7 +1,7 @@ %!PS-Adobe-2.0 %%Creator: dvips(k) 5.86 Copyright 1999 Radical Eye Software %%Title: UsingLibical.dvi -%%Pages: 18 +%%Pages: 22 %%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.11.03:1354 +%DVIPSSource: TeX output 2001.01.09:0928 %%BeginProcSet: texc.pro %! /TeXDict 300 dict def TeXDict begin/N{def}def/B{bind def}N/S{exch}N/X{S @@ -236,195 +236,211 @@ B45A806E90C8FC5D6E7E6E7F6E7FA24A7F4A7F8291381F3FFCEC3E1F027C7F4A6C7E4948 495A387FC1F8EB07F06CB45A6C5B000790CAFCEA01FC36407EAB3B>I E %EndDVIPSBitmapFont -%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 -16C03903F0003FED0FE0ED07F01503A2ED01F8A6ED03F0A21507ED0FE0ED1FC0EDFF8090 -B612005D5D15FF16C09039F0001FE0ED07F0ED03F81501ED00FCA216FE167EA616FE16FC -1501ED03F8150FED3FF0007FB612E016C0B712806CECFE0015F027337FB22C>I<02FF13 -700107EBE0F84913F9013F13FD4913FFEBFF813901FE007F4848131FD807F0130F150748 -5A491303485A150148C7FCA25A007EEC00F01600A212FE5AAB7E127EA3007F15F06CEC01 -F8A26C7EA26C6C13036D14F06C6C130716E0D803FC131F6C6CEB3FC03A00FF81FF806DB5 -12006D5B010F5B6D13F00100138025357DB32C>I<007FB5FCB612C015F0816C803907E0 -03FEEC00FFED7F80153FED1FC0ED0FE0A2150716F0150316F81501A4ED00FCACED01F8A3 -150316F0A2150716E0150FED1FC0153FED7F80EDFF00EC03FE007FB55AB65A5D15C06C91 -C7FC26337EB22C>I<007FB612F0B712F8A37E3903F00001A7ED00F01600A4EC01E04A7E -A490B5FCA5EBF003A46E5A91C8FCA5163C167EA8007FB612FEB7FCA36C15FC27337EB22C ->I<007FB612F8B712FCA37ED803F0C7FCA716781600A515F04A7EA490B5FCA5EBF001A4 -6E5A92C7FCAD387FFFE0B5FC805C7E26337EB22C>I<903901FC038090390FFF87C04913 -EF017F13FF90B6FC4813073803FC01497E4848137F4848133F49131F121F5B003F140F90 -C7FCA2127EED078092C7FCA212FE5AA8913803FFF84A13FCA27E007E6D13F89138000FC0 -A36C141FA27F121F6D133F120F6D137F6C7E6C6C13FF6D5A3801FF076C90B5FC6D13EF01 -1F13CF6DEB0780D901FCC7FC26357DB32C>I<D87FFEEBFFFCB54813FEA36C486C13FCD8 -07E0EB0FC0B190B6FCA59038E0000FB3D87FFEEBFFFCB54813FEA36C486C13FC27337EB2 -2C>I<007FB512F8B612FCA36C14F839000FC000B3B3A5007FB512F8B612FCA36C14F81E -3379B22C>I<0107B512804914C0A36D148090390003F000B3AF1218127EA2B4FCA24A5A -48130F007F131F9038C07FC06CB55A6C91C7FC6C5B000313F838007FC022347BB22C>I< -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 +%DVIPSBitmapFont: Fc ectt1000 10 78 +/Fc 78 123 df<121FEA3F80EA7FC0EAFFE0B0EA7FC0AEEA1F00C7FCA7121FEA3F80EA7F +C0EAFFE0A5EA7FC0EA3F80EA1F000B3470B32C>33 D<003C131E007F137F481480A66C14 +00A6007E7FA6003E133EA3003C131E001C131C191977B32C>I<EA0F80EA1FE0EA3FF012 +7F13F8A213FCA2123F121F120FEA007CA313FC13F8A2120113F01203EA07E0A2EA0FC0EA +3F80127FEAFF005A12F812700E1D71B22C>39 D<143814FC13011303EB07F8EB0FF0EB1F +C0EB3F80EB7F0013FE485A485A5B12075B120F5B485AA2123F90C7FCA25A127EA312FE5A +AC7E127EA3127F7EA27F121FA26C7E7F12077F12037F6C7E6C7E137FEB3F80EB1FC0EB0F +F0EB07F8EB03FC130113001438164272B92C>I<127012FC7E7E6C7E6C7EEA0FE06C7E6C +7E6C7E6C7E137F7F1480131F14C0130FEB07E0A214F01303A214F81301A314FC1300AC13 +0114F8A3130314F0A2130714E0A2EB0FC0131F1480133F14005B13FE485A485A485A485A +EA3FC0485A48C7FC5A5A1270164279B92C>I<EB0380497EA60020140800F8143E00FE14 +FE00FF13C1EBC7C7EBE7CF003FB512F8000F14E0000314806C140038007FFCA248B5FC48 +1480000F14E0003F14F839FFE7CFFEEBC7C7EB07C100FE13C000F8143E00201408000014 +00A66D5A1F247AAA2C>I<147014F8AF003FB612E0B712F8A4C700F8C7FCB0147025267D +AB2C>I<EA0F80EA1FE0EA3FF0EA7FF8A213FCA3123F121F120F120013F8A21201EA03F0 +1207EA1FE0EA7FC0EAFF80130012FC12700E17718A2C>I<007FB512F0B612F8A36C14F0 +1D0579942C>I<121FEA3F80EA7FC0EAFFE0A5EA7FC0EA3F80EA1F000B0B708A2C>I<1507 +ED0F80A2151F16005D153E157E157CA215FC5D14015D14035D14075D140F5D141F92C7FC +5C143EA2147E147C14FC5C13015C13035C13075C130F5C131F91C8FC5B133EA2137E137C +13FC5B12015B12035B12075B120F5B121F90C9FCA25A123E127E127C12FC5AA212702141 +7BB92C>I<EB03F8EB0FFE90383FFF80497F90B57E3901FE0FF03903F803F848486C7EEB +E0004848137EA248487FA248C7EA1F80A2003E140F007E15C0A3007C140700FC15E0AC6C +140F007E15C0A46CEC1F80A36C6CEB3F00A26C6C137E6D13FE00075CEBF0016C6C485A39 +01FE0FF06CB55A6D5B6D5BD90FFEC7FCEB03F823357CB32C>I<1307497EA2131FA2133F +137F13FF5A1207127FB5FC13DF139FEA7C1F1200B3AE007FB512E0B612F0A36C14E01C34 +77B32C>I<EB0FF890387FFF8048B512E00007804814FC391FF80FFE393FE001FF903880 +007F48C7EA3F80007E141F00FE15C0150F6C15E01507A3127E123CC8FCA2150F16C0151F +1680153F16005D15FE4A5A14034A5A4A5A4A5A4A5AECFF804948C7FC495A495A495AEB3F +E0EB7F8049C8FC485A4848EB03C04848EB07E0EA1FE0485A48B6FCB7FCA36C15C023347C +B32C>I<EB0FFC90387FFF8048B512E0000714F84880391FF807FEEBC0004848137F6D7F +1680151FA26C5A6CC7FCC8FC153F16005D15FE14014A5AEC1FF890381FFFF0495BA215F8 +6D7F90380007FEEC00FF81ED3F80ED1FC0150FA216E01507A2123C127EB4FC150F16C0A2 +48141F007FEC3F806DEB7F006C6C5B391FF807FE6CB55A6C5C6C14E0C66C1380D90FFCC7 +FC23357CB32C>I<EC07F04A7E141F143FA2147EA214FCEB01F8A2EB03F0EB07E0A2EB0F +C0EB1F80A2EB3F00137EA25B485AA2485A5B1207485AA2485A48C7FCA2127E5AB712FC16 +FEA36C15FCC8EAF800AA91387FFFF091B512F8A36E13F027347EB32C>I<000FB512FE48 +80A35D0180C8FCADEB83FE90389FFF8090B512E015F8819038FE03FE9038F000FF01C07F +49EB3F8090C7121F6C15C0C8120FA2ED07E0A4123C127EB4FC150F16C0A248141F007EEC +3F80007FEC7F006C6C5B6D485A391FF80FFC6CB55A6C5C000114C06C6C90C7FCEB0FF823 +347CB22C>I<EC3FC0903801FFF801077F011F7F497F90387FE07F9039FF003F80484813 +7FEA03F8485A5B000FEC3F004848131E4990C7FC123F90C9FCA25A127EEB03FE90381FFF +80D8FC7F13E000FDB57EB67E9038FE07FC9038F001FE9038C0007F49EB3F8090C7121F16 +C048140F16E01507A3127EA47E150F6D14C0001F141F6D1480000F143F6DEB7F003907F8 +01FE3903FE07FC6CB55A6C5C6D5B011F1380D907FCC7FC23357CB32C>I<1278B712C016 +E0A316C000FCC7EA3F80ED7F0015FE00785CC712014A5A4A5A5D140F5D4A5A143F92C7FC +5C147E14FE5C13015CA2495AA213075CA3495AA4495AA5133F91C8FCAA131E23357CB32C +>I<EB07FC90383FFF8090B512E0000314F84880390FFC07FE391FF001FF9038C0007F48 +48EB3F8090C7121F4815C0007E140FA56CEC1F80A26C6CEB3F006D5B390FF001FE3903FC +07F86CB55A6C6C13C0D907FCC7FC90387FFFC048B512F03903FC07F8390FF001FE391FC0 +007F497F48C7EA1F80007EEC0FC0A248EC07E0A7007EEC0FC0A2007F141F6C6CEB3F806C +6CEB7F009038F001FF390FFC07FE6CB55A6C5CC614E0013F1380D907FCC7FC23357CB32C +>I<EB07FCEB3FFF90B512C0488048803907FC07F8390FF001FC48486C7ED83F80137E15 +7F48C77E007EEC1F8012FE5AED0FC0A416E0A37E127E007F141F7E6D133F6C6C137F390F +F001FF3807FC0F6CB6FC6C14F76C14C7013F130FD90FF813C090C7FCA2151F1680153F16 +00000F5C486C137E486C13FE4A5A4A5A14079038801FF0391FE07FE090B55A6C91C7FC6C +5B000113F838007FC023357CB32C>I<121FEA3F80EA7FC0EAFFE0A5EA7FC0EA3F80EA1F +00C7FCAE121FEA3F80EA7FC0EAFFE0A5EA7FC0EA3F80EA1F000B2470A32C>I<EA0F80EA +1FC0EA3FE0EA7FF0A5EA3FE0EA1FC0EA0F80C7FCAEEA0F80EA1FE0EA3FF0EA7FF8A213FC +A3123F121F120F120013F8A21201EA03F01207EA1FE0EA7FC0EAFF80130012FC12700E30 +71A32C>I<007FB612F0B712F8A36C15F0CAFCA8007FB612F0B712F8A36C15F025127DA1 +2C>61 D<EC7F80903803FFE0010F7F013F7F497F9038FFC0FE3901FE007FD803F87F4848 +EB1F809038E00FCF390FC03FFF48484813C091B5FCEA3F01393E03F87F903907F03FE000 +7EEBE01F397C0FC00FEC8007A2EAFC1F00F8EB0003A900FCEB8007D87C0F14C0A2ECC00F +3A7E07E01F80003EEBF03F903903F87F00393F01FFFED81F805B6E5A6C6C6C5A3907E00F +C09039F00007C06C6CEB0FE0D801FE131F3900FFC0FF6DB512C06D1480010FEBFE000103 +13F89038007FC023337CB22C>64 D<14FE497EA4497FA214EFA2130781A214C7A2010F7F +A314C390381F83F0A590383F01F8A490387E00FCA549137E90B512FEA34880A29038F800 +3FA34848EB1F80A4000715C049130FD87FFEEBFFFC6D5AB514FE6C15FC497E27347EB32C +>I<007FB512E015F8B612FE6C8016C03903F0003FED0FE0ED07F01503A2ED01F8A6ED03 +F0A21507ED0FE0ED1FC0EDFF8090B612005D5D15FF16C09039F0001FE0ED07F0ED03F815 +01ED00FCA216FE167EA616FE16FC1501ED03F8150FED3FF0007FB612E016C0B712806CEC +FE0015F027337FB22C>I<02FF13700107EBE0F84913F9013F13FD4913FFEBFF813901FE +007F4848131FD807F0130F1507485A491303485A150148C7FCA25A007EEC00F01600A212 +FE5AAB7E127EA3007F15F06CEC01F8A26C7EA26C6C13036D14F06C6C130716E0D803FC13 +1F6C6CEB3FC03A00FF81FF806DB512006D5B010F5B6D13F00100138025357DB32C>I<00 +7FB5FCB612C015F0816C803907E003FEEC00FFED7F80153FED1FC0ED0FE0A2150716F015 +0316F81501A4ED00FCACED01F8A3150316F0A2150716E0150FED1FC0153FED7F80EDFF00 +EC03FE007FB55AB65A5D15C06C91C7FC26337EB22C>I<007FB612F0B712F8A37E3903F0 +0001A7ED00F01600A4EC01E04A7EA490B5FCA5EBF003A46E5A91C8FCA5163C167EA8007F +B612FEB7FCA36C15FC27337EB22C>I<007FB612F8B712FCA37ED803F0C7FCA716781600 +A515F04A7EA490B5FCA5EBF001A46E5A92C7FCAD387FFFE0B5FC805C7E26337EB22C>I< +903901FC038090390FFF87C04913EF017F13FF90B6FC4813073803FC01497E4848137F48 +48133F49131F121F5B003F140F90C7FCA2127EED078092C7FCA212FE5AA8913803FFF84A +13FCA27E007E6D13F89138000FC0A36C141FA27F121F6D133F120F6D137F6C7E6C6C13FF +6D5A3801FF076C90B5FC6D13EF011F13CF6DEB0780D901FCC7FC26357DB32C>I<D87FFE +EBFFFCB54813FEA36C486C13FCD807E0EB0FC0B190B6FCA59038E0000FB3D87FFEEBFFFC +B54813FEA36C486C13FC27337EB22C>I<007FB512F8B612FCA36C14F839000FC000B3B3 +A5007FB512F8B612FCA36C14F81E3379B22C>I<0107B512804914C0A36D148090390003 +F000B3AF1218127EA2B4FCA24A5A48130F007F131F9038C07FC06CB55A6C91C7FC6C5B00 +0313F838007FC022347BB22C>I<D87FFCEB7FF8486CEBFFFCA36C48EB7FF8D807C0EB1F +80153FED7F00157E5D4A5A14034A5A5D4A5A4A5A143F4AC7FC147E5CEBC1F813C3EBC7FC +A2EBCFFEEBDFBEEBFFBF141F01FE7F496C7E13F86E7EEBF00301E07FEBC001816E7EA215 +7E153E153F811680ED0FC0A2ED07E0D87FFCEB1FFC486CEB3FFEA36C48EB1FFC27337EB2 +2C>I<387FFFE0B57EA36C5BD803F0C8FCB3AE16F0ED01F8A8007FB6FCB7FCA36C15F025 +337DB22C>I<D87FE0EB0FFC486CEB1FFEA26D133F007F15FC000F15E001BC137BA4019E +13F3A3EB9F01A2018F13E3A21483A2018713C314C7A201831383A214EFA201811303A214 +FFEB80FEA3147C14381400ACD87FF0EB1FFC486CEB3FFEA36C48EB1FFC27337EB22C>I< +D87FF0EB7FFC486CEBFFFEA27F007FEC7FFCD807FEEB07C013DEA213DF13CFA2148013C7 +14C0A213C314E0A213C114F0A213C014F8A2147CA3143EA2141E141FA2140F1587A21407 +15C7A2140315E71401A215F71400A215FFD87FFC137F487E153FA26C48EB1F8027337EB2 +2C>I<EB7FFF0003B512E0000F14F848804880EBE003EB800048C7127FA2007E80A300FE +158048141FB3A86C143FA2007E1500A3007F5CA26C6C13FEEBF00790B5FC6C5C6C5C0003 +14E0C66C90C7FC21357BB32C>I<007FB512C0B612F88115FF6C15802603F00013C0153F +ED0FE0ED07F0A2150316F81501A6150316F01507A2ED0FE0ED3FC015FF90B61280160015 +FC5D15C001F0C8FCB0387FFF80B57EA36C5B25337EB22C>I<EB7FFF0003B512E0000F14 +F848804880EBF007EB800048C7127FA2007E80A300FE158048141FB3A7EB01F0EB03F800 +FE143F267E01FC1300A2EB00FE007F5C147FD83F8013FEEBF03F90B5FC6C5C6C5C000314 +E0C67E90380007F0A26E7EA26E7EA26E7EA2157FA2153E21407BB32C>I<387FFFFCB67E +15E015F86C803907E007FE1401EC007F6F7E151FA26F7EA64B5AA2153F4BC7FCEC01FE14 +0790B55A5D15E081819038E007FCEC01FE1400157F81A8160FEE1F80A5D87FFEEB1FBFB5 +ECFF00815E6C486D5AC8EA01F029347EB22C>I<90381FF80790B5EA0F804814CF000714 +FF5A381FF01F383FC003497E48C7FC007E147F00FE143F5A151FA46CEC0F00007E91C7FC +127F7FEA3FE0EA1FFCEBFFC06C13FC0003EBFFC06C14F06C6C7F01077F9038007FFEEC07 +FF02001380153FED1FC0A2ED0FE0A20078140712FCA56CEC0FC0A26CEC1F806D133F01E0 +EB7F009038FE01FF90B55A5D00F914F0D8F83F13C0D8700790C7FC23357CB32C>I<007F +B612FCB712FEA43AFC007E007EA70078153CC71400B3AF90383FFFFCA2497F6D5BA22733 +7EB22C>I<3B7FFF803FFFC0B56C4813E0A36C496C13C03B03F00001F800B3AF6D130300 +015DA26D130700005D6D130F017F495A6D6C485AECE0FF6DB5C7FC6D5B010313F86D5B90 +38003F802B3480B22C>I<D87FFCEB7FFC486CEBFFFEA36C48EB7FFCD80FC0EB07E06D13 +0F000715C0A36D131F00031580A36D133F00011500A36D5B0000147EA4017E5BA46D485A +A490381F83F0A4010F5B14C7A301075BA214EFA201035BA214FFA26D90C7FCA46D5A2734 +7EB22C>I<D87FF0EB07FF486C491380A36C486D1300001FC8127CA46C6C5CA76C6C495A +A4143E147FA33A03E0FF83E0A214F7A201E113C3A3000101E35BA201F113C701F313E7A3 +14C1A200005DA201F713F71480A301FF13FF017F91C7FC4A7EA4013E133E29347FB22C> +I<3A3FFF03FFE0484913F0148714076C6D13E03A01F800FE007F0000495A13FE017E5BEB +7F03013F5B1487011F5B14CF010F5B14FF6D5BA26D90C7FCA26D5AA26D5AA2497EA2497E +A2497F81EB0FCF81EB1FC7EC87F0EB3F83EC03F8EB7F01017E7FEBFE00497F0001147E49 +137F000380491480151FD87FFEEBFFFC6D5AB514FE6C15FC497E27337EB22C>I<D87FFC +EB7FFC486CEBFFFEA36C48EB7FFCD807F0EB0FC0151F000315806D133F12016DEB7F0012 +006D137E017E13FE017F5BEB3F01EC81F8131FEC83F0EB0FC314C7903807E7E0A201035B +14EF6DB45AA292C7FC7F5C147EB0903807FFE0497FA36D5B27337EB22C>I<003FB612C0 +4815E0A4007EC7EA1FC0ED3F80A2ED7F00157E15FE4A5A003C5CC712034A5AA24A5A4A5A +A24A5A4AC7FCA214FE495AA2495A495AA2495A495AA2495A49C8FCA213FE485AA24848EB +03C049EB07E01207485A5B121F485AA248C7FCB7FCA46C15C023337CB22C>I<007FB6FC +B71280A46C150021067B7D2C>95 D<3801FFF0000713FE001F6D7E15E048809038C01FF8 +1407EC01FC381F80000006C77EC8127EA3ECFFFE131F90B5FC1203120F48EB807E383FF8 +00EA7FC090C7FC12FE5AA47E007F14FEEB8003383FE01F6CB612FC6C15FE6C14BF0001EB +FE1F3A003FF007FC27247CA32C>97 D<EA7FF0487EA3127F1201AAEC1FE0ECFFF801FB13 +FE90B6FC16809138F07FC09138801FE091380007F049EB03F85BED01FC491300A216FE16 +7EA816FE6D14FCA2ED01F86D13036DEB07F0150F9138801FE09138E07FC091B512801600 +01FB5B01F813F83900F03FC027337FB22C>I<903803FFE0011F13F8017F13FE48B5FC48 +804848C6FCEA0FF0485A49137E4848131890C9FC5A127EA25AA8127EA2127F6C140F6DEB +1F806C7E6D133F6C6CEB7F003907FE03FF6CB55A6C5C6C6C5B011F13E0010390C7FC2124 +7AA32C>I<EC0FFE4A7EA380EC003FAAEB07F8EB3FFE90B512BF4814FF5A3807FC0F380F +F00348487E497E48487F90C7FC007E80A212FE5AA87E007E5CA2007F5C6C7E5C6C6C5A38 +0FF0073807FC1F6CB612FC6CECBFFE6C143FEB3FFC90390FF01FFC27337DB22C>I<EB03 +FE90381FFFC0017F13F048B57E48803907FE03FE390FF800FFD81FE0EB3F805B4848EB1F +C090C7120F5A007E15E015075AB7FCA416C000FCC9FC7E127EA2127F6CEC03C06DEB07E0 +6C7ED80FF0130F6C6CEB3FC001FF13FF000190B512806C1500013F13FC010F13F0010113 +8023247CA32C>I<EC0FF8EC3FFE91B5FC4914805B903807FC7F14F090390FE03F0014C0 +92C7FCA6007FB512FEB7FCA36C5C26000FC0C7FCB3A8003FB512F04880A36C5C21337DB2 +2C>I<ED03F8903907F80FFC90391FFE3FFE017FB6FC48B7FC48ECFE7F9038FC0FF82607 +F003133E3A0FE001FC1CD9C0001300001F8049137EA66D13FE000F5CEBE0016C6C485A39 +03FC0FF048B5FC5D481480D99FFEC7FCEB87F80180C8FCA37F6C7E90B512F06C14FE48EC +FF804815E04815F03A3FC0001FF848C7EA03FC007E1400007C157C00FC157E48153EA46C +157E007E15FCD87F801303D83FE0EB0FF8D81FFCEB7FF06CB612E0000315806C1500D800 +3F13F8010713C028387EA42C>I<EA7FF0487EA3127F1201AAEC1FE0EC7FFC9038F9FFFE +01FB7F90B6FC9138F03F80ECC01F02807FEC000F5B5BA25BB3267FFFE0B5FCB500F11480 +A36C01E0140029337FB22C>I<1307EB1FC0A2497EA36D5AA20107C7FC90C8FCA7387FFF +C080B5FC7EA2EA0007B3A8007FB512FCB612FEA36C14FC1F3479B32C>I<140EEC3F80A2 +EC7FC0A3EC3F80A2EC0E0091C7FCA748B512804814C0A37EC7120FB3B3A2141F003C1480 +007E133FB414005CEB01FEEBFFFC6C5B5C001F5B000790C7FC1A467CB32C>I<EA7FE048 +7EA3127F1201AA91381FFFF04A13F8A36E13F0913800FE004A5A4A5A4A5A4A5A4A5A4A5A +4AC7FC14FEEBF1FC13F3EBF7FE90B5FCA2EC9F80EC0FC001FE7FEBFC07496C7E496C7E81 +1400157E811680151F3A7FFFC0FFFCB500E113FEA36C01C013FC27337EB22C>I<387FFF +E0B57EA37EEA0003B3B3A5007FB61280B712C0A36C158022337BB22C>I<3A7F83F007E0 +9039CFFC1FF83AFFDFFE3FFCD87FFF13FF91B57E3A07FE1FFC3E01FCEBF83F496C487E01 +F013E001E013C0A301C01380B33B7FFC3FF87FF0027F13FFD8FFFE6D13F8D87FFC4913F0 +023F137F2D2481A32C>I<397FF01FE039FFF87FFC9038F9FFFE01FB7F6CB6FC00019038 +F03F80ECC01F02807FEC000F5B5BA25BB3267FFFE0B5FCB500F11480A36C01E014002924 +7FA32C>I<EB07FCEB1FFF017F13C048B512F048803907FC07FC390FF001FE48486C7E01 +80133F003F158090C7121F007EEC0FC0A348EC07E0A76C140F007E15C0A2007F141F6C15 +806D133F6C6CEB7F006D5B6C6C485A3907FC07FC6CB55A6C5C6C6C13C0011F90C7FCEB07 +FC23247CA32C>I<397FF01FE039FFF8FFF801FB13FE90B6FC6C158000019038F07FC091 +38801FE091380007F049EB03F85BED01FC491300A216FE167EA816FE6D14FCA2ED01F86D +13036DEB07F0150F9138801FE09138E07FC091B51280160001FB5B01F813F8EC3FC091C8 +FCAD387FFFE0B57EA36C5B27367FA32C>I<903903FC078090391FFF0FC0017F13CF48B5 +12EF4814FF3807FE07380FF00148487E49137F4848133F90C7FC48141F127E150F5AA87E +007E141FA26C143F7F6C6C137F6D13FF380FF0033807FC0F6CB6FC6C14EF6C6C138F6D13 +0FEB07F890C7FCAD0203B5FC4A1480A36E140029367DA32C>I<D87FFEEB3FC0B53801FF +F0020713F8021F13FC6C5B39003F7FE1ECFF019138FC00F84A13704A13005CA25C5CA391 +C8FCAF007FB512E0B67EA36C5C26247EA32C>I<90387FF8700003B512F8120F5A5A387F +C00F387E00034813015AA36CEB00F0007F140013F0383FFFC06C13FE6CEBFF80000314E0 +C66C13F8010113FCEB0007EC00FE0078147F00FC143F151F7EA26C143F6D133E6D13FE90 +38F007FC90B5FC15F815E000F8148039701FFC0020247AA32C>I<131E133FA9007FB6FC +B71280A36C1500D8003FC8FCB1ED03C0ED07E0A5EC800F011FEB1FC0ECE07F6DB5128016 +0001035B6D13F89038003FE0232E7EAD2C>I<3A7FF003FF80486C487FA3007F7F0001EB +000FB3A3151FA2153F6D137F3900FE03FF90B7FC6D15807F6D13CF902603FE0713002924 +7FA32C>I<3A7FFF01FFFCB514FE148314016C15FC3A03E0000F80A26D131F00011500A2 +6D5B0000143EA26D137E017C137CA2017E13FC013E5BA2EB3F01011F5BA21483010F5BA2 +14C701075BA214EF01035BA214FF6D90C7FCA26D5A147C27247EA32C>I<D87FFFEB7FFF +6EB5FCB515806C16004A7ED807C0EB01F0A66C6C495AA3143E147FA2D801F0495AECFF87 +A214F7A201F113C700005D9038F9E3CFA201FB13EFA3D97BC190C7FC017F13FFA21480A2 +013F5B90381F007C29247FA32C>I<3A3FFF03FFF048018713F8A36C010313F03A00FC00 +7E005D90387E01F8013F5BEB1F83EC87E090380FCFC0903807EF80EB03FF6D90C7FC5C6D +5A147C14FE130180903803EF80903807CFC0EB0FC7EC83E090381F01F0013F7FEB7E0001 +7C137C49137E0001803A7FFF01FFFC1483B514FE6C15FC140127247EA32C>I<3A7FFF01 +FFFCB5008113FE148314816C010113FC3A03E0000F806C7E151F6D140012005D6D133E13 +7C017E137E013E137CA2013F13FC6D5BA2EB0F815DA2EB07C1ECC3E0A2EB03E3ECE7C013 +0114F75DEB00FFA292C7FC80A2143EA2147E147CA214FC5CA2EA0C01003F5BEA7F83EB87 +E0EA7E0F495A387FFF806C90C8FC6C5A6C5AEA07E027367EA32C>I<003FB612E04815F0 +A4007EC7EA1FE0ED3FC0ED7F80EDFF004A5A003C495AC7485A4A5A4A5A4A5A4A5A4AC7FC +EB01FC495AEB0FF0495A495A495A49C8FC4848EB01E04848EB03F0485A485A485A485A48 +5AB7FCA46C15E024247DA32C>I E %EndDVIPSBitmapFont %DVIPSBitmapFont: Fd ecbx1000 10 57 /Fd 57 122 df<913A03FF8007FE027F9039F07FFF800103B500FDB512E0010F903A00FF @@ -433,171 +449,169 @@ 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 +D<EA0F80EA3FE0EA7FF0A2EAFFF8A213FCA3127FA2123FEA0F9CEA001C133C1338A31378 +137013F0EA01E0A2EA03C0EA0780EA0F005A121C12180E1D798C1B>44 +D<B61280A819087F9620>I<EA0F80EA3FE0EA7FF0A2EAFFF8A5EA7FF0A2EA3FE0EA0F80 +0D0D798C1B>I<141E143E14FE1307137FB5FCA3138FEA000FB3B3A5007FB61280A42136 +79B530>49 D<EB0FFE90387FFFC048B512F0000714FC390FE03FFF261F800F1380263F00 +0313C0D87F8014E0EBE00100FF6D13F07FA2ED7FF8A46C5A6C5A0006C7FCC8FCEDFFF0A2 +16E05C16C04A138016004A5A4A5AEC1FF05D4A5A4AC7FC14FE495AD903F01378495A495A +495A49C712F8017C14F05B49130148B6FC5A5A5A5A5A4815E0B7FCA425367BB530>I<EB +03FF011F13F0017F13FC3901FC07FF2603F003138048486C13C0496C13E0EA0FF86D14F0 +487EA66C4814E06C5A6C485AC714C04A138016004A5A4A5AEC3FF090380FFFC05D15F090 +380007FE913801FF806E13C016E0ED7FF016F8ED3FFCA216FEEA1FC0487E487E487EA416 +FCA249137F007F15F801C0EBFFF06C5A6C6C4813E0260FFC0713806CB61200000114FC6C +6C13F0010790C7FC27377CB530>I<ED07C0150FA2151F153F157F15FF5CA25C5C5C5C14 +3E143C5C5C1301495A5C495A495A5B133E5B13785B485A1203485A5B48C7FC121E5A127C +5AB81280A4C70001EBC000AA0103B61280A429367DB530>I<001C15C0D81F80130701F8 +137F90B61280A216005D5D15F05D15804AC7FC14F090C9FCA7EB03FE90381FFFE0017F13 +F89038FE07FC9038F003FFD9C0011380496C13C090C7FC000E15E0C8127F16F0A216F8A3 +121FEA3FC0487E12FF7FA316F05B15FFD87F8014E0007EC713C0003E5B003F4913806C6C +481300390FF01FFE6CB512F8000114E06C6C1380D90FF8C7FC25377BB530>I<EC0FF8EC +FFFE0103EBFF8090390FF80FC090393FE003E090397F8001F09038FF000F48EC1FF84848 +133F485A120F5B121FA2003FEC1FF0ED0FE0484890C7FCA31408EC7FF039FFF1FFFC01F3 +13FFD9F78013809039FF007FC049EB3FE04914F0ED1FF85B16FCA34914FEA4127FA5123F +16FCA26C7E16F8000F143F6D14F0000715E06C6CEB7FC03A01FF81FF806C90B51200013F +13FC010F13F00101138027377CB530>I<123C123EEA3FE090B71280A41700485D5E5E5E +5EA2007CC7EA0FC000784A5A4BC7FC00F8147E485C5D14014A5AC7485A4A5AA24A5A143F +4AC8FCA214FEA213015C1303A21307A2130F5CA2131FA5133FA96D5A6D5A6D5A29397BB7 +30>I<49B47E010F13F0013F13FC9038FE01FF3A01F8007F804848EB3FC04848EB1FE015 +0F484814F01507121FA27F7F7F6D130F01FF14E014C09138E01FC06CEBF83F9138FE7F80 +6C9038FFFE005D6C14F06C14FC6C14FF6D14806D14C090B612E0D803FD14F02607F07F13 +F848487E261FC00F13FC383F8003007F010013FE90C7127F151F00FE140715031501A215 +00A216FC7E6C14016D14F86C6C13036DEB07F06C6CEB0FE0D80FFEEB7FC00003B61200C6 +14FC013F13F00103138027377CB530>I<ED03E04B7EA24B7EA34B7EA24B7EA34B7EA292 +B57EA34A8015F302038015E1A202078015C0020F80ED807FA2021F80ED003F4A80023E13 +1FA2027E80027C7F02FC814A7FA20101824A7F49B77EA3498202C0C7FC010F824A147FA2 +011F8291C8123F4982013E151FA2017E82017C8101FE83B500F80107B61280A4413A7DB9 +48>65 D<B812C017FC17FF18C028007FF000037F04007F717E717E171F84A2717EA74D5A +A260173F4D5A4D5A4C13C0040F5B91B600FCC7FCA2EFFF8002F0C713F0EF3FF8717E717E +717E19807113C0A319E0A719C0A25F4D138019005FEF7FFE4C485AB912F018C095C7FC17 +F03B397DB844>I<DB3FFCEB01C00203B5EAC003021FECF00791B6EAFC0F01039039FC00 +FF3F4901C0EB1FFFD91FFEC77E49481403D97FF080494880485B48177F4849153F4890C9 +FC181F485A180F123F5B1807127FA24993C7FC12FFAD127F7FF003C0123FA27F001F1707 +A26C6C1780180F6C6D16006C6D5D6C173E6C6D157ED97FF85D6D6C4A5A6DB44A5A010701 +C0EB0FE06D01FCEBFF80010090B548C7FC021F14F8020314E09126003FFEC8FC3A3B7BB9 +45>I<B87E17F817FF18C028007FF8000713F09338007FF8EF1FFE717E050313807113C0 +A27113E0F07FF0A2F03FF8A219FC181FA219FEA419FFAC19FEA419FC183FA219F8187F19 +F0F0FFE0A24D13C04D13804D1300EF1FFEEF7FFC933807FFF0B912C095C7FC17FC178040 +397DB849>I<B912F0A426007FF8C7FCEF1FF8170717031701A21700A21878A3043C137C +183CA41800167CA216FC150391B5FCA4ECF8031500167CA2163C180FA3181EA293C7FCA2 +183EA2183C187CA218FCA2EF01F81703170F173FEE01FFB9FC18F0A338397DB83F>I<B9 +12C0A43A007FF800039338007FE0171F170F1707A21703A21701A318F0EE7800A41800A2 +16F8A21501150791B5FCA4ECF80715011500A21678A693C8FCADB7FCA434397DB83C>I< +B6D8FC03B612F0A426007FF8C70001EBE000B3A391B8FCA402F8C71201B3A6B6D8FC03B6 +12F0A444397DB84B>72 D<B612FCA439007FF800B3B3ADB612FCA41E397DB824>I<B7FC +A426007FF8C9FCB3ACEF0780A5170F1800A35FA25FA25F5F5E5EEE0FFE167FB8FCA43139 +7DB839>76 D<B500F80403B512F06E5EA26E5ED8007FF1E000A2D97BFF161EA201796D5D +A201786D5DA26E6C5DA36E6C4A5AA26E6C4A5AA26E6C4A5AA26E6C4A5AA26E6C141EA36E +6D5BA26E6D5BA26F6C5BA26F6C485AA36F6C485AA26F6C485AA26F6C48C7FCA2923803FF +1EA36F13BCA26F13F8A2705AA2705AA213FCB500FC6D4848B612F0A2EE0F80EE07005439 +7DB85B>I<B500FC0203B512F0A28080C66C6D90390003F0006F6E5A81017B7F13798101 +787F6E7E6E7E6E7F6E7FA26E7F6E7F6E7F6E7F6F7E153F826F13806F13C06F13E06F13F0 +6F13F88117FCEE7FFEEE3FFF7013817013C17013E18218F17013F97013FDEF7FFF8383A2 +8383838383187FA2183F181F01FC160FB500FC150718031801A244397DB84B>I<EDFFF8 +020FEBFF80027F14F0903A01FFC01FFC010790380007FFD91FFC010113C0D93FF06D6C7E +49486E7E49486E7E48496E7E48834890C86C7EA248486F1380A248486F13C0A2003F18E0 +A348486F13F0A400FF18F8AC007F18F06D5DA3003F18E0A26D5D001F18C0A26C6C4B1380 +6C18006E5C6C6D4A5A6C5F6C6D4A5A6D6C4A5AD93FFC49485A6DB401075B0107D9C01F90 +C7FC010190B512FC6D6C14F0020F1480020001F8C8FC3D3B7BB948>I<B8FC17F017FEEF +FF8028007FF8000F13C0040113E07013F0EF7FF8EF3FFCA2EF1FFEA218FFA818FEA2EF3F +FCA2EF7FF8EFFFF04C13E0040F13C091B7120017FC17E002F8C9FCB3A4B612FCA438397D +B841>I<B712FCEEFFE017FC17FF28007FF8000F13C004017F707F717E717EA2717EA284 +A760A24D5A604D5A4D5A04035B041F90C8FC91B612FC17E0839139F8003FFCEE0FFF707F +707F8284A2707FA584A51A601AF084177F1901DD3FFE13E0B600FC011F130394390FFF87 +C071EBFF8005011400CBEA1FFC443A7DB848>82 D<D907FF130E013FEBE01E90B5EAF83E +0003ECFE7E3A07FC01FFFE390FF0001F4848130F48481303491301007F140090C8FC167E +5A163EA27F161E7F7F6D91C7FC13FC387FFFE014FEECFFF06C14FE6F7E6C816C15F06C81 +6C81C681133F010F801301D9000F1480EC007F030F13C01503818100F0157FA3163FA27E +17807E167F6C16007E6D14FE01E0495A01F813039039FF801FF800FC90B512E0D8F83F5C +D8F00749C7FC39E0007FF02A3B7BB935>I<003FB91280A4D9F800EBF003D87FC0923800 +7FC049161F007EC7150FA2007C1707A200781703A400F818E0481701A4C892C7FCB3AE01 +0FB7FCA43B387DB742>I<B600FC011FB512C0A426007FF8C8381FC000725AB3B3181F01 +3F94C7FC8060011F163E6D6C157E187C6D6C15FC6D6D495A6D6DEB07F06D01F0EB1FE0DA +7FFEEBFFC0021FB6C8FC02075C020014F0030F1380423A7DB849>I<B600F00103B512E0 +A4C601F0C83807F0006E5E017F5F6E150FA2013F5F6E151F011F94C7FC6E5D6D163E6F14 +7E6D167CA26F14FC6D5E6F13016D5E6F13036D5E811707027F5D6F130F023F5D6F131F02 +1F92C8FC815F6E143EEE807E6E147CEEC0FC6E5C16E016E16E5C16F36E5C16FF6F5BA36F +5BA26F90C9FCA26F5AA36F5AA26F5AA26F5A433A7EB848>I<B6D8E01FB500FC90383FFF +FCA4000101F0C7D83FFCC8EA7E006C71153C171F6E197C017F701578836E7014F8013F6F +5E6E1801011F4B6D5CA26E18036D4B6D5CA26D6D496D495A173C6F170F6D037C6D91C7FC +EF787F6F5F6D4B6C6C131E816D02016E5BEFE01F03F8177C027F01036E13784D7E03FCEE +80F8023F49486C5C15FE021F010FEDC1E04D7E03FF16C36E49EDE3C0041E7F049E15F76E +01BC6D5C04FC15FF6E95C8FC4C80A26E5F4C143F6E5F4C141FA2037F5E4C140FA26F486E +5AA2031F5E93C812036F5E5E3A7EB863>I<007FB5D8F803B512F8A4C66C48C7D80FF0C7 +FC6D6C5D6D5E6F495A6D6D49C8FC7F6D6D137E6F5B6DEBF8016D5D6F485A6E6C485A023F +130FDA1FFF5BEE9F806E01FFC9FC805E6E5B6E5B80826F7E153F826F7F5D4B7F92B57EA2 +DA01F97FDA03F17F03F07F913807E07FDA0FC07F021F6D7E4B7E4A486C7F027E8102FE6D +7F4A7F49488149486D7F0107804A6E7E49488149486E7E013F81017F83B60107B61280A4 +41397DB848>I<EB3FFE0003B512E0000F14F8391FF00FFE003FEB03FF6D6C7F6E7FA26F +7EA26C5A6C5AEA0380C8FCA2EC3FFF010FB5FC137F3901FFF87F00071380380FFE00EA3F +F85B485A12FF5BA415FF6D5A127F263FF00713F83B1FFC1FBFFFC0390FFFFE1F0003EBF8 +0F39003FE0032A257DA42E>97 D<13FFB5FCA412077EAF4AB47E020F13F0023F13FC9138 +FE03FFDAF00013804AEB7FC00280EB3FE091C713F0EE1FF8A217FC160FA217FEAA17FCA3 +EE1FF8A217F06E133F6EEB7FE06E14C0903AFDF001FF80903AF8FC07FE009039F03FFFF8 +D9E00F13E0D9C00390C7FC2F3A7EB935>I<903801FFC0010F13FC017F13FFD9FF801380 +2603FE0013C048485AEA0FF8121F13F0123F6E13804848EB7F00151C92C7FC12FFA9127F +A27F123FED01E06C7E15036C6CEB07C06C6C14806C6C131FC69038C07E006DB45A010F13 +F00101138023257DA42A>I<EE7F80ED7FFFA4150381AF903801FF81010F13F1013F13FD +9038FFC07F0003EB001FD807FC1307000F8048487F5B123FA2485AA312FFAA127FA27F12 +3FA26C6C5B000F5C6C6C5B6C6C4913C02701FF80FD13FE39007FFFF9011F13E101011301 +2F3A7DB935>I<903803FF80011F13F0017F13FC3901FF83FE3A03FE007F804848133F48 +4814C0001FEC1FE05B003FEC0FF0A2485A16F8150712FFA290B6FCA301E0C8FCA4127FA3 +6C7E1678121F6C6C14F86D14F000071403D801FFEB0FE06C9038C07FC06DB51200010F13 +FC010113E025257DA42C>I<EC1FF0903801FFFC010713FF90391FF87F8090383FE0FFD9 +FFC113C0A2481381A24813016E1380A2ED3E0092C7FCA8B6FCA4000390C8FCB3ABB512FE +A4223A7DB91D>I<161FD907FEEBFFC090387FFFE348B6EAEFE02607FE07138F260FF801 +131F48486C138F003F15CF4990387FC7C0EEC000007F81A6003F5DA26D13FF001F5D6C6C +4890C7FC3907FE07FE48B512F86D13E0261E07FEC8FC90CAFCA2123E123F7F6C7E90B512 +F8EDFF8016E06C15F86C816C815A001F81393FC0000F48C8138048157F5A163FA36C157F +6C16006D5C6C6C495AD81FF0EB07FCD807FEEB3FF00001B612C06C6C91C7FC010713F02B +377DA530>I<13FFB5FCA412077EAFED7FC0913803FFF8020F13FE91381F03FFDA3C0113 +8014784A7E4A14C05CA25CA291C7FCB3A3B5D8FC3F13FFA4303A7DB935>I<EA01F0EA07 +FC487EA2487EA56C5AA26C5AEA01F0C8FCA913FF127FA412077EB3A9B512F8A4153B7DBA +1B>I<141FEC7FC0ECFFE0A24913F0A56D13E0A2EC7FC0EC1F0091C7FCA9EC0FF0EB0FFF +A4EB007F143FB3B0121FEA3F80EA7FC0EAFFE0EC7FE0A215C014FF6C481380903883FE00 +6CB45A000F13F0000113801C4B86BA1D>I<13FFB5FCA412077EAF92380FFFE0A4923803 +FC0016F0ED0FE0ED1F804BC7FC157E5DEC03F8EC07E04A5A141FEC7FE04A7E8181A2ECCF +FEEC0FFF496C7F806E7F6E7F82157F6F7E6F7E82150F82B5D8F83F13F8A42D3A7EB932> +I<13FFB5FCA412077EB3B3ACB512FCA4163A7DB91B>I<01FED97FE0EB0FFC00FF902601 +FFFC90383FFF80020701FF90B512E0DA1F81903983F03FF0DA3C00903887801F000749DA +CF007F00034914DE6D48D97FFC6D7E4A5CA24A5CA291C75BB3A3B5D8FC1FB50083B512F0 +A44C257DA451>I<01FEEB7FC000FF903803FFF8020F13FE91381F03FFDA3C0113800007 +13780003497E6D4814C05CA25CA291C7FCB3A3B5D8FC3F13FFA430257DA435>I<903801 +FFC0010F13F8017F13FFD9FF807F3A03FE003FE048486D7E48486D7E48486D7EA2003F81 +491303007F81A300FF1680A9007F1600A3003F5D6D1307001F5DA26C6C495A6C6C495A6C +6C495A6C6C6CB45A6C6CB5C7FC011F13FC010113C029257DA430>I<9039FF01FF80B500 +0F13F0023F13FC9138FE07FFDAF00113800003496C13C00280EB7FE091C713F0EE3FF8A2 +EE1FFCA3EE0FFEAA17FC161FA217F8163F17F06E137F6E14E06EEBFFC0DAF00313809139 +FC07FE0091383FFFF8020F13E0020390C7FC91C9FCACB512FCA42F357EA435>I<9038FE +03F000FFEB0FFEEC3FFF91387C7F809138F8FFC000075B6C6C5A5CA29138807F80ED3F00 +150C92C7FC91C8FCB3A2B512FEA422257EA427>114 D<90383FF0383903FFFEF8000F13 +FF381FC00F383F0003007E1301007C130012FC15787E7E6D130013FCEBFFE06C13FCECFF +806C14C06C14F06C14F81203C614FC131F9038007FFE140700F0130114007E157E7E157C +6C14FC6C14F8EB80019038F007F090B512C000F8140038E01FF81F257DA426>I<130FA5 +5BA45BA25B5BA25A1207001FEBFFE0B6FCA3000390C7FCB21578A815F86CEB80F014816C +EBC3E090383FFFC06D1380903803FE001D357EB425>I<01FFEC3FC0B5EB3FFFA4000714 +016C80B3A35DA25DA26C5C6E4813E06CD9C03E13FF90387FFFFC011F13F0010313803025 +7DA435>I<B539F001FFF8A4000390C7EA1F00161E6E133E6C153C6E137C6C15786E13F8 +017F5CECF001013F5C14F8011F495AA2ECFC07010F5CECFE0F010791C7FC6E5A6D131E15 +BE6D13BC15FC6D5BA36E5AA26E5AA26E5AA26E5AA22D257EA432>I<B500F1B538803FFF +A43D07FE000FF80003E06C6C010715C082028015076C6E6C148015076C01C0ED0F00826E +485C017FED801E5D90273FF01E7F5B17C0DAF83E147C011F90393C3FE078037C14F8903B +0FFC781FF0F0A29139FEF00FF10107EDF9E002FF14FB6D496CB45AA24B7E6D5EA26D496C +90C7FCA292C7FC6E5CA2023E147C023C143C40257EA445>I<B539F01FFFF0A400039039 +8003F8006C01C013E06C1407D97FE05B6D6C485A6E48C7FC90381FFC3E010F5B903807FE +FC6D6C5A5D6D5B6D5B6E7E6E7E814A7EA24A7E903801F3FFD903E37FD907C17FEB0FC049 +486C7E4A6C7E013E80496D7E49130F00016E7EB590383FFFF8A42D257EA432>I<B539F0 +01FFF8A4000390C7EA1F00161E6E133E6C153C6E137C6C15786E13F8017F5CECF001013F +5C14F8011F495AA2ECFC07010F5CECFE0F010791C7FC6E5A6D131E15BE6D13BC15FC6D5B +A36E5AA26E5AA26E5AA26E5AA292C8FCA25C141E003F133E387F803C38FFC07C147814F8 +EBC1F0EBC3E06C485A387D1F80D83FFFC9FCEA1FFCEA07F02D357EA432>I +E %EndDVIPSBitmapFont -%DVIPSBitmapFont: Fe ecbx1440 14.4 41 -/Fe 41 122 df<DC7FFEECFFC0031FB5D8801F13F092B6D8E07F13FC020703F9B57E021F +%DVIPSBitmapFont: Fe ecbx1440 14.4 35 +/Fe 35 122 df<DC7FFEECFFC0031FB5D8801F13F092B6D8E07F13FC020703F9B57E021F D9C007B5EAC1FF91277FFE000102071380DAFFF8010713FC010301E049494813C0495B49 494913F04990C7FC19E0495A741380017F17C04A6E6E130071EC00FC98C7FCAEBB12FEA5 26007FFCC7000701C0C8FCB3B3A7007FB5D8FC07B612F0A552547DD34D>27 @@ -629,138 +643,111 @@ A2485BA2486F13C091C7FC4803001300177E94C7FC5AA25B127FA2ED3FF04AB5FC020714 C000FF4914F091391F807FF891393E001FFE02786D7E4A6D13807013C06D5A4A6D13E018 F05C7013F8A291C813FCA44916FEA3127FA6123FA37F6C17FCA36C17F85E7E6E15F06C17 E06C6D5B6E15C06C4B13806D6C491300D93FFC495A6DB4EBFFFC010790B512F06D5D0100 -1580021F01FCC7FC020313C0374F7BCD42>I<121F7F7FEBFF8091B8FCA45A18FE18FC18 -F818F0A218E018C018804817000180C8123E007EC9127E5F007C4B5A4C5A5F16074C5A48 -4B5A4CC7FC167E167CC912FC4B5A4B5AA24B5A150F4B5AA24B5AA24BC8FC5DA25C5D1403 -A214075D140FA3141FA2143FA34A5AA414FFA65BAB6D5B6E5A6E5A6E5A385279D042>I< -913803FFC0023F13FC49B67E010715E090260FFC0013F8D93FE0EB1FFCD97F80EB07FE49 -C76C7E496E1380484880000317C049157F120718E0173F120FA27FA27F7F6E147F02E015 -C08002FC14FF6C01FF15806F481300EDE0036C9138F807FE6F485A6C9138FF1FF06CEDFF -E017806D4AC7FC7F010F6E7E6D81010115F06D81010315FE010F81D93FF71580D97FC115 -C02701FF807F14E048EB001F48486D14F04848010314F848481300496E13FC003F151F49 -1407007F6F13FE491400177F00FF163F49151F170F1707A21703A218FCA27F127F6DED07 -F8A26C6CED0FF07F6C6CED1FE06C6CED3FC06C6CEDFF806C01C0010313006C01FCEB3FFE -6C6CB612F8011F15E001071580010002FCC7FC020F13C0374F7BCD42>I<913807FF8002 -7F13F849B512FE01076E7E90261FFE0113E0903A7FF8003FF049486D7E48496D7E48496D -7E484980486F138091C7FC486F13C05A18E0485A18F0A27013F812FFA318FCA618FEA35E -127FA4003F5DA26C7E5E7E6C6D5B161E6C7F6C6D5B6C6C6C13F890393FFC03F06DB55A01 -074A13FC01001400EC1FF891C8FCA218F85EA301FC16F0487E2607FF8015E05E486D15C0 -A24C1380A24C13005F4A131F6C4B5A49C7485A494A5A6C48495B6D01075B2701FF803F90 -C7FC6C90B512FC013F5C6D14C0010791C8FC9038007FF0374F7BCD42>I<B912FEF0FFF0 -19FE737E1AE0D8000F01C0C7001F7F06037F727F726C7E867313807313C0A27313E0A373 -13F0A94F13E0A34F13C01B80614F1300624F5A06035B4E13E0063F5B92B8C7FC19F8A2F1 -FF8003C0C7001F13E0060113F89538007FFE737E070F13C01BE07313F0851BF87313FCA2 -7313FEA31BFFA91BFEA2611BFCA2614F13F81BF0614F13E0077F13C04EB51280060FEBFE -00BB5A1AF01AC04FC7FC19C050527BD15D>66 D<932603FFF01407047F01FF140F0307B6 -00E0131F033F03F8133F92B700FE137F02039126C003FF13FF020F01F8C7EA3FC1023F01 -C0EC0FE391B5C80003B5FC4901FC814949814901E082011F498249498292CA7E49488349 -48835A4A83485B4885A24849187FA2485B1B3FA2485B1B1FA25AA21B0091CDFCA2B5FCAE -7EA280A36C1A1FA36C7FA21B3F6C7F1B3E6C7F1B7E6C6D187C6C1AFC6E18F86C19016D6C -EF03F06D7E6FEE07E06D6DEE0FC001076DEE1F806D01F8EE3F006D6D16FE6D01FF4B5A02 -3F01C0EC07F8020F01FCEC3FF00203903AFFC001FFC0020091B6C7FC033F15FC030715F0 -DB007F1480040301F0C8FC505479D25F>I<BAFC19F819FF1AE01AF8D8000701F0C7001F -13FE06017FDE003F13C0070F7F07037F737F737F747E747E747F86747F8886888688A274 -7FA3881B7FA288A51D80AF1D00A564A21BFF64A3505BA2505BA2505BA2505B505B99C7FC -505A1A7F4F485A4F13F0070F5B073F5B4EB55A061F49C8FCBB12F81AE097C9FC19F896CA -FC59527CD165>I<BB12FCA5D8000701F0C7000F7F1800191F190F19071903190119001A -7E1A7F86A386A51B80DD03E0130FA497C7FCA31707A3170F171F173FEE01FF92B6FCA5ED -F001EE003F171F170F1707A31703A794CAFCB3A2B812F0A549527CD153>70 -D<B8D88007B712FCA5D8000701F0C9003FEB8000B3AE92BAFCA503F0C9123FB3B1B8D880 -07B712FCA55E527CD167>72 D<B81280A5D8000701F0C7FCB3B3B3B2B81280A529527DD1 -30>I<B812E0A5D8000F01E0CAFCB3B3A91AF8A419011AF0A51903A31907A2190F1AE019 -1FA2193F197F19FF60180760187F0503B5FCBB12C0A545527CD14F>76 -D<B912FCF0FFE019FE737E1AE0D8000F01E0C7003F7F060313FC06007F737E7313807313 -C07313E0851BF0A21BF885A21BFCA91BF8A3611BF0A21BE04F13C0614F13804F13004F5A -060713F8063F5B92B812C097C7FC19F8198003E0CBFCB3AEB712FEA54E527CD15A>80 -D<B912E018FF19F019FE737ED8000701F0C714E0060F7F060313FC06007F737E737F8587 -737FA28785A287A863A261636361634F90C8FC4F5A4F5A06035B060F13E095B5128092B7 -48C9FC19F019C019F09226F0000713FC050013FF063F7F727F727F727F727FA2727FA284 -86A886A71D707513F8A2851C017301C013F0A273EBE003B86C6D9038F007E0739038FC1F -C0070190B51280736C1400080F5BCE13F85D537CD162>82 D<DA0FFE141C91B500F0133C -010702FC137C011F02FF13FC017F15C19026FFF00113E148903980001FFB4890C7EA07FF -D807FC14014848804848153F171F4848150FA2007F1607491503A2170112FFA217007FA2 -6D167CA27F7F6D93C7FC6C7E14C014F8ECFF806C14F8EDFFC06C15FC6CEDFF8017F06C16 -FC6C826C707E6C836D82011F8201078213016D6C81020781EC007F030380ED003F040314 -801600173F837113C0838312F883A3837EA319807EA26C5E19007F6D4B5A7F6D4B5A01FC -4B5A6D151FD9FFC04A5AD97FF8ECFFE028FE1FFF80075B010790B6C7FCD8FC0115FC486C -6C14F048010F14C0489026007FFCC8FC3A5479D249>I<B700FE4AB612F0A5D8000F01E0 -CA387FC000091FC7FCB3B3B26D611B3E811B7E6D197CA26D6D17FC636D6D1601027F4D5A -6F4C5A023F170F6E6C4C5A6E6D4B5A6E01E003FFC8FC6E01F8EC03FE020001FEEC1FFC92 -3B7FFFE001FFF8031F90B612E00307168003004BC9FC041F14F0040091CAFC5C537CD165 ->85 D<EC3FFE0107B512E0011F14FC017F14FF2701FFC00F13C02703FE00037F486C0100 -7F6E6D7E486D80707EA2707EA3707F6C5B6C90C7FC6C5AC9FCA60307B5FC0203B6FC147F -0103B7FC011FEBF00F017F1300EBFFFC000313F04813C0485B4890C7FC5A5B485AF081F0 -12FF5BA35EA26D5C127F6D5C003F03F713C36DD901E314E06CD9C00714FF00079026F01F -8114C06C90B5C61480C602FC6D1300011F01F0EB3FFC01010180EB07F03C387CB642>97 -D<EB3FF8B5FCA51203C6FCB3A4EE7FF00307B5FC031F14C0037F14F0913AF9FF007FFCDA -FFF8EB1FFF03E001077F03806D7F92C76C7F4A6E7F5C4A6F7E85183F85A38584A31A80AD -1A00A36061A261187F616E15FF616E4A5B6E4A5B6F495BDACFE04990C7FCDA87F0EB3FFE -913A01FE01FFF8496CB65A49013F14C049010749C8FC90C813E041547DD249>I<913803 -FFE0023F13FE91B67E010315E0010F9038003FF8D93FFCEB07FC4948497E4948131F4849 -497E485B485BA24890C7FC5A5B003F6F5A705A705A007F92C8FC5BA312FFAD127F7FA312 -3F7F6CEE0F80A26C6D141F18006C6D5C6C6D143E6C6D147E6C6D5C6D6C495A6DB4EB07F0 -010F9038C01FE06D90B5128001014AC7FCD9003F13F80203138031387CB63A>I<943803 -FF80040FB5FCA5EE003F170FB3A4913803FF80023F13F849B512FE0107ECFF8F011F9038 -C03FEF90273FFE0007B5FCD97FF8130149487F484980484980484980488291C8FC5A5B12 -3FA2127F5BA312FFAD127FA37F123FA3121F7F6C5E6C6D5C5F6C6D91B5FC6C6D5B6C6D49 -14E0D97FFCD90FEFEBFF80D91FFFEB7F8F010790B5120F010114FC6D6C13E00207010049 -C7FC41547CD249>I<913807FF80027F13F849B512FE01076E7E011F010313E0903A3FFC -007FF0D97FF06D7E49486D7E4849130F48496D7E48824890C77E1880485A82003F17C0A3 -485A18E082A212FFA290B8FCA401FCCAFCA6127FA37F123FA2EF03E06C7E17076C17C06C -6D140F18806C6D141F6C6DEC3F006C6D147ED97FFC495AD91FFFEB07F86D9038E03FF001 -0390B512C001005D023F01FCC7FC020113E033387CB63C>I<ED1FF8913803FFFE020FEB -FF80023F14C09139FFF83FE001039038E0FFF049138049010113F85BEB3FFEA2EB7FFCA2 -6F13F0495AEE7FE0EE1F8093C7FCAEB712C0A5C601F8C8FCB3B3A7B612FEA52D547CD328 ->I<DA1FFE14FE49B539E007FF80010FDAFC1F13C0013FDAFF7F13E090267FF807EBFF07 -2701FFE001EBF07F48497E484990387FF83F91C7003F14C048EEFC1F489338FE07004902 -1F90C7FCA2003F82A9001F5EA26D143F6C5E6C5E6E137F6C6D495A6C6D485B6CD9F80713 -804890B6C8FCD803EF14FC01C114E02707C01FFEC9FC49CBFCA2487EA37FA27F13FC90B6 -12FE6CEDFFF017FCEFFF806C8318F06C836C837F48B87E1207D80FFCC700037F4848EC00 -3F4848150F48486F138083485A83A56D5D007F18006D5D003F5F6C6C4B5A01FE153FD807 -FFED7FF06C01C049485AC601FC011F1380013FB648C7FC010F15F8010115C0D9000F01F8 -C8FC3B4F7CB542>I<EB3FF8B5FCA51203C6FCB3A4EE1FFC93B57E030314E0030F14F892 -391FC07FFC92397E003FFE03F86D7EECF9F04B6D7FECFBC0ECFF8092C76C7FA25CA25CA4 -5CB3ACB6D8F807B612C0A542537CD249>I<133FEBFFC0487F487FA2487FA66C5BA26C5B -6C5B013FC7FC90C8FCAEEB1FF8B5FCA512017EB3B3A6B612F0A51C547CD324>I<EB3FF8 -B5FCA51203C6FCB3A50407B512F0A59339007FF000EF3FC04D5A4DC7FCEE01FC4C5AEE0F -F04C5A4C5A4CC8FC16FEED03FC4B5A4B5A4B5A4B7E4B7EECF9FF02FB7F91B57EA28203BF -7F031F7F14FE4A6C7FDAF0077F6F7FA26F7F6F7F167F83707F707FA2707F707F707FA270 -7F707F84B6D8F00F14FEA53F537DD245>107 D<EB3FF8B5FCA51203C6FCB3B3B3B1B612 -F8A51D537CD224>I<D93FF0D91FF84AB47EB591B56C010F13F8030302E0013F13FE030F -6E90B6FCDB3F809027F803F80F7F922A7E007FFC07E0077F000302F890283FFE0F80037F -C6D9F1F0011F49487EDAF3E0DAFF3E814B153CDAF7805D92C76C496D7F14FF4A5EA24A5E -A34A5EB3ADB6D8F80FB66CB612F8A565367BB56E>I<D93FF0EB1FFCB591B57E030314E0 -030F14F892391FC07FFC92397E003FFE000302F86D7EC6EBF1F04B6D7FECF3C0ECF78092 -C76C7F14FF5CA25CA45CB3ACB6D8F807B612C0A542367CB549>I<913801FFC0023F13FE -91B67E010315E0010F018013F8903A3FFC001FFED97FF0EB07FF49486D7F48496D7F4849 -6D7F91C8127F4883488349153F001F83A2003F8349151FA2007F83A400FF1880AC007F18 -00A3003F5F6D153FA2001F5FA26C6C4B5AA26C6D4A5A6C5F6C6D495B6C6D495B6D6C4990 -C7FCD93FFCEB1FFE6DB46CB45A010790B512F0010115C0D9003F49C8FC020313E039387C -B642>I<D93FF8EB7FF0B50107B5FC031F14C0037F14F09126F9FF0013FCDAFFF8EB3FFF -000302E0010F7FC602806D7F92C76C7F4A824A804A6E7F85187F85A2183F85A4721380AD -4E1300A44E5AA26118FF616E5C616E4A5B6E4A5B6F495B03E04990C7FC6FEB7FFE913AF9 -FE01FFF802F8B65A033F14C0030749C8FC030013E093CAFCB1B612F8A5414D7DB549>I< -90393FF001FCB590380FFF804B13E0037F13F09238FE1FF89138F1F83F00019138F07FFC -6CEBF3E015C0ECF780A2ECFF00EE3FF84AEB1FF0EE0FE093C7FC5CA45CB3ABB612FEA52E -367DB535>114 D<903903FFC00E011FEBFC1E90B6127E000315FE3907FE003FD80FF013 -0F4848130348481301491300127F90C8127EA248153EA27FA27F01F091C7FC13FCEBFF80 -6C13FEECFFF06C14FE6F7E6C15E06C816C15FC6C81C681133F010F15801301D9000F14C0 -EC003F030713E0150100F880167F6C153FA2161F7EA217C07E6D143F17807F6DEC7F0001 -F85C6DEB03FE9039FF801FFC486CB512F0D8F81F14C0D8F00791C7FC39E0007FF02B387C -B634>I<147CA614FCA41301A31303A21307A2130F131F133F137F13FF1203000F90B512 -FEB7FCA426007FFCC8FCB3A9EE0F80ABEE1F006D7EA2011F143E806D6D5A6DEBC1F86DEB -FFF001005C023F1380DA03FEC7FC294D7ECB33>I<D93FF8913801FFC0B50207B5FCA500 -03ED001FC61607B3AE5FA35FA25F137F5F6D6C14F7DC01E713F06D6CD907C7EBFFC0903A -0FFF801F876D90B51207010114FC6D6C13F0020701C091C7FC42377CB549>I<B600E090 -381FFFFCA5000101F8C7000113006CEE007C6E15FC017F5E6E1401013F5E8017036D6D5C -17076D5E6F130F6D5E6F131F6D93C7FC815F6D6D133E177E6D157C6F13FC027F5C811601 -DA3FFF5B16036E5C16876E5C16CF6E5C16EF16FF6E91C8FCA26E5BA26E5BA26F5AA36F5A -A26F5AA26F5AA35E151F93C9FC5D153E157ED81FC0137C487E486C13FC486C5B14015D4A -5A14074A5A6C48485A4948CAFC495A383F81FC6CB45A6C5B000313C0C648CBFC3E4D7DB4 -45>121 D E +1580021F01FCC7FC020313C0374F7BCD42>I<B912FEF0FFF019FE737E1AE0D8000F01C0 +C7001F7F06037F727F726C7E867313807313C0A27313E0A37313F0A94F13E0A34F13C01B +80614F1300624F5A06035B4E13E0063F5B92B8C7FC19F8A2F1FF8003C0C7001F13E00601 +13F89538007FFE737E070F13C01BE07313F0851BF87313FCA27313FEA31BFFA91BFEA261 +1BFCA2614F13F81BF0614F13E0077F13C04EB51280060FEBFE00BB5A1AF01AC04FC7FC19 +C050527BD15D>66 D<932603FFF01407047F01FF140F0307B600E0131F033F03F8133F92 +B700FE137F02039126C003FF13FF020F01F8C7EA3FC1023F01C0EC0FE391B5C80003B5FC +4901FC814949814901E082011F498249498292CA7E4948834948835A4A83485B4885A248 +49187FA2485B1B3FA2485B1B1FA25AA21B0091CDFCA2B5FCAE7EA280A36C1A1FA36C7FA2 +1B3F6C7F1B3E6C7F1B7E6C6D187C6C1AFC6E18F86C19016D6CEF03F06D7E6FEE07E06D6D +EE0FC001076DEE1F806D01F8EE3F006D6D16FE6D01FF4B5A023F01C0EC07F8020F01FCEC +3FF00203903AFFC001FFC0020091B6C7FC033F15FC030715F0DB007F1480040301F0C8FC +505479D25F>I<BAFC19F819FF1AE01AF8D8000701F0C7001F13FE06017FDE003F13C007 +0F7F07037F737F737F747E747E747F86747F8886888688A2747FA3881B7FA288A51D80AF +1D00A564A21BFF64A3505BA2505BA2505BA2505B505B99C7FC505A1A7F4F485A4F13F007 +0F5B073F5B4EB55A061F49C8FCBB12F81AE097C9FC19F896CAFC59527CD165>I<BB12FC +A5D8000701F0C7000F7F1800191F190F19071903190119001A7E1A7F86A386A51B80DD03 +E0130FA497C7FCA31707A3170F171F173FEE01FF92B6FCA5EDF001EE003F171F170F1707 +A31703A794CAFCB3A2B812F0A549527CD153>70 D<B8D88007B712FCA5D8000701F0C900 +3FEB8000B3AE92BAFCA503F0C9123FB3B1B8D88007B712FCA55E527CD167>72 +D<B81280A5D8000701F0C7FCB3B3B3B2B81280A529527DD130>I<B812E0A5D8000F01E0 +CAFCB3B3A91AF8A419011AF0A51903A31907A2190F1AE0191FA2193F197F19FF60180760 +187F0503B5FCBB12C0A545527CD14F>76 D<B912E018FF19F019FE737ED8000701F0C714 +E0060F7F060313FC06007F737E737F8587737FA28785A287A863A261636361634F90C8FC +4F5A4F5A06035B060F13E095B5128092B748C9FC19F019C019F09226F0000713FC050013 +FF063F7F727F727F727F727FA2727FA28486A886A71D707513F8A2851C017301C013F0A2 +73EBE003B86C6D9038F007E0739038FC1FC0070190B51280736C1400080F5BCE13F85D53 +7CD162>82 D<DA0FFE141C91B500F0133C010702FC137C011F02FF13FC017F15C19026FF +F00113E148903980001FFB4890C7EA07FFD807FC14014848804848153F171F4848150FA2 +007F1607491503A2170112FFA217007FA26D167CA27F7F6D93C7FC6C7E14C014F8ECFF80 +6C14F8EDFFC06C15FC6CEDFF8017F06C16FC6C826C707E6C836D82011F8201078213016D +6C81020781EC007F030380ED003F040314801600173F837113C0838312F883A3837EA319 +807EA26C5E19007F6D4B5A7F6D4B5A01FC4B5A6D151FD9FFC04A5AD97FF8ECFFE028FE1F +FF80075B010790B6C7FCD8FC0115FC486C6C14F048010F14C0489026007FFCC8FC3A5479 +D249>I<B700FE4AB612F0A5D8000F01E0CA387FC000091FC7FCB3B3B26D611B3E811B7E +6D197CA26D6D17FC636D6D1601027F4D5A6F4C5A023F170F6E6C4C5A6E6D4B5A6E01E003 +FFC8FC6E01F8EC03FE020001FEEC1FFC923B7FFFE001FFF8031F90B612E0030716800300 +4BC9FC041F14F0040091CAFC5C537CD165>85 D<EC3FFE0107B512E0011F14FC017F14FF +2701FFC00F13C02703FE00037F486C01007F6E6D7E486D80707EA2707EA3707F6C5B6C90 +C7FC6C5AC9FCA60307B5FC0203B6FC147F0103B7FC011FEBF00F017F1300EBFFFC000313 +F04813C0485B4890C7FC5A5B485AF081F012FF5BA35EA26D5C127F6D5C003F03F713C36D +D901E314E06CD9C00714FF00079026F01F8114C06C90B5C61480C602FC6D1300011F01F0 +EB3FFC01010180EB07F03C387CB642>97 D<EB3FF8B5FCA51203C6FCB3A4EE7FF00307B5 +FC031F14C0037F14F0913AF9FF007FFCDAFFF8EB1FFF03E001077F03806D7F92C76C7F4A +6E7F5C4A6F7E85183F85A38584A31A80AD1A00A36061A261187F616E15FF616E4A5B6E4A +5B6F495BDACFE04990C7FCDA87F0EB3FFE913A01FE01FFF8496CB65A49013F14C0490107 +49C8FC90C813E041547DD249>I<913803FFE0023F13FE91B67E010315E0010F9038003F +F8D93FFCEB07FC4948497E4948131F4849497E485B485BA24890C7FC5A5B003F6F5A705A +705A007F92C8FC5BA312FFAD127F7FA3123F7F6CEE0F80A26C6D141F18006C6D5C6C6D14 +3E6C6D147E6C6D5C6D6C495A6DB4EB07F0010F9038C01FE06D90B5128001014AC7FCD900 +3F13F80203138031387CB63A>I<943803FF80040FB5FCA5EE003F170FB3A4913803FF80 +023F13F849B512FE0107ECFF8F011F9038C03FEF90273FFE0007B5FCD97FF8130149487F +484980484980484980488291C8FC5A5B123FA2127F5BA312FFAD127FA37F123FA3121F7F +6C5E6C6D5C5F6C6D91B5FC6C6D5B6C6D4914E0D97FFCD90FEFEBFF80D91FFFEB7F8F0107 +90B5120F010114FC6D6C13E00207010049C7FC41547CD249>I<913807FF80027F13F849 +B512FE01076E7E011F010313E0903A3FFC007FF0D97FF06D7E49486D7E4849130F48496D +7E48824890C77E1880485A82003F17C0A3485A18E082A212FFA290B8FCA401FCCAFCA612 +7FA37F123FA2EF03E06C7E17076C17C06C6D140F18806C6D141F6C6DEC3F006C6D147ED9 +7FFC495AD91FFFEB07F86D9038E03FF0010390B512C001005D023F01FCC7FC020113E033 +387CB63C>I<DA1FFE14FE49B539E007FF80010FDAFC1F13C0013FDAFF7F13E090267FF8 +07EBFF072701FFE001EBF07F48497E484990387FF83F91C7003F14C048EEFC1F489338FE +070049021F90C7FCA2003F82A9001F5EA26D143F6C5E6C5E6E137F6C6D495A6C6D485B6C +D9F80713804890B6C8FCD803EF14FC01C114E02707C01FFEC9FC49CBFCA2487EA37FA27F +13FC90B612FE6CEDFFF017FCEFFF806C8318F06C836C837F48B87E1207D80FFCC700037F +4848EC003F4848150F48486F138083485A83A56D5D007F18006D5D003F5F6C6C4B5A01FE +153FD807FFED7FF06C01C049485AC601FC011F1380013FB648C7FC010F15F8010115C0D9 +000F01F8C8FC3B4F7CB542>103 D<EB3FF8B5FCA51203C6FCB3A4EE1FFC93B57E030314 +E0030F14F892391FC07FFC92397E003FFE03F86D7EECF9F04B6D7FECFBC0ECFF8092C76C +7FA25CA25CA45CB3ACB6D8F807B612C0A542537CD249>I<133FEBFFC0487F487FA2487F +A66C5BA26C5B6C5B013FC7FC90C8FCAEEB1FF8B5FCA512017EB3B3A6B612F0A51C547CD3 +24>I<EB3FF8B5FCA51203C6FCB3A50407B512F0A59339007FF000EF3FC04D5A4DC7FCEE +01FC4C5AEE0FF04C5A4C5A4CC8FC16FEED03FC4B5A4B5A4B5A4B7E4B7EECF9FF02FB7F91 +B57EA28203BF7F031F7F14FE4A6C7FDAF0077F6F7FA26F7F6F7F167F83707F707FA2707F +707F707FA2707F707F84B6D8F00F14FEA53F537DD245>107 D<EB3FF8B5FCA51203C6FC +B3B3B3B1B612F8A51D537CD224>I<D93FF0D91FF84AB47EB591B56C010F13F8030302E0 +013F13FE030F6E90B6FCDB3F809027F803F80F7F922A7E007FFC07E0077F000302F89028 +3FFE0F80037FC6D9F1F0011F49487EDAF3E0DAFF3E814B153CDAF7805D92C76C496D7F14 +FF4A5EA24A5EA34A5EB3ADB6D8F80FB66CB612F8A565367BB56E>I<D93FF0EB1FFCB591 +B57E030314E0030F14F892391FC07FFC92397E003FFE000302F86D7EC6EBF1F04B6D7FEC +F3C0ECF78092C76C7F14FF5CA25CA45CB3ACB6D8F807B612C0A542367CB549>I<913801 +FFC0023F13FE91B67E010315E0010F018013F8903A3FFC001FFED97FF0EB07FF49486D7F +48496D7F48496D7F91C8127F4883488349153F001F83A2003F8349151FA2007F83A400FF +1880AC007F1800A3003F5F6D153FA2001F5FA26C6C4B5AA26C6D4A5A6C5F6C6D495B6C6D +495B6D6C4990C7FCD93FFCEB1FFE6DB46CB45A010790B512F0010115C0D9003F49C8FC02 +0313E039387CB642>I<90393FF001FCB590380FFF804B13E0037F13F09238FE1FF89138 +F1F83F00019138F07FFC6CEBF3E015C0ECF780A2ECFF00EE3FF84AEB1FF0EE0FE093C7FC +5CA45CB3ABB612FEA52E367DB535>114 D<903903FFC00E011FEBFC1E90B6127E000315 +FE3907FE003FD80FF0130F4848130348481301491300127F90C8127EA248153EA27FA27F +01F091C7FC13FCEBFF806C13FEECFFF06C14FE6F7E6C15E06C816C15FC6C81C681133F01 +0F15801301D9000F14C0EC003F030713E0150100F880167F6C153FA2161F7EA217C07E6D +143F17807F6DEC7F0001F85C6DEB03FE9039FF801FFC486CB512F0D8F81F14C0D8F00791 +C7FC39E0007FF02B387CB634>I<147CA614FCA41301A31303A21307A2130F131F133F13 +7F13FF1203000F90B512FEB7FCA426007FFCC8FCB3A9EE0F80ABEE1F006D7EA2011F143E +806D6D5A6DEBC1F86DEBFFF001005C023F1380DA03FEC7FC294D7ECB33>I<D93FF89138 +01FFC0B50207B5FCA50003ED001FC61607B3AE5FA35FA25F137F5F6D6C14F7DC01E713F0 +6D6CD907C7EBFFC0903A0FFF801F876D90B51207010114FC6D6C13F0020701C091C7FC42 +377CB549>I<B600E090381FFFFCA5000101F8C7000113006CEE007C6E15FC017F5E6E14 +01013F5E8017036D6D5C17076D5E6F130F6D5E6F131F6D93C7FC815F6D6D133E177E6D15 +7C6F13FC027F5C811601DA3FFF5B16036E5C16876E5C16CF6E5C16EF16FF6E91C8FCA26E +5BA26E5BA26F5AA36F5AA26F5AA26F5AA35E151F93C9FC5D153E157ED81FC0137C487E48 +6C13FC486C5B14015D4A5A14074A5A6C48485A4948CAFC495A383F81FC6CB45A6C5B0003 +13C0C648CBFC3E4D7DB445>121 D E %EndDVIPSBitmapFont -%DVIPSBitmapFont: Ff ecrm1000 10 80 -/Ff 80 123 df<B81280A2290280962A>21 D<DA0FF813FC91397FFF07FF903B01F807DF +%DVIPSBitmapFont: Ff ecrm1000 10 81 +/Ff 81 123 df<B81280A2290280962A>21 D<DA0FF813FC91397FFF07FF903B01F807DF 83C0903A07E001FF0F903B1F8007FE1FE090393F000FFC137E16F85B9338F00780484801 0790C7FC1503ACB812F8A32801F80003F0C7FCB3AB486C497E267FFFE0B512F0A3333B7F BA30>27 D<EC0FF8EC7FFE903901F80780903907E001C090391F8000E090383F0007017E @@ -859,138 +846,140 @@ 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 -C026277DA52A>97 D<EA03F012FFA3120F1203B0EC1FE0EC7FF89038F1E03E9039F3801F -809039F7000FC001FEEB07E049EB03F049EB01F85BED00FCA216FEA2167E167FAA167E16 -FEA216FC15016D14F8ED03F07F01EEEB07E001C6EB0FC09039C7801F00903881E07E9038 -00FFF8C7EA1FC0283B7EB92E>I<EB03FC90381FFF8090387E03E03901F80070484813F8 -3907E001FC380FC003A2EA1F80123F90380001F848EB00F01500A2127E12FEAA127E127F -A26C14067F001F140E6D130C000F141C6C6C13386C6C13706C6C13E039007C07C090381F -FF00EB07F81F277DA525>I<ED0FC0EC03FFA3EC003F150FB0EB03F8EB1FFF90387E078F -9038F801EF3903F0007F4848133F4848131FA24848130F123F90C7FC5AA2127E12FEAA12 -7E127FA27EA26C6C131FA26C6C133F6C6C137F6C6CEBEFF03A01F801CFFF39007C078F90 -381FFE0FD907F813C0283B7DB92E>I<EB07F8EB1FFF90387C0FC03901F803E03903F001 -F0D807E013F8380FC0004848137CA248C7127E153E5A153F127E12FEA3B7FCA248C8FCA5 -127EA2127FA26C14037F001F14076C6C13060007140E6D131CD801F013386C6C13709038 -7E03E090381FFF80903803FC0020277EA525>I<147E903803FF8090380FC1E0EB1F8790 -383F0FF0137EA213FCA23901F803C091C7FCADB512FCA3D801F8C7FCB3AB487E387FFFF8 -A31C3B7FBA19>I<ED03F090390FF00FF890393FFC3C3C9039F81F707C3901F00FE03903 -E007C03A07C003E010000FECF000A248486C7EA86C6C485AA200075C6C6C485A6D485A6D -48C7FC38073FFC38060FF0000EC9FCA4120FA213C06CB512C015F86C14FE6CECFF804815 -C03A0F80007FE048C7EA0FF0003E140348140116F8481400A56C1401007C15F06CEC03E0 -003F1407D80F80EB0F80D807E0EB3F003901FC01FC39007FFFF0010790C7FC26387EA52A ->I<EA03F012FFA3120F1203B0EC0FF0EC3FFCECF03F9039F1C01F809039F3800FC0EBF7 -0013FE496D7EA25BA35BB3A3486C497EB500C1B51280A3293A7EB92E>I<EA0380EA0FE0 -487EA56C5AEA0380C8FCAAEA03F012FFA312071203B3AA487EB512C0A312387EB717>I< -EB01C0EB07F0EB0FF8A5EB07F0EB01C090C7FCAAEB01F813FFA313071301B3B3A2123C12 -7E00FF13F01303A214E038FE07C0127C383C0F00EA0FFEEA03F8154984B719>I<EA03F0 -12FFA3120F1203B1913801FFFCA39138007FC01600157C15705D4A5A4A5A4AC7FC141E14 -38147814FC13F1EBF3FEEBF73F01FE7FEBF81F496C7E8114076E7E6E7E811400157E157F -811680ED1FC0486CEB3FF0B500C0B5FCA3283A7EB92C>I<EA03F012FFA3120F1203B3B3 -AD487EB512C0A3123A7EB917>I<2703F00FF0EB1FE000FFD93FFCEB7FF8913AF03F01E0 -7E903BF1C01F83803F3D0FF3800FC7001F802603F70013CE01FE14DC49D907F8EB0FC0A2 -495CA3495CB3A3486C496CEB1FE0B500C1B50083B5FCA340257EA445>I<3903F00FF000 -FFEB3FFCECF03F9039F1C01F803A0FF3800FC03803F70013FE496D7EA25BA35BB3A3486C -497EB500C1B51280A329257EA42E>I<EB03FE90380FFF8090383E03E09038F800F84848 -137C48487F48487F4848EB0F80001F15C090C712074815E0A2007EEC03F0A400FE15F8A9 -007E15F0A2007F14076C15E0A26C6CEB0FC0000F15806D131F6C6CEB3F006C6C137EC66C -13F890387E03F090381FFFC0D903FEC7FC25277EA52A>I<3903F01FE000FFEB7FF89038 -F1E07E9039F3801F803A07F7000FC0D803FEEB07E049EB03F04914F849130116FC150016 -FEA3167FAA16FEA3ED01FCA26DEB03F816F06D13076DEB0FE001F614C09039F7803F0090 -38F1E07E9038F0FFF8EC1FC091C8FCAB487EB512C0A328357EA42E>I<D903F813C09038 -1FFE0190387E07819038FC01C33903F000E3000714774848133749133F001F141F485A15 -0F48C7FCA312FEAA127FA37E6D131F121F6D133F120F6C6C137F6C6C13EF3901F801CF39 -007E078F90381FFE0FEB07F890C7FCABED1FE00203B5FCA328357DA42C>I<3807E01F00 -FFEB7FC09038E1E3E09038E387F0380FE707EA03E613EE9038EC03E09038FC0080491300 -A45BB3A2487EB512F0A31C257EA421>I<EBFF03000313E7380F80FF381E003F487F487F -00707F12F0A2807EA27EB490C7FCEA7FE013FF6C13E06C13F86C7F00037FC67F01071380 -EB007F141F00C0EB0FC01407A26C1303A37E15806C13077EEC0F00B4131E38F3C07C38E1 -FFF038C03F801A277DA521>I<1318A51338A31378A313F8120112031207001FB5FCB6FC -A2D801F8C7FCB215C0A93800FC011580EB7C03017E13006D5AEB0FFEEB01F81A347FB220 ->I<D803F0EB07E000FFEB01FFA3000FEB001F00031407B3A4150FA3151F12016D133F00 -00EC77F86D9038E7FF8090383F03C790381FFF87903A03FC07E00029267EA42E>I<B538 -803FFEA33A0FF8000FF06C48EB07E00003EC03C06D148000011500A26C6C1306A26D130E -017E130CA26D5BA2EC8038011F1330A26D6C5AA214E001075BA2903803F180A3D901FBC7 -FCA214FF6D5AA2147CA31438A227257EA32C>I<B53A1FFFE03FFEA3260FF8009038000F -F86C48017EEB03E018C00003023EEB0180A26C6C013FEB0300A36C6CEC8006156FA2017E -9038EFC00C15C7171CD93F01EBE01815830281EBF038D91F831430150102C3EBF8709026 -0FC6001360A2D907E66D5A02EC137CA2D903FCEB7F804A133FA2010192C7FC4A7FA20100 -141E4A130E0260130C37257EA33C>I<B538807FFFA33A03FE003FF00001EC1F80000092 -C7FC017E131C6D13186D6C5AECC070010F5B6D6C5AECF180EB03FB6DB4C8FC6D5AA2147F -804A7E8114CF903801C7E090380383F090380703F8EB0601496C7E011C137E49137F0178 -7F496D7E486C80000FEC3FF0D8FFFE90B51280A329247FA32C>I<B538803FFEA33A0FF8 -000FF06C48EB07C00003EC03806C7E16007F00001406A2017E5BA2137F6D5BA26D6C5AA2 -ECC070010F1360A26D6C5AA214F101035BA2D901FBC7FCA214FF6D5AA2147CA31438A214 -30A214701460A25CA2EA7C0100FE5B130391C8FC1306EAFC0EEA701C6C5AEA1FF0EA0FC0 -27357EA32C>I<003FB512FCA2EB8003D83E0013F8003CEB07F00038EB0FE012300070EB -1FC0EC3F800060137F150014FE495AA2C6485A495AA2495A495A495AA290387F000613FE -A2485A485A0007140E5B4848130C4848131CA24848133C48C7127C48EB03FC90B5FCA21F -247EA325>I E +7EB81E>I<013FB512E0A39039001FFC00EC07F8B3B3A3123FEA7F80EAFFC0A44A5A1380 +D87F005B0070131F6C5C6C495A6C49C7FC380781FC3801FFF038007F80233B7DB82B>I< +B649B5FCA3000101809038007FF06C90C8EA3F80053EC7FC173C17385F5F4C5A4C5A4CC8 +FC160E5E5E5E5E4B5AED0780030EC9FC5D153E157E15FF5C4A7F4A6C7E140E4A6C7E4A6C +7E14704A6C7E4A6C7E14804A6C7E6F7EA26F7F707EA2707E707EA2707EA2707E707EA270 +7E707F8484486D497FB6011FEBFF80A339397DB841>I<B612E0A3000101C0C8FC6C90C9 +FCB3AD1718A517381730A31770A317F0A216011603160FEE1FE0486D13FFB8FCA32D397D +B834>I<B5933807FFF86E5DA20001F0FC002600DFC0ED1BF8A2D9CFE01533A3D9C7F015 +63A3D9C3F815C3A2D9C1FCEC0183A3D9C0FEEC0303A2027F1406A36E6C130CA36E6C1318 +A26E6C1330A36E6C1360A26E6C13C0A3913901FC0180A3913900FE0300A2ED7F06A3ED3F +8CA2ED1FD8A3ED0FF0A3486C6D5A487ED80FFC6D48497EB500C00203B512F8A2ED018045 +397DB84C>I<B5913807FFFE8080C69238007FE06EEC1F80D9DFF0EC0F001706EBCFF8EB +C7FCA2EBC3FEEBC1FFA201C07F6E7EA26E7E6E7E81140F6E7E8114036E7E168080ED7FC0 +16E0153FED1FF0ED0FF8A2ED07FCED03FEA2ED01FF6F1386A2EE7FC6EE3FE6A2EE1FF6EE +0FFEA216071603A216011600A2177E486C153E487ED80FFC151EB500C0140EA217063739 +7DB83E>I<EC03FF021F13E09138FE01FC903901F8007ED907E0EB1F8049486D7ED93F80 +EB07F049C76C7E01FE6E7E48486E7E49157E0003167F4848ED3F80A24848ED1FC0A2001F +17E049150F003F17F0A3007F17F8491507A300FF17FCAC007F17F86D150FA3003F17F0A2 +6C6CED1FE0A36C6CED3FC0000717806D157F000317006C6C15FEA26C6C4A5A017F4A5A6D +6C495A6D6C495AD907E0EB1F80D903F8017FC7FC903900FE01FC91381FFFE0020390C8FC +363D7BBA41>I<B712C016FC16FF0001D9800013C06C90C7EA1FE0707EEE03F883707EA2 +707EA21880A71800A24C5AA24C5A5FEE0FF04C5AEEFF8091B548C7FC16F091CAFCB3A548 +7FB6FCA331397EB838>I<EC03FF021F13E09138FE01FC903901F8007ED907E0EB1F8049 +486D7ED93F80EB07F049C76C7E01FE6E7E48486E7EA24848157F0007178049153F000F17 +C049151F001F17E0A24848ED0FF0A3007F17F8A2491507A200FF17FCAC007F17F8A26D15 +0FA2003F17F0A26C6CED1FE0A36C6CED3FC00007027C14804AB4FC3C03F80383807F003B +01FC0701C0FEEC0E002600FE0CEBE1FC017FEC63F8D93F8CEB77F0D91FCCEB3FE0D907EE +14806DB449C7FC0100D981FC130CEC1FFF0203131C91C7001E131C161F183CEF807CEFC0 +F8EE0FFFA318F08218E07013C07013809338007E00364B7BBA41>I<B612FEEDFFE016F8 +000190388007FE6C90C76C7EEE3FC0707E707E707EA2707EA283A65FA24C5AA24C5A4C5A +EE3F8004FFC8FCED07FC91B512E05E9138000FF0ED03F8ED00FE82707E707EA2161F83A5 +83A6F00180A217F8160F1803486D01071400B66D6C5A04011306933800FE0ECAEA3FFCEF +07F0393B7DB83D>I<D90FF813C090383FFE0190B512813903F807E33907E000F7484813 +7F4848133F48C7121F003E140F007E1407A2007C140312FC1501A36C1400A37E6D14006C +7E7F13F86CB47E6C13F8ECFF806C14E06C14F86C14FEC680013F1480010714C0EB007F02 +0713E0EC007FED3FF0151F150FED07F8A200C01403A21501A37EA216F07E15036C15E06C +14076C15C06C140F6DEB1F80D8FBF0EB3F00D8F0FE13FE39E03FFFF8010F13E0D8C00190 +C7FC253D7CBA2E>I<003FB812E0A3D9C003EB001F273E0001FE130348EE01F000781600 +00701770A300601730A400E01738481718A4C71600B3B0913807FF80011FB612E0A33539 +7DB83C>I<B6903807FFFEA3000101809038007FE06C90C8EA1F80EF0F001706B3B2170E +6D150C80171C133F17186D6C14385F6D6C14F06D6C5C6D6C495A6D6CEB07806D6C49C7FC +91387F807E91381FFFF8020713E09138007F80373B7DB83E>I<B500FC91387FFF80A300 +03018091380FFC006C90C8EA07E0715A6C705A6E1403017F93C7FCA280013F1506A26E14 +0E011F150C80010F5DA28001075DA26E147001031560A26D6C5CA2806D4A5AA2ED800302 +7F91C8FCA291383FC006A215E0021F5BA2EDF01C020F1318A26E6C5AA215FC02035BA2ED +FEE002015BA26E6C5AA36FC9FCA3153EA2151CA3393B7EB83E>I<B5D8FC07B5D8F001B5 +FCA30007902780001FFEC7EA1FF86C48C7D80FF8EC07E000010307ED03C01B807F6C6F6C +1500A26E5F017F6E6C1406A280013F4A6C5CA280011F4A6D5BEE067FA26D6C010E6D5BEE +0C3FA26D6C011C6D5BEE181FA26D6C6F5BEE300FA26D6C6F485AEE6007A26D6C4CC7FC93 +38C003FCA203805D913B7F818001FE06A203C1150EDA3FC3C7EAFF0CA203E3151CDA1FE6 +EC7F98A215F6DA0FFCEC3FF0A302075E4B141FA202035E4B140FA202015E4B1407A20200 +93C8FC4B80503B7EB855>I<007FB590383FFFFCA3C601F801071380D97FE0D903FCC7FC +013FEC01F06D6C5C5F6D6C5C6D6C13034CC8FC6D6C1306160E6D6C5B6DEB801816389138 +7FC0306E6C5A16E06E6C5A91380FF18015FB6EB4C9FC5D14036E7EA26E7F6F7EA24B7E15 +DF9138019FF09138038FF8150F91380607FC91380E03FE140C4A6C7EEC38000230804A6D +7E14E04A6D7E49486D7E130391C76C7E01066E7E130E010C6E7E011C1401013C8101FE82 +2607FF80010713E0B500E0013FEBFF80A339397EB83E>I<B500FE91383FFFE0A3000301 +E0913807FE00C649EC03F0017F6F5A606D6C5D6D6C140395C7FC6D6C1406A26D6C5C6D6C +141C17186D6C143817306D6D5B6E6C13E05F91383FE0015F91381FF003DA0FF890C8FC16 +06913807FC0E160C913803FE1C913801FF185E6E13B016E0157F6F5AB3A24B7E023FB512 +C0A33B397FB83E>I<003FB7FCA39039FC0001FE01C0130349495A003EC7FC003C4A5A5E +0038141F00784A5A12704B5A5E006014FF4A90C7FCA24A5A5DC712074A5AA24A5A5D143F +4A5AA24A5A92C8FC5B495AA2495A5C130F4948EB0180A2495A5C137F495A16034890C7FC +5B1203485AEE0700485A495C001F5D48485C5E4848495A49130FB8FCA329397BB833>I< +007FB81280B912C0A26C17803204797041>95 D<EB1FE0EBFFFC3803E03F3907000F8039 +0F8007E0486C6C7E13E06E7EA26E7E6C5A6C5AC8FCA4147FEB07FFEB3FE0EBFE00EA03F8 +EA0FF0EA1FC0123F485A90C7FC160C12FEA31401A26C13036CEB077C903980063E18383F +C01E3A0FE0781FF03A03FFF00FE03A007F8007C026277DA52A>97 +D<EA03F012FFA3120F1203B0EC1FE0EC7FF89038F1E03E9039F3801F809039F7000FC001 +FEEB07E049EB03F049EB01F85BED00FCA216FEA2167E167FAA167E16FEA216FC15016D14 +F8ED03F07F01EEEB07E001C6EB0FC09039C7801F00903881E07E903800FFF8C7EA1FC028 +3B7EB92E>I<EB03FC90381FFF8090387E03E03901F80070484813F83907E001FC380FC0 +03A2EA1F80123F90380001F848EB00F01500A2127E12FEAA127E127FA26C14067F001F14 +0E6D130C000F141C6C6C13386C6C13706C6C13E039007C07C090381FFF00EB07F81F277D +A525>I<ED0FC0EC03FFA3EC003F150FB0EB03F8EB1FFF90387E078F9038F801EF3903F0 +007F4848133F4848131FA24848130F123F90C7FC5AA2127E12FEAA127E127FA27EA26C6C +131FA26C6C133F6C6C137F6C6CEBEFF03A01F801CFFF39007C078F90381FFE0FD907F813 +C0283B7DB92E>I<EB07F8EB1FFF90387C0FC03901F803E03903F001F0D807E013F8380F +C0004848137CA248C7127E153E5A153F127E12FEA3B7FCA248C8FCA5127EA2127FA26C14 +037F001F14076C6C13060007140E6D131CD801F013386C6C137090387E03E090381FFF80 +903803FC0020277EA525>I<147E903803FF8090380FC1E0EB1F8790383F0FF0137EA213 +FCA23901F803C091C7FCADB512FCA3D801F8C7FCB3AB487E387FFFF8A31C3B7FBA19>I< +ED03F090390FF00FF890393FFC3C3C9039F81F707C3901F00FE03903E007C03A07C003E0 +10000FECF000A248486C7EA86C6C485AA200075C6C6C485A6D485A6D48C7FC38073FFC38 +060FF0000EC9FCA4120FA213C06CB512C015F86C14FE6CECFF804815C03A0F80007FE048 +C7EA0FF0003E140348140116F8481400A56C1401007C15F06CEC03E0003F1407D80F80EB +0F80D807E0EB3F003901FC01FC39007FFFF0010790C7FC26387EA52A>I<EA03F012FFA3 +120F1203B0EC0FF0EC3FFCECF03F9039F1C01F809039F3800FC0EBF70013FE496D7EA25B +A35BB3A3486C497EB500C1B51280A3293A7EB92E>I<EA0380EA0FE0487EA56C5AEA0380 +C8FCAAEA03F012FFA312071203B3AA487EB512C0A312387EB717>I<EB01C0EB07F0EB0F +F8A5EB07F0EB01C090C7FCAAEB01F813FFA313071301B3B3A2123C127E00FF13F01303A2 +14E038FE07C0127C383C0F00EA0FFEEA03F8154984B719>I<EA03F012FFA3120F1203B1 +913801FFFCA39138007FC01600157C15705D4A5A4A5A4AC7FC141E1438147814FC13F1EB +F3FEEBF73F01FE7FEBF81F496C7E8114076E7E6E7E811400157E157F811680ED1FC0486C +EB3FF0B500C0B5FCA3283A7EB92C>I<EA03F012FFA3120F1203B3B3AD487EB512C0A312 +3A7EB917>I<2703F00FF0EB1FE000FFD93FFCEB7FF8913AF03F01E07E903BF1C01F8380 +3F3D0FF3800FC7001F802603F70013CE01FE14DC49D907F8EB0FC0A2495CA3495CB3A348 +6C496CEB1FE0B500C1B50083B5FCA340257EA445>I<3903F00FF000FFEB3FFCECF03F90 +39F1C01F803A0FF3800FC03803F70013FE496D7EA25BA35BB3A3486C497EB500C1B51280 +A329257EA42E>I<EB03FE90380FFF8090383E03E09038F800F84848137C48487F48487F +4848EB0F80001F15C090C712074815E0A2007EEC03F0A400FE15F8A9007E15F0A2007F14 +076C15E0A26C6CEB0FC0000F15806D131F6C6CEB3F006C6C137EC66C13F890387E03F090 +381FFFC0D903FEC7FC25277EA52A>I<3903F01FE000FFEB7FF89038F1E07E9039F3801F +803A07F7000FC0D803FEEB07E049EB03F04914F849130116FC150016FEA3167FAA16FEA3 +ED01FCA26DEB03F816F06D13076DEB0FE001F614C09039F7803F009038F1E07E9038F0FF +F8EC1FC091C8FCAB487EB512C0A328357EA42E>I<D903F813C090381FFE0190387E0781 +9038FC01C33903F000E3000714774848133749133F001F141F485A150F48C7FCA312FEAA +127FA37E6D131F121F6D133F120F6C6C137F6C6C13EF3901F801CF39007E078F90381FFE +0FEB07F890C7FCABED1FE00203B5FCA328357DA42C>I<3807E01F00FFEB7FC09038E1E3 +E09038E387F0380FE707EA03E613EE9038EC03E09038FC0080491300A45BB3A2487EB512 +F0A31C257EA421>I<EBFF03000313E7380F80FF381E003F487F487F00707F12F0A2807E +A27EB490C7FCEA7FE013FF6C13E06C13F86C7F00037FC67F01071380EB007F141F00C0EB +0FC01407A26C1303A37E15806C13077EEC0F00B4131E38F3C07C38E1FFF038C03F801A27 +7DA521>I<1318A51338A31378A313F8120112031207001FB5FCB6FCA2D801F8C7FCB215 +C0A93800FC011580EB7C03017E13006D5AEB0FFEEB01F81A347FB220>I<D803F0EB07E0 +00FFEB01FFA3000FEB001F00031407B3A4150FA3151F12016D133F0000EC77F86D9038E7 +FF8090383F03C790381FFF87903A03FC07E00029267EA42E>I<B538803FFEA33A0FF800 +0FF06C48EB07E00003EC03C06D148000011500A26C6C1306A26D130E017E130CA26D5BA2 +EC8038011F1330A26D6C5AA214E001075BA2903803F180A3D901FBC7FCA214FF6D5AA214 +7CA31438A227257EA32C>I<B53A1FFFE03FFEA3260FF8009038000FF86C48017EEB03E0 +18C00003023EEB0180A26C6C013FEB0300A36C6CEC8006156FA2017E9038EFC00C15C717 +1CD93F01EBE01815830281EBF038D91F831430150102C3EBF87090260FC6001360A2D907 +E66D5A02EC137CA2D903FCEB7F804A133FA2010192C7FC4A7FA20100141E4A130E026013 +0C37257EA33C>I<B538807FFFA33A03FE003FF00001EC1F80000092C7FC017E131C6D13 +186D6C5AECC070010F5B6D6C5AECF180EB03FB6DB4C8FC6D5AA2147F804A7E8114CF9038 +01C7E090380383F090380703F8EB0601496C7E011C137E49137F01787F496D7E486C8000 +0FEC3FF0D8FFFE90B51280A329247FA32C>I<B538803FFEA33A0FF8000FF06C48EB07C0 +0003EC03806C7E16007F00001406A2017E5BA2137F6D5BA26D6C5AA2ECC070010F1360A2 +6D6C5AA214F101035BA2D901FBC7FCA214FF6D5AA2147CA31438A21430A214701460A25C +A2EA7C0100FE5B130391C8FC1306EAFC0EEA701C6C5AEA1FF0EA0FC027357EA32C>I<00 +3FB512FCA2EB8003D83E0013F8003CEB07F00038EB0FE012300070EB1FC0EC3F80006013 +7F150014FE495AA2C6485A495AA2495A495A495AA290387F000613FEA2485A485A000714 +0E5B4848130C4848131CA24848133C48C7127C48EB03FC90B5FCA21F247EA325>I +E %EndDVIPSBitmapFont %DVIPSBitmapFont: Fg ecss2074 20.74 10 /Fg 10 116 df<EAFFC0B3B3B3B3B3B390B912FCA83E7570F456>76 @@ -1048,8 +1037,8 @@ letter %%Page: 1 1 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 +(arestudio.org\))1948 b(Jan)n(uary)26 b(2001)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 @@ -1062,17 +1051,17 @@ 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 +y(3)77 b(Structure)3330 b(3)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(4)315 2573 y(3.1.1)94 b(Prop)r(erties)34 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(4)315 2730 y(3.1.2)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 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 @@ -1082,1034 +1071,1256 @@ 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 +f(.)h(.)f(.)h(.)134 b(5)315 3356 y(3.2.1)94 b(En)n(umerations)27 +b(and)g(t)n(yp)r(es)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 3512 y(3.2.2)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 +3669 y(3.2.3)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 3825 y(3.2.4)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 +(.)h(.)134 b(5)315 3981 y(3.2.5)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 +(.)h(.)f(.)h(.)f(.)h(.)134 b(5)0 4221 y Fd(4)77 b(Di\033erences)30 +b(F)-8 b(rom)31 b(RF)m(Cs)2750 b(6)125 4377 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(6)125 4534 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 +(.)g(.)f(.)h(.)f(.)h(.)f(.)h(.)134 b(6)125 4690 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(6)0 4930 y Fd(5)77 b(Using)31 b(libical)3208 b(7)125 +5086 y Ff(5.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 5243 y(5.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 +f(.)h(.)f(.)h(.)f(.)h(.)134 b(7)315 5399 y(5.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 +h(.)f(.)h(.)g(.)f(.)h(.)f(.)h(.)f(.)h(.)134 b(8)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)315 162 y(5.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 318 y(5.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 +h(.)f(.)h(.)g(.)f(.)h(.)f(.)h(.)f(.)h(.)93 b(10)315 475 +y(5.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 +631 y(5.2.2)h(Iterating)27 b(Through)f(Comp)r(onen)n(ts)45 +b(.)d(.)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 788 y(5.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(11)315 944 y(5.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 +(.)93 b(12)315 1101 y(5.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(12)315 1257 y(5.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 +h(.)f(.)h(.)f(.)h(.)93 b(13)315 1413 y(5.2.7)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 +h(.)g(.)f(.)h(.)f(.)h(.)f(.)h(.)93 b(14)315 1570 y(5.2.8)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(.) +1726 y(5.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 +f(.)h(.)f(.)h(.)93 b(15)315 1883 y(5.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 +(.)h(.)f(.)h(.)f(.)h(.)93 b(15)315 2039 y(5.3.2)h(Creating)26 +b(time)j(structures)j(.)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(15)315 2196 y(5.3.3)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 +h(.)f(.)h(.)f(.)h(.)93 b(15)125 2352 y(5.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(.) +b(17)315 2509 y(5.4.1)h(Creating)26 b(a)i(new)f(set)48 +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(.)93 b(17)315 2665 y(5.4.2)h(A)n(dding,)28 +b(Finding)f(and)h(Remo)n(ving)e(Comp)r(onen)n(ts)76 b(.)41 +b(.)h(.)f(.)h(.)f(.)h(.)g(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)g(.)f(.)h +(.)f(.)h(.)f(.)h(.)93 b(18)315 2822 y(5.4.3)h(Other)27 +b(routines)70 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(19)125 2978 +y(5.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(19)125 3135 y(5.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(20)315 3291 y(5.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(20)315 +3448 y(5.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 -(.)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 +(.)g(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)g(.)f(.)h(.)f(.)h(.)f(.)h(.)93 +b(20)315 3604 y(5.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(20)125 3760 y(5.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(21)0 +4000 y Fd(6)77 b(Hac)m(ks)32 b(and)g(Bugs)3009 b(22)0 +4338 y Fe(1)131 b(In)l(tro)t(duction)0 4577 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 +b(The)23 b(iCalendar)0 4691 y(sp)r(eci\034cation)29 b(describ)r(es)f +(ho)n(w)h(calendar)f(clien)n(ts)h(can)f(comm)n(unicate)h(with)h +(calendar)d(serv)n(ers)g(so)i(users)f(can)h(store)f(their)0 +4804 y(calendar)e(data)h(and)h(arrange)d(meetings)i(with)h(other)f +(users.)0 4961 y(Libical)g(implemen)n(ts)h(RF)n(C2445,)e(RF)n(C2446)f +(and)j(some)f(of)g(RF)n(C2447)f(and)h(the)h(CAP)g(draft.)0 +5117 y(This)k(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 5231 y(these)c(sp)r(eci\034cations)e(are)h(online)g(on)h +(the)g(CALSCH)g(w)n(ebpage)e(at:)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 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 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 -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 -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 -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) +b(the)g(Library)2847 b Ff(3)0 162 y Fc(http://www.imc.o)o(rg)o(/ie)o +(tf)o(-c)o(ale)o(nd)o(ar)o(/)0 453 y Fb(1.1)112 b(The)38 +b(libical)c(pro)6 b(ject)0 663 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 777 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 1016 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 +1256 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 1495 y Fc(To:)42 +b(minimalist@softwa)o(re)o(st)o(udi)o(o.)o(or)o(g)0 1609 +y(Subject:)e(subscribe)g(libical)0 1900 y Fb(1.2)112 +b(License)0 2111 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 2890 y(h)n(ttp://www.mozilla.org/NPL/MPL-1.0.h)n +(License.)133 b(See)0 2224 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 -3004 y(under)32 b(the)g(terms)g(of)g(the)g(GNU)h(Library)d(General)h +2338 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 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 +(yleft/lesser.h)n(tml)0 2451 y(for)27 b(a)g(cop)n(y)g(of)g(the)h(LGPL.) +0 2608 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 3387 y(grams,)23 b(and)h(will)h(b)r(ene\034t)g +(and)f(GPL'd)i(pro-)0 2721 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 -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 +2835 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 3126 y Fb(1.3)112 +b(Example)37 b(Co)s(de)0 3336 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 -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 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 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 +3450 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(additional)g(annotated)g +(examples.)0 3788 y Fe(2)131 b(Building)46 b(the)e(Library)0 +4027 y Ff(Libical)33 b(uses)h(auto)r(conf)f(to)h(generate)e(mak)n +(e\034les.)55 b(It)34 b(should)g(built)g(with)g(no)g(adjustmen)n(ts)g +(on)f(Lin)n(ux,)j(F)-7 b(reeBSD)33 b(and)0 4141 y(Solaris)22 +b(under)i(gcc.)34 b(Some)24 b(v)n(ersion)e(ha)n(v)n(e)g(b)r(een)i +(successfully)f(b)r(een)h(build)g(on)f(MacOS,)g(Solaris,)g(UnixW)-7 +b(are,)24 b(And)g(T)-7 b(ru64)0 4254 y(UNIX)28 b(without)g(gcc,)f(but)i +(y)n(ou)d(ma)n(y)h(run)h(in)n(to)f(problems)g(with)h(a)f(particular)f +(later)h(v)n(ersion.)0 4411 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.)0 4749 y Fe(3)131 +b(Structure)0 4988 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 5144 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 +5258 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 5371 y(line)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 -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 +b Ff(4)0 162 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 401 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 +515 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 671 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 +785 y(timezones.)36 b(Comp)r(onen)n(ts)27 b(are)g(delimited)h(b)n(y)g +("BEGIN")f(and)g("END")h(tags.)0 941 y(When)g(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 1181 y +Fc(BEGIN:VCALENDAR)0 1294 y(METHOD:REQUEST)0 1408 y(PRODID:)41 +b(-//hacksw/handc)o(al)o(//N)o(ON)o(SG)o(ML)c(v1.0//EN)0 +1521 y(BEGIN:VEVENT)0 1635 y(DTSTAMP:19980309)o(T2)o(310)o(00)o(Z)0 +1749 y(UID:guid-1.host1)o(.c)o(om)0 1862 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 1976 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 -3789 y(LOCATION:1CP)d(Conference)i(Room)i(4350)0 3903 -y(END:VEVENT)p eop +(NT)o(;CU)o(TY)o(PE)o(=GR)o(OU)o(P:)87 2089 y(MAILTO:employee-)o(A@h)o +(os)o(t.)o(com)0 2203 y(DESCRIPTION:Proj)o(ec)o(t)h(XYZ)k(Review)f +(Meeting)0 2317 y(CATEGORIES:MEETI)o(NG)0 2430 y(CLASS:PUBLIC)0 +2544 y(CREATED:19980309)o(T1)o(300)o(00)o(Z)0 2657 y(SUMMARY:XYZ)e +(Project)i(Review)0 2771 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 2884 y(DTEND;TZID=US-Ea)o(st)o(ern)o(:1)o +(99)o(803)o(12)o(T0)o(930)o(00)0 2998 y(LOCATION:1CP)d(Conference)i +(Room)i(4350)0 3112 y(END:VEVENT)0 3225 y(END:VCALENDAR)0 +3465 y Ff(Note)28 b(that)h(comp)r(onen)n(ts)f(can)g(b)r(e)h(nested;)g +(this)g(example)e(has)h(b)r(oth)h(a)f(V)n(CALEND)n(AR)i(and)e(a)g +(VEVENT)i(comp)r(onen)n(t,)0 3578 y(one)d(nested)h(inside)f(the)h +(other.)0 3870 y Fb(3.1)112 b(Core)37 b(iCal)f(classes)0 +4080 y Ff(Libical)25 b(is)h(an)g(ob)5 b(ject-based,)25 +b(data-orien)n(ted)f(library)-7 b(.)34 b(Nearly)25 b(all)h(of)g(the)g +(routines)f(in)h(the)g(library)e(are)h(asso)r(ciated)g(with)0 +4193 y(an)e(opaque)g(data)f(t)n(yp)r(es)i(and)f(p)r(erform)g(some)g(op) +r(eration)f(on)h(that)h(data)e(t)n(yp)r(e.)36 b(Although)24 +b(the)f(library)f(do)r(es)h(not)h(actually)0 4307 y(ha)n(v)n(e)32 +b(classes,)h(w)n(e)g(will)g(use)g(those)g(terms)f(since)h(the)h(b)r +(eha)n(vior)d(of)i(these)g(asso)r(ciations)e(of)j(data)e(and)h +(routines)f(is)h(v)n(ery)0 4420 y(similar)27 b(to)g(a)g(class.)0 +4693 y Fd(3.1.1)94 b(Prop)s(erties)0 4903 y Ff(Prop)r(erties)23 +b(are)g(represen)n(ted)f(with)j(the)f(icalprop)r(ert)n(y)e(class)h(and) +g(its)h(man)n(y)f("deriv)n(ed")f(classes)g(with)j(on)e("deriv)n(ed")f +(class)0 5017 y(p)r(er)35 b(prop)r(ert)n(y)g(t)n(yp)r(e)g(in)h(RF)n +(C2445.)59 b(Again,)37 b(there)e(is)h(no)f(actual)g(inheritance)g +(relations,)h(but)g(there)g(are)e(clusters)h(of)0 5130 +y(routines)27 b(that)h(mak)n(e)e(this)i(term)g(useful.)37 +b(A)28 b(prop)r(ert)n(y)e(is)i(a)f(con)n(tainer)f(for)h(a)g(single)g(v) +-5 b(alue)28 b(and)f(a)g(set)h(of)f(parameters.)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 -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 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 +5 4 bop 0 -167 3900 5 v 0 -200 a Fd(3.)73 b(Structure)3313 +b Ff(5)0 162 y Fd(3.1.2)94 b(Comp)s(onen)m(ts)0 372 y +Ff(In)29 b(libical,)f(comp)r(onen)n(ts)g(are)g(represen)n(ted)f(with)i +(the)g(icalcomp)r(onen)n(t)e(class.)39 b(Icalcomp)r(onen)n(t)27 +b(is)i(a)f(con)n(tainer)f(for)h(a)g(set)0 485 y(of)g(other)e(comp)r +(onen)n(ts)h(and)h(prop)r(erties.)0 758 y Fd(3.1.3)94 +b(V)-8 b(alues)0 968 y Ff(V)h(alues)29 b(are)g(represen)n(ted)f(in)i(a) +f(similar)f(w)n(a)n(y)g(to)i(prop)r(erties;)f(a)g(base)g(class)g(and)g +(man)n(y)g("deriv)n(ed)f(")h(classes.)41 b(A)30 b(v)-5 +b(alue)29 b(is)0 1082 y(essen)n(tially)d(a)i(abstract)e(handle)i(on)f +(a)g(single)g(fundamen)n(tal)h(t)n(yp)r(e,)f(a)h(structure)f(or)f(a)h +(union.)0 1354 y Fd(3.1.4)94 b(P)m(arameters)0 1564 y +Ff(P)n(arameters)26 b(are)g(represetned)h(in)h(a)f(similar)g(w)n(a)n(y) +f(to)i(prop)r(erties,)e(except)i(that)g(they)f(con)n(tain)g(only)g(one) +g(v)-5 b(alue)0 1856 y Fb(3.2)112 b(Other)37 b(elemen)m(ts)g(of)g +(libical)0 2066 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 +2179 y(using)j(iCal)g(comp)r(onen)n(ts.)0 2452 y Fd(3.2.1)94 +b(En)m(umerations)30 b(and)i(t)m(yp)s(es)0 2662 y Ff(Libical)h(is)f +(strongly)g(t)n(yp)r(ed,)i(so)r(o)e(ev)n(ery)g(comp)r(onen)n(t,)i(prop) +r(ert)n(y)-7 b(,)33 b(parameter,)g(and)f(v)-5 b(alue)33 +b(t)n(yp)r(e)g(has)g(an)f(en)n(umeration,)0 2776 y(and)27 +b(some)g(ha)n(v)n(e)g(an)g(asso)r(ciated)f(structure)h(or)g(union.)0 +3048 y Fd(3.2.2)94 b(The)32 b(parser)0 3258 y Ff(The)20 +b(libical)f(parser)f(o\033ers)h(a)g(v)-5 b(ariet)n(y)19 +b(of)h(w)n(a)n(ys)e(to)h(con)n(v)n(ert)f(RF)n(C2445)g(text)i(in)n(to)g +(a)f(libical)g(iinsteral)g(comp)r(onen)n(t)h(structure.)0 +3372 y(the)28 b(parser)e(can)h(parse)f(blo)r(c)n(ks)h(of)h(text)g(as)f +(a)g(string,)g(or)f(it)i(can)g(parse)e(lin-b)n(y-line.)0 +3645 y Fd(3.2.3)94 b(Error)32 b(ob)5 b(jects)0 3855 y +Ff(Libical)27 b(has)g(a)g(substan)n(tial)g(error)f(rep)r(orting)g +(system)i(for)f(b)r(oth)h(programming)d(errors)g(and)j(comp)r(onen)n(t) +f(usage)f(errors.)0 4127 y Fd(3.2.4)94 b(Memory)30 b(Managemen)m(t)0 +4337 y Ff(Since)38 b(man)n(y)g(of)h(libicals)e(in)n(terfaces)h(return)g +(strings,)i(the)e(library)f(has)h(its)h(o)n(wn)e(memory)h(managemen)n +(t)f(system)h(to)0 4451 y(elimiate)28 b(the)g(need)f(to)h(free)f(ev)n +(ery)f(string)h(returned)g(from)g(the)h(libraru.)0 4724 +y Fd(3.2.5)94 b(Storage)32 b(classes)0 4934 y Ff(The)c(library)e(also)g +(o\033ers)h(sev)n(eral)f(classes)g(to)h(store)g(comp)r(onen)n(ts)g(to)g +(\035ies,)h(memory)f(or)f(databases.)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 +b(F)-8 b(rom)31 b(RF)m(Cs)2732 b Ff(6)0 162 y Fe(4)131 +b(Di\033erences)44 b(F)-11 b(rom)43 b(RF)l(Cs)0 400 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 514 y(standards)32 +b(are)g(also)g(k)n(ey)g(ob)5 b(jects)33 b(in)g(the)h(library)-7 +b(.)52 b(Ho)n(w)n(ev)n(er,)32 b(there)h(are)f(a)h(few)g(areas)f(where)g +(the)i(sp)r(eci\034cations)e(are)0 628 y(\(arguably\))e(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 +741 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 1033 y Fb(4.1)112 +b(Pseudo)38 b(Comp)s(onen)m(ts)0 1243 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 1356 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 1470 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 1583 +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 1697 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 +1811 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 1924 y(with)f(the)g(letter)g +("V,")f(while)g(pseudo)g(comp)r(onen)n(ts)g(start)g(with"X.")0 +2081 y(There)22 b(are)g(also)g(pseudo)h(comp)r(onen)n(ts)f(that)h(are)f +(conceptually)g(deriv)n(ed)g(classes)g(of)h(V)-9 b(ALARM.)23 +b(RF)n(C2446)e(de\034nes)i(what)0 2194 y(prop)r(erties)g(ma)n(y)h(b)r +(e)g(included)h(in)f(eac)n(h)g(comp)r(onen)n(t,)g(and)g(for)g(V)-9 +b(ALARM,)25 b(the)f(set)g(of)h(prop)r(erties)e(it)h(ma)n(y)g(ha)n(v)n +(e)f(dep)r(ends)0 2308 y(on)k(the)h(v)-5 b(alue)28 b(of)f(the)h(A)n +(CTION)f(prop)r(ert)n(y)-7 b(.)0 2464 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 2578 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 2691 y(ha)n(v)n(e)26 +b(a)i(DESCRIPTION)g(prop)r(ert)n(y)-7 b(.)0 2848 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 2961 y(DIO)n(ALARM,)28 +b(XDISPLA)-7 b(Y)g(ALARM,)30 b(XEMAILALARM)f(and)f(XPR)n(OCEDUREALARM.) +0 3253 y Fb(4.2)112 b(Com)m(bined)37 b(V)-9 b(alues)0 +3463 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 +3577 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 +3690 y(asso)r(ciated)26 b(with)i(a)f(prop)r(ert)n(y)-7 +b(.)0 3847 y(It)29 b(is)g(natural)f(to)h(ha)n(v)n(e)f(in)n(terfaces)g +(that)h(w)n(ould)f(return)h(the)g(v)-5 b(alue)29 b(of)f(a)h(prop)r(ert) +n(y)-7 b(,)28 b(but)i(it)f(is)g(cum)n(b)r(ersome)f(for)g(a)h(single)0 +3960 y(routine)j(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 +4074 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 +4187 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 4479 y Fb(4.3)112 +b(Multi-V)-9 b(alued)36 b(Prop)s(erties)0 4689 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 4803 +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 +4916 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 +5030 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 -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 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 -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 -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.)p eop +5143 y(That)c(is,)f(an)g(input)i(line)e(lik)n(e,)0 5383 +y Fc(CATEGORIES:)39 b(work,)i(home)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 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 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 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 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.)174 5399 y Fc(calendar)40 b(=)p +7 6 bop 0 -167 3900 5 v 0 -200 a Fd(5.)73 b(Using)32 +b(libical)3190 b Ff(7)0 162 y(b)r(ecomes)27 b(in)h(libical's)f(in)n +(ternal)g(represen)n(tation)0 401 y Fc(CATEGORIES:)39 +b(work)0 515 y(CATEGORIES:)g(home)0 754 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 868 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 981 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 1095 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 1433 y Fe(5)131 b(Using)44 b(libical)0 1691 +y Fb(5.1)112 b(Creating)37 b(Comp)s(onen)m(ts)0 1901 +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 2015 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 2287 y Fd(5.1.1)94 b(Constructor)32 +b(In)m(terfaces)0 2497 y Ff(Using)e(constructor)f(in)n(terfaces,)i(y)n +(ou)f(create)f(eac)n(h)h(of)h(the)g(ob)5 b(jects)30 b(separately)f(and) +i(then)g(assem)n(ble)e(them)i(in)g(to)g(com-)0 2611 y(p)r(onen)n(ts:)0 +2850 y Fc(icalcomponent)38 b(*event;)0 2964 y(icalproperty)g(*prop;)0 +3077 y(icalparameter)g(*param;)0 3191 y(struct)j(icaltimetype)e(atime;) +0 3305 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 3418 y(prop)e(=)h(icalproperty_new)o(_d)o +(tst)o(am)o(p\()o(ati)o(me)o(\))37 b(;)0 3532 y(icalcomponent_ad)o(d_)o +(pro)o(pe)o(rt)o(y\(e)o(ve)o(nt)o(,)h(prop\);)0 3645 +y(prop)k(=)h(icalproperty_new)o(_u)o(id\()o('')o(gu)o(id-)o(1.)o(ho)o +(st1)o(.c)o(om)o(''\))37 b(\);)0 3759 y(icalcomponent_ad)o(d_)o(pro)o +(pe)o(rt)o(y\(e)o(ve)o(nt)o(,pr)o(op)o(\);)0 3872 y(prop=icalpropert)o +(y_)o(new)o(_o)o(rg)o(ani)o(ze)o(r\()o(''m)o(rb)o(ig)o(@ho)o(st)o(.c)o +(om')o('\))o(;)0 3986 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 4100 y(icalproperty_add)o +(_p)o(ara)o(me)o(te)o(r\(p)o(ro)o(p,)37 b(param\);)0 +4213 y(icalcomponent_ad)o(d_)o(pro)o(pe)o(rt)o(y\(e)o(ve)o(nt)o(,pr)o +(op)o(\);)0 4453 y Ff(Notice)e(that)g(libical)g(uses)f(a)h(semi-ob)5 +b(ject-orien)n(ted)32 b(st)n(yle)j(of)g(in)n(terface.)58 +b(Most)34 b(things)h(y)n(ou)f(w)n(ork)f(with)j(are)e(ob)5 +b(jects,)0 4566 y(that)28 b(are)e(instan)n(tiated)h(with)h(a)f +(constructor)f(that)i(has)f("new")g(in)g(the)h(name.)37 +b(Also)27 b(note)g(that,)h(other)f(than)g(the)h(ob)5 +b(ject)0 4680 y(reference,)30 b(most)g(structure)f(data)h(is)g(passed)f +(in)h(to)g(libical)g(routines)f(b)n(y)h(v)-5 b(alue.)44 +b(Libical)30 b(has)g(some)f(complex)h(but)g(v)n(ery)0 +4793 y(regular)c(memory)g(handling)i(rules.)36 b(These)27 +b(are)g(detailed)g(in)h(section)f(5.5)g(\(\).)0 4950 +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 5063 +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 5177 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 5291 y(ab)r(ort)27 b(b)n(y)g(default.)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 +8 7 bop 0 -167 3900 5 v 0 -200 a Fd(5.)73 b(Using)32 +b(libical)3190 b Ff(8)0 162 y Fd(5.1.2)94 b(v)-5 b(aargs)32 +b(Constructors)0 372 y Ff(There)24 b(is)g(another)g(w)n(a)n(y)f(to)i +(create)e(complex)h(comp)r(onen)n(ts,)h(whic)n(h)f(is)h(arguably)d +(more)i(elegan)n(t,)g(if)h(y)n(ou)f(are)g(not)g(horri\034ed)0 +485 y(b)n(y)k(v)-5 b(arargs.)35 b(The)28 b(v)-5 b(arargs)26 +b(constructor)g(in)n(terface)i(allo)n(ws)e(y)n(ou)i(to)f(create)h(in)n +(tricate)f(comp)r(onen)n(ts)g(in)i(a)e(single)h(blo)r(c)n(k)f(of)0 +599 y(co)r(de.)37 b(Here)27 b(is)g(the)h(previous)f(examples)f(in)i +(the)g(v)-5 b(aargs)26 b(st)n(yle.)174 830 y Fc(calendar)40 +b(=)349 943 y(icalcomponent_v)o(an)o(ew\()523 1057 y(ICAL_VCALENDAR_C)o +(OM)o(PO)o(NEN)o(T,)523 1171 y(icalproperty_new)o(_v)o(er)o(sio)o(n\()o +('')o(2.0)o('')o(\),)523 1284 y(icalproperty_new)o(_p)o(ro)o(did)o(\() +741 1398 y(''-//RDU)g(Software//NONSGM)o(L)d(HandCal//EN''\),)523 +1511 y(icalcomponent_va)o(ne)o(w\()697 1625 y(ICAL_VEVENT_COMP)o(ONE)o +(NT)o(,)697 1738 y(icalproperty_new)o(_dt)o(st)o(am)o(p\(a)o(ti)o(me)o +(\),)697 1852 y(icalproperty_new)o(_ui)o(d\()o('')o(gui)o(d-)o(1.)o +(hos)o(t1)o(.co)o(m')o('\))o(,)697 1966 y(icalproperty_van)o(ew_)o(or)o +(ga)o(niz)o(er)o(\()872 2079 y(''mrbig@host.co)o(m')o('\))o(,)872 +2193 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 2306 y(0)872 2420 y(\),)697 2533 y(icalproperty_van) +o(ew_)o(at)o(te)o(nde)o(e\()872 2647 y(''employee-A@ho)o(st)o(.c)o(om') +o(',)872 2761 y(icalparameter_n)o(ew)o(_r)o(ole)o(\()1046 +2874 y(ICAL_ROLE_REQPA)o(RTI)o(CI)o(PA)o(NT\))o(,)872 +2988 y(icalparameter_n)o(ew)o(_r)o(svp)o(\(1)o(\),)872 +3101 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 3215 y(0)872 3328 y(\),)697 +3442 y(icalproperty_new)o(_lo)o(ca)o(ti)o(on\()828 3556 +y(1CP)42 b(Conference)e(Room)h(4350\),)697 3669 y(0)697 +3783 y(\),)523 3896 y(0)523 4010 y(\);)0 4241 y Ff(This)30 +b(form)f(is)h(similar)f(to)h(the)g(constructor)f(form)g(,)i(except)f +(that)g(the)g(constructors)e(ha)n(v)n(e)h("v)-5 b(anew")29 +b(instead)g(of)h("new")0 4354 y(in)38 b(the)f(name.)66 +b(The)37 b(argumen)n(ts)f(are)h(similar)f(to)r(o,)k(except)d(that)g +(the)h(comp)r(onen)n(t)f(constructor)f(can)h(ha)n(v)n(e)f(a)h(list)g +(of)0 4468 y(prop)r(erties,)26 b(and)i(the)f(prop)r(ert)n(y)g +(constructor)e(can)i(ha)n(v)n(e)g(a)g(list)g(of)h(parameters.)35 +b(Be)27 b(sure)f(to)i(terminate)f(ev)n(ery)f(list)i(with)0 +4582 y(a)f('0',)h(or)e(y)n(our)g(co)r(de)i(will)g(crash,)e(if)i(y)n(ou) +f(are)g(luc)n(ky)-7 b(.)0 4853 y Fd(5.1.3)94 b(P)m(arsing)32 +b(T)-8 b(ext)32 b(Files)0 5063 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 +5176 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 5407 y Fc(icalcomponent*)38 b(icalparser_pars)o(e_)o +(str)o(in)o(g\()o(cha)o(r*)f(str\);)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 +9 8 bop 0 -167 3900 5 v 0 -200 a Fd(5.)73 b(Using)32 +b(libical)3190 b Ff(9)0 162 y(If)38 b(the)g(string)f(con)n(tains)f +(only)h(one)h(comp)r(onen)n(t,)h(the)f(parser)e(will)i(return)f(the)h +(comp)r(onen)n(t)f(in)h(libical)f(form.)67 b(If)38 b(the)0 +275 y(string)45 b(con)n(tains)g(m)n(ultiple)h(comp)r(onen)n(ts,)k(the)c +(m)n(ultiple)g(comp)r(onen)n(ts)f(will)h(b)r(e)g(returned)f(as)g(the)h +(c)n(hildren)g(of)f(an)0 389 y(ICAL_XR)n(OOT_COMPONENT)26 +b(comp)r(onen)n(t.)0 545 y(P)n(arsing)h(a)h(whole)g(string)f(ma)n(y)h +(seem)g(w)n(asteful)f(if)i(y)n(ou)f(w)n(an)n(t)f(to)h(pull)h(a)f(large) +e(comp)r(onen)n(t)i(o\033)h(of)f(the)g(net)n(w)n(ork)f(or)g(from)0 +659 y(a)g(\034le;)h(y)n(ou)f(ma)n(y)g(prefer)g(to)g(parse)f(the)i(comp) +r(onen)n(t)g(line)f(b)n(y)h(line.)37 b(This)27 b(is)h(p)r(ossible)f(to) +r(o)g(b)n(y)g(using:)0 898 y Fc(icalparser*)39 b(icalparser_new\(\))o +(;)0 1012 y(void)j(icalparser_free\()o(ic)o(al)o(par)o(se)o(r*)37 +b(parser\);)0 1125 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(;)0 1239 y(icalparser_add_l)o(in)o(e\(p)o(ar)o +(se)o(r,l)o(in)o(e\))o(;)0 1353 y(icalparser_set_g)o(en)o(_da)o(ta)o +(\(p)o(ars)o(er)o(,s)o(tre)o(am)o(\))0 1592 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 +(retriev)n(e)f(an)n(y)h(comp)r(onen)n(ts)0 1705 y(that)32 +b(the)g(parser)f(creates)f(from)i(the)g(input.)51 b(These)31 +b(routines)g(w)n(ork)g(b)n(y)g(sp)r(eci\034ng)h(an)g(adaptor)e(routine) +h(to)h(get)g(string)0 1819 y(data)27 b(from)g(a)g(source.)36 +b(F)-7 b(or)27 b(an)g(example:)0 2058 y Fc(char*)41 b +(read_stream\(char)c(*s,)43 b(size_t)e(size,)g(void)h(*d\))87 +2286 y(char)g(*c)h(=)g(fgets\(s,size,)38 b(\(FILE*\)d\);)87 +2399 y(return)j(c;)0 2626 y(main\(\))87 2740 y(char*)h(line;)87 +2853 y(icalcomponent)c(*c;)87 2967 y(icalparser)h(*parser)i(=)i +(icalparser_new\(\))o(;)87 3081 y(FILE*)f(stream)f(=)i +(fopen\(argv1,r\);)87 3194 y(icalparser_set_g)o(en_)o(da)o(ta)o(\(pa)o +(rs)o(er)o(,st)o(re)o(am)o(\);)87 3308 y(do)174 3421 +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 3535 y(c)g(=)h(icalparser_add_)o(li)o(ne\()o(pa)o +(rs)o(er,)o(li)o(ne)o(\);)174 3648 y(if)f(\(c)g(!=)f(0\))218 +3762 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 3876 y(icalparser_claim)o(\(p)o(ar)o(ser)o +(\);)218 3989 y(printf\(n--------)o(--)o(--)o(---)o(n\))o(;)218 +4103 y(icalcomponent_fr)o(ee)o(\(c)o(\);)131 4330 y(while)f(\()i(line)f +(!=)h(0\);)0 4569 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 4683 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 4796 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 4910 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 +5024 y(parser_set_gen_data\(\).)64 b(By)37 b(using)g(a)h(di\033eren)n +(t)f(routine)h(for)f(read_stream)e(or)i(passing)g(in)h(di\033eren)n(t)f +(data)h(with)0 5137 y(icalparser_set_gen_data,)23 b(y)n(ou)k(can)g +(connect)g(to)h(an)n(y)e(data)i(source.)0 5294 y(Using)g(the)h(same)e +(mec)n(hanism,)h(other)g(implemen)n(tations)g(could)g(read)f(from)h +(memory)g(bu\033ers,)g(so)r(c)n(k)n(ets)f(or)g(other)h(in)n(ter-)0 +5407 y(faces.)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 +10 9 bop 0 -167 3900 5 v 0 -200 a Fd(5.)73 b(Using)32 +b(libical)3149 b Ff(10)0 162 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(v)n(enience)f(routine;)0 401 y Fc(icalcomponent*)38 +b(icalparser_pars)o(e\()o(ica)o(lp)o(ar)o(ser)f(*parser,)654 +515 y(char*)k(\(*line_gen_func\))o(\(c)o(har)c(*s,)42 +b(size_t)f(size,)85 b(void*)42 b(d\)\))0 754 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 868 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 +981 y(constructed)h(comp)r(onen)n(t.)54 b(If)34 b(the)g(parser)e(can)h +(construct)f(m)n(ultiple)i(comp)r(onen)n(ts)f(from)g(the)h(input,)i(it) +e(will)g(return)e(a)0 1095 y(reference)c(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 1209 y(will)g(hold)f(all)h(of)f(the)h +(comp)r(onen)n(ts)f(constructed)g(from)g(the)h(input)g(as)f(c)n +(hildren.)0 1500 y Fb(5.2)112 b(A)m(ccessing)37 b(Comp)s(onen)m(ts)0 +1710 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 1824 y(inside.)56 +b(Libical)34 b(in)n(terfaces)f(let)i(y)n(ou)e(\034nd)i(sub-comp)r(onen) +n(t,)g(add)e(and)h(remo)n(v)n(e)f(sub-comp)r(onen)n(ts,)i(and)e(do)h +(the)h(same)0 1937 y(three)27 b(op)r(erations)g(on)g(prop)r(erties.)0 +2210 y Fd(5.2.1)94 b(Finding)30 b(Comp)s(onen)m(ts)0 +2420 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 2659 y Fc(icalcomponent*)38 +b(icalcomponent_g)o(et)o(_fi)o(rs)o(t_)o(com)o(po)o(ne)o(nt\()1525 +2773 y(icalcomponent*)g(component,)1525 2887 y(icalcomponent_ki)o(nd)f +(kind\);)0 3126 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 3240 y(icalen)n(ums.h)f(are:)0 3479 y +Fc(ICAL_ANY_COMPONE)o(NT)0 3593 y(ICAL_VEVENT_COMP)o(ON)o(ENT)0 +3706 y(ICAL_VTODO_COMPO)o(NE)o(NT)0 3820 y(ICAL_VJOURNAL_CO)o(MP)o(ONE) +o(NT)0 3933 y(ICAL_VCALENDAR_C)o(OM)o(PON)o(EN)o(T)0 +4047 y(ICAL_VFREEBUSY_C)o(OM)o(PON)o(EN)o(T)0 4161 y(ICAL_VALARM_COMP)o +(ON)o(ENT)0 4400 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 4557 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 +4670 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 4943 y Fd(5.2.2)94 b(Iterating)32 b(Through)g(Comp)s(onen)m(ts)0 +5153 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:)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 -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 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 +11 10 bop 0 -167 3900 5 v 0 -200 a Fd(5.)73 b(Using)32 +b(libical)3149 b Ff(11)0 162 y Fc(icalcomponent*)38 b(icalcomponent_g)o +(et)o(_ne)o(xt)o(_c)o(omp)o(on)o(en)o(t\()654 275 y(icalcomponent*)f +(component,)654 389 y(icalcomponent_k)o(in)o(d)h(kind\);)0 +610 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 723 y(p)r(onen)n(ts)87 +944 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 1058 y(c)g(!=)g(0;)44 1171 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 1398 y(do_something\(c\);)0 +1619 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 1733 +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 2002 y Fd(5.2.3)94 +b(Using)31 b(Comp)s(onen)m(t)f(Iterators)0 2212 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 2326 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 2440 y(only)26 +b(space)h(for)f(one.)36 b(If)27 b(y)n(ou)f(ev)n(er)g(call)h(icalcomp)r +(onen)n(t_get_\034rst_comp)r(onen)n(t\(\))d(when)j(an)f(iteration)h(is) +f(in)h(progress,)0 2553 y(the)h(p)r(oin)n(ter)f(will)h(b)r(e)g(reset)f +(to)g(the)h(b)r(eginning.)0 2710 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 +2823 y(external)e(iterators)f(are:)0 3044 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 +3158 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 3271 y(icalcomponent*)g(icalcompiter_ne)o(xt)o(\(ic)o(al)o +(co)o(mpi)o(te)o(r*)f(i\);)0 3385 y(icalcomponent*)h(icalcompiter_pr)o +(io)o(r\(i)o(ca)o(lc)o(omp)o(it)o(er)o(*)g(i\);)0 3498 +y(icalcomponent*)g(icalcompiter_de)o(re)o(f\(i)o(ca)o(lc)o(omp)o(it)o +(er)o(*)g(i\);)0 3719 y Ff(The)27 b(_b)r(egin_\(\))g(and)g(_end_\(\))g +(routines)g(return)g(a)g(new)g(iterator)f(that)h(p)r(oin)n(ts)g(to)h +(the)f(b)r(eginning)g(and)g(ending)h(of)f(the)0 3833 +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 3946 y(in)n(ternal)27 b(iterators.)0 +4103 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 4216 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 +4330 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 4444 +y(list.)0 4600 y(Here)g(is)h(an)f(example)g(of)h(a)f(lo)r(op)g(using)g +(these)h(routines:)0 4821 y Fc(for\()131 4934 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 +5048 y(icalcompiter_de)o(ref)o(\(i)o(\)!)o(=)38 b(0;)131 +5162 y(icalcompiter_ne)o(xt\()o(i\))0 5275 y(\))261 5389 +y(icalcomponent)h(*this)i(=)i(icalcompiter_der)o(ef)o(\(i\))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 +12 11 bop 0 -167 3900 5 v 0 -200 a Fd(5.)73 b(Using)32 +b(libical)3149 b Ff(12)0 162 y Fd(5.2.4)94 b(Remo)m(ving)29 +b(Comp)s(onen)m(ts)0 372 y Ff(Remo)n(ving)40 b(an)h(elemen)n(t)g(from)g +(a)g(list)g(while)h(iterating)e(through)h(the)g(list)h(with)f(the)h(in) +n(ternal)e(iterators)g(can)h(cause)0 485 y(problems,)20 +b(since)e(y)n(ou)g(will)h(probably)e(b)r(e)i(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)h(to.) +34 b(The)19 b(_remo)n(v)n(e\(\))0 599 y(routine)24 b(will)g(k)n(eep)f +(the)i(iterator)d(v)-5 b(alid)24 b(b)n(y)g(mo)n(ving)f(it)h(to)g(the)h +(next)f(comp)r(onen)n(t,)g(but)h(in)f(a)g(normal)f(lo)r(op,)h(this)g +(will)g(result)0 712 y(in)k(t)n(w)n(o)f(adv)-5 b(ances)26 +b(p)r(er)i(iteration,)e(and)i(y)n(ou)f(will)g(remo)n(v)n(e)f(only)h(ev) +n(ery)f(other)h(comp)r(onen)n(t.)37 b(T)-7 b(o)27 b(a)n(v)n(oid)f(the)i +(problem,)f(y)n(ou)0 826 y(will)h(need)f(to)h(step)g(the)g(iterator)e +(ahead)h(of)g(the)h(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:)0 1066 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 1179 y(c)f(!=)g(0;)305 +1293 y(c)g(=)g(next)174 1520 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 1633 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 +1873 y Ff(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 1986 +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 2100 +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 2340 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 +(PO)o(NE)o(NT\))o(;)0 2453 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 +b(!=)43 b(0)g(\))131 2567 y(if\(icalcomponen)o(t_i)o(sa)o(\(c)o(\))38 +b(==)k(ICAL_VEVENT_COMP)o(ONE)o(NT)o(\))261 2680 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) +(\);)174 2794 y(else)261 2907 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 +o(CO)o(MPO)o(NE)o(NT)o(\);)0 3294 y Fd(5.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) +3504 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 +(using)g(the)h(prop)r(ert)n(y-)0 3617 y(sp)r(eci\034c)c(or)e +(parameter-sp)r(eci\034c)g(in)n(terfaces:)0 3857 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 +3970 y(icalcomponent*)g(component,)218 4084 y(icalproperty_kin)o(d)f +(kind\);)0 4197 y(icalproperty*)h(icalcomponent_ge)o(t_)o(nex)o(t_)o +(pr)o(ope)o(rt)o(y\()218 4311 y(icalcomponent*)g(component,)218 +4425 y(icalproperty_kin)o(d)f(kind\);)0 4538 y(void)42 +b(icalcomponent_ad)o(d_)o(pr)o(ope)o(rt)o(y\()218 4652 +y(icalcomponent*)c(component,)218 4765 y(icalproperty*)g(property\);)0 +4879 y(void)k(icalcomponent_re)o(mo)o(ve)o(_pr)o(op)o(er)o(ty\()218 +4992 y(icalcomponent*)c(component,)218 5106 y(icalproperty*)g +(property\);)0 5346 y Ff(F)-7 b(or)27 b(parameters:)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 +13 12 bop 0 -167 3900 5 v 0 -200 a Fd(5.)73 b(Using)32 +b(libical)3149 b Ff(13)0 162 y Fc(icalparameter*)38 b(icalproperty_ge)o +(t_)o(fir)o(st)o(_p)o(ara)o(me)o(te)o(r\()218 275 y(icalproperty*)g +(prop,)218 389 y(icalparameter_ki)o(nd)f(kind\);)0 502 +y(icalparameter*)h(icalproperty_ge)o(t_)o(nex)o(t_)o(pa)o(ram)o(et)o +(er)o(\()218 616 y(icalproperty*)g(prop,)218 730 y(icalparameter_ki)o +(nd)f(kind\);)0 843 y(void)42 b(icalproperty_add)o(_p)o(ar)o(ame)o(te)o +(r\()218 957 y(icalproperty*)c(prop,)218 1070 y(icalparameter*)g +(parameter\);)0 1184 y(void)k(icalproperty_rem)o(ov)o(e_)o(par)o(am)o +(et)o(er\()218 1297 y(icalproperty*)c(prop,)218 1411 +y(icalparameter_ki)o(nd)f(kind\);)0 1650 y Ff(Note)30 +b(that)g(since)f(there)h(should)f(b)r(e)i(only)e(one)g(parameter)f(of)i +(eac)n(h)f(t)n(yp)r(e)h(in)g(a)f(prop)r(ert)n(y)-7 b(,)30 +b(y)n(ou)f(will)h(rarely)e(need)i(to)f(use)0 1764 y +(icalparameter_get_nect_paameter.)0 2037 y Fd(5.2.6)94 +b(W)-8 b(orking)31 b(with)g(v)-5 b(alues)0 2247 y Ff(V)e(alues)33 +b(are)g(t)n(ypically)g(part)h(of)f(a)h(prop)r(ert)n(y)-7 +b(,)34 b(although)f(they)h(can)f(exist)h(on)f(their)h(o)n(wn.)55 +b(Y)-7 b(ou)34 b(can)f(manipulate)h(them)0 2360 y(either)27 +b(as)g(part)g(of)h(the)g(prop)r(ert)n(y)e(or)h(indep)r(enden)n(tly)-7 +b(.)0 2517 y(The)36 b(most)f(common)g(w)n(a)n(y)f(to)h(w)n(ork)f(with)i +(v)-5 b(alues)35 b(to)h(is)f(to)g(manipulate)h(them)g(from)f(they)h +(prop)r(erties)e(that)i(con)n(tain)0 2630 y(them.)46 +b(This)31 b(in)n(v)n(olv)n(es)d(few)n(er)i(routine)g(calls)g(and)h(in)n +(termediate)f(v)-5 b(ariables)29 b(than)h(w)n(orking)f(with)i(them)g +(indep)r(enden)n(tly)-7 b(,)0 2744 y(and)27 b(it)h(is)g(t)n(yp)r +(e-safe.)0 2900 y(F)-7 b(or)26 b(eac)n(h)g(prop)r(ert)n(y)-7 +b(,)26 b(there)h(are)f(a)g(_get_)g(and)h(a)f(_set_)g(routine)h(that)g +(access)e(the)j(in)n(ternal)e(v)-5 b(alue.)36 b(F)-7 +b(or)26 b(instanace,)h(for)0 3014 y(the)h(UID)g(prop)r(ert)n(y)-7 +b(,)27 b(the)h(routines)f(are:)0 3253 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 +(v\))0 3367 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 3607 y Ff(F)-7 b(or)19 +b(m)n(ulti-v)-5 b(alued)20 b(prop)r(erties,)h(lik)n(e)f(A)-7 +b(TT)g(A)n(CH,)20 b(the)h(v)-5 b(alue)20 b(t)n(yp)r(e)g(is)g(usually)f +(a)h(struct)g(or)f(union)h(that)g(holds)g(b)r(oth)g(p)r(ossible)0 +3720 y(t)n(yp)r(es.)0 3877 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 +4116 y Fc(icalvalue*)39 b(icalproperty_get_)o(va)o(lu)o(e)f +(\(icalproperty*)f(prop\))0 4230 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(icalvalue*)d(value\);)0 4469 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 +(manipulate)g(with)h(other)e(icalv)-5 b(alue)38 b(routines.)0 +4583 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 +(that)h(the)0 4696 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(manipulate)g(it)h(with:)0 +4936 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 5049 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(value,)k(struct)h(icaltimetype)c(v\);)0 5289 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 +(that)i(has)f(the)h(parameter)0 5402 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 +b(alue,)28 b(use:)p eop +%%Page: 14 14 +14 13 bop 0 -167 3900 5 v 0 -200 a Fd(5.)73 b(Using)32 +b(libical)3149 b Ff(14)0 162 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 +275 y(char*)f(icalproperty_get_)o(x\()o(ica)o(lp)o(ro)o(per)o(ty)o(*)c +(prop\);)0 515 y Ff(All)26 b(X)g(prop)r(erties)f(ha)n(v)n(e)f(the)i(t)n +(yp)r(e)g(of)g(ICAL_X_PR)n(OPER)-7 b(TY,)26 b(so)f(y)n(ou)g(will)h +(need)g(these)g(routines)f(to)g(get)h(and)f(set)h(the)0 +628 y(name)h(of)h(the)g(prop)r(ert)n(y:)0 868 y Fc(char*)41 +b(icalproperty_get_)o(x_)o(nam)o(e\()o(ic)o(alp)o(ro)o(pe)o(rty)o(*)c +(prop\))0 981 y(void)42 b(icalproperty_set)o(_x)o(_n)o(ame)o(\(i)o(ca)o +(lpr)o(op)o(er)o(ty*)37 b(prop,)k(char*)h(name\);)0 1254 +y Fd(5.2.7)94 b(Chec)m(king)32 b(Comp)s(onen)m(t)d(V)-8 +b(alidit)m(y)0 1464 y Ff(RF)n(C)25 b(2446)e(de\034nes)j(rules)e(for)h +(what)g(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)h(used)f(for)f(transferring)g(sc)n(heduling)0 +1578 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 +(prop)r(ert)n(y)-7 b(,)35 b(whic)n(h)0 1691 y(declares)22 +b(what)h(op)r(eration)f(a)h(remote)g(receiv)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 +b(instance,)h(if)g(the)f(METHOD)0 1805 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 +(asking)f(the)j(receiv)n(er)d(to)h(join)h(in)g(a)0 1918 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 +b(AR)g(T\))26 b(and)f(list)g(the)0 2032 y(receiv)n(er)h(as)h(an)g +(attendee)h(\(A)-7 b(TTENDEE\).)0 2188 y(Libical)27 b(can)g(c)n(hec)n +(k)g(these)h(restrictions)e(with)i(the)g(routine:)0 2428 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 +(nt)o(*)c(comp\);)0 2667 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 +2781 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 +2895 y(RF)n(C2446.)0 3051 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 +b(See)0 3165 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 +3437 y Fd(5.2.8)94 b(Con)m(v)m(erting)32 b(Comp)s(onen)m(ts)d(to)j(T)-8 +b(ext)0 3647 y Ff(T)h(o)19 b(create)g(an)h(RF)n(C2445)e(complian)n(t)h +(text)h(represen)n(tation)e(of)i(an)f(ob)5 b(ject,)21 +b(use)f(one)f(of)h(the)g(*_as_ical_string\(\))d(routines:)0 +3887 y Fc(char*)41 b(icalcomponent_as_)o(ic)o(al_)o(st)o(ri)o(ng)c +(\(icalcomponent*)g(component\))0 4000 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 +4114 y(char*)k(icalparameter_as_)o(ic)o(al_)o(st)o(ri)o(ng)c +(\(icalparameter*)g(parameter\))0 4227 y(char*)k(icalvalue_as_ical)o +(_s)o(tri)o(ng)c(\(icalvalue*)i(value\))0 4467 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 +n(v)n(ert)f(all)h(of)0 4581 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 +(comp)r(onen)n(t.)0 4737 y(Icalprop)r(ert)n(y_as_ical_string\(\))37 +b(will)k(terminate)g(eac)n(h)g(line)g(with)h(the)f(RF)n(C2445)f(sp)r +(eci\034ed)h(line)h(terminator)e("n")0 4851 y(Ho)n(w)n(ev)n(er,)27 +b(if)h(y)n(ou)g(compile)g(with)h(the)f(sym)n(b)r(ol)g +(ICAL_UNIX_NEWLINE)i(unde\034ned,)f(\()g(it)g(is)f(de\034ned)h(b)n(y)f +(default\))h(it)0 4964 y(will)f(terminate)f(lines)h(with)g("nr")0 +5121 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 +5234 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.)p eop +%%Page: 15 15 +15 14 bop 0 -167 3900 5 v 0 -200 a Fd(5.)73 b(Using)32 +b(libical)3149 b Ff(15)0 162 y Fb(5.3)112 b(Time)0 372 +y Fd(5.3.1)94 b(Time)30 b(structure)0 582 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 695 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 809 y(time)f(and)f(UTC.)h(The)g(libical)f(structure)g(is:)0 +1031 y Fc(struct)41 b(icaltimetype)87 1144 y(int)h(year;)87 +1258 y(int)g(month;)87 1371 y(int)g(day;)87 1485 y(int)g(hour;)87 +1599 y(int)g(minute;)87 1712 y(int)g(second;)87 1826 +y(int)g(is_utc;)f(/*)i(1-)g(time)e(is)i(in)g(UTC)f(timezone)e(*/)87 +1939 y(int)i(is_date;)f(/*)h(1)i(-)f(interpret)c(this)j(as)h(date.)e +(*/)i(;)0 2161 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 +2275 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 +(if)g(the)g(in)n(tra-da)n(y)e(\034elds)0 2388 y(hold)e(v)-5 +b(alid)28 b(data.)0 2658 y Fd(5.3.2)94 b(Creating)31 +b(time)f(structures)0 2868 y Ff(There)d(are)g(sev)n(eral)e(w)n(a)n(ys)h +(to)i(create)e(a)i(new)f(icaltimet)n(yp)r(e)h(structure:)0 +3089 y Fc(struct)41 b(icaltimetype)e(icaltime_from_s)o(tr)o(in)o(g\(c)o +(on)o(st)e(char*)42 b(str\);)0 3203 y(struct)f(icaltimetype)e +(icaltime_from_t)o(im)o(et)o(\(ti)o(me)o(_t)e(v,)43 b(int)f(is_date\);) +0 3317 y(struct)f(icaltimetype)e(icaltime_from_i)o(nt)o(\(i)o(nt)e(v,) +43 b(int)f(is_date,)e(int)j(is_utc\);)0 3538 y Ff(Icaltime_from_string) +25 b(tak)n(es)i(an)n(y)g(RF)n(C2445)e(complian)n(t)i(time)h(string:)0 +3760 y Fc(struct)41 b(icaltimetype)e(tt)j(=)h(icaltime_from_str)o(in)o +(g\()o(199)o(70)o(101)o(T1)o(03)o(000)o(\);)0 3982 y +Ff(Icaltime_from_timet)22 b(tak)n(es)g(a)h(timet)g(v)-5 +b(alue,)24 b(represen)n(ting)e(seconds)g(past)g(the)i(POSIX)f(ep)r(o)r +(c)n(h,)h(and)f(a)f(\035ag)g(to)h(indicate)0 4095 y(if)k(the)f(time)g +(is)g(a)g(date.)36 b(Dates)26 b(ha)n(v)n(e)f(an)h(iden)n(tical)f +(structure)h(to)g(a)f(time,)i(but)g(they)f(time)h(p)r(ortion)e(\()i +(hours,)e(min)n(uts)h(and)0 4209 y(seconds)d(\))i(is)g(alw)n(a)n(ys)d +(00:00:00.)33 b(Dates)24 b(act)h(di\033eren)n(tly)f(in)h(sorting)e(an)h +(comparision,)f(and)i(they)f(ha)n(v)n(e)f(a)h(di\033eren)n(t)h(string)0 +4322 y(represen)n(tation)h(in)i(RF)n(C2445.)0 4479 y(The)20 +b(icaltime_from_in)n(t)e(is)h(lik)n(e)g(icaltime_from_timet,)i(but)f +(with)g(an)f(arbitrary)f(ep)r(o)r(c)n(h.)34 b(This)19 +b(routine)g(w)n(as)g(a)g(mistak)n(e)0 4592 y(and)27 b(is)h(deprecated.) +0 4862 y Fd(5.3.3)94 b(Time)30 b(manipulating)f(routines)0 +5072 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.)0 5294 y Fc(struct)41 b(icaltimetype)e +(icaltime_null_t)o(im)o(e\()o(voi)o(d\))o(;)0 5407 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 +p eop +%%Page: 16 16 +16 15 bop 0 -167 3900 5 v 0 -200 a Fd(5.)73 b(Using)32 +b(libical)3149 b Ff(16)0 162 y(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 275 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 389 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 +(structure)0 502 y(is)d(normalized.)0 712 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 +(icaltimetype)i(t\);)0 921 y Ff(Normalizing)26 b(allo)n(ws)g(y)n(ou)h +(to)h(do)f(arithmetic)g(op)r(erations)g(on)g(time)h(v)-5 +b(alues.)0 1130 y Fc(struct)41 b(icaltimetype)e(tt)j(=)h +(icaltime_from_str)o(in)o(g\()o("19)o(97)o(010)o(1T)o(10)o(300)o(0")o +(\);)0 1244 y(tt.days)e(+=3)0 1357 y(tt.second)f(+=)i(70;)0 +1471 y(tt)h(=)g(icaltime_normali)o(ze)o(\(t)o(t\);)0 +1680 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 1889 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 2003 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 2117 y(short)g(icaltime_day_of_w)o(ee)o(k\(s)o(tr)o +(uc)o(t)d(icaltimetype)g(t\);)0 2230 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 +2344 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 2457 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 2571 y(short)f(icaltime_days_in_)o(mo)o(nth)o(\(s)o +(ho)o(rt)c(month,short)i(year\);)0 2780 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 2894 y(is_date)27 b(\034eld)h(indicates)f(whether)g(or)g +(not)h(the)g(hour,)e(min)n(ute)i(and)g(second)f(\034elds)g(should)h(b)r +(e)g(used)f(in)h(the)g(con)n(v)n(ersion.)0 3103 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\);)0 3217 y(time_t)f(icaltime_as_time)o(t\()o(str)o(uc) +o(t)c(icaltimetype\);)0 3426 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 +3635 y Fc(int)42 b(icaltime_compare\()o(st)o(ru)o(ct)37 +b(icaltimetype)i(a,struct)h(icaltimetype)e(b\);)0 3844 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 +(ust)g(b)r(e)g(a)f(timezone)0 3958 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 +4114 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 +4271 y(The)f(tt)g(parameter)e(in)i(the)g(follo)n(wing)e(routines)h +(indicates)h(the)g(date)f(on)h(whic)n(h)f(the)h(con)n(v)n(ersion)d +(should)j(b)r(e)g(made.)36 b(The)0 4384 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 +(time)i(is)f(used,)0 4498 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 +(on)0 4612 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 +(y)h(ha)n(v)n(e)g(standard)f(time)i(all)0 4725 y(y)n(ear.)0 +4934 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 5048 y(int)h +(icaltime_local_ut)o(c_)o(of)o(fse)o(t\()o(\);)0 5162 +y(struct)f(icaltimetype)e(icaltime_as_utc)o(\(s)o(tr)o(uct)e +(icaltimetype)h(tt,char*)i(tzid\);)0 5275 y(struct)h(icaltimetype)e +(icaltime_as_zon)o(e\()o(st)o(ruc)o(t)e(icaltimetype)i(tt,char*)h +(tzid\);)0 5389 y(struct)h(icaltimetype)e(icaltime_as_loc)o(al)o(\(s)o +(tru)o(ct)e(icaltimetype)h(tt\);)p eop +%%Page: 17 17 +17 16 bop 0 -167 3900 5 v 0 -200 a Fd(5.)73 b(Using)32 +b(libical)3149 b Ff(17)0 162 y Fb(5.4)112 b(Storing)37 +b(Ob)6 b(jects)0 372 y Ff(The)31 b(libical)f(distribution)h(includes)g +(a)f(separate)f(library)-7 b(,)30 b(libicalss,)h(that)g(allo)n(ws)e(y)n +(ou)h(to)g(store)g(iCal)g(comp)r(onen)n(t)h(data)0 485 +y(to)f(disk)g(in)h(a)f(v)-5 b(ariet)n(y)29 b(of)i(w)n(a)n(ys.)43 +b(This)30 b(library)f(also)h(includes)g(co)r(de)g(to)g(implemen)n(t)h +(the)g(CSTP)g(proto)r(col)e(of)h(CAP)h(and)0 599 y(has)c(some)g +(routines)g(for)g(deciphering)g(incomming)g(messages.)0 +755 y(The)f(\034le)h(storage)e(routines)g(are)h(organized)e(in)j(an)f +(inheritance)g(heirarc)n(h)n(y)f(that)h(is)h(ro)r(oted)e(in)i(icalset,) +f(with)h(the)g(deriv)n(ed)0 869 y(class)k(ical\034leset)g(and)h +(icaldirset.)48 b(Ical\034leset)32 b(stores)e(comp)r(onen)n(ts)h(to)h +(a)g(\034le,)h(while)f(icaldirset)e(stores)h(comp)r(onen)n(ts)g(to)0 +983 y(m)n(ultiple)c(\034les,)f(one)g(p)r(er)g(mon)n(th)g(based)g(on)g +(DTST)-7 b(AMP)g(.)28 b(Other)e(storages)e(classess,)h(for)g(storage)g +(to)h(a)g(heap)g(or)f(a)h(m)n(ysql)0 1096 y(database)g(are)h(planned)g +(for)g(the)h(future.)0 1253 y(All)g(of)g(the)g(icalset)f(deriv)n(ed)f +(classes)h(ha)n(v)n(e)f(the)i(same)f(in)n(terface:)0 +1579 y Fc(icaldirset*)39 b(icaldirset_new\(c)o(on)o(st)e(char*)k +(path\);)0 1693 y(void)h(icaldirset_free\()o(ic)o(al)o(dir)o(se)o(t*)37 +b(store\);)0 1806 y(const)k(char*)h(icaldirset_path\()o(ic)o(al)o(dir)o +(se)o(t*)37 b(store\);)0 1920 y(void)42 b(icaldirset_mark\()o(ic)o(al)o +(dir)o(se)o(t*)37 b(store\);)0 2033 y(icalerrorenum)h(icaldirset_commi) +o(t\()o(ica)o(ld)o(ir)o(set)o(*)f(store\);)0 2147 y(icalerrorenum)h +(icaldirset_add_c)o(om)o(pon)o(en)o(t\()o(ica)o(ld)o(ir)o(set)o(*)f +(store,)k(icalcomponent*)d(comp\);)0 2260 y(icalerrorenum)g +(icaldirset_remov)o(e_)o(com)o(po)o(ne)o(nt\()o(ic)o(al)o(dir)o(se)o +(t*)f(store,)k(icalcomponent*)d(comp\);)0 2374 y(int)k +(icaldirset_count_)o(co)o(mp)o(one)o(nt)o(s\()o(ica)o(ld)o(ir)o(set)o +(*)37 b(store,)k(icalcomponent_kin)o(d)c(kind\);)0 2488 +y(icalerrorenum)h(icaldirset_selec)o(t\()o(ica)o(ld)o(ir)o(set)o(*)f +(store,)k(icalcomponent*)d(gauge\);)0 2601 y(void)k(icaldirset_clear)o +(\(i)o(ca)o(ldi)o(rs)o(et)o(*)c(store\);)0 2715 y(icalcomponent*)g +(icaldirset_fetc)o(h\()o(ica)o(ld)o(ir)o(set)o(*)f(store,)k(const)h +(char*)f(uid\);)0 2828 y(int)h(icaldirset_has_ui)o(d\()o(ic)o(ald)o(ir) +o(se)o(t*)37 b(store,)k(const)h(char*)f(uid\);)0 2942 +y(icalcomponent*)d(icaldirset_fetc)o(h_)o(mat)o(ch)o(\(i)o(cal)o(di)o +(rs)o(et*)f(set,)42 b(icalcomponent)c(*c\);)0 3055 y(icalerrorenum)g +(icaldirset_modif)o(y\()o(ica)o(ld)o(ir)o(set)o(*)f(store,)k +(icalcomponent)d(*oldc,)j(icalcomponent)e(*newc\);)0 +3169 y(icalcomponent*)f(icaldirset_get_)o(cu)o(rre)o(nt)o(_c)o(omp)o +(on)o(en)o(t\(i)o(ca)o(ldi)o(rs)o(et)o(*)g(store\);)0 +3283 y(icalcomponent*)g(icaldirset_get_)o(fi)o(rst)o(_c)o(om)o(pon)o +(en)o(t\()o(ica)o(ld)o(irs)o(et)o(*)f(store\);)0 3396 +y(icalcomponent*)h(icaldirset_get_)o(ne)o(xt_)o(co)o(mp)o(one)o(nt)o +(\(i)o(cal)o(di)o(rse)o(t*)f(store\);)0 3664 y Fd(5.4.1)94 +b(Creating)31 b(a)h(new)g(set)0 3874 y Ff(Y)-7 b(ou)28 +b(can)f(create)f(a)i(new)f(set)h(from)f(either)g(the)h(base)f(class)g +(or)g(the)g(direv)n(ed)g(class.)36 b(F)-7 b(rom)27 b(the)h(base)f +(class)g(use)g(one)g(of:)0 4087 y Fc(icalset*)40 b(icalset_new_file)o +(\(co)o(ns)o(t)d(char*)42 b(path\);)0 4201 y(icalset*)e +(icalset_new_dir\()o(con)o(st)d(char*)k(path\);)0 4314 +y(icalset*)f(icalset_new_heap)o(\(vo)o(id)o(\);)0 4428 +y(icalset*)g(icalset_new_mysq)o(l\(c)o(on)o(st)d(char*)k(path\);)0 +4641 y Ff(Y)-7 b(ou)28 b(can)f(also)f(create)h(a)g(new)h(set)f(based)g +(on)h(the)f(deriv)n(ed)g(class,)g(F)-7 b(or)27 b(instance,)g(with)h +(ical\034leset:)0 4854 y Fc(icalfileset*)38 b(icalfileset_new\(c)o(on)o +(st)f(char*)42 b(path\);)0 4967 y(icalfileset*)c(icalfileset_new_o)o +(pe)o(n\(c)o(on)o(st)f(char*)k(path,)h(int)g(flags,)f(mode_t)g(mode\);) +0 5180 y Ff(Icaset_new_\034le)33 b(is)h(iden)n(tical)g(to)g +(ical\034leset_new.)55 b(BOth)34 b(routines)g(will)g(op)r(en)g(an)g +(existing)g(\034le)g(for)g(readinga)e(and)0 5294 y(writing,)24 +b(or)e(create)g(a)h(new)g(\034le)g(if)h(it)f(do)r(es)g(not)g(exist.)35 +b(Ical\034lset_new_op)r(en)22 b(tak)n(es)g(the)h(same)g(argumen)n(ts)f +(as)g(the)i(op)r(en\(\))0 5407 y(system)j(routine)g(and)h(b)r(eha)n(v)n +(es)e(in)i(the)g(same)f(w)n(a)n(y)-7 b(.)p eop +%%Page: 18 18 +18 17 bop 0 -167 3900 5 v 0 -200 a Fd(5.)73 b(Using)32 +b(libical)3149 b Ff(18)0 162 y(The)29 b(icalset)g(and)g(ical\034lset)g +(ob)5 b(jects)29 b(are)f(somewhat)h(in)n(terc)n(hangable)e(\025)i(y)n +(ou)f(can)h(use)g(an)g(ical\034leset*)g(as)f(an)h(argumen)n(t)0 +275 y(to)e(an)n(y)g(of)h(the)g(icalset)f(routines.)0 +432 y(The)d(follo)n(wing)f(examples)h(will)g(all)g(use)g(ical\034leset) +g(routines;)g(using)g(the)h(other)e(icalset)h(deriv)n(ed)f(classess)g +(will)h(b)r(e)h(similar.)0 704 y Fd(5.4.2)94 b(A)m(dding,)31 +b(Finding)g(and)h(Remo)m(ving)d(Comp)s(onen)m(ts)0 914 +y Ff(T)-7 b(o)27 b(add)h(comp)r(onen)n(ts)f(to)g(a)g(set,)h(use:)0 +1154 y Fc(icalerrorenum)38 b(icalfileset_add_)o(co)o(mpo)o(ne)o(nt)o +(\(ic)o(al)o(fi)o(les)o(et)o(*)g(cluster,)i(icalcomponent*)d(child\);)0 +1393 y Ff(The)k(\034leset)h(k)n(eeps)e(an)h(inmemory)g(cop)n(y)f(of)h +(the)h(comp)r(onen)n(ts,)i(and)d(this)g(set)h(m)n(ust)f(b)r(e)g +(written)h(bac)n(k)e(to)h(the)h(\034le)0 1507 y(o)r(cassionally)-7 +b(.)35 b(There)27 b(are)f(t)n(w)n(o)h(routines)g(to)g(manage)g(this:)0 +1746 y Fc(void)42 b(icalfileset_mark)o(\(i)o(ca)o(lfi)o(le)o(se)o(t*)37 +b(cluster\);)0 1860 y(icalerrorenum)h(icalfileset_comm)o(it)o(\(ic)o +(al)o(fi)o(les)o(et)o(*)f(cluster\);)0 2099 y Ff(Ical\034leset_mark)d +(indicates)i(that)h(the)g(in-memory)e(comp)r(onen)n(ts)h(ha)n(v)n(e)f +(c)n(hanged.)62 b(Calling)36 b(the)h(_add_comp)r(onen)n(t)0 +2212 y(routine)32 b(will)h(call)f(_mark)f(automatically)-7 +b(,)33 b(but)g(y)n(ou)f(ma)n(y)g(need)h(to)f(call)h(it)g(y)n(ourself)e +(if)i(y)n(ou)f(ha)n(v)n(e)f(made)i(a)f(c)n(hange)f(to)0 +2326 y(an)g(existing)h(comp)r(onen)n(t.)49 b(The)32 b(_commit)f +(routine)g(writes)h(the)g(data)f(base)g(to)h(disk,)g(but)h(only)e(if)h +(it)g(is)g(mark)n(ed.)48 b(The)0 2440 y(_commit)27 b(routine)g(is)h +(called)f(automatically)f(when)i(the)g(ical\034leset)f(is)h(freed.)0 +2596 y(T)-7 b(o)27 b(iterate)g(through)g(the)h(comp)r(onen)n(ts)f(in)h +(a)f(set,)h(use:)0 2835 y Fc(icalcomponent*)38 b(icalfileset_get)o(_f)o +(irs)o(t_)o(co)o(mpo)o(ne)o(nt)o(\(ic)o(al)o(fil)o(es)o(et)o(*)g +(cluster\);)0 2949 y(icalcomponent*)g(icalfileset_get)o(_n)o(ext)o(_c)o +(om)o(pon)o(en)o(t\()o(ica)o(lf)o(ile)o(se)o(t*)f(cluster\);)0 +3063 y(icalcomponent*)h(icalfileset_get)o(_c)o(urr)o(en)o(t_)o(com)o +(po)o(ne)o(nt)f(\(icalfileset*)h(cluster\);)0 3302 y +Ff(These)25 b(routines)g(w)n(ork)g(lik)n(e)g(the)h(corresp)r(onding)e +(routines)h(from)g(icalcomp)r(onen)n(t,)g(except)h(that)g(their)f +(output)i(is)e(\034ltered)0 3415 y(through)j(a)h(gauge.)39 +b(A)29 b(gauge)f(is)h(a)f(test)h(for)g(the)g(prop)r(erties)f(within)h +(a)g(comp)r(onen)n(ts;)g(only)f(comp)r(onen)n(ts)g(that)i(pass)e(the)0 +3529 y(test)g(are)e(returned.)37 b(A)28 b(gauge)e(can)h(b)r(e)h +(constructed)f(from)g(a)g(MINSQL)h(string)f(with:)0 3768 +y Fc(icalgauge*)39 b(icalgauge_new_fro)o(m_)o(sq)o(l\(c)o(ha)o(r*)e +(sql\);)0 4008 y Ff(Then,)28 b(y)n(ou)f(can)g(add)g(the)h(gauge)e(to)i +(the)g(set)f(with)h(:)0 4247 y Fc(icalerrorenum)38 b(icalfileset_sele)o +(ct)o(\(ic)o(al)o(fi)o(les)o(et)o(*)f(store,)42 b(icalgauge*)d +(gauge\);)0 4486 y Ff(Here)27 b(is)h(an)f(example)g(that)h(puts)g(all)f +(of)h(these)f(routines)g(together:)0 4726 y Fc(void)42 +b(test_fileset\(\))174 4953 y(icalfileset)d(*fs;)174 +5066 y(icalcomponent)f(*c;)174 5180 y(int)43 b(i;)174 +5294 y(char)f(*path)g(=)h(test_fileset.ic)o(s;)174 5407 +y(icalgauge)84 b(*g)42 b(=)i(icalgauge_new_f)o(ro)o(m_)o(sql)o(\()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 1214 y(library)-7 -b(.)36 b(Here)27 b(is)g(a)g(summary)g(of)h(the)g(memory)e(rules.)0 -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 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\(\)\))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 +%%Page: 19 19 +19 18 bop 0 -167 3900 5 v 0 -200 a Fd(5.)73 b(Using)32 +b(libical)3149 b Ff(19)349 162 y Fc(SELECT)41 b(*)i(FROM)f(VEVENT)f +(WHERE)g(DTSTART)84 b('20000103T120000Z)o(')37 b(AND)43 +b(DTSTART)d(=)j('20000106T120000Z)o('\))o(;)174 389 y(fs)g(=)g +(icalfileset_new\()o(pat)o(h\))o(;)174 616 y(for)g(\(i)f(=)h(0;)g(i!=)g +(10;)f(i++\))349 730 y(c)h(=)g(make_component\(i)o(\);)37 +b(/*)43 b(Make)e(a)j(new)e(component)e(where)h(DTSTART)g(has)h(month)f +(of)i(i)g(*/)349 843 y(icalfileset_add)o(_c)o(omp)o(on)o(en)o(t\(f)o +(s,)o(c\))o(;)174 1184 y(icalfileset_commi)o(t\()o(fs)o(\);)37 +b(/*)43 b(Write)e(to)i(disk)f(*/)174 1411 y(icalfileset_selec)o(t\()o +(fs)o(,g\))o(;)37 b(/*)43 b(Set)f(the)h(gauge)e(to)i(filter)e +(components)e(*/)174 1638 y(for)k(\(c)f(=)h(icalfileset_get_f)o(ir)o +(st_)o(co)o(mp)o(one)o(nt)o(\(f)o(s\);)392 1752 y(c)g(!=)g(0;)392 +1865 y(c)g(=)g(icalfileset_get_n)o(ex)o(t_c)o(om)o(po)o(nen)o(t\()o(fs) +o(\)\))349 1979 y(struct)e(icaltimetype)d(t)43 b(=)g(icalcomponent_get) +o(_d)o(tst)o(ar)o(t\()o(c\);)349 2206 y(printf\(sn,icalt)o(im)o(e_a)o +(s_)o(ct)o(ime)o(\(t)o(\)\))o(;)174 2433 y(icalfileset_free\()o(fs)o +(\);)0 2706 y Fd(5.4.3)94 b(Other)31 b(routines)0 2916 +y Ff(There)c(are)g(sev)n(eral)e(other)i(routines)g(in)h(the)g(icalset)f +(in)n(terface,)g(but)h(they)g(not)f(fully)h(implemen)n(ted)h(y)n(et.)0 +3207 y Fb(5.5)112 b(Memory)37 b(Managemen)m(t)0 3417 +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 3531 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 3645 y(library)-7 b(.)36 b(Here)27 b(is)g(a)g(summary)g(of)h +(the)g(memory)e(rules.)0 3884 y Fd(1\))208 4031 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 4144 y(nen)n(t_new\(\),)27 b(or)g(icalprop)r(ert)n +(y_new_clone\(\))e(\))0 4324 y Fd(2\))208 4471 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 +4585 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\(\)\))0 4765 y Fd(3\))208 4912 +y Ff(If)j(the)h(function)f(name)g(has)g(add)g(in)g(it,)i(the)f(caller)e +(is)h(transferring)e(con)n(trol)h(of)h(the)h(memory)e(to)h(the)h +(routine.)47 b(\()208 5025 y(icalprop)r(ert)n(y_add_parameter\(\))23 +b(\))0 5205 y Fd(4\))p eop +%%Page: 20 20 +20 19 bop 0 -167 3900 5 v 0 -200 a Fd(5.)73 b(Using)32 +b(libical)3149 b Ff(20)208 162 y(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 +275 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 3149 +(t_remo)n(v)n(e_prop)r(ert)n(y\(comp,fo)r(o\),)208 389 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 +(returns,)g(y)n(ou)g(do.)0 561 y Fd(5\))208 703 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 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 -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 +(later.)208 817 y(F)-7 b(or)32 b(example,)i(icalcomp)r(onen)n +(t_as_ical_string\(\).)50 b(Y)-7 b(ou'd)33 b(b)r(etter)g(strdup\(\))h +(it)g(if)f(y)n(ou)f(w)n(an)n(t)h(to)g(k)n(eep)f(it,)j(and)208 +931 y(y)n(ou)26 b(don't)i(ha)n(v)n(e)e(to)i(delete)g(it.)0 +1219 y Fb(5.6)112 b(Error)36 b(Handling)0 1429 y Ff(Libical)25 +b(has)g(sev)n(eral)e(error)h(handling)h(mec)n(hanisms)f(for)h(the)h(v) +-5 b(arious)24 b(t)n(yp)r(es)h(of)g(programming,)f(seman)n(tic)h(and)g +(syn)n(tactic)0 1542 y(errors)g(y)n(ou)i(ma)n(y)g(encoun)n(ter.)0 +1811 y Fd(5.6.1)94 b(Return)31 b(v)-5 b(alues)0 2022 +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 2135 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 2249 y(icalerroren)n(um.)0 +2518 y Fd(5.6.2)94 b(icalerrno)0 2728 y Ff(Most)24 b(routines)f(will)i +(set)f(the)g(global)f(error)f(v)-5 b(alue)24 b(icalerrno)f(on)h +(errors.)33 b(This)24 b(v)-5 b(ariable)23 b(is)h(an)g(en)n(umeration;)g +(p)r(ermissible)0 2841 y(v)-5 b(alues)35 b(can)f(b)r(e)h(found)h(in)f +(libical/icalerror.h.)56 b(If)35 b(the)g(routine)g(returns)f(an)h(en)n +(um)g(icalerroren)n(um,)f(then)h(the)h(return)0 2955 +y(v)-5 b(alue)27 b(will)h(b)r(e)f(the)h(same)f(as)f(icalerrno.)35 +b(Y)-7 b(ou)27 b(can)g(use)g(icalerror_strerror\(\))c(to)k(get)g(a)g +(string)f(that)i(describ)r(es)e(the)i(error)0 3224 y +Fd(5.6.3)94 b(X-LIC-ERR)m(OR)30 b(and)j(X-LIC-INV)-11 +b(ALID-COMPONENT)0 3434 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 +3548 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) +(icalrestriction_c)n(hec)n(k\(\))0 3661 y(routine)h(indicates)g(that)h +(the)f(comp)r(onen)n(t)g(do)r(es)g(not)h(meet)f(the)h(requiremen)n(ts)e +(of)h(RF)n(C2446)f(\()h(a)g(seman)n(tic)g(error\))f(the)0 +3775 y(library)i(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 +b(Here)33 b(is)g(an)g(example)g(of)g(the)0 3889 y(error)26 +b(prop)r(ert)n(y:)0 4108 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 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 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 -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 +(for)j(property)e(DTSTART.)0 4221 y(Expected)g(1)j(instances)d(of)j +(the)f(property)e(and)j(got)f(0)0 4441 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 +4554 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 4711 y(There)g(are)g(a)g +(few)h(routines)e(to)i(manipulate)f(error)f(prop)r(erties:)0 +4867 y(The)35 b(follo)n(wing)g(data)g(is)g(supp)r(osed)g(to)g(b)r(e)h +(in)g(a)f(table.)60 b(It)36 b(lo)r(oks)e(OK)h(in)h(LyX,)f(but)h(do)r +(es)f(not)g(format)g(prop)r(ertly)g(in)0 4981 y(output.)0 +5137 y(Routine)28 b(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 5294 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 5407 y(prop)r(erties)p +eop +%%Page: 21 21 +21 20 bop 0 -167 3900 5 v 0 -200 a Fd(5.)73 b(Using)32 +b(libical)3149 b Ff(21)0 162 y(in)28 b(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 +(prop)r(erties)i(in)h(as)0 318 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 475 y(REQUESTS-ST)-7 b(A)g(TUS)29 +b(proprties)e(to)g(indicate)h(the)g(inabilit)n(y)f(to)0 +631 y(pro)r(cess)f(the)i(comp)r(onen)n(t)g(as)e(an)i(iTIP)g(request.)0 +788 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 1027 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 1141 +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 1254 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 1368 y(ICAL_XLICERRORTY)o(PE)o(_PR)o +(OP)o(ER)o(TYP)o(AR)o(SE)o(ERR)o(OR)0 1481 y(ICAL_XLICERRORTY)o(PE)o +(_VA)o(LU)o(EP)o(ARS)o(EE)o(RR)o(OR)0 1595 y(ICAL_XLICERRORTY)o(PE)o +(_UN)o(KV)o(CA)o(LPR)o(OP)0 1709 y(ICAL_XLICERRORTY)o(PE)o(_IN)o(VA)o +(LI)o(DIT)o(IP)0 1948 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 2062 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 +2175 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 2289 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 +(ab)r(out.)0 2445 y(Icalcomp)r(onen)n(t_con)n(v)n(ert_errors\(\))33 +b(con)n(v)n(erts)k(some)g(of)i(the)f(error)f(prop)r(erties)g(in)h(a)g +(comp)r(onen)n(t)g(in)n(to)g(REQUEST-)0 2559 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 +n(v)n(ert)g(*P)-7 b(ARSEER-)0 2672 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 -b(that)h(y)n(ou)e(access)g(though)i(a)f(t)n(yp)r(edef,)i(suc)n(h)e(as)g -("icalcomp)r(onen)n(t")e(are)i(things)g(where)g(all)g(of)h(the)f(data)g -(is)0 755 y(hidden.)0 912 y(Comp)r(onen)n(t)28 b(names)g(that)h(start)f -(with)h("V")f(are)f(part)h(of)h(RF)n(C)f(2445)f(or)g(another)h(iCal)g -(standard.)38 b(Comp)r(onen)n(t)29 b(names)0 1025 y(that)h(start)f -(with)i("X")e(are)g(also)g(part)g(of)h(the)g(sp)r(ec,)g(but)h(they)f -(are)f(not)h(actually)f(comp)r(onen)n(ts)g(in)h(the)g(sp)r(ec.)44 -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 -(comp)r(onen)n(ts,)h(so)f(they)h(are)f(comp)r(onen)n(ts)g(in)h -(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 +(a)g(really)0 2786 y(useful)f(bit)g(of)g(co)r(de.)0 3077 +y Fb(5.7)112 b(Naming)36 b(Standard)0 3288 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 3401 y(allo)n(w)n(ed)g(to)i(see)f(inside)g(and)h(p)r +(ok)n(e)f(at.)0 3558 y(Structures)33 b(that)h(y)n(ou)e(access)g(though) +i(a)f(t)n(yp)r(edef,)i(suc)n(h)e(as)g("icalcomp)r(onen)n(t")e(are)i +(things)g(where)g(all)g(of)h(the)f(data)g(is)0 3671 y(hidden.)0 +3828 y(Comp)r(onen)n(t)28 b(names)g(that)h(start)f(with)h("V")f(are)f +(part)h(of)h(RF)n(C)f(2445)f(or)g(another)h(iCal)g(standard.)38 +b(Comp)r(onen)n(t)29 b(names)0 3941 y(that)h(start)f(with)i("X")e(are)g +(also)g(part)g(of)h(the)g(sp)r(ec,)g(but)h(they)f(are)f(not)h(actually) +f(comp)r(onen)n(ts)g(in)h(the)g(sp)r(ec.)44 b(Ho)n(w)n(ev)n(er,)0 +4055 y(they)34 b(lo)r(ok)f(and)g(act)h(lik)n(e)f(comp)r(onen)n(ts,)h +(so)f(they)h(are)f(comp)r(onen)n(ts)g(in)h(libical.)55 +b(Names)33 b(that)h(start)f(with)h("XLIC")f(or)0 4168 +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)34 b(that)h(iden)n(tify)f(a)g(comp)r(onen)n(t,)h(prop)r +4325 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 +("_COMPONENT,")e("_PR)n(OP-)0 4438 y(ER)-7 b(TY,")28 +b("_V)-9 b(ALUE,")27 b(or)g("_P)-7 b(ARAMETER"s)0 4595 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 +(second)e(w)n(ord.)45 b(F)-7 b(or)29 b(instance:)0 4708 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) +b(AR)g(TST)g(A)g(T_A)n(CCEPTED.)0 4865 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 +f(irregular.)p eop +%%Page: 22 22 +22 21 bop 0 -167 3900 5 v 0 -200 a Fd(6.)73 b(Hac)m(ks)33 +b(and)f(Bugs)2997 b Ff(22)0 162 y Fe(6)131 b(Hac)l(ks)45 +b(and)e(Bugs)0 400 y Ff(There)24 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(probably)f(b)r(e)h(c)n(hanged.)0 +514 y(These)j(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 ea5726f401..6dc4958a74 100644 --- a/libical/doc/UsingLibical.txt +++ b/libical/doc/UsingLibical.txt @@ -4,7 +4,7 @@ Using Libical Eric Busboom (eric@softwarestudio.org) -November 2000 +January 2001 @@ -12,11 +12,11 @@ November 2000 Libical is an Open Source implementation of the iCalendar protocols and protocol data units. The iCalendar specification describes how -calendar clients can communicate with calendar servers for users can +calendar clients can communicate with calendar servers so users can store their calendar data and arrange meetings with other users. -Libical implements RFC2445 and RFC2446. Eventually, it will also implement -iRIP and CAP. +Libical implements RFC2445, RFC2446 and some of RFC2447 and the CAP +draft. This documentation assumes that you are familiar with the iCalendar standards RFC2445 and RFC2446. these specifications are online on @@ -55,16 +55,15 @@ my version of the library if they are similarly dual-licensed. 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. +Also look in "src/test" for additional 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 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. +Libical uses autoconf to generate makefiles. It should built with no +adjustments on Linux, FreeBSD and Solaris under gcc. Some version +have been successfully been build on MacOS, Solaris, UnixWare, And +Tru64 UNIX 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. @@ -86,15 +85,18 @@ 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 -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 +of a calendar system, such as events or timezones. Components are +delimited by "BEGIN" and "END" tags. When a component is sent across a network, if it is un-encrypted, it will look something like: +BEGIN:VCALENDAR + +METHOD:REQUEST + +PRODID: -//hacksw/handcal//NONSGML v1.0//EN + BEGIN:VEVENT DTSTAMP:19980309T231000Z @@ -125,43 +127,84 @@ LOCATION:1CP Conference Room 4350 END:VEVENT +END:VCALENDAR + +Note that components can be nested; this example has both a VCALENDAR +and a VEVENT component, one nested inside the other. + 3.1 Core iCal classes -3.1.1 Components +Libical is an object-based, data-oriented library. Nearly all of the +routines in the library are associated with an opaque data types and +perform some operation on that data type. Although the library does +not actually have classes, we will use those terms since the behavior +of these associations of data and routines is very similar to a class. + +3.1.1 Properties + +Properties are represented with the icalproperty class and its many +"derived" classes with on "derived" class per property type in RFC2445. +Again, there is no actual inheritance relations, but there are clusters +of routines that make this term useful. A property is a container +for a single value and a set of parameters. -3.1.2 Properties +3.1.2 Components + +In libical, components are represented with the icalcomponent class. +Icalcomponent is a container for a set of other components and properties. 3.1.3 Values +Values are represented in a similar way to properties; a base class +and many "derived " classes. A value is essentially a abstract handle +on a single fundamental type, a structure or a union. + 3.1.4 Parameters +Parameters are represetned in a similar way to properties, except that +they contain only one value + 3.2 Other elements of libical In addition to the core iCal classes, libical has many other types, structures, classes that aid in creating and using iCal components. -3.2.1 Enumerations +3.2.1 Enumerations and types + +Libical is strongly typed, soo every component, property, parameter, +and value type has an enumeration, and some have an associated structure +or union. -3.2.2 Types +3.2.2 The parser -3.2.3 The parser +The libical parser offers a variety of ways to convert RFC2445 text +into a libical iinsteral component structure. the parser can parse +blocks of text as a string, or it can parse lin-by-line. -3.2.4 Restrictions +3.2.3 Error objects -3.2.5 Error objects +Libical has a substantial error reporting system for both programming +errors and component usage errors. -3.2.6 Memory Management +3.2.4 Memory Management -3.2.7 Storage classes +Since many of libicals interfaces return strings, the library has its +own memory management system to elimiate the need to free every string +returned from the libraru. + +3.2.5 Storage classes + +The library also offers several classes to store components to flies, +memory or databases. 4 Differences From RFCs Libical has been designed to follow the standards as closely as possible, -so that the key objects in the standards are also keey objects in -the library. However, there are a few areas where the specifications -are (arguably) irregular, and following them exactly would result -in an unfriendly interface. These deviations make libical easier to -use by maintaining a self-similar interface. +so that the key objects in the standards are also key objects in the +library. However, there are a few areas where the specifications are +(arguably) irregular, and following them exactly would result in an +unfriendly interface. These deviations make libical easier to use +by maintaining a self-similar interface. 4.1 Pseudo Components @@ -176,7 +219,7 @@ but is not defined as a component in RFC2445. ( See RFC2445, page 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 +There are also pseudo components that are conceptually derived classes of VALARM. RFC2446 defines what properties may be included in each component, and for VALARM, the set of properties it may have depends on the value of the ACTION property. @@ -198,7 +241,7 @@ types make it difficult to create routines to return the value associated with a property. It is natural to have interfaces that would return the value of a property, -but it is cumbersone for a single routine to return multiple types. +but it is cumbersome for a single routine to return multiple types. So, in libical, properties that can have multiple types are given a single type that is the union of their RFC2445 types. For instance, in libical, the value of the TRIGGER property resolves to struct icaltriggertype. @@ -230,20 +273,18 @@ for CATEGORIES illegal. However when you convert a component to a string, the library will collect all of the CATEGORIES properties into one. -5 Implementation Limitations - -6 Using libical +5 Using libical -6.1 Creating Components +5.1 Creating Components There are three ways to create components in Libical: creating individual objects and assembling them, building entire objects in massive vaargs calls, and parsing a text file containing iCalendar data. -6.1.1 Constructor Interfaces +5.1.1 Constructor Interfaces -Using constructor interfaces, you create each of the objects seperately -and them assemble them in to components: +Using constructor interfaces, you create each of the objects separately +and then assemble them in to components: icalcomponent *event; @@ -259,11 +300,11 @@ prop = icalproperty_new_dtstamp(atime) ; icalcomponent_add_property(event, prop); -prop = icalproperty_new_uid(strdup("guid-1.host1.com")) ); +prop = icalproperty_new_uid(''guid-1.host1.com'') ); icalcomponent_add_property(event,prop); -prop=icalproperty_new_organizer(strdup("mrbig@host.com")); +prop=icalproperty_new_organizer(''mrbig@host.com''); param = icalparameter_new_role(ICAL_ROLE_CHAIR) @@ -271,16 +312,12 @@ icalproperty_add_parameter(prop, param); 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" -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 [sec:memory]. +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" in the name. Also note that, other than +the object reference, most structure data is passed in to libical +routines by value. Libical has some complex but very regular memory +handling rules. These are 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 @@ -288,12 +325,12 @@ reference, libical will either silently ignore the error or will abort with an error message. This behavior is controlled by a compile time flag (ICAL_ERRORS_ARE_FATAL), and will abort by default. -6.1.2 vaargs Constructors +5.1.2 vaargs Constructors -There is another way to create complex components, which is arguable +There is another way to create complex components, which is arguably more elegant, if you are not horrified by varargs. The varargs constructor -interface all you to create intricate components in a single block -of text. +interface allows you to create intricate components in a single block +of code. Here is the previous examples in the vaargs style. calendar = @@ -301,11 +338,11 @@ of text. ICAL_VCALENDAR_COMPONENT, - icalproperty_new_version(strdup("2.0")), + icalproperty_new_version(''2.0''), - icalproperty_new_prodid(strdup( + icalproperty_new_prodid( - "-//RDU Software//NONSGML HandCal//EN")), + ''-//RDU Software//NONSGML HandCal//EN''), icalcomponent_vanew( @@ -313,11 +350,11 @@ of text. icalproperty_new_dtstamp(atime), - icalproperty_new_uid(strdup("guid-1.host1.com")), + icalproperty_new_uid(''guid-1.host1.com''), icalproperty_vanew_organizer( - strdup("mrbig@host.com"), + ''mrbig@host.com''), icalparameter_new_role(ICAL_ROLE_CHAIR), @@ -327,7 +364,7 @@ of text. icalproperty_vanew_attendee( - strdup("employee-A@host.com"), + ''employee-A@host.com'', icalparameter_new_role( @@ -341,9 +378,9 @@ of text. ), - icalproperty_new_location(strdup( + icalproperty_new_location( - "1CP Conference Room 4350")), + "1CP Conference Room 4350"), 0 @@ -353,14 +390,14 @@ 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, -and the property constructor can have a list or parameters. Be sure +This form is similar to the constructor form , except that the constructors +have "vanew" instead of "new" in the name. The arguments are similar +too, except that the component constructor can have a list of properties, +and the property constructor can have a list of parameters. Be sure to terminate every list with a '0', or your code will crash, if you are lucky. -6.1.3 Parsing Text Files +5.1.3 Parsing Text Files The final way to create components will probably be the most common; you can create components from RFC2445 compliant text. If you have @@ -368,9 +405,14 @@ the string in memory, use icalcomponent* icalparser_parse_string(char* str); -This may seem wasteful if you want to pull a large component off of -the network; you may prefer to parse the component line by line. This -is possible too by using: +If the string contains only one component, the parser will return the +component in libical form. If the string contains multiple components, +the multiple components will be returned as the children of an ICAL_XROOT_COMPONENT +component. + +Parsing a whole string may seem wasteful if you want to pull a large +component off of the network or from a file; you may prefer to parse +the component line by line. This is possible too by using: icalparser* icalparser_new(); @@ -384,7 +426,8 @@ icalparser_set_gen_data(parser,stream) These routines will construct a parser object to which you can add lines of input and retrieve any components that the parser creates -from the input. For an example: +from the input. These routines work by specifing an adaptor routine +to get string data from a source. For an example: char* read_stream(char *s, size_t size, void *d) @@ -435,36 +478,37 @@ with icalparser_set_gen_data() and icalparser_get_line(). In this example, the routine read_stream() will fetch the next line from a stream, with the stream passed in as the void* parameter d. The parser calls read_stream() from icalparser_get_line(), but it also needs -to know what stream to use. This is set by the call to icalparser_set_gen_data(). +to know what stream to use. This is set by the call to icalparser_set_gen_data(). +By using a different routine for read_stream or passing in different +data with icalparser_set_gen_data, you can connect to any data source. -Using the same mechanism, other implmentations could read from memory +Using the same mechanism, other implementations could read from memory buffers, sockets or other interfaces. Since the example code is a very common way to use the parser, there -is a convienience routine; +is a convenience routine; icalcomponent* icalparser_parse(icalparser *parser, - char* (*line_gen_func)(char *s, size_t sise, void* + char* (*line_gen_func)(char *s, size_t size, 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 a single component from the input, it will return a pointer to the newly constructed component. If the parser can construct multiple -cmponents from the input, it will return a reference to an XROOT component -( of type ICAL_XROOT_COMPONENT.) This XROOT component will hold all -of the components constructed from the input as children. See section -6.2.2 for how to iterate through the child components. +components from the input, it will return a reference to an XROOT +component ( of type ICAL_XROOT_COMPONENT.) This XROOT component will +hold all of the components constructed from the input as children. -6.2 Accessing Components +5.2 Accessing Components Given a reference to a component, you probably will want to access -the properties, parameters and values inside. Libical interface let +the properties, parameters and values inside. Libical interfaces let you find sub-component, add and remove sub-components, and do the same three operations on properties. -6.2.1 Finding Components +5.2.1 Finding Components To find a sub-component of a component, use: @@ -498,7 +542,7 @@ As you might guess, if there is more than one subcomponent of the type you have chosen, this routine will return only the first. to get at the others, you need to iterate through the component. -6.2.2 Interating Through Components +5.2.2 Iterating Through Components Iteration requires a second routine to get the next subcomponent after the first: @@ -528,13 +572,13 @@ 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 Using Component Iterators +5.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 +when an iteration is in progress, the pointer will be reset to the beginning. To solve this problem, there are also external iterators for components. @@ -553,7 +597,7 @@ 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 +to the beginning and ending of the list of subcomponent for the given component, and the kind argument works like the kind argument for internal iterators. @@ -579,17 +623,16 @@ for( } -6.2.4 Removing Components +5.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. 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: +Removing an element from a list while iterating through the list with +the internal iterators can cause problems, since you will probably +be removing the element that the internal iterator points 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); @@ -626,7 +669,7 @@ while((c=icalcomponent_get_current_component(c)) != 0 ){ } -6.2.5 Working with properties and parameters +5.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 @@ -656,6 +699,8 @@ void icalcomponent_remove_property( icalproperty* property); +For parameters: + icalparameter* icalproperty_get_first_parameter( icalproperty* prop, @@ -680,26 +725,29 @@ void icalproperty_remove_parameter( icalparameter_kind kind); -6.2.6 Working with values +Note that since there should be only one parameter of each type in +a property, you will rarely need to use icalparameter_get_nect_paameter. + +5.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. +their own. You can manipulate them either as part of the property +or independently. -The most common way to work with values to is to maniplate them from +The most common way to work with values to is to manipulate 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 +the internal value. For instanace, 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 +For multi-valued 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 @@ -709,10 +757,10 @@ icalvalue* icalproperty_get_value (icalproperty* prop) void icalproperty_set_value(icalproperty* prop, icalvalue* value); -Icalproperty_get_value() will return a reference that you can manipluate +Icalproperty_get_value() will return a reference that you can manipulate 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: +the value is a DATETIME type, you can manipulate it with: struct icaltimetype icalvalue_get_datetime(icalvalue* value); @@ -726,18 +774,23 @@ void icalproperty_set_x(icalproperty* prop, char* v); char* icalproperty_get_x(icalproperty* prop); -6.2.7 Working with parameters +All X properties have the type of ICAL_X_PROPERTY, so you will need +these routines to get and set the name of the property: + +char* icalproperty_get_x_name(icalproperty* prop) -6.2.8 Checking Component Validity +void icalproperty_set_x_name(icalproperty* prop, char* name); + +5.2.7 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 +to be used for transferring scheduling data. Most of these rules relate to the existence of properties relative to the METHOD property, which -declares what operation a remote reciever should use to process a +declares what operation a remote receiver 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 +is a VEVENT, the sender is probably asking the receiver to join in a meeting. In this case, RFC2446 says that the component must specify -a start time (DTSTART) and list the reciever as an attendee (ATTENDEE). +a start time (DTSTART) and list the receiver as an attendee (ATTENDEE). Libical can check these restrictions with the routine: @@ -751,9 +804,9 @@ 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.9 Converting Components to Text +5.2.8 Converting Components to Text -To create an RFC2445 compliant text representtion of an object, use +To create an RFC2445 compliant text representation of an object, use one of the *_as_ical_string() routines: char* icalcomponent_as_ical_string (icalcomponent* component) @@ -769,16 +822,17 @@ 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 "\\n" However, if you compile with the symbol +ICAL_UNIX_NEWLINE undefined, ( it is defined by default) it will terminate +lines with "\\n\\r" 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 Time +5.3 Time -6.3.1 Time structure +5.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 @@ -808,7 +862,31 @@ 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 +5.3.2 Creating time structures + +There are several ways to create a new icaltimetype structure: + +struct icaltimetype icaltime_from_string(const char* str); + +struct icaltimetype icaltime_from_timet(time_t v, int is_date); + +struct icaltimetype icaltime_from_int(int v, int is_date, int is_utc); + +Icaltime_from_string takes any RFC2445 compliant time string: + +struct icaltimetype tt = icaltime_from_string("19970101T103000"); + +Icaltime_from_timet takes a timet value, representing seconds past +the POSIX epoch, and a flag to indicate if the time is a date. Dates +have an identical structure to a time, but they time portion ( hours, +minuts and seconds ) is always 00:00:00. Dates act differently in +sorting an comparision, and they have a different string representation +in RFC2445. + +The icaltime_from_int is like icaltime_from_timet, but with an arbitrary +epoch. This routine was a mistake and is deprecated. + +5.3.3 Time manipulating routines The null time value is used to indicate that the data in the structure is not a valid time. @@ -825,6 +903,16 @@ over into the next larger field when the structure is normalized. struct icaltimetype icaltime_normalize(struct icaltimetype t); +Normalizing allows you to do arithmetic operations on time values. + +struct icaltimetype tt = icaltime_from_string("19970101T103000"); + +tt.days +=3 + +tt.second += 70; + +tt = icaltime_normalize(tt); + There are several routines to get the day of the week or month, etc, from a time structure. @@ -844,14 +932,10 @@ 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. +since the POSIX epoch. The is_date field indicates whether or not +the hour, minute and second fields should be used in the conversion. -struct icaltimetype icaltime_from_timet(time_t v, int is_date, int -is_utc); +struct icaltimetype icaltime_from_timet(time_t v, int is_date); time_t icaltime_as_timet(struct icaltimetype); @@ -866,7 +950,7 @@ tzid field must be a timezone name from the Olsen database, such as 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 tt parameter in the following 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 @@ -874,20 +958,210 @@ 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) +int icaltime_utc_offset(struct icaltimetype tt, char* tzid); + +int icaltime_local_utc_offset(); struct icaltimetype icaltime_as_utc(struct icaltimetype tt,char* tzid); struct icaltimetype icaltime_as_zone(struct icaltimetype tt,char* tzid); -6.4 Storing Objects +struct icaltimetype icaltime_as_local(struct icaltimetype tt); + +5.4 Storing Objects -The libical distribution inclues a seperate library, libicalss, that +The libical distribution includes a separate 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. -) +This library also includes code to implement the CSTP protocol of +CAP and has some routines for deciphering incomming messages. + +The file storage routines are organized in an inheritance heirarchy +that is rooted in icalset, with the derived class icalfileset and +icaldirset. Icalfileset stores components to a file, while icaldirset +stores components to multiple files, one per month based on DTSTAMP. +Other storages classess, for storage to a heap or a mysql database +are planned for the future. + +All of the icalset derived classes have the same interface: + +icaldirset* icaldirset_new(const char* path); + +void icaldirset_free(icaldirset* store); + +const char* icaldirset_path(icaldirset* store); + +void icaldirset_mark(icaldirset* store); + +icalerrorenum icaldirset_commit(icaldirset* store); + +icalerrorenum icaldirset_add_component(icaldirset* store, icalcomponent* +comp); + +icalerrorenum icaldirset_remove_component(icaldirset* store, icalcomponent* +comp); + +int icaldirset_count_components(icaldirset* store, icalcomponent_kind +kind); + +icalerrorenum icaldirset_select(icaldirset* store, icalcomponent* gauge); + +void icaldirset_clear(icaldirset* store); + +icalcomponent* icaldirset_fetch(icaldirset* store, const char* uid); + +int icaldirset_has_uid(icaldirset* store, const char* uid); + +icalcomponent* icaldirset_fetch_match(icaldirset* set, icalcomponent +*c); + +icalerrorenum icaldirset_modify(icaldirset* store, icalcomponent *oldc, +icalcomponent *newc); + +icalcomponent* icaldirset_get_current_component(icaldirset* store); + +icalcomponent* icaldirset_get_first_component(icaldirset* store); + +icalcomponent* icaldirset_get_next_component(icaldirset* store); + +5.4.1 Creating a new set + +You can create a new set from either the base class or the direved +class. From the base class use one of: + +icalset* icalset_new_file(const char* path); + +icalset* icalset_new_dir(const char* path); + +icalset* icalset_new_heap(void); -6.5 <sec:memory>Memory Management +icalset* icalset_new_mysql(const char* path); + +You can also create a new set based on the derived class, For instance, +with icalfileset: + +icalfileset* icalfileset_new(const char* path); + +icalfileset* icalfileset_new_open(const char* path, int flags, mode_t +mode); + +Icaset_new_file is identical to icalfileset_new. BOth routines will +open an existing file for readinga and writing, or create a new file +if it does not exist. Icalfilset_new_open takes the same arguments +as the open() system routine and behaves in the same way. + +The icalset and icalfilset objects are somewhat interchangable -- you +can use an icalfileset* as an argument to any of the icalset routines. + +The following examples will all use icalfileset routines; using the +other icalset derived classess will be similar. + +5.4.2 Adding, Finding and Removing Components + +To add components to a set, use: + +icalerrorenum icalfileset_add_component(icalfileset* cluster, icalcomponent* +child); + +The fileset keeps an inmemory copy of the components, and this set +must be written back to the file ocassionally. There are two routines +to manage this: + +void icalfileset_mark(icalfileset* cluster); + +icalerrorenum icalfileset_commit(icalfileset* cluster); + +Icalfileset_mark indicates that the in-memory components have changed. +Calling the _add_component routine will call _mark automatically, +but you may need to call it yourself if you have made a change to +an existing component. The _commit routine writes the data base to +disk, but only if it is marked. The _commit routine is called automatically +when the icalfileset is freed. + +To iterate through the components in a set, use: + +icalcomponent* icalfileset_get_first_component(icalfileset* cluster); + +icalcomponent* icalfileset_get_next_component(icalfileset* cluster); + +icalcomponent* icalfileset_get_current_component (icalfileset* cluster); + +These routines work like the corresponding routines from icalcomponent, +except that their output is filtered through a gauge. A gauge is a +test for the properties within a components; only components that +pass the test are returned. A gauge can be constructed from a MINSQL +string with: + +icalgauge* icalgauge_new_from_sql(char* sql); + +Then, you can add the gauge to the set with : + +icalerrorenum icalfileset_select(icalfileset* store, icalgauge* gauge); + +Here is an example that puts all of these routines together: + +void test_fileset() + +{ + + icalfileset *fs; + + icalcomponent *c; + + int i; + + char *path = "test_fileset.ics"; + + icalgauge *g = icalgauge_new_from_sql( + + "SELECT * FROM VEVENT WHERE DTSTART > '20000103T120000Z' AND +DTSTART <= '20000106T120000Z'"); + + + + fs = icalfileset_new(path); + + + + for (i = 0; i!= 10; i++){ + + c = make_component(i); /* Make a new component where DTSTART +has month of i */ + + icalfileset_add_component(fs,c); + + } + + icalfileset_commit(fs); /* Write to disk */ + + icalfileset_select(fs,g); /* Set the gauge to filter components +*/ + + + + for (c = icalfileset_get_first_component(fs); + + c != 0; + + c = icalfileset_get_next_component(fs)){ + + struct icaltimetype t = icalcomponent_get_dtstart(c); + + + + printf("%s\n",icaltime_as_ctime(t)); + + } + + icalfileset_free(fs); + +} + +5.4.3 Other routines + +There are several other routines in the icalset interface, but they +not fully implemented yet. + +5.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 @@ -902,7 +1176,7 @@ library. Here is a summary of the memory rules. call the corresponding *_free routine to free the memory. ( Use icalcomponent_free() to free objects created with icalcomponent_new()) -3) If the function name has "add" in it, the caller is transfering +3) If the function name has "add" in it, the caller is transferring control of the memory to the routine. ( icalproperty_add_parameter() ) 4) If the function name has "remove" in it, the caller passes in @@ -911,42 +1185,44 @@ library. Here is a summary of the memory rules. you do not own "foo" and after the call returns, you do. 5) If the routine returns a string, libical owns the memory and will - 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. + put it on a ring buffer to reclaim later. For example, icalcomponent_as_ical_string(). + You'd better strdup() it if you want to keep it, and you don't have + to delete it. -6.6 Error Handling +5.6 Error Handling -Libical has several error handling mechanisms for the varioustypes +Libical has several error handling mechanisms for the various types of programming, semantic and syntactic errors you may encounter. -6.6.1 Return values +5.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.6.2 icalerrno +5.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 +This variable is an enumeration; permissible values can be found in 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.6.3 X-LIC-ERROR and X-LIC-INVALID-COMPONENT +5.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 parse incoming text ( a syntactic error ) or if the icalrestriction_check() -routine indicates that the component does not meet the requirments +routine indicates that the component does not meet the requirements of RFC2446 ( a semantic error) the library will insert properties of the type X-LIC-ERROR to describe the error. Here is an example of the error property: X-LIC-ERROR;X-LIC-ERRORTYPE=INVALID_ITIP :Failed iTIP restrictions -for property DTSTART. Expected 1 instances of the property and got -0 +for property DTSTART. + +Expected 1 instances of the property and got 0 This error resulted from a call to icalrestriction_check(), which discovered that the component does not have a DTSTART property, as required by @@ -954,27 +1230,30 @@ RFC2445. There are a few routines to manipulate error properties: -+-------------------------------------+-----------------------------------------------+ -| 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 following data is supposed to be in a table. It looks OK in LyX, +but does not format propertly in output. ] + ++-------------------------------------+---------------------------------------------------------+ +| 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 proprties to indicate the inability to | ++-------------------------------------+---------------------------------------------------------+ +| | process the component as an iTIP request. | ++-------------------------------------+---------------------------------------------------------+ The types of errors are listed in icalerror.h. They are: @@ -1000,12 +1279,12 @@ is generated by icalvcal_convert() when it encounters a vCal property that it cannot convert or does not know about. Icalcomponent_convert_errors() converts some of the error properties -ina component into REQUEST-STATUS properties that indicate a failure. +in a component into REQUEST-STATUS properties that indicate a failure. 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.7 Naming Standard +5.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 @@ -1030,21 +1309,8 @@ as the second word. For instance: ICAL_ROLE_REQPARTICIPANT or ICAL_PARTSTAT_ACCE The enums for the parts of a recurarance rule and request statuses are irregular. -7 Useful Recipies - -Iteration - -Copying components. Remember that you must clone or remove an object -before putting in on another list. - -Finding compliance errors - -8 Performance - -Checking restrictions is computationally expensive. - -9 Hacks and Bugs +6 Hacks and Bugs 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 +proud of and should probably be changed. These are marked with the comment string "HACK." diff --git a/libical/examples/Makefile.am b/libical/examples/Makefile.am index 470753062f..99e33d3400 100644 --- a/libical/examples/Makefile.am +++ b/libical/examples/Makefile.am @@ -4,6 +4,8 @@ noinst_PROGRAMS = doesnothing LDADD = ../src/libical/libical.a ../src/libicalss/libicalss.la ../src/libicalvcal/libicalvcal.la INCLUDES = -I . -I../src/libical -I$(srcdir)/../src/libical -I../src/libicalss -I../src/libicalvcal +INCLUDES = -I. -I../src/libical -I$(srcdir)/../src/libical -I../src/libicalss -I../src/libicalvcal + doesnothing_SOURCES = \ access_components.c \ access_properties_and_parameters.c \ diff --git a/libical/examples/access_properties_and_parameters.c b/libical/examples/access_properties_and_parameters.c index 8591786bf0..ba3d7fcc0b 100644 --- a/libical/examples/access_properties_and_parameters.c +++ b/libical/examples/access_properties_and_parameters.c @@ -43,7 +43,7 @@ void get_required_attendees(icalcomponent* event) { /* Remember, the caller does not own this string, so you should strdup it if you want to change it. */ - char *attendee = icalproperty_get_attendee(p); + const char *attendee = icalproperty_get_attendee(p); } } @@ -116,9 +116,9 @@ void test_properties() 0); /* Iterate through all of the parameters in the property */ - for(param = icalproperty_get_first_parameter(prop,ICAL_ANY_PROPERTY); + for(param = icalproperty_get_first_parameter(prop,ICAL_ANY_PARAMETER); param != 0; - param = icalproperty_get_next_parameter(prop,ICAL_ANY_PROPERTY)) { + param = icalproperty_get_next_parameter(prop,ICAL_ANY_PARAMETER)) { printf("Prop parameter: %s\n",icalparameter_get_cn(param)); } diff --git a/libical/mkinstalldirs b/libical/mkinstalldirs deleted file mode 100644 index e61d682697..0000000000 --- a/libical/mkinstalldirs +++ /dev/null @@ -1,40 +0,0 @@ -#! /bin/sh -# mkinstalldirs --- make directory hierarchy -# Author: Noah Friedman <friedman@prep.ai.mit.edu> -# Created: 1993-05-16 -# Public domain - -# $Id: mkinstalldirs,v 1.4 2000/06/06 22:48:06 alves Exp $ - -errstatus=0 - -for file -do - set fnord `echo ":$file" | sed -ne 's/^:\//#/;s/^://;s/\// /g;s/^#/\//;p'` - shift - - pathcomp= - for d - do - pathcomp="$pathcomp$d" - case "$pathcomp" in - -* ) pathcomp=./$pathcomp ;; - esac - - if test ! -d "$pathcomp"; then - echo "mkdir $pathcomp" 1>&2 - - mkdir "$pathcomp" || lasterr=$? - - if test ! -d "$pathcomp"; then - errstatus=$lasterr - fi - fi - - pathcomp="$pathcomp/" - done -done - -exit $errstatus - -# mkinstalldirs ends here
\ No newline at end of file diff --git a/libical/src/libical/Makefile.am b/libical/src/libical/Makefile.am index 20859f4744..a3b61d5677 100644 --- a/libical/src/libical/Makefile.am +++ b/libical/src/libical/Makefile.am @@ -54,7 +54,8 @@ libical_la_SOURCES = \ pvl.c \ pvl.h \ sspm.c \ - sspm.h + sspm.h \ + vsnprintf.c libicalincludedir = $(includedir) @@ -187,3 +188,4 @@ EXTRA_DIST = \ $(BUILT_SOURCES) \ icallexer.c \ icalyacc.c + diff --git a/libical/src/libical/icalcomponent.c b/libical/src/libical/icalcomponent.c index e36faae8e7..3ac0ee0663 100644 --- a/libical/src/libical/icalcomponent.c +++ b/libical/src/libical/icalcomponent.c @@ -696,8 +696,8 @@ time_t icalcomponent_convert_time(icalproperty *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 "); + icalerror_set_errno(ICAL_MALFORMEDDATA_ERROR); return 0; } @@ -715,7 +715,7 @@ time_t icalcomponent_convert_time(icalproperty *p) /* _as_timet will use localtime() to do the conversion */ convt = icaltime_as_timet(sict); - offset = icaltime_local_utc_offset(); + offset = icaltime_utc_offset(sict,0); convt += offset; #ifdef TEST_CONVERT_TIME @@ -837,7 +837,7 @@ struct icaltime_span icalcomponent_get_span(icalcomponent* comp) dur = icalproperty_get_duration(duration); - durt = icaldurationtype_as_timet(dur); + durt = icaldurationtype_as_int(dur); span.end = span.start+durt; } @@ -1163,14 +1163,16 @@ struct icaltimetype icalcomponent_get_dtend(icalcomponent* comp) } 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); + struct icaltimetype end = icaltime_add(start,duration); + + return end; + } else { /* Error, both duration and dtend have been specified */ icalerror_set_errno(ICAL_MALFORMEDDATA_ERROR); @@ -1200,14 +1202,12 @@ void icalcomponent_set_dtend(icalcomponent* comp, struct icaltimetype 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); + = icaltime_subtract(end,start); icalproperty_set_duration(dur_prop,dur); @@ -1235,17 +1235,13 @@ void icalcomponent_set_duration(icalcomponent* comp, } 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); + struct icaltimetype new_end = icaltime_add(start,v); icalproperty_set_dtend(end_prop,new_end); } else if ( dur_prop != 0) { - icalproperty_set_duration(end_prop,v); + icalproperty_set_duration(dur_prop,v); } else { /* Error, both duration and dtend have been specified */ icalerror_set_errno(ICAL_MALFORMEDDATA_ERROR); @@ -1277,7 +1273,7 @@ struct icaldurationtype icalcomponent_get_duration(icalcomponent* comp) icalcomponent_get_dtend(inner); time_t endt = icaltime_as_timet(end); - return icaldurationtype_from_timet(endt-startt); + return icaldurationtype_from_int(endt-startt); } else if ( dur_prop != 0) { return icalproperty_get_duration(dur_prop); } else { @@ -1287,8 +1283,6 @@ struct icaldurationtype icalcomponent_get_duration(icalcomponent* comp) } } - - void icalcomponent_set_method(icalcomponent* comp, icalproperty_method method) { icalproperty *prop @@ -1348,8 +1342,34 @@ struct icaltimetype icalcomponent_get_dtstamp(icalcomponent* comp) } -void icalcomponent_set_summary(icalcomponent* comp, const char* v); -const char* icalcomponent_get_summary(icalcomponent* comp); +void icalcomponent_set_summary(icalcomponent* comp, const char* v) +{ + icalcomponent *inner = icalcomponent_get_inner(comp); + icalproperty *prop + = icalcomponent_get_first_property(inner, ICAL_SUMMARY_PROPERTY); + + if (prop == 0){ + prop = icalproperty_new_summary(v); + icalcomponent_add_property(inner, prop); + } + + icalproperty_set_summary(prop,v); +} + + +const char* icalcomponent_get_summary(icalcomponent* comp) +{ + icalcomponent *inner = icalcomponent_get_inner(comp); + icalproperty *prop + = icalcomponent_get_first_property(inner,ICAL_SUMMARY_PROPERTY); + + if (prop == 0){ + return 0; + } + + return icalproperty_get_summary(prop); + +} void icalcomponent_set_comment(icalcomponent* comp, const char* v); const char* icalcomponent_get_comment(icalcomponent* comp); diff --git a/libical/src/libical/icalcomponent.h b/libical/src/libical/icalcomponent.h index b08d488db3..61f4bf0dbf 100644 --- a/libical/src/libical/icalcomponent.h +++ b/libical/src/libical/icalcomponent.h @@ -86,6 +86,12 @@ icalproperty** icalcomponent_get_properties(icalcomponent* component, */ +/* Return the first VEVENT, VTODO or VJOURNAL sub-component of cop, or + comp if it is one of those types */ + +icalcomponent* icalcomponent_get_inner(icalcomponent* comp); + + void icalcomponent_add_component(icalcomponent* parent, icalcomponent* child); diff --git a/libical/src/libical/icalenums.c b/libical/src/libical/icalenums.c index cd5ec43203..92811eef93 100644 --- a/libical/src/libical/icalenums.c +++ b/libical/src/libical/icalenums.c @@ -32,6 +32,7 @@ #include <stdio.h> /* For fprintf */ #include <stdio.h> /* For stderr */ +#include <string.h> /* For strncmp */ #include <assert.h> struct icalproperty_kind_map { @@ -41,6 +42,7 @@ struct icalproperty_kind_map { static struct icalproperty_kind_map property_map[] = { + { ICAL_ANY_PROPERTY, "ANY"}, { ICAL_ACTION_PROPERTY, "ACTION"}, { ICAL_ATTACH_PROPERTY, "ATTACH"}, { ICAL_ATTENDEE_PROPERTY, "ATTENDEE"}, @@ -126,7 +128,7 @@ const char* icalenum_property_kind_to_string(icalproperty_kind kind) } -icalproperty_kind icalenum_string_to_property_kind(char* string) +icalproperty_kind icalenum_string_to_property_kind(const char* string) { int i; @@ -205,7 +207,7 @@ const char* icalenum_parameter_kind_to_string(icalparameter_kind kind) } -icalparameter_kind icalenum_string_to_parameter_kind(char* string) +icalparameter_kind icalenum_string_to_parameter_kind(const char* string) { int i; @@ -250,9 +252,10 @@ static struct icalvalue_kind_map value_map[] = { 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 */ - { ICAL_DATETIMEPERIOD_VALUE, "XDATETIMEPERIOD"}, /* Not an RFC2445 type */ + { ICAL_ATTACH_VALUE, "ATTACH"}, /* Not an RFC2445 type */ + { ICAL_DATETIMEDATE_VALUE, "DATETIMEDATE"}, /* Not an RFC2445 type */ + { ICAL_DATETIMEPERIOD_VALUE, "DATETIMEPERIOD"}, /* Not an RFC2445 type */ + { ICAL_TRIGGER_VALUE, "TRIGGER"}, /* Not an RFC2445 type */ { ICAL_QUERY_VALUE, "QUERY"}, { ICAL_NO_VALUE, ""}, }; @@ -330,7 +333,7 @@ const char* icalenum_component_kind_to_string(icalcomponent_kind kind) } -icalcomponent_kind icalenum_string_to_component_kind(char* string) +icalcomponent_kind icalenum_string_to_component_kind(const char* string) { int i; @@ -400,7 +403,7 @@ static struct icalproperty_kind_value_map propval_map[] = { ICAL_RECURRENCEID_PROPERTY, ICAL_DATETIME_VALUE }, { ICAL_EXDATE_PROPERTY, ICAL_DATETIME_VALUE }, { ICAL_RDATE_PROPERTY, ICAL_DATETIME_VALUE }, - { ICAL_TRIGGER_PROPERTY, ICAL_DURATION_VALUE }, + { ICAL_TRIGGER_PROPERTY, ICAL_TRIGGER_VALUE }, { ICAL_DURATION_PROPERTY, ICAL_DURATION_VALUE }, /* CAP properties */ diff --git a/libical/src/libical/icalenums.h b/libical/src/libical/icalenums.h index ab25532cf6..d11547efad 100644 --- a/libical/src/libical/icalenums.h +++ b/libical/src/libical/icalenums.h @@ -421,16 +421,16 @@ icalrequeststatus icalenum_num_to_reqstat(short major, short minor); **********************************************************************/ const char* icalenum_property_kind_to_string(icalproperty_kind kind); -icalproperty_kind icalenum_string_to_property_kind(char* string); +icalproperty_kind icalenum_string_to_property_kind(const 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); +icalparameter_kind icalenum_string_to_parameter_kind(const char* string); const char* icalenum_component_kind_to_string(icalcomponent_kind kind); -icalcomponent_kind icalenum_string_to_component_kind(char* string); +icalcomponent_kind icalenum_string_to_component_kind(const char* string); icalvalue_kind icalenum_property_kind_to_value_kind(icalproperty_kind kind); diff --git a/libical/src/libical/icalerror.c b/libical/src/libical/icalerror.c index 76212afdae..e9641efc6a 100644 --- a/libical/src/libical/icalerror.c +++ b/libical/src/libical/icalerror.c @@ -53,15 +53,29 @@ void icalerror_clear_errno() { icalerrno = ICAL_NO_ERROR; } -void icalerror_set_errno(icalerrorenum e) { - #ifdef ICAL_ERRORS_ARE_FATAL - fprintf(stderr,"libical: icalerrno_set_error: %s",icalerror_strerror(e)); - icalerror_crash_here(); +int icalerror_errors_are_fatal = 1; +#else +int icalerror_errors_are_fatal = 0; #endif - icalerror_stop_here(); +void icalerror_set_errno(icalerrorenum e) { + + icalerrno = e; + icalerror_stop_here(); + + if(icalerror_errors_are_fatal == 1){ + + fprintf(stderr,"libical: icalerrno_set_error: %s\n",icalerror_strerror(e)); +#ifdef NDEBUG + icalerror_crash_here(); +#else + assert(0); +#endif + } + + } @@ -75,7 +89,7 @@ static struct icalerror_string_map string_map[] = {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 or a component has missing or extra properties"}, - {ICAL_PARSE_ERROR,"Failed to parse a part of an iCal componet"}, + {ICAL_PARSE_ERROR,"Failed to parse a part of an iCal component"}, {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."}, {ICAL_ALLOCATION_ERROR,"Failed to allocate memory"}, diff --git a/libical/src/libical/icalerror.h b/libical/src/libical/icalerror.h index c5035149f9..85e054fd86 100644 --- a/libical/src/libical/icalerror.h +++ b/libical/src/libical/icalerror.h @@ -131,8 +131,11 @@ typedef enum icalerrorenum { } icalerrorenum; +/* The libical error enumeration, like errno*/ extern icalerrorenum icalerrno; +/* If true, libicl aborts after a call to icalerror_set_error*/ +extern int icalerror_errors_are_fatal; void icalerror_clear_errno(void); void icalerror_set_errno(icalerrorenum e); diff --git a/libical/src/libical/icallexer.l b/libical/src/libical/icallexer.l index 5a3616b8da..d76a7938e3 100644 --- a/libical/src/libical/icallexer.l +++ b/libical/src/libical/icallexer.l @@ -6,7 +6,7 @@ DESCRIPTION: - $Id: icallexer.l,v 1.7 2000/12/12 22:54:40 danw Exp $ + $Id: icallexer.l,v 1.8 2001/01/23 20:22:33 jpr Exp $ $Locker: $ (C) COPYRIGHT 1999 Eric Busboom @@ -94,54 +94,7 @@ digit [0-9] %} -<binary_value>{ -.* { ical_yylval.v_string= icalmemory_tmp_copy(yytext); - return STRING;} -{crlf} { return EOL;} - -} - -<boolean_value>{ -. { return CHARACTER; } -{crlf} { return EOL;} - -} - -<uri_value>{ -.* { ical_yylval.v_string= icalmemory_tmp_copy(yytext); - return STRING;} -{crlf} { return EOL;} - -} - - <time_value>{ -{digit}* { ical_yylval.v_string= icalmemory_tmp_copy(yytext); - return DIGITS; } -T { return TIME_CHAR; } -Z { return UTC_CHAR; } -{crlf} { return EOL;} -. { return CHARACTER; } - -} - -<duration_value>{ -{digit}+ { ical_yylval.v_string =icalmemory_tmp_copy(yytext); - return DIGITS; } -T { return TIME_CHAR; } -[\+\-PTWHMSD] { return yytext[0]; } -{crlf} { return EOL;} - -} - -<number_value>{ -[\+\-\.0-9]+ { ical_yylval.v_int=atoi(yytext); return INTNUMBER; } -{crlf} { return EOL;} -. { return CHARACTER; } - -} - -<period_value>{ {digit}+ { ical_yylval.v_string =icalmemory_tmp_copy(yytext) ; return DIGITS; } T { return TIME_CHAR; } @@ -151,46 +104,6 @@ Z { return UTC_CHAR; } } -<recur_value>{ -INTERVAL { return INTERVAL; } -COUNT { return COUNT; } -UNTIL { return UNTIL; } -FREQ { return FREQ; } -BYDAY { return BYDAY; } -BYHOUR { return BYHOUR; } -BYMINUTE { return BYMINUTE; } -BYMONTH { return BYMONTH; } -BYMONTHDAY { return BYMONTHDAY; } -BYSECOND { return BYSECOND; } -BYSETPOS { return BYSETPOS; } -BYWEEKNO { return BYWEEKNO; } -BYYEARDAY { return BYYEARDAY; } -DAILY { return DAILY; } -SECONDLY { return SECONDLY; } -MINUTELY { return MINUTELY; } -HOURLY { return HOURLY; } -MONTHLY { return MONTHLY; } -WEEKLY { return WEEKLY; } -YEARLY { return YEARLY; } -WKST { return WKST; } -MO { return MO; } -SA { return SA; } -SU { return SU; } -TU { return TU; } -WE { return WE; } -TH { return TH; } -FR { return FR; } -= { return EQUALS; } -, { return COMMA; } -; { return SEMICOLON; } -- { return MINUS; } -[\+0-9]+ { ical_yylval.v_string= icalmemory_tmp_copy(yytext); - return DIGITS; } -T { return TIME_CHAR; } -Z { return UTC_CHAR; } -{crlf} { return EOL;} -} - <utcoffset_value>{ {crlf} { return EOL;} \-|\+ { return yytext[0]; } @@ -222,52 +135,14 @@ void set_parser_value_state(icalvalue_kind kind) switch (kind){ - case ICAL_ATTACH_VALUE: - case ICAL_BINARY_VALUE: - {BEGIN(binary_value);break;} - - case ICAL_BOOLEAN_VALUE: - case ICAL_INTEGER_VALUE: - case ICAL_FLOAT_VALUE: - {BEGIN(number_value);break;} - case ICAL_UTCOFFSET_VALUE: {BEGIN(utcoffset_value);break;} - case ICAL_TEXT_VALUE: - {BEGIN(text_value); - init_str_buf(); - break;} - - case ICAL_CALADDRESS_VALUE: - case ICAL_URI_VALUE: - {BEGIN(uri_value);break;} - - case ICAL_DATE_VALUE: - case ICAL_DATETIME_VALUE: - case ICAL_DATETIMEDATE_VALUE: case ICAL_DATETIMEPERIOD_VALUE: - case ICAL_TIME_VALUE: - {BEGIN(time_value);break;} - case ICAL_DURATION_VALUE: - {BEGIN(duration_value);break;} - case ICAL_PERIOD_VALUE: - {BEGIN(period_value);break;} - - case ICAL_GEO_VALUE: - case ICAL_QUERY_VALUE: - {BEGIN(text_value);break;} - - case ICAL_RECUR_VALUE: - {BEGIN(recur_value);break;} + {BEGIN(time_value);break;} - case ICAL_NO_VALUE: - { - /* The value is probably actually a component name */ - {BEGIN(component); break;} - } default: { assert(1==0); diff --git a/libical/src/libical/icalmemory.h b/libical/src/libical/icalmemory.h index 63ede3f3ac..3ae77024c4 100644 --- a/libical/src/libical/icalmemory.h +++ b/libical/src/libical/icalmemory.h @@ -5,6 +5,7 @@ $Id$ + $Locker$ This program is free software; you can redistribute it and/or modify diff --git a/libical/src/libical/icalparameter.c.in b/libical/src/libical/icalparameter.c.in index ad83927e87..00e9280c7d 100644 --- a/libical/src/libical/icalparameter.c.in +++ b/libical/src/libical/icalparameter.c.in @@ -3,7 +3,7 @@ FILE: icalderivedparameters.{c,h} CREATOR: eric 09 May 1999 - $Id: icalparameter.c.in,v 1.2 2000/12/14 02:13:54 federico Exp $ + $Id: icalparameter.c.in,v 1.3 2001/01/23 20:22:33 jpr Exp $ $Locker: $ @@ -233,7 +233,8 @@ void icalparameter_set_impl_data(icalparameter_kind kind, data->v_xlicerrortype=value; break; case ICAL_XLICCOMPARETYPE_PARAMETER: data->v_xliccomparetype=value; break; - default: + default: + break; } } @@ -750,7 +751,7 @@ icalparameter_as_ical_string (icalparameter* parameter) } - icalmemory_append_string(&buf, &buf_ptr, &buf_size, "="); + icalmemory_append_string(&buf, &buf_ptr, &buf_size, "="); switch (impl->kind) { case ICAL_CUTYPE_PARAMETER: @@ -1236,7 +1237,7 @@ icalproperty* icalparameter_get_parent(icalparameter* param) { struct icalparameter_impl *impl = (struct icalparameter_impl*)param; - icalerror_check_arg_rv( (param!=0),"param"); + icalerror_check_arg_rz( (param!=0),"param"); return impl->parent; } diff --git a/libical/src/libical/icalparser.c b/libical/src/libical/icalparser.c index 6359d42d27..462fd164af 100644 --- a/libical/src/libical/icalparser.c +++ b/libical/src/libical/icalparser.c @@ -70,7 +70,6 @@ struct icalparser_impl size_t tmp_buf_size; char temp[TMP_BUF_SIZE]; icalcomponent *root_component; - icalcomponent *tail; int version; int level; int lineno; @@ -203,7 +202,7 @@ void icalparser_clear_flex_input(void) input_buffer_p = input_buffer+strlen(input_buffer); } -/* Cal the flex parser to parse a complex value */ +/* Call the flex/bison parser to parse a complex value */ icalvalue* icalparser_parse_value(icalvalue_kind kind, const char* str, icalproperty** error) @@ -526,40 +525,52 @@ icalcomponent* icalparser_parse(icalparser *parser, char* line; icalcomponent *c=0; - icalcomponent *root_component=0; + icalcomponent *root=0; + struct icalparser_impl *impl = (struct icalparser_impl*)parser; icalerror_check_arg_rz((parser !=0),"parser"); do{ line = icalparser_get_line(parser, line_gen_func); + if ((c = icalparser_add_line(parser,line)) != 0){ - if (root_component == 0){ - /* Just one component */ - icalparser_claim(parser); - root_component = c; - } else if(icalcomponent_isa(root_component) - != ICAL_XROOT_COMPONENT) { - /*Got a second component, so move the two components under - an XROOT container */ - icalcomponent *tempc; - tempc = icalcomponent_new(ICAL_XROOT_COMPONENT); - icalcomponent_add_component(tempc, root_component); - icalparser_claim(parser); - icalcomponent_add_component(tempc, c); - root_component = tempc; - } else { - /* Already have an XROOT container, so add the component - to it*/ - icalcomponent_add_component(root_component, c); - icalparser_claim(parser); - } + + if(icalcomponent_get_parent(c) !=0){ + /* This is bad news... assert? */ + } + + assert(impl->root_component == 0); + assert(pvl_count(impl->components) ==0); + + if (root == 0){ + /* Just one component */ + root = c; + } else if(icalcomponent_isa(root) != ICAL_XROOT_COMPONENT) { + /*Got a second component, so move the two components under + an XROOT container */ + icalcomponent *tempc = icalcomponent_new(ICAL_XROOT_COMPONENT); + icalcomponent_add_component(tempc, root); + icalcomponent_add_component(tempc, c); + root = tempc; + } else if(icalcomponent_isa(root) == ICAL_XROOT_COMPONENT) { + /* Already have an XROOT container, so add the component + to it*/ + icalcomponent_add_component(root, c); + + } else { + /* Badness */ + assert(0); + } + + c = 0; + } if(line != 0){ free(line); } } while ( line != 0); - return root_component; + return root; } @@ -593,7 +604,7 @@ icalcomponent* icalparser_add_line(icalparser* parser, end = 0; str = icalparser_get_prop_name(line, &end); - if (str == 0){ + if (str == 0 || strlen(str) == 0 ){ /* Could not get a property name */ icalcomponent *tail = pvl_data(pvl_tail(impl->components)); @@ -638,20 +649,35 @@ icalcomponent* icalparser_add_line(icalparser* parser, impl->level--; str = icalparser_get_next_value(end,&end, value_kind); + /* Pop last component off of list and add it to the second-to-last*/ impl->root_component = pvl_pop(impl->components); tail = pvl_data(pvl_tail(impl->components)); if(tail != 0){ icalcomponent_add_component(tail,impl->root_component); - } + } tail = 0; /* Return the component if we are back to the 0th level */ if (impl->level == 0){ + icalcomponent *rtrn; + + if(pvl_count(impl->components) != 0){ + /* There are still components on the stack -- this means + that one of them did not have a proper "END" */ + pvl_push(impl->components,impl->root_component); + icalparser_clean(parser); /* may reset impl->root_component*/ + } + + assert(pvl_count(impl->components) == 0); + impl->state = ICALPARSER_SUCCESS; - return impl->root_component; + rtrn = impl->root_component; + impl->root_component = 0; + return rtrn; + } else { impl->state = ICALPARSER_END_COMP; return 0; @@ -893,10 +919,12 @@ icalcomponent* icalparser_add_line(icalparser* parser, /**************************************************************** * End of component parsing. *****************************************************************/ - + if (pvl_data(pvl_tail(impl->components)) == 0 && impl->level == 0){ + /* HACK. Does this clause ever get executed? */ impl->state = ICALPARSER_SUCCESS; + assert(0); return impl->root_component; } else { impl->state = ICALPARSER_IN_PROGRESS; @@ -912,29 +940,16 @@ icalparser_state icalparser_get_state(icalparser* parser) } -icalcomponent* icalparser_claim(icalparser* parser) -{ - struct icalparser_impl* impl = (struct icalparser_impl*) parser; - icalcomponent *c = impl->root_component; - - impl->root_component = 0; - - return c; - -} - - icalcomponent* icalparser_clean(icalparser* parser) { struct icalparser_impl* impl = (struct icalparser_impl*) parser; - icalcomponent *tail = pvl_data(pvl_tail(impl->components)); + icalcomponent *tail; icalerror_check_arg_rz((parser != 0 ),"parser"); /* We won't get a clean exit if some components did not have an "END" tag. Clear off any component that may be left in the list */ - while((tail=pvl_data(pvl_tail(impl->components))) != 0){ insert_error(tail," ", @@ -946,8 +961,13 @@ icalcomponent* icalparser_clean(icalparser* parser) tail=pvl_data(pvl_tail(impl->components)); if(tail != 0){ - icalcomponent_add_component(tail,impl->root_component); + if(icalcomponent_get_parent(impl->root_component)!=0){ + icalerror_warn("icalparser_clean is trying to attach a component for the second time"); + } else { + icalcomponent_add_component(tail,impl->root_component); + } } + } return impl->root_component; diff --git a/libical/src/libical/icalparser.h b/libical/src/libical/icalparser.h index 673d514f65..efbe86eb21 100644 --- a/libical/src/libical/icalparser.h +++ b/libical/src/libical/icalparser.h @@ -54,7 +54,6 @@ typedef enum 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); diff --git a/libical/src/libical/icalproperty.c.in b/libical/src/libical/icalproperty.c.in index 3b5cff835b..80fefd58ab 100644 --- a/libical/src/libical/icalproperty.c.in +++ b/libical/src/libical/icalproperty.c.in @@ -4,7 +4,7 @@ FILE: icalproperty.c CREATOR: eric 28 April 1999 - $Id: icalproperty.c.in,v 1.2 2000/12/14 02:13:54 federico Exp $ + $Id: icalproperty.c.in,v 1.3 2001/01/23 20:22:33 jpr Exp $ (C) COPYRIGHT 2000, Eric Busboom, http://www.softwarestudio.org @@ -376,7 +376,7 @@ icalproperty_add_parameter (icalproperty* prop,icalparameter* parameter) void icalproperty_set_parameter (icalproperty* prop,icalparameter* parameter) { - icalproperty_kind kind; + icalparameter_kind kind; kind = icalparameter_isa(parameter); diff --git a/libical/src/libical/icalrecur.c b/libical/src/libical/icalrecur.c index 6a9bfcd011..cfd8e2b33b 100644 --- a/libical/src/libical/icalrecur.c +++ b/libical/src/libical/icalrecur.c @@ -4,6 +4,7 @@ CREATOR: eric 16 May 2000 $Id$ + $Locker$ @@ -111,6 +112,16 @@ Finally, icalrecur_iterator_next() does a few other checks on the time value, and if it passes, it returns the time. + A note about the end_of_data flag. This flag is usually set early in + a next_* routine and returned in the end. The way it is used allows + the next_* routine to set the last time back to the first element in + a BYxx rule, and then signal to the higer level routine to increment + the next higher level. For instance. WITH FREQ=MONTHLY;BYDAY=TU,FR, + After next_weekday_by_month runs though both TU and FR, it sets the + week day back to TU and sets end_of_data. This signals next_month to + increment the month. + + ======================================================================*/ #ifdef HAVE_CONFIG_H @@ -120,22 +131,383 @@ #include "icalrecur.h" #ifdef ICAL_NO_LIBICAL -#include "icalerror.h" -#else #define icalerror_set_errno(x) #define icalerror_check_arg_rv(x,y) +#else +#include "icalerror.h" +#include "icalmemory.h" #endif #include <stdlib.h> /* for malloc */ #include <errno.h> /* for errno */ -#include <string.h> /* for strdup */ +#include <string.h> /* for strdup and strchr*/ #include <assert.h> +#include <stddef.h> /* For offsetof() macro */ #define TEMP_MAX 1024 +/*********************** Rule parsing routines ************************/ + +struct icalrecur_parser { + const char* rule; + char* copy; + char* this_clause; + char* next_clause; + + struct icalrecurrencetype rt; +}; + +const char* icalrecur_first_clause(struct icalrecur_parser *parser) +{ + char *idx; + parser->this_clause = parser->copy; + + idx = strchr(parser->this_clause,';'); + + if (idx == 0){ + parser->next_clause = 0; + return 0; + } + + *idx = 0; + idx++; + parser->next_clause = idx; + + return parser->this_clause; + +} + +const char* icalrecur_next_clause(struct icalrecur_parser *parser) +{ + char* idx; + + parser->this_clause = parser->next_clause; + + if(parser->this_clause == 0){ + return 0; + } + + idx = strchr(parser->this_clause,';'); + + if (idx == 0){ + parser->next_clause = 0; + } else { + + *idx = 0; + idx++; + parser->next_clause = idx; + } + + return parser->this_clause; + +} + +void icalrecur_clause_name_and_value(struct icalrecur_parser *parser, + char** name, char** value) +{ + char *idx; + + *name = parser->this_clause; + + idx = strchr(parser->this_clause,'='); + + if (idx == 0){ + *name = 0; + *value = 0; + return; + } + + *idx = 0; + idx++; + *value = idx; +} + +void icalrecur_add_byrules(struct icalrecur_parser *parser, short *array, + int size, char* vals) +{ + char *t, *n; + int i=0; + int sign = 1; + short v; + + n = vals; + + while(n != 0){ + + if(i == size){ + return; + } + + t = n; + + n = strchr(t,','); + + if(n != 0){ + *n = 0; + n++; + } + + /* Get optional sign. HACK. sign is not allowed for all BYxxx + rule parts */ + if( *t == '-'){ + sign = 1; + t++; + } else if (*t == '+'){ + sign = -1; + t++; + } + + v = atoi(t) * sign ; + + + array[i++] = v; + array[i] = ICAL_RECURRENCE_ARRAY_MAX; + + } + +} + +void icalrecur_add_bydayrules(struct icalrecur_parser *parser, const char* vals) +{ + + char *t, *n; + int i=0; + int sign = 1; + int weekno = 0; + icalrecurrencetype_weekday wd; + short *array = parser->rt.by_day; + char* end; + + end = (char*)vals+strlen(vals); + n = vals; + + while(n != 0){ + + + t = n; + + n = strchr(t,','); + + if(n != 0){ + *n = 0; + n++; + } + + /* Get optional sign. */ + if( *t == '-'){ + sign = -1; + t++; + } else if (*t == '+'){ + sign = 1; + t++; + } else { + sign = 1; + } + + weekno = 0; + /* Get Optional weekno */ + if( sscanf(t,"%d",&weekno) != 0){ + if (n != 0){ + int weeknolen = (n-t)-3; /* 3 -> one for \0, 2 for day name */ + /* could use abs(log10(weekno))+1, but that needs libm */ + t += weeknolen; + } else { + t = end -2; + } + } + + wd = icalrecur_string_to_weekday(t); + + array[i++] = sign* ((int)wd + 8*weekno); + array[i] = ICAL_RECURRENCE_ARRAY_MAX; + + } + +} + + +struct icalrecurrencetype icalrecurrencetype_from_string(const char* str) +{ + struct icalrecur_parser parser; + + memset(&parser,0,sizeof(parser)); + icalrecurrencetype_clear(&parser.rt); + + icalerror_check_arg_re(str!=0,"str",parser.rt); + + + /* Set up the parser struct */ + parser.rule = str; + parser.copy = strdup(parser.rule); + parser.this_clause = parser.copy; + + if(parser.copy == 0){ + icalerror_set_errno(ICAL_NEWFAILED_ERROR); + return parser.rt; + } + /* Loop through all of the clauses */ + for(icalrecur_first_clause(&parser); + parser.this_clause != 0; + icalrecur_next_clause(&parser)) + { + char *name, *value; + icalrecur_clause_name_and_value(&parser,&name,&value); + + if (strcmp(name,"FREQ") == 0){ + parser.rt.freq = icalrecur_string_to_recurrence(value); + } else if (strcmp(name,"COUNT") == 0){ + parser.rt.count = atoi(value); + } else if (strcmp(name,"UNTIL") == 0){ + parser.rt.until = icaltime_from_string(value); + } else if (strcmp(name,"INTERVAL") == 0){ + parser.rt.interval = atoi(value); + } else if (strcmp(name,"WKST") == 0){ + parser.rt.week_start = icalrecur_string_to_weekday(value); + } else if (strcmp(name,"BYSECOND") == 0){ + icalrecur_add_byrules(&parser,parser.rt.by_second, + ICAL_BY_SECOND_SIZE,value); + } else if (strcmp(name,"BYMINUTE") == 0){ + icalrecur_add_byrules(&parser,parser.rt.by_minute, + ICAL_BY_MINUTE_SIZE,value); + } else if (strcmp(name,"BYHOUR") == 0){ + icalrecur_add_byrules(&parser,parser.rt.by_hour, + ICAL_BY_HOUR_SIZE,value); + } else if (strcmp(name,"BYDAY") == 0){ + icalrecur_add_bydayrules(&parser,value); + } else if (strcmp(name,"BYMONTHDAY") == 0){ + icalrecur_add_byrules(&parser,parser.rt.by_month_day, + ICAL_BY_MONTHDAY_SIZE,value); + } else if (strcmp(name,"BYYEARDAY") == 0){ + icalrecur_add_byrules(&parser,parser.rt.by_year_day, + ICAL_BY_YEARDAY_SIZE,value); + } else if (strcmp(name,"BYWEEKNO") == 0){ + icalrecur_add_byrules(&parser,parser.rt.by_week_no, + ICAL_BY_WEEKNO_SIZE,value); + } else if (strcmp(name,"BYMONTH") == 0){ + icalrecur_add_byrules(&parser,parser.rt.by_month, + ICAL_BY_MONTH_SIZE,value); + } else if (strcmp(name,"BYSETPOS") == 0){ + icalrecur_add_byrules(&parser,parser.rt.by_set_pos, + ICAL_BY_SETPOS_SIZE,value); + } else { + /* error */ + } + + } + + free(parser.copy); + + return parser.rt; + +} + +#ifndef ICAL_NO_LIBICAL + +struct { char* str;size_t offset; short limit; } recurmap[] = +{ + {";BYSECOND=",offsetof(struct icalrecurrencetype,by_second),60}, + {";BYMINUTE=",offsetof(struct icalrecurrencetype,by_minute),60}, + {";BYHOUR=",offsetof(struct icalrecurrencetype,by_hour),24}, + {";BYDAY=",offsetof(struct icalrecurrencetype,by_day),7}, + {";BYMONTHDAY=",offsetof(struct icalrecurrencetype,by_month_day),31}, + {";BYYEARDAY=",offsetof(struct icalrecurrencetype,by_year_day),366}, + {";BYWEEKNO=",offsetof(struct icalrecurrencetype,by_week_no),52}, + {";BYMONTH=",offsetof(struct icalrecurrencetype,by_month),12}, + {";BYSETPOS=",offsetof(struct icalrecurrencetype,by_set_pos),366}, + {0,0,0}, +}; + +/* A private routine in icalvalue.c */ +void print_datetime_to_string(char* str, struct icaltimetype *data); + +char* icalrecurrencetype_as_string(struct icalrecurrencetype *recur) +{ + char* str; + char *str_p; + size_t buf_sz = 200; + char temp[20]; + int i,j; + + if(recur->freq == ICAL_NO_RECURRENCE){ + return 0; + } + str = (char*)icalmemory_tmp_buffer(buf_sz); + str_p = str; + + icalmemory_append_string(&str,&str_p,&buf_sz,"FREQ="); + icalmemory_append_string(&str,&str_p,&buf_sz, + icalrecur_recurrence_to_string(recur->freq)); + + if(recur->until.year != 0){ + + temp[0] = 0; + print_datetime_to_string(temp,&(recur->until)); + + icalmemory_append_string(&str,&str_p,&buf_sz,";UNTIL="); + icalmemory_append_string(&str,&str_p,&buf_sz, temp); + } + + if(recur->count != 0){ + sprintf(temp,"%d",recur->count); + icalmemory_append_string(&str,&str_p,&buf_sz,";COUNT="); + icalmemory_append_string(&str,&str_p,&buf_sz, temp); + } + + if(recur->interval != 0){ + sprintf(temp,"%d",recur->interval); + icalmemory_append_string(&str,&str_p,&buf_sz,";INTERVAL="); + icalmemory_append_string(&str,&str_p,&buf_sz, temp); + } + + for(j =0; recurmap[j].str != 0; j++){ + short* array = (short*)(recurmap[j].offset+ (size_t)recur); + short limit = recurmap[j].limit; + + /* Skip unused arrays */ + if( array[0] != ICAL_RECURRENCE_ARRAY_MAX ) { + + icalmemory_append_string(&str,&str_p,&buf_sz,recurmap[j].str); + + for(i=0; + i< limit && array[i] != ICAL_RECURRENCE_ARRAY_MAX; + i++){ + if (j == 3) { /* BYDAY */ + short dow = icalrecurrencetype_day_day_of_week(array[i]); + const char *daystr = icalrecur_weekday_to_string(dow); + short pos; + + pos = icalrecurrencetype_day_position(array[i]); + + if (pos == 1) + 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); + } + + if( (i+1)<limit &&array[i+1] + != ICAL_RECURRENCE_ARRAY_MAX){ + icalmemory_append_char(&str,&str_p,&buf_sz,','); + } + } + } + } + + return str; +} +#endif + + + +/************************* occurrence iteration routiens ******************/ enum byrule { NO_CONTRACTION = -1, @@ -156,7 +528,7 @@ struct icalrecur_iterator_impl { struct icaltimetype dtstart; /* Hack. Make into time_t */ struct icaltimetype last; /* last time return from _iterator_next*/ - int occurrence_no; /* number of step made on this iterator */ + int occurrence_no; /* number of step made on t iterator */ struct icalrecurrencetype rule; short days[366]; @@ -164,6 +536,7 @@ struct icalrecur_iterator_impl { enum byrule byrule; short by_indices[9]; + short orig_data[9]; /* 1 if there was data in the byrule */ short *by_ptrs[9]; /* Pointers into the by_* array elements of the rule */ @@ -306,6 +679,11 @@ void setup_defaults(struct icalrecur_iterator_impl* impl, int expand_year_days(struct icalrecur_iterator_impl* impl,short year); +int has_by_data(struct icalrecur_iterator_impl* impl, enum byrule byrule){ + + return (impl->orig_data[byrule] == 1); +} + icalrecur_iterator* icalrecur_iterator_new(struct icalrecurrencetype rule, struct icaltimetype dtstart) @@ -341,6 +719,27 @@ icalrecur_iterator* icalrecur_iterator_new(struct icalrecurrencetype rule, impl->by_ptrs[BY_SECOND]=impl->rule.by_second; impl->by_ptrs[BY_SET_POS]=impl->rule.by_set_pos; + memset(impl->orig_data,0,9); + + impl->orig_data[BY_MONTH] + = (impl->rule.by_month[0]!=ICAL_RECURRENCE_ARRAY_MAX); + impl->orig_data[BY_WEEK_NO] + =(impl->rule.by_week_no[0]!=ICAL_RECURRENCE_ARRAY_MAX); + impl->orig_data[BY_YEAR_DAY] + =(impl->rule.by_year_day[0]!=ICAL_RECURRENCE_ARRAY_MAX); + impl->orig_data[BY_MONTH_DAY] + =(impl->rule.by_month_day[0]!=ICAL_RECURRENCE_ARRAY_MAX); + impl->orig_data[BY_DAY] + = (impl->rule.by_day[0]!=ICAL_RECURRENCE_ARRAY_MAX); + impl->orig_data[BY_HOUR] + = (impl->rule.by_hour[0]!=ICAL_RECURRENCE_ARRAY_MAX); + impl->orig_data[BY_MINUTE] + = (impl->rule.by_minute[0]!=ICAL_RECURRENCE_ARRAY_MAX); + impl->orig_data[BY_SECOND] + = (impl->rule.by_second[0]!=ICAL_RECURRENCE_ARRAY_MAX); + impl->orig_data[BY_SET_POS] + = (impl->rule.by_set_pos[0]!=ICAL_RECURRENCE_ARRAY_MAX); + /* Check if the recurrence rule is legal */ @@ -400,7 +799,7 @@ icalrecur_iterator* icalrecur_iterator_new(struct icalrecurrencetype rule, /* Rewrite some of the rules and set up defaults to make later - processing easier. Primarily, this involves copying an element + processing easier. Primarily, t involves copying an element from the start time into the coresponding BY_* array when the BY_* array is empty */ @@ -420,9 +819,37 @@ icalrecur_iterator* icalrecur_iterator_new(struct icalrecurrencetype rule, setup_defaults(impl,BY_MONTH,ICAL_MONTHLY_RECURRENCE,impl->dtstart.month, &(impl->last.month)); - if(impl->rule.freq == ICAL_WEEKLY_RECURRENCE && - impl->by_ptrs[BY_DAY][0] == ICAL_RECURRENCE_ARRAY_MAX){ - impl->by_ptrs[BY_DAY][0] = icaltime_day_of_week(impl->dtstart); + if(impl->rule.freq == ICAL_WEEKLY_RECURRENCE ){ + + if(impl->by_ptrs[BY_DAY][0] == ICAL_RECURRENCE_ARRAY_MAX){ + + /* Weekly recurrences with no BY_DAY data should occur on the + same day of the week as the start time . */ + impl->by_ptrs[BY_DAY][0] = icaltime_day_of_week(impl->dtstart); + + } else { + /* If there is BY_DAY data, then we need to move the initial + time to the start of the BY_DAY data. That if if the + start time is on a Wednesday, and the rule has + BYDAY=MO,WE,FR, move the initial time back to + monday. Otherwise, jumping to the next week ( jumping 7 + days ahead ) will skip over some occurrences in the + second week. */ + + /* This is probably a HACK. There should be some more + general way to solve this problem */ + + short dow = impl->by_ptrs[BY_DAY][0]-icaltime_day_of_week(impl->last); + + if(dow < 0) { + /* initial time is after first day of BY_DAY data */ + + impl->last.day += dow; + impl->last = icaltime_normalize(impl->last); + } + } + + } @@ -430,6 +857,41 @@ icalrecur_iterator* icalrecur_iterator_new(struct icalrecurrencetype rule, expand_year_days(impl,impl->dtstart.year); } + + /* If this is a monthly interval with by day data, then we need to + set the last value to the appropriate day of the month */ + + if(impl->rule.freq == ICAL_MONTHLY_RECURRENCE && + has_by_data(impl,BY_DAY)) { + + short dow = icalrecurrencetype_day_day_of_week( + impl->by_ptrs[BY_DAY][impl->by_indices[BY_DAY]]); + short pos = icalrecurrencetype_day_position( + impl->by_ptrs[BY_DAY][impl->by_indices[BY_DAY]]); + + short poscount = 0; + short days_in_month = + icaltime_days_in_month(impl->last.month, impl->last.year) ; + + for(impl->last.day = 1; + impl->last.day <= days_in_month; + impl->last.day++){ + + if(icaltime_day_of_week(impl->last) == dow){ + if(++poscount == pos){ + break; + } + } + } + + if(impl->last.day > days_in_month){ + icalerror_set_errno(ICAL_USAGE_ERROR); + return 0; + } + + } + + return impl; } @@ -540,8 +1002,7 @@ void increment_second(struct icalrecur_iterator_impl* impl, int inc) } } -#if 0 - +#if 0 #include "ical.h" void test_increment() { @@ -812,11 +1273,10 @@ int next_yearday(struct icalrecur_iterator_impl* impl) } -/* This routine is only called by next_week or next_month, so it does -not have a clause for this_frequency. In both cases, it is certain -that BY_DAY has data */ +/* This routine is only called by next_week. It is certain that BY_DAY +has data */ -int next_weekday(struct icalrecur_iterator_impl* impl) +int next_weekday_by_week(struct icalrecur_iterator_impl* impl) { short end_of_data = 0; @@ -829,42 +1289,121 @@ int next_weekday(struct icalrecur_iterator_impl* impl) assert( impl->by_ptrs[BY_DAY][0]!=ICAL_RECURRENCE_ARRAY_MAX); - impl->by_indices[BY_DAY]++; - - if (impl->by_ptrs[BY_DAY][impl->by_indices[BY_DAY]] - ==ICAL_RECURRENCE_ARRAY_MAX){ - impl->by_indices[BY_DAY] = 0; + while(1) { + + impl->by_indices[BY_DAY]++; /* Look at next elem in BYDAY array */ - end_of_data = 1; - } + /* Are we at the end of the BYDAY array? */ + if (impl->by_ptrs[BY_DAY][impl->by_indices[BY_DAY]] + ==ICAL_RECURRENCE_ARRAY_MAX){ + + impl->by_indices[BY_DAY] = 0; /* Reset to 0 */ + end_of_data = 1; /* Signal that we're at the end */ + } + + /* Add the day of week offset to to the start of this week, and use + that to get the next day */ + dow = impl->by_ptrs[BY_DAY][impl->by_indices[BY_DAY]]; + start_of_week = icaltime_start_doy_of_week(impl->last); + + dow--; /*Sun is 1, not 0 */ - /* HACK. I don't think this handles the Nth day of week rules - correctly ( "BYDAY=2TU" ) */ - dow = impl->by_ptrs[BY_DAY][impl->by_indices[BY_DAY]]; - - start_of_week = icaltime_start_doy_of_week(impl->last); - next = icaltime_from_day_of_year(start_of_week + dow - 1,impl->last.year); + if(dow+start_of_week <1 && !end_of_data){ + /* The selected date is in the previous year. */ + continue; + } - impl->last.day = next.day; - impl->last.month = next.month; + next = icaltime_from_day_of_year(start_of_week + dow,impl->last.year); + + impl->last.day = next.day; + impl->last.month = next.month; + impl->last.year = next.year; - return end_of_data; + return end_of_data; + } } +int next_weekday_by_month(struct icalrecur_iterator_impl* impl) +{ + + short end_of_data = 0; + struct icaltimetype start_of_month; /* Start of month */ + short pos, poscount, dow, days_in_month; + + if (next_hour(impl) == 0){ + return 0; + } + + assert( impl->by_ptrs[BY_DAY][0]!=ICAL_RECURRENCE_ARRAY_MAX); + + while(1) { + impl->by_indices[BY_DAY]++; /* Look at next elem in BYDAY array */ + + /* Are we at the end of the BYDAY array? */ + if (impl->by_ptrs[BY_DAY][impl->by_indices[BY_DAY]] + ==ICAL_RECURRENCE_ARRAY_MAX){ + + impl->by_indices[BY_DAY] = 0; /* Reset to 0 */ + end_of_data = 1; /* Signal that we're at the end */ + } + + dow = icalrecurrencetype_day_day_of_week( + impl->by_ptrs[BY_DAY][impl->by_indices[BY_DAY]]); + pos = icalrecurrencetype_day_position( + impl->by_ptrs[BY_DAY][impl->by_indices[BY_DAY]]); + + start_of_month = impl->last; + + /* Find right day in month. HACK. Find an arithmetic way to do + this */ + + poscount = 0; + days_in_month = + icaltime_days_in_month(impl->last.month, impl->last.year) ; + + for(start_of_month.day = 1; + start_of_month.day <= days_in_month; + start_of_month.day++){ + + if(icaltime_day_of_week(start_of_month) == dow){ + if(++poscount == pos){ + break; + } + } + } + + if (!end_of_data == 1 && + ( + start_of_month.day > days_in_month || + icaltime_compare(start_of_month,impl->last) <= 0 + ) + ){ + continue; + } + + impl->last.day = start_of_month.day; + impl->last.month = start_of_month.month; + impl->last.year = start_of_month.year; + + return end_of_data; + } +} + int next_month(struct icalrecur_iterator_impl* impl) { - short has_by_data = (impl->by_ptrs[BY_MONTH][0]!=ICAL_RECURRENCE_ARRAY_MAX); short this_frequency = (impl->rule.freq == ICAL_MONTHLY_RECURRENCE); short end_of_data = 0; - assert(has_by_data || this_frequency); + assert( has_by_data(impl,BY_MONTH) || this_frequency); /* Week day data overrides monthday data */ - if(impl->by_ptrs[BY_DAY][0]!=ICAL_RECURRENCE_ARRAY_MAX){ - if (next_weekday(impl) == 0){ + if(has_by_data(impl,BY_DAY)){ + /* For this case, the weekdays are relative to the + month. BYDAY=FR -> First Friday in month, etc. */ + if (next_weekday_by_month(impl) == 0){ return 0; } } else { @@ -873,7 +1412,8 @@ int next_month(struct icalrecur_iterator_impl* impl) } } - if( has_by_data ){ + + if(has_by_data(impl,BY_MONTH) ){ /* Ignore the frequency and use the byrule data */ impl->by_indices[BY_MONTH]++; @@ -888,13 +1428,36 @@ int next_month(struct icalrecur_iterator_impl* impl) impl->last.month = impl->by_ptrs[BY_MONTH][impl->by_indices[BY_MONTH]]; - } else if( !has_by_data && this_frequency ){ - /* Compute the next value from the last time and the frequency interval*/ - increment_month(impl,impl->rule.interval); + } else if( !has_by_data(impl,BY_MONTH) && this_frequency ){ - } + if(has_by_data(impl,BY_DAY)){ - if(has_by_data && end_of_data && this_frequency ){ + short dayinc = 28; + + /* BY_DAY data specified a day of week, but incrementing the + month changes the day of the week -- Nov 2 is not the + same DOW as Oct 2. So, we need to fix the day of week by + incrementing in even weeks into the next month. . */ + + + if ( impl->last.day + dayinc + <= icaltime_days_in_month(impl->last.month, impl->last.year)){ + dayinc += 7; + } + + increment_monthday(impl,dayinc); + + } else { + + /* Compute the next value from the last time and the + frequency interval*/ + increment_month(impl,impl->rule.interval); + } + + } + + + if(has_by_data(impl,BY_MONTH) && end_of_data && this_frequency ){ increment_year(impl,1); } return end_of_data; @@ -908,16 +1471,14 @@ int next_week(struct icalrecur_iterator_impl* impl) short this_frequency = (impl->rule.freq == ICAL_WEEKLY_RECURRENCE); short end_of_data = 0; - int sec_in_week = 60*60*24*7; - if (next_weekday(impl) == 0){ + if (next_weekday_by_week(impl) == 0){ return 0; } if( impl->by_ptrs[BY_WEEK_NO][0]!=ICAL_RECURRENCE_ARRAY_MAX){ /* Use the Week Number byrule data */ int week_no; - time_t tt; struct icaltimetype t; impl->by_indices[BY_WEEK_NO]++; @@ -935,13 +1496,13 @@ int next_week(struct icalrecur_iterator_impl* impl) week_no = impl->by_ptrs[BY_WEEK_NO][impl->by_indices[BY_WEEK_NO]]; - tt = icaltime_as_timet(impl->last); - - tt+=sec_in_week*week_no; - - impl->last = icaltime_from_timet(tt,impl->last.is_date,impl->last.is_utc); + impl->last.day += week_no*7; + + impl->last = icaltime_normalize(impl->last); } else if( !has_by_data && this_frequency ){ + + increment_monthday(impl,7*impl->rule.interval); } @@ -953,10 +1514,6 @@ int next_week(struct icalrecur_iterator_impl* impl) } -int has_by_data(struct icalrecur_iterator_impl* impl, enum byrule byrule){ - - return (impl->by_ptrs[byrule][0] != ICAL_RECURRENCE_ARRAY_MAX); -} /* For INTERVAL=YEARLY, set up the days[] array in the iterator to @@ -970,10 +1527,13 @@ int expand_year_days(struct icalrecur_iterator_impl* impl,short year) struct icaltimetype t; + t.is_date = 1; /* Needed to make day_of_year routines work property */ + memset(&t,0,sizeof(t)); memset(impl->days,ICAL_RECURRENCE_ARRAY_MAX_BYTE,sizeof(impl->days)); - if(has_by_data(impl,BY_MONTH) && !has_by_data(impl,BY_MONTH_DAY)){ + if(has_by_data(impl,BY_MONTH) && !has_by_data(impl,BY_MONTH_DAY) + && !has_by_data(impl,BY_DAY)){ for(j=0;impl->by_ptrs[BY_MONTH][j]!=ICAL_RECURRENCE_ARRAY_MAX;j++){ struct icaltimetype t; @@ -983,6 +1543,7 @@ int expand_year_days(struct icalrecur_iterator_impl* impl,short year) t = impl->dtstart; t.year = year; t.month = month; + t.is_date = 1; doy = icaltime_day_of_year(t); @@ -1003,7 +1564,8 @@ int expand_year_days(struct icalrecur_iterator_impl* impl,short year) t.day = 1; t.year = year; t.month = month; - + t.is_date = 1; + for(t.day = 1; t.day <=days_in_month; t.day++){ short current_dow = icaltime_day_of_week(t); @@ -1034,6 +1596,7 @@ int expand_year_days(struct icalrecur_iterator_impl* impl,short year) t.day = month_day; t.month = month; t.year = year; + t.is_date = 1; doy = icaltime_day_of_year(t); @@ -1049,18 +1612,30 @@ int expand_year_days(struct icalrecur_iterator_impl* impl,short year) t.day = impl->dtstart.day; t.month = impl->dtstart.month; t.year = year; + t.is_date = 1; dow = icaltime_day_of_week(t); + /* HACK Not finished */ + } else if (has_by_data(impl,BY_WEEK_NO) && has_by_data(impl,BY_DAY)){ - + /* HACK Not finished */ } else if (has_by_data(impl,BY_YEAR_DAY)){ - + + for(j=0;impl->by_ptrs[BY_YEAR_DAY][j]!=ICAL_RECURRENCE_ARRAY_MAX;j++){ + short doy = impl->by_ptrs[BY_YEAR_DAY][j]; + impl->days[days_index++] = doy; + } + } else if (has_by_data(impl,BY_MONTH_DAY) ){ + /* HACK Not finished */ } else if (has_by_data(impl,BY_DAY)){ + /* HACK Not finished */ } else { + assert(0); + /* HACK Not finished */ } @@ -1124,7 +1699,6 @@ int check_restriction(struct icalrecur_iterator_impl* impl, int check_contracting_rules(struct icalrecur_iterator_impl* impl) { - enum byrule; int day_of_week=0; int week_no=0; @@ -1158,14 +1732,15 @@ struct icaltimetype icalrecur_iterator_next(icalrecur_iterator *itr) return icaltime_null_time(); } - if(impl->occurrence_no == 0){ + if(impl->occurrence_no == 0 + && icaltime_compare(impl->last,impl->dtstart) >= 0){ + impl->occurrence_no++; return impl->last; } - do { - switch(impl->rule.freq){ + switch(impl->rule.freq){ case ICAL_SECONDLY_RECURRENCE: { next_second(impl); @@ -1199,19 +1774,19 @@ struct icaltimetype icalrecur_iterator_next(icalrecur_iterator *itr) assert(0); /* HACK, need a better error */ } } - + if(impl->last.year >= 2038){ /* HACK */ return icaltime_null_time(); } - } while(!check_contracting_rules(impl) || icaltime_compare(impl->last,impl->dtstart) < 0); - - + + +/* Ignore null times and times that are after the until time */ if( !icaltime_is_null_time(impl->rule.until) && - icaltime_compare(impl->last,impl->rule.until) > 0) { + icaltime_compare(impl->last,impl->rule.until) > 0 ) { return icaltime_null_time(); } @@ -1252,7 +1827,17 @@ enum icalrecurrencetype_weekday icalrecurrencetype_day_day_of_week(short day) short icalrecurrencetype_day_position(short day) { - return (day-icalrecurrencetype_day_day_of_week(day))/8; + short wd, pos; + + wd = icalrecurrencetype_day_day_of_week(day); + + pos = (abs(day)-wd)/8 * ((day<0)?-1:1); + + if(pos == 0){ + pos = 1; + } + + return pos; } @@ -1283,6 +1868,20 @@ const char* icalrecur_weekday_to_string(icalrecurrencetype_weekday kind) return 0; } +icalrecurrencetype_weekday icalrecur_string_to_weekday(const char* str) +{ + int i; + + for (i=0; wd_map[i].wd != ICAL_NO_WEEKDAY; i++) { + if ( strcmp(str,wd_map[i].str) == 0){ + return wd_map[i].wd; + } + } + + return ICAL_NO_WEEKDAY; +} + + struct { icalrecurrencetype_frequency kind; @@ -1310,4 +1909,48 @@ const char* icalrecur_recurrence_to_string(icalrecurrencetype_frequency kind) return 0; } +icalrecurrencetype_frequency icalrecur_string_to_recurrence(const char* str) +{ + int i; + + for (i=0; freq_map[i].kind != ICAL_NO_RECURRENCE ; i++) { + if ( strcmp(str,freq_map[i].str) == 0){ + return freq_map[i].kind; + } + } + return ICAL_NO_RECURRENCE; +} + + +int icalrecur_expand_recurrence(char* rule, time_t start, + int count, time_t* array) +{ + struct icalrecurrencetype recur; + icalrecur_iterator* ritr; + time_t tt; + struct icaltimetype icstart, next; + int i = 0; + + memset(array, 0, count*sizeof(time_t)); + + icstart = icaltime_from_timet(start,0); + + recur = icalrecurrencetype_from_string(rule); + for(ritr = icalrecur_iterator_new(recur,icstart), + next = icalrecur_iterator_next(ritr); + !icaltime_is_null_time(next) && i < count; + next = icalrecur_iterator_next(ritr)){ + + tt = icaltime_as_timet(next); + + if (tt >= start ){ + array[i++] = tt; + } + + } + + icalrecur_iterator_free(ritr); + + return 1; +} diff --git a/libical/src/libical/icalrestriction.h b/libical/src/libical/icalrestriction.h index 409334cf28..6d414db4af 100644 --- a/libical/src/libical/icalrestriction.h +++ b/libical/src/libical/icalrestriction.h @@ -6,6 +6,7 @@ $Id$ + (C) COPYRIGHT 2000, Eric Busboom, http://www.softwarestudio.org This program is free software; you can redistribute it and/or modify diff --git a/libical/src/libical/icaltime.c b/libical/src/libical/icaltime.c index 112ac7972b..8169161dee 100644 --- a/libical/src/libical/icaltime.c +++ b/libical/src/libical/icaltime.c @@ -30,47 +30,223 @@ #endif #include "icaltime.h" -#include "icalvalue.h" #include <assert.h> #include <string.h> #include <stdlib.h> #include <stdio.h> +#ifdef ICAL_NO_LIBICAL +#define icalerror_set_errno(x) +#define icalerror_check_arg_rv(x,y) +#define icalerror_check_arg_re(x,y,z) +#else +#include "icalerror.h" +#include "icalmemory.h" +#endif + + + +extern long int timezone; /* Global defined by libc */ struct icaltimetype -icaltime_from_timet(time_t tm, int is_date, int is_utc) +icaltime_from_timet(time_t tm, int is_date) { - struct icaltimetype tt; + struct icaltimetype tt = icaltime_null_time(); struct tm t; -#if 0 /* This is incorrect; a time_t *is* in UTC by definition. So we just ignore the flag. */ - if(is_utc == 0){ - tm += icaltime_local_utc_offset(); - } -#endif - t = *(gmtime(&tm)); + + if(is_date == 0){ + tt.second = t.tm_sec; + tt.minute = t.tm_min; + tt.hour = t.tm_hour; + } else { + tt.second = tt.minute =tt.hour = 0 ; + } - tt.second = t.tm_sec; - tt.minute = t.tm_min; - tt.hour = t.tm_hour; tt.day = t.tm_mday; tt.month = t.tm_mon + 1; tt.year = t.tm_year+ 1900; -#if 0 - tt.is_utc = is_utc; -#endif tt.is_utc = 1; tt.is_date = is_date; return tt; } -/* Always returns time in UTC */ +char* set_tz(const char* tzid) +{ + char *tzstr = 0; + char *tmp; + + /* Put the new time zone into the environment */ + if(getenv("TZ") != 0){ + tzstr = (char*)strdup(getenv("TZ")); + + if(tzstr == 0){ + icalerror_set_errno(ICAL_NEWFAILED_ERROR); + return 0; + } + } + + tmp = (char*)malloc(1024); + + if(tmp == 0){ + icalerror_set_errno(ICAL_NEWFAILED_ERROR); + return 0; + } + + snprintf(tmp,1024,"TZ=%s",tzid); + + /* HACK. In some libc versions, putenv gives the string to the + system and in some it gives a copy, so the following might be a + memory leak. THe linux man page says that glibc2.1.2 take + ownership ( no leak) while BSD4.4 uses a copy ( A leak ) */ + putenv(tmp); + + return tzstr; /* This will be zero if the TZ env var was not set */ +} + +void unset_tz(char* tzstr) +{ + /* restore the original environment */ + + if(tzstr!=0){ + char temp[1024]; + snprintf(temp,1024,"TZ=%s",tzstr); + putenv(temp); + free(tzstr); + } else { + putenv("TZ"); /* Delete from environment */ + } +} + time_t icaltime_as_timet(struct icaltimetype tt) { struct tm stm; + time_t t; + + memset(&stm,0,sizeof( struct tm)); + + if(icaltime_is_null_time(tt)) { + return 0; + } + + stm.tm_sec = tt.second; + stm.tm_min = tt.minute; + stm.tm_hour = tt.hour; + stm.tm_mday = tt.day; + stm.tm_mon = tt.month-1; + stm.tm_year = tt.year-1900; + stm.tm_isdst = -1; + + if(tt.is_utc == 1 || tt.is_date == 1){ + char* old_tz = set_tz("UTC"); + t = mktime(&stm); + unset_tz(old_tz); + } else { + t = mktime(&stm); + } + + return t; + +} + +char* icaltime_as_ical_string(struct icaltimetype tt) +{ + size_t size = 17; + char* buf = icalmemory_new_buffer(size); + + if(tt.is_date){ + snprintf(buf, size,"%04d%02d%02d",tt.year,tt.month,tt.day); + } else { + char* fmt; + if(tt.is_utc){ + fmt = "%04d%02d%02dT%02d%02d%02dZ"; + } else { + fmt = "%04d%02d%02dT%02d%02d%02d"; + } + snprintf(buf, size,fmt,tt.year,tt.month,tt.day, + tt.hour,tt.minute,tt.second); + } + + icalmemory_add_tmp_buffer(buf); + + return buf; + +} + + +/* convert tt, of timezone tzid, into a utc time */ +struct icaltimetype icaltime_as_utc(struct icaltimetype tt,const char* tzid) +{ + int tzid_offset; + + if(tt.is_utc == 1 || tt.is_date == 1){ + return tt; + } + + tzid_offset = icaltime_utc_offset(tt,tzid); + + tt.second -= tzid_offset; + + tt.is_utc = 1; + + return icaltime_normalize(tt); +} + +/* convert tt, a time in UTC, into a time in timezone tzid */ +struct icaltimetype icaltime_as_zone(struct icaltimetype tt,const char* tzid) +{ + int tzid_offset; + + tzid_offset = icaltime_utc_offset(tt,tzid); + + tt.second += tzid_offset; + + tt.is_utc = 0; + + return icaltime_normalize(tt); + +} + + +/* Return the offset of the named zone as seconds. tt is a time + indicating the date for which you want the offset */ +int icaltime_utc_offset(struct icaltimetype ictt, const char* tzid) +{ + + time_t tt = icaltime_as_timet(ictt); + time_t offset_tt; + struct tm gtm; + + char *tzstr = 0; + + if(tzid != 0){ + tzstr = set_tz(tzid); + } + + /* Mis-interpret a UTC broken out time as local time */ + gtm = *(gmtime(&tt)); + gtm.tm_isdst = localtime(&tt)->tm_isdst; + offset_tt = mktime(>m); + + if(tzid != 0){ + unset_tz(tzstr); + } + + return tt-offset_tt; +} + + + +/* Normalize by converting from localtime to utc and back to local + time. This uses localtime because localtime and mktime are inverses + of each other */ + +struct icaltimetype icaltime_normalize(struct icaltimetype tt) +{ + struct tm stm; time_t tut; memset(&stm,0,sizeof( struct tm)); @@ -87,29 +263,71 @@ time_t icaltime_as_timet(struct icaltimetype tt) if(tt.is_utc) stm.tm_sec -= icaltime_local_utc_offset(); + tut = mktime(&stm); - return tut; + stm = *(localtime(&tut)); + + tt.second = stm.tm_sec; + tt.minute = stm.tm_min; + tt.hour = stm.tm_hour; + tt.day = stm.tm_mday; + tt.month = stm.tm_mon +1; + tt.year = stm.tm_year+1900; + + return tt; } +#ifndef ICAL_NO_LIBICAL +#include "icalvalue.h" struct icaltimetype icaltime_from_string(const char* str) { - struct icaltimetype tt; - icalvalue *v = icalvalue_new_from_string(ICAL_DATETIME_VALUE,str); - - if (v == 0){ + struct icaltimetype tt = icaltime_null_time(); + int size; + + icalerror_check_arg_re(str!=0,"str",icaltime_null_time()); + + size = strlen(str); + + if(size == 15) { /* floating time */ + tt.is_utc = 0; + tt.is_date = 0; + } else if (size == 16) { /* UTC time, ends in 'Z'*/ + tt.is_utc = 1; + tt.is_date = 0; + + if(str[15] != 'Z'){ + icalerror_set_errno(ICAL_MALFORMEDDATA_ERROR); + return icaltime_null_time(); + } + + } else if (size == 8) { /* A DATE */ + tt.is_utc = 0; + tt.is_date = 1; + } else { /* error */ + icalerror_set_errno(ICAL_MALFORMEDDATA_ERROR); return icaltime_null_time(); } - tt = icalvalue_get_datetime(v); + if(tt.is_date == 1){ + sscanf(str,"%04d%02d%02d",&tt.year,&tt.month,&tt.day); + } else { + char tsep; + sscanf(str,"%04d%02d%02d%c%02d%02d%02d",&tt.year,&tt.month,&tt.day, + &tsep,&tt.hour,&tt.minute,&tt.second); - icalvalue_free(v); + if(tsep != 'T'){ + icalerror_set_errno(ICAL_MALFORMEDDATA_ERROR); + return icaltime_null_time(); + } - return tt; - + } + + return tt; } +#endif char ctime_str[20]; char* icaltime_as_ctime(struct icaltimetype t) @@ -128,6 +346,7 @@ 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) { + int is_leap =0; int days = days_in_month[month]; @@ -152,7 +371,11 @@ short icaltime_day_of_week(struct icaltimetype t){ time_t tt = icaltime_as_timet(t); struct tm *tm; - tm = gmtime(&tt); + if(t.is_utc == 1){ + tm = gmtime(&tt); + } else { + tm = localtime(&tt); + } return tm->tm_wday+1; } @@ -161,26 +384,50 @@ short icaltime_start_doy_of_week(struct icaltimetype t){ time_t tt = icaltime_as_timet(t); time_t start_tt; struct tm *stm; + int syear; stm = gmtime(&tt); + syear = stm->tm_year; start_tt = tt - stm->tm_wday*(60*60*24); stm = gmtime(&start_tt); + + if(syear == stm->tm_year){ + return stm->tm_yday+1; + } else { + /* return negative to indicate that start of week is in + previous year. */ + int is_leap = 0; + int year = stm->tm_year; - return stm->tm_yday; + if( (year % 4 == 0 && year % 100 != 0) || + year % 400 == 0){ + is_leap =1; + } + + return (stm->tm_yday+1)-(365+is_leap); + } + } + + short icaltime_day_of_year(struct icaltimetype t){ time_t tt = icaltime_as_timet(t); struct tm *stm; - stm = gmtime(&tt); + if(t.is_utc==1){ + stm = gmtime(&tt); + } else { + stm = localtime(&tt); + } - return stm->tm_yday; + return stm->tm_yday+1; } +/* Jan 1 is day #1, not 0 */ struct icaltimetype icaltime_from_day_of_year(short doy, short year) { struct tm stm; @@ -195,9 +442,10 @@ struct icaltimetype icaltime_from_day_of_year(short doy, short year) /* Now add in the days */ + doy--; tt += doy *60*60*24; - return icaltime_from_timet(tt, 1, 1); + return icaltime_from_timet(tt, 1); } struct icaltimetype icaltime_null_time() @@ -255,102 +503,83 @@ icaltime_compare_date_only (struct icaltimetype a, struct icaltimetype b) } } -/* convert tt, of timezone tzid, into a utc time */ -struct icaltimetype icaltime_as_utc(struct icaltimetype tt,const char* tzid) +struct icalperiodtype icalperiodtype_from_string (const char* str) { - time_t offset, tm; - struct icaltimetype utc; + + struct icalperiodtype p, null_p; + char *s = strdup(str); + char *start, *end = s; + int old_ieaf = icalerror_errors_are_fatal; - offset = icaltime_utc_offset(tt,tzid); - tm = icaltime_as_timet(tt); + p.start = p.end = icaltime_null_time(); + p.duration = icaldurationtype_from_int(0); - tm += offset; + null_p = p; - utc = icaltime_from_timet(tm,0,0); + if(s == 0) goto error; - return utc; -} + start = s; + end = strchr(s, '/'); -/* 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; + if(end == 0) goto error; - offset = icaltime_utc_offset(tt,tzid); - tm = icaltime_as_timet(tt); + *end = 0; + end++; - tm -= offset; - - zone = icaltime_from_timet(tm,0,0); + p.start = icaltime_from_string(start); - return zone; + if (icaltime_is_null_time(p.start)) goto error; + + icalerror_errors_are_fatal = 0; + p.end = icaltime_from_string(end); + icalerror_errors_are_fatal = old_ieaf; -} + if (icaltime_is_null_time(p.end)){ -/* 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) -{ -#ifdef HAVE_TIMEZONE - extern long int timezone; -#endif - time_t now; - struct tm *stm; + p.duration = icaldurationtype_from_string(end); - char *tzstr = 0; - char *tmp; + if(icaldurationtype_as_int(p.duration) == 0) goto error; + } - /* Put the new time zone into the environment */ - if(getenv("TZ") != 0){ - tzstr = (char*)strdup(getenv("TZ")); - } + return p; - tmp = (char*)malloc(1024); - snprintf(tmp,1024,"TZ=%s",tzid); + error: + icalerror_set_errno(ICAL_MALFORMEDDATA_ERROR); + return null_p; +} - putenv(tmp); - /* Get the offset */ +const char* icalperiodtype_as_ical_string(struct icalperiodtype p) +{ - now = icaltime_as_timet(tt); + const char* start; + const char* end; - stm = localtime(&now); /* This sets 'timezone'*/ + char *buf; + size_t buf_size = 40; + char* buf_ptr = 0; - /* restore the original environment */ + buf = (char*)icalmemory_new_buffer(buf_size); + buf_ptr = buf; + - if(tzstr!=0){ - putenv(tzstr); + start = icaltime_as_ical_string(p.start); + + icalmemory_append_string(&buf, &buf_ptr, &buf_size, start); + + if(!icaltime_is_null_time(p.end)){ + end = icaltime_as_ical_string(p.end); } else { - putenv("TZ"); /* Delete from environment */ + end = icaldurationtype_as_ical_string(p.duration); } - -#ifdef HAVE_TIMEZONE - return timezone; -#else - return -stm->tm_gmtoff; -#endif -} -time_t icaltime_local_utc_offset() -{ - time_t now; - struct tm *stm; + icalmemory_append_char(&buf, &buf_ptr, &buf_size, '/'); - stm = localtime(&now); /* This sets 'timezone'*/ + icalmemory_append_string(&buf, &buf_ptr, &buf_size, end); -#ifdef HAVE_TIMEZONE - return timezone; -#else - return -stm->tm_gmtoff; -#endif + return buf; } - - - - - time_t icalperiodtype_duration (struct icalperiodtype period); @@ -360,20 +589,21 @@ icalperiodtype_end (struct icalperiodtype period); /* From Russel Steinthal */ -time_t icaldurationtype_as_timet(struct icaldurationtype dur) +int icaldurationtype_as_int(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)); + return (int)( (dur.seconds + + (60 * dur.minutes) + + (60 * 60 * dur.hours) + + (60 * 60 * 24 * dur.days) + + (60 * 60 * 24 * 7 * dur.weeks)) + * (dur.is_neg==1? -1 : 1) ) ; } /* From Seth Alves, <alves@hungry.com> */ -struct icaldurationtype icaldurationtype_from_timet(time_t t) +struct icaldurationtype icaldurationtype_from_int(int t) { struct icaldurationtype dur; - time_t used = 0; + int used = 0; dur.weeks = (t - used) / (60 * 60 * 24 * 7); used += dur.weeks * (60 * 60 * 24 * 7); @@ -385,33 +615,209 @@ struct icaldurationtype icaldurationtype_from_timet(time_t t) used += dur.minutes * (60); dur.seconds = (t - used); + dur.is_neg = t<0? 1 : 0; + return dur; } +#ifndef ICAL_NO_LIBICAL +#include "icalvalue.h" struct icaldurationtype icaldurationtype_from_string(const char* str) { - icalvalue *v = icalvalue_new_from_string(ICAL_DURATION_VALUE,str); + int i; + int begin_flag = 0; + int time_flag = 0; + int date_flag = 0; + int week_flag = 0; + int digits=-1; + int scan_size = -1; + int size = strlen(str); + char p; + struct icaldurationtype d; + + memset(&d, 0, sizeof(struct icaldurationtype)); + + for(i=0;i != size;i++){ + p = str[i]; + + switch(p) + { + case '-': { + if(i != 0 || begin_flag == 1) goto error; + + d.is_neg = 1; + break; + } + + case 'P': { + if (i != 0 && i !=1 ) goto error; + begin_flag = 1; + break; + } + + case 'T': { + time_flag = 1; + break; + } + + case '0': + case '1': + case '2': + case '3': + case '4': + case '5': + case '6': + case '7': + case '8': + case '9': + { + + /* HACK. Skip any more digits if the l;ast one + read has not been assigned */ + if(digits != -1){ + break; + } + + if (begin_flag == 0) goto error; + /* Get all of the digits, not one at a time */ + scan_size = sscanf((char*)(str+i),"%d",&digits); + if(scan_size == 0) goto error; + break; + } + + case 'H': { + if (time_flag == 0||week_flag == 1||d.hours !=0||digits ==-1) + goto error; + d.hours = digits; digits = -1; + break; + } + case 'M': { + if (time_flag == 0||week_flag==1||d.minutes != 0||digits ==-1) + goto error; + d.minutes = digits; digits = -1; + break; + } + case 'S': { + if (time_flag == 0||week_flag==1||d.seconds!=0||digits ==-1) + goto error; + d.seconds = digits; digits = -1; + break; + } + case 'W': { + if (time_flag==1||date_flag==1||d.weeks!=0||digits ==-1) + goto error; + week_flag = 1; + d.weeks = digits; digits = -1; + break; + } + case 'D': { + if (time_flag==1||week_flag==1||d.days!=0||digits ==-1) + goto error; + date_flag = 1; + d.days = digits; digits = -1; + break; + } + default: { + goto error; + } + + } + } + + return d; + + + error: + icalerror_set_errno(ICAL_MALFORMEDDATA_ERROR); + memset(&d, 0, sizeof(struct icaldurationtype)); + return d; + +} + +#define TMP_BUF_SIZE 1024 +void append_duration_segment(char** buf, char** buf_ptr, size_t* buf_size, + char* sep, unsigned int value) { + + char temp[TMP_BUF_SIZE]; + + sprintf(temp,"%d",value); + + icalmemory_append_string(buf, buf_ptr, buf_size, temp); + icalmemory_append_string(buf, buf_ptr, buf_size, sep); + +} + +char* icaldurationtype_as_ical_string(struct icaldurationtype d) +{ - if( v !=0){ - return icalvalue_get_duration(v); + char *buf, *output_line; + size_t buf_size = 256; + char* buf_ptr = 0; + int seconds; + + buf = (char*)icalmemory_new_buffer(buf_size); + buf_ptr = buf; + + + seconds = icaldurationtype_as_int(d); + + if(seconds !=0){ + + if(d.is_neg == 1){ + icalmemory_append_char(&buf, &buf_ptr, &buf_size, '-'); + } + + icalmemory_append_char(&buf, &buf_ptr, &buf_size, 'P'); + + if (d.weeks != 0 ) { + append_duration_segment(&buf, &buf_ptr, &buf_size, "W", d.weeks); + } + + if (d.days != 0 ) { + append_duration_segment(&buf, &buf_ptr, &buf_size, "D", d.days); + } + + if (d.hours != 0 || d.minutes != 0 || d.seconds != 0) { + + icalmemory_append_string(&buf, &buf_ptr, &buf_size, "T"); + + if (d.hours != 0 ) { + append_duration_segment(&buf, &buf_ptr, &buf_size, "H", d.hours); + } + if (d.minutes != 0 ) { + append_duration_segment(&buf, &buf_ptr, &buf_size, "M", + d.minutes); + } + if (d.seconds != 0 ) { + append_duration_segment(&buf, &buf_ptr, &buf_size, "S", + d.seconds); + } + + } } else { - struct icaldurationtype dur; - memset(&dur,0,sizeof(struct icaldurationtype)); - return dur; + icalmemory_append_string(&buf, &buf_ptr, &buf_size, "PTS0"); } + output_line = icalmemory_tmp_copy(buf); + icalmemory_free_buffer(buf); + + return output_line; + } +#endif struct icaltimetype icaltime_add(struct icaltimetype t, struct icaldurationtype d) { - time_t tt = icaltime_as_timet(t); - time_t dt = icaldurationtype_as_timet(d); + int dt = icaldurationtype_as_int(d); + + t.second += dt; - return icaltime_from_timet(tt + dt, t.is_date, t.is_utc); + t = icaltime_normalize(t); + return t; } struct icaldurationtype icaltime_subtract(struct icaltimetype t1, @@ -421,7 +827,7 @@ struct icaldurationtype icaltime_subtract(struct icaltimetype t1, time_t t1t = icaltime_as_timet(t1); time_t t2t = icaltime_as_timet(t2); - return icaldurationtype_from_timet(t1t-t2t); + return icaldurationtype_from_int(t1t-t2t); } diff --git a/libical/src/libical/icaltime.h b/libical/src/libical/icaltime.h index 64617e578d..d624041c29 100644 --- a/libical/src/libical/icaltime.h +++ b/libical/src/libical/icaltime.h @@ -5,6 +5,7 @@ $Id$ + $Locker$ (C) COPYRIGHT 2000, Eric Busboom, http://www.softwarestudio.org @@ -50,8 +51,38 @@ struct icaltimetype int is_utc; /* 1-> time is in UTC timezone */ int is_date; /* 1 -> interpret this as date. */ + + const char* zone; /*Ptr to Olsen placename. Libical does not own mem*/ }; +/* Convert seconds past UNIX epoch to a timetype*/ +struct icaltimetype icaltime_from_timet(time_t v, int is_date); +time_t icaltime_as_timet(struct icaltimetype); +char* icaltime_as_ical_string(struct icaltimetype tt); + +/* Like icaltime_from_timet(), except that the input may be in seconds + past the epoch in floating time */ +struct icaltimetype icaltime_from_int(int v, int is_date, int is_utc); +int icaltime_as_int(struct icaltimetype); + +/* create a time from an ISO format string */ +struct icaltimetype icaltime_from_string(const char* str); + +/* 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 */ +int icaltime_utc_offset(struct icaltimetype tt, const char* tzid); + +/* convert tt, of timezone tzid, into a utc time. Does nothing if the + time is already UTC. */ +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 icaltimetype icaltime_null_time(void); int icaltime_is_null_time(struct icaltimetype t); @@ -64,9 +95,6 @@ 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); @@ -80,22 +108,6 @@ 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 { @@ -107,9 +119,10 @@ struct icaldurationtype unsigned int seconds; }; -struct icaldurationtype icaldurationtype_from_timet(time_t t); +struct icaldurationtype icaldurationtype_from_int(int t); struct icaldurationtype icaldurationtype_from_string(const char*); -time_t icaldurationtype_as_timet(struct icaldurationtype duration); +int icaldurationtype_as_int(struct icaldurationtype duration); +char* icaldurationtype_as_ical_string(struct icaldurationtype d); struct icalperiodtype @@ -119,6 +132,9 @@ struct icalperiodtype struct icaldurationtype duration; }; +struct icalperiodtype icalperiodtype_from_string (const char* str); +const char* icalperiodtype_as_ical_string(struct icalperiodtype p); + time_t icalperiodtype_duration(struct icalperiodtype period); time_t icalperiodtype_end(struct icalperiodtype period); diff --git a/libical/src/libical/icaltypes.c b/libical/src/libical/icaltypes.c index e726904fcf..4afc8916bb 100644 --- a/libical/src/libical/icaltypes.c +++ b/libical/src/libical/icaltypes.c @@ -4,6 +4,7 @@ CREATOR: eric 16 May 1999 $Id$ + $Locker$ @@ -149,6 +150,42 @@ void* icalattachtype_get_binary(struct icalattachtype* v) } +struct icaltriggertype icaltriggertype_from_string(const char* str) +{ + + + struct icaltriggertype tr, null_tr; + int old_ieaf = icalerror_errors_are_fatal; + + tr.time= icaltime_null_time(); + tr.duration = icaldurationtype_from_int(0); + + null_tr = tr; + + if(str == 0) goto error; + + + icalerror_errors_are_fatal = 0; + + tr.time = icaltime_from_string(str); + + icalerror_errors_are_fatal = old_ieaf; + + if (icaltime_is_null_time(tr.time)){ + + tr.duration = icaldurationtype_from_string(str); + + if(icaldurationtype_as_int(tr.duration) == 0) goto error; + } + + return tr; + + error: + icalerror_set_errno(ICAL_MALFORMEDDATA_ERROR); + return null_tr; + +} + struct icalreqstattype icalreqstattype_from_string(char* str) { diff --git a/libical/src/libical/icaltypes.h b/libical/src/libical/icaltypes.h index d2a106883b..ef4f874064 100644 --- a/libical/src/libical/icaltypes.h +++ b/libical/src/libical/icaltypes.h @@ -67,15 +67,13 @@ struct icalgeotype float lon; }; - - -union icaltriggertype +struct icaltriggertype { struct icaltimetype time; struct icaldurationtype duration; }; - +struct icaltriggertype icaltriggertype_from_string(const char* str); /* struct icalreqstattype. This struct contains two string pointers, but don't try to free either of them. The "desc" string is a pointer diff --git a/libical/src/libical/icalvalue.c.in b/libical/src/libical/icalvalue.c.in index ae48207f42..cdcd12ba83 100644 --- a/libical/src/libical/icalvalue.c.in +++ b/libical/src/libical/icalvalue.c.in @@ -3,7 +3,7 @@ FILE: icalvalue.c CREATOR: eric 02 May 1999 - $Id: icalvalue.c.in,v 1.2 2001/01/19 14:55:26 jpr Exp $ + $Id: icalvalue.c.in,v 1.3 2001/01/23 20:22:33 jpr Exp $ (C) COPYRIGHT 2000, Eric Busboom, http://www.softwarestudio.org @@ -91,7 +91,7 @@ struct icalvalue_impl { a reference*/ struct icalrecurrencetype *v_recur; - union icaltriggertype v_trigger; + struct icaltriggertype v_trigger; icalproperty_method v_method; icalproperty_status v_status; @@ -197,7 +197,7 @@ icalvalue* icalvalue_new_clone(icalvalue* value){ char* icalmemory_strdup_and_dequote(const char* str) { - char* p; + const char* p; char* out = (char*)malloc(sizeof(char) * strlen(str) +1); char* pout; @@ -215,8 +215,9 @@ char* icalmemory_strdup_and_dequote(const char* str) switch(*p){ case 0: { - break; *pout = '\0'; + break; + } case 'n': { @@ -417,18 +418,56 @@ icalvalue* icalvalue_new_from_string_with_error(icalvalue_kind kind,const char* } case ICAL_RECUR_VALUE: + { + struct icalrecurrencetype rt; + rt = icalrecurrencetype_from_string(str); + value = icalvalue_new_recur(rt); + break; + } + + case ICAL_TIME_VALUE: + { + struct icaltimetype tt; + tt = icaltime_from_string(str); + value = icalvalue_new_time(tt); + break; + } case ICAL_DATE_VALUE: + { + struct icaltimetype tt; + tt = icaltime_from_string(str); + value = icalvalue_new_date(tt); + break; + } case ICAL_DATETIME_VALUE: + { + struct icaltimetype tt; + tt = icaltime_from_string(str); + value = icalvalue_new_datetime(tt); + break; + } case ICAL_DATETIMEDATE_VALUE: + { + struct icaltimetype tt; + tt = icaltime_from_string(str); + value = icalvalue_new_datetimedate(tt); + break; + } + case ICAL_DATETIMEPERIOD_VALUE: - case ICAL_TIME_VALUE: - case ICAL_DURATION_VALUE: - case ICAL_PERIOD_VALUE: - case ICAL_TRIGGER_VALUE: + case ICAL_DURATION_VALUE: + case ICAL_PERIOD_VALUE: { value = icalparser_parse_value(kind,str,error); break; } + + case ICAL_TRIGGER_VALUE: + { + struct icaltriggertype tr = icaltriggertype_from_string(str); + value = icalvalue_new_trigger(tr); + break; + } default: { @@ -556,14 +595,15 @@ char* icalvalue_binary_as_ical_string(icalvalue* value) { } +#define MAX_INT_DIGITS 12 /* Enough for 2^32 + sign*/ char* icalvalue_int_as_ical_string(icalvalue* value) { int data; - char* str = (char*)icalmemory_tmp_buffer(2); + char* str = (char*)icalmemory_tmp_buffer(MAX_INT_DIGITS); icalerror_check_arg_rz( (value!=0),"value"); data = icalvalue_get_integer(value); - sprintf(str,"%d",data); + snprintf(str,MAX_INT_DIGITS,"%d",data); return str; } @@ -608,101 +648,10 @@ char* icalvalue_string_as_ical_string(icalvalue* value) { char* icalvalue_recur_as_ical_string(icalvalue* value) { - char* str; - char *str_p; - size_t buf_sz = 200; - char temp[20]; - int i,j; struct icalvalue_impl *impl = (struct icalvalue_impl*)value; struct icalrecurrencetype *recur = impl->data.v_recur; - struct { char* str;size_t offset; short limit; } recurmap[] = - { - {";BYSECOND=",offsetof(struct icalrecurrencetype,by_second),60}, - {";BYMINUTE=",offsetof(struct icalrecurrencetype,by_minute),60}, - {";BYHOUR=",offsetof(struct icalrecurrencetype,by_hour),24}, - {";BYDAY=",offsetof(struct icalrecurrencetype,by_day),7}, - {";BYMONTHDAY=",offsetof(struct icalrecurrencetype,by_month_day),31}, - {";BYYEARDAY=",offsetof(struct icalrecurrencetype,by_year_day),366}, - {";BYWEEKNO=",offsetof(struct icalrecurrencetype,by_week_no),52}, - {";BYMONTH=",offsetof(struct icalrecurrencetype,by_month),12}, - {";BYSETPOS=",offsetof(struct icalrecurrencetype,by_set_pos),366}, - {0,0,0}, - }; - - - - icalerror_check_arg_rz((value != 0),"value"); - - if(recur->freq == ICAL_NO_RECURRENCE){ - return 0; - } - - str = (char*)icalmemory_tmp_buffer(buf_sz); - str_p = str; - - icalmemory_append_string(&str,&str_p,&buf_sz,"FREQ="); - icalmemory_append_string(&str,&str_p,&buf_sz, - icalrecur_recurrence_to_string(recur->freq)); - - if(recur->until.year != 0){ - - temp[0] = 0; - print_datetime_to_string(temp,&(recur->until)); - - icalmemory_append_string(&str,&str_p,&buf_sz,";UNTIL="); - icalmemory_append_string(&str,&str_p,&buf_sz, temp); - } - - if(recur->count != 0){ - sprintf(temp,"%d",recur->count); - icalmemory_append_string(&str,&str_p,&buf_sz,";COUNT="); - icalmemory_append_string(&str,&str_p,&buf_sz, temp); - } - - if(recur->interval != 0){ - sprintf(temp,"%d",recur->interval); - icalmemory_append_string(&str,&str_p,&buf_sz,";INTERVAL="); - icalmemory_append_string(&str,&str_p,&buf_sz, temp); - } - - for(j =0; recurmap[j].str != 0; j++){ - short* array = (short*)(recurmap[j].offset+ (size_t)recur); - short limit = recurmap[j].limit; - - /* Skip unused arrays */ - if( array[0] != ICAL_RECURRENCE_ARRAY_MAX ) { - - icalmemory_append_string(&str,&str_p,&buf_sz,recurmap[j].str); - - for(i=0; i< limit && array[i] != ICAL_RECURRENCE_ARRAY_MAX; - i++){ - if (j == 3) { /* BYDAY */ - short dow = icalrecurrencetype_day_day_of_week(array[i]); - const char *daystr = icalrecur_weekday_to_string(dow); - short pos = icalrecurrencetype_day_position(array[i]); - - 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); - } - - if( (i+1)<limit &&array[i+1] - != ICAL_RECURRENCE_ARRAY_MAX){ - icalmemory_append_char(&str,&str_p,&buf_sz,','); - } - } - } - } - - return str; + return icalrecurrencetype_as_string(recur); } char* icalvalue_text_as_ical_string(icalvalue* value) { @@ -826,67 +775,17 @@ char* icalvalue_attach_as_ical_string(icalvalue* value) { } } -void append_duration_segment(char** buf, char** buf_ptr, size_t* buf_size, - char* sep, unsigned int value) { - - char temp[TMP_BUF_SIZE]; - - sprintf(temp,"%d",value); - - icalmemory_append_string(buf, buf_ptr, buf_size, temp); - icalmemory_append_string(buf, buf_ptr, buf_size, sep); - -} char* icalvalue_duration_as_ical_string(icalvalue* value) { struct icaldurationtype data; - char *buf, *output_line; - size_t buf_size = 256; - char* buf_ptr = 0; icalerror_check_arg_rz( (value!=0),"value"); data = icalvalue_get_duration(value); - buf = (char*)icalmemory_new_buffer(buf_size); - buf_ptr = buf; - - if (data.is_neg) - icalmemory_append_string(&buf, &buf_ptr, &buf_size, "-"); - icalmemory_append_string(&buf, &buf_ptr, &buf_size, "P"); - - - if (data.weeks != 0 ) { - append_duration_segment(&buf, &buf_ptr, &buf_size, "W", data.weeks); - } - - if (data.days != 0 ) { - append_duration_segment(&buf, &buf_ptr, &buf_size, "D", data.days); - } - - if (data.hours != 0 || data.minutes != 0 || data.seconds != 0) { - - icalmemory_append_string(&buf, &buf_ptr, &buf_size, "T"); + return icaldurationtype_as_ical_string(data); - if (data.hours != 0 ) { - append_duration_segment(&buf, &buf_ptr, &buf_size, "H", data.hours); - } - if (data.minutes != 0 ) { - append_duration_segment(&buf, &buf_ptr, &buf_size, "M", data.minutes); - } - if (data.seconds != 0 ) { - append_duration_segment(&buf, &buf_ptr, &buf_size, "S", data.seconds); - } - - } - - output_line = icalmemory_tmp_copy(buf); - icalmemory_free_buffer(buf); - - return output_line; - - } void print_time_to_string(char* str, struct icaltimetype *data) @@ -1087,31 +986,20 @@ char* icalvalue_period_as_ical_string(icalvalue* value) { char* icalvalue_trigger_as_ical_string(icalvalue* value) { - union icaltriggertype data; + struct icaltriggertype data; char* str; - icalvalue *e; icalerror_check_arg_rz( (value!=0),"value"); data = icalvalue_get_trigger(value); str = (char*)icalmemory_tmp_buffer(60); - if (data.time.is_date != -1){ - /* use the absolute date */ - e = icalvalue_new_datetime(data.time); - - strcpy (str, icalvalue_datetime_as_ical_string(e)); - + if(!icaltime_is_null_time(data.time)){ + return icaltime_as_ical_string(data.time); } else { - /* use the duration */ - e = icalvalue_new_duration(data.duration); - - strcpy (str, icalvalue_duration_as_ical_string(e)); - - } + return icaldurationtype_as_ical_string(data.duration); + } - icalvalue_free(e); - return str; } const char* @@ -1220,6 +1108,20 @@ icalvalue_isa_value (void* value) } +int icalvalue_is_time(icalvalue* a) { + icalvalue_kind kind = icalvalue_isa(a); + + if(kind == ICAL_DATETIMEDATE_VALUE || + kind == ICAL_DATETIME_VALUE || + kind == ICAL_DATE_VALUE || + kind == ICAL_TIME_VALUE ){ + return 1; + } + + return 0; + +} + icalparameter_xliccomparetype icalvalue_compare(icalvalue* a, icalvalue *b) { @@ -1230,7 +1132,8 @@ icalvalue_compare(icalvalue* a, icalvalue *b) icalerror_check_arg_rz( (b!=0), "b"); /* Not the same type; they can only be unequal */ - if (icalvalue_isa(a) != icalvalue_isa(b)){ + if( ! (icalvalue_is_time(a) && icalvalue_is_time(b)) && + icalvalue_isa(a) != icalvalue_isa(b)){ return ICAL_XLICCOMPARETYPE_NOTEQUAL; } @@ -1271,6 +1174,21 @@ icalvalue_compare(icalvalue* a, icalvalue *b) } } + case ICAL_DURATION_VALUE: + { + int a = icaldurationtype_as_int(impla->data.v_duration); + int b = icaldurationtype_as_int(implb->data.v_duration); + + if (a > b){ + return ICAL_XLICCOMPARETYPE_GREATER; + } else if (a < b){ + return ICAL_XLICCOMPARETYPE_LESS; + } else { + return ICAL_XLICCOMPARETYPE_EQUAL; + } + } + + case ICAL_TEXT_VALUE: case ICAL_URI_VALUE: case ICAL_CALADDRESS_VALUE: @@ -1278,7 +1196,6 @@ icalvalue_compare(icalvalue* a, icalvalue *b) case ICAL_DATE_VALUE: case ICAL_DATETIME_VALUE: case ICAL_DATETIMEDATE_VALUE: - case ICAL_DURATION_VALUE: /* HACK. Not correct for DURATION */ case ICAL_TIME_VALUE: case ICAL_DATETIMEPERIOD_VALUE: { @@ -1292,7 +1209,7 @@ icalvalue_compare(icalvalue* a, icalvalue *b) } else if (r < 0){ return ICAL_XLICCOMPARETYPE_LESS; } else { - return 0; + return ICAL_XLICCOMPARETYPE_EQUAL; } @@ -1350,9 +1267,7 @@ icalproperty* icalvalue_get_parent(icalvalue* value) -/* Recur is a special case, so it is not auto generated. Well, - actually, it is auto-generated, but you will have to manually - remove the auto-generated version after each generation. */ +/* Recur is a special case, so it is not auto generated. */ icalvalue* icalvalue_new_recur (struct icalrecurrencetype v) { diff --git a/libical/src/libical/icalyacc.y b/libical/src/libical/icalyacc.y index 0512d6b585..982682d331 100644 --- a/libical/src/libical/icalyacc.y +++ b/libical/src/libical/icalyacc.y @@ -6,7 +6,7 @@ DESCRIPTION: - $Id: icalyacc.y,v 1.10 2000/12/12 00:27:40 federico Exp $ + $Id: icalyacc.y,v 1.11 2001/01/23 20:22:33 jpr Exp $ $Locker: $ (C) COPYRIGHT 1999 Eric Busboom @@ -48,14 +48,10 @@ int utcsign; /* Globals for DURATION values */ struct icaldurationtype duration; -/* Globals for RECUR values */ -struct icalrecurrencetype recur; -short skiplist[367]; -short skippos; -int dow_pos; +/* Globals for TRIGGER values */ +struct icaltriggertype trigger; void copy_list(short* array, size_t size); -void clear_recur(); void add_prop(icalproperty_kind); void icalparser_fill_date(struct tm* t, char* dstr); void icalparser_fill_time(struct tm* t, char* tstr); @@ -179,13 +175,10 @@ int yylex(void); /* Or this. */ %% value: - binary_value - | boolean_value - | date_value + date_value | datetime_value | duration_value | period_value - | recur_value | utcoffset_value | error { icalparser_yy_value = 0; @@ -193,13 +186,6 @@ value: yyclearin; } -binary_value: "unimplemented2" - -boolean_value: - TRUE - { icalparser_yy_value = icalvalue_new_boolean(1); } - | FALSE - { icalparser_yy_value = icalvalue_new_boolean(0); } date_value: DIGITS { @@ -369,87 +355,9 @@ period_value: DIGITS TIME_CHAR DIGITS utc_char '/' DIGITS TIME_CHAR DIGITS utc } - -/* Recur */ - -recur_start: - FREQ EQUALS SECONDLY {clear_recur();recur.freq = ICAL_SECONDLY_RECURRENCE;} - | FREQ EQUALS MINUTELY {clear_recur();recur.freq = ICAL_MINUTELY_RECURRENCE;} - | FREQ EQUALS HOURLY {clear_recur();recur.freq = ICAL_HOURLY_RECURRENCE;} - | FREQ EQUALS DAILY {clear_recur();recur.freq = ICAL_DAILY_RECURRENCE;} - | FREQ EQUALS WEEKLY {clear_recur();recur.freq = ICAL_WEEKLY_RECURRENCE;} - | FREQ EQUALS MONTHLY {clear_recur();recur.freq = ICAL_MONTHLY_RECURRENCE;} - | FREQ EQUALS YEARLY {clear_recur();recur.freq = ICAL_YEARLY_RECURRENCE;} - ; - - -weekday: - SU { skiplist[skippos]=ICAL_SUNDAY_WEEKDAY; } - | MO { skiplist[skippos]=ICAL_MONDAY_WEEKDAY; } - | TU { skiplist[skippos]=ICAL_TUESDAY_WEEKDAY; } - | WE { skiplist[skippos]=ICAL_WEDNESDAY_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 */ - -weekday_list: - weekday {if( skippos<8) skippos++;} - | DIGITS weekday { dow_pos = atoi($1); - skiplist[skippos] += 8*dow_pos; if( skippos<8) skippos++; } - | MINUS DIGITS weekday { dow_pos = atoi($2); - skiplist[skippos] -= 8*dow_pos; if( skippos<8) skippos++; } - | weekday_list COMMA weekday {if( skippos<8) skippos++;}; - | weekday_list COMMA DIGITS weekday { dow_pos = atoi($3); - 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++;} +trigger: -recur_list: - DIGITS { skiplist[skippos] = atoi($1); skippos++;} - | recur_list COMMA DIGITS { skiplist[skippos] = atoi($3); if (skippos<367) skippos++;} - ; - -recur_skip: - INTERVAL EQUALS DIGITS {recur.interval = atoi($3);} - | WKST EQUALS SU {recur.week_start = ICAL_SUNDAY_WEEKDAY;} - | WKST EQUALS MO {recur.week_start = ICAL_MONDAY_WEEKDAY;} - | WKST EQUALS TU {recur.week_start = ICAL_TUESDAY_WEEKDAY;} - | WKST EQUALS WE {recur.week_start = ICAL_WEDNESDAY_WEEKDAY;} - | WKST EQUALS TH {recur.week_start = ICAL_THURSDAY_WEEKDAY;} - | WKST EQUALS FR {recur.week_start = ICAL_FRIDAY_WEEKDAY;} - | WKST EQUALS SA {recur.week_start = ICAL_SATURDAY_WEEKDAY;} - | BYSECOND EQUALS recur_list{copy_list(recur.by_second,60);} - | BYMINUTE EQUALS recur_list{copy_list(recur.by_minute,60);} - | BYHOUR EQUALS recur_list{copy_list(recur.by_hour,24);} - | BYDAY EQUALS weekday_list{copy_list(recur.by_day,7);} - | BYMONTH EQUALS recur_list{copy_list(recur.by_month,12);} - | BYMONTHDAY EQUALS recur_list{copy_list(recur.by_month_day,31);} - | BYYEARDAY EQUALS recur_list{copy_list(recur.by_year_day,366);} - | BYWEEKNO EQUALS recur_list{copy_list(recur.by_week_no,53);} - | BYSETPOS EQUALS recur_list{copy_list(recur.by_set_pos,366);} - | UNTIL EQUALS datetime_value - { recur.until = icalvalue_get_datetime(icalparser_yy_value); - icalvalue_free(icalparser_yy_value); icalparser_yy_value=0;} - | UNTIL EQUALS date_value - { recur.until = icalvalue_get_date(icalparser_yy_value); - icalvalue_free(icalparser_yy_value); icalparser_yy_value=0;} - | COUNT EQUALS DIGITS - { recur.count = atoi($3); } - ; - -recur_skip_list: - /* empty */ - | recur_skip_list SEMICOLON recur_skip - -recur_value: - recur_start recur_skip_list - { icalparser_yy_value = icalvalue_new_recur(recur); } - - /* UTC Offset */ @@ -467,26 +375,8 @@ utcoffset_value: icalparser_yy_value = icalvalue_new_utcoffset(utcsign * ($2*3600) + ($3*60) +($4)); } - - %% - -void clear_recur() -{ - memset(&skiplist, ICAL_RECURRENCE_ARRAY_MAX_BYTE, sizeof(skiplist)); - skippos = 0; - - icalrecurrencetype_clear(&recur); -} - -void copy_list(short* array, size_t size) -{ - memcpy(array, skiplist, size*sizeof(short)); - memset(&skiplist,ICAL_RECURRENCE_ARRAY_MAX_BYTE, sizeof(skiplist)); - skippos = 0; -} - struct icaltimetype fill_datetime(char* datestr, char* timestr) { struct icaltimetype stm; diff --git a/libical/src/libicalss/Makefile.am b/libical/src/libicalss/Makefile.am index 0cbecbedea..732d970738 100644 --- a/libical/src/libicalss/Makefile.am +++ b/libical/src/libicalss/Makefile.am @@ -17,12 +17,12 @@ libicalss_la_LDFLAGS = -version-info 0:0:0 libicalss_la_SOURCES = \ icalclassify.c \ + icalgauge.c \ + icalgaugeimpl.h \ icaldirset.c \ icaldirsetimpl.h \ icalfileset.c \ icalfilesetimpl.h \ - icalgauge.c \ - icalgaugeimpl.h \ icalset.c \ icalsslexer.l \ icalssutil.c \ @@ -35,11 +35,11 @@ libicalss_la_SOURCES = \ libicalssincludedir = $(includedir) COMBINEDHEADERS = \ + icalgauge.h \ icalset.h \ icalfileset.h \ icaldirset.h \ icalcalendar.h \ - icalgauge.h \ icalssutil.h \ icalclassify.h \ icalspanlist.h \ diff --git a/libical/src/libicalss/icalcstp.h b/libical/src/libicalss/icalcstp.h index 63f5af913f..2ebccd622a 100644 --- a/libical/src/libicalss/icalcstp.h +++ b/libical/src/libicalss/icalcstp.h @@ -52,9 +52,10 @@ 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. - + 2a) Get string from client & give to icalcstps_next_input() + 2b) Repeat until icalcstp_next_output returns 0: + 2b1) Call icalcstps_next_output. + 2b2) Send string to client. */ @@ -101,11 +102,11 @@ int icalcstps_next_input(icalcstps* cstp); /* How to use: 1) Construct a new icalcstpc - 2) Issue a command + 2) Issue a command by calling one of the command routines. 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() + 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 diff --git a/libical/src/test/Makefile.am b/libical/src/test/Makefile.am index a2ebea7610..2830afdaa0 100644 --- a/libical/src/test/Makefile.am +++ b/libical/src/test/Makefile.am @@ -4,14 +4,14 @@ noinst_PROGRAMS = copycluster regression parser storage stow recur testmime test LDADD = ../libicalss/libicalss.la ../libicalvcal/libicalvcal.la ../libical/libical.la INCLUDES = \ - -I . \ + -I. \ -I../libicalvcal \ - -I $(srcdir)/../libicalvcal \ - -I $(srcdir) \ + -I$(srcdir)/../libicalvcal \ + -I$(srcdir) \ -I../libical \ - -I $(srcdir)/../libical \ + -I$(srcdir)/../libical \ -I../libicalss \ - -I $(srcdir)/../libicalss + -I$(srcdir)/../libicalss copycluster_SOURCES = copycluster.c regression_SOURCES = regression.c diff --git a/libical/src/test/icaltestparser.c b/libical/src/test/icaltestparser.c index 71f91b641f..e5973e0d4a 100644 --- a/libical/src/test/icaltestparser.c +++ b/libical/src/test/icaltestparser.c @@ -112,7 +112,6 @@ int main(int argc, char* argv[]) if (c != 0){ /*icalcomponent_convert_errors(c);*/ printf("%s",icalcomponent_as_ical_string(c)); - icalparser_claim(parser); printf("\n---------------\n"); icalcomponent_free(c); } diff --git a/libical/src/test/regression.c b/libical/src/test/regression.c index b14e8aa6f8..66307bb405 100644 --- a/libical/src/test/regression.c +++ b/libical/src/test/regression.c @@ -35,6 +35,10 @@ #include <stdlib.h> /* for malloc */ #include <stdio.h> /* for printf */ #include <time.h> /* for time() */ +#include <unistd.h> /* for unlink, fork */ +#include <sys/wait.h> /* For waitpid */ +#include <sys/types.h> /* For wait pid */ +#include <sys/time.h> /* for select */ /* This example creates and minipulates the ical object that appears @@ -89,8 +93,8 @@ icalcomponent* create_simple_component() icalcomponent* calendar; struct icalperiodtype rtime; - rtime.start = icaltime_from_timet( time(0),0,0); - rtime.end = icaltime_from_timet( time(0),0,0); + rtime.start = icaltime_from_timet( time(0),0); + rtime.end = icaltime_from_timet( time(0),0); rtime.end.hour++; @@ -119,12 +123,12 @@ icalcomponent* create_new_component() icalcomponent* timezone; icalcomponent* tzc; icalcomponent* event; - struct icaltimetype atime = icaltime_from_timet( time(0),0,0); + struct icaltimetype atime = icaltime_from_timet( time(0),0); struct icalperiodtype rtime; icalproperty* property; - rtime.start = icaltime_from_timet( time(0),0,0); - rtime.end = icaltime_from_timet( time(0),0,0); + rtime.start = icaltime_from_timet( time(0),0); + rtime.end = icaltime_from_timet( time(0),0); rtime.end.hour++; @@ -328,11 +332,11 @@ icalcomponent* create_new_component_with_va_args() { icalcomponent* calendar; - struct icaltimetype atime = icaltime_from_timet( time(0),0,0); + struct icaltimetype atime = icaltime_from_timet( time(0),0); struct icalperiodtype rtime; - rtime.start = icaltime_from_timet( time(0),0,0); - rtime.end = icaltime_from_timet( time(0),0,0); + rtime.start = icaltime_from_timet( time(0),0); + rtime.end = icaltime_from_timet( time(0),0); rtime.end.hour++; @@ -521,9 +525,9 @@ void test_values() icalvalue_free(copy); - v = icalvalue_new_date(icaltime_from_timet( time(0),0,0)); + v = icalvalue_new_date(icaltime_from_timet( time(0),0)); printf("date 1: %s\n",icalvalue_as_ical_string(v)); - icalvalue_set_date(v,icaltime_from_timet( time(0)+3600,0,0)); + icalvalue_set_date(v,icaltime_from_timet( time(0)+3600,0)); printf("date 2: %s\n",icalvalue_as_ical_string(v)); copy = icalvalue_new_clone(v); @@ -803,7 +807,7 @@ int test_store() icaldirset *s = icaldirset_new("store"); int i; - rtime.start = icaltime_from_timet( time(0),0,0); + rtime.start = icaltime_from_timet( time(0),0); cluster = icalfileset_new("clusterin.vcd"); @@ -946,7 +950,6 @@ int test_store() int test_compare() { icalvalue *v1, *v2; - icalcomponent *c, *gauge; v1 = icalvalue_new_caladdress("cap://value/1"); v2 = icalvalue_new_clone(v1); @@ -978,43 +981,19 @@ int test_compare() printf("%d\n",icalvalue_compare(v1,v2)); - - gauge = - icalcomponent_vanew( - ICAL_VCALENDAR_COMPONENT, - icalcomponent_vanew( - ICAL_VEVENT_COMPONENT, - icalproperty_vanew_comment( - "Comment", - icalparameter_new_xliccomparetype(ICAL_XLICCOMPARETYPE_EQUAL), - 0), - 0), - 0); - - c = icalcomponent_vanew( - ICAL_VEVENT_COMPONENT, - icalproperty_vanew_comment( - "Comment", - 0), - 0); - - printf("%s",icalcomponent_as_ical_string(gauge)); - - printf("%d\n",icalgauge_test(c,gauge)); - return 0; } void test_restriction() { icalcomponent *comp; - struct icaltimetype atime = icaltime_from_timet( time(0),0,0); + struct icaltimetype atime = icaltime_from_timet( time(0),0); int valid; struct icalperiodtype rtime; - rtime.start = icaltime_from_timet( time(0),0,0); - rtime.end = icaltime_from_timet( time(0),0,0); + rtime.start = icaltime_from_timet( time(0),0); + rtime.end = icaltime_from_timet( time(0),0); rtime.end.hour++; @@ -1098,7 +1077,7 @@ void test_calendar() icaldirset *s; icalcalendar* calendar = icalcalendar_new("calendar"); icalerrorenum error; - struct icaltimetype atime = icaltime_from_timet( time(0),0,0); + struct icaltimetype atime = icaltime_from_timet( time(0),0); comp = icalcomponent_vanew( ICAL_VEVENT_COMPONENT, @@ -1139,36 +1118,56 @@ void test_calendar() void test_increment(void); -void test_recur() +void print_occur(struct icalrecurrencetype recur, struct icaltimetype start) { - icalvalue *v; + struct icaltimetype next; + icalrecur_iterator* ritr; + + time_t tt = icaltime_as_timet(start); - v = icalvalue_new_from_string(ICAL_RECUR_VALUE, - "FREQ=DAILY;COUNT=5;BYDAY=MO,TU,WE,TH,FR"); + printf("#### %s\n",icalrecurrencetype_as_string(&recur)); + printf("#### %s\n",ctime(&tt )); + + for(ritr = icalrecur_iterator_new(recur,start), + next = icalrecur_iterator_next(ritr); + !icaltime_is_null_time(next); + next = icalrecur_iterator_next(ritr)){ + + tt = icaltime_as_timet(next); + + printf(" %s",ctime(&tt )); + + } - printf("%s\n",icalvalue_as_ical_string(v)); + icalrecur_iterator_free(ritr); +} - v = icalvalue_new_from_string(ICAL_RECUR_VALUE, - "FREQ=YEARLY;UNTIL=123456T123456;BYSETPOS=-1,2"); +void test_recur() +{ + struct icalrecurrencetype rt; + struct icaltimetype start; + time_t array[25]; + int i; - printf("%s\n",icalvalue_as_ical_string(v)); + rt = icalrecurrencetype_from_string("FREQ=MONTHLY;UNTIL=19971224T000000Z;INTERVAL=1;BYDAY=TU,2FR,3SA"); + start = icaltime_from_string("19970905T090000Z"); - v = icalvalue_new_from_string(ICAL_RECUR_VALUE, - "FREQ=YEARLY;UNTIL=123456T123456;INTERVAL=2;BYMONTH=1;BYDAY=SU;BYHOUR=8,9;BYMINUTE=30"); + print_occur(rt,start); - printf("%s\n",icalvalue_as_ical_string(v)); + printf("\n Using icalrecur_expand_recurrence\n"); - v = icalvalue_new_from_string(ICAL_RECUR_VALUE, - "FREQ=MONTHLY;BYDAY=-1MO,TU,WE,TH,FR"); + icalrecur_expand_recurrence("FREQ=MONTHLY;UNTIL=19971224T000000Z;INTERVAL=1;BYDAY=TU,2FR,3SA", + icaltime_as_timet(start), + 25, + array); - printf("%s\n",icalvalue_as_ical_string(v)); + for(i =0; array[i] != 0 && i < 25 ; i++){ + + printf(" %s",ctime(&(array[i]))); + } - v = icalvalue_new_from_string(ICAL_RECUR_VALUE, - "FREQ=WEEKLY;INTERVAL=20;WKST=SU;BYDAY=TU"); - - printf("%s\n",icalvalue_as_ical_string(v)); - - test_increment(); + +/* test_increment();*/ } @@ -1210,7 +1209,7 @@ void icalrecurrencetype_test() "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 t = icaltime_from_timet( time(0), 0); struct icaltimetype next; time_t tt; @@ -1228,129 +1227,124 @@ void icalrecurrencetype_test() } -void test_recur_expansion() -{ +/* From Federico Mena Quintero <federico@helixcode.com> */ +void test_recur_parameter_bug(){ - icalvalue *v; - - v = icalvalue_new_from_string(ICAL_RECUR_VALUE, - "FREQ=YEARLY;UNTIL=123456T123456;INTERVAL=2;BYMONTH=1;BYDAY=SU;BYHOUR=8,9;BYMINUTE=30"); - - printf("%s\n",icalvalue_as_ical_string(v)); - - icalrecurrencetype_test(); -} - -static const char test_icalcomp_str[] = +#ifdef HAVE_CONFIG_H +#include <config.h> +#endif + +#include <stdio.h> +#include <stdlib.h> +#include <ical.h> + + 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" +" ;X-EVOLUTION-ENDDATE=20030209T081500\r\n" +" :FREQ=DAILY;COUNT=10;INTERVAL=6\r\n" "END:VEVENT\r\n"; + + icalcomponent *icalcomp; + icalproperty *prop; + struct icalrecurrencetype recur; + int n_errors; + + icalcomp = icalparser_parse_string ((char *) test_icalcomp_str); + if (!icalcomp) { + fprintf (stderr, "main(): could not parse the component\n"); + exit (EXIT_FAILURE); + } + + printf("%s\n\n",icalcomponent_as_ical_string(icalcomp)); -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 */ + n_errors = icalcomponent_count_errors (icalcomp); + if (n_errors) { + icalproperty *p; - 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); + for (p = icalcomponent_get_first_property (icalcomp, + ICAL_XLICERROR_PROPERTY); + p; + p = icalcomponent_get_next_property (icalcomp, + ICAL_XLICERROR_PROPERTY)) { + char *str; + + str = icalproperty_as_ical_string (p); + fprintf (stderr, "error: %s\n", str); } + } + + prop = icalcomponent_get_first_property (icalcomp, ICAL_RRULE_PROPERTY); + if (!prop) { + fprintf (stderr, "main(): could not get the RRULE property"); + exit (EXIT_FAILURE); + } + + recur = icalproperty_get_rrule (prop); + + printf("%s\n",icalrecurrencetype_as_string(&recur)); - 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 */ +void test_duration() +{ - 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); - } + struct icaldurationtype d; - puts (str); - puts ("\n"); + d = icaldurationtype_from_string("PT8H30M"); + printf("%s\n",icaldurationtype_as_ical_string(d)); + assert(icaldurationtype_as_int(d) == 30600); + + d = icaldurationtype_from_string("-PT8H30M"); + printf("%s\n",icaldurationtype_as_ical_string(d)); + assert(icaldurationtype_as_int(d) == -30600); -} + d = icaldurationtype_from_string("PT10H10M10S"); + printf("%s\n",icaldurationtype_as_ical_string(d)); + assert(icaldurationtype_as_int(d) == 36610); + d = icaldurationtype_from_string("P7W"); + printf("%s\n",icaldurationtype_as_ical_string(d)); + assert(icaldurationtype_as_int(d) == 4233600); -void test_duration() -{ + d = icaldurationtype_from_string("P2DT8H30M"); + printf("%s\n",icaldurationtype_as_ical_string(d)); + assert(icaldurationtype_as_int(d) == 203400); - icalvalue *v; + icalerror_errors_are_fatal = 0; - v = icalvalue_new_from_string(ICAL_DURATION_VALUE, - "PT8H30M"); + d = icaldurationtype_from_string("P-2DT8H30M"); + printf("%s\n",icaldurationtype_as_ical_string(d)); + assert(icaldurationtype_as_int(d) == 0); - printf("%s\n",icalvalue_as_ical_string(v)); + d = icaldurationtype_from_string("P7W8H"); + printf("%s\n",icaldurationtype_as_ical_string(d)); + assert(icaldurationtype_as_int(d) == 0); + d = icaldurationtype_from_string("T10H"); + printf("%s\n",icaldurationtype_as_ical_string(d)); + assert(icaldurationtype_as_int(d) == 0); - v = icalvalue_new_from_string(ICAL_DURATION_VALUE, - "-PT8H30M"); - printf("%s\n",icalvalue_as_ical_string(v)); + icalerror_errors_are_fatal = 1; - icalvalue_free(v); - v = icalvalue_new_from_string(ICAL_PERIOD_VALUE, - "19971015T050000Z/PT8H30M"); +} - printf("%s\n",icalvalue_as_ical_string(v)); +void test_period() +{ - icalvalue_free(v); - v = icalvalue_new_from_string(ICAL_PERIOD_VALUE, - "19971015T050000Z/19971015T060000Z"); + struct icalperiodtype p; - printf("%s\n",icalvalue_as_ical_string(v)); - icalvalue_free(v); + p = icalperiodtype_from_string("19971015T050000Z/PT8H30M"); + printf("%s\n",icalperiodtype_as_ical_string(p)); + p = icalperiodtype_from_string("19971015T050000Z/19971015T060000Z"); + printf("%s\n",icalperiodtype_as_ical_string(p)); } - void test_strings(){ icalvalue *v; @@ -1423,62 +1417,117 @@ void test_requeststat() st2 = icalreqstattype_from_string("2.1"); printf("%s\n",icalreqstattype_as_string(st2)); +#ifndef ICAL_ERRORS_ARE_FATAL st2 = icalreqstattype_from_string("16.4"); assert(st2.code == ICAL_UNKNOWN_STATUS); st2 = icalreqstattype_from_string("1."); assert(st2.code == ICAL_UNKNOWN_STATUS); - +#endif } 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':' '); + sprintf(ictt_str,"%02d-%02d-%02d %02d:%02d:%02d%s",t.year,t.month,t.day, + t.hour,t.minute,t.second,t.is_utc?" Z":""); return ictt_str; } -void test_time() + +char* ical_timet_string(time_t t) +{ + struct tm stm = *(gmtime(&t)); + + sprintf(ictt_str,"%02d-%02d-%02d %02d:%02d:%02d Z",stm.tm_year+1900, + stm.tm_mon+1,stm.tm_mday,stm.tm_hour,stm.tm_min,stm.tm_sec); + + return ictt_str; + +} + +void do_test_time(char* zone) { - struct icaltimetype ictt, icttutc, icttny,icttphoenix; - time_t tt,tt2; + struct icaltimetype ictt, icttutc, icttutczone, icttdayl, + icttla, icttny,icttphoenix, icttlocal, icttnorm; + time_t tt,tt2, tt_p200; + int offset_la, offset_tz; icalvalue *v; short day_of_week,start_day_of_week, day_of_year; + icalerror_errors_are_fatal = 0; - tt = 973276230; /* Fri Nov 3 10:30:30 PST 2000 in UTC */ + ictt = icaltime_from_string("20001103T183030Z"); - printf("\n Convert to and from lib c \n"); + tt = icaltime_as_timet(ictt); + + assert(tt==973276230); /* Fri Nov 3 10:30:30 PST 2000 in PST + Fri Nov 3 18:30:30 PST 2000 in UTC */ + + offset_la = icaltime_utc_offset(ictt,"America/Los_Angeles"); + offset_tz = icaltime_utc_offset(ictt, zone); - printf("System time is: %s",ctime(&tt)); + printf(" Normalize \n"); + printf("Orig (ical) : %s\n", ictt_as_string(ictt)); + icttnorm = ictt; + icttnorm.second -= 60 * 60 * 24 * 5; + icttnorm = icaltime_normalize(ictt); + printf("-5d in sec : %s\n", ictt_as_string(icttnorm)); + icttnorm.day += 60; + icttnorm = icaltime_normalize(ictt); + printf("+60 d : %s\n", ictt_as_string(icttnorm)); + + + printf("\n As time_t \n"); + + tt2 = icaltime_as_timet(ictt); + printf("20001103T183030Z (timet): %s\n",ical_timet_string(tt2)); + printf("20001103T183030Z : %s\n",ictt_as_string(ictt)); + assert(tt2 == tt); - ictt = icaltime_from_timet(tt,0,0); + icttlocal = icaltime_from_string("20001103T183030"); + tt2 = icaltime_as_timet(icttlocal); + printf("20001103T183030 (timet): %s\n",ical_timet_string(tt2)); + printf("20001103T183030 : %s\n",ictt_as_string(icttlocal)); + assert(tt-tt2 == offset_tz); + + printf("\n From time_t \n"); + + printf("Orig : %s\n",ical_timet_string(tt)); + printf("As utc : %s\n", ictt_as_string(ictt)); + + icttlocal = icaltime_as_zone(ictt,zone); + printf("As local : %s\n", ictt_as_string(icttlocal)); + + + printf("\n Convert to and from lib c \n"); + + printf("System time is: %s\n",ical_timet_string(tt)); v = icalvalue_new_datetime(ictt); printf("System time from libical: %s\n",icalvalue_as_ical_string(v)); tt2 = icaltime_as_timet(ictt); - printf("Converted back to libc: %s",ctime(&tt2)); + printf("Converted back to libc: %s\n",ical_timet_string(tt2)); printf("\n Incrementing time \n"); - ictt.year++; - tt2 = icaltime_as_timet(ictt); - printf("Add a year: %s\n",ctime(&tt2)); + icttnorm = ictt; - ictt.month+=13; - tt2 = icaltime_as_timet(ictt); - printf("Add 13 months: %s",ctime(&tt2)); + icttnorm.year++; + tt2 = icaltime_as_timet(icttnorm); + printf("Add a year: %s\n",ical_timet_string(tt2)); - ictt.second+=90; - tt2 = icaltime_as_timet(ictt); - printf("Add 90 seconds: %s",ctime(&tt2)); + icttnorm.month+=13; + tt2 = icaltime_as_timet(icttnorm); + printf("Add 13 months: %s\n",ical_timet_string(tt2)); - ictt = icaltime_from_timet(tt,0,0); + icttnorm.second+=90; + tt2 = icaltime_as_timet(icttnorm); + printf("Add 90 seconds: %s\n",ical_timet_string(tt2)); printf("\n Day Of week \n"); @@ -1486,34 +1535,76 @@ void test_time() start_day_of_week = icaltime_start_doy_of_week(ictt); day_of_year = icaltime_day_of_year(ictt); + 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); + assert(day_of_week == 6); + assert(day_of_year == 308); + assert(start_day_of_week == 303 ); + + printf("\n TimeZone Conversions \n"); - printf("\n To and From UTC\n"); + icttla = icaltime_as_zone(ictt,"America/Los_Angeles"); + assert(icttla.hour == 10); - 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)); - + icttutc = icaltime_as_utc(icttla,"America/Los_Angeles"); + assert(icaltime_compare(icttla, + icaltime_from_string("20001103T103030"))==0); + icttutczone = icaltime_as_zone(ictt,"Etc/GMT0"); + icttutczone.is_utc = 1; + assert(icaltime_compare(icttutc, icttutczone) == 0); + assert(icaltime_compare(icttutc, ictt) == 0); - printf("\n TimeZone Conversions \n"); + icttny = icaltime_as_zone(ictt,"America/New_York"); + + icttphoenix = icaltime_as_zone(ictt,"America/Phoenix"); - ictt = icaltime_from_timet(tt,0,1); + printf("Orig (ctime): %s\n", ical_timet_string(tt) ); + printf("Orig (ical) : %s\n", ictt_as_string(ictt)); + printf("UTC : %s\n", ictt_as_string(icttutc)); + printf("Los Angeles : %s\n", ictt_as_string(icttla)); + printf("Phoenix : %s\n", ictt_as_string(icttphoenix)); + printf("New York : %s\n", ictt_as_string(icttny)); + + + /* Daylight savings test for New York */ + printf("\n Daylight Savings \n"); + + printf("Orig (ctime): %s\n", ical_timet_string(tt) ); + printf("Orig (ical) : %s\n", ictt_as_string(ictt)); + printf("NY : %s\n", ictt_as_string(icttny)); + + assert(strcmp(ictt_as_string(icttny),"2000-11-03 13:30:30")==0); + + tt_p200 = tt + 200 * 24 * 60 * 60 ; /* Add 200 days */ + + icttdayl = icaltime_from_timet(tt_p200,0); + icttny = icaltime_as_zone(icttdayl,"America/New_York"); - icttutc = icaltime_as_utc(ictt,"America/Los_Angeles"); + printf("Orig +200d : %s\n", ical_timet_string(tt_p200) ); + printf("NY+200D : %s\n", ictt_as_string(icttny)); - icttny = icaltime_as_zone(icttutc,"America/New_York"); + assert(strcmp(ictt_as_string(icttny),"2001-05-22 14:30:30")==0); - icttphoenix = icaltime_as_zone(icttutc,"America/Phoenix"); + /* Daylight savings test for Los Angeles */ - 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)); + icttla = icaltime_as_zone(ictt,"America/Los_Angeles"); + printf("\nOrig (ctime): %s\n", ical_timet_string(tt) ); + printf("Orig (ical) : %s\n", ictt_as_string(ictt)); + printf("LA : %s\n", ictt_as_string(icttla)); + + assert(strcmp(ictt_as_string(icttla),"2000-11-03 10:30:30")==0); + + icttla = icaltime_as_zone(icttdayl,"America/Los_Angeles"); + + printf("Orig +200d : %s\n", ical_timet_string(tt_p200) ); + printf("LA+200D : %s\n", ictt_as_string(icttla)); + + assert(strcmp(ictt_as_string(icttla),"2001-05-22 11:30:30")==0); + + icalerror_errors_are_fatal = 1; } void test_iterators() @@ -1655,6 +1746,91 @@ void test_iterators() } + +char* test_set_tz(const char* tzid) +{ + char *tzstr = 0; + char *tmp; + + /* Put the new time zone into the environment */ + if(getenv("TZ") != 0){ + tzstr = (char*)strdup(getenv("TZ")); + + if(tzstr == 0){ + icalerror_set_errno(ICAL_NEWFAILED_ERROR); + return 0; + } + } + + tmp = (char*)malloc(1024); + + if(tmp == 0){ + icalerror_set_errno(ICAL_NEWFAILED_ERROR); + return 0; + } + + snprintf(tmp,1024,"TZ=%s",tzid); + + /* HACK. In some libc versions, putenv gives the string to the + system and in some it gives a copy, so the following might be a + memory leak. THe linux man page says that glibc2.1.2 take + ownership ( no leak) while BSD4.4 uses a copy ( A leak ) */ + putenv(tmp); + + return tzstr; /* This will be zero if the TZ env var was not set */ +} + +void test_unset_tz(char* tzstr) +{ + /* restore the original environment */ + + if(tzstr!=0){ + char temp[1024]; + snprintf(temp,1024,"TZ=%s",tzstr); + putenv(temp); + free(tzstr); + } else { + putenv("TZ"); /* Delete from environment */ + } +} + + +void test_time() +{ + char zones[6][40] = { "America/Los_Angeles","America/New_York","Europe/London","Asia/Shanghai", ""}; + int i; + char* old_tz; + int orig_month; + time_t tt; + struct tm stm; + + tt = time(0); + + stm = *(localtime(&tt)); + + orig_month = stm.tm_mon; + + do_test_time(0); + + old_tz = test_set_tz(zones[0]); + + for(i = 0; zones[i][0] != 0; i++){ + + if(zones[i][0] != 0){ + test_set_tz(zones[i]); + } + + printf(" ######### Timezone: %s ############\n",zones[i]); + + do_test_time(zones[i]); + + } + + test_unset_tz(old_tz); + +} + + void test_icalset() { icalcomponent *c; @@ -1698,11 +1874,15 @@ void test_classify() void print_span(int c, struct icaltime_span span ){ - printf("#%02d start: %s",c,ctime(&span.start)); - printf(" end : %s",ctime(&span.end)); + printf("#%02d start: %s\n",c,ical_timet_string(span.start)); + printf(" end : %s\n",ical_timet_string(span.end)); } +struct icaltimetype icaltime_as_local(struct icaltimetype tt) { + return icaltime_as_zone(tt,0); +} + void test_span() { time_t tm1 = 973378800; /*Sat Nov 4 23:00:00 UTC 2000, @@ -1724,9 +1904,11 @@ void test_span() c = icalcomponent_vanew( ICAL_VEVENT_COMPONENT, - icalproperty_vanew_dtstart(icaltime_from_timet(tm1,0,0), + icalproperty_vanew_dtstart( + icaltime_as_local(icaltime_from_timet(tm1,0)), icalparameter_new_tzid("US/Pacific"),0), - icalproperty_vanew_dtend(icaltime_from_timet(tm2,0,0), + icalproperty_vanew_dtend( + icaltime_as_local(icaltime_from_timet(tm2,0)), icalparameter_new_tzid("US/Pacific"),0), 0 ); @@ -1737,12 +1919,14 @@ void test_span() print_span(1,span); + icalcomponent_free(c); + /* 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), + icalproperty_vanew_dtstart(icaltime_from_timet(tm1,0),0), + icalproperty_vanew_dtend(icaltime_from_timet(tm2,0),0), 0 ); @@ -1750,38 +1934,49 @@ void test_span() print_span(2,span); + icalcomponent_free(c); + /* Specify different timezone */ c = icalcomponent_vanew( ICAL_VEVENT_COMPONENT, - icalproperty_vanew_dtstart(icaltime_from_timet(tm1,0,0), + icalproperty_vanew_dtstart( + icaltime_as_local(icaltime_from_timet(tm1,0)), icalparameter_new_tzid("US/Eastern"),0), - icalproperty_vanew_dtend(icaltime_from_timet(tm2,0,0), + icalproperty_vanew_dtend( + icaltime_as_local(icaltime_from_timet(tm2,0)), icalparameter_new_tzid("US/Eastern"),0), 0 ); span = icalcomponent_get_span(c); print_span(3,span); + icalcomponent_free(c); + + /* Specify different timezone for start and end*/ c = icalcomponent_vanew( ICAL_VEVENT_COMPONENT, - icalproperty_vanew_dtstart(icaltime_from_timet(tm1,0,0), + icalproperty_vanew_dtstart( + icaltime_as_local(icaltime_from_timet(tm1,0)), icalparameter_new_tzid("US/Eastern"),0), - icalproperty_vanew_dtend(icaltime_from_timet(tm2,0,0), + icalproperty_vanew_dtend( + icaltime_as_local(icaltime_from_timet(tm2,0)), icalparameter_new_tzid("US/Pacific"),0), 0 ); span = icalcomponent_get_span(c); print_span(4,span); + icalcomponent_free(c); /* Use Duration */ c = icalcomponent_vanew( ICAL_VEVENT_COMPONENT, - icalproperty_vanew_dtstart(icaltime_from_timet(tm1,0,0), + icalproperty_vanew_dtstart( + icaltime_as_local(icaltime_from_timet(tm1,0)), icalparameter_new_tzid("US/Pacific"),0), icalproperty_new_duration(dur), @@ -1790,21 +1985,27 @@ void test_span() span = icalcomponent_get_span(c); print_span(5,span); + icalcomponent_free(c); + + #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), + icalproperty_vanew_dtstart(icaltime_from_timet(tm1,0), icalparameter_new_tzid("US/Eastern"),0), - icalproperty_vanew_dtend(icaltime_from_timet(tm2,0,1), + icalproperty_vanew_dtend(icaltime_from_timet(tm2,0), icalparameter_new_tzid("US/Eastern"),0), 0 ); span = icalcomponent_get_span(c); assert(icalerrno != ICAL_NO_ERROR); + + icalcomponent_free(c); + #endif /*ICAL_ERRORS_ARE_FATAL*/ } @@ -1813,6 +2014,8 @@ icalcomponent* icalclassify_find_overlaps(icalset* set, icalcomponent* comp); void test_overlaps() { + +#if 0 /* Hack, not working right now */ icalcomponent *cset,*c; icalset *set; time_t tm1 = 973378800; /*Sat Nov 4 23:00:00 UTC 2000, @@ -1827,8 +2030,8 @@ void test_overlaps() 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), + icalproperty_vanew_dtstart(icaltime_from_timet(tm1-hh,0),0), + icalproperty_vanew_dtend(icaltime_from_timet(tm2-hh,0),0), 0 ); @@ -1839,8 +2042,8 @@ void test_overlaps() 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), + icalproperty_vanew_dtstart(icaltime_from_timet(tm1-hh,0),0), + icalproperty_vanew_dtend(icaltime_from_timet(tm2,0),0), 0 ); @@ -1851,8 +2054,8 @@ void test_overlaps() 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), + icalproperty_vanew_dtstart(icaltime_from_timet(tm1+5*hh,0),0), + icalproperty_vanew_dtend(icaltime_from_timet(tm2+5*hh,0),0), 0 ); @@ -1860,6 +2063,8 @@ void test_overlaps() printf("%s\n",icalcomponent_as_ical_string(cset)); +#endif + } void test_fblist() @@ -1869,14 +2074,14 @@ void test_fblist() struct icalperiodtype period; sl = icalspanlist_new(set, - icaltime_from_string("19970324T1200Z"), + icaltime_from_string("19970324T120000Z"), icaltime_from_string("19990424T020000Z")); printf("Restricted spanlist\n"); icalspanlist_dump(sl); period= icalspanlist_next_free_time(sl, - icaltime_from_string("19970801T1200Z")); + icaltime_from_string("19970801T120000Z")); printf("Next Free time: %s\n",icaltime_as_ctime(period.start)); @@ -1888,7 +2093,7 @@ void test_fblist() printf("Unrestricted spanlist\n"); sl = icalspanlist_new(set, - icaltime_from_string("19970324T1200Z"), + icaltime_from_string("19970324T120000Z"), icaltime_null_time()); printf("Restricted spanlist\n"); @@ -1896,7 +2101,7 @@ void test_fblist() icalspanlist_dump(sl); period= icalspanlist_next_free_time(sl, - icaltime_from_string("19970801T1200Z")); + icaltime_from_string("19970801T120000Z")); printf("Next Free time: %s\n",icaltime_as_ctime(period.start)); @@ -1917,8 +2122,8 @@ void test_convenience(){ ICAL_VCALENDAR_COMPONENT, icalcomponent_vanew( ICAL_VEVENT_COMPONENT, - icalproperty_new_dtstart(icaltime_from_string("19970801T1200")), - icalproperty_new_dtend(icaltime_from_string("19970801T1300")), + icalproperty_new_dtstart(icaltime_from_string("19970801T120000")), + icalproperty_new_dtend(icaltime_from_string("19970801T130000")), 0 ), 0); @@ -1926,7 +2131,7 @@ void test_convenience(){ printf("** 1 DTSTART and DTEND **\n%s\n\n", icalcomponent_as_ical_string(c)); - duration = icaldurationtype_as_timet(icalcomponent_get_duration(c))/60; + duration = icaldurationtype_as_int(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))); @@ -1938,7 +2143,7 @@ void test_convenience(){ ICAL_VCALENDAR_COMPONENT, icalcomponent_vanew( ICAL_VEVENT_COMPONENT, - icalproperty_new_dtstart(icaltime_from_string("19970801T1200Z")), + icalproperty_new_dtstart(icaltime_from_string("19970801T120000Z")), icalproperty_new_duration(icaldurationtype_from_string("PT1H30M")), 0 ), @@ -1947,7 +2152,7 @@ void test_convenience(){ printf("\n** 2 DTSTART and DURATION **\n%s\n\n", icalcomponent_as_ical_string(c)); - duration = icaldurationtype_as_timet(icalcomponent_get_duration(c))/60; + duration = icaldurationtype_as_int(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))); @@ -1959,8 +2164,8 @@ void test_convenience(){ ICAL_VCALENDAR_COMPONENT, icalcomponent_vanew( ICAL_VEVENT_COMPONENT, - icalproperty_new_dtstart(icaltime_from_string("19970801T1200")), - icalproperty_new_dtend(icaltime_from_string("19970801T1300")), + icalproperty_new_dtstart(icaltime_from_string("19970801T120000")), + icalproperty_new_dtend(icaltime_from_string("19970801T130000")), 0 ), 0); @@ -1970,7 +2175,7 @@ void test_convenience(){ 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; + duration = icaldurationtype_as_int(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))); @@ -1982,18 +2187,18 @@ void test_convenience(){ ICAL_VCALENDAR_COMPONENT, icalcomponent_vanew( ICAL_VEVENT_COMPONENT, - icalproperty_new_dtstart(icaltime_from_string("19970801T1200Z")), + icalproperty_new_dtstart(icaltime_from_string("19970801T120000Z")), icalproperty_new_duration(icaldurationtype_from_string("PT1H30M")), 0 ), 0); - icalcomponent_set_dtend(c,icaltime_from_string("19970801T1330Z")); + icalcomponent_set_dtend(c,icaltime_from_string("19970801T133000Z")); 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; + duration = icaldurationtype_as_int(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))); @@ -2009,14 +2214,14 @@ void test_convenience(){ ), 0); - icalcomponent_set_dtstart(c,icaltime_from_string("19970801T1200Z")); - icalcomponent_set_dtend(c,icaltime_from_string("19970801T1330Z")); + icalcomponent_set_dtstart(c,icaltime_from_string("19970801T120000Z")); + icalcomponent_set_dtend(c,icaltime_from_string("19970801T133000Z")); 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; + duration = icaldurationtype_as_int(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))); @@ -2033,14 +2238,14 @@ void test_convenience(){ 0); - icalcomponent_set_dtstart(c,icaltime_from_string("19970801T1200Z")); + icalcomponent_set_dtstart(c,icaltime_from_string("19970801T120000Z")); 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; + duration = icaldurationtype_as_int(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))); @@ -2050,92 +2255,824 @@ void test_convenience(){ } -int main(int argc, char *argv[]) +void test_time_parser() { + struct icaltimetype tt; - printf("\n------------Test recur bug ----------\n"); - test_recur_bug(); + icalerror_errors_are_fatal = 0; - exit(0); + tt = icaltime_from_string("19970101T1000"); + assert(icaltime_is_null_time(tt)); - printf("\n------------Test recur---------------\n"); - test_recur(); + tt = icaltime_from_string("19970101X100000"); + assert(icaltime_is_null_time(tt)); - printf("\n------------Test FBlist------------\n"); - test_fblist(); + tt = icaltime_from_string("19970101T100000"); + assert(!icaltime_is_null_time(tt)); + printf("%s\n",icaltime_as_ctime(tt)); - printf("\n------------Test time----------------\n"); - test_time(); + tt = icaltime_from_string("19970101T100000Z"); + assert(!icaltime_is_null_time(tt)); + printf("%s\n",icaltime_as_ctime(tt)); + tt = icaltime_from_string("19970101"); + assert(!icaltime_is_null_time(tt)); + printf("%s\n",icaltime_as_ctime(tt)); - printf("\n------------Test Overlaps------------\n"); - test_overlaps(); + icalerror_errors_are_fatal = 1; +} + +void test_recur_parser() +{ + struct icalrecurrencetype rt; - printf("\n------------Test Span----------------\n"); - test_span(); + printf("FREQ=YEARLY;UNTIL=20000131T090000Z;BYMONTH=1,2,3,4,8;BYYEARDAY=34,65,76,78;BYDAY=-1TU,3WE,-4FR,SU,SA\n"); + rt = icalrecurrencetype_from_string("FREQ=YEARLY;UNTIL=20000131T090000Z;BYMONTH=1,2,3,4,8;BYYEARDAY=34,65,76,78;BYDAY=-1TU,3WE,-4FR,SU,SA"); - printf("\n------------Test duration---------------\n"); - test_duration(); + printf("%s\n\n",icalrecurrencetype_as_string(&rt)); - exit(0); + printf("FREQ=DAILY;COUNT=3;BYMONTH=1,2,3,4,8;BYYEARDAY=34,65,76,78;BYDAY=-1TU,3WE,-4FR,SU,S\n"); + + rt = icalrecurrencetype_from_string("FREQ=DAILY;COUNT=3;BYMONTH=1,2,3,4,8;BYYEARDAY=34,65,76,78;BYDAY=-1TU,3WE,-4FR,SU,SA"); + + printf("%s\n",icalrecurrencetype_as_string(&rt)); + +} + +void test_doy() +{ + struct icaltimetype tt1, tt2; + short doy; + + tt1 = icaltime_from_string("19950301"); + doy = icaltime_day_of_year(tt1); + tt2 = icaltime_from_day_of_year(doy,1995); + printf("%d %s %s\n",doy, icaltime_as_ctime(tt1),icaltime_as_ctime(tt2)); + + tt1 = icaltime_from_string("19960301"); + doy = icaltime_day_of_year(tt1); + tt2 = icaltime_from_day_of_year(doy,1996); + printf("%d %s %s\n",doy, icaltime_as_ctime(tt1),icaltime_as_ctime(tt2)); + + tt1 = icaltime_from_string("19970301"); + doy = icaltime_day_of_year(tt1); + tt2 = icaltime_from_day_of_year(doy,1997); + printf("%d %s %s\n",doy, icaltime_as_ctime(tt1),icaltime_as_ctime(tt2)); + + +} + +void test_x(){ + +#ifdef HAVE_CONFIG_H +#include <config.h> +#endif + +#include <stdio.h> +#include <stdlib.h> +#include <ical.h> + static const char test_icalcomp_str[] = +"BEGIN:VEVENT\r\n" +"RRULE\r\n" +" ;X-EVOLUTION-ENDDATE=20030209T081500\r\n" +" :FREQ=DAILY;COUNT=10;INTERVAL=6\r\n" +"X-COMMENT;X-FOO=BAR: Booga\r\n" +"END:VEVENT\r\n"; + + icalcomponent *icalcomp; + icalproperty *prop; + struct icalrecurrencetype recur; + int n_errors; + + icalcomp = icalparser_parse_string ((char *) test_icalcomp_str); + if (!icalcomp) { + fprintf (stderr, "main(): could not parse the component\n"); + exit (EXIT_FAILURE); + } + + printf("%s\n\n",icalcomponent_as_ical_string(icalcomp)); + + n_errors = icalcomponent_count_errors (icalcomp); + if (n_errors) { + icalproperty *p; + + for (p = icalcomponent_get_first_property (icalcomp, + ICAL_XLICERROR_PROPERTY); + p; + p = icalcomponent_get_next_property (icalcomp, + ICAL_XLICERROR_PROPERTY)) { + char *str; + + str = icalproperty_as_ical_string (p); + fprintf (stderr, "error: %s\n", str); + } + } + + prop = icalcomponent_get_first_property (icalcomp, ICAL_RRULE_PROPERTY); + if (!prop) { + fprintf (stderr, "main(): could not get the RRULE property"); + exit (EXIT_FAILURE); + } + + recur = icalproperty_get_rrule (prop); + + printf("%s\n",icalrecurrencetype_as_string(&recur)); + +} + +void test_gauge_sql() { + + + icalgauge *g; + + printf("\nSELECT DTSTART,DTEND,COMMENT FROM VEVENT,VTODO WHERE VEVENT.SUMMARY = 'Bongoa' AND SEQUENCE < 5\n"); + + g = icalgauge_new_from_sql("SELECT DTSTART,DTEND,COMMENT FROM VEVENT,VTODO WHERE VEVENT.SUMMARY = 'Bongoa' AND SEQUENCE < 5"); + + icalgauge_dump(g); + + icalgauge_free(g); + + printf("\nSELECT * FROM VEVENT,VTODO WHERE VEVENT.SUMMARY = 'Bongoa' AND SEQUENCE < 5 OR METHOD != 'CREATE'\n"); + + g = icalgauge_new_from_sql("SELECT * FROM VEVENT,VTODO WHERE VEVENT.SUMMARY = 'Bongoa' AND SEQUENCE < 5 OR METHOD != 'CREATE'"); + + icalgauge_dump(g); + + icalgauge_free(g); + +} + +void test_gauge_compare() { + + icalgauge *g; + icalcomponent *c; + + /* Equality */ + + c = icalcomponent_vanew(ICAL_VCALENDAR_COMPONENT, + icalcomponent_vanew(ICAL_VEVENT_COMPONENT, + icalproperty_new_dtstart( + icaltime_from_string("20000101T000002")),0),0); + + g = icalgauge_new_from_sql( + "SELECT * FROM VEVENT WHERE DTSTART = '20000101T000002'"); + + printf("SELECT * FROM VEVENT WHERE DTSTART = '20000101T000002'\n"); + assert(c!=0); + assert(g!=0); + + assert(icalgauge_compare(g,c) == 1); + + icalgauge_free(g); + + + g = icalgauge_new_from_sql( + "SELECT * FROM VEVENT WHERE DTSTART = '20000101T000001'"); + + printf("SELECT * FROM VEVENT WHERE DTSTART = '20000101T000001'\n"); - printf("\n------------Test Convenience ------------\n"); - test_convenience(); + assert(g!=0); + assert(icalgauge_compare(g,c) == 0); + + icalgauge_free(g); + + g = icalgauge_new_from_sql( + "SELECT * FROM VEVENT WHERE DTSTART != '20000101T000003'"); + + printf("SELECT * FROM VEVENT WHERE DTSTART != '20000101T000003'\n"); + + + assert(g!=0); + assert(icalgauge_compare(g,c) == 1); + + icalgauge_free(g); + + + /* Less than */ + + g = icalgauge_new_from_sql( + "SELECT * FROM VEVENT WHERE DTSTART < '20000101T000003'"); + + printf("SELECT * FROM VEVENT WHERE DTSTART < '20000101T000003'\n"); + + assert(icalgauge_compare(g,c) == 1); + + assert(g!=0); + icalgauge_free(g); + + g = icalgauge_new_from_sql( + "SELECT * FROM VEVENT WHERE DTSTART < '20000101T000002'"); + + printf("SELECT * FROM VEVENT WHERE DTSTART < '20000101T000002'\n"); + + + assert(g!=0); + assert(icalgauge_compare(g,c) == 0); + + icalgauge_free(g); + + /* Greater than */ + + g = icalgauge_new_from_sql( + "SELECT * FROM VEVENT WHERE DTSTART > '20000101T000001'"); + + printf("SELECT * FROM VEVENT WHERE DTSTART > '20000101T000001'\n"); + + + assert(g!=0); + assert(icalgauge_compare(g,c) == 1); + + icalgauge_free(g); + + g = icalgauge_new_from_sql( + "SELECT * FROM VEVENT WHERE DTSTART > '20000101T000002'"); + + printf("SELECT * FROM VEVENT WHERE DTSTART > '20000101T000002'\n"); + + + assert(g!=0); + assert(icalgauge_compare(g,c) == 0); + + icalgauge_free(g); + + + /* Greater than or Equal to */ + + g = icalgauge_new_from_sql( + "SELECT * FROM VEVENT WHERE DTSTART >= '20000101T000002'"); + + printf("SELECT * FROM VEVENT WHERE DTSTART >= '20000101T000002'\n"); + + + assert(g!=0); + assert(icalgauge_compare(g,c) == 1); + + icalgauge_free(g); + + g = icalgauge_new_from_sql( + "SELECT * FROM VEVENT WHERE DTSTART >= '20000101T000003'"); + + printf("SELECT * FROM VEVENT WHERE DTSTART >= '20000101T000003'\n"); + + + assert(g!=0); + assert(icalgauge_compare(g,c) == 0); + + icalgauge_free(g); + + /* Less than or Equal to */ + + g = icalgauge_new_from_sql( + "SELECT * FROM VEVENT WHERE DTSTART <= '20000101T000002'"); + + printf("SELECT * FROM VEVENT WHERE DTSTART <= '20000101T000002'\n"); + + + assert(g!=0); + assert(icalgauge_compare(g,c) == 1); + + icalgauge_free(g); + + g = icalgauge_new_from_sql( + "SELECT * FROM VEVENT WHERE DTSTART <= '20000101T000001'"); + + printf("SELECT * FROM VEVENT WHERE DTSTART <= '20000101T000001'\n"); + + + assert(g!=0); + assert(icalgauge_compare(g,c) == 0); + + icalgauge_free(g); + + icalcomponent_free(c); + + + /* Complex comparisions */ + + c = icalcomponent_vanew( + ICAL_VCALENDAR_COMPONENT, + icalproperty_new_method(ICAL_METHOD_REQUEST), + icalcomponent_vanew( + ICAL_VEVENT_COMPONENT, + icalproperty_new_dtstart( + icaltime_from_string("20000101T000002")), + icalproperty_new_comment("foo"), + icalcomponent_vanew( + ICAL_VALARM_COMPONENT, + icalproperty_new_dtstart( + icaltime_from_string("20000101T120000")), + + 0), + 0), + 0); + g = icalgauge_new_from_sql( + "SELECT * FROM VEVENT WHERE VALARM.DTSTART = '20000101T120000'"); + + printf("SELECT * FROM VEVENT WHERE VALARM.DTSTART = '20000101T120000'\n"); + + assert(icalgauge_compare(g,c) == 1); + + icalgauge_free(g); - printf("\n------------Test classify ---------------\n"); - test_classify(); + g = icalgauge_new_from_sql( + "SELECT * FROM VEVENT WHERE COMMENT = 'foo'"); - printf("\n------------Test Memory---------------\n"); - test_memory(); + printf("SELECT * FROM VEVENT WHERE COMMENT = 'foo'\n"); + assert(icalgauge_compare(g,c) == 1); - printf("\n------------Test Iterators-----------\n"); - test_iterators(); + icalgauge_free(g); - printf("\n------------Test Restriction---------------\n"); - test_restriction(); - printf("\n------------Test request status-------\n"); - test_requeststat(); + g = icalgauge_new_from_sql( + "SELECT * FROM VEVENT WHERE COMMENT = 'foo' AND VALARM.DTSTART = '20000101T120000'"); - printf("\n------------Test strings---------------\n"); - test_strings(); + printf("SELECT * FROM VEVENT WHERE COMMENT = 'foo' AND VALARM.DTSTART = '20000101T120000'\n"); - printf("\n------------Test Compare---------------\n"); - test_compare(); + assert(icalgauge_compare(g,c) == 1); - printf("\n------------Test Values---------------\n"); - test_values(); + icalgauge_free(g); + + icalcomponent_free(c); - printf("\n------------Test Parameters-----------\n"); - test_parameters(); +} - printf("\n------------Test Properties-----------\n"); - test_properties(); +icalcomponent* make_component(int i){ + + icalcomponent *c; - printf("\n------------Test Components ----------\n"); - test_components(); + struct icaltimetype t = icaltime_from_string("20000101T120000Z"); - printf("\n------------Create Components --------\n"); - create_new_component(); + t.day += i; - printf("\n----- Create Components with vaargs ---\n"); - create_new_component_with_va_args(); + icaltime_normalize(t); + c = icalcomponent_vanew( + ICAL_VCALENDAR_COMPONENT, + icalproperty_new_method(ICAL_METHOD_REQUEST), + icalcomponent_vanew( + ICAL_VEVENT_COMPONENT, + icalproperty_new_dtstart(t), + 0), + 0); + + assert(c != 0); + + return c; + +} +void test_fileset() +{ + icalfileset *fs; + icalcomponent *c; + int i; + char *path = "test_fileset.ics"; + icalgauge *g = icalgauge_new_from_sql( + "SELECT * FROM VEVENT WHERE DTSTART > '20000103T120000Z' AND DTSTART <= '20000106T120000Z'"); + + + unlink(path); + + fs = icalfileset_new(path); - return 0; + assert(fs != 0); + + for (i = 0; i!= 10; i++){ + c = make_component(i); + icalfileset_add_component(fs,c); + } + + icalfileset_commit(fs); + + icalfileset_free(fs); + fs = icalfileset_new(path); + + + printf("== No Selections \n"); + + for (c = icalfileset_get_first_component(fs); + c != 0; + c = icalfileset_get_next_component(fs)){ + struct icaltimetype t = icalcomponent_get_dtstart(c); + + printf("%s\n",icaltime_as_ctime(t)); + } + + icalfileset_select(fs,g); + + printf("\n== DTSTART > '20000103T120000Z' AND DTSTART <= '20000106T120000Z' \n"); + + for (c = icalfileset_get_first_component(fs); + c != 0; + c = icalfileset_get_next_component(fs)){ + struct icaltimetype t = icalcomponent_get_dtstart(c); - printf("\n------------Test icalset ---------------\n"); - test_icalset(); + printf("%s\n",icaltime_as_ctime(t)); + } + + icalfileset_free(fs); +} + +void microsleep(int us) +{ + struct timeval tv; + + tv.tv_sec = 0; + tv.tv_usec = us; + + select(0,0,0,0,&tv); + +} + + +void test_file_locks() +{ + pid_t pid; + char *path = "test_fileset_locktest.ics"; + icalfileset *fs; + icalcomponent *c, *c2; + struct icaldurationtype d; + int i; + int final,sec; + + icalfileset_safe_saves = 1; + + icalerror_clear_errno(); + + unlink(path); + + fs = icalfileset_new(path); + + if(icalfileset_get_first_component(fs)==0){ + c = make_component(0); + + d = icaldurationtype_from_int(1); + + icalcomponent_set_duration(c,d); + + icalfileset_add_component(fs,c); + + c2 = icalcomponent_new_clone(c); + + icalfileset_add_component(fs,c2); + + icalfileset_commit(fs); + } + + icalfileset_free(fs); + + assert(icalerrno == ICAL_NO_ERROR); + + pid = fork(); + + assert(pid >= 0); + + if(pid == 0){ + /*child*/ + int i; + + microsleep(rand()/(RAND_MAX/100)); + + for(i = 0; i< 50; i++){ + fs = icalfileset_new(path); + assert(fs != 0); + + c = icalfileset_get_first_component(fs); + + assert(c!=0); + + d = icalcomponent_get_duration(c); + d = icaldurationtype_from_int(icaldurationtype_as_int(d)+1); + + icalcomponent_set_duration(c,d); + icalcomponent_set_summary(c,"Child"); + + c2 = icalcomponent_new_clone(c); + icalcomponent_set_summary(c2,"Child"); + icalfileset_add_component(fs,c2); + + icalfileset_mark(fs); + icalfileset_commit(fs); + + icalfileset_free(fs); + + microsleep(rand()/(RAND_MAX/20)); + + + } + + exit(0); + + } else { + /* parent */ + int i; + + for(i = 0; i< 50; i++){ + fs = icalfileset_new(path); + + assert(fs != 0); + + c = icalfileset_get_first_component(fs); + + assert(c!=0); + + d = icalcomponent_get_duration(c); + d = icaldurationtype_from_int(icaldurationtype_as_int(d)+1); + + icalcomponent_set_duration(c,d); + icalcomponent_set_summary(c,"Parent"); + + c2 = icalcomponent_new_clone(c); + icalcomponent_set_summary(c2,"Parent"); + icalfileset_add_component(fs,c2); + + icalfileset_mark(fs); + icalfileset_commit(fs); + icalfileset_free(fs); + + putc('.',stdout); + fflush(stdout); + + } + } + + assert(waitpid(pid,0,0)==pid); + + + fs = icalfileset_new(path); + + i=1; + + c = icalfileset_get_first_component(fs); + final = icaldurationtype_as_int(icalcomponent_get_duration(c)); + for (c = icalfileset_get_next_component(fs); + c != 0; + c = icalfileset_get_next_component(fs)){ + struct icaldurationtype d = icalcomponent_get_duration(c); + sec = icaldurationtype_as_int(d); + + /*printf("%d,%d ",i,sec);*/ + assert(i == sec); + i++; + } + + printf("\nFinal: %d\n",final); + + + assert(sec == final); +} + + +void test_trigger() +{ + + static const char test_icalcomp_str[] = +"BEGIN:VEVENT\n" +"TRIGGER;VALUE=DATE-TIME:19980403T120000\n" +"TRIGGER:-PT15M\n" +"TRIGGER:19980403T120000\n" +"END:VEVENT\r\n"; + + icalcomponent *c; + icalproperty *p; + struct icaltriggertype tr; + + + c = icalparser_parse_string ((char *) test_icalcomp_str); + if (!c) { + fprintf (stderr, "main(): could not parse the component\n"); + exit (EXIT_FAILURE); + } + + printf("%s\n\n",icalcomponent_as_ical_string(c)); + + for(p = icalcomponent_get_first_property(c,ICAL_TRIGGER_PROPERTY); + p != 0; + p = icalcomponent_get_next_property(c,ICAL_TRIGGER_PROPERTY)){ + tr = icalproperty_get_trigger(p); + + if(!icaltime_is_null_time(tr.time)){ + printf("value=DATE-TIME:%s\n", icaltime_as_ical_string(tr.time)); + } else { + printf("value=DURATION:%s\n", icaldurationtype_as_ical_string(tr.duration)); + } + } +} + +int main(int argc, char *argv[]) +{ + int c; + extern char *optarg; + extern int optind, optopt; + int errflg=0; + char* program_name = strrchr(argv[0],'/'); + int ttime=0, trecur=0,tspan=0, tmisc=0, tgauge = 0, tfile = 0; + + if(argc==1) { + ttime = trecur = tspan = tmisc = tgauge = tfile = 1; + } + + while ((c = getopt(argc, argv, "t:s:r:m:g:f:")) != -1) { + switch (c) { + + case 't': { + ttime = atoi(optarg); + break; + } + + case 's': { + tspan = atoi(optarg); + break; + } + + case 'r': { + trecur = atoi(optarg); + break; + } + + + case 'm': { + tmisc = atoi(optarg); + break; + } + + + case 'g': { + tgauge = atoi(optarg); + break; + } + + case 'f': { + tfile = atoi(optarg); + break; + } + + case ':': {/* Option given without an operand */ + fprintf(stderr, + "%s: Option -%c requires an operand\n", + program_name,optopt); + errflg++; + break; + } + case '?': { + errflg++; + } + + } + + } + + + if(ttime==1 || ttime==2){ + printf("\n------------Test time parser ----------\n"); + test_time_parser(); + + } + + if(ttime==1 || ttime==3){ + printf("\n------------Test time----------------\n"); + test_time(); + } + + if(ttime==1 || ttime==4){ + printf("\n------------Test day of year---------\n"); + test_doy(); + } + + if(ttime==1 || ttime==5){ + printf("\n------------Test duration---------------\n"); + test_duration(); + } + + if(ttime==1 || ttime==6){ + printf("\n------------Test period ----------------\n"); + test_period(); + } + + + + if(trecur==1 || trecur==2){ + printf("\n------------Test recur parser ----------\n"); + test_recur_parser(); + } + + if(trecur==1 || trecur==3){ + printf("\n------------Test recur---------------\n"); + test_recur(); + } + + if(trecur==1 || trecur==4){ + printf("\n------------Test parameter bug---------\n"); + test_recur_parameter_bug(); + } + + + if(tspan==1 || tspan==2){ + printf("\n------------Test FBlist------------\n"); + test_fblist(); + } + + if(tspan==1 || tspan==3){ + printf("\n------------Test Overlaps------------\n"); + test_overlaps(); + } + + if(tspan==1 || tspan==4){ + printf("\n------------Test Span----------------\n"); + test_span(); + } + + if(tgauge == 1 || tgauge == 2){ + printf("\n------------Test Gauge SQL----------------\n"); + test_gauge_sql(); + } + + if(tgauge == 1 || tgauge == 3){ + printf("\n------------Test Gauge Compare--------------\n"); + test_gauge_compare(); + } + + if(tfile ==1 || tfile == 2){ + printf("\n------------Test File Set--------------\n"); + test_fileset(); + } + + if(tfile ==1 || tfile == 3){ + printf("\n------------Test File Locks--------------\n"); + test_file_locks(); + } + + + + if(tmisc == 1 || tmisc == 2){ + printf("\n------------Test X Props and Params--------\n"); + test_x(); + } + + if(tmisc == 1 || tmisc == 3){ + printf("\n------------Test Trigger ------------------\n"); + test_trigger(); + } + + + if(tmisc == 1){ + + printf("\n------------Test Convenience ------------\n"); + test_convenience(); + + + printf("\n------------Test classify ---------------\n"); + test_classify(); + + + printf("\n------------Test Iterators-----------\n"); + test_iterators(); + + printf("\n------------Test Restriction---------------\n"); + test_restriction(); + + printf("\n-----------Test request status-------\n"); + test_requeststat(); + + printf("\n------------Test strings---------------\n"); + test_strings(); + + printf("\n------------Test Compare---------------\n"); + test_compare(); + + printf("\n------------Test Values---------------\n"); + test_values(); + + printf("\n------------Test Parameters-----------\n"); + test_parameters(); + + printf("\n------------Test Properties-----------\n"); + test_properties(); + + printf("\n------------Test Components ----------\n"); + test_components(); + + printf("\n------------Create Components --------\n"); + create_new_component(); + + printf("\n----- Create Components with vaargs ---\n"); + create_new_component_with_va_args(); + + printf("\n------------Test Memory---------------\n"); + test_memory(); + } + + return 0; } diff --git a/libical/src/test/storage.c b/libical/src/test/storage.c index 8251babefe..2d8bc586f4 100644 --- a/libical/src/test/storage.c +++ b/libical/src/test/storage.c @@ -113,7 +113,7 @@ void test_fileset() struct icaltimetype start, end; icalcomponent *c,*clone, *itr; - start = icaltime_from_timet( time(0),0,0); + start = icaltime_from_timet( time(0),0); end = start; end.hour++; @@ -244,7 +244,7 @@ int test_dirset() assert(s != 0); - rtime.start = icaltime_from_timet( time(0),0,0); + rtime.start = icaltime_from_timet( time(0),0); cluster = icalfileset_new(OUTPUT_FILE); diff --git a/libical/src/test/stow.c b/libical/src/test/stow.c index a305d161fe..2570e3ad0c 100644 --- a/libical/src/test/stow.c +++ b/libical/src/test/stow.c @@ -745,7 +745,6 @@ icalcomponent* read_nonmime_component(struct options_struct *opt) comp = icalparser_add_line(parser,line); if (comp != 0){ - icalparser_claim(parser); return comp; } diff --git a/libical/test-data/2445.ics b/libical/test-data/2445.ics index 7cce109ec3..ce94e62e9f 100644 --- a/libical/test-data/2445.ics +++ b/libical/test-data/2445.ics @@ -209,6 +209,7 @@ ACTION:PROCEDURE ATTACH;FMTTYPE=application/binary:ftp://host.com/novo- procs/felizano.exe END:VALARM + BEGIN:VCALENDAR PRODID:-//RDU Software//NONSGML HandCal//EN VERSION:2.0 @@ -245,6 +246,8 @@ DTEND;TZID=US-Eastern:19980312T093000 LOCATION:1CP Conference Room 4350 END:VEVENT END:VCALENDAR + + BEGIN:VCALENDAR METHOD:PUBLISH VERSION:2.0 diff --git a/libical/test-data/2446.ics b/libical/test-data/2446.ics index 0b86aa42c1..032276c3a8 100644 --- a/libical/test-data/2446.ics +++ b/libical/test-data/2446.ics @@ -26,6 +26,7 @@ UID:0981234-1234234-23@example.com SUMMARY:ST. PAUL SAINTS -VS- DULUTH-SUPERIOR DUKES END:VEVENT END:VCALENDAR + BEGIN:VCALENDAR METHOD:CANCEL VERSION:2.0 @@ -38,6 +39,7 @@ UID:0981234-1234234-23@example.com DTSTAMP:19970613T190000Z END:VEVENT END:VCALENDAR + BEGIN:VCALENDAR PRODID:-//ACME/DesktopCalendar//EN METHOD:PUBLISH @@ -179,6 +181,7 @@ DTSTAMP:19970611T190000Z STATUS:CONFIRMED END:VEVENT END:VCALENDAR + BEGIN:VCALENDAR PRODID:-//ACME/DesktopCalendar//EN METHOD:COUNTER @@ -199,6 +202,7 @@ UID:calsrv.example.com-873970198738777a@example.com SEQUENCE:0 END:VEVENT END:VCALENDAR + BEGIN:VCALENDAR PRODID:-//ACME/DesktopCalendar//EN METHOD:REQUEST |