aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFederico Mena Quintero <federico@src.gnome.org>2000-12-12 06:07:15 +0800
committerFederico Mena Quintero <federico@src.gnome.org>2000-12-12 06:07:15 +0800
commit58e970b8a8ed22aa9494da9a92eb8b1a18406971 (patch)
treeefb0f1cdc05d3b4df704f79db55ce5f7c65c794e
parent10962e544600fa3516d77ed2bb5a7f25fe8cde91 (diff)
downloadgsoc2013-evolution-58e970b8a8ed22aa9494da9a92eb8b1a18406971.tar
gsoc2013-evolution-58e970b8a8ed22aa9494da9a92eb8b1a18406971.tar.gz
gsoc2013-evolution-58e970b8a8ed22aa9494da9a92eb8b1a18406971.tar.bz2
gsoc2013-evolution-58e970b8a8ed22aa9494da9a92eb8b1a18406971.tar.lz
gsoc2013-evolution-58e970b8a8ed22aa9494da9a92eb8b1a18406971.tar.xz
gsoc2013-evolution-58e970b8a8ed22aa9494da9a92eb8b1a18406971.tar.zst
gsoc2013-evolution-58e970b8a8ed22aa9494da9a92eb8b1a18406971.zip
Libical 0.21 plus our fixes - Federico
svn path=/branches/ebusboom/; revision=6917
-rw-r--r--libical/AUTHORS1
-rw-r--r--libical/ChangeLog166
-rw-r--r--libical/INSTALL4
-rw-r--r--libical/Makefile.am2
-rw-r--r--libical/NEWS56
-rw-r--r--libical/README25
-rw-r--r--libical/THANKS14
-rw-r--r--libical/TODO3
-rw-r--r--libical/acconfig.h3
-rw-r--r--libical/aclocal.m4447
-rw-r--r--libical/config.h.in7
-rw-r--r--libical/configure.in45
-rw-r--r--libical/design-data/Makefile.in10
-rw-r--r--libical/design-data/param-c-types.txt22
-rw-r--r--libical/design-data/prop-to-value.txt2
-rw-r--r--libical/design-data/restrictions.csv122
-rw-r--r--libical/design-data/value-c-types.txt45
-rw-r--r--libical/doc/Makefile.in10
-rw-r--r--libical/doc/UsingLibical.lyx346
-rw-r--r--libical/doc/UsingLibical.ps2595
-rw-r--r--libical/doc/UsingLibical.txt395
-rw-r--r--libical/examples/Makefile.am5
-rw-r--r--libical/examples/Makefile.in109
-rw-r--r--libical/examples/access_components.c58
-rw-r--r--libical/examples/access_properties_and_parameters.c6
-rw-r--r--libical/examples/errors.c2
-rw-r--r--libical/examples/main.c7
-rw-r--r--libical/examples/parse_text.c3
-rw-r--r--libical/scripts/Makefile.in10
-rwxr-xr-xlibical/scripts/mkderivedparameters.pl2
-rwxr-xr-xlibical/scripts/mkderivedproperties.pl3
-rwxr-xr-xlibical/scripts/mkderivedvalues.pl13
-rwxr-xr-xlibical/scripts/mkrestrictiontable.pl6
-rw-r--r--libical/src/libical/Makefile.am274
-rw-r--r--libical/src/libical/Makefile.in325
-rw-r--r--libical/src/libical/ical.h2432
-rw-r--r--libical/src/libical/icalcomponent.c521
-rw-r--r--libical/src/libical/icalcomponent.h77
-rw-r--r--libical/src/libical/icalenums.c154
-rw-r--r--libical/src/libical/icalenums.h66
-rw-r--r--libical/src/libical/icalerror.c9
-rw-r--r--libical/src/libical/icalerror.h17
-rw-r--r--libical/src/libical/icallexer.c526
-rw-r--r--libical/src/libical/icallexer.l38
-rw-r--r--libical/src/libical/icalmemory.c23
-rw-r--r--libical/src/libical/icalmemory.h31
-rw-r--r--libical/src/libical/icalmime.c86
-rw-r--r--libical/src/libical/icalmime.h14
-rw-r--r--libical/src/libical/icalparameter.c247
-rw-r--r--libical/src/libical/icalparameter.h78
-rw-r--r--libical/src/libical/icalparser.c24
-rw-r--r--libical/src/libical/icalparser.h10
-rw-r--r--libical/src/libical/icalproperty.c370
-rw-r--r--libical/src/libical/icalproperty.h262
-rw-r--r--libical/src/libical/icalrecur.c249
-rw-r--r--libical/src/libical/icalrecur.h108
-rw-r--r--libical/src/libical/icalrestriction.c369
-rw-r--r--libical/src/libical/icalrestriction.h12
-rw-r--r--libical/src/libical/icaltime.c237
-rw-r--r--libical/src/libical/icaltime.h67
-rw-r--r--libical/src/libical/icaltypes.c70
-rw-r--r--libical/src/libical/icaltypes.h85
-rw-r--r--libical/src/libical/icalvalue.c156
-rw-r--r--libical/src/libical/icalvalue.h50
-rw-r--r--libical/src/libical/icalversion.h.in4
-rw-r--r--libical/src/libical/icalyacc.c829
-rw-r--r--libical/src/libical/icalyacc.h286
-rw-r--r--libical/src/libical/icalyacc.y91
-rw-r--r--libical/src/libical/pvl.c8
-rw-r--r--libical/src/libical/pvl.h2
-rw-r--r--libical/src/libical/sspm.c482
-rw-r--r--libical/src/libical/sspm.h27
-rw-r--r--libical/src/libicalss/Makefile.am85
-rw-r--r--libical/src/libicalss/icalcstp.h174
-rw-r--r--libical/src/libicalss/icaldirset.c125
-rw-r--r--libical/src/libicalss/icaldirset.h20
-rw-r--r--libical/src/libicalss/icalfileset.c183
-rw-r--r--libical/src/libicalss/icalfileset.h21
-rw-r--r--libical/src/libicalss/icalfilesetimpl.h4
-rw-r--r--libical/src/libicalss/icalgauge.c55
-rw-r--r--libical/src/libicalss/icalgauge.h10
-rw-r--r--libical/src/libicalss/icalset.c337
-rw-r--r--libical/src/libicalss/icalset.h17
-rw-r--r--libical/src/libicalvcal/Makefile.am38
-rw-r--r--libical/src/libicalvcal/Makefile.in183
-rw-r--r--libical/src/libicalvcal/icalvcal.c27
-rw-r--r--libical/src/libicalvcal/vcc.c123
-rw-r--r--libical/src/libicalvcal/vcc.y46
-rw-r--r--libical/src/test/Makefile.am23
-rw-r--r--libical/src/test/copycluster.c10
-rw-r--r--libical/src/test/recur.c6
-rw-r--r--libical/src/test/regression.c706
-rw-r--r--libical/src/test/storage.c30
-rw-r--r--libical/src/test/stow.c38
-rw-r--r--libical/src/test/testmime.c5
-rw-r--r--libical/test-data/12
-rw-r--r--libical/test-data/2445.ics7
-rw-r--r--libical/test-data/2446.ics2
-rw-r--r--libical/test-data/Makefile.am8
-rw-r--r--libical/test-data/Makefile.in12
100 files changed, 11348 insertions, 4209 deletions
diff --git a/libical/AUTHORS b/libical/AUTHORS
index e69de29bb2..659288c31d 100644
--- a/libical/AUTHORS
+++ b/libical/AUTHORS
@@ -0,0 +1 @@
+Eric Busboom <eric@softwarestudio.org>
diff --git a/libical/ChangeLog b/libical/ChangeLog
index 05450061b0..c64bc7688e 100644
--- a/libical/ChangeLog
+++ b/libical/ChangeLog
@@ -1,4 +1,162 @@
-2000-08-04 <eric@softwarestudio.org>
+2000-12-11 JP Rosevear <jpr@helixcode.com>
+
+ * src/libical/icaltime.c (icaltime_compare_date_only): New
+ function that compares only the dates, not the times as well.
+
+ * src/libical/icaltime.h: Add prototype for the function above.
+
+ * src/libical/icalrecur.h (struct icalrecurrencetype): Correct
+ header documentation.
+
+ * src/libical/icaltypes.c: No longer include <limits.h>.
+
+ * src/libical/icalrecur.c: Likewise.
+
+ * src/libical/icalvalue.c: Likewise.
+
+ * src/libical/icalyacc.y: Likewise.
+
+2000-12-11 Federico Mena Quintero <federico@helixcode.com>
+
+ * configure.in (AC_OUTPUT): Fixed order of generated files to make
+ "make distcheck" work. Turn on AM_MAINTAINER_MODE.
+
+ * src/libical/Makefile.am (EXTRA_DIST): Add icalversion.h.in.
+ (COMBINEDHEADERS): Added paths to make "make distcheck" work.
+ (libical_la_SOURCES): Added headers for distribution in our weird
+ setup.
+
+2000-11-21 Eric Busboom <eric@softwarestudio.org>
+
+ * icalrecur.c Fixed a bug in the increment_* routines that made
+ incrementing by more then 1 insensible. Thanks to Martin Neimeier
+
+2000-11-20 Eric Busboom <eric@softwarestudio.org>
+
+ * icalmessage.c Many routines to create new ical messages.
+
+ * icalspanlist.c Code to generate a list of the busy time f the
+ VEVENTS in a set. Also includes routiens to generate free and busy
+ lists from the spanlist, and to find the next free time after a
+ given time.
+
+ * icalvalue.c The STATUS property now has its own value type,
+ STATUS, which holds the enumeration icalproperty_status.
+
+ * icalrestriction.c Added more restrictions. Now handles mutual
+ and exclusive consitions, and checks for the reight values in
+ STATUS properties
+
+
+2000-11-10 Eric Busboom <eric@softwarestudio.org>
+
+ * icaltypes.c Added routine to create durationtype from string:
+ icaldurationtype_from_string
+
+2000-11-09 Eric Busboom <eric@softwarestudio.org>
+
+ * icalcomponet.c Add sever get/set convienience routines to access
+ and manipulate common component propoerties from the component
+ interface. This eliminates the need to create a lot of temporary
+ variables if you just want to change the start time of and event.
+
+2000-11-06 Eric Busboom <eric@softwarestudio.org>
+
+ * icalcomponent.c Added new routines to icalcomponent:
+ _get_span -- returns the start and end times of the event in UTC
+ _get_first_real_component -- return ref to VTODO, VEVENT or VJOURNAL
+
+ * icalspanlist.c Added new class, icalspanlist, that generates a
+ list of alternating busy and free times from an icalset. The class
+ includes routines to gnerate rfc2445 busy and free lists, and to
+ get the next avaliable busy or free time after a given time.
+
+2000-11-06 Federico Mena Quintero <federico@helixcode.com>
+
+ * src/libical/icalvalue.c (icalvalue_recur_as_ical_string): Handle
+ both the position and weekday in the by_day field.
+
+2000-10-20 Eric Busboom <eric@agony.busboom.org>
+
+ * Const correctness. Added 'const' all over everywhere.
+
+2000-10-19 Eric Busboom <eric@agony.busboom.org>
+
+ * icalproperty, icalparameter, icalvalue .c, .h Changed most
+ instances of char* to const char*
+
+ * icalclassify.h Added multiple include protection
+
+ * icalset.h and others, got rid of parameter named "new"
+
+2000-10-15 Eric Busboom <eric@softwarestudio.org>
+
+ * icalcomponent Added convienience functions for constructing
+ components: icalcomponent_new_vcalendar(), etc.
+
+ * Makefile.am Incorporated build system patch from Federico
+ Quintero. Misc small fixes and cleanup
+
+ * scripts Incorporated auto-gen patch from Frederico. Generated
+ code in libical now uses icalproperty.c.in (etc) instead of
+ editing file icalparoperty.c in place.
+
+ * libical. Changed flex/bison to use the -P/-p options to set
+ ical_yy as a prefix. Removed prefix redefinition from icalyacc.y
+
+2000-10-12 Eric Busboom <eric@softwarestudio.org>
+
+ * icalproperty.c Fixed icalproperty_get_{first,next}_parameter to
+ honor the parameter kind argument
+
+ * icalparameter.c Added, but did not complete, a new version of
+ icalparameters_from_string that does not use the hairy nested
+ case/switch statements of the previous version
+
+
+2000-10-02 Eric Busboom <eric@softwarestudio.org>
+
+ * ical.h ical.h and icalss.h now are concatenations of all of the
+ public headers for their respective libraries. Thus, only ical.h,
+ icalss.h and icalvcal.h need to be installed.
+
+2000-09-11 Eric Busboom <eric@softwarestudio.org>
+
+ * icalvcal.c Added more comments
+
+2000-08-31 JP Rosevear <jpr@helixcode.com>
+
+ * configure.in: Don't list config.h in AC_OUTPUT
+
+2000-08-26 Ettore Perazzoli <ettore@helixcode.com>
+
+ * examples/Makefile.am (INCLUDES): More `$(srcdir)' loving.
+
+ * src/libicalvcal/Makefile.am (INCLUDES): Add `-I
+ $(srcdir)/../libical' for builddir != srcdir loving.
+
+2000-08-25 Christopher James Lahey <clahey@helixcode.com>
+
+ * examples/access_properties_and_parameters.c,
+ src/libicalvcal/vcc.y: Got rid of some warnings.
+
+ * src/libicalvcal/vcc.c: Checking in generated C file.
+
+2000-08-25 Christopher James Lahey <clahey@helixcode.com>
+
+ * src/libical/icalcomponent.c: Fixed an incorrect struct name.
+
+2000-08-25 Peter Williams <peterw@helixcode.com>
+
+ * src/libical/icalcomponent.c (icalcomponent_end_component): Compile fix;
+ use icalerror_check_arg_re so we can return an valid icalcompiter.
+ (icalcomponent_begin_component): Same.
+
+2000-08-24 Federico Mena Quintero <federico@helixcode.com>
+
+ * src/test/Makefile.am: Make it work.
+
+2000-08-04 Eric Busboom <eric@softwarestudio.org>
* stow.c Changed stow to write data to a file ( icalfileset) not a
calendar. Also added MIME parsing capability
@@ -10,7 +168,7 @@
icalcomponent that includes all of the parts.
-2000-07-26 <eric@softwarestudio.org>
+2000-07-26 Eric Busboom <eric@softwarestudio.org>
* icaldirset.h misc bug fixes to get deleting components to work
@@ -18,13 +176,13 @@
and _get_next_component, since these will reset the interal
iterators.
-2000-07-23 <eric@softwarestudio.org>
+2000-07-23 Eric Busboom <eric@softwarestudio.org>
* icalcomponent.h Added external iterators to icalcomponent for
subcomponents: icalcompiter. These are still experimental, but they
seem to work OK and have a nice syntax
-2000-07-18 <eric@softwarestudio.org>
+2000-07-18 Eric Busboom <eric@softwarestudio.org>
* icalset This is a new "superclass" for icalstore, icalcluster,
and others. It merges the interfaces of the old icalstore and
diff --git a/libical/INSTALL b/libical/INSTALL
index 88e2a5e7d6..b3f195d679 100644
--- a/libical/INSTALL
+++ b/libical/INSTALL
@@ -3,8 +3,8 @@ Building the library
This distribution is developed on Red Hat Linux 6.0 and usually
compiles on SunOS 5.6 and FreeBSD 2.27. I have reports of success of
-previous version on MacOS ( with CodeWarrior ) but I don't know about
-any other systems.
+previous version on MacOS ( with CodeWarrior ) and on UnixWare, but I
+don't know about any other systems.
The library is configured with automake. From the root directory, run
diff --git a/libical/Makefile.am b/libical/Makefile.am
index 8dcd95a438..e13464d7aa 100644
--- a/libical/Makefile.am
+++ b/libical/Makefile.am
@@ -5,5 +5,5 @@ EXTRA_DIST = \
TEST \
TODO
-SUBDIRS = design-data doc scripts test-data src examples
+SUBDIRS = design-data doc scripts test-data src examples
diff --git a/libical/NEWS b/libical/NEWS
index fb945eb9a2..9be3a9131f 100644
--- a/libical/NEWS
+++ b/libical/NEWS
@@ -1,3 +1,59 @@
+Version 0.21, 20 Nov 00 ( cvs tag libical-0-21)
+----------------------------------------------
+
+ * icalmessage.c Many routines to create new ical messages.
+
+ * icalspanlist.c Code to generate a list of the busy time f the
+ VEVENTS in a set. Also includes routiens to generate free and busy
+ lists from the spanlist, and to find the next free time after a
+ given time.
+
+ * icalvalue.c The STATUS property now has its own value type,
+ STATUS, which holds the enumeration icalproperty_status.
+
+ * icalrestriction.c Added more restrictions. Now handles mutual
+ and exclusive consitions, and checks for the reight values in
+ STATUS properties
+
+ * icaltypes.c Added routine to create durationtype from string:
+ icaldurationtype_from_string
+
+
+ * icalcomponet.c Add sever get/set convienience routines to access
+ and manipulate common component propoerties from the component
+ interface. This eliminates the need to create a lot of temporary
+ variables if you just want to change the start time of and event.
+
+
+ * icalcomponent.c Added new routines to icalcomponent:
+ _get_span -- returns the start and end times of the event in UTC
+ _get_first_real_component -- return ref to VTODO, VEVENT or VJOURNAL
+
+ * icalspanlist.c Added new class, icalspanlist, that generates a
+ list of alternating busy and free times from an icalset. The class
+ includes routines to gnerate rfc2445 busy and free lists, and to
+ get the next avaliable busy or free time after a given time.
+
+
+Version 0.20D 3 Nov 00
+-----------------------
+
+Many miscelaneous tweaks to the build system
+
+More work to icalclassify.
+
+Aded routines to icaltime.c to convert to and from specific timezones
+in Olsen format ("America/Los_Angeles")
+
+
+Version 0.20 7 Sept 00 (cvs tag libical-0-20 )
+----------------------------------------------
+
+Addedd icalclassify() which looks at a message and determine how to
+process it.
+
+Misc bug fixes and tweaks.
+
Version 0.19 6 August 00 (cvs tag libical-0-19)
-----------------------------------------------
diff --git a/libical/README b/libical/README
index ce27e309c0..92b2ff6e86 100644
--- a/libical/README
+++ b/libical/README
@@ -55,6 +55,12 @@ To build all of the Makefiles for your system. If you will be installing the lib
If configure runs fine, run "make" to build the library and
"make install" to install it.
+Although the distribution uses libtool to generate libraries, it has
+shared libraries turned off by default. To create and install shared
+libraries use:
+
+ ./configure --enable-shared
+
The current version of libical focuses on creating and
manipulating iCal objects. With it, you can parse text representations
of iCal components, add and remove sub-components, properties,
@@ -76,6 +82,12 @@ gcc-specific automatic dependancy tracking.
You will not need to re-run automake unless you got the sources from CVS.
+Using the Library
+-----------------
+
+There is rudimentary, unfinished documentation in the /doc directory,
+and annotated examples in /examples.
+
Perl Library
------------
@@ -83,19 +95,6 @@ Perl Library
There is a perl language binding of this library, LIBICAL.
It is available from http://www.softwarestudio.org/libical
-Parser
-------
-
-The parser is a test program that will convert a text representation
-of an iCal object to the internal representation and print it back out
-as text. It is primarily a test tool, but it is also a good
-demonstration of how the library works.
-
-To use it, cat one of the test components into the parser
-executable. For example, from the root of the distribution:
-
- src/test/icalparser < test-data/1.1
-
Eric Busboom
eric@softwarestudio.org
diff --git a/libical/THANKS b/libical/THANKS
index 6e867ffe27..ee804111e9 100644
--- a/libical/THANKS
+++ b/libical/THANKS
@@ -22,3 +22,17 @@ CSTP protocol implementation, and modifications to icalcstp.h
Gisle Hannemyr <gisle@oslonett.no> The decode*() functions in sspm.c
are based on the decode() routine in the mimelite program, Copyright
(c) 1994 Gisle Hannemyr.
+
+The Evolution team at Helixcode ( Federico Mena Quintero
+<federico@helixcode.com>, JP Rosevear <jpr@helixcode.com>, Ettore
+Perazzoli <ettore@helixcode.com>, Christopher James Lahey
+<clahey@helixcode.com>, Peter Williams <peterw@helixcode.com>) for
+miscelaneous patches and adjustments to the build system.
+
+Cornelius Schumacher <schumacher@kde.org> for many insightful
+suggestions and a few patches.
+
+Mark D. Anderson <mda@discerning.com> for discussions and ideas.
+
+Martin Neimeier <nei@ibn.de> for correcting bugs in icalrecur.c
+
diff --git a/libical/TODO b/libical/TODO
index 98d0c2d2b1..eb52fb7a25 100644
--- a/libical/TODO
+++ b/libical/TODO
@@ -34,3 +34,6 @@ Check all uses of strcpy and sprinf for buffer overflows
Make the mime parsing code in sspm grow the list of parts as needed,
rather than having a hard limit.
+
+in sspm.c, and unrecognized content-transfer-encoding values must
+force a content type of application/octet-stream.
diff --git a/libical/acconfig.h b/libical/acconfig.h
index e9383f73a4..ede59fd497 100644
--- a/libical/acconfig.h
+++ b/libical/acconfig.h
@@ -5,3 +5,6 @@
/* Define to make icalcluster_commit() save to a temp file and mv to
the original file instead of writing to the orig file directly */
#undef ICAL_SAFESAVES
+
+/* Define to terminate lines with "\n" instead of "\r\n" */
+#undef ICAL_UNIX_NEWLINE
diff --git a/libical/aclocal.m4 b/libical/aclocal.m4
index 0aa03dad5f..2cdb742d75 100644
--- a/libical/aclocal.m4
+++ b/libical/aclocal.m4
@@ -125,6 +125,39 @@ else
fi
AC_SUBST($1)])
+# Add --enable-maintainer-mode option to configure.
+# From Jim Meyering
+
+# serial 1
+
+AC_DEFUN(AM_MAINTAINER_MODE,
+[AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles])
+ dnl maintainer-mode is disabled by default
+ AC_ARG_ENABLE(maintainer-mode,
+[ --enable-maintainer-mode enable make rules and dependencies not useful
+ (and sometimes confusing) to the casual installer],
+ USE_MAINTAINER_MODE=$enableval,
+ USE_MAINTAINER_MODE=no)
+ AC_MSG_RESULT($USE_MAINTAINER_MODE)
+ AM_CONDITIONAL(MAINTAINER_MODE, test $USE_MAINTAINER_MODE = yes)
+ MAINT=$MAINTAINER_MODE_TRUE
+ AC_SUBST(MAINT)dnl
+]
+)
+
+# Define a conditional.
+
+AC_DEFUN(AM_CONDITIONAL,
+[AC_SUBST($1_TRUE)
+AC_SUBST($1_FALSE)
+if $2; then
+ $1_TRUE=
+ $1_FALSE='#'
+else
+ $1_TRUE='#'
+ $1_FALSE=
+fi])
+
dnl AM_PROG_LEX
dnl Look for flex, lex or missing, then run AC_PROG_LEX and AC_DECL_YYTEXT
@@ -134,3 +167,417 @@ AC_CHECK_PROGS(LEX, flex lex, "$missing_dir/missing flex")
AC_PROG_LEX
AC_DECL_YYTEXT])
+
+# serial 40 AC_PROG_LIBTOOL
+AC_DEFUN(AC_PROG_LIBTOOL,
+[AC_REQUIRE([AC_LIBTOOL_SETUP])dnl
+
+# Save cache, so that ltconfig can load it
+AC_CACHE_SAVE
+
+# Actually configure libtool. ac_aux_dir is where install-sh is found.
+CC="$CC" CFLAGS="$CFLAGS" CPPFLAGS="$CPPFLAGS" \
+LD="$LD" LDFLAGS="$LDFLAGS" LIBS="$LIBS" \
+LN_S="$LN_S" NM="$NM" RANLIB="$RANLIB" \
+DLLTOOL="$DLLTOOL" AS="$AS" OBJDUMP="$OBJDUMP" \
+${CONFIG_SHELL-/bin/sh} $ac_aux_dir/ltconfig --no-reexec \
+$libtool_flags --no-verify $ac_aux_dir/ltmain.sh $lt_target \
+|| AC_MSG_ERROR([libtool configure failed])
+
+# Reload cache, that may have been modified by ltconfig
+AC_CACHE_LOAD
+
+# This can be used to rebuild libtool when needed
+LIBTOOL_DEPS="$ac_aux_dir/ltconfig $ac_aux_dir/ltmain.sh"
+
+# Always use our own libtool.
+LIBTOOL='$(SHELL) $(top_builddir)/libtool'
+AC_SUBST(LIBTOOL)dnl
+
+# Redirect the config.log output again, so that the ltconfig log is not
+# clobbered by the next message.
+exec 5>>./config.log
+])
+
+AC_DEFUN(AC_LIBTOOL_SETUP,
+[AC_PREREQ(2.13)dnl
+AC_REQUIRE([AC_ENABLE_SHARED])dnl
+AC_REQUIRE([AC_ENABLE_STATIC])dnl
+AC_REQUIRE([AC_ENABLE_FAST_INSTALL])dnl
+AC_REQUIRE([AC_CANONICAL_HOST])dnl
+AC_REQUIRE([AC_CANONICAL_BUILD])dnl
+AC_REQUIRE([AC_PROG_RANLIB])dnl
+AC_REQUIRE([AC_PROG_CC])dnl
+AC_REQUIRE([AC_PROG_LD])dnl
+AC_REQUIRE([AC_PROG_NM])dnl
+AC_REQUIRE([AC_PROG_LN_S])dnl
+dnl
+
+case "$target" in
+NONE) lt_target="$host" ;;
+*) lt_target="$target" ;;
+esac
+
+# Check for any special flags to pass to ltconfig.
+#
+# the following will cause an existing older ltconfig to fail, so
+# we ignore this at the expense of the cache file... Checking this
+# will just take longer ... bummer!
+#libtool_flags="--cache-file=$cache_file"
+#
+test "$enable_shared" = no && libtool_flags="$libtool_flags --disable-shared"
+test "$enable_static" = no && libtool_flags="$libtool_flags --disable-static"
+test "$enable_fast_install" = no && libtool_flags="$libtool_flags --disable-fast-install"
+test "$ac_cv_prog_gcc" = yes && libtool_flags="$libtool_flags --with-gcc"
+test "$ac_cv_prog_gnu_ld" = yes && libtool_flags="$libtool_flags --with-gnu-ld"
+ifdef([AC_PROVIDE_AC_LIBTOOL_DLOPEN],
+[libtool_flags="$libtool_flags --enable-dlopen"])
+ifdef([AC_PROVIDE_AC_LIBTOOL_WIN32_DLL],
+[libtool_flags="$libtool_flags --enable-win32-dll"])
+AC_ARG_ENABLE(libtool-lock,
+ [ --disable-libtool-lock avoid locking (might break parallel builds)])
+test "x$enable_libtool_lock" = xno && libtool_flags="$libtool_flags --disable-lock"
+test x"$silent" = xyes && libtool_flags="$libtool_flags --silent"
+
+# Some flags need to be propagated to the compiler or linker for good
+# libtool support.
+case "$lt_target" in
+*-*-irix6*)
+ # Find out which ABI we are using.
+ echo '[#]line __oline__ "configure"' > conftest.$ac_ext
+ if AC_TRY_EVAL(ac_compile); then
+ case "`/usr/bin/file conftest.o`" in
+ *32-bit*)
+ LD="${LD-ld} -32"
+ ;;
+ *N32*)
+ LD="${LD-ld} -n32"
+ ;;
+ *64-bit*)
+ LD="${LD-ld} -64"
+ ;;
+ esac
+ fi
+ rm -rf conftest*
+ ;;
+
+*-*-sco3.2v5*)
+ # On SCO OpenServer 5, we need -belf to get full-featured binaries.
+ SAVE_CFLAGS="$CFLAGS"
+ CFLAGS="$CFLAGS -belf"
+ AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf,
+ [AC_TRY_LINK([],[],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no])])
+ if test x"$lt_cv_cc_needs_belf" != x"yes"; then
+ # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
+ CFLAGS="$SAVE_CFLAGS"
+ fi
+ ;;
+
+ifdef([AC_PROVIDE_AC_LIBTOOL_WIN32_DLL],
+[*-*-cygwin* | *-*-mingw*)
+ AC_CHECK_TOOL(DLLTOOL, dlltool, false)
+ AC_CHECK_TOOL(AS, as, false)
+ AC_CHECK_TOOL(OBJDUMP, objdump, false)
+ ;;
+])
+esac
+])
+
+# AC_LIBTOOL_DLOPEN - enable checks for dlopen support
+AC_DEFUN(AC_LIBTOOL_DLOPEN, [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])])
+
+# AC_LIBTOOL_WIN32_DLL - declare package support for building win32 dll's
+AC_DEFUN(AC_LIBTOOL_WIN32_DLL, [AC_BEFORE([$0], [AC_LIBTOOL_SETUP])])
+
+# AC_ENABLE_SHARED - implement the --enable-shared flag
+# Usage: AC_ENABLE_SHARED[(DEFAULT)]
+# Where DEFAULT is either `yes' or `no'. If omitted, it defaults to
+# `yes'.
+AC_DEFUN(AC_ENABLE_SHARED, [dnl
+define([AC_ENABLE_SHARED_DEFAULT], ifelse($1, no, no, yes))dnl
+AC_ARG_ENABLE(shared,
+changequote(<<, >>)dnl
+<< --enable-shared[=PKGS] build shared libraries [default=>>AC_ENABLE_SHARED_DEFAULT],
+changequote([, ])dnl
+[p=${PACKAGE-default}
+case "$enableval" in
+yes) enable_shared=yes ;;
+no) enable_shared=no ;;
+*)
+ enable_shared=no
+ # Look at the argument we got. We use all the common list separators.
+ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
+ for pkg in $enableval; do
+ if test "X$pkg" = "X$p"; then
+ enable_shared=yes
+ fi
+ done
+ IFS="$ac_save_ifs"
+ ;;
+esac],
+enable_shared=AC_ENABLE_SHARED_DEFAULT)dnl
+])
+
+# AC_DISABLE_SHARED - set the default shared flag to --disable-shared
+AC_DEFUN(AC_DISABLE_SHARED, [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
+AC_ENABLE_SHARED(no)])
+
+# AC_ENABLE_STATIC - implement the --enable-static flag
+# Usage: AC_ENABLE_STATIC[(DEFAULT)]
+# Where DEFAULT is either `yes' or `no'. If omitted, it defaults to
+# `yes'.
+AC_DEFUN(AC_ENABLE_STATIC, [dnl
+define([AC_ENABLE_STATIC_DEFAULT], ifelse($1, no, no, yes))dnl
+AC_ARG_ENABLE(static,
+changequote(<<, >>)dnl
+<< --enable-static[=PKGS] build static libraries [default=>>AC_ENABLE_STATIC_DEFAULT],
+changequote([, ])dnl
+[p=${PACKAGE-default}
+case "$enableval" in
+yes) enable_static=yes ;;
+no) enable_static=no ;;
+*)
+ enable_static=no
+ # Look at the argument we got. We use all the common list separators.
+ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
+ for pkg in $enableval; do
+ if test "X$pkg" = "X$p"; then
+ enable_static=yes
+ fi
+ done
+ IFS="$ac_save_ifs"
+ ;;
+esac],
+enable_static=AC_ENABLE_STATIC_DEFAULT)dnl
+])
+
+# AC_DISABLE_STATIC - set the default static flag to --disable-static
+AC_DEFUN(AC_DISABLE_STATIC, [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
+AC_ENABLE_STATIC(no)])
+
+
+# AC_ENABLE_FAST_INSTALL - implement the --enable-fast-install flag
+# Usage: AC_ENABLE_FAST_INSTALL[(DEFAULT)]
+# Where DEFAULT is either `yes' or `no'. If omitted, it defaults to
+# `yes'.
+AC_DEFUN(AC_ENABLE_FAST_INSTALL, [dnl
+define([AC_ENABLE_FAST_INSTALL_DEFAULT], ifelse($1, no, no, yes))dnl
+AC_ARG_ENABLE(fast-install,
+changequote(<<, >>)dnl
+<< --enable-fast-install[=PKGS] optimize for fast installation [default=>>AC_ENABLE_FAST_INSTALL_DEFAULT],
+changequote([, ])dnl
+[p=${PACKAGE-default}
+case "$enableval" in
+yes) enable_fast_install=yes ;;
+no) enable_fast_install=no ;;
+*)
+ enable_fast_install=no
+ # Look at the argument we got. We use all the common list separators.
+ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
+ for pkg in $enableval; do
+ if test "X$pkg" = "X$p"; then
+ enable_fast_install=yes
+ fi
+ done
+ IFS="$ac_save_ifs"
+ ;;
+esac],
+enable_fast_install=AC_ENABLE_FAST_INSTALL_DEFAULT)dnl
+])
+
+# AC_ENABLE_FAST_INSTALL - set the default to --disable-fast-install
+AC_DEFUN(AC_DISABLE_FAST_INSTALL, [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
+AC_ENABLE_FAST_INSTALL(no)])
+
+# AC_PROG_LD - find the path to the GNU or non-GNU linker
+AC_DEFUN(AC_PROG_LD,
+[AC_ARG_WITH(gnu-ld,
+[ --with-gnu-ld assume the C compiler uses GNU ld [default=no]],
+test "$withval" = no || with_gnu_ld=yes, with_gnu_ld=no)
+AC_REQUIRE([AC_PROG_CC])dnl
+AC_REQUIRE([AC_CANONICAL_HOST])dnl
+AC_REQUIRE([AC_CANONICAL_BUILD])dnl
+ac_prog=ld
+if test "$ac_cv_prog_gcc" = yes; then
+ # Check if gcc -print-prog-name=ld gives a path.
+ AC_MSG_CHECKING([for ld used by GCC])
+ ac_prog=`($CC -print-prog-name=ld) 2>&5`
+ case "$ac_prog" in
+ # Accept absolute paths.
+changequote(,)dnl
+ [\\/]* | [A-Za-z]:[\\/]*)
+ re_direlt='/[^/][^/]*/\.\./'
+changequote([,])dnl
+ # Canonicalize the path of ld
+ ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
+ while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
+ ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
+ done
+ test -z "$LD" && LD="$ac_prog"
+ ;;
+ "")
+ # If it fails, then pretend we aren't using GCC.
+ ac_prog=ld
+ ;;
+ *)
+ # If it is relative, then search for the first ld in PATH.
+ with_gnu_ld=unknown
+ ;;
+ esac
+elif test "$with_gnu_ld" = yes; then
+ AC_MSG_CHECKING([for GNU ld])
+else
+ AC_MSG_CHECKING([for non-GNU ld])
+fi
+AC_CACHE_VAL(ac_cv_path_LD,
+[if test -z "$LD"; then
+ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
+ for ac_dir in $PATH; do
+ test -z "$ac_dir" && ac_dir=.
+ if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
+ ac_cv_path_LD="$ac_dir/$ac_prog"
+ # Check to see if the program is GNU ld. I'd rather use --version,
+ # but apparently some GNU ld's only accept -v.
+ # Break only if it was the GNU/non-GNU ld that we prefer.
+ if "$ac_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
+ test "$with_gnu_ld" != no && break
+ else
+ test "$with_gnu_ld" != yes && break
+ fi
+ fi
+ done
+ IFS="$ac_save_ifs"
+else
+ ac_cv_path_LD="$LD" # Let the user override the test with a path.
+fi])
+LD="$ac_cv_path_LD"
+if test -n "$LD"; then
+ AC_MSG_RESULT($LD)
+else
+ AC_MSG_RESULT(no)
+fi
+test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
+AC_PROG_LD_GNU
+])
+
+AC_DEFUN(AC_PROG_LD_GNU,
+[AC_CACHE_CHECK([if the linker ($LD) is GNU ld], ac_cv_prog_gnu_ld,
+[# I'd rather use --version here, but apparently some GNU ld's only accept -v.
+if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
+ ac_cv_prog_gnu_ld=yes
+else
+ ac_cv_prog_gnu_ld=no
+fi])
+])
+
+# AC_PROG_NM - find the path to a BSD-compatible name lister
+AC_DEFUN(AC_PROG_NM,
+[AC_MSG_CHECKING([for BSD-compatible nm])
+AC_CACHE_VAL(ac_cv_path_NM,
+[if test -n "$NM"; then
+ # Let the user override the test.
+ ac_cv_path_NM="$NM"
+else
+ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
+ for ac_dir in $PATH /usr/ccs/bin /usr/ucb /bin; do
+ test -z "$ac_dir" && ac_dir=.
+ if test -f $ac_dir/nm || test -f $ac_dir/nm$ac_exeext ; then
+ # Check to see if the nm accepts a BSD-compat flag.
+ # Adding the `sed 1q' prevents false positives on HP-UX, which says:
+ # nm: unknown option "B" ignored
+ if ($ac_dir/nm -B /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
+ ac_cv_path_NM="$ac_dir/nm -B"
+ break
+ elif ($ac_dir/nm -p /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
+ ac_cv_path_NM="$ac_dir/nm -p"
+ break
+ else
+ ac_cv_path_NM=${ac_cv_path_NM="$ac_dir/nm"} # keep the first match, but
+ continue # so that we can try to find one that supports BSD flags
+ fi
+ fi
+ done
+ IFS="$ac_save_ifs"
+ test -z "$ac_cv_path_NM" && ac_cv_path_NM=nm
+fi])
+NM="$ac_cv_path_NM"
+AC_MSG_RESULT([$NM])
+])
+
+# AC_CHECK_LIBM - check for math library
+AC_DEFUN(AC_CHECK_LIBM,
+[AC_REQUIRE([AC_CANONICAL_HOST])dnl
+LIBM=
+case "$lt_target" in
+*-*-beos* | *-*-cygwin*)
+ # These system don't have libm
+ ;;
+*-ncr-sysv4.3*)
+ AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw")
+ AC_CHECK_LIB(m, main, LIBM="$LIBM -lm")
+ ;;
+*)
+ AC_CHECK_LIB(m, main, LIBM="-lm")
+ ;;
+esac
+])
+
+# AC_LIBLTDL_CONVENIENCE[(dir)] - sets LIBLTDL to the link flags for
+# the libltdl convenience library, adds --enable-ltdl-convenience to
+# the configure arguments. Note that LIBLTDL is not AC_SUBSTed, nor
+# is AC_CONFIG_SUBDIRS called. If DIR is not provided, it is assumed
+# to be `${top_builddir}/libltdl'. Make sure you start DIR with
+# '${top_builddir}/' (note the single quotes!) if your package is not
+# flat, and, if you're not using automake, define top_builddir as
+# appropriate in the Makefiles.
+AC_DEFUN(AC_LIBLTDL_CONVENIENCE, [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
+ case "$enable_ltdl_convenience" in
+ no) AC_MSG_ERROR([this package needs a convenience libltdl]) ;;
+ "") enable_ltdl_convenience=yes
+ ac_configure_args="$ac_configure_args --enable-ltdl-convenience" ;;
+ esac
+ LIBLTDL=ifelse($#,1,$1,['${top_builddir}/libltdl'])/libltdlc.la
+ INCLTDL=ifelse($#,1,-I$1,['-I${top_builddir}/libltdl'])
+])
+
+# AC_LIBLTDL_INSTALLABLE[(dir)] - sets LIBLTDL to the link flags for
+# the libltdl installable library, and adds --enable-ltdl-install to
+# the configure arguments. Note that LIBLTDL is not AC_SUBSTed, nor
+# is AC_CONFIG_SUBDIRS called. If DIR is not provided, it is assumed
+# to be `${top_builddir}/libltdl'. Make sure you start DIR with
+# '${top_builddir}/' (note the single quotes!) if your package is not
+# flat, and, if you're not using automake, define top_builddir as
+# appropriate in the Makefiles.
+# In the future, this macro may have to be called after AC_PROG_LIBTOOL.
+AC_DEFUN(AC_LIBLTDL_INSTALLABLE, [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
+ AC_CHECK_LIB(ltdl, main,
+ [test x"$enable_ltdl_install" != xyes && enable_ltdl_install=no],
+ [if test x"$enable_ltdl_install" = xno; then
+ AC_MSG_WARN([libltdl not installed, but installation disabled])
+ else
+ enable_ltdl_install=yes
+ fi
+ ])
+ if test x"$enable_ltdl_install" = x"yes"; then
+ ac_configure_args="$ac_configure_args --enable-ltdl-install"
+ LIBLTDL=ifelse($#,1,$1,['${top_builddir}/libltdl'])/libltdl.la
+ INCLTDL=ifelse($#,1,-I$1,['-I${top_builddir}/libltdl'])
+ else
+ ac_configure_args="$ac_configure_args --enable-ltdl-install=no"
+ LIBLTDL="-lltdl"
+ INCLTDL=
+ fi
+])
+
+dnl old names
+AC_DEFUN(AM_PROG_LIBTOOL, [indir([AC_PROG_LIBTOOL])])dnl
+AC_DEFUN(AM_ENABLE_SHARED, [indir([AC_ENABLE_SHARED], $@)])dnl
+AC_DEFUN(AM_ENABLE_STATIC, [indir([AC_ENABLE_STATIC], $@)])dnl
+AC_DEFUN(AM_DISABLE_SHARED, [indir([AC_DISABLE_SHARED], $@)])dnl
+AC_DEFUN(AM_DISABLE_STATIC, [indir([AC_DISABLE_STATIC], $@)])dnl
+AC_DEFUN(AM_PROG_LD, [indir([AC_PROG_LD])])dnl
+AC_DEFUN(AM_PROG_NM, [indir([AC_PROG_NM])])dnl
+
+dnl This is just to silence aclocal about the macro not being used
+ifelse([AC_DISABLE_FAST_INSTALL])dnl
+
diff --git a/libical/config.h.in b/libical/config.h.in
index b2f3dc23af..fe9f29a40f 100644
--- a/libical/config.h.in
+++ b/libical/config.h.in
@@ -15,14 +15,13 @@
/* Define if lex declares yytext as a char * by default, not a char[]. */
#undef YYTEXT_POINTER
-/* Define to make icalerror_* calls abort instead of internally
- signalling an error */
-#undef ICAL_ERRORS_ARE_FATAL
-
/* Define to make icalcluster_commit() save to a temp file and mv to
the original file instead of writing to the orig file directly */
#undef ICAL_SAFESAVES
+/* Define to terminate lines with "\n" instead of "\r\n" */
+#undef ICAL_UNIX_NEWLINE
+
/* Define if you have the strdup function. */
#undef HAVE_STRDUP
diff --git a/libical/configure.in b/libical/configure.in
index 28117ba37b..56f9871a04 100644
--- a/libical/configure.in
+++ b/libical/configure.in
@@ -1,21 +1,31 @@
dnl Process this file with autoconf to produce a configure script.
AC_INIT(src/libical/ical.h)
AM_CONFIG_HEADER(config.h)
-AM_INIT_AUTOMAKE(libical,0.19)
+AM_INIT_AUTOMAKE(libical,0.21helix1)
+
+dnl Initialize maintainer mode
+AM_MAINTAINER_MODE
dnl Checks for programs.
AC_PROG_YACC
AC_PROG_CC
AM_PROG_LEX
AC_PROG_LN_S
-AC_PROG_RANLIB
AC_PROG_INSTALL
+dnl Remove this line to enable shared libraries
+AM_DISABLE_SHARED
+
+
+dnl Initialize libtool
+AM_PROG_LIBTOOL
+
AC_SUBST(AR)
AC_CHECK_PROGS(AR, ar aal, ar)
-AC_DEFINE(ICAL_ERRORS_ARE_FATAL,1)
+dnl AC_DEFINE(ICAL_ERRORS_ARE_FATAL,1)
AC_DEFINE(ICAL_SAFESAVES,1)
+AC_DEFINE(ICAL_UNIX_NEWLINE,1)
dnl Checks for libraries.
dnl Replace `main' with a function in -lical:
@@ -33,18 +43,17 @@ AC_STRUCT_TM
dnl Checks for library functions.
AC_CHECK_FUNCS(strdup)
-AC_OUTPUT(\
-src/libical/icalversion.h \
-config.h \
-src/libical/Makefile \
-src/libicalss/Makefile \
-src/libicalvcal/Makefile \
-src/test/Makefile \
-examples/Makefile \
-src/Makefile \
-design-data/Makefile \
-doc/Makefile \
-scripts/Makefile \
-test-data/Makefile \
-src/Makefile \
-Makefile )
+AC_OUTPUT([
+Makefile
+design-data/Makefile
+doc/Makefile
+examples/Makefile
+scripts/Makefile
+src/Makefile
+src/libical/Makefile
+src/libical/icalversion.h
+src/libicalss/Makefile
+src/libicalvcal/Makefile
+src/test/Makefile
+test-data/Makefile
+])
diff --git a/libical/design-data/Makefile.in b/libical/design-data/Makefile.in
index 1bf2988022..6cdce86be2 100644
--- a/libical/design-data/Makefile.in
+++ b/libical/design-data/Makefile.in
@@ -57,11 +57,18 @@ POST_INSTALL = :
NORMAL_UNINSTALL = :
PRE_UNINSTALL = :
POST_UNINSTALL = :
+host_alias = @host_alias@
+host_triplet = @host@
AR = @AR@
+AS = @AS@
CC = @CC@
+DLLTOOL = @DLLTOOL@
LEX = @LEX@
+LIBTOOL = @LIBTOOL@
LN_S = @LN_S@
+MAINT = @MAINT@
MAKEINFO = @MAKEINFO@
+OBJDUMP = @OBJDUMP@
PACKAGE = @PACKAGE@
RANLIB = @RANLIB@
VERSION = @VERSION@
@@ -80,7 +87,7 @@ TAR = gtar
GZIP_ENV = --best
all: all-redirect
.SUFFIXES:
-$(srcdir)/Makefile.in: Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4)
+$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4)
cd $(top_srcdir) && $(AUTOMAKE) --gnu --include-deps design-data/Makefile
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
@@ -150,6 +157,7 @@ clean-am: clean-generic mostlyclean-am
clean: clean-am
distclean-am: distclean-generic clean-am
+ -rm -f libtool
distclean: distclean-am
diff --git a/libical/design-data/param-c-types.txt b/libical/design-data/param-c-types.txt
index d2f28e688a..3f690fa0dc 100644
--- a/libical/design-data/param-c-types.txt
+++ b/libical/design-data/param-c-types.txt
@@ -1,23 +1,23 @@
-ALTREP char*
-CN char*
+ALTREP const char*
+CN const char*
CUTYPE icalparameter_cutype
-DELEGATED-FROM char*
-DELEGATED-TO char*
-DIR char*
+DELEGATED-FROM const char*
+DELEGATED-TO const char*
+DIR const char*
ENCODING icalparameter_encoding
FBTYPE icalparameter_fbtype
-FMTTYPE char*
-LANGUAGE char*
-MEMBER char*
+FMTTYPE const char*
+LANGUAGE const char*
+MEMBER const char*
PARTSTAT icalparameter_partstat
RANGE icalparameter_range
RELATED icalparameter_related
RELTYPE icalparameter_reltype
ROLE icalparameter_role
RSVP int
-SENT-BY char*
-TZID char*
+SENT-BY const char*
+TZID const char*
VALUE icalparameter_value
-X char*
+X const char*
X-LIC-ERRORTYPE icalparameter_xlicerrortype
X-LIC-COMPARETYPE icalparameter_xliccomparetype
diff --git a/libical/design-data/prop-to-value.txt b/libical/design-data/prop-to-value.txt
index 4f4bf196ff..d753007339 100644
--- a/libical/design-data/prop-to-value.txt
+++ b/libical/design-data/prop-to-value.txt
@@ -10,7 +10,7 @@ LOCATION TEXT
PERCENT-COMPLETE INTEGER
PRIORITY INTEGER
RESOURCES TEXT
-STATUS TEXT
+STATUS STATUS
SUMMARY TEXT
COMPLETED DATE-TIME
FREEBUSY PERIOD
diff --git a/libical/design-data/restrictions.csv b/libical/design-data/restrictions.csv
index bf71d96327..1c62e2a8b4 100644
--- a/libical/design-data/restrictions.csv
+++ b/libical/design-data/restrictions.csv
@@ -5,7 +5,7 @@ PUBLISH,VEVENT,DTSTART,NONE,ONE
PUBLISH,VEVENT,ORGANIZER,NONE,ONE
PUBLISH,VEVENT,SUMMARY,NONE,ONE
PUBLISH,VEVENT,UID,NONE,ONE
-PUBLISH,VEVENT,RECURRENCEID,NONE,ZEROORONE
+PUBLISH,VEVENT,RECURRENCEID,NONE,ZEROORONE,must_be_recurring
PUBLISH,VEVENT,SEQUENCE,NONE,ZEROORONE
PUBLISH,VEVENT,ATTACH,NONE,ZEROPLUS
PUBLISH,VEVENT,CATEGORIES,NONE,ZEROPLUS #Non-standard
@@ -26,7 +26,7 @@ PUBLISH,VEVENT,RDATE,NONE,ZEROPLUS
PUBLISH,VEVENT,RELATEDTO,NONE,ZEROPLUS
PUBLISH,VEVENT,RESOURCES,NONE,ZEROORONE
PUBLISH,VEVENT,RRULE,NONE,ZEROPLUS
-PUBLISH,VEVENT,STATUS,NONE,ZEROORONE
+PUBLISH,VEVENT,STATUS,NONE,ZEROORONE,may_be_tent_conf_cancel
PUBLISH,VEVENT,TRANSP,NONE,ZEROORONE
PUBLISH,VEVENT,URL,NONE,ZEROORONE
PUBLISH,VEVENT,X,NONE,ZEROPLUS
@@ -36,7 +36,7 @@ PUBLISH,VEVENT,NONE,VALARM,ZEROPLUS
PUBLISH,VEVENT,NONE,VFREEBUSY,ZERO
PUBLISH,VEVENT,NONE,VJOURNAL,ZERO
PUBLISH,VEVENT,NONE,VTODO,ZERO
-PUBLISH,VEVENT,NONE,VTIMEZONE,ZEROPLUS
+PUBLISH,VEVENT,NONE,VTIMEZONE,ZEROPLUS,must_if_tz_ref
PUBLISH,VEVENT,NONE,X,ZEROPLUS
REQUEST,VEVENT,NONE,NONE,ONEPLUS
REQUEST,VEVENT,ATTENDEE,NONE,ONEPLUS
@@ -53,8 +53,8 @@ REQUEST,VEVENT,COMMENT,NONE,ZEROORONE
REQUEST,VEVENT,CONTACT,NONE,ZEROPLUS
REQUEST,VEVENT,CREATED,NONE,ZEROORONE
REQUEST,VEVENT,DESCRIPTION,NONE,ZEROORONE
-REQUEST,VEVENT,DTEND,NONE,ONEEXCLUSIVE,icalrestriction_check_exclusive
-REQUEST,VEVENT,DURATION,NONE,ONEEXCLUSIVE,icalrestriction_check_exclusive
+REQUEST,VEVENT,DTEND,NONE,ONEEXCLUSIVE,no_duration
+REQUEST,VEVENT,DURATION,NONE,ONEEXCLUSIVE,no_dtend
REQUEST,VEVENT,EXDATE,NONE,ZEROPLUS
REQUEST,VEVENT,EXRULE,NONE,ZEROPLUS
REQUEST,VEVENT,GEO,NONE,ZEROORONE
@@ -62,17 +62,17 @@ REQUEST,VEVENT,LASTMODIFIED,NONE,ZEROORONE
REQUEST,VEVENT,LOCATION,NONE,ZEROORONE
REQUEST,VEVENT,PRIORITY,NONE,ZEROORONE
REQUEST,VEVENT,RDATE,NONE,ZEROPLUS
-REQUEST,VEVENT,RECURRENCEID,NONE,ZEROORONE
+REQUEST,VEVENT,RECURRENCEID,NONE,ZEROORONE,must_be_recurring
REQUEST,VEVENT,RELATEDTO,NONE,ZEROPLUS
REQUEST,VEVENT,REQUESTSTATUS,NONE,ZEROPLUS
REQUEST,VEVENT,RESOURCES,NONE,ZEROORONE
REQUEST,VEVENT,RRULE,NONE,ZEROPLUS
-REQUEST,VEVENT,STATUS,NONE,ZEROORONE
+REQUEST,VEVENT,STATUS,NONE,ZEROORONE,may_be_tent_conf
REQUEST,VEVENT,TRANSP,NONE,ZEROORONE
REQUEST,VEVENT,URL,NONE,ZEROORONE
REQUEST,VEVENT,X,NONE,ZEROPLUS
REQUEST,VEVENT,NONE,VALARM,ZEROPLUS
-REQUEST,VEVENT,NONE,VTIMEZONE,ZEROPLUS
+REQUEST,VEVENT,NONE,VTIMEZONE,ZEROPLUS,must_if_tz_ref
REQUEST,VEVENT,NONE,X,ZEROPLUS
REQUEST,VEVENT,NONE,VFREEBUSY,ZERO
REQUEST,VEVENT,NONE,VJOURNAL,ZERO
@@ -81,7 +81,7 @@ REPLY,VEVENT,NONE,NONE,ONEPLUS
REPLY,VEVENT,ATTENDEE,NONE,ONE
REPLY,VEVENT,DTSTAMP,NONE,ONE
REPLY,VEVENT,ORGANIZER,NONE,ONE
-REPLY,VEVENT,RECURRENCEID,NONE,ZEROORONE
+REPLY,VEVENT,RECURRENCEID,NONE,ZEROORONE,must_be_recurring
REPLY,VEVENT,UID,NONE,ONE
REPLY,VEVENT,SEQUENCE,NONE,ZEROORONE
REPLY,VEVENT,ATTACH,NONE,ZEROPLUS
@@ -91,9 +91,9 @@ REPLY,VEVENT,COMMENT,NONE,ZEROORONE
REPLY,VEVENT,CONTACT,NONE,ZEROPLUS
REPLY,VEVENT,CREATED,NONE,ZEROORONE
REPLY,VEVENT,DESCRIPTION,NONE,ZEROORONE
-REPLY,VEVENT,DTEND,NONE,ONEEXCLUSIVE,icalrestriction_check_exclusive
+REPLY,VEVENT,DTEND,NONE,ONEEXCLUSIVE,no_duration
REPLY,VEVENT,DTSTART,NONE,ZEROORONE
-REPLY,VEVENT,DURATION,NONE,ONEEXCLUSIVE,icalrestriction_check_exclusive
+REPLY,VEVENT,DURATION,NONE,ONEEXCLUSIVE,no_dtend
REPLY,VEVENT,EXDATE,NONE,ZEROPLUS
REPLY,VEVENT,EXRULE,NONE,ZEROPLUS
REPLY,VEVENT,GEO,NONE,ZEROORONE
@@ -110,7 +110,7 @@ REPLY,VEVENT,SUMMARY,NONE,ZEROORONE
REPLY,VEVENT,TRANSP,NONE,ZEROORONE
REPLY,VEVENT,URL,NONE,ZEROORONE
REPLY,VEVENT,X,NONE,ZEROPLUS
-REPLY,VEVENT,NONE,VTIMEZONE,ZEROORONE
+REPLY,VEVENT,NONE,VTIMEZONE,ZEROORONE,must_if_tz_ref
REPLY,VEVENT,NONE,X,ZEROPLUS
REPLY,VEVENT,NONE,VALARM,ZERO
REPLY,VEVENT,NONE,VFREEBUSY,ZERO
@@ -131,8 +131,8 @@ ADD,VEVENT,COMMENT,NONE,ZEROORONE
ADD,VEVENT,CONTACT,NONE,ZEROPLUS
ADD,VEVENT,CREATED,NONE,ZEROORONE
ADD,VEVENT,DESCRIPTION,NONE,ZEROORONE
-ADD,VEVENT,DTEND,NONE,ONEEXCLUSIVE, icalrestriction_check_exclusive
-ADD,VEVENT,DURATION,NONE,ONEEXCLUSIVE, icalrestriction_check_exclusive
+ADD,VEVENT,DTEND,NONE,ONEEXCLUSIVE,no_duration
+ADD,VEVENT,DURATION,NONE,ONEEXCLUSIVE,no_duration
ADD,VEVENT,EXDATE,NONE,ZEROPLUS
ADD,VEVENT,EXRULE,NONE,ZEROPLUS
ADD,VEVENT,GEO,NONE,ZEROORONE
@@ -143,14 +143,14 @@ ADD,VEVENT,RDATE,NONE,ZEROPLUS
ADD,VEVENT,RELATEDTO,NONE,ZEROPLUS
ADD,VEVENT,RESOURCES,NONE,ZEROORONE
ADD,VEVENT,RRULE,NONE,ZEROPLUS
-ADD,VEVENT,STATUS,NONE,ZEROORONE
+ADD,VEVENT,STATUS,NONE,ZEROORONE,may_be_tent_conf
ADD,VEVENT,TRANSP,NONE,ZEROORONE
ADD,VEVENT,URL,NONE,ZEROORONE
ADD,VEVENT,X,NONE,ZEROPLUS
-ADD,VEVENT,RECURRENCEID,NONE,ZERO
+ADD,VEVENT,RECURRENCEID,NONE,ZERO,must_be_recurring
ADD,VEVENT,REQUESTSTATUS,NONE,ZERO
ADD,VEVENT,NONE,VALARM,ZEROPLUS
-ADD,VEVENT,NONE,VTIMEZONE,ZEROPLUS
+ADD,VEVENT,NONE,VTIMEZONE,ZEROPLUS,must_if_tz_ref
ADD,VEVENT,NONE,X,ZEROPLUS
ADD,VEVENT,NONE,VFREEBUSY,ZERO
ADD,VEVENT,NONE,VTODO,ZERO
@@ -168,9 +168,9 @@ CANCEL,VEVENT,CLASS,NONE,ZEROORONE
CANCEL,VEVENT,CONTACT,NONE,ZEROPLUS
CANCEL,VEVENT,CREATED,NONE,ZEROORONE
CANCEL,VEVENT,DESCRIPTION,NONE,ZEROORONE
-CANCEL,VEVENT,DTEND,NONE,ONEEXCLUSIVE, icalrestriction_check_exclusive
+CANCEL,VEVENT,DTEND,NONE,ONEEXCLUSIVE ,no_duration
CANCEL,VEVENT,DTSTART,NONE,ZEROORONE
-CANCEL,VEVENT,DURATION,NONE,ONEEXCLUSIVE, icalrestriction_check_exclusive
+CANCEL,VEVENT,DURATION,NONE,ONEEXCLUSIVE,no_duration
CANCEL,VEVENT,EXDATE,NONE,ZEROPLUS
CANCEL,VEVENT,EXRULE,NONE,ZEROPLUS
CANCEL,VEVENT,GEO,NONE,ZEROORONE
@@ -178,17 +178,17 @@ CANCEL,VEVENT,LASTMODIFIED,NONE,ZEROORONE
CANCEL,VEVENT,LOCATION,NONE,ZEROORONE
CANCEL,VEVENT,PRIORITY,NONE,ZEROORONE
CANCEL,VEVENT,RDATE,NONE,ZEROPLUS
-CANCEL,VEVENT,RECURRENCEID,NONE,ZEROORONE
+CANCEL,VEVENT,RECURRENCEID,NONE,ZEROORONE,must_be_recurring
CANCEL,VEVENT,RELATEDTO,NONE,ZEROPLUS
CANCEL,VEVENT,RESOURCES,NONE,ZEROORONE
CANCEL,VEVENT,RRULE,NONE,ZEROPLUS
-CANCEL,VEVENT,STATUS,NONE,ZEROORONE
+CANCEL,VEVENT,STATUS,NONE,ZEROORONE,must_be_canceled_no_attendee
CANCEL,VEVENT,SUMMARY,NONE,ZEROORONE
CANCEL,VEVENT,TRANSP,NONE,ZEROORONE
CANCEL,VEVENT,URL,NONE,ZEROORONE
CANCEL,VEVENT,X,NONE,ZEROPLUS
CANCEL,VEVENT,REQUESTSTATUS,NONE,ZERO
-CANCEL,VEVENT,NONE,VTIMEZONE,ZEROPLUS
+CANCEL,VEVENT,NONE,VTIMEZONE,ZEROPLUS,must_if_tz_ref
CANCEL,VEVENT,NONE,X,ZEROPLUS
CANCEL,VEVENT,NONE,VTODO,ZERO
CANCEL,VEVENT,NONE,VJOURNAL,ZERO
@@ -200,7 +200,7 @@ REFRESH,VEVENT,DTSTAMP,NONE,ONE
REFRESH,VEVENT,ORGANIZER,NONE,ONE
REFRESH,VEVENT,UID,NONE,ONE
REFRESH,VEVENT,COMMENT,NONE,ZEROORONE
-REFRESH,VEVENT,RECURRENCEID,NONE,ZEROORONE
+REFRESH,VEVENT,RECURRENCEID,NONE,ZEROORONE,must_be_recurring
REFRESH,VEVENT,X,NONE,ZEROPLUS
REFRESH,VEVENT,ATTACH,NONE,ZERO
REFRESH,VEVENT,CATEGORIES,NONE,ZERO
@@ -231,7 +231,7 @@ REFRESH,VEVENT,NONE,X,ZEROPLUS
REFRESH,VEVENT,NONE,VTODO,ZERO
REFRESH,VEVENT,NONE,VJOURNAL,ZERO
REFRESH,VEVENT,NONE,VFREEBUSY,ZERO
-REFRESH,VEVENT,NONE,VTIMEZONE,ZERO
+REFRESH,VEVENT,NONE,VTIMEZONE,ZERO,must_if_tz_ref
REFRESH,VEVENT,NONE,VALARM,ZERO
COUNTER,VEVENT,NONE,NONE,ONE
COUNTER,VEVENT,DTSTAMP,NONE,ONE
@@ -248,8 +248,8 @@ COUNTER,VEVENT,COMMENT,NONE,ZEROORONE
COUNTER,VEVENT,CONTACT,NONE,ZEROPLUS
COUNTER,VEVENT,CREATED,NONE,ZEROORONE
COUNTER,VEVENT,DESCRIPTION,NONE,ZEROORONE
-COUNTER,VEVENT,DTEND,NONE,ONEEXCLUSIVE, icalrestriction_check_exclusive
-COUNTER,VEVENT,DURATION,NONE,ONEEXCLUSIVE, icalrestriction_check_exclusive
+COUNTER,VEVENT,DTEND,NONE,ONEEXCLUSIVE,no_duration
+COUNTER,VEVENT,DURATION,NONE,ONEEXCLUSIVE,no_duration
COUNTER,VEVENT,EXDATE,NONE,ZEROPLUS
COUNTER,VEVENT,EXRULE,NONE,ZEROPLUS
COUNTER,VEVENT,GEO,NONE,ZEROORONE
@@ -257,17 +257,17 @@ COUNTER,VEVENT,LASTMODIFIED,NONE,ZEROORONE
COUNTER,VEVENT,LOCATION,NONE,ZEROORONE
COUNTER,VEVENT,PRIORITY,NONE,ZEROORONE
COUNTER,VEVENT,RDATE,NONE,ZEROPLUS
-COUNTER,VEVENT,RECURRENCEID,NONE,ZEROORONE
+COUNTER,VEVENT,RECURRENCEID,NONE,ZEROORONE,must_be_recurring
COUNTER,VEVENT,RELATEDTO,NONE,ZEROPLUS
COUNTER,VEVENT,REQUESTSTATUS,NONE,ZEROPLUS
COUNTER,VEVENT,RESOURCES,NONE,ZEROORONE
COUNTER,VEVENT,RRULE,NONE,ZEROPLUS
-COUNTER,VEVENT,STATUS,NONE,ZEROORONE
+COUNTER,VEVENT,STATUS,NONE,ZEROORONE,may_be_tent_conf_cancel
COUNTER,VEVENT,TRANSP,NONE,ZEROORONE
COUNTER,VEVENT,URL,NONE,ZEROORONE
COUNTER,VEVENT,X,NONE,ZEROPLUS
COUNTER,VEVENT,NONE,VALARM,ZEROPLUS
-COUNTER,VEVENT,NONE,VTIMEZONE,ZEROPLUS
+COUNTER,VEVENT,NONE,VTIMEZONE,ZEROPLUS,must_if_tz_ref
COUNTER,VEVENT,NONE,X,ZEROPLUS
COUNTER,VEVENT,NONE,VTODO,ZERO
COUNTER,VEVENT,NONE,VJOURNAL,ZERO
@@ -277,7 +277,7 @@ DECLINECOUNTER,VEVENT,DTSTAMP,NONE,ONE
DECLINECOUNTER,VEVENT,ORGANIZER,NONE,ONE
DECLINECOUNTER,VEVENT,UID,NONE,ONE
DECLINECOUNTER,VEVENT,COMMENT,NONE,ZEROORONE
-DECLINECOUNTER,VEVENT,RECURRENCEID,NONE,ZEROORONE
+DECLINECOUNTER,VEVENT,RECURRENCEID,NONE,ZEROORONE,must_be_recurring
DECLINECOUNTER,VEVENT,REQUESTSTATUS,NONE,ZEROPLUS
DECLINECOUNTER,VEVENT,SEQUENCE,NONE,ZERO
DECLINECOUNTER,VEVENT,X,NONE,ZEROPLUS
@@ -309,7 +309,7 @@ DECLINECOUNTER,VEVENT,NONE,X,ZEROPLUS
DECLINECOUNTER,VEVENT,NONE,VTODO,ZERO
DECLINECOUNTER,VEVENT,NONE,VJOURNAL,ZERO
DECLINECOUNTER,VEVENT,NONE,VFREEBUSY,ZERO
-DECLINECOUNTER,VEVENT,NONE,VTIMEZONE,ZERO
+DECLINECOUNTER,VEVENT,NONE,VTIMEZONE,ZERO,must_if_tz_ref
DECLINECOUNTER,VEVENT,NONE,VALARM,ZERO
PUBLISH,VFREEBUSY,NONE,NONE,ONEPLUS
PUBLISH,VFREEBUSY,DTSTAMP,NONE,ONE
@@ -329,7 +329,7 @@ PUBLISH,VFREEBUSY,NONE,X,ZEROPLUS
PUBLISH,VFREEBUSY,NONE,VEVENT,ZERO
PUBLISH,VFREEBUSY,NONE,VTODO,ZERO
PUBLISH,VFREEBUSY,NONE,VJOURNAL,ZERO
-PUBLISH,VFREEBUSY,NONE,VTIMEZONE,ZERO
+PUBLISH,VFREEBUSY,NONE,VTIMEZONE,ZERO,must_if_tz_ref
PUBLISH,VFREEBUSY,NONE,VALARM,ZERO
REQUEST,VFREEBUSY,NONE,NONE,ONE
REQUEST,VFREEBUSY,ATTENDEE,NONE,ONEPLUS
@@ -396,7 +396,7 @@ PUBLISH,VTODO,LASTMODIFIED,NONE,ZEROORONE
PUBLISH,VTODO,LOCATION,NONE,ZEROORONE
PUBLISH,VTODO,PERCENTCOMPLETE,NONE,ZEROORONE
PUBLISH,VTODO,RDATE,NONE,ZEROPLUS
-PUBLISH,VTODO,RECURRENCEID,NONE,ZEROORONE
+PUBLISH,VTODO,RECURRENCEID,NONE,ZEROORONE,must_be_recurring
PUBLISH,VTODO,RELATEDTO,NONE,ZEROPLUS
PUBLISH,VTODO,RESOURCES,NONE,ZEROORONE
PUBLISH,VTODO,RRULE,NONE,ZEROPLUS
@@ -436,11 +436,11 @@ REQUEST,VTODO,LASTMODIFIED,NONE,ZEROORONE
REQUEST,VTODO,LOCATION,NONE,ZEROORONE
REQUEST,VTODO,PERCENTCOMPLETE,NONE,ZEROORONE
REQUEST,VTODO,RDATE,NONE,ZEROPLUS
-REQUEST,VTODO,RECURRENCEID,NONE,ZEROORONE
+REQUEST,VTODO,RECURRENCEID,NONE,ZEROORONE,must_be_recurring
REQUEST,VTODO,RELATEDTO,NONE,ZEROPLUS
REQUEST,VTODO,RESOURCES,NONE,ZEROORONE
REQUEST,VTODO,RRULE,NONE,ZEROPLUS
-REQUEST,VTODO,STATUS,NONE,ZEROORONE
+REQUEST,VTODO,STATUS,NONE,ZEROORONE,may_be_comp_need_process
REQUEST,VTODO,URL,NONE,ZEROORONE
REQUEST,VTODO,X,NONE,ZEROPLUS
REQUEST,VTODO,REQUESTSTATUS,NONE,ZERO
@@ -477,7 +477,7 @@ REPLY,VTODO,RDATE,NONE,ZEROPLUS
REPLY,VTODO,RELATEDTO,NONE,ZEROPLUS
REPLY,VTODO,RESOURCES,NONE,ZEROORONE
REPLY,VTODO,RRULE,NONE,ZEROPLUS
-REPLY,VTODO,RECURRENCEID,NONE,ZEROORONE
+REPLY,VTODO,RECURRENCEID,NONE,ZEROORONE,must_be_recurring
REPLY,VTODO,SEQUENCE,NONE,ZEROORONE
REPLY,VTODO,STATUS,NONE,ZEROORONE
REPLY,VTODO,SUMMARY,NONE,ZEROORONE
@@ -516,10 +516,10 @@ ADD,VTODO,RDATE,NONE,ZEROPLUS
ADD,VTODO,RELATEDTO,NONE,ZEROPLUS
ADD,VTODO,RESOURCES,NONE,ZEROORONE
ADD,VTODO,RRULE,NONE,ZEROPLUS
-ADD,VTODO,STATUS,NONE,ZEROORONE
+ADD,VTODO,STATUS,NONE,ZEROORONE,may_be_comp_need_process
ADD,VTODO,URL,NONE,ZEROORONE
ADD,VTODO,X,NONE,ZEROPLUS
-ADD,VTODO,RECURRENCEID,NONE,ZERO
+ADD,VTODO,RECURRENCEID,NONE,ZERO,must_be_recurring
ADD,VTODO,REQUESTSTATUS,NONE,ZERO
ADD,VTODO,NONE,VALARM,ZEROPLUS
ADD,VTODO,NONE,VTIMEZONE,ZEROPLUS
@@ -550,12 +550,12 @@ CANCEL,VTODO,LASTMODIFIED,NONE,ZEROORONE
CANCEL,VTODO,LOCATION,NONE,ZEROORONE
CANCEL,VTODO,PERCENTCOMPLETE,NONE,ZEROORONE
CANCEL,VTODO,RDATE,NONE,ZEROPLUS
-CANCEL,VTODO,RECURRENCEID,NONE,ZEROORONE
+CANCEL,VTODO,RECURRENCEID,NONE,ZEROORONE,must_be_recurring
CANCEL,VTODO,RELATEDTO,NONE,ZEROPLUS
CANCEL,VTODO,RESOURCES,NONE,ZEROORONE
CANCEL,VTODO,RRULE,NONE,ZEROPLUS
CANCEL,VTODO,PRIORITY,NONE,ZEROORONE
-CANCEL,VTODO,STATUS,NONE,ZEROORONE
+CANCEL,VTODO,STATUS,NONE,ZEROORONE,must_be_canceled_no_attendee
CANCEL,VTODO,URL,NONE,ZEROORONE
CANCEL,VTODO,X,NONE,ZEROPLUS
CANCEL,VTODO,REQUESTSTATUS,NONE,ZERO
@@ -568,7 +568,7 @@ REFRESH,VTODO,NONE,NONE,ONE
REFRESH,VTODO,ATTENDEE,NONE,ONE
REFRESH,VTODO,DTSTAMP,NONE,ONE
REFRESH,VTODO,UID,NONE,ONE
-REFRESH,VTODO,RECURRENCEID,NONE,ZEROORONE
+REFRESH,VTODO,RECURRENCEID,NONE,ZEROORONE,must_be_recurring
REFRESH,VTODO,X,NONE,ZEROPLUS
REFRESH,VTODO,ATTACH,NONE,ZERO
REFRESH,VTODO,CATEGORIES,NONE,ZERO
@@ -625,13 +625,13 @@ COUNTER,VTODO,LASTMODIFIED,NONE,ZEROORONE
COUNTER,VTODO,LOCATION,NONE,ZEROORONE
COUNTER,VTODO,PERCENTCOMPLETE,NONE,ZEROORONE
COUNTER,VTODO,RDATE,NONE,ZEROPLUS
-COUNTER,VTODO,RECURRENCEID,NONE,ZEROORONE
+COUNTER,VTODO,RECURRENCEID,NONE,ZEROORONE,must_be_recurring
COUNTER,VTODO,RELATEDTO,NONE,ZEROPLUS
COUNTER,VTODO,REQUESTSTATUS,NONE,ZEROPLUS
COUNTER,VTODO,RESOURCES,NONE,ZEROORONE
COUNTER,VTODO,RRULE,NONE,ZEROORONE
COUNTER,VTODO,SEQUENCE,NONE,ZEROORONE
-COUNTER,VTODO,STATUS,NONE,ZEROORONE
+COUNTER,VTODO,STATUS,NONE,ZEROORONE,may_be_comp_need_process
COUNTER,VTODO,URL,NONE,ZEROORONE
COUNTER,VTODO,X,NONE,ZEROPLUS
COUNTER,VTODO,NONE,VALARM,ZEROPLUS
@@ -663,7 +663,7 @@ DECLINECOUNTER,VTODO,LOCATION,NONE,ZEROORONE
DECLINECOUNTER,VTODO,PERCENTCOMPLETE,NONE,ZEROORONE
DECLINECOUNTER,VTODO,PRIORITY,NONE,ZEROORONE
DECLINECOUNTER,VTODO,RDATE,NONE,ZEROPLUS
-DECLINECOUNTER,VTODO,RECURRENCEID,NONE,ZEROORONE
+DECLINECOUNTER,VTODO,RECURRENCEID,NONE,ZEROORONE,must_be_recurring
DECLINECOUNTER,VTODO,RELATEDTO,NONE,ZEROPLUS
DECLINECOUNTER,VTODO,REQUESTSTATUS,NONE,ZEROPLUS
DECLINECOUNTER,VTODO,RESOURCES,NONE,ZEROORONE
@@ -692,11 +692,11 @@ PUBLISH,VJOURNAL,EXDATE,NONE,ZEROPLUS
PUBLISH,VJOURNAL,EXRULE,NONE,ZEROPLUS
PUBLISH,VJOURNAL,LASTMODIFIED,NONE,ZEROORONE
PUBLISH,VJOURNAL,RDATE,NONE,ZEROPLUS
-PUBLISH,VJOURNAL,RECURRENCEID,NONE,ZEROORONE
+PUBLISH,VJOURNAL,RECURRENCEID,NONE,ZEROORONE,must_be_recurring
PUBLISH,VJOURNAL,RELATEDTO,NONE,ZEROPLUS
PUBLISH,VJOURNAL,RRULE,NONE,ZEROPLUS
PUBLISH,VJOURNAL,SEQUENCE,NONE,ZEROORONE
-PUBLISH,VJOURNAL,STATUS,NONE,ZEROORONE
+PUBLISH,VJOURNAL,STATUS,NONE,ZEROORONE,may_be_draft_final_canceled
PUBLISH,VJOURNAL,SUMMARY,NONE,ZEROORONE
PUBLISH,VJOURNAL,URL,NONE,ZEROORONE
PUBLISH,VJOURNAL,X,NONE,ZEROPLUS
@@ -756,10 +756,10 @@ CANCEL,VJOURNAL,EXDATE,NONE,ZEROPLUS
CANCEL,VJOURNAL,EXRULE,NONE,ZEROPLUS
CANCEL,VJOURNAL,LASTMODIFIED,NONE,ZEROORONE
CANCEL,VJOURNAL,RDATE,NONE,ZEROPLUS
-CANCEL,VJOURNAL,RECURRENCEID,NONE,ZEROORONE
+CANCEL,VJOURNAL,RECURRENCEID,NONE,ZEROORONE,must_be_recurring
CANCEL,VJOURNAL,RELATEDTO,NONE,ZEROPLUS
CANCEL,VJOURNAL,RRULE,NONE,ZEROPLUS
-CANCEL,VJOURNAL,STATUS,NONE,ZEROORONE
+CANCEL,VJOURNAL,STATUS,NONE,ZEROORONE,must_be_cancel_if_present
CANCEL,VJOURNAL,SUMMARY,NONE,ZEROORONE
CANCEL,VJOURNAL,URL,NONE,ZEROORONE
CANCEL,VJOURNAL,X,NONE,ZEROPLUS
@@ -829,11 +829,11 @@ NONE,VEVENT,COMPLETED,NONE,ZERO
NONE,VEVENT,CONTACT,NONE,ZEROPLUS
NONE,VEVENT,CREATED,NONE,ZEROORONE
NONE,VEVENT,DESCRIPTION,NONE,ZEROORONE
-NONE,VEVENT,DTEND,NONE,ONEEXCLUSIVE, icalrestriction_check_exclusive
+NONE,VEVENT,DTEND,NONE,ONEEXCLUSIVE,no_duration
NONE,VEVENT,DTSTAMP,NONE,ZEROORONE
NONE,VEVENT,DTSTART,NONE,ZEROORONE
NONE,VEVENT,DUE,NONE,ZERO
-NONE,VEVENT,DURATION,NONE,ONEEXCLUSIVE, icalrestriction_check_exclusive
+NONE,VEVENT,DURATION,NONE,ONEEXCLUSIVE,no_duration
NONE,VEVENT,EXDATE,NONE,ZEROPLUS
NONE,VEVENT,EXRULE,NONE,ZEROPLUS
NONE,VEVENT,FREEBUSY,NONE,ZERO
@@ -846,7 +846,7 @@ NONE,VEVENT,PERCENTCOMPLETE,NONE,ZERO
NONE,VEVENT,PRIORITY,NONE,ZEROORONE
NONE,VEVENT,PRODID,NONE,ZERO
NONE,VEVENT,RDATE,NONE,ZEROPLUS
-NONE,VEVENT,RECURRENCEID,NONE,ZEROORONE
+NONE,VEVENT,RECURRENCEID,NONE,ZEROORONE,must_be_recurring
NONE,VEVENT,RELATEDTO,NONE,ZEROPLUS
NONE,VEVENT,REPEAT,NONE,ZERO
NONE,VEVENT,REQUESTSTATUS,NONE,ZEROPLUS
@@ -894,7 +894,7 @@ NONE,VTODO,PERCENTCOMPLETE,NONE,ZEROORONE
NONE,VTODO,PRIORITY,NONE,ZEROORONE
NONE,VTODO,PRODID,NONE,ZERO
NONE,VTODO,RDATE,NONE,ZEROPLUS
-NONE,VTODO,RECURRENCEID,NONE,ZEROORONE
+NONE,VTODO,RECURRENCEID,NONE,ZEROORONE,must_be_recurring
NONE,VTODO,RELATEDTO,NONE,ZEROPLUS
NONE,VTODO,REPEAT,NONE,ZERO
NONE,VTODO,REQUESTSTATUS,NONE,ZEROPLUS
@@ -942,7 +942,7 @@ NONE,VJOURNAL,PERCENTCOMPLETE,NONE,ZERO
NONE,VJOURNAL,PRIORITY,NONE,ZERO
NONE,VJOURNAL,PRODID,NONE,ZERO
NONE,VJOURNAL,RDATE,NONE,ZEROPLUS
-NONE,VJOURNAL,RECURRENCEID,NONE,ZEROORONE
+NONE,VJOURNAL,RECURRENCEID,NONE,ZEROORONE,must_be_recurring
NONE,VJOURNAL,RELATEDTO,NONE,ZEROPLUS
NONE,VJOURNAL,REPEAT,NONE,ZERO
NONE,VJOURNAL,REQUESTSTATUS,NONE,ZEROPLUS
@@ -1169,8 +1169,8 @@ NONE,XAUDIOALARM,DTEND,NONE,ZERO
NONE,XAUDIOALARM,DTSTAMP,NONE,ZERO
NONE,XAUDIOALARM,DTSTART,NONE,ZERO
NONE,XAUDIOALARM,DUE,NONE,ZERO
-NONE,XAUDIOALARM,DURATION,NONE,ONEMUTUAL,icalrestriction_check_mutual
-NONE,XAUDIOALARM,REPEAT,NONE,ONEMUTUAL,icalrestriction_check_mutual
+NONE,XAUDIOALARM,DURATION,NONE,ONEMUTUAL,must_have_repeat
+NONE,XAUDIOALARM,REPEAT,NONE,ONEMUTUAL,must_have_duration
NONE,XAUDIOALARM,EXDATE,NONE,ZERO
NONE,XAUDIOALARM,EXRULE,NONE,ZERO
NONE,XAUDIOALARM,FREEBUSY,NONE,ZERO
@@ -1217,8 +1217,8 @@ NONE,XDISPLAYALARM,DTEND,NONE,ZERO
NONE,XDISPLAYALARM,DTSTAMP,NONE,ZERO
NONE,XDISPLAYALARM,DTSTART,NONE,ZERO
NONE,XDISPLAYALARM,DUE,NONE,ZERO
-NONE,XDISPLAYALARM,DURATION,NONE,ONEMUTUAL,icalrestriction_check_mutual
-NONE,XDISPLAYALARM,REPEAT,NONE,ONEMUTUAL,icalrestriction_check_mutual
+NONE,XDISPLAYALARM,DURATION,NONE,ONEMUTUAL,must_have_repeat
+NONE,XDISPLAYALARM,REPEAT,NONE,ONEMUTUAL,must_have_duration
NONE,XDISPLAYALARM,EXDATE,NONE,ZERO
NONE,XDISPLAYALARM,EXRULE,NONE,ZERO
NONE,XDISPLAYALARM,FREEBUSY,NONE,ZERO
@@ -1265,8 +1265,8 @@ NONE,XEMAILALARM,DTEND,NONE,ZERO
NONE,XEMAILALARM,DTSTAMP,NONE,ZERO
NONE,XEMAILALARM,DTSTART,NONE,ZERO
NONE,XEMAILALARM,DUE,NONE,ZERO
-NONE,XEMAILALARM,DURATION,NONE,ONEMUTUAL,icalrestriction_check_mutual
-NONE,XEMAILALARM,REPEAT,NONE,ONEMUTUAL,icalrestriction_check_mutual
+NONE,XEMAILALARM,DURATION,NONE,ONEMUTUAL,must_have_repeat
+NONE,XEMAILALARM,REPEAT,NONE,ONEMUTUAL,must_have_duration
NONE,XEMAILALARM,EXDATE,NONE,ZERO
NONE,XEMAILALARM,EXRULE,NONE,ZERO
NONE,XEMAILALARM,FREEBUSY,NONE,ZERO
@@ -1313,8 +1313,8 @@ NONE,XPROCEDUREALARM,DTEND,NONE,ZERO
NONE,XPROCEDUREALARM,DTSTAMP,NONE,ZERO
NONE,XPROCEDUREALARM,DTSTART,NONE,ZERO
NONE,XPROCEDUREALARM,DUE,NONE,ZERO
-NONE,XPROCEDUREALARM,DURATION,NONE,ONEMUTUAL,icalrestriction_check_mutual
-NONE,XPROCEDUREALARM,REPEAT,NONE,ONEMUTUAL,icalrestriction_check_mutual
+NONE,XPROCEDUREALARM,DURATION,NONE,ONEMUTUAL,must_have_repeat
+NONE,XPROCEDUREALARM,REPEAT,NONE,ONEMUTUAL,must_have_duration
NONE,XPROCEDUREALARM,EXDATE,NONE,ZERO
NONE,XPROCEDUREALARM,EXRULE,NONE,ZERO
NONE,XPROCEDUREALARM,FREEBUSY,NONE,ZERO
diff --git a/libical/design-data/value-c-types.txt b/libical/design-data/value-c-types.txt
index c7dd26034f..76a1e7c9b7 100644
--- a/libical/design-data/value-c-types.txt
+++ b/libical/design-data/value-c-types.txt
@@ -1,22 +1,23 @@
-ATTACH struct icalattachtype # Non-std
-BINARY char*
-BOOLEAN int
-CAL-ADDRESS char*
-DATE struct icaltimetype
-DATE-TIME struct icaltimetype
-DATE-TIME-DATE struct icaltimetype # Non-std
-DATE-TIME-PERIOD struct icalperiodtype # Non-std
-DURATION struct icaldurationtype
-FLOAT float
-GEO struct icalgeotype # Non-std
-INTEGER int
-METHOD icalproperty_method # Non-std
-PERIOD struct icalperiodtype
-RECUR struct icalrecurrencetype
-STRING char* # Non-std
-TEXT char*
-TIME struct icaltimetype
-TRIGGER union icaltriggertype # Non-std
-URI char*
-UTC-OFFSET int
-QUERY char*
+ATTACH std struct icalattachtype # Non-std
+BINARY std const char*
+BOOLEAN std int
+CAL-ADDRESS std const char*
+DATE std struct icaltimetype
+DATE-TIME std struct icaltimetype
+DATE-TIME-DATE std struct icaltimetype # Non-std
+DATE-TIME-PERIOD std struct icalperiodtype # Non-std
+DURATION std struct icaldurationtype
+FLOAT std float
+GEO std struct icalgeotype # Non-std
+INTEGER std int
+METHOD std icalproperty_method # Non-std
+PERIOD std struct icalperiodtype
+RECUR special struct icalrecurrencetype
+STRING std const char* # Non-std
+TEXT std const char*
+TIME std struct icaltimetype
+TRIGGER std union icaltriggertype # Non-std
+URI std const char*
+UTC-OFFSET std int
+QUERY std const char*
+STATUS std icalproperty_status #Non-std \ No newline at end of file
diff --git a/libical/doc/Makefile.in b/libical/doc/Makefile.in
index 59be9c3cdf..8119da9182 100644
--- a/libical/doc/Makefile.in
+++ b/libical/doc/Makefile.in
@@ -57,11 +57,18 @@ POST_INSTALL = :
NORMAL_UNINSTALL = :
PRE_UNINSTALL = :
POST_UNINSTALL = :
+host_alias = @host_alias@
+host_triplet = @host@
AR = @AR@
+AS = @AS@
CC = @CC@
+DLLTOOL = @DLLTOOL@
LEX = @LEX@
+LIBTOOL = @LIBTOOL@
LN_S = @LN_S@
+MAINT = @MAINT@
MAKEINFO = @MAKEINFO@
+OBJDUMP = @OBJDUMP@
PACKAGE = @PACKAGE@
RANLIB = @RANLIB@
VERSION = @VERSION@
@@ -80,7 +87,7 @@ TAR = gtar
GZIP_ENV = --best
all: all-redirect
.SUFFIXES:
-$(srcdir)/Makefile.in: Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4)
+$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4)
cd $(top_srcdir) && $(AUTOMAKE) --gnu --include-deps doc/Makefile
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
@@ -150,6 +157,7 @@ clean-am: clean-generic mostlyclean-am
clean: clean-am
distclean-am: distclean-generic clean-am
+ -rm -f libtool
distclean: distclean-am
diff --git a/libical/doc/UsingLibical.lyx b/libical/doc/UsingLibical.lyx
index 868eac93b7..776f0d3835 100644
--- a/libical/doc/UsingLibical.lyx
+++ b/libical/doc/UsingLibical.lyx
@@ -30,7 +30,7 @@ Using Libical
Eric Busboom (eric@softwarestudio.org)
\layout Date
-May 2000
+November 2000
\layout Standard
@@ -134,7 +134,15 @@ Building the Library
Libical uses autoconf to generate makefiles, although it uses none of the
autoconf flags to influence the compilation.
- It should built with no adjustments on Linux, FreeBSD and Solaris.
+ It should built with no adjustments on Linux, FreeBSD and Solaris under
+ gcc.
+ Some version have been successfully been build on MacOS, Solaris and UnixWare
+ without gcc, but you may run into problems with a particular later version.
+
+\layout Standard
+
+For a more complete guide to building the library, see the README file in
+ the distribution.
\layout Section
@@ -272,7 +280,7 @@ Enumerations
Types
\layout Subsubsection
-The Parser
+The parser
\layout Subsubsection
Restrictions
@@ -487,13 +495,13 @@ prop = icalproperty_new_dtstamp(atime) ;
icalcomponent_add_property(event, prop);
\layout Code
-prop = icalproperty_new_uid(strdup("guid-1.host1.com")) );
+prop = icalproperty_new_uid("guid-1.host1.com") );
\layout Code
icalcomponent_add_property(event,prop);
\layout Code
-prop=icalproperty_new_organizer(strdup("mrbig@host.com"));
+prop=icalproperty_new_organizer("mrbig@host.com");
\layout Code
param = icalparameter_new_role(ICAL_ROLE_CHAIR)
@@ -519,9 +527,6 @@ new
in the name.
Also note that, other than the object reference, most structure data is
passed in to libical routines by value.
- Strings, of course, are passed in by reference, but libical will take ownership
- of the memory, so you had beter strdup() the data unless you want a core
- dump when the memory is freed for the second time.
Libical has some complex but very regular memory handling rules.
These are detailed in section
\begin_inset LatexCommand \ref{sec:memory}
@@ -559,13 +564,13 @@ There is another way to create complex components, which is arguable more
ICAL_VCALENDAR_COMPONENT,
\layout Verbatim
- icalproperty_new_version(strdup("2.0")),
+ icalproperty_new_version("2.0"),
\layout Verbatim
- icalproperty_new_prodid(strdup(
+ icalproperty_new_prodid(
\layout Verbatim
- "-//RDU Software//NONSGML HandCal//EN")),
+ "-//RDU Software//NONSGML HandCal//EN"),
\layout Verbatim
icalcomponent_vanew(
@@ -577,13 +582,13 @@ There is another way to create complex components, which is arguable more
icalproperty_new_dtstamp(atime),
\layout Verbatim
- icalproperty_new_uid(strdup("guid-1.host1.com")),
+ icalproperty_new_uid("guid-1.host1.com"),
\layout Verbatim
icalproperty_vanew_organizer(
\layout Verbatim
- strdup("mrbig@host.com"),
+ "mrbig@host.com"),
\layout Verbatim
icalparameter_new_role(ICAL_ROLE_CHAIR),
@@ -598,7 +603,7 @@ There is another way to create complex components, which is arguable more
icalproperty_vanew_attendee(
\layout Verbatim
- strdup("employee-A@host.com"),
+ "employee-A@host.com",
\layout Verbatim
icalparameter_new_role(
@@ -619,10 +624,10 @@ There is another way to create complex components, which is arguable more
),
\layout Verbatim
- icalproperty_new_location(strdup(
+ icalproperty_new_location(
\layout Verbatim
- "1CP Conference Room 4350")),
+ "1CP Conference Room 4350"),
\layout Verbatim
0
@@ -895,7 +900,7 @@ With the 'first' and 'next' routines, you can create a for loop to iterate
c != 0;
\layout Verbatim
- c = icalcomponent_get_next_component(comp,ICAL_ANY_COMPONENT))
+ c = icalcomponent_get_next_component(comp,ICAL_ANY_COMPONENT))
\layout Verbatim
{
@@ -912,6 +917,78 @@ This code bit wil iterate through all of the subcomponents in 'comp' but
to another component type.
\layout Subsubsection
+Using Component Iterators
+\layout Standard
+
+The iteration model in the previous section requires the component to keep
+ the state of the iteration.
+ So, you could not use this model to perform a sorting operations, since
+ you'd need two iterators and there is only space for one.
+ If you ever call icalcomponent_get_first_component() which an iteration
+ is in progress, the pointer will be reset to the beginning.
+
+\layout Standard
+
+To solve this problem, there are also external iterators for components.
+ The routines associated with these external iterators are:
+\layout Verbatim
+
+icalcompiter icalcomponent_begin_component(icalcomponent* component, icalcompone
+nt_kind kind);
+\layout Verbatim
+
+icalcompiter icalcomponent_end_component(icalcomponent* component, icalcomponent
+_kind kind);
+\layout Verbatim
+
+icalcomponent* icalcompiter_next(icalcompiter* i);
+\layout Verbatim
+
+icalcomponent* icalcompiter_prior(icalcompiter* i);
+\layout Verbatim
+
+icalcomponent* icalcompiter_deref(icalcompiter* i);
+\layout Standard
+
+The _begin_() and _end_() routines return a new iterator that points to
+ the begining and ending of the list of subcomponent for the given component,
+ and the kind argument works like the kind argument for internal iterators.
+
+\layout Standard
+
+After creating an iterators, use _next_() and _prior_() to step forward
+ and backward through the list and get the component that the iterator points
+ to, and use _deref() to return the component that the iterator points to
+ without moving the iterator.
+ All routines will return 0 when they move to point off the end of the list.
+
+\layout Standard
+
+Here is an example of a loop using these routines:
+\layout Verbatim
+
+for(
+\layout Verbatim
+
+ i = icalcomponent_begin_component(impl->cluster,ICAL_ANY_COMPONENT);
+
+\layout Verbatim
+
+ icalcompiter_deref(&i)!= 0;
+\layout Verbatim
+
+ icalcompiter_next(&i)
+\layout Verbatim
+
+) {
+\layout Verbatim
+
+ icalcomponent *this = icalcompiter_deref(&i);
+\layout Verbatim
+
+}
+\layout Subsubsection
+
Removing Components
\layout Standard
@@ -1061,19 +1138,72 @@ void icalproperty_remove_parameter(
icalparameter_kind kind);
\layout Subsubsection
-Getting Values
-\layout Subsubsection
+Working with values
+\layout Standard
-Setting Values
-\layout Subsubsection
+Values are typically part of a property, although they can exist on their
+ own.
+ You can maniplulate them either as part of the property or independantly.
+\layout Standard
-Getting Parameters
-\layout Subsubsection
+The most common way to work with values to is to maniplate them from they
+ properties that contain them.
+ This involves fewer routine calls and intermediate variables than working
+ with them independently, and it is type-safe.
+
+\layout Standard
+
+For each property, there are a _get_ and a _set_ routine that access the
+ internal value.
+ For instnace, for the UID property, the routines are:
+\layout Verbatim
+
+void icalproperty_set_uid(icalproperty* prop, const char* v)
+\layout Verbatim
+
+const char* icalproperty_get_uid(icalproperty* prop)
+\layout Standard
+
+For multivalued properties, like ATTACH, the value type is usually a struct
+ or union that holds both possible types.
+
+\layout Standard
-Setting Parameters
+If you want to work with the underlying value object, you can get and set
+ it with:
+\layout Verbatim
+
+icalvalue* icalproperty_get_value (icalproperty* prop)
+\layout Verbatim
+
+void icalproperty_set_value(icalproperty* prop, icalvalue* value);
+\layout Standard
+
+Icalproperty_get_value() will return a reference that you can manipluate
+ with other icalvalue routines.
+ Most of the time, you will have to know what the type of the value is.
+ For instance, if you know that the value is a DATETIME type, you can manipluate
+ it with:
+\layout Verbatim
+
+struct icaltimetype icalvalue_get_datetime(icalvalue* value);
+\layout Verbatim
+
+void icalvalue_set_datetime(icalvalue* value, struct icaltimetype v);
+\layout Standard
+
+When working with an extension property or value (and X-PROPERTY or a property
+ that has the parameter VALUE=x-name ) the value type is always a string.
+ To get and set the value, use:
+\layout Verbatim
+
+void icalproperty_set_x(icalproperty* prop, char* v);
+\layout Verbatim
+
+char* icalproperty_get_x(icalproperty* prop);
\layout Subsubsection
-Removing Parameters
+Working with parameters
\layout Subsubsection
Checking Component Validity
@@ -1086,7 +1216,7 @@ RFC 2446 defines rules for what properties must exist in a component to
use to process a component.
For instance, if the METHOD is REQUEST and the component is a VEVENT, the
sender is probably asking the reciever to join in a meeting.
- I this case, RFC2446 says that the component must specify a start time
+ In this case, RFC2446 says that the component must specify a start time
(DTSTART) and list the reciever as an attendee (ATTENDEE).
\layout Standard
@@ -1170,6 +1300,170 @@ Remember that the string returned by these routines is owned by the library,
\layout Subsection
+Time
+\layout Subsubsection
+
+Time structure
+\layout Standard
+
+LIbical defines it's own time structure for storing all dates and times.
+ It would have been nice to re-use the C library's
+\emph on
+struct tm,
+\emph default
+but that structure does not differentiate between dates and times, and between
+ local time and UTC.
+ The libical structure is:
+\layout Verbatim
+
+struct icaltimetype {
+\layout Verbatim
+
+ int year;
+\layout Verbatim
+
+ int month;
+\layout Verbatim
+
+ int day;
+\layout Verbatim
+
+ int hour;
+\layout Verbatim
+
+ int minute;
+\layout Verbatim
+
+ int second;
+\layout Verbatim
+
+ int is_utc; /* 1-> time is in UTC timezone */
+\layout Verbatim
+
+ int is_date; /* 1 -> interpret this as date.
+ */ };
+\layout Standard
+
+The year, month, day, hour, minute and second fields how the broken-out
+ time values.
+ The is_utc field distinguishes between times UTC and a local time zone.
+ The is_date field indicates if the intra-day fields hold valid data.
+
+\layout Subsubsection
+
+Time manipulating routines
+\layout Standard
+
+The null time value is used to indicate that the data in the structure is
+ not a valid time.
+\layout Verbatim
+
+struct icaltimetype icaltime_null_time(void);
+\layout Verbatim
+
+int icaltime_is_null_time(struct icaltimetype t);
+\layout Standard
+
+It is sensible for the broken-out time fields to contain values that are
+ not permitted in an ISO compliant time string.
+ For instance, the seconds field can hold values greater than 59, and the
+ hours field can hold values larger than 24.
+ The excessive values will be rolled over into the next larger field when
+ the structure is normalized.
+
+\layout Verbatim
+
+struct icaltimetype icaltime_normalize(struct icaltimetype t);
+\layout Standard
+
+There are several routines to get the day of the week or month, etc, from
+ a time structure.
+\layout Verbatim
+
+short icaltime_day_of_year(struct icaltimetype t);
+\layout Verbatim
+
+struct icaltimetype icaltime_from_day_of_year(short doy, short year);
+\layout Verbatim
+
+short icaltime_day_of_week(struct icaltimetype t);
+\layout Verbatim
+
+short icaltime_start_doy_of_week(struct icaltimetype t);
+\layout Verbatim
+
+short icaltime_week_number(short day_of_month, short month, short year);
+\layout Verbatim
+
+struct icaltimetype icaltime_from_week_number(short week_number, short year);
+\layout Verbatim
+
+short icaltime_days_in_month(short month,short year);
+\layout Standard
+
+Two routines convert time structures to and from the number of seconds since
+ the POSIX epoch.
+ The is_date field indicates wether or not the hour, minute and second fields
+ should be used in the conversion, and is_utc indicates if the value should
+ be converted to a local time or a UTC time, using the operating system
+ suppled notion of the local timezone.
+
+\layout Verbatim
+
+struct icaltimetype icaltime_from_timet(time_t v, int is_date, int is_utc);
+
+\layout Verbatim
+
+time_t icaltime_as_timet(struct icaltimetype);
+\layout Standard
+
+The compare routine works exactly like strcmp, but on time structures.
+
+\layout Verbatim
+
+int icaltime_compare(struct icaltimetype a,struct icaltimetype b);
+\layout Standard
+
+The following routines convert between UTC and a named timezone.
+ The tzid field must be a timezone name from the Olsen database, such as
+
+\begin_inset Quotes eld
+\end_inset
+
+America/Los_Angeles.
+\begin_inset Quotes erd
+\end_inset
+
+
+\layout Standard
+
+The utc_offset routine returns the offset of the named time zone from UTC,
+ in seconds.
+
+\layout Standard
+
+The tt parmeter in the fonllowing routines indicates the date on which the
+ conversion should be made.
+ The tt parameter is necessary because timezones have many different rules
+ for when daylight savings time is used, and these rules can change over
+ time.
+ So, for a single timezone one year may have daylight savings time on March
+ 15, but for other years March 15 may be standard time, and some years may
+ have standard time all year.
+
+\layout Verbatim
+
+int icaltime_utc_offset(struct icaltimetype tt, char* tzid)
+\layout Verbatim
+
+struct icaltimetype icaltime_as_utc(struct icaltimetype tt,char* tzid);
+\layout Verbatim
+
+struct icaltimetype icaltime_as_zone(struct icaltimetype tt,char* tzid);
+\layout Verbatim
+
+\layout Subsection
+
Storing Objects
\layout Standard
diff --git a/libical/doc/UsingLibical.ps b/libical/doc/UsingLibical.ps
index 83c8f6203f..5a618a0c7e 100644
--- a/libical/doc/UsingLibical.ps
+++ b/libical/doc/UsingLibical.ps
@@ -1,7 +1,7 @@
%!PS-Adobe-2.0
-%%Creator: dvips(k) 5.85 Copyright 1999 Radical Eye Software
+%%Creator: dvips(k) 5.86 Copyright 1999 Radical Eye Software
%%Title: UsingLibical.dvi
-%%Pages: 10
+%%Pages: 18
%%PageOrder: Ascend
%%BoundingBox: 0 0 612 792
%%EndComments
@@ -10,7 +10,7 @@
%+ /usr/local/home/eric/proj/FreeAssociation/libical/doc/UsingLibical.ps
%+ UsingLibical.dvi
%DVIPSParameters: dpi=600, compressed
-%DVIPSSource: TeX output 2000.06.10:1815
+%DVIPSSource: TeX output 2000.11.03:1354
%%BeginProcSet: texc.pro
%!
/TeXDict 300 dict def TeXDict begin/N{def}def/B{bind def}N/S{exch}N/X{S
@@ -71,178 +71,32 @@ rmoveto}B/y{3 2 roll p a}B/bos{/SS save N}B/eos{SS restore}B end
%%EndProcSet
TeXDict begin 40258431 52099146 1000 600 600 (UsingLibical.dvi)
@start
-%DVIPSBitmapFont: Fa ecrm0600 6 1
-/Fa 1 50 df<13E01201120712FF12F91201B3A7487EB512C0A212217AA01E>49
-D E
+%DVIPSBitmapFont: Fa ecti1000 10 7
+/Fa 7 118 df<EA03C0EA07F0120F121F13F8A313F0EA07B0EA003013701360A213E013
+C01201EA038013005A120E5A5A5A5A5A0D197A8819>44 D<147F903803FFC090380FC1E0
+90381F0070017E13784913383901F801F83803F003120713E0120FD81FC013F091C7FC48
+5AA2127F90C8FCA35A5AA45AA3153015381578007C14F0007EEB01E0003EEB03C0EC0F80
+6CEB3E00380F81F83803FFE0C690C7FC1D2677A426>99 D<D801E001FEEB07F03C07F803
+FF801FFC3C0E3C0F07C0783E3C1E3E3C03E1E01F261C1F78D9F3C013803C383FF001F780
+0F02E01400007801C013FE007018C002805B4A4848EB1F80EAF07FD8E07E5CA200000207
+143F01FE1700495CA2030F5C0001177E495C18FE031F5C120349DA8001131C18F8033F15
+3C00070403133849020013F0A24B1570000F17E049017E15F019E003FEECE1C0001FEE01
+E34949903800FF000007C70038143C3E2679A444>109 D<3903C003F0390FF01FFC391E
+783C0F381C7C703A3C3EE03F8038383FC0EB7F800078150000701300151CD8F07E90C7FC
+EAE0FE5BA2120012015BA312035BA312075BA3120F5BA3121F5BA3123F90C9FC120E2126
+79A423>114 D<14FE903807FF8090380F83C090383E00E04913F00178137001F813F000
+01130313F0A215E00003EB01C06DC7FC7FEBFFC06C13F814FE6C7F6D13807F010F13C013
+00143F141F140F123E127E00FE1480A348EB1F0012E06C133E00705B6C5B381E03E06CB4
+5AD801FEC7FC1C267AA422>I<EB0380EB07C0130FA4131F1480A3133F1400A35B137E00
+7FB5FCA2B6FC3800FC00A312015BA312035BA312075BA3120F5BA3121FEB801CA2143C00
+3F1338EB0078147014F014E0EB01C0EA3E03381F0780380F0F00EA07FCEA01F0183579B3
+1C>I<13F8D803FEEB01C0D8078FEB03E0390E0F8007121E121C0038140F131F007815C0
+1270013F131F00F0130000E015805BD8007E133FA201FE14005B5D120149137EA215FE12
+0349EBFC0EA20201131E161C15F813E0163CD9F003133814070001ECF07091381EF8F03A
+00F83C78E090393FF03FC090390FC00F00272679A42D>I E
%EndDVIPSBitmapFont
-%DVIPSBitmapFont: Fb ecbx1000 10 55
-/Fb 55 122 df<913A03FF8007FE027F9039F07FFF800103B500FDB512E0010F903A00FF
-FE0FF0D93FF8ECF81F90267FE0019038F03FF849485A4816E014804816C00200ED1FF081
-F007C06F91C7FCA8B912E0A4000390C701C0C7FCB3ABB5D8FC3FEBFF80A43D3A7EB938>
-27 D<12E07E127C7E7E7F6C7E6C7E12037F6C7E7F12007F137E137FA2EB3F80A214C013
-1F14E0A2130F14F0A4EB07F8A514FCB114F8A5EB0FF0A414E0131FA214C0133F1480A2EB
-7F00A2137E13FE5B12015B485A5B1207485A485A90C7FC123E5A12F05A16537BBD25>41
-D<B61280A819087F9620>45 D<EA0F80EA3FE0EA7FF0A2EAFFF8A5EA7FF0A2EA3FE0EA0F
-800D0D798C1B>I<49B4FC011F13F0017F13FC9038FF83FE4848C67E4848EB7F804848EB
-3FC04848EB1FE0A2001F15F0A24848EB0FF8A3007F15FCA400FF15FEB3007F15FCA5003F
-15F86D131FA2001F15F0A26C6CEB3FE0000715C06C6CEB7F806C6CEBFF003900FF83FE6D
-B45A011F13F0010190C7FC27377CB530>48 D<141E143E14FE1307137FB5FCA3138FEA00
-0FB3B3A5007FB61280A4213679B530>I<EB0FFE90387FFFC048B512F0000714FC390FE0
-3FFF261F800F1380263F000313C0D87F8014E0EBE00100FF6D13F07FA2ED7FF8A46C5A6C
-5A0006C7FCC8FCEDFFF0A216E05C16C04A138016004A5A4A5AEC1FF05D4A5A4AC7FC14FE
-495AD903F01378495A495A495A49C712F8017C14F05B49130148B6FC5A5A5A5A5A4815E0
-B7FCA425367BB530>I<EB03FF011F13F0017F13FC3901FC07FF2603F003138048486C13
-C0496C13E0EA0FF86D14F0487EA66C4814E06C5A6C485AC714C04A138016004A5A4A5AEC
-3FF090380FFFC05D15F090380007FE913801FF806E13C016E0ED7FF016F8ED3FFCA216FE
-EA1FC0487E487E487EA416FCA249137F007F15F801C0EBFFF06C5A6C6C4813E0260FFC07
-13806CB61200000114FC6C6C13F0010790C7FC27377CB530>I<ED07C0150FA2151F153F
-157F15FF5CA25C5C5C5C143E143C5C5C1301495A5C495A495A5B133E5B13785B485A1203
-485A5B48C7FC121E5A127C5AB81280A4C70001EBC000AA0103B61280A429367DB530>I<
-001C15C0D81F80130701F8137F90B61280A216005D5D15F05D15804AC7FC14F090C9FCA7
-EB03FE90381FFFE0017F13F89038FE07FC9038F003FFD9C0011380496C13C090C7FC000E
-15E0C8127F16F0A216F8A3121FEA3FC0487E12FF7FA316F05B15FFD87F8014E0007EC713
-C0003E5B003F4913806C6C481300390FF01FFE6CB512F8000114E06C6C1380D90FF8C7FC
-25377BB530>I<EC0FF8ECFFFE0103EBFF8090390FF80FC090393FE003E090397F8001F0
-9038FF000F48EC1FF84848133F485A120F5B121FA2003FEC1FF0ED0FE0484890C7FCA314
-08EC7FF039FFF1FFFC01F313FFD9F78013809039FF007FC049EB3FE04914F0ED1FF85B16
-FCA34914FEA4127FA5123F16FCA26C7E16F8000F143F6D14F0000715E06C6CEB7FC03A01
-FF81FF806C90B51200013F13FC010F13F00101138027377CB530>I<123C123EEA3FE090
-B71280A41700485D5E5E5E5EA2007CC7EA0FC000784A5A4BC7FC00F8147E485C5D14014A
-5AC7485A4A5AA24A5A143F4AC8FCA214FEA213015C1303A21307A2130F5CA2131FA5133F
-A96D5A6D5A6D5A29397BB730>I<49B47E010F13F0013F13FC9038FE01FF3A01F8007F80
-4848EB3FC04848EB1FE0150F484814F01507121FA27F7F7F6D130F01FF14E014C09138E0
-1FC06CEBF83F9138FE7F806C9038FFFE005D6C14F06C14FC6C14FF6D14806D14C090B612
-E0D803FD14F02607F07F13F848487E261FC00F13FC383F8003007F010013FE90C7127F15
-1F00FE140715031501A21500A216FC7E6C14016D14F86C6C13036DEB07F06C6CEB0FE0D8
-0FFEEB7FC00003B61200C614FC013F13F00103138027377CB530>I<EB03FF011F13E001
-7F13F83901FF01FE48486C7E4848EB7F80484814C0001FEC3FE0485AED1FF0127F16F8A2
-12FF16FCA416FEA5007F143FA3123F157F6C7E000F14FF6C6C5A3903FE03DF6CB5129F6C
-6C131FD91FFC13FCEB00201400A3D80FE0EB3FF8487E486C14F0A216E0157F16C0EDFF80
-495A6C4848130090388007FE390FE01FF86CB55A6C14C0C691C7FCEB1FF027377CB530>
-I<DB3FFCEB01C00203B5EAC003021FECF00791B6EAFC0F01039039FC00FF3F4901C0EB1F
-FFD91FFEC77E49481403D97FF080494880485B48177F4849153F4890C9FC181F485A180F
-123F5B1807127FA24993C7FC12FFAD127F7FF003C0123FA27F001F1707A26C6C1780180F
-6C6D16006C6D5D6C173E6C6D157ED97FF85D6D6C4A5A6DB44A5A010701C0EB0FE06D01FC
-EBFF80010090B548C7FC021F14F8020314E09126003FFEC8FC3A3B7BB945>67
-D<B87E17F817FF18C028007FF8000713F09338007FF8EF1FFE717E050313807113C0A271
-13E0F07FF0A2F03FF8A219FC181FA219FEA419FFAC19FEA419FC183FA219F8187F19F0F0
-FFE0A24D13C04D13804D1300EF1FFEEF7FFC933807FFF0B912C095C7FC17FC178040397D
-B849>I<B912F0A426007FF8C7FCEF1FF8170717031701A21700A21878A3043C137C183C
-A41800167CA216FC150391B5FCA4ECF8031500167CA2163C180FA3181EA293C7FCA2183E
-A2183C187CA218FCA2EF01F81703170F173FEE01FFB9FC18F0A338397DB83F>I<B912C0
-A43A007FF800039338007FE0171F170F1707A21703A21701A318F0EE7800A41800A216F8
-A21501150791B5FCA4ECF80715011500A21678A693C8FCADB7FCA434397DB83C>I<DB3F
-FCEB01C00203B5EAC003021FECF00791B6EAFC0F01039039FC00FF3F4901C0EB1FFFD91F
-FEC77E49481403D97FF080494880485B48177F4849153F4890C9FC181F485A180F123F5B
-1807127FA24993C8FC12FFAB043FB61280A2127F7FDC0003EBC000123FA27F121FA26C7E
-A26C7F6C7F6C7F7ED97FF85C6D7E6DB45C010701C05B6D01FCEBFF3F010090B5EAFE0F02
-1FECF8030203ECE0009126003FFEC9FC413B7BB94B>I<B612FCA439007FF800B3B3ADB6
-12FCA41E397DB824>73 D<B7FCA426007FF8C9FCB3ACEF0780A5170F1800A35FA25FA25F
-5F5E5EEE0FFE167FB8FCA431397DB839>76 D<B500F80403B512F06E5EA26E5ED8007FF1
-E000A2D97BFF161EA201796D5DA201786D5DA26E6C5DA36E6C4A5AA26E6C4A5AA26E6C4A
-5AA26E6C4A5AA26E6C141EA36E6D5BA26E6D5BA26F6C5BA26F6C485AA36F6C485AA26F6C
-485AA26F6C48C7FCA2923803FF1EA36F13BCA26F13F8A2705AA2705AA213FCB500FC6D48
-48B612F0A2EE0F80EE070054397DB85B>I<EDFFF8020FEBFF80027F14F0903A01FFC01F
-FC010790380007FFD91FFC010113C0D93FF06D6C7E49486E7E49486E7E48496E7E488348
-90C86C7EA248486F1380A248486F13C0A2003F18E0A348486F13F0A400FF18F8AC007F18
-F06D5DA3003F18E0A26D5D001F18C0A26C6C4B13806C18006E5C6C6D4A5A6C5F6C6D4A5A
-6D6C4A5AD93FFC49485A6DB401075B0107D9C01F90C7FC010190B512FC6D6C14F0020F14
-80020001F8C8FC3D3B7BB948>79 D<B8FC17F017FEEFFF8028007FF8000F13C0040113E0
-7013F0EF7FF8EF3FFCA2EF1FFEA218FFA818FEA2EF3FFCA2EF7FF8EFFFF04C13E0040F13
-C091B7120017FC17E002F8C9FCB3A4B612FCA438397DB841>I<B712FCEEFFE017FC17FF
-28007FF8000F13C004017F707F717E717EA2717EA284A760A24D5A604D5A4D5A04035B04
-1F90C8FC91B612FC17E0839139F8003FFCEE0FFF707F707F8284A2707FA584A51A601AF0
-84177F1901DD3FFE13E0B600FC011F130394390FFF87C071EBFF8005011400CBEA1FFC44
-3A7DB848>82 D<D907FF130E013FEBE01E90B5EAF83E0003ECFE7E3A07FC01FFFE390FF0
-001F4848130F48481303491301007F140090C8FC167E5A163EA27F161E7F7F6D91C7FC13
-FC387FFFE014FEECFFF06C14FE6F7E6C816C15F06C816C81C681133F010F801301D9000F
-1480EC007F030F13C01503818100F0157FA3163FA27E17807E167F6C16007E6D14FE01E0
-495A01F813039039FF801FF800FC90B512E0D8F83F5CD8F00749C7FC39E0007FF02A3B7B
-B935>I<003FB91280A4D9F800EBF003D87FC09238007FC049161F007EC7150FA2007C17
-07A200781703A400F818E0481701A4C892C7FCB3AE010FB7FCA43B387DB742>I<B600FC
-011FB512C0A426007FF8C8381FC000725AB3B3181F013F94C7FC8060011F163E6D6C157E
-187C6D6C15FC6D6D495A6D6DEB07F06D01F0EB1FE0DA7FFEEBFFC0021FB6C8FC02075C02
-0014F0030F1380423A7DB849>I<B600F00103B512E0A4C601F0C83807F0006E5E017F5F
-6E150FA2013F5F6E151F011F94C7FC6E5D6D163E6F147E6D167CA26F14FC6D5E6F13016D
-5E6F13036D5E811707027F5D6F130F023F5D6F131F021F92C8FC815F6E143EEE807E6E14
-7CEEC0FC6E5C16E016E16E5C16F36E5C16FF6F5BA36F5BA26F90C9FCA26F5AA36F5AA26F
-5AA26F5A433A7EB848>I<B6D8E01FB500FC90383FFFFCA4000101F0C7D83FFCC8EA7E00
-6C71153C171F6E197C017F701578836E7014F8013F6F5E6E1801011F4B6D5CA26E18036D
-4B6D5CA26D6D496D495A173C6F170F6D037C6D91C7FCEF787F6F5F6D4B6C6C131E816D02
-016E5BEFE01F03F8177C027F01036E13784D7E03FCEE80F8023F49486C5C15FE021F010F
-EDC1E04D7E03FF16C36E49EDE3C0041E7F049E15F76E01BC6D5C04FC15FF6E95C8FC4C80
-A26E5F4C143F6E5F4C141FA2037F5E4C140FA26F486E5AA2031F5E93C812036F5E5E3A7E
-B863>I<007FB5D8F803B512F8A4C66C48C7D80FF0C7FC6D6C5D6D5E6F495A6D6D49C8FC
-7F6D6D137E6F5B6DEBF8016D5D6F485A6E6C485A023F130FDA1FFF5BEE9F806E01FFC9FC
-805E6E5B6E5B80826F7E153F826F7F5D4B7F92B57EA2DA01F97FDA03F17F03F07F913807
-E07FDA0FC07F021F6D7E4B7E4A486C7F027E8102FE6D7F4A7F49488149486D7F0107804A
-6E7E49488149486E7E013F81017F83B60107B61280A441397DB848>I<EB3FFE0003B512
-E0000F14F8391FF00FFE003FEB03FF6D6C7F6E7FA26F7EA26C5A6C5AEA0380C8FCA2EC3F
-FF010FB5FC137F3901FFF87F00071380380FFE00EA3FF85B485A12FF5BA415FF6D5A127F
-263FF00713F83B1FFC1FBFFFC0390FFFFE1F0003EBF80F39003FE0032A257DA42E>97
-D<13FFB5FCA412077EAF4AB47E020F13F0023F13FC9138FE03FFDAF00013804AEB7FC002
-80EB3FE091C713F0EE1FF8A217FC160FA217FEAA17FCA3EE1FF8A217F06E133F6EEB7FE0
-6E14C0903AFDF001FF80903AF8FC07FE009039F03FFFF8D9E00F13E0D9C00390C7FC2F3A
-7EB935>I<903801FFC0010F13FC017F13FFD9FF8013802603FE0013C048485AEA0FF812
-1F13F0123F6E13804848EB7F00151C92C7FC12FFA9127FA27F123FED01E06C7E15036C6C
-EB07C06C6C14806C6C131FC69038C07E006DB45A010F13F00101138023257DA42A>I<EE
-7F80ED7FFFA4150381AF903801FF81010F13F1013F13FD9038FFC07F0003EB001FD807FC
-1307000F8048487F5B123FA2485AA312FFAA127FA27F123FA26C6C5B000F5C6C6C5B6C6C
-4913C02701FF80FD13FE39007FFFF9011F13E1010113012F3A7DB935>I<903803FF8001
-1F13F0017F13FC3901FF83FE3A03FE007F804848133F484814C0001FEC1FE05B003FEC0F
-F0A2485A16F8150712FFA290B6FCA301E0C8FCA4127FA36C7E1678121F6C6C14F86D14F0
-00071403D801FFEB0FE06C9038C07FC06DB51200010F13FC010113E025257DA42C>I<EC
-1FF0903801FFFC010713FF90391FF87F8090383FE0FFD9FFC113C0A2481381A24813016E
-1380A2ED3E0092C7FCA8B6FCA4000390C8FCB3ABB512FEA4223A7DB91D>I<161FD907FE
-EBFFC090387FFFE348B6EAEFE02607FE07138F260FF801131F48486C138F003F15CF4990
-387FC7C0EEC000007F81A6003F5DA26D13FF001F5D6C6C4890C7FC3907FE07FE48B512F8
-6D13E0261E07FEC8FC90CAFCA2123E123F7F6C7E90B512F8EDFF8016E06C15F86C816C81
-5A001F81393FC0000F48C8138048157F5A163FA36C157F6C16006D5C6C6C495AD81FF0EB
-07FCD807FEEB3FF00001B612C06C6C91C7FC010713F02B377DA530>I<13FFB5FCA41207
-7EAFED7FC0913803FFF8020F13FE91381F03FFDA3C01138014784A7E4A14C05CA25CA291
-C7FCB3A3B5D8FC3F13FFA4303A7DB935>I<EA01F0EA07FC487EA2487EA56C5AA26C5AEA
-01F0C8FCA913FF127FA412077EB3A9B512F8A4153B7DBA1B>I<141FEC7FC0ECFFE0A249
-13F0A56D13E0A2EC7FC0EC1F0091C7FCA9EC0FF0EB0FFFA4EB007F143FB3B0121FEA3F80
-EA7FC0EAFFE0EC7FE0A215C014FF6C481380903883FE006CB45A000F13F0000113801C4B
-86BA1D>I<13FFB5FCA412077EAF92380FFFE0A4923803FC0016F0ED0FE0ED1F804BC7FC
-157E5DEC03F8EC07E04A5A141FEC7FE04A7E8181A2ECCFFEEC0FFF496C7F806E7F6E7F82
-157F6F7E6F7E82150F82B5D8F83F13F8A42D3A7EB932>I<13FFB5FCA412077EB3B3ACB5
-12FCA4163A7DB91B>I<01FED97FE0EB0FFC00FF902601FFFC90383FFF80020701FF90B5
-12E0DA1F81903983F03FF0DA3C00903887801F000749DACF007F00034914DE6D48D97FFC
-6D7E4A5CA24A5CA291C75BB3A3B5D8FC1FB50083B512F0A44C257DA451>I<01FEEB7FC0
-00FF903803FFF8020F13FE91381F03FFDA3C011380000713780003497E6D4814C05CA25C
-A291C7FCB3A3B5D8FC3F13FFA430257DA435>I<903801FFC0010F13F8017F13FFD9FF80
-7F3A03FE003FE048486D7E48486D7E48486D7EA2003F81491303007F81A300FF1680A900
-7F1600A3003F5D6D1307001F5DA26C6C495A6C6C495A6C6C495A6C6C6CB45A6C6CB5C7FC
-011F13FC010113C029257DA430>I<9039FF01FF80B5000F13F0023F13FC9138FE07FFDA
-F00113800003496C13C00280EB7FE091C713F0EE3FF8A2EE1FFCA3EE0FFEAA17FC161FA2
-17F8163F17F06E137F6E14E06EEBFFC0DAF00313809139FC07FE0091383FFFF8020F13E0
-020390C7FC91C9FCACB512FCA42F357EA435>I<9038FE03F000FFEB0FFEEC3FFF91387C
-7F809138F8FFC000075B6C6C5A5CA29138807F80ED3F00150C92C7FC91C8FCB3A2B512FE
-A422257EA427>114 D<90383FF0383903FFFEF8000F13FF381FC00F383F0003007E1301
-007C130012FC15787E7E6D130013FCEBFFE06C13FCECFF806C14C06C14F06C14F81203C6
-14FC131F9038007FFE140700F0130114007E157E7E157C6C14FC6C14F8EB80019038F007
-F090B512C000F8140038E01FF81F257DA426>I<130FA55BA45BA25B5BA25A1207001FEB
-FFE0B6FCA3000390C7FCB21578A815F86CEB80F014816CEBC3E090383FFFC06D13809038
-03FE001D357EB425>I<01FFEC3FC0B5EB3FFFA4000714016C80B3A35DA25DA26C5C6E48
-13E06CD9C03E13FF90387FFFFC011F13F00103138030257DA435>I<B539F001FFF8A400
-0390C7EA1F00161E6E133E6C153C6E137C6C15786E13F8017F5CECF001013F5C14F8011F
-495AA2ECFC07010F5CECFE0F010791C7FC6E5A6D131E15BE6D13BC15FC6D5BA36E5AA26E
-5AA26E5AA26E5AA22D257EA432>I<B500F1B538803FFFA43D07FE000FF80003E06C6C01
-0715C082028015076C6E6C148015076C01C0ED0F00826E485C017FED801E5D90273FF01E
-7F5B17C0DAF83E147C011F90393C3FE078037C14F8903B0FFC781FF0F0A29139FEF00FF1
-0107EDF9E002FF14FB6D496CB45AA24B7E6D5EA26D496C90C7FCA292C7FC6E5CA2023E14
-7C023C143C40257EA445>I<B539F01FFFF0A4000390398003F8006C01C013E06C1407D9
-7FE05B6D6C485A6E48C7FC90381FFC3E010F5B903807FEFC6D6C5A5D6D5B6D5B6E7E6E7E
-814A7EA24A7E903801F3FFD903E37FD907C17FEB0FC049486C7E4A6C7E013E80496D7E49
-130F00016E7EB590383FFFF8A42D257EA432>I<B539F001FFF8A4000390C7EA1F00161E
-6E133E6C153C6E137C6C15786E13F8017F5CECF001013F5C14F8011F495AA2ECFC07010F
-5CECFE0F010791C7FC6E5A6D131E15BE6D13BC15FC6D5BA36E5AA26E5AA26E5AA26E5AA2
-92C8FCA25C141E003F133E387F803C38FFC07C147814F8EBC1F0EBC3E06C485A387D1F80
-D83FFFC9FCEA1FFCEA07F02D357EA432>I E
-%EndDVIPSBitmapFont
-%DVIPSBitmapFont: Fc ecbx1200 12 41
-/Fc 41 122 df<B612F8A91D097F9A25>45 D<EA07C0EA1FF0EA3FF8EA7FFCEAFFFEA7EA
+%DVIPSBitmapFont: Fb ecbx1200 12 42
+/Fb 42 122 df<B612F8A91D097F9A25>45 D<EA07C0EA1FF0EA3FF8EA7FFCEAFFFEA7EA
7FFCEA3FF8EA1FF0EA07C00F0F788E1F>I<EC03C01407141F147FEB03FF133FB6FCA413
C3EA0003B3B3ADB712FCA5264177C038>49 D<ECFFE0010F13FE013F6D7E90B612E00003
15F82607FC0313FE3A0FE0007FFFD81F806D138048C7000F13C0488001C015E001F07F00
@@ -267,7 +121,10 @@ FCAAEC3FF001C1B5FC01C714C001DF14F09039FFE03FFC9138000FFE01FC6D7E01F06D13
017F13E091B512F89039F9F01FFC9039FBC007FE9039FF8003FF17804A6C13C05B6F13E0
A24915F0A317F85BA4127FA5123FA217F07F121FA2000F4A13E0A26C6C15C06D4913806C
018014006C6D485A6C9038E01FFC6DB55A011F5C010714C0010191C7FC9038003FF02D42
-7BC038>I<EE1F80A24C7EA24C7EA34C7EA24B7FA34B7FA24B7FA34B7F169F031F80161F
+7BC038>I<121E121F13FC90B712FEA45A17FC17F817F017E017C0A2481680007EC8EA3F
+00007C157E5E00785D15014B5A00F84A5A484A5A5E151FC848C7FC157E5DA24A5A14035D
+14074A5AA2141F5D143FA2147F5D14FFA25BA35B92C8FCA35BA55BAA6D5A6D5A6D5A2F44
+7AC238>I<EE1F80A24C7EA24C7EA34C7EA24B7FA34B7FA24B7FA34B7F169F031F80161F
82033F80ED3E07037E80157C8203FC804B7E02018115F0820203814B137F0207815D173F
020F814B7F021F8292C77EA24A82023E80027E82027FB7FCA291B87EA2498302F0C8FCA2
0103834A157F0107834A153FA249488284011F8491C97E4984133E017E82B6020FB612F0
@@ -379,63 +236,62 @@ B45A806E90C8FC5D6E7E6E7F6E7FA24A7F4A7F8291381F3FFCEC3E1F027C7F4A6C7E4948
495A387FC1F8EB07F06CB45A6C5B000790CAFCEA01FC36407EAB3B>I
E
%EndDVIPSBitmapFont
-%DVIPSBitmapFont: Fd ectt1000 10 73
-/Fd 73 126 df<121FEA3F80EA7FC0EAFFE0B0EA7FC0AEEA1F00C7FCA7121FEA3F80EA7F
-C0EAFFE0A5EA7FC0EA3F80EA1F000B3470B32C>33 D<003C131E007F137F481480A66C14
-00A6007E7FA6003E133EA3003C131E001C131C191977B32C>I<143814FC13011303EB07
-F8EB0FF0EB1FC0EB3F80EB7F0013FE485A485A5B12075B120F5B485AA2123F90C7FCA25A
-127EA312FE5AAC7E127EA3127F7EA27F121FA26C7E7F12077F12037F6C7E6C7E137FEB3F
-80EB1FC0EB0FF0EB07F8EB03FC130113001438164272B92C>40 D<127012FC7E7E6C7E6C
-7EEA0FE06C7E6C7E6C7E6C7E137F7F1480131F14C0130FEB07E0A214F01303A214F81301
-A314FC1300AC130114F8A3130314F0A2130714E0A2EB0FC0131F1480133F14005B13FE48
-5A485A485A485AEA3FC0485A48C7FC5A5A1270164279B92C>I<EB0380497EA600201408
-00F8143E00FE14FE00FF13C1EBC7C7EBE7CF003FB512F8000F14E0000314806C14003800
-7FFCA248B5FC481480000F14E0003F14F839FFE7CFFEEBC7C7EB07C100FE13C000F8143E
-0020140800001400A66D5A1F247AAA2C>I<EA0F80EA1FE0EA3FF0EA7FF8A213FCA3123F
-121F120F120013F8A21201EA03F01207EA1FE0EA7FC0EAFF80130012FC12700E17718A2C
->44 D<007FB512F0B612F8A36C14F01D0579942C>I<121FEA3F80EA7FC0EAFFE0A5EA7F
-C0EA3F80EA1F000B0B708A2C>I<1507ED0F80A2151F16005D153E157E157CA215FC5D14
-015D14035D14075D140F5D141F92C7FC5C143EA2147E147C14FC5C13015C13035C13075C
-130F5C131F91C8FC5B133EA2137E137C13FC5B12015B12035B12075B120F5B121F90C9FC
-A25A123E127E127C12FC5AA2127021417BB92C>I<EB03F8EB0FFE90383FFF80497F90B5
-7E3901FE0FF03903F803F848486C7EEBE0004848137EA248487FA248C7EA1F80A2003E14
-0F007E15C0A3007C140700FC15E0AC6C140F007E15C0A46CEC1F80A36C6CEB3F00A26C6C
-137E6D13FE00075CEBF0016C6C485A3901FE0FF06CB55A6D5B6D5BD90FFEC7FCEB03F823
-357CB32C>I<1307497EA2131FA2133F137F13FF5A1207127FB5FC13DF139FEA7C1F1200
-B3AE007FB512E0B612F0A36C14E01C3477B32C>I<EB0FF890387FFF8048B512E0000780
-4814FC391FF80FFE393FE001FF903880007F48C7EA3F80007E141F00FE15C0150F6C15E0
-1507A3127E123CC8FCA2150F16C0151F1680153F16005D15FE4A5A14034A5A4A5A4A5A4A
-5AECFF804948C7FC495A495A495AEB3FE0EB7F8049C8FC485A4848EB03C04848EB07E0EA
-1FE0485A48B6FCB7FCA36C15C023347CB32C>I<EB0FFC90387FFF8048B512E0000714F8
-4880391FF807FEEBC0004848137F6D7F1680151FA26C5A6CC7FCC8FC153F16005D15FE14
-014A5AEC1FF890381FFFF0495BA215F86D7F90380007FEEC00FF81ED3F80ED1FC0150FA2
-16E01507A2123C127EB4FC150F16C0A248141F007FEC3F806DEB7F006C6C5B391FF807FE
-6CB55A6C5C6C14E0C66C1380D90FFCC7FC23357CB32C>I<EC07F04A7E141F143FA2147E
-A214FCEB01F8A2EB03F0EB07E0A2EB0FC0EB1F80A2EB3F00137EA25B485AA2485A5B1207
-485AA2485A48C7FCA2127E5AB712FC16FEA36C15FCC8EAF800AA91387FFFF091B512F8A3
-6E13F027347EB32C>I<000FB512FE4880A35D0180C8FCADEB83FE90389FFF8090B512E0
-15F8819038FE03FE9038F000FF01C07F49EB3F8090C7121F6C15C0C8120FA2ED07E0A412
-3C127EB4FC150F16C0A248141F007EEC3F80007FEC7F006C6C5B6D485A391FF80FFC6CB5
-5A6C5C000114C06C6C90C7FCEB0FF823347CB22C>I<EB07FC90383FFF8090B512E00003
-14F84880390FFC07FE391FF001FF9038C0007F4848EB3F8090C7121F4815C0007E140FA5
-6CEC1F80A26C6CEB3F006D5B390FF001FE3903FC07F86CB55A6C6C13C0D907FCC7FC9038
-7FFFC048B512F03903FC07F8390FF001FE391FC0007F497F48C7EA1F80007EEC0FC0A248
-EC07E0A7007EEC0FC0A2007F141F6C6CEB3F806C6CEB7F009038F001FF390FFC07FE6CB5
-5A6C5CC614E0013F1380D907FCC7FC23357CB32C>56 D<EB07FCEB3FFF90B512C0488048
-803907FC07F8390FF001FC48486C7ED83F80137E157F48C77E007EEC1F8012FE5AED0FC0
-A416E0A37E127E007F141F7E6D133F6C6C137F390FF001FF3807FC0F6CB6FC6C14F76C14
-C7013F130FD90FF813C090C7FCA2151F1680153F1600000F5C486C137E486C13FE4A5A4A
-5A14079038801FF0391FE07FE090B55A6C91C7FC6C5B000113F838007FC023357CB32C>
-I<121FEA3F80EA7FC0EAFFE0A5EA7FC0EA3F80EA1F00C7FCAE121FEA3F80EA7FC0EAFFE0
-A5EA7FC0EA3F80EA1F000B2470A32C>I<EA0F80EA1FC0EA3FE0EA7FF0A5EA3FE0EA1FC0
-EA0F80C7FCAEEA0F80EA1FE0EA3FF0EA7FF8A213FCA3123F121F120F120013F8A21201EA
-03F01207EA1FE0EA7FC0EAFF80130012FC12700E3071A32C>I<007FB612F0B712F8A36C
-15F0CAFCA8007FB612F0B712F8A36C15F025127DA12C>61 D<EC7F80903803FFE0010F7F
-013F7F497F9038FFC0FE3901FE007FD803F87F4848EB1F809038E00FCF390FC03FFF4848
-4813C091B5FCEA3F01393E03F87F903907F03FE0007EEBE01F397C0FC00FEC8007A2EAFC
-1F00F8EB0003A900FCEB8007D87C0F14C0A2ECC00F3A7E07E01F80003EEBF03F903903F8
-7F00393F01FFFED81F805B6E5A6C6C6C5A3907E00FC09039F00007C06C6CEB0FE0D801FE
-131F3900FFC0FF6DB512C06D1480010FEBFE00010313F89038007FC023337CB22C>64
+%DVIPSBitmapFont: Fc ectt1000 10 71
+/Fc 71 123 df<121FEA3F80EA7FC0EAFFE0B0EA7FC0AEEA1F00C7FCA7121FEA3F80EA7F
+C0EAFFE0A5EA7FC0EA3F80EA1F000B3470B32C>33 D<143814FC13011303EB07F8EB0FF0
+EB1FC0EB3F80EB7F0013FE485A485A5B12075B120F5B485AA2123F90C7FCA25A127EA312
+FE5AAC7E127EA3127F7EA27F121FA26C7E7F12077F12037F6C7E6C7E137FEB3F80EB1FC0
+EB0FF0EB07F8EB03FC130113001438164272B92C>40 D<127012FC7E7E6C7E6C7EEA0FE0
+6C7E6C7E6C7E6C7E137F7F1480131F14C0130FEB07E0A214F01303A214F81301A314FC13
+00AC130114F8A3130314F0A2130714E0A2EB0FC0131F1480133F14005B13FE485A485A48
+5A485AEA3FC0485A48C7FC5A5A1270164279B92C>I<EB0380497EA60020140800F8143E
+00FE14FE00FF13C1EBC7C7EBE7CF003FB512F8000F14E0000314806C140038007FFCA248
+B5FC481480000F14E0003F14F839FFE7CFFEEBC7C7EB07C100FE13C000F8143E00201408
+00001400A66D5A1F247AAA2C>I<EA0F80EA1FE0EA3FF0EA7FF8A213FCA3123F121F120F
+120013F8A21201EA03F01207EA1FE0EA7FC0EAFF80130012FC12700E17718A2C>44
+D<007FB512F0B612F8A36C14F01D0579942C>I<121FEA3F80EA7FC0EAFFE0A5EA7FC0EA
+3F80EA1F000B0B708A2C>I<1507ED0F80A2151F16005D153E157E157CA215FC5D14015D
+14035D14075D140F5D141F92C7FC5C143EA2147E147C14FC5C13015C13035C13075C130F
+5C131F91C8FC5B133EA2137E137C13FC5B12015B12035B12075B120F5B121F90C9FCA25A
+123E127E127C12FC5AA2127021417BB92C>I<EB03F8EB0FFE90383FFF80497F90B57E39
+01FE0FF03903F803F848486C7EEBE0004848137EA248487FA248C7EA1F80A2003E140F00
+7E15C0A3007C140700FC15E0AC6C140F007E15C0A46CEC1F80A36C6CEB3F00A26C6C137E
+6D13FE00075CEBF0016C6C485A3901FE0FF06CB55A6D5B6D5BD90FFEC7FCEB03F823357C
+B32C>I<1307497EA2131FA2133F137F13FF5A1207127FB5FC13DF139FEA7C1F1200B3AE
+007FB512E0B612F0A36C14E01C3477B32C>I<EB0FF890387FFF8048B512E00007804814
+FC391FF80FFE393FE001FF903880007F48C7EA3F80007E141F00FE15C0150F6C15E01507
+A3127E123CC8FCA2150F16C0151F1680153F16005D15FE4A5A14034A5A4A5A4A5A4A5AEC
+FF804948C7FC495A495A495AEB3FE0EB7F8049C8FC485A4848EB03C04848EB07E0EA1FE0
+485A48B6FCB7FCA36C15C023347CB32C>I<EB0FFC90387FFF8048B512E0000714F84880
+391FF807FEEBC0004848137F6D7F1680151FA26C5A6CC7FCC8FC153F16005D15FE14014A
+5AEC1FF890381FFFF0495BA215F86D7F90380007FEEC00FF81ED3F80ED1FC0150FA216E0
+1507A2123C127EB4FC150F16C0A248141F007FEC3F806DEB7F006C6C5B391FF807FE6CB5
+5A6C5C6C14E0C66C1380D90FFCC7FC23357CB32C>I<EC07F04A7E141F143FA2147EA214
+FCEB01F8A2EB03F0EB07E0A2EB0FC0EB1F80A2EB3F00137EA25B485AA2485A5B1207485A
+A2485A48C7FCA2127E5AB712FC16FEA36C15FCC8EAF800AA91387FFFF091B512F8A36E13
+F027347EB32C>I<000FB512FE4880A35D0180C8FCADEB83FE90389FFF8090B512E015F8
+819038FE03FE9038F000FF01C07F49EB3F8090C7121F6C15C0C8120FA2ED07E0A4123C12
+7EB4FC150F16C0A248141F007EEC3F80007FEC7F006C6C5B6D485A391FF80FFC6CB55A6C
+5C000114C06C6C90C7FCEB0FF823347CB22C>I<EB07FC90383FFF8090B512E0000314F8
+4880390FFC07FE391FF001FF9038C0007F4848EB3F8090C7121F4815C0007E140FA56CEC
+1F80A26C6CEB3F006D5B390FF001FE3903FC07F86CB55A6C6C13C0D907FCC7FC90387FFF
+C048B512F03903FC07F8390FF001FE391FC0007F497F48C7EA1F80007EEC0FC0A248EC07
+E0A7007EEC0FC0A2007F141F6C6CEB3F806C6CEB7F009038F001FF390FFC07FE6CB55A6C
+5CC614E0013F1380D907FCC7FC23357CB32C>56 D<EB07FCEB3FFF90B512C04880488039
+07FC07F8390FF001FC48486C7ED83F80137E157F48C77E007EEC1F8012FE5AED0FC0A416
+E0A37E127E007F141F7E6D133F6C6C137F390FF001FF3807FC0F6CB6FC6C14F76C14C701
+3F130FD90FF813C090C7FCA2151F1680153F1600000F5C486C137E486C13FE4A5A4A5A14
+079038801FF0391FE07FE090B55A6C91C7FC6C5B000113F838007FC023357CB32C>I<12
+1FEA3F80EA7FC0EAFFE0A5EA7FC0EA3F80EA1F00C7FCAE121FEA3F80EA7FC0EAFFE0A5EA
+7FC0EA3F80EA1F000B2470A32C>I<EA0F80EA1FC0EA3FE0EA7FF0A5EA3FE0EA1FC0EA0F
+80C7FCAEEA0F80EA1FE0EA3FF0EA7FF8A213FCA3123F121F120F120013F8A21201EA03F0
+1207EA1FE0EA7FC0EAFF80130012FC12700E3071A32C>I<007FB612F0B712F8A36C15F0
+CAFCA8007FB612F0B712F8A36C15F025127DA12C>61 D<EC7F80903803FFE0010F7F013F
+7F497F9038FFC0FE3901FE007FD803F87F4848EB1F809038E00FCF390FC03FFF48484813
+C091B5FCEA3F01393E03F87F903907F03FE0007EEBE01F397C0FC00FEC8007A2EAFC1F00
+F8EB0003A900FCEB8007D87C0F14C0A2ECC00F3A7E07E01F80003EEBF03F903903F87F00
+393F01FFFED81F805B6E5A6C6C6C5A3907E00FC09039F00007C06C6CEB0FE0D801FE131F
+3900FFC0FF6DB512C06D1480010FEBFE00010313F89038007FC023337CB22C>64
D<14FE497EA4497FA214EFA2130781A214C7A2010F7FA314C390381F83F0A590383F01F8
A490387E00FCA549137E90B512FEA34880A29038F8003FA34848EB1F80A4000715C04913
0FD87FFEEBFFFC6D5AB514FE6C15FC497E27347EB32C>I<007FB512E015F8B612FE6C80
@@ -460,116 +316,285 @@ A36C141FA27F121F6D133F120F6D137F6C7E6C6C13FF6D5A3801FF076C90B5FC6D13EF01
2C>I<007FB512F8B612FCA36C14F839000FC000B3B3A5007FB512F8B612FCA36C14F81E
3379B22C>I<0107B512804914C0A36D148090390003F000B3AF1218127EA2B4FCA24A5A
48130F007F131F9038C07FC06CB55A6C91C7FC6C5B000313F838007FC022347BB22C>I<
-387FFFE0B57EA36C5BD803F0C8FCB3AE16F0ED01F8A8007FB6FCB7FCA36C15F025337DB2
-2C>76 D<D87FE0EB0FFC486CEB1FFEA26D133F007F15FC000F15E001BC137BA4019E13F3
-A3EB9F01A2018F13E3A21483A2018713C314C7A201831383A214EFA201811303A214FFEB
-80FEA3147C14381400ACD87FF0EB1FFC486CEB3FFEA36C48EB1FFC27337EB22C>I<D87F
-F0EB7FFC486CEBFFFEA27F007FEC7FFCD807FEEB07C013DEA213DF13CFA2148013C714C0
-A213C314E0A213C114F0A213C014F8A2147CA3143EA2141E141FA2140F1587A2140715C7
-A2140315E71401A215F71400A215FFD87FFC137F487E153FA26C48EB1F8027337EB22C>
-I<EB7FFF0003B512E0000F14F848804880EBE003EB800048C7127FA2007E80A300FE1580
-48141FB3A86C143FA2007E1500A3007F5CA26C6C13FEEBF00790B5FC6C5C6C5C000314E0
-C66C90C7FC21357BB32C>I<007FB512C0B612F88115FF6C15802603F00013C0153FED0F
-E0ED07F0A2150316F81501A6150316F01507A2ED0FE0ED3FC015FF90B61280160015FC5D
-15C001F0C8FCB0387FFF80B57EA36C5B25337EB22C>I<EB7FFF0003B512E0000F14F848
-804880EBF007EB800048C7127FA2007E80A300FE158048141FB3A7EB01F0EB03F800FE14
-3F267E01FC1300A2EB00FE007F5C147FD83F8013FEEBF03F90B5FC6C5C6C5C000314E0C6
-7E90380007F0A26E7EA26E7EA26E7EA2157FA2153E21407BB32C>I<387FFFFCB67E15E0
-15F86C803907E007FE1401EC007F6F7E151FA26F7EA64B5AA2153F4BC7FCEC01FE140790
-B55A5D15E081819038E007FCEC01FE1400157F81A8160FEE1F80A5D87FFEEB1FBFB5ECFF
-00815E6C486D5AC8EA01F029347EB22C>I<90381FF80790B5EA0F804814CF000714FF5A
-381FF01F383FC003497E48C7FC007E147F00FE143F5A151FA46CEC0F00007E91C7FC127F
-7FEA3FE0EA1FFCEBFFC06C13FC0003EBFFC06C14F06C6C7F01077F9038007FFEEC07FF02
-001380153FED1FC0A2ED0FE0A20078140712FCA56CEC0FC0A26CEC1F806D133F01E0EB7F
-009038FE01FF90B55A5D00F914F0D8F83F13C0D8700790C7FC23357CB32C>I<007FB612
-FCB712FEA43AFC007E007EA70078153CC71400B3AF90383FFFFCA2497F6D5BA227337EB2
-2C>I<3B7FFF803FFFC0B56C4813E0A36C496C13C03B03F00001F800B3AF6D130300015D
-A26D130700005D6D130F017F495A6D6C485AECE0FF6DB5C7FC6D5B010313F86D5B903800
-3F802B3480B22C>I<D87FFCEB7FFC486CEBFFFEA36C48EB7FFCD80FC0EB07E06D130F00
-0715C0A36D131F00031580A36D133F00011500A36D5B0000147EA4017E5BA46D485AA490
-381F83F0A4010F5B14C7A301075BA214EFA201035BA214FFA26D90C7FCA46D5A27347EB2
-2C>I<3A3FFF03FFE0484913F0148714076C6D13E03A01F800FE007F0000495A13FE017E
-5BEB7F03013F5B1487011F5B14CF010F5B14FF6D5BA26D90C7FCA26D5AA26D5AA2497EA2
-497EA2497F81EB0FCF81EB1FC7EC87F0EB3F83EC03F8EB7F01017E7FEBFE00497F000114
-7E49137F000380491480151FD87FFEEBFFFC6D5AB514FE6C15FC497E27337EB22C>88
-D<D87FFCEB7FFC486CEBFFFEA36C48EB7FFCD807F0EB0FC0151F000315806D133F12016D
-EB7F0012006D137E017E13FE017F5BEB3F01EC81F8131FEC83F0EB0FC314C7903807E7E0
-A201035B14EF6DB45AA292C7FC7F5C147EB0903807FFE0497FA36D5B27337EB22C>I<00
-3FB612C04815E0A4007EC7EA1FC0ED3F80A2ED7F00157E15FE4A5A003C5CC712034A5AA2
-4A5A4A5AA24A5A4AC7FCA214FE495AA2495A495AA2495A495AA2495A49C8FCA213FE485A
-A24848EB03C049EB07E01207485A5B121F485AA248C7FCB7FCA46C15C023337CB22C>I<
-007FB6FCB71280A46C150021067B7D2C>95 D<3801FFF0000713FE001F6D7E15E0488090
-38C01FF81407EC01FC381F80000006C77EC8127EA3ECFFFE131F90B5FC1203120F48EB80
-7E383FF800EA7FC090C7FC12FE5AA47E007F14FEEB8003383FE01F6CB612FC6C15FE6C14
-BF0001EBFE1F3A003FF007FC27247CA32C>97 D<EA7FF0487EA3127F1201AAEC1FE0ECFF
-F801FB13FE90B6FC16809138F07FC09138801FE091380007F049EB03F85BED01FC491300
-A216FE167EA816FE6D14FCA2ED01F86D13036DEB07F0150F9138801FE09138E07FC091B5
-1280160001FB5B01F813F83900F03FC027337FB22C>I<903803FFE0011F13F8017F13FE
-48B5FC48804848C6FCEA0FF0485A49137E4848131890C9FC5A127EA25AA8127EA2127F6C
-140F6DEB1F806C7E6D133F6C6CEB7F003907FE03FF6CB55A6C5C6C6C5B011F13E0010390
-C7FC21247AA32C>I<EC0FFE4A7EA380EC003FAAEB07F8EB3FFE90B512BF4814FF5A3807
-FC0F380FF00348487E497E48487F90C7FC007E80A212FE5AA87E007E5CA2007F5C6C7E5C
-6C6C5A380FF0073807FC1F6CB612FC6CECBFFE6C143FEB3FFC90390FF01FFC27337DB22C
->I<EB03FE90381FFFC0017F13F048B57E48803907FE03FE390FF800FFD81FE0EB3F805B
-4848EB1FC090C7120F5A007E15E015075AB7FCA416C000FCC9FC7E127EA2127F6CEC03C0
-6DEB07E06C7ED80FF0130F6C6CEB3FC001FF13FF000190B512806C1500013F13FC010F13
-F00101138023247CA32C>I<EC0FF8EC3FFE91B5FC4914805B903807FC7F14F090390FE0
-3F0014C092C7FCA6007FB512FEB7FCA36C5C26000FC0C7FCB3A8003FB512F04880A36C5C
-21337DB22C>I<ED03F8903907F80FFC90391FFE3FFE017FB6FC48B7FC48ECFE7F9038FC
-0FF82607F003133E3A0FE001FC1CD9C0001300001F8049137EA66D13FE000F5CEBE0016C
-6C485A3903FC0FF048B5FC5D481480D99FFEC7FCEB87F80180C8FCA37F6C7E90B512F06C
-14FE48ECFF804815E04815F03A3FC0001FF848C7EA03FC007E1400007C157C00FC157E48
-153EA46C157E007E15FCD87F801303D83FE0EB0FF8D81FFCEB7FF06CB612E0000315806C
-1500D8003F13F8010713C028387EA42C>I<EA7FF0487EA3127F1201AAEC1FE0EC7FFC90
-38F9FFFE01FB7F90B6FC9138F03F80ECC01F02807FEC000F5B5BA25BB3267FFFE0B5FCB5
-00F11480A36C01E0140029337FB22C>I<1307EB1FC0A2497EA36D5AA20107C7FC90C8FC
-A7387FFFC080B5FC7EA2EA0007B3A8007FB512FCB612FEA36C14FC1F3479B32C>I<140E
-EC3F80A2EC7FC0A3EC3F80A2EC0E0091C7FCA748B512804814C0A37EC7120FB3B3A2141F
-003C1480007E133FB414005CEB01FEEBFFFC6C5B5C001F5B000790C7FC1A467CB32C>I<
-EA7FE0487EA3127F1201AA91381FFFF04A13F8A36E13F0913800FE004A5A4A5A4A5A4A5A
-4A5A4A5A4AC7FC14FEEBF1FC13F3EBF7FE90B5FCA2EC9F80EC0FC001FE7FEBFC07496C7E
-496C7E811400157E811680151F3A7FFFC0FFFCB500E113FEA36C01C013FC27337EB22C>
-I<387FFFE0B57EA37EEA0003B3B3A5007FB61280B712C0A36C158022337BB22C>I<3A7F
-83F007E09039CFFC1FF83AFFDFFE3FFCD87FFF13FF91B57E3A07FE1FFC3E01FCEBF83F49
-6C487E01F013E001E013C0A301C01380B33B7FFC3FF87FF0027F13FFD8FFFE6D13F8D87F
-FC4913F0023F137F2D2481A32C>I<397FF01FE039FFF87FFC9038F9FFFE01FB7F6CB6FC
-00019038F03F80ECC01F02807FEC000F5B5BA25BB3267FFFE0B5FCB500F11480A36C01E0
-140029247FA32C>I<EB07FCEB1FFF017F13C048B512F048803907FC07FC390FF001FE48
-486C7E0180133F003F158090C7121F007EEC0FC0A348EC07E0A76C140F007E15C0A2007F
-141F6C15806D133F6C6CEB7F006D5B6C6C485A3907FC07FC6CB55A6C5C6C6C13C0011F90
-C7FCEB07FC23247CA32C>I<397FF01FE039FFF8FFF801FB13FE90B6FC6C158000019038
-F07FC09138801FE091380007F049EB03F85BED01FC491300A216FE167EA816FE6D14FCA2
-ED01F86D13036DEB07F0150F9138801FE09138E07FC091B51280160001FB5B01F813F8EC
-3FC091C8FCAD387FFFE0B57EA36C5B27367FA32C>I<D87FFEEB3FC0B53801FFF0020713
-F8021F13FC6C5B39003F7FE1ECFF019138FC00F84A13704A13005CA25C5CA391C8FCAF00
-7FB512E0B67EA36C5C26247EA32C>114 D<90387FF8700003B512F8120F5A5A387FC00F
-387E00034813015AA36CEB00F0007F140013F0383FFFC06C13FE6CEBFF80000314E0C66C
-13F8010113FCEB0007EC00FE0078147F00FC143F151F7EA26C143F6D133E6D13FE9038F0
-07FC90B5FC15F815E000F8148039701FFC0020247AA32C>I<131E133FA9007FB6FCB712
-80A36C1500D8003FC8FCB1ED03C0ED07E0A5EC800F011FEB1FC0ECE07F6DB51280160001
-035B6D13F89038003FE0232E7EAD2C>I<3A7FF003FF80486C487FA3007F7F0001EB000F
-B3A3151FA2153F6D137F3900FE03FF90B7FC6D15807F6D13CF902603FE07130029247FA3
-2C>I<3A7FFF01FFFCB514FE148314016C15FC3A03E0000F80A26D131F00011500A26D5B
-0000143EA26D137E017C137CA2017E13FC013E5BA2EB3F01011F5BA21483010F5BA214C7
-01075BA214EF01035BA214FF6D90C7FCA26D5A147C27247EA32C>I<D87FFFEB7FFF6EB5
-FCB515806C16004A7ED807C0EB01F0A66C6C495AA3143E147FA2D801F0495AECFF87A214
-F7A201F113C700005D9038F9E3CFA201FB13EFA3D97BC190C7FC017F13FFA21480A2013F
-5B90381F007C29247FA32C>I<3A3FFF03FFF048018713F8A36C010313F03A00FC007E00
-5D90387E01F8013F5BEB1F83EC87E090380FCFC0903807EF80EB03FF6D90C7FC5C6D5A14
-7C14FE130180903803EF80903807CFC0EB0FC7EC83E090381F01F0013F7FEB7E00017C13
-7C49137E0001803A7FFF01FFFC1483B514FE6C15FC140127247EA32C>I<3A7FFF01FFFC
-B5008113FE148314816C010113FC3A03E0000F806C7E151F6D140012005D6D133E137C01
-7E137E013E137CA2013F13FC6D5BA2EB0F815DA2EB07C1ECC3E0A2EB03E3ECE7C0130114
-F75DEB00FFA292C7FC80A2143EA2147E147CA214FC5CA2EA0C01003F5BEA7F83EB87E0EA
-7E0F495A387FFF806C90C8FC6C5A6C5AEA07E027367EA32C>I<003FB612E04815F0A400
-7EC7EA1FE0ED3FC0ED7F80EDFF004A5A003C495AC7485A4A5A4A5A4A5A4A5A4AC7FCEB01
-FC495AEB0FF0495A495A495A49C8FC4848EB01E04848EB03F0485A485A485A485A485AB7
-FCA46C15E024247DA32C>I<15FF02071380141F147F91B512004913C04AC7FCEB03F85C
-B31307EB1FE013FF007F5BB55A49C8FC6D7E6C7FC67F131FEB07F01303B380EB01FEECFF
-C06D13FF6E1380141F14070200130021417BB92C>I<EA7FC0EAFFF813FE6D7E6C7FC67F
-131FEB07F01303B380EB01FEECFFC06D13FF6E1380141F147F91B512004913C04AC7FCEB
-03F85CB31307EB1FE013FF007F5BB55A49C8FC13F8EA7FC021417BB92C>125
-D E
+D87FFCEB7FF8486CEBFFFCA36C48EB7FF8D807C0EB1F80153FED7F00157E5D4A5A14034A
+5A5D4A5A4A5A143F4AC7FC147E5CEBC1F813C3EBC7FCA2EBCFFEEBDFBEEBFFBF141F01FE
+7F496C7E13F86E7EEBF00301E07FEBC001816E7EA2157E153E153F811680ED0FC0A2ED07
+E0D87FFCEB1FFC486CEB3FFEA36C48EB1FFC27337EB22C>I<387FFFE0B57EA36C5BD803
+F0C8FCB3AE16F0ED01F8A8007FB6FCB7FCA36C15F025337DB22C>I<D87FE0EB0FFC486C
+EB1FFEA26D133F007F15FC000F15E001BC137BA4019E13F3A3EB9F01A2018F13E3A21483
+A2018713C314C7A201831383A214EFA201811303A214FFEB80FEA3147C14381400ACD87F
+F0EB1FFC486CEB3FFEA36C48EB1FFC27337EB22C>I<D87FF0EB7FFC486CEBFFFEA27F00
+7FEC7FFCD807FEEB07C013DEA213DF13CFA2148013C714C0A213C314E0A213C114F0A213
+C014F8A2147CA3143EA2141E141FA2140F1587A2140715C7A2140315E71401A215F71400
+A215FFD87FFC137F487E153FA26C48EB1F8027337EB22C>I<EB7FFF0003B512E0000F14
+F848804880EBE003EB800048C7127FA2007E80A300FE158048141FB3A86C143FA2007E15
+00A3007F5CA26C6C13FEEBF00790B5FC6C5C6C5C000314E0C66C90C7FC21357BB32C>I<
+007FB512C0B612F88115FF6C15802603F00013C0153FED0FE0ED07F0A2150316F81501A6
+150316F01507A2ED0FE0ED3FC015FF90B61280160015FC5D15C001F0C8FCB0387FFF80B5
+7EA36C5B25337EB22C>I<EB7FFF0003B512E0000F14F848804880EBF007EB800048C712
+7FA2007E80A300FE158048141FB3A7EB01F0EB03F800FE143F267E01FC1300A2EB00FE00
+7F5C147FD83F8013FEEBF03F90B5FC6C5C6C5C000314E0C67E90380007F0A26E7EA26E7E
+A26E7EA2157FA2153E21407BB32C>I<387FFFFCB67E15E015F86C803907E007FE1401EC
+007F6F7E151FA26F7EA64B5AA2153F4BC7FCEC01FE140790B55A5D15E081819038E007FC
+EC01FE1400157F81A8160FEE1F80A5D87FFEEB1FBFB5ECFF00815E6C486D5AC8EA01F029
+347EB22C>I<90381FF80790B5EA0F804814CF000714FF5A381FF01F383FC003497E48C7
+FC007E147F00FE143F5A151FA46CEC0F00007E91C7FC127F7FEA3FE0EA1FFCEBFFC06C13
+FC0003EBFFC06C14F06C6C7F01077F9038007FFEEC07FF02001380153FED1FC0A2ED0FE0
+A20078140712FCA56CEC0FC0A26CEC1F806D133F01E0EB7F009038FE01FF90B55A5D00F9
+14F0D8F83F13C0D8700790C7FC23357CB32C>I<007FB612FCB712FEA43AFC007E007EA7
+0078153CC71400B3AF90383FFFFCA2497F6D5BA227337EB22C>I<3B7FFF803FFFC0B56C
+4813E0A36C496C13C03B03F00001F800B3AF6D130300015DA26D130700005D6D130F017F
+495A6D6C485AECE0FF6DB5C7FC6D5B010313F86D5B9038003F802B3480B22C>I<D87FFC
+EB7FFC486CEBFFFEA36C48EB7FFCD80FC0EB07E06D130F000715C0A36D131F00031580A3
+6D133F00011500A36D5B0000147EA4017E5BA46D485AA490381F83F0A4010F5B14C7A301
+075BA214EFA201035BA214FFA26D90C7FCA46D5A27347EB22C>I<3A3FFF03FFE0484913
+F0148714076C6D13E03A01F800FE007F0000495A13FE017E5BEB7F03013F5B1487011F5B
+14CF010F5B14FF6D5BA26D90C7FCA26D5AA26D5AA2497EA2497EA2497F81EB0FCF81EB1F
+C7EC87F0EB3F83EC03F8EB7F01017E7FEBFE00497F0001147E49137F000380491480151F
+D87FFEEBFFFC6D5AB514FE6C15FC497E27337EB22C>88 D<D87FFCEB7FFC486CEBFFFEA3
+6C48EB7FFCD807F0EB0FC0151F000315806D133F12016DEB7F0012006D137E017E13FE01
+7F5BEB3F01EC81F8131FEC83F0EB0FC314C7903807E7E0A201035B14EF6DB45AA292C7FC
+7F5C147EB0903807FFE0497FA36D5B27337EB22C>I<003FB612C04815E0A4007EC7EA1F
+C0ED3F80A2ED7F00157E15FE4A5A003C5CC712034A5AA24A5A4A5AA24A5A4AC7FCA214FE
+495AA2495A495AA2495A495AA2495A49C8FCA213FE485AA24848EB03C049EB07E0120748
+5A5B121F485AA248C7FCB7FCA46C15C023337CB22C>I<007FB6FCB71280A46C15002106
+7B7D2C>95 D<3801FFF0000713FE001F6D7E15E048809038C01FF81407EC01FC381F8000
+0006C77EC8127EA3ECFFFE131F90B5FC1203120F48EB807E383FF800EA7FC090C7FC12FE
+5AA47E007F14FEEB8003383FE01F6CB612FC6C15FE6C14BF0001EBFE1F3A003FF007FC27
+247CA32C>97 D<EA7FF0487EA3127F1201AAEC1FE0ECFFF801FB13FE90B6FC16809138F0
+7FC09138801FE091380007F049EB03F85BED01FC491300A216FE167EA816FE6D14FCA2ED
+01F86D13036DEB07F0150F9138801FE09138E07FC091B51280160001FB5B01F813F83900
+F03FC027337FB22C>I<903803FFE0011F13F8017F13FE48B5FC48804848C6FCEA0FF048
+5A49137E4848131890C9FC5A127EA25AA8127EA2127F6C140F6DEB1F806C7E6D133F6C6C
+EB7F003907FE03FF6CB55A6C5C6C6C5B011F13E0010390C7FC21247AA32C>I<EC0FFE4A
+7EA380EC003FAAEB07F8EB3FFE90B512BF4814FF5A3807FC0F380FF00348487E497E4848
+7F90C7FC007E80A212FE5AA87E007E5CA2007F5C6C7E5C6C6C5A380FF0073807FC1F6CB6
+12FC6CECBFFE6C143FEB3FFC90390FF01FFC27337DB22C>I<EB03FE90381FFFC0017F13
+F048B57E48803907FE03FE390FF800FFD81FE0EB3F805B4848EB1FC090C7120F5A007E15
+E015075AB7FCA416C000FCC9FC7E127EA2127F6CEC03C06DEB07E06C7ED80FF0130F6C6C
+EB3FC001FF13FF000190B512806C1500013F13FC010F13F00101138023247CA32C>I<EC
+0FF8EC3FFE91B5FC4914805B903807FC7F14F090390FE03F0014C092C7FCA6007FB512FE
+B7FCA36C5C26000FC0C7FCB3A8003FB512F04880A36C5C21337DB22C>I<ED03F8903907
+F80FFC90391FFE3FFE017FB6FC48B7FC48ECFE7F9038FC0FF82607F003133E3A0FE001FC
+1CD9C0001300001F8049137EA66D13FE000F5CEBE0016C6C485A3903FC0FF048B5FC5D48
+1480D99FFEC7FCEB87F80180C8FCA37F6C7E90B512F06C14FE48ECFF804815E04815F03A
+3FC0001FF848C7EA03FC007E1400007C157C00FC157E48153EA46C157E007E15FCD87F80
+1303D83FE0EB0FF8D81FFCEB7FF06CB612E0000315806C1500D8003F13F8010713C02838
+7EA42C>I<EA7FF0487EA3127F1201AAEC1FE0EC7FFC9038F9FFFE01FB7F90B6FC9138F0
+3F80ECC01F02807FEC000F5B5BA25BB3267FFFE0B5FCB500F11480A36C01E0140029337F
+B22C>I<1307EB1FC0A2497EA36D5AA20107C7FC90C8FCA7387FFFC080B5FC7EA2EA0007
+B3A8007FB512FCB612FEA36C14FC1F3479B32C>I<140EEC3F80A2EC7FC0A3EC3F80A2EC
+0E0091C7FCA748B512804814C0A37EC7120FB3B3A2141F003C1480007E133FB414005CEB
+01FEEBFFFC6C5B5C001F5B000790C7FC1A467CB32C>I<EA7FE0487EA3127F1201AA9138
+1FFFF04A13F8A36E13F0913800FE004A5A4A5A4A5A4A5A4A5A4A5A4AC7FC14FEEBF1FC13
+F3EBF7FE90B5FCA2EC9F80EC0FC001FE7FEBFC07496C7E496C7E811400157E811680151F
+3A7FFFC0FFFCB500E113FEA36C01C013FC27337EB22C>I<387FFFE0B57EA37EEA0003B3
+B3A5007FB61280B712C0A36C158022337BB22C>I<3A7F83F007E09039CFFC1FF83AFFDF
+FE3FFCD87FFF13FF91B57E3A07FE1FFC3E01FCEBF83F496C487E01F013E001E013C0A301
+C01380B33B7FFC3FF87FF0027F13FFD8FFFE6D13F8D87FFC4913F0023F137F2D2481A32C
+>I<397FF01FE039FFF87FFC9038F9FFFE01FB7F6CB6FC00019038F03F80ECC01F02807F
+EC000F5B5BA25BB3267FFFE0B5FCB500F11480A36C01E0140029247FA32C>I<EB07FCEB
+1FFF017F13C048B512F048803907FC07FC390FF001FE48486C7E0180133F003F158090C7
+121F007EEC0FC0A348EC07E0A76C140F007E15C0A2007F141F6C15806D133F6C6CEB7F00
+6D5B6C6C485A3907FC07FC6CB55A6C5C6C6C13C0011F90C7FCEB07FC23247CA32C>I<39
+7FF01FE039FFF8FFF801FB13FE90B6FC6C158000019038F07FC09138801FE091380007F0
+49EB03F85BED01FC491300A216FE167EA816FE6D14FCA2ED01F86D13036DEB07F0150F91
+38801FE09138E07FC091B51280160001FB5B01F813F8EC3FC091C8FCAD387FFFE0B57EA3
+6C5B27367FA32C>I<D87FFEEB3FC0B53801FFF0020713F8021F13FC6C5B39003F7FE1EC
+FF019138FC00F84A13704A13005CA25C5CA391C8FCAF007FB512E0B67EA36C5C26247EA3
+2C>114 D<90387FF8700003B512F8120F5A5A387FC00F387E00034813015AA36CEB00F0
+007F140013F0383FFFC06C13FE6CEBFF80000314E0C66C13F8010113FCEB0007EC00FE00
+78147F00FC143F151F7EA26C143F6D133E6D13FE9038F007FC90B5FC15F815E000F81480
+39701FFC0020247AA32C>I<131E133FA9007FB6FCB71280A36C1500D8003FC8FCB1ED03
+C0ED07E0A5EC800F011FEB1FC0ECE07F6DB51280160001035B6D13F89038003FE0232E7E
+AD2C>I<3A7FF003FF80486C487FA3007F7F0001EB000FB3A3151FA2153F6D137F3900FE
+03FF90B7FC6D15807F6D13CF902603FE07130029247FA32C>I<3A7FFF01FFFCB514FE14
+8314016C15FC3A03E0000F80A26D131F00011500A26D5B0000143EA26D137E017C137CA2
+017E13FC013E5BA2EB3F01011F5BA21483010F5BA214C701075BA214EF01035BA214FF6D
+90C7FCA26D5A147C27247EA32C>I<D87FFFEB7FFF6EB5FCB515806C16004A7ED807C0EB
+01F0A66C6C495AA3143E147FA2D801F0495AECFF87A214F7A201F113C700005D9038F9E3
+CFA201FB13EFA3D97BC190C7FC017F13FFA21480A2013F5B90381F007C29247FA32C>I<
+3A3FFF03FFF048018713F8A36C010313F03A00FC007E005D90387E01F8013F5BEB1F83EC
+87E090380FCFC0903807EF80EB03FF6D90C7FC5C6D5A147C14FE130180903803EF809038
+07CFC0EB0FC7EC83E090381F01F0013F7FEB7E00017C137C49137E0001803A7FFF01FFFC
+1483B514FE6C15FC140127247EA32C>I<3A7FFF01FFFCB5008113FE148314816C010113
+FC3A03E0000F806C7E151F6D140012005D6D133E137C017E137E013E137CA2013F13FC6D
+5BA2EB0F815DA2EB07C1ECC3E0A2EB03E3ECE7C0130114F75DEB00FFA292C7FC80A2143E
+A2147E147CA214FC5CA2EA0C01003F5BEA7F83EB87E0EA7E0F495A387FFF806C90C8FC6C
+5A6C5AEA07E027367EA32C>I<003FB612E04815F0A4007EC7EA1FE0ED3FC0ED7F80EDFF
+004A5A003C495AC7485A4A5A4A5A4A5A4A5A4AC7FCEB01FC495AEB0FF0495A495A495A49
+C8FC4848EB01E04848EB03F0485A485A485A485A485AB7FCA46C15E024247DA32C>I
+E
+%EndDVIPSBitmapFont
+%DVIPSBitmapFont: Fd ecbx1000 10 57
+/Fd 57 122 df<913A03FF8007FE027F9039F07FFF800103B500FDB512E0010F903A00FF
+FE0FF0D93FF8ECF81F90267FE0019038F03FF849485A4816E014804816C00200ED1FF081
+F007C06F91C7FCA8B912E0A4000390C701C0C7FCB3ABB5D8FC3FEBFF80A43D3A7EB938>
+27 D<12E07E127C7E7E7F6C7E6C7E12037F6C7E7F12007F137E137FA2EB3F80A214C013
+1F14E0A2130F14F0A4EB07F8A514FCB114F8A5EB0FF0A414E0131FA214C0133F1480A2EB
+7F00A2137E13FE5B12015B485A5B1207485A485A90C7FC123E5A12F05A16537BBD25>41
+D<B61280A819087F9620>45 D<EA0F80EA3FE0EA7FF0A2EAFFF8A5EA7FF0A2EA3FE0EA0F
+800D0D798C1B>I<141E143E14FE1307137FB5FCA3138FEA000FB3B3A5007FB61280A421
+3679B530>49 D<EB0FFE90387FFFC048B512F0000714FC390FE03FFF261F800F1380263F
+000313C0D87F8014E0EBE00100FF6D13F07FA2ED7FF8A46C5A6C5A0006C7FCC8FCEDFFF0
+A216E05C16C04A138016004A5A4A5AEC1FF05D4A5A4AC7FC14FE495AD903F01378495A49
+5A495A49C712F8017C14F05B49130148B6FC5A5A5A5A5A4815E0B7FCA425367BB530>I<
+EB03FF011F13F0017F13FC3901FC07FF2603F003138048486C13C0496C13E0EA0FF86D14
+F0487EA66C4814E06C5A6C485AC714C04A138016004A5A4A5AEC3FF090380FFFC05D15F0
+90380007FE913801FF806E13C016E0ED7FF016F8ED3FFCA216FEEA1FC0487E487E487EA4
+16FCA249137F007F15F801C0EBFFF06C5A6C6C4813E0260FFC0713806CB61200000114FC
+6C6C13F0010790C7FC27377CB530>I<ED07C0150FA2151F153F157F15FF5CA25C5C5C5C
+143E143C5C5C1301495A5C495A495A5B133E5B13785B485A1203485A5B48C7FC121E5A12
+7C5AB81280A4C70001EBC000AA0103B61280A429367DB530>I<001C15C0D81F80130701
+F8137F90B61280A216005D5D15F05D15804AC7FC14F090C9FCA7EB03FE90381FFFE0017F
+13F89038FE07FC9038F003FFD9C0011380496C13C090C7FC000E15E0C8127F16F0A216F8
+A3121FEA3FC0487E12FF7FA316F05B15FFD87F8014E0007EC713C0003E5B003F4913806C
+6C481300390FF01FFE6CB512F8000114E06C6C1380D90FF8C7FC25377BB530>I<EC0FF8
+ECFFFE0103EBFF8090390FF80FC090393FE003E090397F8001F09038FF000F48EC1FF848
+48133F485A120F5B121FA2003FEC1FF0ED0FE0484890C7FCA31408EC7FF039FFF1FFFC01
+F313FFD9F78013809039FF007FC049EB3FE04914F0ED1FF85B16FCA34914FEA4127FA512
+3F16FCA26C7E16F8000F143F6D14F0000715E06C6CEB7FC03A01FF81FF806C90B5120001
+3F13FC010F13F00101138027377CB530>I<123C123EEA3FE090B71280A41700485D5E5E
+5E5EA2007CC7EA0FC000784A5A4BC7FC00F8147E485C5D14014A5AC7485A4A5AA24A5A14
+3F4AC8FCA214FEA213015C1303A21307A2130F5CA2131FA5133FA96D5A6D5A6D5A29397B
+B730>I<49B47E010F13F0013F13FC9038FE01FF3A01F8007F804848EB3FC04848EB1FE0
+150F484814F01507121FA27F7F7F6D130F01FF14E014C09138E01FC06CEBF83F9138FE7F
+806C9038FFFE005D6C14F06C14FC6C14FF6D14806D14C090B612E0D803FD14F02607F07F
+13F848487E261FC00F13FC383F8003007F010013FE90C7127F151F00FE140715031501A2
+1500A216FC7E6C14016D14F86C6C13036DEB07F06C6CEB0FE0D80FFEEB7FC00003B61200
+C614FC013F13F00103138027377CB530>I<EB03FF011F13E0017F13F83901FF01FE4848
+6C7E4848EB7F80484814C0001FEC3FE0485AED1FF0127F16F8A212FF16FCA416FEA5007F
+143FA3123F157F6C7E000F14FF6C6C5A3903FE03DF6CB5129F6C6C131FD91FFC13FCEB00
+201400A3D80FE0EB3FF8487E486C14F0A216E0157F16C0EDFF80495A6C48481300903880
+07FE390FE01FF86CB55A6C14C0C691C7FCEB1FF027377CB530>I<ED03E04B7EA24B7EA3
+4B7EA24B7EA34B7EA292B57EA34A8015F302038015E1A202078015C0020F80ED807FA202
+1F80ED003F4A80023E131FA2027E80027C7F02FC814A7FA20101824A7F49B77EA3498202
+C0C7FC010F824A147FA2011F8291C8123F4982013E151FA2017E82017C8101FE83B500F8
+0107B61280A4413A7DB948>65 D<B812C017FC17FF18C028007FF000037F04007F717E71
+7E171F84A2717EA74D5AA260173F4D5A4D5A4C13C0040F5B91B600FCC7FCA2EFFF8002F0
+C713F0EF3FF8717E717E717E19807113C0A319E0A719C0A25F4D138019005FEF7FFE4C48
+5AB912F018C095C7FC17F03B397DB844>I<DB3FFCEB01C00203B5EAC003021FECF00791
+B6EAFC0F01039039FC00FF3F4901C0EB1FFFD91FFEC77E49481403D97FF080494880485B
+48177F4849153F4890C9FC181F485A180F123F5B1807127FA24993C7FC12FFAD127F7FF0
+03C0123FA27F001F1707A26C6C1780180F6C6D16006C6D5D6C173E6C6D157ED97FF85D6D
+6C4A5A6DB44A5A010701C0EB0FE06D01FCEBFF80010090B548C7FC021F14F8020314E091
+26003FFEC8FC3A3B7BB945>I<B87E17F817FF18C028007FF8000713F09338007FF8EF1F
+FE717E050313807113C0A27113E0F07FF0A2F03FF8A219FC181FA219FEA419FFAC19FEA4
+19FC183FA219F8187F19F0F0FFE0A24D13C04D13804D1300EF1FFEEF7FFC933807FFF0B9
+12C095C7FC17FC178040397DB849>I<B912F0A426007FF8C7FCEF1FF8170717031701A2
+1700A21878A3043C137C183CA41800167CA216FC150391B5FCA4ECF8031500167CA2163C
+180FA3181EA293C7FCA2183EA2183C187CA218FCA2EF01F81703170F173FEE01FFB9FC18
+F0A338397DB83F>I<B912C0A43A007FF800039338007FE0171F170F1707A21703A21701
+A318F0EE7800A41800A216F8A21501150791B5FCA4ECF80715011500A21678A693C8FCAD
+B7FCA434397DB83C>I<B6D8FC03B612F0A426007FF8C70001EBE000B3A391B8FCA402F8
+C71201B3A6B6D8FC03B612F0A444397DB84B>72 D<B612FCA439007FF800B3B3ADB612FC
+A41E397DB824>I<B7FCA426007FF8C9FCB3ACEF0780A5170F1800A35FA25FA25F5F5E5E
+EE0FFE167FB8FCA431397DB839>76 D<B500F80403B512F06E5EA26E5ED8007FF1E000A2
+D97BFF161EA201796D5DA201786D5DA26E6C5DA36E6C4A5AA26E6C4A5AA26E6C4A5AA26E
+6C4A5AA26E6C141EA36E6D5BA26E6D5BA26F6C5BA26F6C485AA36F6C485AA26F6C485AA2
+6F6C48C7FCA2923803FF1EA36F13BCA26F13F8A2705AA2705AA213FCB500FC6D4848B612
+F0A2EE0F80EE070054397DB85B>I<B500FC0203B512F0A28080C66C6D90390003F0006F
+6E5A81017B7F13798101787F6E7E6E7E6E7F6E7FA26E7F6E7F6E7F6E7F6F7E153F826F13
+806F13C06F13E06F13F06F13F88117FCEE7FFEEE3FFF7013817013C17013E18218F17013
+F97013FDEF7FFF8383A28383838383187FA2183F181F01FC160FB500FC150718031801A2
+44397DB84B>I<EDFFF8020FEBFF80027F14F0903A01FFC01FFC010790380007FFD91FFC
+010113C0D93FF06D6C7E49486E7E49486E7E48496E7E48834890C86C7EA248486F1380A2
+48486F13C0A2003F18E0A348486F13F0A400FF18F8AC007F18F06D5DA3003F18E0A26D5D
+001F18C0A26C6C4B13806C18006E5C6C6D4A5A6C5F6C6D4A5A6D6C4A5AD93FFC49485A6D
+B401075B0107D9C01F90C7FC010190B512FC6D6C14F0020F1480020001F8C8FC3D3B7BB9
+48>I<B8FC17F017FEEFFF8028007FF8000F13C0040113E07013F0EF7FF8EF3FFCA2EF1F
+FEA218FFA818FEA2EF3FFCA2EF7FF8EFFFF04C13E0040F13C091B7120017FC17E002F8C9
+FCB3A4B612FCA438397DB841>I<B712FCEEFFE017FC17FF28007FF8000F13C004017F70
+7F717E717EA2717EA284A760A24D5A604D5A4D5A04035B041F90C8FC91B612FC17E08391
+39F8003FFCEE0FFF707F707F8284A2707FA584A51A601AF084177F1901DD3FFE13E0B600
+FC011F130394390FFF87C071EBFF8005011400CBEA1FFC443A7DB848>82
+D<D907FF130E013FEBE01E90B5EAF83E0003ECFE7E3A07FC01FFFE390FF0001F4848130F
+48481303491301007F140090C8FC167E5A163EA27F161E7F7F6D91C7FC13FC387FFFE014
+FEECFFF06C14FE6F7E6C816C15F06C816C81C681133F010F801301D9000F1480EC007F03
+0F13C01503818100F0157FA3163FA27E17807E167F6C16007E6D14FE01E0495A01F81303
+9039FF801FF800FC90B512E0D8F83F5CD8F00749C7FC39E0007FF02A3B7BB935>I<003F
+B91280A4D9F800EBF003D87FC09238007FC049161F007EC7150FA2007C1707A200781703
+A400F818E0481701A4C892C7FCB3AE010FB7FCA43B387DB742>I<B600FC011FB512C0A4
+26007FF8C8381FC000725AB3B3181F013F94C7FC8060011F163E6D6C157E187C6D6C15FC
+6D6D495A6D6DEB07F06D01F0EB1FE0DA7FFEEBFFC0021FB6C8FC02075C020014F0030F13
+80423A7DB849>I<B600F00103B512E0A4C601F0C83807F0006E5E017F5F6E150FA2013F
+5F6E151F011F94C7FC6E5D6D163E6F147E6D167CA26F14FC6D5E6F13016D5E6F13036D5E
+811707027F5D6F130F023F5D6F131F021F92C8FC815F6E143EEE807E6E147CEEC0FC6E5C
+16E016E16E5C16F36E5C16FF6F5BA36F5BA26F90C9FCA26F5AA36F5AA26F5AA26F5A433A
+7EB848>I<B6D8E01FB500FC90383FFFFCA4000101F0C7D83FFCC8EA7E006C71153C171F
+6E197C017F701578836E7014F8013F6F5E6E1801011F4B6D5CA26E18036D4B6D5CA26D6D
+496D495A173C6F170F6D037C6D91C7FCEF787F6F5F6D4B6C6C131E816D02016E5BEFE01F
+03F8177C027F01036E13784D7E03FCEE80F8023F49486C5C15FE021F010FEDC1E04D7E03
+FF16C36E49EDE3C0041E7F049E15F76E01BC6D5C04FC15FF6E95C8FC4C80A26E5F4C143F
+6E5F4C141FA2037F5E4C140FA26F486E5AA2031F5E93C812036F5E5E3A7EB863>I<007F
+B5D8F803B512F8A4C66C48C7D80FF0C7FC6D6C5D6D5E6F495A6D6D49C8FC7F6D6D137E6F
+5B6DEBF8016D5D6F485A6E6C485A023F130FDA1FFF5BEE9F806E01FFC9FC805E6E5B6E5B
+80826F7E153F826F7F5D4B7F92B57EA2DA01F97FDA03F17F03F07F913807E07FDA0FC07F
+021F6D7E4B7E4A486C7F027E8102FE6D7F4A7F49488149486D7F0107804A6E7E49488149
+486E7E013F81017F83B60107B61280A441397DB848>I<EB3FFE0003B512E0000F14F839
+1FF00FFE003FEB03FF6D6C7F6E7FA26F7EA26C5A6C5AEA0380C8FCA2EC3FFF010FB5FC13
+7F3901FFF87F00071380380FFE00EA3FF85B485A12FF5BA415FF6D5A127F263FF00713F8
+3B1FFC1FBFFFC0390FFFFE1F0003EBF80F39003FE0032A257DA42E>97
+D<13FFB5FCA412077EAF4AB47E020F13F0023F13FC9138FE03FFDAF00013804AEB7FC002
+80EB3FE091C713F0EE1FF8A217FC160FA217FEAA17FCA3EE1FF8A217F06E133F6EEB7FE0
+6E14C0903AFDF001FF80903AF8FC07FE009039F03FFFF8D9E00F13E0D9C00390C7FC2F3A
+7EB935>I<903801FFC0010F13FC017F13FFD9FF8013802603FE0013C048485AEA0FF812
+1F13F0123F6E13804848EB7F00151C92C7FC12FFA9127FA27F123FED01E06C7E15036C6C
+EB07C06C6C14806C6C131FC69038C07E006DB45A010F13F00101138023257DA42A>I<EE
+7F80ED7FFFA4150381AF903801FF81010F13F1013F13FD9038FFC07F0003EB001FD807FC
+1307000F8048487F5B123FA2485AA312FFAA127FA27F123FA26C6C5B000F5C6C6C5B6C6C
+4913C02701FF80FD13FE39007FFFF9011F13E1010113012F3A7DB935>I<903803FF8001
+1F13F0017F13FC3901FF83FE3A03FE007F804848133F484814C0001FEC1FE05B003FEC0F
+F0A2485A16F8150712FFA290B6FCA301E0C8FCA4127FA36C7E1678121F6C6C14F86D14F0
+00071403D801FFEB0FE06C9038C07FC06DB51200010F13FC010113E025257DA42C>I<EC
+1FF0903801FFFC010713FF90391FF87F8090383FE0FFD9FFC113C0A2481381A24813016E
+1380A2ED3E0092C7FCA8B6FCA4000390C8FCB3ABB512FEA4223A7DB91D>I<161FD907FE
+EBFFC090387FFFE348B6EAEFE02607FE07138F260FF801131F48486C138F003F15CF4990
+387FC7C0EEC000007F81A6003F5DA26D13FF001F5D6C6C4890C7FC3907FE07FE48B512F8
+6D13E0261E07FEC8FC90CAFCA2123E123F7F6C7E90B512F8EDFF8016E06C15F86C816C81
+5A001F81393FC0000F48C8138048157F5A163FA36C157F6C16006D5C6C6C495AD81FF0EB
+07FCD807FEEB3FF00001B612C06C6C91C7FC010713F02B377DA530>I<13FFB5FCA41207
+7EAFED7FC0913803FFF8020F13FE91381F03FFDA3C01138014784A7E4A14C05CA25CA291
+C7FCB3A3B5D8FC3F13FFA4303A7DB935>I<EA01F0EA07FC487EA2487EA56C5AA26C5AEA
+01F0C8FCA913FF127FA412077EB3A9B512F8A4153B7DBA1B>I<141FEC7FC0ECFFE0A249
+13F0A56D13E0A2EC7FC0EC1F0091C7FCA9EC0FF0EB0FFFA4EB007F143FB3B0121FEA3F80
+EA7FC0EAFFE0EC7FE0A215C014FF6C481380903883FE006CB45A000F13F0000113801C4B
+86BA1D>I<13FFB5FCA412077EAF92380FFFE0A4923803FC0016F0ED0FE0ED1F804BC7FC
+157E5DEC03F8EC07E04A5A141FEC7FE04A7E8181A2ECCFFEEC0FFF496C7F806E7F6E7F82
+157F6F7E6F7E82150F82B5D8F83F13F8A42D3A7EB932>I<13FFB5FCA412077EB3B3ACB5
+12FCA4163A7DB91B>I<01FED97FE0EB0FFC00FF902601FFFC90383FFF80020701FF90B5
+12E0DA1F81903983F03FF0DA3C00903887801F000749DACF007F00034914DE6D48D97FFC
+6D7E4A5CA24A5CA291C75BB3A3B5D8FC1FB50083B512F0A44C257DA451>I<01FEEB7FC0
+00FF903803FFF8020F13FE91381F03FFDA3C011380000713780003497E6D4814C05CA25C
+A291C7FCB3A3B5D8FC3F13FFA430257DA435>I<903801FFC0010F13F8017F13FFD9FF80
+7F3A03FE003FE048486D7E48486D7E48486D7EA2003F81491303007F81A300FF1680A900
+7F1600A3003F5D6D1307001F5DA26C6C495A6C6C495A6C6C495A6C6C6CB45A6C6CB5C7FC
+011F13FC010113C029257DA430>I<9039FF01FF80B5000F13F0023F13FC9138FE07FFDA
+F00113800003496C13C00280EB7FE091C713F0EE3FF8A2EE1FFCA3EE0FFEAA17FC161FA2
+17F8163F17F06E137F6E14E06EEBFFC0DAF00313809139FC07FE0091383FFFF8020F13E0
+020390C7FC91C9FCACB512FCA42F357EA435>I<9038FE03F000FFEB0FFEEC3FFF91387C
+7F809138F8FFC000075B6C6C5A5CA29138807F80ED3F00150C92C7FC91C8FCB3A2B512FE
+A422257EA427>114 D<90383FF0383903FFFEF8000F13FF381FC00F383F0003007E1301
+007C130012FC15787E7E6D130013FCEBFFE06C13FCECFF806C14C06C14F06C14F81203C6
+14FC131F9038007FFE140700F0130114007E157E7E157C6C14FC6C14F8EB80019038F007
+F090B512C000F8140038E01FF81F257DA426>I<130FA55BA45BA25B5BA25A1207001FEB
+FFE0B6FCA3000390C7FCB21578A815F86CEB80F014816CEBC3E090383FFFC06D13809038
+03FE001D357EB425>I<01FFEC3FC0B5EB3FFFA4000714016C80B3A35DA25DA26C5C6E48
+13E06CD9C03E13FF90387FFFFC011F13F00103138030257DA435>I<B539F001FFF8A400
+0390C7EA1F00161E6E133E6C153C6E137C6C15786E13F8017F5CECF001013F5C14F8011F
+495AA2ECFC07010F5CECFE0F010791C7FC6E5A6D131E15BE6D13BC15FC6D5BA36E5AA26E
+5AA26E5AA26E5AA22D257EA432>I<B500F1B538803FFFA43D07FE000FF80003E06C6C01
+0715C082028015076C6E6C148015076C01C0ED0F00826E485C017FED801E5D90273FF01E
+7F5B17C0DAF83E147C011F90393C3FE078037C14F8903B0FFC781FF0F0A29139FEF00FF1
+0107EDF9E002FF14FB6D496CB45AA24B7E6D5EA26D496C90C7FCA292C7FC6E5CA2023E14
+7C023C143C40257EA445>I<B539F01FFFF0A4000390398003F8006C01C013E06C1407D9
+7FE05B6D6C485A6E48C7FC90381FFC3E010F5B903807FEFC6D6C5A5D6D5B6D5B6E7E6E7E
+814A7EA24A7E903801F3FFD903E37FD907C17FEB0FC049486C7E4A6C7E013E80496D7E49
+130F00016E7EB590383FFFF8A42D257EA432>I<B539F001FFF8A4000390C7EA1F00161E
+6E133E6C153C6E137C6C15786E13F8017F5CECF001013F5C14F8011F495AA2ECFC07010F
+5CECFE0F010791C7FC6E5A6D131E15BE6D13BC15FC6D5BA36E5AA26E5AA26E5AA26E5AA2
+92C8FCA25C141E003F133E387F803C38FFC07C147814F8EBC1F0EBC3E06C485A387D1F80
+D83FFFC9FCEA1FFCEA07F02D357EA432>I E
%EndDVIPSBitmapFont
%DVIPSBitmapFont: Fe ecbx1440 14.4 41
/Fe 41 122 df<DC7FFEECFFC0031FB5D8801F13F092B6D8E07F13FC020703F9B57E021F
@@ -734,58 +759,8 @@ A26F5AA26F5AA35E151F93C9FC5D153E157ED81FC0137C487E486C13FC486C5B14015D4A
5A14074A5A6C48485A4948CAFC495A383F81FC6CB45A6C5B000313C0C648CBFC3E4D7DB4
45>121 D E
%EndDVIPSBitmapFont
-%DVIPSBitmapFont: Ff ecss2074 20.74 10
-/Ff 10 116 df<EAFFC0B3B3B3B3B3B390B912FCA83E7570F456>76
-D<D8FFC0F03FF0B3B3B3B3AD6C6CF07FE0A46C6CF0FFC0A36D5F001F1A80A26C6C4D1300
-A26C6C4D5A6D170F6C616E161F6C6D4C5A6C6D4C5A6E16FF6D6C4B5B6D6C4B5B6D6C4B5B
-6D6C6C021F90C7FC6D01E0EC7FFE6D01F849485A6D9026FF801F5B6D91B65A6E5E021F16
-8002074BC8FC020115F86E6C14E0030F91C9FC030013F04C7770F46D>85
-D<91380FFF8049B512F0010F14FC017F14FF48B712C0000782001F824882DAE0007F49C7
-EA3FFE01F8140FD81FC06E7E90C86C1380121E00186F13C0001081CAFCEF7FE0A318F017
-3FAD93B5FC157F0207B6FC143F49B7FC1307011F153F017FEBF80090B512804801F8C7FC
-4813C04890C8FCEA0FFC485A485A5B485A5BA248C9FCA5177FA26D15FFA26C6C5C6D5C6D
-140F6C6C5C01FF91B5FC6CEBE00791B612BF6CEDFE3F16FC6C15F06C15C06CECFE006C6C
-13F0D91FFCC9FC344C77CA4C>97 D<EAFFC0B3B3ADED0FFC92B57E020714E0021F80027F
-14FC91B67E01C38101C7829026CFFE0080D9DFF0131FD9FFC001037F4A6D7F49C86C7E49
-153F496F7E170F496F7E5B717E4981A2711380A2187FA219C0183FA419E0181FAD183F19
-C0A3187FA2198018FFA24D1300A25F6D5E17076D4B5A6D151F4D5A6D4B5A6D15FF6D0203
-5B6E495BD9DFE0013F5B9026CFFC01B5C7FC01C7B65A01C35D01C15D01C05D023F14C002
-0F5C020301FCC8FCC8EA3FE03B7C72FA52>I<ED3FFF4AB512F8020F14FF023F15C04A15
-F049B712FC4916FF49178049EBE0004990C7120FD93FFC02011300D97FF06E7E4948151F
-0280814890C912034894C7FC5B485A5B120F5B121F5B123F5BA3485AA548CCFCAD6C7EA4
-7F123FA27F121F7FA26C7EA26C6C17806D1601000317036C6C160F6E151F6C01E0ED7FC0
-6D6CEC01FFD93FFC14076DB4143F6DD9E003B512806D90B6EAFE006D5E6D16F06D6C5D6E
-1580020F02FCC7FC020114E09126003FFCC8FC3A4C78CA47>I<DB1FE04AB4FC912601FF
-FE143F02079026FF8003B5FC4AECC01F023F02F0B6FC4A02FB158091BAFC49EBE01F49D9
-000302FCC7FC49486D01F8C8FC02F89038007F8049486E7E49486E7E4A140F013F824A14
-07A249C86C7EA401FE6F7EAA017F4B5AA46D6C4A5AA26E140F011F5E6E141F6D6C4A5A6D
-6C4A5A02FEEB01FF496C4990C9FC499038E01FFE92B55A495D02BF5C020F14C0496C5CD9
-7E0149CAFC9138001FE001FE90CCFCA67FA27F8080EB3FF091B612FE6DEDFFF818FF6D17
-C019F0013F17FC498390BA7E48854801E0C71203480180DA001F7F4848C900037F484816
-0049EF3FF84848171F49717E127F4917078648481703A76D1707007F616D170F003F616D
-171FD81FFCEF7FF06C6C4D5A6D5E6C01C003075B6C01F8033F5BC601FF4AB448C7FC6D01
-F0011F5B6D90B75A010F17E00103178001004CC8FC021F15F002031580DA000F01E0C9FC
-496D7CC950>103 D<EAFFE0ABC7FCB3A9EA7FE0B3B3B3B30B6F74EE25>105
-D<EAFFC0B3B3B3B3B3B3AF0A7B73FA25>108 D<ED1FF826FFC001B57E020714E0021F14
-F8027F8091B67E01C18101C316809038C7FE00D9CFF0011F13C0D9DFE0010713E0D9FF80
-130191C8FC18F049157F5B173F4916F8A249151FA35BA45BB3B3AC354A72C952>110
-D<91380FFFC091B512FE0107ECFFC0011F15F8017F15FE90B812804817C05A489038F000
-3F4890C70003138049EC007FD81FF8151F491507003F16014992C7FCA2485AA77FA26C7E
-7F7F6CB4FC6C13C014F86CEBFF806C14FC6CECFFE06C15FC6D14FF6D15C0010F81010315
-F8010081020F80DA007F7F03071480DB003F13C0160F040313E01600EF7FF0173FA2EF1F
-F8A2170FA7EF1FF0A20070163F127C007FEE7FE001C015FF01F0020313C0B5020F138002
-F0137F91B712006C5E001F5E000716F0C65E011F1580010302FCC7FCD9000F13C0354C7C
-CA3D>115 D E
-%EndDVIPSBitmapFont
-%DVIPSBitmapFont: Fg ecrm0700 7 2
-/Fg 2 66 df<13381378EA01F8121F12FE12E01200B3AB487EB512F8A215267BA521>49
-D<140EA2141FA34A7EA3EC6FC0A2ECEFE014C7A290380183F0A390380301F8A201067F14
-00A249137EA2011C137F01187FA24980013FB5FCA2903960000FC0A201E080491307A248
-486D7EA200038115011207D81FC0497ED8FFF890383FFFE0A22B2A7EA931>65
-D E
-%EndDVIPSBitmapFont
-%DVIPSBitmapFont: Fh ecrm1000 10 80
-/Fh 80 123 df<B81280A2290280962A>21 D<DA0FF813FC91397FFF07FF903B01F807DF
+%DVIPSBitmapFont: Ff ecrm1000 10 80
+/Ff 80 123 df<B81280A2290280962A>21 D<DA0FF813FC91397FFF07FF903B01F807DF
83C0903A07E001FF0F903B1F8007FE1FE090393F000FFC137E16F85B9338F00780484801
0790C7FC1503ACB812F8A32801F80003F0C7FCB3AB486C497E267FFFE0B512F0A3333B7F
BA30>27 D<EC0FF8EC7FFE903901F80780903907E001C090391F8000E090383F0007017E
@@ -796,163 +771,157 @@ C0A32A3B7FBA2E>I<DA0FF0EB1FF0DA7FFEEBFFFC903B01F80F83F00F903C07E001CFC0
0380903C1F8000FF0001C090273F0007FE130F017E4948497EA2495CA248485C03076E5A
03030203C7FC95C8FCA9F007E0BAFCA33C01F80003F0001F1807B3AA486C496C497E267F
FFE0B500C1B51280A3413B7FBA45>I<007C137C00FE13FEEAFF01A3EAFE00A7007E13FC
-007C137CA8003C137800381338A700181330171E77BA2A>34 D<141FEC7FC0903801F0E0
-903803C0600107137090380F803090381F00381518A25BA2133E133F15381530A215705D
-5D140190381F838092CAFC1487148E02DC49B51280EB0FF85C4A9039003FF8000107ED0F
-C06E5D71C7FC6E140E010F150CD91DFC141C01391518D970FE143801E015302601C07F14
-70D803805D00076D6C5BD80F00EBC00148011F5C4890380FE003003E6E48C8FC007E9038
-07F8060203130E00FE6E5A6E6C5A1400ED7F706C4B13036F5A6F7E6C6C6D6C5B7013066C
-6C496C130E6DD979FE5B281FF001F07F133C3C07F80FE03FC0F86CB539800FFFF0C69026
-FE000313C0D91FF0D9007FC7FC393E7DBB41>38 D<121C127FEAFF80A213C0A3127F121C
-1200A412011380A2120313005A1206120E5A5A5A12600A1979B917>I<146014E0EB01C0
-EB0380EB0700130E131E5B5BA25B485AA2485AA212075B120F90C7FCA25A121EA2123EA3
-5AA65AB2127CA67EA3121EA2121F7EA27F12077F1203A26C7EA26C7E1378A27F7F130E7F
-EB0380EB01C0EB00E01460135278BD20>I<12C07E12707E7E7E120F6C7E6C7EA26C7E6C
-7EA21378A2137C133C133E131EA2131F7FA21480A3EB07C0A6EB03E0B2EB07C0A6EB0F80
-A31400A25B131EA2133E133C137C1378A25BA2485A485AA2485A48C7FC120E5A5A5A5A5A
-13527CBD20>I<EB0380497EA7397803803C00FC147E00FE14FE397F8383FC393FC387F8
-390FE38FE03903FBBF803900FFFE00EB3FF8EB0FE0A2EB3FF8EBFFFE3903FBBF80390FE3
-8FE0393FC387F8397F8383FC39FE0380FE00FC147E0078143C390007C000A76D5A1F247B
-BD2A>I<121C127FEAFF80A213C0A3127F121C1200A412011380A2120313005A1206120E
-5A5A5A12600A19798817>44 D<B512FCA516057F941C>I<121C127FEAFF80A5EA7F0012
-1C0909798817>I<1506A2150E150CA2151C151815381530A215701560A215E015C0A214
-011580A2140315005C1406A2140E140CA2141C1418A214381430A21470146014E05CA213
-015CA2130391C7FCA25B1306A2130E130C131C1318A213381330A213701360A213E05BA2
-12015B120390C8FCA25A1206A2120E120CA2121C1218A21238123012701260A212E05AA2
-1F537BBD2A>I<EB03F8EB1FFF90387E0FC09038F803E03901E000F0484813780007147C
-48487FA248C77EA2481580A3007EEC0FC0A500FE15E0B3007E15C0A4007F141F6C1580A3
-6C1500A26C6C133EA26C6C5B6C6C5BEBF0013900F803E090387E0FC0D91FFFC7FCEB03F8
-23397DB62A>I<EB01C013031307131F13FFB5FCA2131F1200B3B3A7497E007FB512F0A3
-1C3779B62A>I<EB0FF0EB7FFE48B57E3903E03FE0390F000FF0001E6D7E001C6D7E486D
-7E5A6E7E126012FE6CEC7F807FA56CC7FC121CC8FCEDFF00A25D14015D14035D4A5A4A5A
-5D4A5A4AC7FC147E5C495A14E0495A495A49C8FC011EEB01805B5B49130348481400485A
-485A90C75A48B6FC5A5A485CB6FCA321377CB62A>I<EB07F8EB3FFF90B512C03901F80F
-F03903C007F848486C7E390E0001FEEA0F80391FE000FF7FA56C5A6C5AC7485AA25D1403
-5D4A5A5DEC0F80027FC7FCEB1FFCECFF809038000FE06E7EEC01FC816E7EED7F80A216C0
-A2153F16E0A2121EEA7F80A2487EA316C0157F491480007EC7FC0070ECFF006C495A121E
-390F8003F83907F00FF00001B512C06C6C90C7FCEB0FF823397DB62A>I<1538A2157815
-F8A2140114031407A2140F141F141B14331473146314C313011483EB030313071306130C
-131C131813301370136013C01201EA038013005A120E120C5A123812305A12E0B712F8A3
-C73803F800AA4A7E0103B512F8A325387EB72A>I<0006140CD80780133C9038F003F890
-B5FC5D5D158092C7FC14FC38067FE090C9FCAAEB07F8EB1FFE9038780F809038E007E039
-07C003F0496C7E130000066D7E81C8FC8181A21680A4121C127F5A7FA390C713005D12FC
-00605C12704A5A6C5C6C1303001E495A6C6C485A3907E03F800001B5C7FC38007FFCEB1F
-E021397CB62A>I<EC3FC0903801FFF0010713FC90380FE03E90383F800790387E001F49
-EB3F804848137F485A12075B000FEC3F0049131E001F91C7FC5B123FA3127F90C9FCEB01
-FC903807FF8039FF1E07E090383801F0496C7E01607F01E0137E497F16805BED1FC0A390
-C713E0A57EA47F123F16C0A2001FEC3F807F000F15006D5B000714FE6C6C5B6C6C485A39
-00FE07F090387FFFC0011F90C7FCEB03FC23397DB62A>I<12301238123E003FB612E0A3
-16C05A168016000070C712060060140E5D5D00E014304814705D5DC712014A5A4AC7FC14
-06140E5CA25C1478147014F05C1301A213035C1307A2130FA3131F5CA2133FA5137FA96D
-C8FC131E233A7BB72A>I<EB03F8EB1FFF017F13C09038FC07F03901E001F83903C0007C
-4848133C90C7123E48141E000E141F001E80A3121FA26D5B6D131E7FD80FF85B6D137C01
-FF13786C6D5A6CEBE3E0ECF780C601FFC7FC6D5A6D6C7E010F13E0013F7F01F97F3901E0
-7FFE48486C7E380F800F48486C1380001E010113C0487F007C143F0078EC1FE0150F00F8
-1407481403A21501A36C15C0A200781403007C15806C14076CEC0F006C6C131ED807E013
-7C3903F803F0C6B55A013F1380D907FCC7FC23397DB62A>I<EB03F8EB1FFF017F13C039
-01FC07E048486C7E3907E001F8000F6D7E4848137E5B003F80A248C71380A25AED1FC0A5
-16E0A56C143FA36C7E157F121F6C6C13FF6C6C13DF000313013901F0039F3900FC0F1FD9
-3FFC13C0EB07F090C7FCA2153F1680A216005D120F486C137E486C5BA24A5A4A5A49485A
-381F000F001CEB1F80260F807FC7FC3807FFFE000113F838003FC023397DB62A>I<121C
-127FEAFF80A5EA7F00121CC7FCB2121C127FEAFF80A5EA7F00121C092479A317>I<121C
-127FEAFF80A5EA7F00121CC7FCB2121C127FEAFF80A213C0A3127F121C1200A412011380
-A2120313005A1206120E5A5A5A12600A3479A317>I<EC03FF021F13E09138FC00FCD901
-E0131ED90780EB0780011EC7EA01E00138EC00704981498148488148488190C97E48D901
-FC1480000ED907FFEB01C0000C90391F03C000001C90267E00E013E00018490170136026
-3801F86D13700030496D13300103EC0FE0267007E00107133800601718495AA200E0171C
-484848150CAA6C6C7E1260A26D6C151C00701718263003F0130F0101141F00386D013F13
-38261800FC01771330001C017E9038E3F070000C90261F03C113E0000E903A07FF00FFC0
-6CD901FCEB3F006C90CAFC7F6C7E6C7E13706D167C011EED03FCD90780EC1FF0D901E0EC
-FF80D900FC90383FFC00021FB51280020301E0C7FC363C7BBA41>64
-D<1538A3157CA315FEA34A7EA34A6C7EA202077FEC063FA2020E7FEC0C1FA2021C7FEC18
-0FA202387FEC3007A202707FEC6003A202C07F1501A2D901807F81A249C77F167FA20106
-810107B6FCA24981010CC7121FA2496E7EA3496E7EA3496E7EA213E0707E1201486C81D8
-0FFC02071380B56C90B512FEA3373C7DBB3E>I<B712E016FC16FF0001903980007FC06C
-90C7EA1FE0707E707E707EA2707EA283A75F16035F4C5A4C5A4C5A4C5AEEFF8091B500FC
-C7FCA291C7EA7F80EE1FE0EE07F0707E707E83707EA21880177F18C0A7188017FFA24C13
-005F16034C5AEE1FF8486DEB7FF0B812C094C7FC16F832397DB83B>I<913A01FF800180
-020FEBE003027F13F8903A01FF807E07903A03FC000F0FD90FF0EB039F4948EB01DFD93F
-80EB00FF49C8127F01FE153F12014848151F4848150FA248481507A2485A1703123F5B00
-7F1601A35B00FF93C7FCAD127F6DED0180A3123F7F001F160318006C7E5F6C7E17066C6C
-150E6C6C5D00001618017F15386D6C5CD91FE05C6D6CEB03C0D903FCEB0F80902701FF80
-3FC7FC9039007FFFFC020F13F002011380313D7BBA3C>I<B712C016F816FE0001903980
-01FF806C90C7EA3FE0EE0FF0EE03F8707E707E177FA2EF3F8018C0171F18E0170F18F0A3
-EF07F8A418FCAC18F8A4EF0FF0A218E0A2171F18C0EF3F80A2EF7F0017FE4C5A4C5AEE0F
-F0EE3FE0486DEBFF80B8C7FC16F816C036397DB83F>I<B812FEA3000190388000076C90
-C8FC173F838383A383A31880170116C0A394C7FCA31501A21503150F91B5FCA3EC000F15
-031501A21500A21860A318E093C712C0A41701A3EF0380A21707A2170F173F177F486D90
-3807FF00B9FCA333397EB838>I<B812F8A30001903880001F6C90C71201EE00FC177C17
-3C171CA2170CA4170E1706A2ED0180A21700A41503A21507151F91B5FCA3EC001F150715
-03A21501A692C8FCAD4813C0B612C0A32F397DB836>I<DBFF8013C0020FEBF001023F13
-FC9139FF803F03903A03FC000787D90FF0EB03CF4948EB00EF4948147F4948143F49C812
-1F485A4848150F48481507A248481503A2485A1701123F5B007F1600A448481600AB93B6
-FCA26C7E9338007FE0EF3FC0A2123F7F121FA26C7EA26C7EA26C7E6C7E6C6C157F6D7E6D
-6C14FF6D6C14EFD90FF8EB03C7D903FEEB0783903A00FFC03F0191393FFFFC00020F01F0
-130002001380383D7CBA41>I<B648B512FEA30001902680000313006C90C76C5AB3A491
-B6FCA391C71201B3A6486D497EB648B512FEA337397DB83E>I<B612C0A3C6EBC0006D5A
-B3B3AD497EB612C0A31A397EB81E>I<B649B5FCA3000101809038007FF06C90C8EA3F80
-053EC7FC173C17385F5F4C5A4C5A4CC8FC160E5E5E5E5E4B5AED0780030EC9FC5D153E15
-7E15FF5C4A7F4A6C7E140E4A6C7E4A6C7E14704A6C7E4A6C7E14804A6C7E6F7EA26F7F70
-7EA2707E707EA2707EA2707E707EA2707E707F8484486D497FB6011FEBFF80A339397DB8
-41>75 D<B612E0A3000101C0C8FC6C90C9FCB3AD1718A517381730A31770A317F0A21601
-1603160FEE1FE0486D13FFB8FCA32D397DB834>I<B5933807FFF86E5DA20001F0FC0026
-00DFC0ED1BF8A2D9CFE01533A3D9C7F01563A3D9C3F815C3A2D9C1FCEC0183A3D9C0FEEC
-0303A2027F1406A36E6C130CA36E6C1318A26E6C1330A36E6C1360A26E6C13C0A3913901
-FC0180A3913900FE0300A2ED7F06A3ED3F8CA2ED1FD8A3ED0FF0A3486C6D5A487ED80FFC
-6D48497EB500C00203B512F8A2ED018045397DB84C>I<B5913807FFFE8080C69238007F
-E06EEC1F80D9DFF0EC0F001706EBCFF8EBC7FCA2EBC3FEEBC1FFA201C07F6E7EA26E7E6E
-7E81140F6E7E8114036E7E168080ED7FC016E0153FED1FF0ED0FF8A2ED07FCED03FEA2ED
-01FF6F1386A2EE7FC6EE3FE6A2EE1FF6EE0FFEA216071603A216011600A2177E486C153E
-487ED80FFC151EB500C0140EA2170637397DB83E>I<EC03FF021F13E09138FE01FC9039
-01F8007ED907E0EB1F8049486D7ED93F80EB07F049C76C7E01FE6E7E48486E7E49157E00
-03167F4848ED3F80A24848ED1FC0A2001F17E049150F003F17F0A3007F17F8491507A300
-FF17FCAC007F17F86D150FA3003F17F0A26C6CED1FE0A36C6CED3FC0000717806D157F00
-0317006C6C15FEA26C6C4A5A017F4A5A6D6C495A6D6C495AD907E0EB1F80D903F8017FC7
-FC903900FE01FC91381FFFE0020390C8FC363D7BBA41>I<B712C016FC16FF0001D98000
-13C06C90C7EA1FE0707EEE03F883707EA2707EA21880A71800A24C5AA24C5A5FEE0FF04C
-5AEEFF8091B548C7FC16F091CAFCB3A5487FB6FCA331397EB838>I<EC03FF021F13E091
-38FE01FC903901F8007ED907E0EB1F8049486D7ED93F80EB07F049C76C7E01FE6E7E4848
-6E7EA24848157F0007178049153F000F17C049151F001F17E0A24848ED0FF0A3007F17F8
-A2491507A200FF17FCAC007F17F8A26D150FA2003F17F0A26C6CED1FE0A36C6CED3FC000
-07027C14804AB4FC3C03F80383807F003B01FC0701C0FEEC0E002600FE0CEBE1FC017FEC
-63F8D93F8CEB77F0D91FCCEB3FE0D907EE14806DB449C7FC0100D981FC130CEC1FFF0203
-131C91C7001E131C161F183CEF807CEFC0F8EE0FFFA318F08218E07013C0701380933800
-7E00364B7BBA41>I<B612FEEDFFE016F8000190388007FE6C90C76C7EEE3FC0707E707E
-707EA2707EA283A65FA24C5AA24C5A4C5AEE3F8004FFC8FCED07FC91B512E05E9138000F
-F0ED03F8ED00FE82707E707EA2161F83A583A6F00180A217F8160F1803486D01071400B6
-6D6C5A04011306933800FE0ECAEA3FFCEF07F0393B7DB83D>I<D90FF813C090383FFE01
-90B512813903F807E33907E000F74848137F4848133F48C7121F003E140F007E1407A200
-7C140312FC1501A36C1400A37E6D14006C7E7F13F86CB47E6C13F8ECFF806C14E06C14F8
-6C14FEC680013F1480010714C0EB007F020713E0EC007FED3FF0151F150FED07F8A200C0
-1403A21501A37EA216F07E15036C15E06C14076C15C06C140F6DEB1F80D8FBF0EB3F00D8
-F0FE13FE39E03FFFF8010F13E0D8C00190C7FC253D7CBA2E>I<003FB812E0A3D9C003EB
-001F273E0001FE130348EE01F00078160000701770A300601730A400E01738481718A4C7
-1600B3B0913807FF80011FB612E0A335397DB83C>I<B6903807FFFEA300010180903800
-7FE06C90C8EA1F80EF0F001706B3B2170E6D150C80171C133F17186D6C14385F6D6C14F0
-6D6C5C6D6C495A6D6CEB07806D6C49C7FC91387F807E91381FFFF8020713E09138007F80
-373B7DB83E>I<B500FC91387FFF80A30003018091380FFC006C90C8EA07E0715A6C705A
-6E1403017F93C7FCA280013F1506A26E140E011F150C80010F5DA28001075DA26E147001
-031560A26D6C5CA2806D4A5AA2ED8003027F91C8FCA291383FC006A215E0021F5BA2EDF0
-1C020F1318A26E6C5AA215FC02035BA2EDFEE002015BA26E6C5AA36FC9FCA3153EA2151C
-A3393B7EB83E>I<B5D8FC07B5D8F001B5FCA30007902780001FFEC7EA1FF86C48C7D80F
-F8EC07E000010307ED03C01B807F6C6F6C1500A26E5F017F6E6C1406A280013F4A6C5CA2
-80011F4A6D5BEE067FA26D6C010E6D5BEE0C3FA26D6C011C6D5BEE181FA26D6C6F5BEE30
-0FA26D6C6F485AEE6007A26D6C4CC7FC9338C003FCA203805D913B7F818001FE06A203C1
-150EDA3FC3C7EAFF0CA203E3151CDA1FE6EC7F98A215F6DA0FFCEC3FF0A302075E4B141F
-A202035E4B140FA202015E4B1407A2020093C8FC4B80503B7EB855>I<007FB590383FFF
-FCA3C601F801071380D97FE0D903FCC7FC013FEC01F06D6C5C5F6D6C5C6D6C13034CC8FC
-6D6C1306160E6D6C5B6DEB8018163891387FC0306E6C5A16E06E6C5A91380FF18015FB6E
-B4C9FC5D14036E7EA26E7F6F7EA24B7E15DF9138019FF09138038FF8150F91380607FC91
-380E03FE140C4A6C7EEC38000230804A6D7E14E04A6D7E49486D7E130391C76C7E01066E
-7E130E010C6E7E011C1401013C8101FE822607FF80010713E0B500E0013FEBFF80A33939
-7EB83E>I<B500FE91383FFFE0A3000301E0913807FE00C649EC03F0017F6F5A606D6C5D
-6D6C140395C7FC6D6C1406A26D6C5C6D6C141C17186D6C143817306D6D5B6E6C13E05F91
-383FE0015F91381FF003DA0FF890C8FC1606913807FC0E160C913803FE1C913801FF185E
-6E13B016E0157F6F5AB3A24B7E023FB512C0A33B397FB83E>I<003FB7FCA39039FC0001
-FE01C0130349495A003EC7FC003C4A5A5E0038141F00784A5A12704B5A5E006014FF4A90
-C7FCA24A5A5DC712074A5AA24A5A5D143F4A5AA24A5A92C8FC5B495AA2495A5C130F4948
-EB0180A2495A5C137F495A16034890C7FC5B1203485AEE0700485A495C001F5D48485C5E
-4848495A49130FB8FCA329397BB833>I<007FB81280B912C0A26C17803204797041>95
+007C137CA8003C137800381338A700181330171E77BA2A>34 D<121C127FEAFF80A213C0
+A3127F121C1200A412011380A2120313005A1206120E5A5A5A12600A1979B917>39
+D<146014E0EB01C0EB0380EB0700130E131E5B5BA25B485AA2485AA212075B120F90C7FC
+A25A121EA2123EA35AA65AB2127CA67EA3121EA2121F7EA27F12077F1203A26C7EA26C7E
+1378A27F7F130E7FEB0380EB01C0EB00E01460135278BD20>I<12C07E12707E7E7E120F
+6C7E6C7EA26C7E6C7EA21378A2137C133C133E131EA2131F7FA21480A3EB07C0A6EB03E0
+B2EB07C0A6EB0F80A31400A25B131EA2133E133C137C1378A25BA2485A485AA2485A48C7
+FC120E5A5A5A5A5A13527CBD20>I<EB0380497EA7397803803C00FC147E00FE14FE397F
+8383FC393FC387F8390FE38FE03903FBBF803900FFFE00EB3FF8EB0FE0A2EB3FF8EBFFFE
+3903FBBF80390FE38FE0393FC387F8397F8383FC39FE0380FE00FC147E0078143C390007
+C000A76D5A1F247BBD2A>I<121C127FEAFF80A213C0A3127F121C1200A412011380A212
+0313005A1206120E5A5A5A12600A19798817>44 D<B512FCA516057F941C>I<121C127F
+EAFF80A5EA7F00121C0909798817>I<1506A2150E150CA2151C151815381530A2157015
+60A215E015C0A214011580A2140315005C1406A2140E140CA2141C1418A214381430A214
+70146014E05CA213015CA2130391C7FCA25B1306A2130E130C131C1318A213381330A213
+701360A213E05BA212015B120390C8FCA25A1206A2120E120CA2121C1218A21238123012
+701260A212E05AA21F537BBD2A>I<EB03F8EB1FFF90387E0FC09038F803E03901E000F0
+484813780007147C48487FA248C77EA2481580A3007EEC0FC0A500FE15E0B3007E15C0A4
+007F141F6C1580A36C1500A26C6C133EA26C6C5B6C6C5BEBF0013900F803E090387E0FC0
+D91FFFC7FCEB03F823397DB62A>I<EB01C013031307131F13FFB5FCA2131F1200B3B3A7
+497E007FB512F0A31C3779B62A>I<EB0FF0EB7FFE48B57E3903E03FE0390F000FF0001E
+6D7E001C6D7E486D7E5A6E7E126012FE6CEC7F807FA56CC7FC121CC8FCEDFF00A25D1401
+5D14035D4A5A4A5A5D4A5A4AC7FC147E5C495A14E0495A495A49C8FC011EEB01805B5B49
+130348481400485A485A90C75A48B6FC5A5A485CB6FCA321377CB62A>I<EB07F8EB3FFF
+90B512C03901F80FF03903C007F848486C7E390E0001FEEA0F80391FE000FF7FA56C5A6C
+5AC7485AA25D14035D4A5A5DEC0F80027FC7FCEB1FFCECFF809038000FE06E7EEC01FC81
+6E7EED7F80A216C0A2153F16E0A2121EEA7F80A2487EA316C0157F491480007EC7FC0070
+ECFF006C495A121E390F8003F83907F00FF00001B512C06C6C90C7FCEB0FF823397DB62A
+>I<1538A2157815F8A2140114031407A2140F141F141B14331473146314C313011483EB
+030313071306130C131C131813301370136013C01201EA038013005A120E120C5A123812
+305A12E0B712F8A3C73803F800AA4A7E0103B512F8A325387EB72A>I<0006140CD80780
+133C9038F003F890B5FC5D5D158092C7FC14FC38067FE090C9FCAAEB07F8EB1FFE903878
+0F809038E007E03907C003F0496C7E130000066D7E81C8FC8181A21680A4121C127F5A7F
+A390C713005D12FC00605C12704A5A6C5C6C1303001E495A6C6C485A3907E03F800001B5
+C7FC38007FFCEB1FE021397CB62A>I<EC3FC0903801FFF0010713FC90380FE03E90383F
+800790387E001F49EB3F804848137F485A12075B000FEC3F0049131E001F91C7FC5B123F
+A3127F90C9FCEB01FC903807FF8039FF1E07E090383801F0496C7E01607F01E0137E497F
+16805BED1FC0A390C713E0A57EA47F123F16C0A2001FEC3F807F000F15006D5B000714FE
+6C6C5B6C6C485A3900FE07F090387FFFC0011F90C7FCEB03FC23397DB62A>I<12301238
+123E003FB612E0A316C05A168016000070C712060060140E5D5D00E014304814705D5DC7
+12014A5A4AC7FC1406140E5CA25C1478147014F05C1301A213035C1307A2130FA3131F5C
+A2133FA5137FA96DC8FC131E233A7BB72A>I<EB03F8EB1FFF017F13C09038FC07F03901
+E001F83903C0007C4848133C90C7123E48141E000E141F001E80A3121FA26D5B6D131E7F
+D80FF85B6D137C01FF13786C6D5A6CEBE3E0ECF780C601FFC7FC6D5A6D6C7E010F13E001
+3F7F01F97F3901E07FFE48486C7E380F800F48486C1380001E010113C0487F007C143F00
+78EC1FE0150F00F81407481403A21501A36C15C0A200781403007C15806C14076CEC0F00
+6C6C131ED807E0137C3903F803F0C6B55A013F1380D907FCC7FC23397DB62A>I<EB03F8
+EB1FFF017F13C03901FC07E048486C7E3907E001F8000F6D7E4848137E5B003F80A248C7
+1380A25AED1FC0A516E0A56C143FA36C7E157F121F6C6C13FF6C6C13DF000313013901F0
+039F3900FC0F1FD93FFC13C0EB07F090C7FCA2153F1680A216005D120F486C137E486C5B
+A24A5A4A5A49485A381F000F001CEB1F80260F807FC7FC3807FFFE000113F838003FC023
+397DB62A>I<121C127FEAFF80A5EA7F00121CC7FCB2121C127FEAFF80A5EA7F00121C09
+2479A317>I<121C127FEAFF80A5EA7F00121CC7FCB2121C127FEAFF80A213C0A3127F12
+1C1200A412011380A2120313005A1206120E5A5A5A12600A3479A317>I<007FB812F8B9
+12FCCCFCB0B912FC6C17F836147B9E41>61 D<EC03FF021F13E09138FC00FCD901E0131E
+D90780EB0780011EC7EA01E00138EC00704981498148488148488190C97E48D901FC1480
+000ED907FFEB01C0000C90391F03C000001C90267E00E013E000184901701360263801F8
+6D13700030496D13300103EC0FE0267007E00107133800601718495AA200E0171C484848
+150CAA6C6C7E1260A26D6C151C00701718263003F0130F0101141F00386D013F13382618
+00FC01771330001C017E9038E3F070000C90261F03C113E0000E903A07FF00FFC06CD901
+FCEB3F006C90CAFC7F6C7E6C7E13706D167C011EED03FCD90780EC1FF0D901E0ECFF80D9
+00FC90383FFC00021FB51280020301E0C7FC363C7BBA41>64 D<1538A3157CA315FEA34A
+7EA34A6C7EA202077FEC063FA2020E7FEC0C1FA2021C7FEC180FA202387FEC3007A20270
+7FEC6003A202C07F1501A2D901807F81A249C77F167FA20106810107B6FCA24981010CC7
+121FA2496E7EA3496E7EA3496E7EA213E0707E1201486C81D80FFC02071380B56C90B512
+FEA3373C7DBB3E>I<B712E016FC16FF0001903980007FC06C90C7EA1FE0707E707E707E
+A2707EA283A75F16035F4C5A4C5A4C5A4C5AEEFF8091B500FCC7FCA291C7EA7F80EE1FE0
+EE07F0707E707E83707EA21880177F18C0A7188017FFA24C13005F16034C5AEE1FF8486D
+EB7FF0B812C094C7FC16F832397DB83B>I<913A01FF800180020FEBE003027F13F8903A
+01FF807E07903A03FC000F0FD90FF0EB039F4948EB01DFD93F80EB00FF49C8127F01FE15
+3F12014848151F4848150FA248481507A2485A1703123F5B007F1601A35B00FF93C7FCAD
+127F6DED0180A3123F7F001F160318006C7E5F6C7E17066C6C150E6C6C5D00001618017F
+15386D6C5CD91FE05C6D6CEB03C0D903FCEB0F80902701FF803FC7FC9039007FFFFC020F
+13F002011380313D7BBA3C>I<B712C016F816FE000190398001FF806C90C7EA3FE0EE0F
+F0EE03F8707E707E177FA2EF3F8018C0171F18E0170F18F0A3EF07F8A418FCAC18F8A4EF
+0FF0A218E0A2171F18C0EF3F80A2EF7F0017FE4C5A4C5AEE0FF0EE3FE0486DEBFF80B8C7
+FC16F816C036397DB83F>I<B812FEA3000190388000076C90C8FC173F838383A383A318
+80170116C0A394C7FCA31501A21503150F91B5FCA3EC000F15031501A21500A21860A318
+E093C712C0A41701A3EF0380A21707A2170F173F177F486D903807FF00B9FCA333397EB8
+38>I<B812F8A30001903880001F6C90C71201EE00FC177C173C171CA2170CA4170E1706
+A2ED0180A21700A41503A21507151F91B5FCA3EC001F15071503A21501A692C8FCAD4813
+C0B612C0A32F397DB836>I<DBFF8013C0020FEBF001023F13FC9139FF803F03903A03FC
+000787D90FF0EB03CF4948EB00EF4948147F4948143F49C8121F485A4848150F48481507
+A248481503A2485A1701123F5B007F1600A448481600AB93B6FCA26C7E9338007FE0EF3F
+C0A2123F7F121FA26C7EA26C7EA26C7E6C7E6C6C157F6D7E6D6C14FF6D6C14EFD90FF8EB
+03C7D903FEEB0783903A00FFC03F0191393FFFFC00020F01F0130002001380383D7CBA41
+>I<B648B512FEA30001902680000313006C90C76C5AB3A491B6FCA391C71201B3A6486D
+497EB648B512FEA337397DB83E>I<B612C0A3C6EBC0006D5AB3B3AD497EB612C0A31A39
+7EB81E>I<B649B5FCA3000101809038007FF06C90C8EA3F80053EC7FC173C17385F5F4C
+5A4C5A4CC8FC160E5E5E5E5E4B5AED0780030EC9FC5D153E157E15FF5C4A7F4A6C7E140E
+4A6C7E4A6C7E14704A6C7E4A6C7E14804A6C7E6F7EA26F7F707EA2707E707EA2707EA270
+7E707EA2707E707F8484486D497FB6011FEBFF80A339397DB841>75
+D<B612E0A3000101C0C8FC6C90C9FCB3AD1718A517381730A31770A317F0A21601160316
+0FEE1FE0486D13FFB8FCA32D397DB834>I<B5933807FFF86E5DA20001F0FC002600DFC0
+ED1BF8A2D9CFE01533A3D9C7F01563A3D9C3F815C3A2D9C1FCEC0183A3D9C0FEEC0303A2
+027F1406A36E6C130CA36E6C1318A26E6C1330A36E6C1360A26E6C13C0A3913901FC0180
+A3913900FE0300A2ED7F06A3ED3F8CA2ED1FD8A3ED0FF0A3486C6D5A487ED80FFC6D4849
+7EB500C00203B512F8A2ED018045397DB84C>I<B5913807FFFE8080C69238007FE06EEC
+1F80D9DFF0EC0F001706EBCFF8EBC7FCA2EBC3FEEBC1FFA201C07F6E7EA26E7E6E7E8114
+0F6E7E8114036E7E168080ED7FC016E0153FED1FF0ED0FF8A2ED07FCED03FEA2ED01FF6F
+1386A2EE7FC6EE3FE6A2EE1FF6EE0FFEA216071603A216011600A2177E486C153E487ED8
+0FFC151EB500C0140EA2170637397DB83E>I<EC03FF021F13E09138FE01FC903901F800
+7ED907E0EB1F8049486D7ED93F80EB07F049C76C7E01FE6E7E48486E7E49157E0003167F
+4848ED3F80A24848ED1FC0A2001F17E049150F003F17F0A3007F17F8491507A300FF17FC
+AC007F17F86D150FA3003F17F0A26C6CED1FE0A36C6CED3FC0000717806D157F00031700
+6C6C15FEA26C6C4A5A017F4A5A6D6C495A6D6C495AD907E0EB1F80D903F8017FC7FC9039
+00FE01FC91381FFFE0020390C8FC363D7BBA41>I<B712C016FC16FF0001D9800013C06C
+90C7EA1FE0707EEE03F883707EA2707EA21880A71800A24C5AA24C5A5FEE0FF04C5AEEFF
+8091B548C7FC16F091CAFCB3A5487FB6FCA331397EB838>I<EC03FF021F13E09138FE01
+FC903901F8007ED907E0EB1F8049486D7ED93F80EB07F049C76C7E01FE6E7E48486E7EA2
+4848157F0007178049153F000F17C049151F001F17E0A24848ED0FF0A3007F17F8A24915
+07A200FF17FCAC007F17F8A26D150FA2003F17F0A26C6CED1FE0A36C6CED3FC00007027C
+14804AB4FC3C03F80383807F003B01FC0701C0FEEC0E002600FE0CEBE1FC017FEC63F8D9
+3F8CEB77F0D91FCCEB3FE0D907EE14806DB449C7FC0100D981FC130CEC1FFF0203131C91
+C7001E131C161F183CEF807CEFC0F8EE0FFFA318F08218E07013C07013809338007E0036
+4B7BBA41>I<B612FEEDFFE016F8000190388007FE6C90C76C7EEE3FC0707E707E707EA2
+707EA283A65FA24C5AA24C5A4C5AEE3F8004FFC8FCED07FC91B512E05E9138000FF0ED03
+F8ED00FE82707E707EA2161F83A583A6F00180A217F8160F1803486D01071400B66D6C5A
+04011306933800FE0ECAEA3FFCEF07F0393B7DB83D>I<D90FF813C090383FFE0190B512
+813903F807E33907E000F74848137F4848133F48C7121F003E140F007E1407A2007C1403
+12FC1501A36C1400A37E6D14006C7E7F13F86CB47E6C13F8ECFF806C14E06C14F86C14FE
+C680013F1480010714C0EB007F020713E0EC007FED3FF0151F150FED07F8A200C01403A2
+1501A37EA216F07E15036C15E06C14076C15C06C140F6DEB1F80D8FBF0EB3F00D8F0FE13
+FE39E03FFFF8010F13E0D8C00190C7FC253D7CBA2E>I<003FB812E0A3D9C003EB001F27
+3E0001FE130348EE01F00078160000701770A300601730A400E01738481718A4C71600B3
+B0913807FF80011FB612E0A335397DB83C>I<B6903807FFFEA3000101809038007FE06C
+90C8EA1F80EF0F001706B3B2170E6D150C80171C133F17186D6C14385F6D6C14F06D6C5C
+6D6C495A6D6CEB07806D6C49C7FC91387F807E91381FFFF8020713E09138007F80373B7D
+B83E>I<B500FC91387FFF80A30003018091380FFC006C90C8EA07E0715A6C705A6E1403
+017F93C7FCA280013F1506A26E140E011F150C80010F5DA28001075DA26E147001031560
+A26D6C5CA2806D4A5AA2ED8003027F91C8FCA291383FC006A215E0021F5BA2EDF01C020F
+1318A26E6C5AA215FC02035BA2EDFEE002015BA26E6C5AA36FC9FCA3153EA2151CA3393B
+7EB83E>I<B5D8FC07B5D8F001B5FCA30007902780001FFEC7EA1FF86C48C7D80FF8EC07
+E000010307ED03C01B807F6C6F6C1500A26E5F017F6E6C1406A280013F4A6C5CA280011F
+4A6D5BEE067FA26D6C010E6D5BEE0C3FA26D6C011C6D5BEE181FA26D6C6F5BEE300FA26D
+6C6F485AEE6007A26D6C4CC7FC9338C003FCA203805D913B7F818001FE06A203C1150EDA
+3FC3C7EAFF0CA203E3151CDA1FE6EC7F98A215F6DA0FFCEC3FF0A302075E4B141FA20203
+5E4B140FA202015E4B1407A2020093C8FC4B80503B7EB855>I<007FB590383FFFFCA3C6
+01F801071380D97FE0D903FCC7FC013FEC01F06D6C5C5F6D6C5C6D6C13034CC8FC6D6C13
+06160E6D6C5B6DEB8018163891387FC0306E6C5A16E06E6C5A91380FF18015FB6EB4C9FC
+5D14036E7EA26E7F6F7EA24B7E15DF9138019FF09138038FF8150F91380607FC91380E03
+FE140C4A6C7EEC38000230804A6D7E14E04A6D7E49486D7E130391C76C7E01066E7E130E
+010C6E7E011C1401013C8101FE822607FF80010713E0B500E0013FEBFF80A339397EB83E
+>I<B500FE91383FFFE0A3000301E0913807FE00C649EC03F0017F6F5A606D6C5D6D6C14
+0395C7FC6D6C1406A26D6C5C6D6C141C17186D6C143817306D6D5B6E6C13E05F91383FE0
+015F91381FF003DA0FF890C8FC1606913807FC0E160C913803FE1C913801FF185E6E13B0
+16E0157F6F5AB3A24B7E023FB512C0A33B397FB83E>I<003FB7FCA39039FC0001FE01C0
+130349495A003EC7FC003C4A5A5E0038141F00784A5A12704B5A5E006014FF4A90C7FCA2
+4A5A5DC712074A5AA24A5A5D143F4A5AA24A5A92C8FC5B495AA2495A5C130F4948EB0180
+A2495A5C137F495A16034890C7FC5B1203485AEE0700485A495C001F5D48485C5E484849
+5A49130FB8FCA329397BB833>I<007FB81280B912C0A26C17803204797041>95
D<EB1FE0EBFFFC3803E03F3907000F80390F8007E0486C6C7E13E06E7EA26E7E6C5A6C5A
C8FCA4147FEB07FFEB3FE0EBFE00EA03F8EA0FF0EA1FC0123F485A90C7FC160C12FEA314
01A26C13036CEB077C903980063E18383FC01E3A0FE0781FF03A03FFF00FE03A007F8007
@@ -1023,6 +992,49 @@ ECC070010F1360A26D6C5AA214F101035BA2D901FBC7FCA214FF6D5AA2147CA31438A214
A2485A485A0007140E5B4848130C4848131CA24848133C48C7127C48EB03FC90B5FCA21F
247EA325>I E
%EndDVIPSBitmapFont
+%DVIPSBitmapFont: Fg ecss2074 20.74 10
+/Fg 10 116 df<EAFFC0B3B3B3B3B3B390B912FCA83E7570F456>76
+D<D8FFC0F03FF0B3B3B3B3AD6C6CF07FE0A46C6CF0FFC0A36D5F001F1A80A26C6C4D1300
+A26C6C4D5A6D170F6C616E161F6C6D4C5A6C6D4C5A6E16FF6D6C4B5B6D6C4B5B6D6C4B5B
+6D6C6C021F90C7FC6D01E0EC7FFE6D01F849485A6D9026FF801F5B6D91B65A6E5E021F16
+8002074BC8FC020115F86E6C14E0030F91C9FC030013F04C7770F46D>85
+D<91380FFF8049B512F0010F14FC017F14FF48B712C0000782001F824882DAE0007F49C7
+EA3FFE01F8140FD81FC06E7E90C86C1380121E00186F13C0001081CAFCEF7FE0A318F017
+3FAD93B5FC157F0207B6FC143F49B7FC1307011F153F017FEBF80090B512804801F8C7FC
+4813C04890C8FCEA0FFC485A485A5B485A5BA248C9FCA5177FA26D15FFA26C6C5C6D5C6D
+140F6C6C5C01FF91B5FC6CEBE00791B612BF6CEDFE3F16FC6C15F06C15C06CECFE006C6C
+13F0D91FFCC9FC344C77CA4C>97 D<EAFFC0B3B3ADED0FFC92B57E020714E0021F80027F
+14FC91B67E01C38101C7829026CFFE0080D9DFF0131FD9FFC001037F4A6D7F49C86C7E49
+153F496F7E170F496F7E5B717E4981A2711380A2187FA219C0183FA419E0181FAD183F19
+C0A3187FA2198018FFA24D1300A25F6D5E17076D4B5A6D151F4D5A6D4B5A6D15FF6D0203
+5B6E495BD9DFE0013F5B9026CFFC01B5C7FC01C7B65A01C35D01C15D01C05D023F14C002
+0F5C020301FCC8FCC8EA3FE03B7C72FA52>I<ED3FFF4AB512F8020F14FF023F15C04A15
+F049B712FC4916FF49178049EBE0004990C7120FD93FFC02011300D97FF06E7E4948151F
+0280814890C912034894C7FC5B485A5B120F5B121F5B123F5BA3485AA548CCFCAD6C7EA4
+7F123FA27F121F7FA26C7EA26C6C17806D1601000317036C6C160F6E151F6C01E0ED7FC0
+6D6CEC01FFD93FFC14076DB4143F6DD9E003B512806D90B6EAFE006D5E6D16F06D6C5D6E
+1580020F02FCC7FC020114E09126003FFCC8FC3A4C78CA47>I<DB1FE04AB4FC912601FF
+FE143F02079026FF8003B5FC4AECC01F023F02F0B6FC4A02FB158091BAFC49EBE01F49D9
+000302FCC7FC49486D01F8C8FC02F89038007F8049486E7E49486E7E4A140F013F824A14
+07A249C86C7EA401FE6F7EAA017F4B5AA46D6C4A5AA26E140F011F5E6E141F6D6C4A5A6D
+6C4A5A02FEEB01FF496C4990C9FC499038E01FFE92B55A495D02BF5C020F14C0496C5CD9
+7E0149CAFC9138001FE001FE90CCFCA67FA27F8080EB3FF091B612FE6DEDFFF818FF6D17
+C019F0013F17FC498390BA7E48854801E0C71203480180DA001F7F4848C900037F484816
+0049EF3FF84848171F49717E127F4917078648481703A76D1707007F616D170F003F616D
+171FD81FFCEF7FF06C6C4D5A6D5E6C01C003075B6C01F8033F5BC601FF4AB448C7FC6D01
+F0011F5B6D90B75A010F17E00103178001004CC8FC021F15F002031580DA000F01E0C9FC
+496D7CC950>103 D<EAFFE0ABC7FCB3A9EA7FE0B3B3B3B30B6F74EE25>105
+D<EAFFC0B3B3B3B3B3B3AF0A7B73FA25>108 D<ED1FF826FFC001B57E020714E0021F14
+F8027F8091B67E01C18101C316809038C7FE00D9CFF0011F13C0D9DFE0010713E0D9FF80
+130191C8FC18F049157F5B173F4916F8A249151FA35BA45BB3B3AC354A72C952>110
+D<91380FFFC091B512FE0107ECFFC0011F15F8017F15FE90B812804817C05A489038F000
+3F4890C70003138049EC007FD81FF8151F491507003F16014992C7FCA2485AA77FA26C7E
+7F7F6CB4FC6C13C014F86CEBFF806C14FC6CECFFE06C15FC6D14FF6D15C0010F81010315
+F8010081020F80DA007F7F03071480DB003F13C0160F040313E01600EF7FF0173FA2EF1F
+F8A2170FA7EF1FF0A20070163F127C007FEE7FE001C015FF01F0020313C0B5020F138002
+F0137F91B712006C5E001F5E000716F0C65E011F1580010302FCC7FCD9000F13C0354C7C
+CA3D>115 D E
+%EndDVIPSBitmapFont
end
%%EndProlog
%%BeginSetup
@@ -1034,534 +1046,1033 @@ letter
%%EndSetup
%%Page: 1 1
-1 0 bop 0 162 a Fh(11)17 b(11)h(T)249 180 y(E)295 162
-y(X)h(L)398 145 y Fg(A)435 162 y Fh(T)481 180 y(E)527
-162 y(X)0 353 y Ff(Using)54 b(Libical)p 0 467 3900 24
-v 0 580 a Fh(Eric)28 b(Busb)r(o)r(om)f(\(eric@soft)n(w)n
-(arestudio.org\))2054 b(Ma)n(y)26 b(2000)0 1217 y Fe(1)131
-b(In)l(tro)t(duction)0 1456 y Fh(Libical)23 b(is)f(an)h(Op)r(en)g
-(Source)f(implemen)n(tation)h(of)g(the)g(iCalendar)f(proto)r(cols)f
-(and)i(proto)r(col)e(data)i(units.)35 b(The)23 b(iCalendar)0
-1570 y(sp)r(eci\034cation)k(describ)r(es)g(ho)n(w)f(calendar)g(clien)n
-(ts)i(can)f(comm)n(unicate)f(with)i(calendar)e(serv)n(ers)f(for)i
-(users)g(can)g(store)f(their)0 1683 y(calendar)g(data)h(and)h(arrange)d
-(meetings)i(with)h(other)f(users.)0 1840 y(Libical)g(implemen)n(ts)h
+1 0 bop 0 201 a Fg(Using)54 b(Libical)p 0 315 3900 24
+v 0 428 a Ff(Eric)28 b(Busb)r(o)r(om)f(\(eric@soft)n(w)n
+(arestudio.org\))1876 b(No)n(v)n(em)n(b)r(er)26 b(2000)0
+1072 y Fe(Con)l(ten)l(ts)0 1312 y Fd(1)77 b(In)m(tro)s(duction)3201
+b(2)125 1468 y Ff(1.1)83 b(The)28 b(libical)f(pro)5 b(ject)67
+b(.)41 b(.)h(.)g(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)g(.)f(.)h(.)f(.)h(.)
+f(.)h(.)g(.)f(.)h(.)f(.)h(.)f(.)h(.)g(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h
+(.)g(.)f(.)h(.)f(.)h(.)f(.)h(.)134 b(3)125 1625 y(1.2)83
+b(License)22 b(.)41 b(.)h(.)g(.)f(.)h(.)f(.)h(.)f(.)h(.)g(.)f(.)h(.)f
+(.)h(.)f(.)h(.)f(.)h(.)g(.)f(.)h(.)f(.)h(.)f(.)h(.)g(.)f(.)h(.)f(.)h(.)
+f(.)h(.)g(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)g(.)f(.)h(.)f(.)h(.)f(.)h
+(.)134 b(3)125 1781 y(1.3)83 b(Example)28 b(Co)r(de)78
+b(.)41 b(.)h(.)f(.)h(.)g(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)g(.)f(.)h(.)
+f(.)h(.)f(.)h(.)g(.)f(.)h(.)f(.)h(.)f(.)h(.)g(.)f(.)h(.)f(.)h(.)f(.)h
+(.)f(.)h(.)g(.)f(.)h(.)f(.)h(.)f(.)h(.)134 b(3)0 2021
+y Fd(2)77 b(Building)30 b(the)h(Library)2865 b(3)0 2260
+y(3)77 b(Structure)3330 b(4)125 2417 y Ff(3.1)83 b(Core)27
+b(iCal)g(classes)62 b(.)42 b(.)f(.)h(.)g(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)
+h(.)g(.)f(.)h(.)f(.)h(.)f(.)h(.)g(.)f(.)h(.)f(.)h(.)f(.)h(.)g(.)f(.)h
+(.)f(.)h(.)f(.)h(.)f(.)h(.)g(.)f(.)h(.)f(.)h(.)f(.)h(.)134
+b(5)315 2573 y(3.1.1)94 b(Comp)r(onen)n(ts)84 b(.)42
+b(.)g(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)g(.)f(.)h(.)f(.)h(.)f(.)h(.)g
+(.)f(.)h(.)f(.)h(.)f(.)h(.)g(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)g(.)f(.)
+h(.)f(.)h(.)f(.)h(.)134 b(5)315 2730 y(3.1.2)94 b(Prop)r(erties)99
+b(.)41 b(.)h(.)g(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)g(.)f(.)h(.)f(.)h(.)
+f(.)h(.)g(.)f(.)h(.)f(.)h(.)f(.)h(.)g(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h
+(.)g(.)f(.)h(.)f(.)h(.)f(.)h(.)134 b(5)315 2886 y(3.1.3)94
+b(V)-7 b(alues)108 b(.)41 b(.)h(.)f(.)h(.)g(.)f(.)h(.)f(.)h(.)f(.)h(.)f
+(.)h(.)g(.)f(.)h(.)f(.)h(.)f(.)h(.)g(.)f(.)h(.)f(.)h(.)f(.)h(.)g(.)f(.)
+h(.)f(.)h(.)f(.)h(.)f(.)h(.)g(.)f(.)h(.)f(.)h(.)f(.)h(.)134
+b(5)315 3043 y(3.1.4)94 b(P)n(arameters)61 b(.)41 b(.)h(.)g(.)f(.)h(.)f
+(.)h(.)f(.)h(.)f(.)h(.)g(.)f(.)h(.)f(.)h(.)f(.)h(.)g(.)f(.)h(.)f(.)h(.)
+f(.)h(.)g(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)g(.)f(.)h(.)f(.)h(.)f(.)h
+(.)134 b(5)125 3199 y(3.2)83 b(Other)27 b(elemen)n(ts)h(of)f(libical)42
+b(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)g(.)f(.)h(.)f(.)h(.)f(.)h(.)g(.)f
+(.)h(.)f(.)h(.)f(.)h(.)g(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)g(.)f(.)h(.)
+f(.)h(.)f(.)h(.)134 b(5)315 3356 y(3.2.1)94 b(En)n(umerations)34
+b(.)42 b(.)g(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)g(.)f(.)h(.)f(.)h(.)f(.)
+h(.)g(.)f(.)h(.)f(.)h(.)f(.)h(.)g(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)g
+(.)f(.)h(.)f(.)h(.)f(.)h(.)134 b(5)315 3512 y(3.2.2)94
+b(T)n(yp)r(es)59 b(.)42 b(.)f(.)h(.)f(.)h(.)g(.)f(.)h(.)f(.)h(.)f(.)h
+(.)f(.)h(.)g(.)f(.)h(.)f(.)h(.)f(.)h(.)g(.)f(.)h(.)f(.)h(.)f(.)h(.)g(.)
+f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)g(.)f(.)h(.)f(.)h(.)f(.)h(.)134
+b(5)315 3669 y(3.2.3)94 b(The)28 b(parser)78 b(.)41 b(.)h(.)g(.)f(.)h
+(.)f(.)h(.)f(.)h(.)f(.)h(.)g(.)f(.)h(.)f(.)h(.)f(.)h(.)g(.)f(.)h(.)f(.)
+h(.)f(.)h(.)g(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)g(.)f(.)h(.)f(.)h(.)f
+(.)h(.)134 b(5)315 3825 y(3.2.4)94 b(Restrictions)41
+b(.)g(.)h(.)g(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)g(.)f(.)h(.)f(.)h(.)f
+(.)h(.)g(.)f(.)h(.)f(.)h(.)f(.)h(.)g(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)
+g(.)f(.)h(.)f(.)h(.)f(.)h(.)134 b(5)315 3981 y(3.2.5)94
+b(Error)26 b(ob)5 b(jects)57 b(.)42 b(.)g(.)f(.)h(.)f(.)h(.)f(.)h(.)f
+(.)h(.)g(.)f(.)h(.)f(.)h(.)f(.)h(.)g(.)f(.)h(.)f(.)h(.)f(.)h(.)g(.)f(.)
+h(.)f(.)h(.)f(.)h(.)f(.)h(.)g(.)f(.)h(.)f(.)h(.)f(.)h(.)134
+b(5)315 4138 y(3.2.6)94 b(Memory)27 b(Managemen)n(t)65
+b(.)42 b(.)f(.)h(.)f(.)h(.)g(.)f(.)h(.)f(.)h(.)f(.)h(.)g(.)f(.)h(.)f(.)
+h(.)f(.)h(.)g(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)g(.)f(.)h(.)f(.)h(.)f
+(.)h(.)134 b(5)315 4294 y(3.2.7)94 b(Storage)26 b(classes)64
+b(.)42 b(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)g(.)f(.)h(.)f(.)h(.)f(.)h(.)
+g(.)f(.)h(.)f(.)h(.)f(.)h(.)g(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)g(.)f
+(.)h(.)f(.)h(.)f(.)h(.)134 b(5)0 4534 y Fd(4)77 b(Di\033erences)30
+b(F)-8 b(rom)31 b(RF)m(Cs)2750 b(5)125 4690 y Ff(4.1)83
+b(Pseudo)28 b(Comp)r(onen)n(ts)62 b(.)42 b(.)g(.)f(.)h(.)f(.)h(.)f(.)h
+(.)f(.)h(.)g(.)f(.)h(.)f(.)h(.)f(.)h(.)g(.)f(.)h(.)f(.)h(.)f(.)h(.)g(.)
+f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)g(.)f(.)h(.)f(.)h(.)f(.)h(.)134
+b(5)125 4847 y(4.2)83 b(Com)n(bined)28 b(V)-7 b(alues)108
+b(.)41 b(.)h(.)g(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)g(.)f(.)h(.)f(.)h(.)
+f(.)h(.)g(.)f(.)h(.)f(.)h(.)f(.)h(.)g(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h
+(.)g(.)f(.)h(.)f(.)h(.)f(.)h(.)134 b(6)125 5003 y(4.3)83
+b(Multi-V)-7 b(alued)28 b(Prop)r(erties)54 b(.)41 b(.)h(.)f(.)h(.)f(.)h
+(.)f(.)h(.)g(.)f(.)h(.)f(.)h(.)f(.)h(.)g(.)f(.)h(.)f(.)h(.)f(.)h(.)g(.)
+f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)g(.)f(.)h(.)f(.)h(.)f(.)h(.)134
+b(6)0 5243 y Fd(5)77 b(Implemen)m(tation)28 b(Limitations)2557
+b(7)p eop
+%%Page: 2 2
+2 1 bop 0 -167 3900 5 v 0 -200 a Fd(1.)73 b(In)m(tro)s(duction)3184
+b Ff(2)0 162 y Fd(6)77 b(Using)31 b(libical)3208 b(7)125
+318 y Ff(6.1)83 b(Creating)27 b(Comp)r(onen)n(ts)73 b(.)42
+b(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)g(.)f(.)h(.)f(.)h(.)f(.)h(.)g(.)f
+(.)h(.)f(.)h(.)f(.)h(.)g(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)g(.)f(.)h(.)
+f(.)h(.)f(.)h(.)134 b(7)315 475 y(6.1.1)94 b(Constructor)26
+b(In)n(terfaces)48 b(.)42 b(.)f(.)h(.)f(.)h(.)g(.)f(.)h(.)f(.)h(.)f(.)h
+(.)g(.)f(.)h(.)f(.)h(.)f(.)h(.)g(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)g(.)
+f(.)h(.)f(.)h(.)f(.)h(.)134 b(7)315 631 y(6.1.2)94 b(v)-5
+b(aargs)26 b(Constructors)70 b(.)41 b(.)h(.)f(.)h(.)f(.)h(.)g(.)f(.)h
+(.)f(.)h(.)f(.)h(.)g(.)f(.)h(.)f(.)h(.)f(.)h(.)g(.)f(.)h(.)f(.)h(.)f(.)
+h(.)f(.)h(.)g(.)f(.)h(.)f(.)h(.)f(.)h(.)134 b(7)315 788
+y(6.1.3)94 b(P)n(arsing)26 b(T)-7 b(ext)28 b(Files)68
+b(.)42 b(.)f(.)h(.)f(.)h(.)f(.)h(.)g(.)f(.)h(.)f(.)h(.)f(.)h(.)g(.)f(.)
+h(.)f(.)h(.)f(.)h(.)g(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)g(.)f(.)h(.)f
+(.)h(.)f(.)h(.)134 b(8)125 944 y(6.2)83 b(A)n(ccessing)27
+b(Comp)r(onen)n(ts)105 b(.)41 b(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)g(.)f(.)h
+(.)f(.)h(.)f(.)h(.)g(.)f(.)h(.)f(.)h(.)f(.)h(.)g(.)f(.)h(.)f(.)h(.)f(.)
+h(.)f(.)h(.)g(.)f(.)h(.)f(.)h(.)f(.)h(.)93 b(10)315 1101
+y(6.2.1)h(Finding)28 b(Comp)r(onen)n(ts)99 b(.)42 b(.)f(.)h(.)f(.)h(.)g
+(.)f(.)h(.)f(.)h(.)f(.)h(.)g(.)f(.)h(.)f(.)h(.)f(.)h(.)g(.)f(.)h(.)f(.)
+h(.)f(.)h(.)f(.)h(.)g(.)f(.)h(.)f(.)h(.)f(.)h(.)93 b(10)315
+1257 y(6.2.2)h(In)n(terating)27 b(Through)f(Comp)r(onen)n(ts)66
+b(.)41 b(.)h(.)f(.)h(.)f(.)h(.)g(.)f(.)h(.)f(.)h(.)f(.)h(.)g(.)f(.)h(.)
+f(.)h(.)f(.)h(.)f(.)h(.)g(.)f(.)h(.)f(.)h(.)f(.)h(.)93
+b(10)315 1413 y(6.2.3)h(Using)27 b(Comp)r(onen)n(t)h(Iterators)59
+b(.)41 b(.)h(.)g(.)f(.)h(.)f(.)h(.)f(.)h(.)g(.)f(.)h(.)f(.)h(.)f(.)h(.)
+g(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)g(.)f(.)h(.)f(.)h(.)f(.)h(.)93
+b(11)315 1570 y(6.2.4)h(Remo)n(ving)27 b(Comp)r(onen)n(ts)83
+b(.)41 b(.)h(.)f(.)h(.)g(.)f(.)h(.)f(.)h(.)f(.)h(.)g(.)f(.)h(.)f(.)h(.)
+f(.)h(.)g(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)g(.)f(.)h(.)f(.)h(.)f(.)h
+(.)93 b(11)315 1726 y(6.2.5)h(W)-7 b(orking)27 b(with)h(prop)r(erties)e
+(and)i(parameters)e(.)41 b(.)h(.)g(.)f(.)h(.)f(.)h(.)f(.)h(.)g(.)f(.)h
+(.)f(.)h(.)f(.)h(.)f(.)h(.)g(.)f(.)h(.)f(.)h(.)f(.)h(.)93
+b(12)315 1883 y(6.2.6)h(W)-7 b(orking)27 b(with)h(v)-5
+b(alues)52 b(.)41 b(.)h(.)f(.)h(.)f(.)h(.)g(.)f(.)h(.)f(.)h(.)f(.)h(.)g
+(.)f(.)h(.)f(.)h(.)f(.)h(.)g(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)g(.)f(.)
+h(.)f(.)h(.)f(.)h(.)93 b(12)315 2039 y(6.2.7)h(W)-7 b(orking)27
+b(with)h(parameters)61 b(.)42 b(.)f(.)h(.)g(.)f(.)h(.)f(.)h(.)f(.)h(.)g
+(.)f(.)h(.)f(.)h(.)f(.)h(.)g(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)g(.)f(.)
+h(.)f(.)h(.)f(.)h(.)93 b(13)315 2196 y(6.2.8)h(Chec)n(king)27
+b(Comp)r(onen)n(t)g(V)-7 b(alidit)n(y)25 b(.)42 b(.)g(.)f(.)h(.)f(.)h
+(.)f(.)h(.)g(.)f(.)h(.)f(.)h(.)f(.)h(.)g(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)
+h(.)g(.)f(.)h(.)f(.)h(.)f(.)h(.)93 b(13)315 2352 y(6.2.9)h(Con)n(v)n
+(erting)26 b(Comp)r(onen)n(ts)h(to)g(T)-7 b(ext)74 b(.)41
+b(.)h(.)f(.)h(.)f(.)h(.)g(.)f(.)h(.)f(.)h(.)f(.)h(.)g(.)f(.)h(.)f(.)h
+(.)f(.)h(.)f(.)h(.)g(.)f(.)h(.)f(.)h(.)f(.)h(.)93 b(14)125
+2509 y(6.3)83 b(Time)33 b(.)42 b(.)f(.)h(.)g(.)f(.)h(.)f(.)h(.)f(.)h(.)
+g(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)g(.)f(.)h(.)f(.)h(.)f(.)h(.)g(.)f
+(.)h(.)f(.)h(.)f(.)h(.)g(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)g(.)f(.)h(.)
+f(.)h(.)f(.)h(.)93 b(14)315 2665 y(6.3.1)h(Time)28 b(structure)56
+b(.)42 b(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)g(.)f(.)h(.)f(.)h(.)f(.)h(.)
+g(.)f(.)h(.)f(.)h(.)f(.)h(.)g(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)g(.)f
+(.)h(.)f(.)h(.)f(.)h(.)93 b(14)315 2822 y(6.3.2)h(Time)28
+b(manipulating)f(routines)38 b(.)j(.)h(.)g(.)f(.)h(.)f(.)h(.)f(.)h(.)g
+(.)f(.)h(.)f(.)h(.)f(.)h(.)g(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)g(.)f(.)
+h(.)f(.)h(.)f(.)h(.)93 b(14)125 2978 y(6.4)83 b(Storing)27
+b(Ob)5 b(jects)39 b(.)i(.)h(.)f(.)h(.)g(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h
+(.)g(.)f(.)h(.)f(.)h(.)f(.)h(.)g(.)f(.)h(.)f(.)h(.)f(.)h(.)g(.)f(.)h(.)
+f(.)h(.)f(.)h(.)f(.)h(.)g(.)f(.)h(.)f(.)h(.)f(.)h(.)93
+b(16)125 3135 y(6.5)83 b(Memory)27 b(Managemen)n(t)73
+b(.)42 b(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)g(.)f(.)h(.)f(.)h(.)f(.)h(.)
+g(.)f(.)h(.)f(.)h(.)f(.)h(.)g(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)g(.)f
+(.)h(.)f(.)h(.)f(.)h(.)93 b(16)125 3291 y(6.6)83 b(Error)27
+b(Handling)56 b(.)41 b(.)h(.)f(.)h(.)g(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h
+(.)g(.)f(.)h(.)f(.)h(.)f(.)h(.)g(.)f(.)h(.)f(.)h(.)f(.)h(.)g(.)f(.)h(.)
+f(.)h(.)f(.)h(.)f(.)h(.)g(.)f(.)h(.)f(.)h(.)f(.)h(.)93
+b(16)315 3448 y(6.6.1)h(Return)28 b(v)-5 b(alues)34 b(.)42
+b(.)g(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)g(.)f(.)h(.)f(.)h(.)f(.)h(.)g
+(.)f(.)h(.)f(.)h(.)f(.)h(.)g(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)g(.)f(.)
+h(.)f(.)h(.)f(.)h(.)93 b(16)315 3604 y(6.6.2)h(icalerrno)28
+b(.)41 b(.)h(.)f(.)h(.)g(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)g(.)f(.)h(.)
+f(.)h(.)f(.)h(.)g(.)f(.)h(.)f(.)h(.)f(.)h(.)g(.)f(.)h(.)f(.)h(.)f(.)h
+(.)f(.)h(.)g(.)f(.)h(.)f(.)h(.)f(.)h(.)93 b(17)315 3760
+y(6.6.3)h(X-LIC-ERR)n(OR)27 b(and)g(X-LIC-INV)-9 b(ALID-COMPONENT)70
+b(.)42 b(.)g(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)g(.)f(.)h(.)f(.)h(.)f(.)
+h(.)93 b(17)125 3917 y(6.7)83 b(Naming)28 b(Standard)h(.)42
+b(.)f(.)h(.)g(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)g(.)f(.)h(.)f(.)h(.)f
+(.)h(.)g(.)f(.)h(.)f(.)h(.)f(.)h(.)g(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)
+g(.)f(.)h(.)f(.)h(.)f(.)h(.)93 b(18)0 4156 y Fd(7)77
+b(Useful)31 b(Recipies)3038 b(18)0 4396 y(8)77 b(P)m(erformance)3153
+b(18)0 4635 y(9)77 b(Hac)m(ks)32 b(and)g(Bugs)3009 b(18)0
+4974 y Fe(1)131 b(In)l(tro)t(duction)0 5212 y Ff(Libical)23
+b(is)f(an)h(Op)r(en)g(Source)f(implemen)n(tation)h(of)g(the)g
+(iCalendar)f(proto)r(cols)f(and)i(proto)r(col)e(data)i(units.)35
+b(The)23 b(iCalendar)0 5326 y(sp)r(eci\034cation)k(describ)r(es)g(ho)n
+(w)f(calendar)g(clien)n(ts)i(can)f(comm)n(unicate)f(with)i(calendar)e
+(serv)n(ers)f(for)i(users)g(can)g(store)f(their)p eop
+%%Page: 3 3
+3 2 bop 0 -167 3900 5 v 0 -200 a Fd(2.)73 b(Building)31
+b(the)g(Library)2847 b Ff(3)0 162 y(calendar)26 b(data)h(and)h(arrange)
+d(meetings)i(with)h(other)f(users.)0 318 y(Libical)g(implemen)n(ts)h
(RF)n(C2445)e(and)h(RF)n(C2446.)35 b(Ev)n(en)n(tually)-7
b(,)27 b(it)h(will)g(also)e(implemen)n(t)j(iRIP)f(and)f(CAP)-7
-b(.)0 1996 y(This)32 b(do)r(cumen)n(tation)g(assumes)g(that)g(y)n(ou)g
+b(.)0 475 y(This)32 b(do)r(cumen)n(tation)g(assumes)g(that)g(y)n(ou)g
(are)f(familiar)h(with)h(the)f(iCalendar)f(standards)g(RF)n(C2445)g
-(and)h(RF)n(C2446.)0 2110 y(these)c(sp)r(eci\034cations)e(are)h(online)
-g(on)h(the)g(CALSCH)g(w)n(ebpage)e(at:)0 2308 y Fd(http://www.imc.o)o
-(rg)o(/ie)o(tf)o(-c)o(ale)o(nd)o(ar)o(/)0 2706 y Fc(1.1)112
-b(The)38 b(libical)c(pro)6 b(ject)0 2916 y Fh(This)29
+(and)h(RF)n(C2446.)0 588 y(these)c(sp)r(eci\034cations)e(are)h(online)g
+(on)h(the)g(CALSCH)g(w)n(ebpage)e(at:)0 828 y Fc(http://www.imc.o)o(rg)
+o(/ie)o(tf)o(-c)o(ale)o(nd)o(ar)o(/)0 1119 y Fb(1.1)112
+b(The)38 b(libical)c(pro)6 b(ject)0 1329 y Ff(This)29
b(co)r(de)g(is)g(under)g(activ)n(e)f(dev)n(elopmen)n(t.)40
b(If)30 b(y)n(ou)e(w)n(ould)h(lik)n(e)f(to)h(con)n(tribute)g(to)g(the)g
(pro)5 b(ject,)29 b(y)n(ou)f(can)h(con)n(tact)f(me,)0
-3029 y(Eric)g(Busb)r(o)r(om,)f(at)g(eric@soft)n(w)n(arestudio.org.)33
+1443 y(Eric)g(Busb)r(o)r(om,)f(at)g(eric@soft)n(w)n(arestudio.org.)33
b(The)27 b(pro)5 b(ject)27 b(has)g(a)g(w)n(ebpage)g(at)0
-3227 y Fd(http://softwares)o(tu)o(dio)o(.o)o(rg)o(/li)o(bi)o(ca)o(l/i)o
-(nd)o(ex)o(.ht)o(ml)0 3539 y Fh(and)g(a)h(mailing)f(list)g(that)h(y)n
+1682 y Fc(http://softwares)o(tu)o(dio)o(.o)o(rg)o(/li)o(bi)o(ca)o(l/i)o
+(nd)o(ex)o(.ht)o(ml)0 1922 y Ff(and)g(a)h(mailing)f(list)g(that)h(y)n
(ou)f(can)g(join)h(b)n(y)f(sending)g(the)h(follo)n(wing)f(mail:)0
-3737 y Fd(To:)42 b(minimalist@softwa)o(re)o(st)o(udi)o(o.)o(or)o(g)0
-3850 y(Subject:)e(subscribe)g(libical)0 4248 y Fc(1.2)112
-b(License)0 4458 y Fh(The)60 b(co)r(de)f(and)h(data\034les)f(in)h(this)
+2161 y Fc(To:)42 b(minimalist@softwa)o(re)o(st)o(udi)o(o.)o(or)o(g)0
+2275 y(Subject:)e(subscribe)g(libical)0 2566 y Fb(1.2)112
+b(License)0 2777 y Ff(The)60 b(co)r(de)f(and)h(data\034les)f(in)h(this)
g(distribution)g(are)e(licensed)i(under)g(the)g(Mozilla)f(Public)h
-(License.)133 b(See)0 4572 y(h)n(ttp://www.mozilla.org/NPL/MPL-1.0.h)n
+(License.)133 b(See)0 2890 y(h)n(ttp://www.mozilla.org/NPL/MPL-1.0.h)n
(tml)37 b(for)j(a)h(cop)n(y)f(of)g(the)i(license.)76
b(Alternately)-7 b(,)44 b(y)n(ou)c(ma)n(y)g(use)g(libical)0
-4686 y(under)32 b(the)g(terms)g(of)g(the)g(GNU)h(Library)d(General)h
+3004 y(under)32 b(the)g(terms)g(of)g(the)g(GNU)h(Library)d(General)h
(Public)i(License.)50 b(See)32 b(h)n(ttp://www.fsf.org/cop)n
-(yleft/lesser.h)n(tml)0 4799 y(for)27 b(a)g(cop)n(y)g(of)g(the)h(LGPL.)
-0 4956 y(This)j(dual)g(license)f(ensures)h(that)g(the)g(library)f(can)g
+(yleft/lesser.h)n(tml)0 3117 y(for)27 b(a)g(cop)n(y)g(of)g(the)h(LGPL.)
+0 3274 y(This)j(dual)g(license)f(ensures)h(that)g(the)g(library)f(can)g
(b)r(e)i(incorp)r(orated)d(in)n(to)i(b)r(oth)g(proprietary)e(co)r(de)i
-(and)f(GPL'd)i(pro-)0 5069 y(grams,)23 b(and)h(will)h(b)r(ene\034t)g
+(and)f(GPL'd)i(pro-)0 3387 y(grams,)23 b(and)h(will)h(b)r(ene\034t)g
(from)f(impro)n(v)n(emen)n(ts)e(made)i(b)n(y)g(programmers)e(in)i(b)r
(oth)h(realms.)34 b(I)25 b(will)f(only)g(accept)g(c)n(hanges)0
-5183 y(in)n(to)j(m)n(y)h(v)n(ersion)e(of)h(the)h(library)e(if)i(they)g
-(are)f(similarly)f(dual-licensed.)0 5467 y Fc(1.3)112
-b(Example)37 b(Co)s(de)0 5677 y Fh(A)h(lot)f(of)h(the)g(do)r(cumen)n
+3501 y(in)n(to)j(m)n(y)h(v)n(ersion)e(of)h(the)h(library)e(if)i(they)g
+(are)f(similarly)f(dual-licensed.)0 3792 y Fb(1.3)112
+b(Example)37 b(Co)s(de)0 4003 y Ff(A)h(lot)f(of)h(the)g(do)r(cumen)n
(tation)f(for)g(this)h(library)e(is)i(in)g(the)g(form)f(of)g(example)g
(co)r(de.)67 b(These)37 b(examples)g(are)g(in)h(the)0
-5791 y("examples")26 b(directory)g(of)i(the)g(distribution.)36
+4116 y("examples")26 b(directory)g(of)i(the)g(distribution.)36
b(Also)28 b(lo)r(ok)e(in)i("src/test")e(for)h(more)g(annotated)g
-(examples.)0 6122 y Fe(2)131 b(Building)46 b(the)e(Library)0
-6361 y Fh(Libical)37 b(uses)g(auto)r(conf)h(to)f(generate)f(mak)n
+(examples.)0 4454 y Fe(2)131 b(Building)46 b(the)e(Library)0
+4693 y Ff(Libical)37 b(uses)g(auto)r(conf)h(to)f(generate)f(mak)n
(e\034les,)k(although)c(it)i(uses)g(none)f(of)h(the)g(auto)r(conf)f
-(\035ags)f(to)i(in\035uence)g(the)0 6474 y(compilation.)e(It)28
-b(should)f(built)i(with)f(no)f(adjustmen)n(ts)h(on)f(Lin)n(ux,)g(F)-7
-b(reeBSD)28 b(and)f(Solaris.)0 6805 y Fe(3)131 b(Structure)0
-7044 y Fh(The)28 b(iCal)f(calendar)f(mo)r(del)i(is)f(based)g(on)h(four)
-f(t)n(yp)r(es)g(of)h(ob)5 b(jects:)36 b(comp)r(onen)n(ts,)27
-b(prop)r(erties,)g(v)-5 b(alues)27 b(and)g(parameters.)0
-7201 y(Prop)r(erties)32 b(are)f(the)i(fundamen)n(tal)f(unit)i(of)e
-(information)g(in)g(iCal,)i(and)e(they)g(w)n(ork)f(a)h(bit)h(lik)n(e)f
-(a)g(hash)g(en)n(try)-7 b(,)34 b(with)e(a)0 7314 y(constan)n(t)21
-b(k)n(ey)h(and)g(a)f(v)-5 b(ariable)21 b(v)-5 b(alue.)35
-b(Prop)r(erties)21 b(ma)n(y)h(also)f(ha)n(v)n(e)g(mo)r(di\034ers,)h
-(called)g(parameters.)33 b(In)22 b(the)h(iCal)f(con)n(ten)n(t)0
-7428 y(line)0 7626 y Fd(ORGANIZER;ROLE=C)o(HA)o(IR:)o(MA)o(IL)o(TO:)o
-(mr)o(bi)o(g@h)o(os)o(t.)o(com)p eop
-%%Page: 2 2
-2 1 bop 0 -167 3900 5 v 0 -200 a Fb(3.)73 b(Structure)3313
-b Fh(2)0 162 y(The)34 b(prop)r(ert)n(y)f(name)h(is)g("OR)n(GANIZER,")g
-(the)g(v)-5 b(alue)34 b(of)h(the)f(prop)r(ert)n(y)f(is)h
-("mrbig@host.com")e(and)i(the)g("R)n(OLE")0 275 y(parameter)26
-b(sp)r(eci\034es)h(that)h(Mr)g(Big)f(is)g(the)h(c)n(hair)e(of)i(the)g
-(meetings)f(asso)r(ciated)f(with)i(this)g(prop)r(ert)n(y)-7
-b(.)0 432 y(Comp)r(onen)n(ts)26 b(are)f(groups)g(of)h(prop)r(erties)f
-(that)i(represen)n(t)e(the)i(core)e(ob)5 b(jects)26 b(of)g(a)g
-(calendar)f(system,)h(suc)n(h)g(as)g(ev)n(en)n(ts)f(or)0
-545 y(timezones.)0 702 y(The)k(cen)n(tral)f(goal)g(of)h(libical)g(is)g
-(to)g(parse)f(iTIP)i(data)e(in)n(to)h(an)g(in)n(ternal)f(represen)n
-(tation)g(of)h(Comp)r(onen)n(ts,)g(Prop)r(erties,)0 815
-y(P)n(arameters)d(an)h(V)-7 b(alues,)27 b(and)h(to)f(allo)n(w)g(the)h
-(user)f(to)g(manipulate)g(the)h(data)g(in)f(v)-5 b(arious)27
-b(w)n(a)n(ys)0 942 y Fg(1)37 972 y Fh(When)h(a)f(comp)r(onen)n(t)h(is)f
-(sen)n(t)h(across)d(a)i(net)n(w)n(ork,)f(if)j(it)f(is)f(un-encrypted,)g
-(it)h(will)g(lo)r(ok)f(something)g(lik)n(e:)p 0 1041
-3900 4 v 0 1218 a Fd(BEGIN:VEVENT)0 1331 y(DTSTAMP:19980309)o(T2)o(310)
-o(00)o(Z)0 1445 y(UID:guid-1.host1)o(.c)o(om)0 1558 y(ORGANIZER;ROLE=C)
+(\035ags)f(to)i(in\035uence)g(the)0 4807 y(compilation.)44
+b(It)31 b(should)f(built)h(with)g(no)f(adjustmen)n(ts)h(on)f(Lin)n(ux,)
+h(F)-7 b(reeBSD)30 b(and)g(Solaris)f(under)h(gcc.)45
+b(Some)30 b(v)n(ersion)0 4920 y(ha)n(v)n(e)36 b(b)r(een)h(successfully)
+f(b)r(een)i(build)f(on)f(MacOS,)h(Solaris)e(and)i(UnixW)-7
+b(are)36 b(without)h(gcc,)i(but)e(y)n(ou)g(ma)n(y)f(run)g(in)n(to)0
+5034 y(problems)27 b(with)h(a)f(particular)f(later)h(v)n(ersion.)0
+5190 y(F)-7 b(or)27 b(a)g(more)g(complete)g(guide)h(to)f(building)h
+(the)g(library)-7 b(,)26 b(see)h(the)h(README)i(\034le)e(in)f(the)h
+(distribution.)p eop
+%%Page: 4 4
+4 3 bop 0 -167 3900 5 v 0 -200 a Fd(3.)73 b(Structure)3313
+b Ff(4)0 162 y Fe(3)131 b(Structure)0 400 y Ff(The)28
+b(iCal)f(calendar)f(mo)r(del)i(is)f(based)g(on)h(four)f(t)n(yp)r(es)g
+(of)h(ob)5 b(jects:)36 b(comp)r(onen)n(ts,)27 b(prop)r(erties,)g(v)-5
+b(alues)27 b(and)g(parameters.)0 557 y(Prop)r(erties)32
+b(are)f(the)i(fundamen)n(tal)f(unit)i(of)e(information)g(in)g(iCal,)i
+(and)e(they)g(w)n(ork)f(a)h(bit)h(lik)n(e)f(a)g(hash)g(en)n(try)-7
+b(,)34 b(with)e(a)0 670 y(constan)n(t)21 b(k)n(ey)h(and)g(a)f(v)-5
+b(ariable)21 b(v)-5 b(alue.)35 b(Prop)r(erties)21 b(ma)n(y)h(also)f(ha)
+n(v)n(e)g(mo)r(di\034ers,)h(called)g(parameters.)33 b(In)22
+b(the)h(iCal)f(con)n(ten)n(t)0 784 y(line)0 1023 y Fc(ORGANIZER;ROLE=C)
o(HA)o(IR:)o(MA)o(IL)o(TO:)o(mr)o(bi)o(g@h)o(os)o(t.)o(com)0
-1672 y(ATTENDEE;RSVP=TR)o(UE)o(;RO)o(LE)o(=R)o(EQ-)o(PA)o(RT)o(ICI)o
-(PA)o(NT)o(;CU)o(TY)o(PE)o(=GR)o(OU)o(P:)87 1786 y(MAILTO:employee-)o
-(A@h)o(os)o(t.)o(com)0 1899 y(DESCRIPTION:Proj)o(ec)o(t)38
-b(XYZ)k(Review)f(Meeting)0 2013 y(CATEGORIES:MEETI)o(NG)0
-2126 y(CLASS:PUBLIC)0 2240 y(CREATED:19980309)o(T1)o(300)o(00)o(Z)0
-2353 y(SUMMARY:XYZ)e(Project)i(Review)0 2467 y(DTSTART;TZID=US-)o(Ea)o
-(ste)o(rn)o(:1)o(998)o(03)o(12)o(T08)o(30)o(00)0 2581
+1263 y Ff(The)34 b(prop)r(ert)n(y)f(name)h(is)g("OR)n(GANIZER,")g(the)g
+(v)-5 b(alue)34 b(of)h(the)f(prop)r(ert)n(y)f(is)h("mrbig@host.com")e
+(and)i(the)g("R)n(OLE")0 1377 y(parameter)26 b(sp)r(eci\034es)h(that)h
+(Mr)g(Big)f(is)g(the)h(c)n(hair)e(of)i(the)g(meetings)f(asso)r(ciated)f
+(with)i(this)g(prop)r(ert)n(y)-7 b(.)0 1533 y(Comp)r(onen)n(ts)26
+b(are)f(groups)g(of)h(prop)r(erties)f(that)i(represen)n(t)e(the)i(core)
+e(ob)5 b(jects)26 b(of)g(a)g(calendar)f(system,)h(suc)n(h)g(as)g(ev)n
+(en)n(ts)f(or)0 1647 y(timezones.)0 1803 y(The)k(cen)n(tral)f(goal)g
+(of)h(libical)g(is)g(to)g(parse)f(iTIP)i(data)e(in)n(to)h(an)g(in)n
+(ternal)f(represen)n(tation)g(of)h(Comp)r(onen)n(ts,)g(Prop)r(erties,)0
+1917 y(P)n(arameters)d(an)h(V)-7 b(alues,)27 b(and)h(to)f(allo)n(w)g
+(the)h(user)f(to)g(manipulate)g(the)h(data)g(in)f(v)-5
+b(arious)27 b(w)n(a)n(ys)0 2073 y(When)h(a)f(comp)r(onen)n(t)g(is)h
+(sen)n(t)f(across)f(a)h(net)n(w)n(ork,)f(if)i(it)g(is)g(un-encrypted,)f
+(it)h(will)g(lo)r(ok)f(something)g(lik)n(e:)0 2313 y
+Fc(BEGIN:VEVENT)0 2426 y(DTSTAMP:19980309)o(T2)o(310)o(00)o(Z)0
+2540 y(UID:guid-1.host1)o(.c)o(om)0 2653 y(ORGANIZER;ROLE=C)o(HA)o(IR:)
+o(MA)o(IL)o(TO:)o(mr)o(bi)o(g@h)o(os)o(t.)o(com)0 2767
+y(ATTENDEE;RSVP=TR)o(UE)o(;RO)o(LE)o(=R)o(EQ-)o(PA)o(RT)o(ICI)o(PA)o
+(NT)o(;CU)o(TY)o(PE)o(=GR)o(OU)o(P:)87 2880 y(MAILTO:employee-)o(A@h)o
+(os)o(t.)o(com)0 2994 y(DESCRIPTION:Proj)o(ec)o(t)38
+b(XYZ)k(Review)f(Meeting)0 3108 y(CATEGORIES:MEETI)o(NG)0
+3221 y(CLASS:PUBLIC)0 3335 y(CREATED:19980309)o(T1)o(300)o(00)o(Z)0
+3448 y(SUMMARY:XYZ)e(Project)i(Review)0 3562 y(DTSTART;TZID=US-)o(Ea)o
+(ste)o(rn)o(:1)o(998)o(03)o(12)o(T08)o(30)o(00)0 3675
y(DTEND;TZID=US-Ea)o(st)o(ern)o(:1)o(99)o(803)o(12)o(T0)o(930)o(00)0
-2694 y(LOCATION:1CP)d(Conference)i(Room)i(4350)0 2808
-y(END:VEVENT)p 0 3008 V 0 3235 a Fc(3.1)112 b(Core)37
-b(iCal)f(classes)0 3446 y Fb(3.1.1)94 b(Comp)s(onen)m(ts)0
-3656 y(3.1.2)g(Prop)s(erties)0 3866 y(3.1.3)g(V)-8 b(alues)0
-4076 y(3.1.4)94 b(P)m(arameters)0 4305 y Fc(3.2)112 b(Other)37
-b(elemen)m(ts)g(of)g(libical)0 4515 y Fh(In)26 b(addition)f(to)h(the)g
+3789 y(LOCATION:1CP)d(Conference)i(Room)i(4350)0 3903
+y(END:VEVENT)p eop
+%%Page: 5 5
+5 4 bop 0 -167 3900 5 v 0 -200 a Fd(4.)73 b(Di\033erences)31
+b(F)-8 b(rom)31 b(RF)m(Cs)2732 b Ff(5)0 162 y Fb(3.1)112
+b(Core)37 b(iCal)f(classes)0 372 y Fd(3.1.1)94 b(Comp)s(onen)m(ts)0
+582 y(3.1.2)g(Prop)s(erties)0 792 y(3.1.3)g(V)-8 b(alues)0
+1002 y(3.1.4)94 b(P)m(arameters)0 1231 y Fb(3.2)112 b(Other)37
+b(elemen)m(ts)g(of)g(libical)0 1441 y Ff(In)26 b(addition)f(to)h(the)g
(core)e(iCal)h(classes,)g(libical)g(has)g(man)n(y)g(other)g(t)n(yp)r
(es,)h(structures,)g(classes)e(that)i(aid)f(in)h(creating)e(and)0
-4628 y(using)j(iCal)g(comp)r(onen)n(ts.)104 4735 y Fa(1)p
-eop
-%%Page: 3 3
-3 2 bop 0 -167 3900 5 v 0 -200 a Fb(4.)73 b(Di\033erences)31
-b(F)-8 b(rom)31 b(RF)m(Cs)2732 b Fh(3)0 162 y Fb(3.2.1)94
-b(En)m(umerations)0 372 y(3.2.2)g(T)m(yp)s(es)0 582 y(3.2.3)g(The)32
-b(P)m(arser)0 792 y(3.2.4)94 b(Restrictions)0 1002 y(3.2.5)g(Error)32
-b(ob)5 b(jects)0 1212 y(3.2.6)94 b(Memory)30 b(Managemen)m(t)0
-1422 y(3.2.7)94 b(Storage)32 b(classes)0 1689 y Fe(4)131
-b(Di\033erences)44 b(F)-11 b(rom)43 b(RF)l(Cs)0 1928
-y Fh(Libical)c(has)f(b)r(een)h(designed)g(to)f(follo)n(w)h(the)g
-(standards)e(as)i(closely)f(as)g(p)r(ossible,)j(so)e(that)g(the)g(k)n
-(ey)f(ob)5 b(jects)39 b(in)g(the)0 2041 y(standards)30
-b(are)g(also)g(k)n(eey)g(ob)5 b(jects)31 b(in)h(the)f(library)-7
-b(.)47 b(Ho)n(w)n(ev)n(er,)30 b(there)h(are)f(a)h(few)g(areas)e(where)i
-(the)h(sp)r(eci\034cations)e(are)0 2155 y(\(arguably\))g(irregular,)h
-(and)g(follo)n(wing)g(them)h(exactly)f(w)n(ould)g(result)h(in)g(an)f
-(unfriendly)h(in)n(terface.)49 b(These)31 b(deviations)0
-2268 y(mak)n(e)c(libical)g(easier)f(to)i(use)f(b)n(y)h(main)n(taining)e
-(a)h(self-similar)g(in)n(terface.)0 2560 y Fc(4.1)112
-b(Pseudo)38 b(Comp)s(onen)m(ts)0 2770 y Fh(Libical)29
-b(de\034nes)g(comp)r(onen)n(ts)g(for)g(groups)f(of)h(prop)r(erties)f
-(that)i(lo)r(ok)f(and)g(act)g(lik)n(e)g(comp)r(onen)n(ts,)g(but)h(are)e
-(not)i(de\034ned)0 2884 y(as)e(comp)r(onen)n(ts)h(in)g(the)g(sp)r
-(eci\034cation.)41 b(XD)n(A)-7 b(YLIGHT)30 b(and)f(XST)-7
-b(AND)n(ARD)30 b(are)e(notable)h(examples.)40 b(These)29
-b(pseudo)0 2997 y(comp)r(onen)n(ts)d(group)f(prop)r(erties)g(within)i
-(the)g(VTIMEZONE)g(comp)r(onen)n(ts.)36 b(F)-7 b(or)25
-b(instanace,)h(the)h(timezone)f(prop)r(erties)0 3111
-y(asso)r(ciated)f(with)i(da)n(yligh)n(t)e(sa)n(vings)g(time)i(starts)e
-(with)i("BEGIN:D)n(A)-7 b(YLIGHT")27 b(and)f(ends)h(with)f("END:D)n(A)
--7 b(YLIGHT,)0 3224 y(just)32 b(lik)n(e)g(other)f(comp)r(onen)n(ts,)h
-(but)g(is)g(not)g(de\034ned)g(as)f(a)g(comp)r(onen)n(t)g(in)h(RF)n
-(C2445.)48 b(\()32 b(See)f(RF)n(C2445,)g(page)g(61)g(\))h(In)0
-3338 y(Libical,this)d(grouping)e(is)i(represen)n(ted)e(b)n(y)i(the)g
+1555 y(using)j(iCal)g(comp)r(onen)n(ts.)0 1827 y Fd(3.2.1)94
+b(En)m(umerations)0 2037 y(3.2.2)g(T)m(yp)s(es)0 2247
+y(3.2.3)g(The)32 b(parser)0 2457 y(3.2.4)94 b(Restrictions)0
+2668 y(3.2.5)g(Error)32 b(ob)5 b(jects)0 2878 y(3.2.6)94
+b(Memory)30 b(Managemen)m(t)0 3088 y(3.2.7)94 b(Storage)32
+b(classes)0 3355 y Fe(4)131 b(Di\033erences)44 b(F)-11
+b(rom)43 b(RF)l(Cs)0 3593 y Ff(Libical)c(has)f(b)r(een)h(designed)g(to)
+f(follo)n(w)h(the)g(standards)e(as)i(closely)f(as)g(p)r(ossible,)j(so)e
+(that)g(the)g(k)n(ey)f(ob)5 b(jects)39 b(in)g(the)0 3707
+y(standards)30 b(are)g(also)g(k)n(eey)g(ob)5 b(jects)31
+b(in)h(the)f(library)-7 b(.)47 b(Ho)n(w)n(ev)n(er,)30
+b(there)h(are)f(a)h(few)g(areas)e(where)i(the)h(sp)r(eci\034cations)e
+(are)0 3820 y(\(arguably\))g(irregular,)h(and)g(follo)n(wing)g(them)h
+(exactly)f(w)n(ould)g(result)h(in)g(an)f(unfriendly)h(in)n(terface.)49
+b(These)31 b(deviations)0 3934 y(mak)n(e)c(libical)g(easier)f(to)i(use)
+f(b)n(y)h(main)n(taining)e(a)h(self-similar)g(in)n(terface.)0
+4225 y Fb(4.1)112 b(Pseudo)38 b(Comp)s(onen)m(ts)0 4436
+y Ff(Libical)29 b(de\034nes)g(comp)r(onen)n(ts)g(for)g(groups)f(of)h
+(prop)r(erties)f(that)i(lo)r(ok)f(and)g(act)g(lik)n(e)g(comp)r(onen)n
+(ts,)g(but)h(are)e(not)i(de\034ned)0 4549 y(as)e(comp)r(onen)n(ts)h(in)
+g(the)g(sp)r(eci\034cation.)41 b(XD)n(A)-7 b(YLIGHT)30
+b(and)f(XST)-7 b(AND)n(ARD)30 b(are)e(notable)h(examples.)40
+b(These)29 b(pseudo)0 4663 y(comp)r(onen)n(ts)d(group)f(prop)r(erties)g
+(within)i(the)g(VTIMEZONE)g(comp)r(onen)n(ts.)36 b(F)-7
+b(or)25 b(instanace,)h(the)h(timezone)f(prop)r(erties)0
+4776 y(asso)r(ciated)f(with)i(da)n(yligh)n(t)e(sa)n(vings)g(time)i
+(starts)e(with)i("BEGIN:D)n(A)-7 b(YLIGHT")27 b(and)f(ends)h(with)f
+("END:D)n(A)-7 b(YLIGHT,)0 4890 y(just)32 b(lik)n(e)g(other)f(comp)r
+(onen)n(ts,)h(but)g(is)g(not)g(de\034ned)g(as)f(a)g(comp)r(onen)n(t)g
+(in)h(RF)n(C2445.)48 b(\()32 b(See)f(RF)n(C2445,)g(page)g(61)g(\))h(In)
+0 5003 y(Libical,this)d(grouping)e(is)i(represen)n(ted)e(b)n(y)i(the)g
(XD)n(A)-7 b(YLIGHT)30 b(comp)r(onen)n(t.)41 b(Standard)28
-b(iCAL)h(comp)r(onen)n(ts)f(all)h(start)0 3451 y(with)f(the)g(letter)g
-("V,")f(while)g(pseudo)g(comp)r(onen)n(ts)g(start)g(with"X.")0
-3608 y(There)35 b(are)g(also)g(pseudo)h(comp)r(onen)n(ts)f(that)i(are)e
-(conceptually)g(deriv)n(ed)g(classess)f(of)i(V)-9 b(ALARM.)37
-b(RF)n(C2446)d(de\034nes)0 3721 y(what)d(prop)r(erties)f(ma)n(y)g(b)r
-(e)h(included)g(in)g(eac)n(h)f(comp)r(onen)n(t,)i(and)e(for)h(V)-9
-b(ALARM,)31 b(the)g(set)g(of)g(prop)r(erties)f(it)h(ma)n(y)f(ha)n(v)n
-(e)0 3835 y(dep)r(ends)e(on)f(the)h(v)-5 b(alue)28 b(of)f(the)h(A)n
-(CTION)f(prop)r(ert)n(y)-7 b(.)0 3992 y(F)g(or)19 b(instance,)j(if)e(a)
-g(V)-9 b(ALARM)20 b(comp)r(onen)n(t)g(has)f(an)h(A)n(CTION)g(prop)r
-(ert)n(y)e(with)j(the)f(v)-5 b(alue)20 b(of)g("A)n(UDIO,")f(the)h(comp)
-r(onen)n(t)0 4105 y(m)n(ust)h(also)g(ha)n(v)n(e)f(an)h("A)-7
-b(TT)g(A)n(CH")21 b(prop)r(ert)n(y)-7 b(.)34 b(Ho)n(w)n(ev)n(er,)20
-b(if)i(the)g(A)n(CTION)f(v)-5 b(alue)21 b(is)g("DISPLA)-7
-b(Y,")22 b(the)g(comp)r(onen)n(t)f(m)n(ust)0 4219 y(ha)n(v)n(e)26
-b(a)i(DESCRIPTION)g(prop)r(ert)n(y)-7 b(.)0 4375 y(T)g(o)28
-b(handle)g(these)g(v)-5 b(arious,)27 b(complex)h(restrictions,)f
-(libical)h(has)g(pseudo)g(comp)r(onen)n(ts)f(for)h(eac)n(h)f(t)n(yp)r
-(e)i(of)f(alarm:)37 b(XA)n(U-)0 4489 y(DIO)n(ALARM,)28
-b(XDISPLA)-7 b(Y)g(ALARM,)30 b(XEMAILALARM)f(and)f(XPR)n(OCEDUREALARM.)
-0 4780 y Fc(4.2)112 b(Com)m(bined)37 b(V)-9 b(alues)0
-4990 y Fh(Man)n(y)34 b(v)-5 b(alues)34 b(can)g(tak)n(e)g(more)g(than)g
-(one)h(t)n(yp)r(e.)58 b(TRIGGER,)35 b(for)f(instance,)i(can)e(ha)n(v)n
-(e)g(a)g(v)-5 b(alue)34 b(t)n(yp)r(e)h(of)g(with)g(DU-)0
-5104 y(RA)-7 b(TION)32 b(or)f(of)h(D)n(A)-7 b(TE-TIME.)33
-b(These)f(m)n(ultiple)g(t)n(yp)r(es)g(mak)n(e)f(it)i(di\036cult)g(to)e
-(create)g(routines)h(to)f(return)h(the)g(v)-5 b(alue)0
-5217 y(asso)r(ciated)26 b(with)i(a)f(prop)r(ert)n(y)-7
-b(.)0 5374 y(It)30 b(is)g(natural)g(to)f(ha)n(v)n(e)g(in)n(terfaces)g
-(that)i(w)n(ould)e(return)h(the)g(v)-5 b(alue)30 b(of)g(a)g(prop)r(ert)
-n(y)-7 b(,)29 b(but)i(it)f(is)g(cum)n(b)r(ersone)f(for)h(a)g(single)0
-5488 y(routine)i(to)g(return)g(m)n(ultiple)h(t)n(yp)r(es.)51
-b(So,)33 b(in)g(libical,)g(prop)r(erties)e(that)i(can)f(ha)n(v)n(e)f(m)
-n(ultiple)i(t)n(yp)r(es)f(are)f(giv)n(en)h(a)g(single)0
-5601 y(t)n(yp)r(e)26 b(that)g(is)g(the)g(union)g(of)g(their)g(RF)n
-(C2445)e(t)n(yp)r(es.)36 b(F)-7 b(or)26 b(instance,)g(in)g(libical,)g
-(the)g(v)-5 b(alue)26 b(of)g(the)g(TRIGGER)h(prop)r(ert)n(y)0
-5715 y(resolv)n(es)e(to)j(struct)f(icaltriggert)n(yp)r(e.)35
-b(This)28 b(t)n(yp)r(e)f(is)h(a)f(union)h(of)f(a)g(DURA)-7
-b(TION)29 b(and)e(a)g(D)n(A)-7 b(TE-TIME.)p eop
-%%Page: 4 4
-4 3 bop 0 -167 3900 5 v 0 -200 a Fb(5.)73 b(Implemen)m(tation)29
-b(Limitations)2539 b Fh(4)0 162 y Fc(4.3)112 b(Multi-V)-9
-b(alued)36 b(Prop)s(erties)0 372 y Fh(Some)31 b(prop)r(erties,)h(suc)n
-(h)f(as)g(CA)-7 b(TEGORIES)33 b(ha)n(v)n(e)d(only)h(one)g(v)-5
-b(alue)32 b(t)n(yp)r(e,)h(but)f(eac)n(h)e(CA)-7 b(TEGORIES)33
-b(prop)r(ert)n(y)d(can)0 485 y(ha)n(v)n(e)24 b(m)n(ultiple)h(v)-5
-b(alue)25 b(instances.)35 b(This)25 b(also)f(results)g(in)h(a)g(cum)n
-(b)r(ersome)f(in)n(terface)g(\025)g(CA)-7 b(TEGORIES)26
-b(accessors)d(w)n(ould)0 599 y(ha)n(v)n(e)k(to)i(return)f(a)g(list)g
-(while)h(all)f(other)g(accessors)e(returned)i(a)g(single)g(v)-5
-b(alue.)39 b(In)29 b(libical,)g(all)f(prop)r(erties)f(ha)n(v)n(e)h(a)g
-(single)0 712 y(v)-5 b(alue,)35 b(and)e(m)n(ulti-v)-5
-b(alued)33 b(prop)r(erties)f(are)h(brok)n(en)f(do)n(wn)g(in)n(to)h(m)n
-(ultiple)h(single)f(v)-5 b(alued)33 b(prop)r(erties)g(during)f
-(parsing.)0 826 y(That)c(is,)f(an)g(input)i(line)e(lik)n(e,)0
-1035 y Fd(CATEGORIES:)39 b(work,)i(home)0 1357 y Fh(b)r(ecomes)27
+b(iCAL)h(comp)r(onen)n(ts)f(all)h(start)0 5117 y(with)f(the)g(letter)g
+("V,")f(while)g(pseudo)g(comp)r(onen)n(ts)g(start)g(with"X.")p
+eop
+%%Page: 6 6
+6 5 bop 0 -167 3900 5 v 0 -200 a Fd(4.)73 b(Di\033erences)31
+b(F)-8 b(rom)31 b(RF)m(Cs)2732 b Ff(6)0 162 y(There)35
+b(are)g(also)g(pseudo)h(comp)r(onen)n(ts)f(that)i(are)e(conceptually)g
+(deriv)n(ed)g(classess)f(of)i(V)-9 b(ALARM.)37 b(RF)n(C2446)d
+(de\034nes)0 275 y(what)d(prop)r(erties)f(ma)n(y)g(b)r(e)h(included)g
+(in)g(eac)n(h)f(comp)r(onen)n(t,)i(and)e(for)h(V)-9 b(ALARM,)31
+b(the)g(set)g(of)g(prop)r(erties)f(it)h(ma)n(y)f(ha)n(v)n(e)0
+389 y(dep)r(ends)e(on)f(the)h(v)-5 b(alue)28 b(of)f(the)h(A)n(CTION)f
+(prop)r(ert)n(y)-7 b(.)0 545 y(F)g(or)19 b(instance,)j(if)e(a)g(V)-9
+b(ALARM)20 b(comp)r(onen)n(t)g(has)f(an)h(A)n(CTION)g(prop)r(ert)n(y)e
+(with)j(the)f(v)-5 b(alue)20 b(of)g("A)n(UDIO,")f(the)h(comp)r(onen)n
+(t)0 659 y(m)n(ust)h(also)g(ha)n(v)n(e)f(an)h("A)-7 b(TT)g(A)n(CH")21
+b(prop)r(ert)n(y)-7 b(.)34 b(Ho)n(w)n(ev)n(er,)20 b(if)i(the)g(A)n
+(CTION)f(v)-5 b(alue)21 b(is)g("DISPLA)-7 b(Y,")22 b(the)g(comp)r(onen)
+n(t)f(m)n(ust)0 772 y(ha)n(v)n(e)26 b(a)i(DESCRIPTION)g(prop)r(ert)n(y)
+-7 b(.)0 929 y(T)g(o)28 b(handle)g(these)g(v)-5 b(arious,)27
+b(complex)h(restrictions,)f(libical)h(has)g(pseudo)g(comp)r(onen)n(ts)f
+(for)h(eac)n(h)f(t)n(yp)r(e)i(of)f(alarm:)37 b(XA)n(U-)0
+1043 y(DIO)n(ALARM,)28 b(XDISPLA)-7 b(Y)g(ALARM,)30 b(XEMAILALARM)f
+(and)f(XPR)n(OCEDUREALARM.)0 1334 y Fb(4.2)112 b(Com)m(bined)37
+b(V)-9 b(alues)0 1544 y Ff(Man)n(y)34 b(v)-5 b(alues)34
+b(can)g(tak)n(e)g(more)g(than)g(one)h(t)n(yp)r(e.)58
+b(TRIGGER,)35 b(for)f(instance,)i(can)e(ha)n(v)n(e)g(a)g(v)-5
+b(alue)34 b(t)n(yp)r(e)h(of)g(with)g(DU-)0 1658 y(RA)-7
+b(TION)32 b(or)f(of)h(D)n(A)-7 b(TE-TIME.)33 b(These)f(m)n(ultiple)g(t)
+n(yp)r(es)g(mak)n(e)f(it)i(di\036cult)g(to)e(create)g(routines)h(to)f
+(return)h(the)g(v)-5 b(alue)0 1771 y(asso)r(ciated)26
+b(with)i(a)f(prop)r(ert)n(y)-7 b(.)0 1928 y(It)30 b(is)g(natural)g(to)f
+(ha)n(v)n(e)g(in)n(terfaces)g(that)i(w)n(ould)e(return)h(the)g(v)-5
+b(alue)30 b(of)g(a)g(prop)r(ert)n(y)-7 b(,)29 b(but)i(it)f(is)g(cum)n
+(b)r(ersone)f(for)h(a)g(single)0 2041 y(routine)i(to)g(return)g(m)n
+(ultiple)h(t)n(yp)r(es.)51 b(So,)33 b(in)g(libical,)g(prop)r(erties)e
+(that)i(can)f(ha)n(v)n(e)f(m)n(ultiple)i(t)n(yp)r(es)f(are)f(giv)n(en)h
+(a)g(single)0 2155 y(t)n(yp)r(e)26 b(that)g(is)g(the)g(union)g(of)g
+(their)g(RF)n(C2445)e(t)n(yp)r(es.)36 b(F)-7 b(or)26
+b(instance,)g(in)g(libical,)g(the)g(v)-5 b(alue)26 b(of)g(the)g
+(TRIGGER)h(prop)r(ert)n(y)0 2268 y(resolv)n(es)e(to)j(struct)f
+(icaltriggert)n(yp)r(e.)35 b(This)28 b(t)n(yp)r(e)f(is)h(a)f(union)h
+(of)f(a)g(DURA)-7 b(TION)29 b(and)e(a)g(D)n(A)-7 b(TE-TIME.)0
+2560 y Fb(4.3)112 b(Multi-V)-9 b(alued)36 b(Prop)s(erties)0
+2770 y Ff(Some)31 b(prop)r(erties,)h(suc)n(h)f(as)g(CA)-7
+b(TEGORIES)33 b(ha)n(v)n(e)d(only)h(one)g(v)-5 b(alue)32
+b(t)n(yp)r(e,)h(but)f(eac)n(h)e(CA)-7 b(TEGORIES)33 b(prop)r(ert)n(y)d
+(can)0 2884 y(ha)n(v)n(e)24 b(m)n(ultiple)h(v)-5 b(alue)25
+b(instances.)35 b(This)25 b(also)f(results)g(in)h(a)g(cum)n(b)r(ersome)
+f(in)n(terface)g(\025)g(CA)-7 b(TEGORIES)26 b(accessors)d(w)n(ould)0
+2997 y(ha)n(v)n(e)k(to)i(return)f(a)g(list)g(while)h(all)f(other)g
+(accessors)e(returned)i(a)g(single)g(v)-5 b(alue.)39
+b(In)29 b(libical,)g(all)f(prop)r(erties)f(ha)n(v)n(e)h(a)g(single)0
+3111 y(v)-5 b(alue,)35 b(and)e(m)n(ulti-v)-5 b(alued)33
+b(prop)r(erties)f(are)h(brok)n(en)f(do)n(wn)g(in)n(to)h(m)n(ultiple)h
+(single)f(v)-5 b(alued)33 b(prop)r(erties)g(during)f(parsing.)0
+3224 y(That)c(is,)f(an)g(input)i(line)e(lik)n(e,)0 3464
+y Fc(CATEGORIES:)39 b(work,)i(home)0 3703 y Ff(b)r(ecomes)27
b(in)h(libical's)f(in)n(ternal)g(represen)n(tation)0
-1566 y Fd(CATEGORIES:)39 b(work)0 1680 y(CATEGORIES:)g(home)0
-2002 y Fh(Oddly)-7 b(,)34 b(RF)n(C2445)d(allo)n(ws)g(some)h(m)n(ulti-v)
+3943 y Fc(CATEGORIES:)39 b(work)0 4056 y(CATEGORIES:)g(home)0
+4296 y Ff(Oddly)-7 b(,)34 b(RF)n(C2445)d(allo)n(ws)g(some)h(m)n(ulti-v)
-5 b(alued)33 b(prop)r(erties)f(\()h(lik)n(e)g(FREEBUSY)h(\))f(to)g
-(exist)g(as)f(b)r(oth)h(a)f(m)n(ulti-v)-5 b(alues)0 2116
+(exist)g(as)f(b)r(oth)h(a)f(m)n(ulti-v)-5 b(alues)0 4409
y(prop)r(ert)n(y)24 b(and)h(as)f(m)n(ultiple)h(single)g(v)-5
b(alue)24 b(prop)r(erties,)h(while)g(others)f(\()i(lik)n(e)e(CA)-7
b(TEGORIES)26 b(\))f(can)g(only)g(exist)f(as)h(single)0
-2229 y(m)n(ulti-v)-5 b(alued)32 b(prop)r(erties.)48 b(This)31
+4523 y(m)n(ulti-v)-5 b(alued)32 b(prop)r(erties.)48 b(This)31
b(mak)n(es)g(the)h(in)n(ternal)f(represen)n(tation)e(for)i(CA)-7
b(TEGORIES)33 b(illegal.)48 b(Ho)n(w)n(ev)n(er)30 b(when)0
-2343 y(y)n(ou)d(con)n(v)n(ert)f(a)h(comp)r(onen)n(t)g(to)h(a)f(string,)
+4637 y(y)n(ou)d(con)n(v)n(ert)f(a)h(comp)r(onen)n(t)g(to)h(a)f(string,)
g(the)h(library)e(will)i(collect)f(all)g(of)h(the)g(CA)-7
-b(TEGORIES)28 b(prop)r(erties)f(in)n(to)g(one.)0 2676
-y Fe(5)131 b(Implemen)l(tation)44 b(Limitations)0 2971
-y(6)131 b(Using)44 b(libical)0 3229 y Fc(6.1)112 b(Creating)37
-b(Comp)s(onen)m(ts)0 3439 y Fh(There)e(are)g(three)h(w)n(a)n(ys)e(to)i
-(create)e(comp)r(onen)n(ts)i(in)g(Libical:)53 b(creating)34
-b(individual)i(ob)5 b(jects)35 b(and)h(assem)n(bling)e(them,)0
-3553 y(building)28 b(en)n(tire)f(ob)5 b(jects)27 b(in)h(massiv)n(e)e(v)
--5 b(aargs)26 b(calls,)h(and)g(parsing)f(a)h(text)h(\034le)g(con)n
-(taining)e(iCalendar)h(data.)0 3820 y Fb(6.1.1)94 b(Constructor)32
-b(In)m(terfaces)0 4030 y Fh(Using)d(constructor)f(in)n(terfaces,)h(y)n
-(ou)f(create)h(eac)n(h)f(of)i(the)f(ob)5 b(jects)29 b(sep)r(erately)g
-(and)g(them)h(assem)n(ble)e(them)i(in)g(to)f(com-)0 4143
-y(p)r(onen)n(ts:)p 0 4201 3900 4 v 0 4346 a Fd(icalcomponent)38
-b(*event;)0 4460 y(icalproperty)g(*prop;)0 4574 y(icalparameter)g
-(*param;)0 4687 y(struct)j(icaltimetype)e(atime;)0 4801
-y(event)i(=)j(icalcomponent_n)o(ew)o(\(IC)o(AL)o(_V)o(EVE)o(NT)o(_C)o
-(OMP)o(ON)o(EN)o(T\);)0 4914 y(prop)e(=)h(icalproperty_new)o(_d)o(tst)o
-(am)o(p\()o(ati)o(me)o(\))37 b(;)0 5028 y(icalcomponent_ad)o(d_)o(pro)o
-(pe)o(rt)o(y\(e)o(ve)o(nt)o(,)h(prop\);)0 5141 y(prop)k(=)h
-(icalproperty_new)o(_u)o(id\()o(st)o(rd)o(up\()o("g)o(ui)o(d-1)o(.h)o
-(os)o(t1.)o(co)o(m"\))o(\))37 b(\);)0 5255 y(icalcomponent_ad)o(d_)o
-(pro)o(pe)o(rt)o(y\(e)o(ve)o(nt)o(,pr)o(op)o(\);)0 5369
-y(prop=icalpropert)o(y_)o(new)o(_o)o(rg)o(ani)o(ze)o(r\()o(str)o(du)o
-(p\()o("mr)o(bi)o(g@)o(hos)o(t.)o(com)o("\))o(\);)0 5482
-y(param)k(=)j(icalparameter_n)o(ew)o(_ro)o(le)o(\(I)o(CAL)o(_R)o(OL)o
-(E_C)o(HA)o(IR)o(\))0 5596 y(icalproperty_add)o(_p)o(ara)o(me)o(te)o
-(r\(p)o(ro)o(p,)37 b(param\);)0 5709 y(icalcomponent_ad)o(d_)o(pro)o
-(pe)o(rt)o(y\(e)o(ve)o(nt)o(,pr)o(op)o(\);)p eop
-%%Page: 5 5
-5 4 bop 0 -167 3900 5 v 0 -200 a Fb(6.)73 b(Using)32
-b(libical)3190 b Fh(5)p 0 162 3900 4 v 0 312 a(While)31
-b(w)n(e)g(are)f(on)h(this)g(example,)g(y)n(ou)g(should)f(notice)h(that)
-g(libical)g(uses)g(a)f(semi-ob)5 b(ject-orien)n(ted)29
-b(st)n(yle)i(of)g(in)n(terface.)0 425 y(Most)23 b(things)h(y)n(ou)f(w)n
-(ork)g(with)h(are)f(ob)5 b(jects,)24 b(that)g(are)f(instan)n(tiated)g
-(with)h(a)g(constructor)e(that)i(has)f("new")g(in)h(the)g(name.)0
-539 y(Also)h(note)h(that,)g(other)f(than)h(the)g(ob)5
-b(ject)26 b(reference,)f(most)g(structure)g(data)g(is)h(passed)f(in)h
-(to)f(libical)h(routines)f(b)n(y)g(v)-5 b(alue.)0 652
-y(Strings,)24 b(of)g(course,)f(are)g(passed)g(in)h(b)n(y)g(reference,)f
-(but)i(libical)f(will)g(tak)n(e)f(o)n(wnership)f(of)i(the)g(memory)-7
-b(,)24 b(so)f(y)n(ou)g(had)h(b)r(eter)0 766 y(strdup\(\))30
-b(the)f(data)g(unless)g(y)n(ou)f(w)n(an)n(t)h(a)f(core)g(dump)i(when)f
-(the)h(memory)e(is)h(freed)g(for)g(the)g(second)g(time.)42
-b(Libical)29 b(has)0 879 y(some)e(complex)g(but)h(v)n(ery)f(regular)e
-(memory)i(handling)g(rules.)37 b(These)27 b(are)f(detailed)i(in)g
-(section)f(6.4)g(\(\).)0 1036 y(If)33 b(an)n(y)e(of)h(the)h
+b(TEGORIES)28 b(prop)r(erties)f(in)n(to)g(one.)p eop
+%%Page: 7 7
+7 6 bop 0 -167 3900 5 v 0 -200 a Fd(5.)73 b(Implemen)m(tation)29
+b(Limitations)2539 b Ff(7)0 162 y Fe(5)131 b(Implemen)l(tation)44
+b(Limitations)0 457 y(6)131 b(Using)44 b(libical)0 715
+y Fb(6.1)112 b(Creating)37 b(Comp)s(onen)m(ts)0 925 y
+Ff(There)e(are)g(three)h(w)n(a)n(ys)e(to)i(create)e(comp)r(onen)n(ts)i
+(in)g(Libical:)53 b(creating)34 b(individual)i(ob)5 b(jects)35
+b(and)h(assem)n(bling)e(them,)0 1038 y(building)28 b(en)n(tire)f(ob)5
+b(jects)27 b(in)h(massiv)n(e)e(v)-5 b(aargs)26 b(calls,)h(and)g
+(parsing)f(a)h(text)h(\034le)g(con)n(taining)e(iCalendar)h(data.)0
+1311 y Fd(6.1.1)94 b(Constructor)32 b(In)m(terfaces)0
+1521 y Ff(Using)d(constructor)f(in)n(terfaces,)h(y)n(ou)f(create)h(eac)
+n(h)f(of)i(the)f(ob)5 b(jects)29 b(sep)r(erately)g(and)g(them)h(assem)n
+(ble)e(them)i(in)g(to)f(com-)0 1635 y(p)r(onen)n(ts:)p
+0 1704 3900 4 v 0 1881 a Fc(icalcomponent)38 b(*event;)0
+1994 y(icalproperty)g(*prop;)0 2108 y(icalparameter)g(*param;)0
+2221 y(struct)j(icaltimetype)e(atime;)0 2335 y(event)i(=)j
+(icalcomponent_n)o(ew)o(\(IC)o(AL)o(_V)o(EVE)o(NT)o(_C)o(OMP)o(ON)o(EN)
+o(T\);)0 2448 y(prop)e(=)h(icalproperty_new)o(_d)o(tst)o(am)o(p\()o
+(ati)o(me)o(\))37 b(;)0 2562 y(icalcomponent_ad)o(d_)o(pro)o(pe)o(rt)o
+(y\(e)o(ve)o(nt)o(,)h(prop\);)0 2676 y(prop)k(=)h(icalproperty_new)o
+(_u)o(id\()o(st)o(rd)o(up\()o(gu)o(id)o(-1.)o(ho)o(st)o(1.c)o(om)o
+(\)\))37 b(\);)0 2789 y(icalcomponent_ad)o(d_)o(pro)o(pe)o(rt)o(y\(e)o
+(ve)o(nt)o(,pr)o(op)o(\);)0 2903 y(prop=icalpropert)o(y_)o(new)o(_o)o
+(rg)o(ani)o(ze)o(r\()o(str)o(du)o(p\()o(mrb)o(ig)o(@h)o(ost)o(.c)o
+(om\))o(\);)0 3016 y(param)k(=)j(icalparameter_n)o(ew)o(_ro)o(le)o(\(I)
+o(CAL)o(_R)o(OL)o(E_C)o(HA)o(IR)o(\))0 3130 y(icalproperty_add)o(_p)o
+(ara)o(me)o(te)o(r\(p)o(ro)o(p,)37 b(param\);)0 3243
+y(icalcomponent_ad)o(d_)o(pro)o(pe)o(rt)o(y\(e)o(ve)o(nt)o(,pr)o(op)o
+(\);)p 0 3348 V 0 3498 a Ff(While)31 b(w)n(e)g(are)f(on)h(this)g
+(example,)g(y)n(ou)g(should)f(notice)h(that)g(libical)g(uses)g(a)f
+(semi-ob)5 b(ject-orien)n(ted)29 b(st)n(yle)i(of)g(in)n(terface.)0
+3612 y(Most)23 b(things)h(y)n(ou)f(w)n(ork)g(with)h(are)f(ob)5
+b(jects,)24 b(that)g(are)f(instan)n(tiated)g(with)h(a)g(constructor)e
+(that)i(has)f("new")g(in)h(the)g(name.)0 3725 y(Also)h(note)h(that,)g
+(other)f(than)h(the)g(ob)5 b(ject)26 b(reference,)f(most)g(structure)g
+(data)g(is)h(passed)f(in)h(to)f(libical)h(routines)f(b)n(y)g(v)-5
+b(alue.)0 3839 y(Strings,)24 b(of)g(course,)f(are)g(passed)g(in)h(b)n
+(y)g(reference,)f(but)i(libical)f(will)g(tak)n(e)f(o)n(wnership)f(of)i
+(the)g(memory)-7 b(,)24 b(so)f(y)n(ou)g(had)h(b)r(eter)0
+3952 y(strdup\(\))30 b(the)f(data)g(unless)g(y)n(ou)f(w)n(an)n(t)h(a)f
+(core)g(dump)i(when)f(the)h(memory)e(is)h(freed)g(for)g(the)g(second)g
+(time.)42 b(Libical)29 b(has)0 4066 y(some)e(complex)g(but)h(v)n(ery)f
+(regular)e(memory)i(handling)g(rules.)37 b(These)27 b(are)f(detailed)i
+(in)g(section)f(6.5)g(\(\).)0 4222 y(If)33 b(an)n(y)e(of)h(the)h
(constructors)d(fail,)k(they)f(will)f(return)g(0.)50
b(If)33 b(y)n(ou)f(try)g(to)g(insert)g(0)f(in)n(to)h(a)g(prop)r(ert)n
-(y)f(or)h(comp)r(onen)n(t,)h(or)0 1149 y(use)j(a)g(zero-v)-5
+(y)f(or)h(comp)r(onen)n(t,)h(or)0 4336 y(use)j(a)g(zero-v)-5
b(alued)34 b(ob)5 b(ject)36 b(reference,)h(libical)f(will)h(either)f
(silen)n(tly)f(ignore)g(the)i(error)d(or)h(will)h(ab)r(ort)g(with)g(an)
-g(error)0 1263 y(message.)61 b(This)36 b(b)r(eha)n(vior)e(is)i(con)n
+g(error)0 4450 y(message.)61 b(This)36 b(b)r(eha)n(vior)e(is)i(con)n
(trolled)f(b)n(y)g(a)h(compile)g(time)g(\035ag)f(\(ICAL_ERR)n
-(ORS_ARE_F)-9 b(A)i(T)g(AL\),)37 b(and)f(will)0 1377
-y(ab)r(ort)27 b(b)n(y)g(default.)0 1649 y Fb(6.1.2)94
-b(v)-5 b(aargs)32 b(Constructors)0 1859 y Fh(There)24
+(ORS_ARE_F)-9 b(A)i(T)g(AL\),)37 b(and)f(will)0 4563
+y(ab)r(ort)27 b(b)n(y)g(default.)0 4836 y Fd(6.1.2)94
+b(v)-5 b(aargs)32 b(Constructors)0 5046 y Ff(There)24
b(is)h(another)f(w)n(a)n(y)g(to)h(create)f(complex)g(comp)r(onen)n(ts,)
h(whic)n(h)g(is)g(arguable)e(more)h(elegan)n(t,)h(if)g(y)n(ou)f(are)g
-(not)h(horri\034ed)0 1973 y(b)n(y)f(v)-5 b(arargs.)33
+(not)h(horri\034ed)0 5159 y(b)n(y)f(v)-5 b(arargs.)33
b(The)24 b(v)-5 b(arargs)22 b(constructor)g(in)n(terface)i(all)g(y)n
(ou)f(to)h(create)f(in)n(tricate)h(comp)r(onen)n(ts)f(in)i(a)e(single)h
-(blo)r(c)n(k)g(of)g(text.)p 0 2042 V 174 2219 a Fd(calendar)40
-b(=)349 2332 y(icalcomponent_v)o(an)o(ew\()523 2446 y(ICAL_VCALENDAR_C)
-o(OM)o(PO)o(NEN)o(T,)523 2560 y(icalproperty_new)o(_v)o(er)o(sio)o(n\()
-o(st)o(rdu)o(p\()o("2)o(.0")o(\)\))o(,)523 2673 y(icalproperty_new)o
-(_p)o(ro)o(did)o(\(s)o(tr)o(dup)o(\(")o(-/)o(/RD)o(U)d
-(Software//NONSGML)g(HandCal//EN"\)\),)523 2787 y(icalcomponent_va)o
-(ne)o(w\()697 2900 y(ICAL_VEVENT_COMP)o(ONE)o(NT)o(,)697
-3014 y(icalproperty_new)o(_dt)o(st)o(am)o(p\(a)o(ti)o(me)o(\),)697
-3127 y(icalproperty_new)o(_ui)o(d\()o(st)o(rdu)o(p\()o("g)o(uid)o(-1)o
-(.ho)o(st)o(1.)o(com)o("\))o(\),)697 3241 y(icalproperty_van)o(ew_)o
-(or)o(ga)o(niz)o(er)o(\()872 3355 y(strdup\("mrbig@h)o(os)o(t.)o(com)o
-("\))o(,)872 3468 y(icalparameter_n)o(ew)o(_r)o(ole)o(\(I)o(CA)o(L_R)o
-(OL)o(E_C)o(HA)o(IR)o(\),)872 3582 y(0)872 3695 y(\),)697
-3809 y(icalproperty_van)o(ew_)o(at)o(te)o(nde)o(e\()872
-3922 y(strdup\("employe)o(e-)o(A@)o(hos)o(t.)o(co)o(m"\))o(,)872
-4036 y(icalparameter_n)o(ew)o(_r)o(ole)o(\(I)o(CA)o(L_R)o(OL)o(E_R)o
-(EQ)o(PA)o(RTI)o(CI)o(PA)o(NT\))o(,)872 4150 y(icalparameter_n)o(ew)o
-(_r)o(svp)o(\(1)o(\),)872 4263 y(icalparameter_n)o(ew)o(_c)o(uty)o(pe)o
-(\(I)o(CAL)o(_C)o(UTY)o(PE)o(_G)o(ROU)o(P\))o(,)872 4377
-y(0)872 4490 y(\),)697 4604 y(icalproperty_new)o(_lo)o(ca)o(ti)o(on\()o
-(st)o(rd)o(up\()o("1)o(CP)g(Conference)i(Room)j(4350"\)\),)697
-4717 y(0)697 4831 y(\),)523 4945 y(0)523 5058 y(\);)p
-0 5258 V 0 5408 a Fh(This)23 b(form)g(is)h(similar)e(to)i(the)f
-(regular)f(constructor,)h(except)g(that)h(they)f(ha)n(v)n(e)g("v)-5
-b(anew")22 b(instead)h(of)g("new")g(in)g(the)h(name.)0
-5522 y(The)32 b(argumen)n(ts)f(are)g(similar)g(to)r(o,)j(except)e(that)
-g(the)h(comp)r(onen)n(t)e(con)n(tstructor)g(can)h(ha)n(v)n(e)f(a)g
-(list)i(of)f(prop)r(erties,)g(and)0 5635 y(the)f(prop)r(ert)n(y)f
-(constructor)f(can)h(ha)n(v)n(e)f(a)i(list)g(or)f(parameters.)44
-b(Be)30 b(sure)g(to)h(terminate)g(ev)n(ery)e(list)i(with)g(a)f('0',)i
-(or)d(y)n(our)0 5749 y(co)r(de)e(will)h(crash,)f(if)h(y)n(ou)e(are)h
-(luc)n(ky)-7 b(.)p eop
-%%Page: 6 6
-6 5 bop 0 -167 3900 5 v 0 -200 a Fb(6.)73 b(Using)32
-b(libical)3190 b Fh(6)0 162 y Fb(6.1.3)94 b(P)m(arsing)32
-b(T)-8 b(ext)32 b(Files)0 372 y Fh(The)g(\034nal)g(w)n(a)n(y)f(to)h
-(create)f(comp)r(onen)n(ts)h(will)g(probably)f(b)r(e)h(the)h(most)f
-(common;)i(y)n(ou)d(can)h(create)f(comp)r(onen)n(ts)g(from)0
-485 y(RF)n(C2445)26 b(complian)n(t)h(text.)37 b(If)28
-b(y)n(ou)f(ha)n(v)n(e)f(the)i(string)f(in)h(memory)-7
-b(,)26 b(use)0 725 y Fd(icalcomponent*)38 b(icalparser_pars)o(e_)o(str)
-o(in)o(g\()o(cha)o(r*)f(str\);)0 1078 y Fh(This)30 b(ma)n(y)f(seem)g(w)
-n(asteful)h(if)g(y)n(ou)f(w)n(an)n(t)g(to)g(pull)i(a)e(large)f(comp)r
-(onen)n(t)i(o\033)f(of)h(the)g(net)n(w)n(ork;)g(y)n(ou)f(ma)n(y)g
-(prefer)g(to)g(parse)0 1191 y(the)f(comp)r(onen)n(t)f(line)h(b)n(y)f
-(line.)37 b(This)28 b(is)f(p)r(ossible)g(to)r(o)h(b)n(y)f(using:)0
-1431 y Fd(icalparser_get_l)o(in)o(e\(p)o(ar)o(se)o(r,r)o(ea)o(d_)o(str)
-o(ea)o(m\))o(;)0 1545 y(icalparser_add_l)o(in)o(e\(p)o(ar)o(se)o(r,l)o
-(in)o(e\))o(;)0 1658 y(icalparser_set_g)o(en)o(_da)o(ta)o(\(p)o(ars)o
-(er)o(,s)o(tre)o(am)o(\))0 2011 y Fh(F)-7 b(or)27 b(an)g(example)g(of)h
-(ho)n(w)f(to)g(use)h(this)f(t)n(yp)r(e)h(of)g(parsing,)e(see)h
-(examples/parse_text.c)e(for)i(an)g(example.)0 2303 y
-Fc(6.2)112 b(A)m(ccessing)37 b(Comp)s(onen)m(ts)0 2513
-y Fh(Giv)n(en)30 b(a)g(reference)f(to)i(a)e(comp)r(onen)n(t,)i(y)n(ou)f
-(probably)f(will)h(w)n(an)n(t)g(to)g(access)f(the)i(prop)r(erties,)f
-(parameters)e(and)j(v)-5 b(alues)0 2626 y(inside.)35
-b(Libical)22 b(in)n(terface)g(let)h(y)n(ou)e(\034nd)i(sub-comp)r(onen)n
-(t,)g(add)f(and)g(remo)n(v)n(e)f(sub-comp)r(onen)n(ts,)h(and)h(do)f
-(the)h(same)e(three)0 2740 y(op)r(erations)26 b(on)h(prop)r(erties.)0
-3013 y Fb(6.2.1)94 b(Finding)30 b(Comp)s(onen)m(ts)0
-3223 y Fh(T)-7 b(o)27 b(\034nd)h(a)f(sub-comp)r(onen)n(t)g(of)h(a)f
-(comp)r(onen)n(t,)g(use:)0 3462 y Fd(icalproperty*)38
-b(icalcomponent_ge)o(t_)o(fir)o(st)o(_c)o(omp)o(on)o(en)o(t\()1482
-3576 y(icalcomponent*)f(component,)1482 3689 y(icalcomponent_k)o(in)o
-(d)h(kind\);)0 4042 y Fh(This)27 b(routine)g(will)h(return)f(a)g
-(reference)g(to)g(the)h(\034rst)f(comp)r(onen)n(t)g(of)h(the)f(t)n(yp)r
-(e)h('kind.')37 b(The)28 b(k)n(ey)e(kind)i(v)-5 b(alues,)27
-b(listed)h(in)0 4156 y(icalen)n(ums.h)f(are:)p 0 4209
-3900 4 v 0 4386 a Fd(ICAL_ANY_COMPONE)o(NT)0 4499 y(ICAL_VEVENT_COMP)o
-(ON)o(ENT)0 4613 y(ICAL_VTODO_COMPO)o(NE)o(NT)0 4726
-y(ICAL_VJOURNAL_CO)o(MP)o(ONE)o(NT)0 4840 y(ICAL_VCALENDAR_C)o(OM)o
-(PON)o(EN)o(T)0 4954 y(ICAL_VFREEBUSY_C)o(OM)o(PON)o(EN)o(T)0
-5067 y(ICAL_VALARM_COMP)o(ON)o(ENT)p 0 5267 V 0 5417
-a Fh(These)g(are)g(only)g(the)h(most)f(common)g(comp)r(onen)n(ts;)g
-(there)h(are)e(man)n(y)h(more)g(listed)h(in)g(icalen)n(ums.h.)0
-5573 y(As)h(y)n(ou)f(migh)n(t)h(guess,)g(if)g(there)g(is)g(more)f(than)
-h(one)f(sub)r(comp)r(onen)n(t)h(of)g(the)h(t)n(yp)r(e)f(y)n(ou)f(ha)n
-(v)n(e)g(c)n(hosen,)g(this)h(routine)g(will)0 5687 y(return)e(only)g
-(the)h(\034rst.)37 b(to)27 b(get)h(at)f(the)h(others,)f(y)n(ou)f(need)i
-(to)g(iterate)f(through)f(the)i(comp)r(onen)n(t.)p eop
-%%Page: 7 7
-7 6 bop 0 -167 3900 5 v 0 -200 a Fb(6.)73 b(Using)32
-b(libical)3190 b Fh(7)0 162 y Fb(6.2.2)94 b(In)m(terating)32
-b(Through)g(Comp)s(onen)m(ts)0 372 y Fh(Iteration)27
-b(requires)f(a)h(second)g(routine)g(to)h(get)f(the)h(next)g(sub)r(comp)
-r(onen)n(t)f(after)g(the)h(\034rst:)0 611 y Fd(icalcomponent*)38
-b(icalcomponent_g)o(et)o(_ne)o(xt)o(_c)o(omp)o(on)o(en)o(t\(i)o(ca)o
-(lco)o(mp)o(on)o(ent)o(*)f(component,)0 725 y(icalcomponent_ki)o(nd)g
-(kind\);)0 1078 y Fh(With)25 b(the)g('\034rst')f(and)g('next')h
-(routines,)g(y)n(ou)e(can)h(create)g(a)g(for)f(lo)r(op)h(to)h(iterate)f
-(through)f(all)h(of)h(a)f(comp)r(onen)n(ts)g(sub)r(com-)0
-1191 y(p)r(onen)n(ts)p 0 1261 3900 4 v 87 1444 a Fd(for\(c)42
-b(=)h(icalcomponent_g)o(et_)o(fi)o(rs)o(t_c)o(om)o(po)o(nen)o(t\()o(co)
-o(mp,)o(IC)o(AL_)o(AN)o(Y_)o(COM)o(PO)o(NE)o(NT\))o(;)392
-1558 y(c)g(!=)g(0;)392 1671 y(c)g(=)g(icalcomponent_get)o(_n)o(ext)o
-(_c)o(om)o(pon)o(en)o(t\()o(com)o(p,)o(ICA)o(L_)o(AN)o(Y_C)o(OM)o(PO)o
-(NEN)o(T\))o(\))0 1785 y({)261 1899 y(do_something\(c\);)0
-2012 y(})p 0 2212 V 0 2362 a Fh(This)32 b(co)r(de)f(bit)h(wil)g
-(iterate)g(through)f(all)g(of)h(the)g(sub)r(comp)r(onen)n(ts)f(in)h
-('comp')g(but)g(y)n(ou)f(can)g(select)h(a)f(sp)r(eci\034c)h(t)n(yp)r(e)
-g(of)0 2476 y(comp)r(onen)n(t)27 b(b)n(y)h(c)n(hanging)e
-(ICAL_ANY_COMPONENT)i(to)f(another)g(comp)r(onen)n(t)g(t)n(yp)r(e.)0
-2748 y Fb(6.2.3)94 b(Remo)m(ving)29 b(Comp)s(onen)m(ts)0
-2958 y Fh(Libical)h(comp)r(onen)n(t)g(ha)n(v)n(e)f(in)n(ternal)h
+(blo)r(c)n(k)g(of)g(text.)174 5399 y Fc(calendar)40 b(=)p
+eop
+%%Page: 8 8
+8 7 bop 0 -167 3900 5 v 0 -200 a Fd(6.)73 b(Using)32
+b(libical)3190 b Ff(8)349 162 y Fc(icalcomponent_v)o(an)o(ew\()523
+275 y(ICAL_VCALENDAR_C)o(OM)o(PO)o(NEN)o(T,)523 389 y(icalproperty_new)
+o(_v)o(er)o(sio)o(n\()o(st)o(rdu)o(p\()o(2.)o(0\)\))o(,)523
+502 y(icalproperty_new)o(_p)o(ro)o(did)o(\(s)o(tr)o(dup)o(\()741
+616 y(-//RDU)41 b(Software//NONSG)o(ML)c(HandCal//EN\)\),)523
+730 y(icalcomponent_va)o(ne)o(w\()697 843 y(ICAL_VEVENT_COMP)o(ONE)o
+(NT)o(,)697 957 y(icalproperty_new)o(_dt)o(st)o(am)o(p\(a)o(ti)o(me)o
+(\),)697 1070 y(icalproperty_new)o(_ui)o(d\()o(st)o(rdu)o(p\()o(gu)o
+(id-)o(1.)o(hos)o(t1)o(.c)o(om\))o(\),)697 1184 y(icalproperty_van)o
+(ew_)o(or)o(ga)o(niz)o(er)o(\()872 1297 y(strdup\(mrbig@ho)o(st)o(.c)o
+(om\))o(,)872 1411 y(icalparameter_n)o(ew)o(_r)o(ole)o(\(I)o(CA)o(L_R)o
+(OL)o(E_C)o(HA)o(IR)o(\),)872 1525 y(0)872 1638 y(\),)697
+1752 y(icalproperty_van)o(ew_)o(at)o(te)o(nde)o(e\()872
+1865 y(strdup\(employee)o(-A)o(@h)o(ost)o(.c)o(om)o(\),)872
+1979 y(icalparameter_n)o(ew)o(_r)o(ole)o(\()1046 2092
+y(ICAL_ROLE_REQPA)o(RTI)o(CI)o(PA)o(NT\))o(,)872 2206
+y(icalparameter_n)o(ew)o(_r)o(svp)o(\(1)o(\),)872 2320
+y(icalparameter_n)o(ew)o(_c)o(uty)o(pe)o(\(I)o(CAL)o(_C)o(UTY)o(PE)o
+(_G)o(ROU)o(P\))o(,)872 2433 y(0)872 2547 y(\),)697 2660
+y(icalproperty_new)o(_lo)o(ca)o(ti)o(on\()o(st)o(rd)o(up\()828
+2774 y(1CP)42 b(Conference)e(Room)h(4350\)\),)697 2887
+y(0)697 3001 y(\),)523 3115 y(0)523 3228 y(\);)0 3454
+y Ff(This)23 b(form)g(is)h(similar)e(to)i(the)f(regular)f(constructor,)
+h(except)g(that)h(they)f(ha)n(v)n(e)g("v)-5 b(anew")22
+b(instead)h(of)g("new")g(in)g(the)h(name.)0 3568 y(The)32
+b(argumen)n(ts)f(are)g(similar)g(to)r(o,)j(except)e(that)g(the)h(comp)r
+(onen)n(t)e(con)n(tstructor)g(can)h(ha)n(v)n(e)f(a)g(list)i(of)f(prop)r
+(erties,)g(and)0 3681 y(the)f(prop)r(ert)n(y)f(constructor)f(can)h(ha)n
+(v)n(e)f(a)i(list)g(or)f(parameters.)44 b(Be)30 b(sure)g(to)h
+(terminate)g(ev)n(ery)e(list)i(with)g(a)f('0',)i(or)d(y)n(our)0
+3795 y(co)r(de)e(will)h(crash,)f(if)h(y)n(ou)e(are)h(luc)n(ky)-7
+b(.)0 4065 y Fd(6.1.3)94 b(P)m(arsing)32 b(T)-8 b(ext)32
+b(Files)0 4275 y Ff(The)g(\034nal)g(w)n(a)n(y)f(to)h(create)f(comp)r
+(onen)n(ts)h(will)g(probably)f(b)r(e)h(the)h(most)f(common;)i(y)n(ou)d
+(can)h(create)f(comp)r(onen)n(ts)g(from)0 4389 y(RF)n(C2445)26
+b(complian)n(t)h(text.)37 b(If)28 b(y)n(ou)f(ha)n(v)n(e)f(the)i(string)
+f(in)h(memory)-7 b(,)26 b(use)0 4615 y Fc(icalcomponent*)38
+b(icalparser_pars)o(e_)o(str)o(in)o(g\()o(cha)o(r*)f(str\);)0
+4841 y Ff(This)30 b(ma)n(y)f(seem)g(w)n(asteful)h(if)g(y)n(ou)f(w)n(an)
+n(t)g(to)g(pull)i(a)e(large)f(comp)r(onen)n(t)i(o\033)f(of)h(the)g(net)
+n(w)n(ork;)g(y)n(ou)f(ma)n(y)g(prefer)g(to)g(parse)0
+4954 y(the)f(comp)r(onen)n(t)f(line)h(b)n(y)f(line.)37
+b(This)28 b(is)f(p)r(ossible)g(to)r(o)h(b)n(y)f(using:)0
+5180 y Fc(icalparser*)39 b(icalparser_new\(\))o(;)0 5294
+y(void)j(icalparser_free\()o(ic)o(al)o(par)o(se)o(r*)37
+b(parser\);)0 5407 y(icalparser_get_l)o(in)o(e\(p)o(ar)o(se)o(r,r)o(ea)
+o(d_)o(str)o(ea)o(m\))o(;)p eop
+%%Page: 9 9
+9 8 bop 0 -167 3900 5 v 0 -200 a Fd(6.)73 b(Using)32
+b(libical)3190 b Ff(9)0 162 y Fc(icalparser_add_l)o(in)o(e\(p)o(ar)o
+(se)o(r,l)o(in)o(e\))o(;)0 275 y(icalparser_set_g)o(en)o(_da)o(ta)o
+(\(p)o(ars)o(er)o(,s)o(tre)o(am)o(\))0 515 y Ff(These)21
+b(routines)f(will)i(construct)f(a)f(parser)g(ob)5 b(ject)21
+b(to)g(whic)n(h)g(y)n(ou)g(can)g(add)g(lines)g(of)g(input)h(and)f
+(retriev)n(e)f(an)n(y)h(comp)r(onen)n(ts)0 628 y(that)28
+b(the)g(parser)e(creates)g(from)h(the)h(input.)38 b(F)-7
+b(or)27 b(an)g(example:)0 868 y Fc(char*)41 b(read_stream\(char)c(*s,)
+43 b(size_t)e(size,)g(void)h(*d\))87 1095 y(char)g(*c)h(=)g
+(fgets\(s,size,)38 b(\(FILE*\)d\);)87 1209 y(return)j(c;)0
+1436 y(main\(\))87 1549 y(char*)h(line;)87 1663 y(icalcomponent)c(*c;)
+87 1776 y(icalparser)h(*parser)i(=)i(icalparser_new\(\))o(;)87
+1890 y(FILE*)f(stream)f(=)i(fopen\(argv1,r\);)87 2004
+y(icalparser_set_g)o(en_)o(da)o(ta)o(\(pa)o(rs)o(er)o(,st)o(re)o(am)o
+(\);)87 2117 y(do)174 2231 y(line)f(=)h(icalparser_get_li)o(ne)o(\(p)o
+(ars)o(er)o(,r)o(ead)o(_s)o(tr)o(eam)o(\);)174 2344 y(c)g(=)h
+(icalparser_add_)o(li)o(ne\()o(pa)o(rs)o(er,)o(li)o(ne)o(\);)174
+2458 y(if)f(\(c)g(!=)f(0\))218 2571 y(printf\(s,icalcom)o(po)o(ne)o
+(nt_)o(as)o(_i)o(cal)o(_s)o(tr)o(ing)o(\(c)o(\)\))o(;)218
+2685 y(icalparser_claim)o(\(p)o(ar)o(ser)o(\);)218 2799
+y(printf\(n--------)o(--)o(--)o(---)o(n\))o(;)218 2912
+y(icalcomponent_fr)o(ee)o(\(c)o(\);)131 3139 y(while)f(\()i(line)f(!=)h
+(0\);)0 3379 y Ff(The)48 b(parser)f(ob)5 b(ject)48 b(parameterizes)f
+(the)i(routine)f(used)g(to)g(get)h(input)g(lines)f(with)h
+(icalparser_set_gen_data\(\))0 3492 y(andicalparser_get_line\(\).)81
+b(In)44 b(this)f(example,)k(the)d(routine)f(read_stream\(\))e(will)j
+(fetc)n(h)g(the)f(next)h(line)g(from)e(a)0 3606 y(stream,)51
+b(with)d(the)f(stream)g(passed)f(in)h(as)g(the)g(v)n(oid*)f(parameter)f
+(d.)96 b(The)47 b(parser)f(calls)g(read_stream\(\))f(from)0
+3720 y(icalparser_get_line\(\),)e(but)g(it)g(also)e(needs)h(to)h(kno)n
+(w)e(what)h(stream)g(to)g(use.)81 b(This)42 b(is)h(set)f(b)n(y)g(the)h
+(call)f(to)g(ical-)0 3833 y(parser_set_gen_data\(\).)0
+3990 y(Using)18 b(the)h(same)f(mec)n(hanism,)i(other)e(implmen)n
+(tations)h(could)f(read)g(from)g(memory)g(bu\033ers,)i(so)r(c)n(k)n
+(ets)d(or)h(other)g(in)n(terfaces.)0 4146 y(Since)28
+b(the)g(example)f(co)r(de)g(is)h(a)f(v)n(ery)f(common)h(w)n(a)n(y)f(to)
+i(use)f(the)h(parser,)e(there)i(is)f(a)g(con)n(vienience)g(routine;)0
+4386 y Fc(icalcomponent*)38 b(icalparser_pars)o(e\()o(ica)o(lp)o(ar)o
+(ser)f(*parser,)654 4499 y(char*)k(\(*line_gen_func\))o(\(c)o(har)c
+(*s,)42 b(size_t)f(sise,)85 b(void*)42 b(d\)\))0 4739
+y Ff(T)-7 b(o)36 b(use)h(this)g(routine,)i(y)n(ou)d(still)h(m)n(ust)g
+(construct)f(the)h(parser)f(ob)5 b(ject)36 b(and)h(pass)f(in)h(a)f
+(reference)g(to)h(a)f(line)h(reading)0 4852 y(routine.)50
+b(If)33 b(the)f(parser)f(can)h(create)f(a)h(single)f(comp)r(onen)n(t)h
+(from)g(the)g(input,)i(it)f(will)f(return)g(a)g(p)r(oin)n(ter)g(to)g
+(the)g(newly)0 4966 y(constructed)j(comp)r(onen)n(t.)62
+b(If)36 b(the)g(parser)e(can)i(construct)f(m)n(ultiple)i(cmp)r(onen)n
+(ts)e(from)h(the)g(input,)j(it)d(will)g(return)f(a)0
+5079 y(reference)28 b(to)h(an)g(XR)n(OOT)g(comp)r(onen)n(t)g(\()h(of)f
+(t)n(yp)r(e)g(ICAL_XR)n(OOT_COMPONENT.\))g(This)g(XR)n(OOT)f(comp)r
+(onen)n(t)0 5193 y(will)h(hold)g(all)g(of)g(the)h(comp)r(onen)n(ts)e
+(constructed)h(from)f(the)i(input)g(as)e(c)n(hildren.)41
+b(See)29 b(section)g(6.2.2)f(for)g(ho)n(w)h(to)g(iterate)0
+5306 y(through)e(the)h(c)n(hild)f(comp)r(onen)n(ts.)p
+eop
+%%Page: 10 10
+10 9 bop 0 -167 3900 5 v 0 -200 a Fd(6.)73 b(Using)32
+b(libical)3149 b Ff(10)0 162 y Fb(6.2)112 b(A)m(ccessing)37
+b(Comp)s(onen)m(ts)0 372 y Ff(Giv)n(en)30 b(a)g(reference)f(to)i(a)e
+(comp)r(onen)n(t,)i(y)n(ou)f(probably)f(will)h(w)n(an)n(t)g(to)g
+(access)f(the)i(prop)r(erties,)f(parameters)e(and)j(v)-5
+b(alues)0 485 y(inside.)35 b(Libical)22 b(in)n(terface)g(let)h(y)n(ou)e
+(\034nd)i(sub-comp)r(onen)n(t,)g(add)f(and)g(remo)n(v)n(e)f(sub-comp)r
+(onen)n(ts,)h(and)h(do)f(the)h(same)e(three)0 599 y(op)r(erations)26
+b(on)h(prop)r(erties.)0 866 y Fd(6.2.1)94 b(Finding)30
+b(Comp)s(onen)m(ts)0 1076 y Ff(T)-7 b(o)27 b(\034nd)h(a)f(sub-comp)r
+(onen)n(t)g(of)h(a)f(comp)r(onen)n(t,)g(use:)0 1283 y
+Fc(icalcomponent*)38 b(icalcomponent_g)o(et)o(_fi)o(rs)o(t_)o(com)o(po)
+o(ne)o(nt\()1525 1396 y(icalcomponent*)g(component,)1525
+1510 y(icalcomponent_ki)o(nd)f(kind\);)0 1716 y Ff(This)27
+b(routine)g(will)h(return)f(a)g(reference)g(to)g(the)h(\034rst)f(comp)r
+(onen)n(t)g(of)h(the)f(t)n(yp)r(e)h('kind.')37 b(The)28
+b(k)n(ey)e(kind)i(v)-5 b(alues,)27 b(listed)h(in)0 1830
+y(icalen)n(ums.h)f(are:)0 2037 y Fc(ICAL_ANY_COMPONE)o(NT)0
+2150 y(ICAL_VEVENT_COMP)o(ON)o(ENT)0 2264 y(ICAL_VTODO_COMPO)o(NE)o(NT)
+0 2377 y(ICAL_VJOURNAL_CO)o(MP)o(ONE)o(NT)0 2491 y(ICAL_VCALENDAR_C)o
+(OM)o(PON)o(EN)o(T)0 2605 y(ICAL_VFREEBUSY_C)o(OM)o(PON)o(EN)o(T)0
+2718 y(ICAL_VALARM_COMP)o(ON)o(ENT)0 2925 y Ff(These)g(are)g(only)g
+(the)h(most)f(common)g(comp)r(onen)n(ts;)g(there)h(are)e(man)n(y)h
+(more)g(listed)h(in)g(icalen)n(ums.h.)0 3081 y(As)h(y)n(ou)f(migh)n(t)h
+(guess,)g(if)g(there)g(is)g(more)f(than)h(one)f(sub)r(comp)r(onen)n(t)h
+(of)g(the)h(t)n(yp)r(e)f(y)n(ou)f(ha)n(v)n(e)g(c)n(hosen,)g(this)h
+(routine)g(will)0 3195 y(return)e(only)g(the)h(\034rst.)37
+b(to)27 b(get)h(at)f(the)h(others,)f(y)n(ou)f(need)i(to)g(iterate)f
+(through)f(the)i(comp)r(onen)n(t.)0 3462 y Fd(6.2.2)94
+b(In)m(terating)32 b(Through)g(Comp)s(onen)m(ts)0 3672
+y Ff(Iteration)27 b(requires)f(a)h(second)g(routine)g(to)h(get)f(the)h
+(next)g(sub)r(comp)r(onen)n(t)f(after)g(the)h(\034rst:)0
+3879 y Fc(icalcomponent*)38 b(icalcomponent_g)o(et)o(_ne)o(xt)o(_c)o
+(omp)o(on)o(en)o(t\()654 3992 y(icalcomponent*)f(component,)654
+4106 y(icalcomponent_k)o(in)o(d)h(kind\);)0 4312 y Ff(With)25
+b(the)g('\034rst')f(and)g('next')h(routines,)g(y)n(ou)e(can)h(create)g
+(a)g(for)f(lo)r(op)h(to)h(iterate)f(through)f(all)h(of)h(a)f(comp)r
+(onen)n(ts)g(sub)r(com-)0 4426 y(p)r(onen)n(ts)87 4633
+y Fc(for\(c)42 b(=)h(icalcomponent_g)o(et_)o(fi)o(rs)o(t_c)o(om)o(po)o
+(nen)o(t\()o(co)o(mp,)o(IC)o(AL_)o(AN)o(Y_)o(COM)o(PO)o(NE)o(NT\))o(;)
+392 4746 y(c)g(!=)g(0;)44 4860 y(c)g(=)g(icalcomponent_ge)o(t_)o(ne)o
+(xt_)o(co)o(mp)o(one)o(nt)o(\(c)o(omp)o(,I)o(CA)o(L_A)o(NY)o(_CO)o(MP)o
+(ON)o(ENT)o(\)\))261 5087 y(do_something\(c\);)0 5294
+y Ff(This)32 b(co)r(de)f(bit)h(wil)g(iterate)g(through)f(all)g(of)h
+(the)g(sub)r(comp)r(onen)n(ts)f(in)h('comp')g(but)g(y)n(ou)f(can)g
+(select)h(a)f(sp)r(eci\034c)h(t)n(yp)r(e)g(of)0 5407
+y(comp)r(onen)n(t)27 b(b)n(y)h(c)n(hanging)e(ICAL_ANY_COMPONENT)i(to)f
+(another)g(comp)r(onen)n(t)g(t)n(yp)r(e.)p eop
+%%Page: 11 11
+11 10 bop 0 -167 3900 5 v 0 -200 a Fd(6.)73 b(Using)32
+b(libical)3149 b Ff(11)0 162 y Fd(6.2.3)94 b(Using)31
+b(Comp)s(onen)m(t)f(Iterators)0 372 y Ff(The)h(iteration)f(mo)r(del)h
+(in)h(the)f(previous)f(section)g(requires)g(the)h(comp)r(onen)n(t)g(to)
+g(k)n(eep)f(the)i(state)f(of)g(the)g(iteration.)46 b(So,)0
+485 y(y)n(ou)32 b(could)g(not)h(use)f(this)h(mo)r(del)g(to)f(p)r
+(erform)g(a)g(sorting)f(op)r(erations,)i(since)f(y)n(ou'd)g(need)h(t)n
+(w)n(o)f(iterators)f(and)h(there)g(is)0 599 y(only)25
+b(space)f(for)h(one.)36 b(If)26 b(y)n(ou)e(ev)n(er)g(call)h(icalcomp)r
+(onen)n(t_get_\034rst_comp)r(onen)n(t\(\))e(whic)n(h)i(an)g(iteration)g
+(is)g(in)g(progress,)0 712 y(the)j(p)r(oin)n(ter)f(will)h(b)r(e)g
+(reset)f(to)g(the)h(b)r(eginning.)0 869 y(T)-7 b(o)28
+b(solv)n(e)g(this)h(problem,)g(there)f(are)g(also)g(external)f
+(iterators)h(for)g(comp)r(onen)n(ts.)40 b(The)28 b(routines)g(asso)r
+(ciated)g(with)h(these)0 983 y(external)e(iterators)f(are:)0
+1209 y Fc(icalcompiter)38 b(icalcomponent_beg)o(in)o(_co)o(mp)o(on)o
+(ent)o(\(i)o(ca)o(lco)o(mp)o(one)o(nt)o(*)f(component,)j
+(icalcomponent_k)o(ind)d(kind\);)0 1322 y(icalcompiter)h
+(icalcomponent_end)o(_c)o(omp)o(on)o(en)o(t\(i)o(ca)o(lc)o(omp)o(on)o
+(ent)o(*)f(component,)j(icalcomponent_k)o(in)o(d)e(kind\);)0
+1436 y(icalcomponent*)g(icalcompiter_ne)o(xt)o(\(ic)o(al)o(co)o(mpi)o
+(te)o(r*)f(i\);)0 1550 y(icalcomponent*)h(icalcompiter_pr)o(io)o(r\(i)o
+(ca)o(lc)o(omp)o(it)o(er)o(*)g(i\);)0 1663 y(icalcomponent*)g
+(icalcompiter_de)o(re)o(f\(i)o(ca)o(lc)o(omp)o(it)o(er)o(*)g(i\);)0
+1890 y Ff(The)30 b(_b)r(egin_\(\))g(and)f(_end_\(\))h(routines)g
+(return)f(a)h(new)g(iterator)e(that)i(p)r(oin)n(ts)g(to)g(the)g(b)r
+(egining)g(and)g(ending)g(of)g(the)0 2003 y(list)36 b(of)f(sub)r(comp)r
+(onen)n(t)h(for)f(the)h(giv)n(en)f(comp)r(onen)n(t,)i(and)e(the)h(kind)
+g(argumen)n(t)e(w)n(orks)g(lik)n(e)h(the)h(kind)g(argumen)n(t)f(for)0
+2117 y(in)n(ternal)27 b(iterators.)0 2273 y(After)f(creating)e(an)h
+(iterators,)g(use)g(_next_\(\))g(and)h(_prior_\(\))e(to)h(step)h(forw)n
+(ard)d(and)j(bac)n(kw)n(ard)d(through)i(the)h(list)f(and)0
+2387 y(get)30 b(the)g(comp)r(onen)n(t)g(that)g(the)g(iterator)e(p)r
+(oin)n(ts)i(to,)h(and)e(use)h(_deref\(\))g(to)g(return)f(the)h(comp)r
+(onen)n(t)g(that)g(the)g(iterator)0 2500 y(p)r(oin)n(ts)c(to)g(without)
+h(mo)n(ving)e(the)i(iterator.)35 b(All)27 b(routines)f(will)g(return)g
+(0)g(when)g(they)h(mo)n(v)n(e)e(to)h(p)r(oin)n(t)h(o\033)f(the)h(end)f
+(of)h(the)0 2614 y(list.)0 2770 y(Here)g(is)h(an)f(example)g(of)h(a)f
+(lo)r(op)g(using)g(these)h(routines:)0 2997 y Fc(for\()131
+3110 y(i)43 b(=)g(icalcomponent_be)o(gi)o(n_c)o(om)o(po)o(nen)o(t\()o
+(im)o(pl-)o(cl)o(us)o(ter)o(,I)o(CAL)o(_A)o(NY)o(_CO)o(MP)o(ON)o(ENT)o
+(\);)131 3224 y(icalcompiter_de)o(ref)o(\(i)o(\)!)o(=)38
+b(0;)131 3337 y(icalcompiter_ne)o(xt\()o(i\))0 3451 y(\))261
+3565 y(icalcomponent)h(*this)i(=)i(icalcompiter_der)o(ef)o(\(i\))o(;)0
+3835 y Fd(6.2.4)94 b(Remo)m(ving)29 b(Comp)s(onen)m(ts)0
+4045 y Ff(Libical)h(comp)r(onen)n(t)g(ha)n(v)n(e)f(in)n(ternal)h
(iterators,)f(so)h(y)n(ou)g(can)g(only)g(ha)n(v)n(e)f(one)h(iteration)g
(o)n(v)n(er)e(a)i(comp)r(onen)n(t)g(at)h(a)f(time.)0
-3072 y(Remo)n(ving)23 b(an)h(elemen)n(t)h(from)f(a)g(list)g(while)h
+4159 y(Remo)n(ving)23 b(an)h(elemen)n(t)h(from)f(a)g(list)g(while)h
(iterating)e(through)h(the)h(list)f(can)g(cause)g(problems,)g(since)g
-(y)n(ou)g(will)g(probably)0 3185 y(b)r(e)e(remo)n(ving)e(the)i(elemen)n
-(t)g(that)g(the)g(in)n(ternal)f(iterator)f(p)r(oin)n(ts)i(to.)34
-b(This)22 b(will)g(result)f(in)h(the)g(iteration)f(lo)r(op)h
-(terminating)0 3299 y(immediately)29 b(after)f(remo)n(ving)g(the)h
-(elemen)n(t.)41 b(T)-7 b(o)28 b(a)n(v)n(oid)g(the)h(problem,)f(y)n(ou)h
-(will)g(need)g(to)f(step)h(the)h(iterator)d(ahead)h(of)0
-3413 y(the)g(elemen)n(t)g(y)n(ou)e(are)h(going)f(to)i(remo)n(v)n(e,)e
-(lik)n(e)h(this:)p 0 3482 V 0 3665 a Fd(for\(c)41 b(=)j
-(icalcomponent_g)o(et)o(_fi)o(rs)o(t_)o(com)o(po)o(ne)o(nt\()o(pa)o(re)
-o(nt_)o(co)o(mp,)o(IC)o(AL)o(_AN)o(Y_)o(CO)o(MPO)o(NE)o(NT)o(\);)305
-3779 y(c)f(!=)g(0;)305 3893 y(c)g(=)g(next)0 4006 y({)174
-4120 y(next)f(=)h(icalcomponent_get)o(_n)o(ex)o(t_c)o(om)o(po)o(nen)o
-(t\()o(pa)o(ren)o(t_)o(com)o(p,)o(IC)o(AL_)o(AN)o(Y_)o(COM)o(PO)o(NE)o
-(NT\))o(;)174 4233 y(icalcomponent_rem)o(ov)o(e_)o(com)o(po)o(ne)o
-(nt\()o(pa)o(re)o(nt_)o(co)o(mp)o(,c\))o(;)0 4347 y(})p
-0 4547 V 0 4763 a Fb(6.2.4)94 b(W)-8 b(orking)31 b(with)g(prop)s
-(erties)g(and)h(parameters)0 4973 y Fh(Finding,)g(iterating)f(and)g
-(remo)n(ving)e(prop)r(erties)h(w)n(orks)g(the)h(same)g(as)f(it)i(do)r
-(es)e(for)h(comp)r(onen)n(ts,)g(using)g(the)h(prop)r(ert)n(y-)0
-5087 y(sp)r(eci\034c)c(or)e(parameter-sp)r(eci\034c)g(in)n(terfaces:)0
-5326 y Fd(icalproperty*)38 b(icalcomponent_ge)o(t_)o(fir)o(st)o(_p)o
-(rop)o(er)o(ty)o(\()218 5440 y(icalcomponent*)g(component,)218
-5553 y(icalproperty_kin)o(d)f(kind\);)0 5667 y(icalproperty*)h
-(icalcomponent_ge)o(t_)o(nex)o(t_)o(pr)o(ope)o(rt)o(y\()218
-5780 y(icalcomponent*)g(component,)p eop
-%%Page: 8 8
-8 7 bop 0 -167 3900 5 v 0 -200 a Fb(6.)73 b(Using)32
-b(libical)3190 b Fh(8)218 162 y Fd(icalproperty_kin)o(d)37
-b(kind\);)0 275 y(void)42 b(icalcomponent_ad)o(d_)o(pr)o(ope)o(rt)o
-(y\()218 389 y(icalcomponent*)c(component,)218 502 y(icalproperty*)g
-(property\);)0 616 y(void)k(icalcomponent_re)o(mo)o(ve)o(_pr)o(op)o(er)
-o(ty\()218 730 y(icalcomponent*)c(component,)218 843
-y(icalproperty*)g(property\);)0 957 y(icalparameter*)g(icalproperty_ge)
-o(t_)o(fir)o(st)o(_p)o(ara)o(me)o(te)o(r\()218 1070 y(icalproperty*)g
-(prop,)218 1184 y(icalparameter_ki)o(nd)f(kind\);)0 1297
-y(icalparameter*)h(icalproperty_ge)o(t_)o(nex)o(t_)o(pa)o(ram)o(et)o
-(er)o(\()218 1411 y(icalproperty*)g(prop,)218 1525 y(icalparameter_ki)o
-(nd)f(kind\);)0 1638 y(void)42 b(icalproperty_add)o(_p)o(ar)o(ame)o(te)
-o(r\()218 1752 y(icalproperty*)c(prop,)218 1865 y(icalparameter*)g
-(parameter\);)0 1979 y(void)k(icalproperty_rem)o(ov)o(e_)o(par)o(am)o
-(et)o(er\()218 2092 y(icalproperty*)c(prop,)218 2206
-y(icalparameter_ki)o(nd)f(kind\);)0 2589 y Fb(6.2.5)94
-b(Getting)31 b(V)-8 b(alues)0 2799 y(6.2.6)94 b(Setting)31
-b(V)-8 b(alues)0 3009 y(6.2.7)94 b(Getting)31 b(P)m(arameters)0
-3219 y(6.2.8)94 b(Setting)31 b(P)m(arameters)0 3429 y(6.2.9)94
-b(Remo)m(ving)29 b(P)m(arameters)0 3639 y(6.2.10)93 b(Chec)m(king)32
-b(Comp)s(onen)m(t)e(V)-8 b(alidit)m(y)0 3868 y Fc(6.3)112
-b(Storing)37 b(Ob)6 b(jects)0 4078 y Fh(The)27 b(libical)g
-(distribution)h(inclues)f(a)g(sep)r(erate)f(library)-7
-b(,)26 b(libicalss,)h(that)g(allo)n(ws)f(y)n(ou)g(to)i(store)e(iCal)h
-(comp)r(onen)n(t)g(data)f(to)0 4192 y(disk)h(in)h(a)f(v)-5
-b(ariet)n(y)27 b(of)h(w)n(a)n(ys.)35 b(This)27 b(library)g(is)g(do)r
-(cumen)n(ted)h(sep)r(erately)-7 b(.)36 b(\()28 b(&)f(curren)n(tly)-7
-b(,)27 b(not)g(at)h(all.)36 b(\))0 4480 y Fc(6.4)112
-b(Memory)37 b(Managemen)m(t)0 4690 y Fh(Libical)25 b(relies)f(hea)n
-(vily)g(on)h(dynamic)g(allo)r(cation)f(for)h(b)r(oth)h(the)f(core)f(ob)
-5 b(jects)25 b(and)g(for)f(the)i(strings)e(used)h(to)g(hold)g(v)-5
-b(alues.)0 4804 y(Some)34 b(of)f(this)h(memory)f(the)h(library)f
+(y)n(ou)g(will)g(probably)0 4272 y(b)r(e)30 b(remo)n(ving)e(the)h
+(elemen)n(t)h(that)g(the)f(in)n(ternal)g(iterator)f(p)r(oin)n(ts)i(to.)
+42 b(The)29 b(_remo)n(v)n(e\(\))f(routine)h(will)h(k)n(eep)f(the)g
+(iterator)0 4386 y(v)-5 b(alid)22 b(b)n(y)g(mo)n(ving)g(it)g(to)h(the)f
+(next)h(comp)r(onen)n(t,)g(but)g(in)g(a)e(normal)h(lo)r(op,)h(this)f
+(will)h(result)f(in)h(t)n(w)n(o)e(adv)-5 b(ances)22 b(p)r(er)g
+(iteration,)0 4499 y(and)29 b(y)n(ou)g(will)g(remo)n(v)n(e)f(only)h(ev)
+n(ery)f(other)h(comp)r(onen)n(t.)42 b(T)-7 b(o)29 b(a)n(v)n(oid)e(the)j
+(problem,)f(y)n(ou)g(will)h(need)f(to)g(step)h(the)f(iterator)0
+4613 y(ahead)e(of)g(the)h(elemen)n(t)g(y)n(ou)f(are)f(going)h(to)g
+(remo)n(v)n(e,)f(lik)n(e)h(this:)0 4839 y Fc(for\(c)41
+b(=)j(icalcomponent_g)o(et)o(_fi)o(rs)o(t_)o(com)o(po)o(ne)o(nt\()o(pa)
+o(re)o(nt_)o(co)o(mp,)o(IC)o(AL)o(_AN)o(Y_)o(CO)o(MPO)o(NE)o(NT)o(\);)
+305 4953 y(c)f(!=)g(0;)305 5066 y(c)g(=)g(next)174 5294
+y(next)f(=)h(icalcomponent_get)o(_n)o(ex)o(t_c)o(om)o(po)o(nen)o(t\()o
+(pa)o(ren)o(t_)o(com)o(p,)o(IC)o(AL_)o(AN)o(Y_)o(COM)o(PO)o(NE)o(NT\))o
+(;)174 5407 y(icalcomponent_rem)o(ov)o(e_)o(com)o(po)o(ne)o(nt\()o(pa)o
+(re)o(nt_)o(co)o(mp)o(,c\))o(;)p eop
+%%Page: 12 12
+12 11 bop 0 -167 3900 5 v 0 -200 a Fd(6.)73 b(Using)32
+b(libical)3149 b Ff(12)0 162 y(Another)32 b(w)n(a)n(y)e(to)i(remo)n(v)n
+(e)e(comp)r(onen)n(ts)i(is)g(to)f(rely)h(on)f(the)i(side)f(e\033ect)g
+(of)g(icalcomp)r(onen)n(t_remo)n(v)n(e_comp)r(onen)n(t:)42
+b(if)0 275 y(comp)r(onen)n(t)28 b(iterator)g(in)h(the)g(paren)n(t)f
+(comp)r(onen)n(t)h(is)f(p)r(oin)n(ting)h(to)g(the)g(c)n(hild)g(that)g
+(will)g(b)r(e)g(remo)n(v)n(ed,)f(it)h(will)g(mo)n(v)n(e)f(the)0
+389 y(iterator)e(to)i(the)g(comp)r(onen)n(t)f(after)g(the)h(c)n(hild.)
+37 b(The)27 b(follo)n(wing)g(co)r(de)g(will)h(exploit)f(this)h(b)r(eha)
+n(vior:)0 628 y Fc(icalcomponent_ge)o(t_)o(fir)o(st)o(_c)o(omp)o(on)o
+(en)o(t\(p)o(ar)o(en)o(t_c)o(om)o(p,)o(ICA)o(L_)o(VEV)o(EN)o(T_)o(COM)o
+(PO)o(NE)o(NT\))o(;)0 742 y(while\(\(c=icalcom)o(po)o(nen)o(t_)o(ge)o
+(t_c)o(ur)o(re)o(nt_)o(co)o(mp)o(one)o(nt)o(\(c)o(\)\))37
+b(!=)43 b(0)g(\))131 855 y(if\(icalcomponen)o(t_i)o(sa)o(\(c)o(\))38
+b(==)k(ICAL_VEVENT_COMP)o(ONE)o(NT)o(\))261 969 y(icalcomponent_rem)o
+(ov)o(e_c)o(om)o(po)o(nen)o(t\()o(pa)o(ren)o(t_)o(co)o(mp,)o(in)o(ner)o
+(\);)174 1083 y(else)261 1196 y(icalcomponent_get)o(_n)o(ext)o(_c)o(om)
+o(pon)o(en)o(t\()o(par)o(en)o(t_)o(com)o(p,)o(ICA)o(L_)o(VE)o(VEN)o(T_)
+o(CO)o(MPO)o(NE)o(NT)o(\);)0 1582 y Fd(6.2.5)94 b(W)-8
+b(orking)31 b(with)g(prop)s(erties)g(and)h(parameters)0
+1792 y Ff(Finding,)g(iterating)f(and)g(remo)n(ving)e(prop)r(erties)h(w)
+n(orks)g(the)h(same)g(as)f(it)i(do)r(es)e(for)h(comp)r(onen)n(ts,)g
+(using)g(the)h(prop)r(ert)n(y-)0 1906 y(sp)r(eci\034c)c(or)e
+(parameter-sp)r(eci\034c)g(in)n(terfaces:)0 2146 y Fc(icalproperty*)38
+b(icalcomponent_ge)o(t_)o(fir)o(st)o(_p)o(rop)o(er)o(ty)o(\()218
+2259 y(icalcomponent*)g(component,)218 2373 y(icalproperty_kin)o(d)f
+(kind\);)0 2486 y(icalproperty*)h(icalcomponent_ge)o(t_)o(nex)o(t_)o
+(pr)o(ope)o(rt)o(y\()218 2600 y(icalcomponent*)g(component,)218
+2713 y(icalproperty_kin)o(d)f(kind\);)0 2827 y(void)42
+b(icalcomponent_ad)o(d_)o(pr)o(ope)o(rt)o(y\()218 2941
+y(icalcomponent*)c(component,)218 3054 y(icalproperty*)g(property\);)0
+3168 y(void)k(icalcomponent_re)o(mo)o(ve)o(_pr)o(op)o(er)o(ty\()218
+3281 y(icalcomponent*)c(component,)218 3395 y(icalproperty*)g
+(property\);)0 3508 y(icalparameter*)g(icalproperty_ge)o(t_)o(fir)o(st)
+o(_p)o(ara)o(me)o(te)o(r\()218 3622 y(icalproperty*)g(prop,)218
+3736 y(icalparameter_ki)o(nd)f(kind\);)0 3849 y(icalparameter*)h
+(icalproperty_ge)o(t_)o(nex)o(t_)o(pa)o(ram)o(et)o(er)o(\()218
+3963 y(icalproperty*)g(prop,)218 4076 y(icalparameter_ki)o(nd)f
+(kind\);)0 4190 y(void)42 b(icalproperty_add)o(_p)o(ar)o(ame)o(te)o
+(r\()218 4303 y(icalproperty*)c(prop,)218 4417 y(icalparameter*)g
+(parameter\);)0 4531 y(void)k(icalproperty_rem)o(ov)o(e_)o(par)o(am)o
+(et)o(er\()218 4644 y(icalproperty*)c(prop,)218 4758
+y(icalparameter_ki)o(nd)f(kind\);)0 5030 y Fd(6.2.6)94
+b(W)-8 b(orking)31 b(with)g(v)-5 b(alues)0 5240 y Ff(V)e(alues)32
+b(are)g(t)n(ypically)g(part)g(of)g(a)g(prop)r(ert)n(y)-7
+b(,)33 b(although)f(they)h(can)f(exist)g(on)h(their)f(o)n(wn.)51
+b(Y)-7 b(ou)33 b(can)f(maniplulate)h(them)0 5354 y(either)27
+b(as)g(part)g(of)h(the)g(prop)r(ert)n(y)e(or)h(indep)r(endan)n(tly)-7
+b(.)p eop
+%%Page: 13 13
+13 12 bop 0 -167 3900 5 v 0 -200 a Fd(6.)73 b(Using)32
+b(libical)3149 b Ff(13)0 162 y(The)25 b(most)f(common)g(w)n(a)n(y)f(to)
+i(w)n(ork)e(with)i(v)-5 b(alues)24 b(to)g(is)h(to)f(maniplate)g(them)h
+(from)g(they)f(prop)r(erties)g(that)h(con)n(tain)e(them.)0
+275 y(This)31 b(in)n(v)n(olv)n(es)d(few)n(er)j(routine)f(calls)g(and)g
+(in)n(termediate)h(v)-5 b(ariables)29 b(than)i(w)n(orking)e(with)i
+(them)g(indep)r(enden)n(tly)-7 b(,)32 b(and)f(it)0 389
+y(is)c(t)n(yp)r(e-safe.)0 545 y(F)-7 b(or)28 b(eac)n(h)h(prop)r(ert)n
+(y)-7 b(,)28 b(there)h(are)f(a)g(_get_)g(and)h(a)g(_set_)f(routine)g
+(that)i(access)d(the)j(in)n(ternal)e(v)-5 b(alue.)41
+b(F)-7 b(or)29 b(instnace,)g(for)0 659 y(the)f(UID)g(prop)r(ert)n(y)-7
+b(,)27 b(the)h(routines)f(are:)0 886 y Fc(void)42 b(icalproperty_set)o
+(_u)o(id)o(\(ic)o(al)o(pr)o(ope)o(rt)o(y*)37 b(prop,)k(const)h(char*)f
+(v\))0 999 y(const)g(char*)h(icalproperty_get)o(_u)o(id)o(\(ic)o(al)o
+(pr)o(ope)o(rt)o(y*)37 b(prop\))0 1226 y Ff(F)-7 b(or)21
+b(m)n(ultiv)-5 b(alued)22 b(prop)r(erties,)g(lik)n(e)f(A)-7
+b(TT)g(A)n(CH,)23 b(the)f(v)-5 b(alue)21 b(t)n(yp)r(e)h(is)g(usually)f
+(a)g(struct)h(or)e(union)i(that)g(holds)f(b)r(oth)h(p)r(ossible)0
+1340 y(t)n(yp)r(es.)0 1496 y(If)28 b(y)n(ou)f(w)n(an)n(t)g(to)g(w)n
+(ork)f(with)i(the)g(underlying)f(v)-5 b(alue)28 b(ob)5
+b(ject,)27 b(y)n(ou)g(can)g(get)g(and)h(set)f(it)h(with:)0
+1723 y Fc(icalvalue*)39 b(icalproperty_get_)o(va)o(lu)o(e)f
+(\(icalproperty*)f(prop\))0 1836 y(void)42 b(icalproperty_set)o(_v)o
+(al)o(ue\()o(ic)o(al)o(pro)o(pe)o(rt)o(y*)37 b(prop,)42
+b(icalvalue*)d(value\);)0 2063 y Ff(Icalprop)r(ert)n(y_get_v)-5
+b(alue\(\))36 b(will)i(return)g(a)g(reference)f(that)h(y)n(ou)g(can)g
+(manipluate)g(with)h(other)e(icalv)-5 b(alue)38 b(routines.)0
+2177 y(Most)30 b(of)h(the)g(time,)g(y)n(ou)f(will)h(ha)n(v)n(e)e(to)i
+(kno)n(w)e(what)i(the)g(t)n(yp)r(e)f(of)h(the)g(v)-5
+b(alue)30 b(is.)46 b(F)-7 b(or)30 b(instance,)g(if)i(y)n(ou)d(kno)n(w)h
+(that)h(the)0 2290 y(v)-5 b(alue)27 b(is)h(a)f(D)n(A)-7
+b(TETIME)29 b(t)n(yp)r(e,)f(y)n(ou)f(can)g(manipluate)g(it)h(with:)0
+2517 y Fc(struct)41 b(icaltimetype)e(icalvalue_get_d)o(at)o(et)o(ime)o
+(\(i)o(ca)o(lva)o(lu)o(e*)e(value\);)0 2631 y(void)42
+b(icalvalue_set_da)o(te)o(ti)o(me\()o(ic)o(al)o(val)o(ue)o(*)37
+b(value,)k(struct)h(icaltimetype)c(v\);)0 2858 y Ff(When)21
+b(w)n(orking)e(with)i(an)f(extension)g(prop)r(ert)n(y)f(or)h(v)-5
+b(alue)20 b(\(and)h(X-PR)n(OPER)-7 b(TY)21 b(or)f(a)g(prop)r(ert)n(y)f
+(that)i(has)f(the)h(parameter)0 2971 y(V)-9 b(ALUE=x-name)27
+b(\))h(the)g(v)-5 b(alue)28 b(t)n(yp)r(e)f(is)h(alw)n(a)n(ys)d(a)j
+(string.)36 b(T)-7 b(o)27 b(get)g(and)h(set)f(the)h(v)-5
+b(alue,)28 b(use:)0 3198 y Fc(void)42 b(icalproperty_set)o(_x)o(\(i)o
+(cal)o(pr)o(op)o(ert)o(y*)37 b(prop,)k(char*)h(v\);)0
+3312 y(char*)f(icalproperty_get_)o(x\()o(ica)o(lp)o(ro)o(per)o(ty)o(*)c
+(prop\);)0 3582 y Fd(6.2.7)94 b(W)-8 b(orking)31 b(with)g(parameters)0
+3792 y(6.2.8)94 b(Chec)m(king)32 b(Comp)s(onen)m(t)d(V)-8
+b(alidit)m(y)0 4002 y Ff(RF)n(C)27 b(2446)e(de\034nes)i(rules)g(for)f
+(what)h(prop)r(erties)f(m)n(ust)h(exist)g(in)h(a)e(comp)r(onen)n(t)h
+(to)g(b)r(e)g(used)g(for)g(transfering)f(sc)n(heduling)0
+4116 y(data.)58 b(Most)35 b(of)g(these)g(rules)f(relate)g(to)h(the)g
+(existence)f(of)h(prop)r(erties)f(relativ)n(e)g(to)h(the)g(METHOD)h
+(prop)r(ert)n(y)-7 b(,)35 b(whic)n(h)0 4229 y(declares)22
+b(what)h(op)r(eration)f(a)h(remote)g(reciev)n(er)f(should)h(use)g(to)g
+(pro)r(cess)f(a)h(comp)r(onen)n(t.)35 b(F)-7 b(or)23
+b(instance,)h(if)g(the)f(METHOD)0 4343 y(is)36 b(REQUEST)h(and)e(the)i
+(comp)r(onen)n(t)e(is)h(a)f(VEVENT,)j(the)e(sender)f(is)h(probably)f
+(asking)f(the)j(reciev)n(er)d(to)h(join)h(in)g(a)0 4456
+y(meeting.)g(In)25 b(this)g(case,)g(RF)n(C2446)d(sa)n(ys)i(that)h(the)g
+(comp)r(onen)n(t)g(m)n(ust)g(sp)r(ecify)g(a)f(start)g(time)i(\(DTST)-7
+b(AR)g(T\))26 b(and)f(list)g(the)0 4570 y(reciev)n(er)h(as)h(an)g
+(attendee)h(\(A)-7 b(TTENDEE\).)0 4726 y(Libical)27 b(can)g(c)n(hec)n
+(k)g(these)h(restrictions)e(with)i(the)g(routine:)0 4953
+y Fc(int)42 b(icalrestriction_c)o(he)o(ck)o(\(ic)o(al)o(co)o(mpo)o(ne)o
+(nt)o(*)c(comp\);)0 5180 y Ff(This)19 b(routine)f(returns)g(0)h(if)g
+(the)g(comp)r(onen)n(t)g(do)r(es)f(not)h(pass)f(RF)n(C2446)f
+(restrictions,)i(or)f(if)h(the)g(comp)r(onen)n(t)g(is)g(malformed.)0
+5294 y(The)38 b(comp)r(onen)n(t)g(y)n(ou)f(pass)g(in)h
+Fa(must)45 b Ff(b)r(e)38 b(a)g(V)n(CALEND)n(AR,)h(with)g(one)e(or)g
+(more)h(c)n(hildren,)i(lik)n(e)d(the)i(examples)e(in)0
+5407 y(RF)n(C2446.)p eop
+%%Page: 14 14
+14 13 bop 0 -167 3900 5 v 0 -200 a Fd(6.)73 b(Using)32
+b(libical)3149 b Ff(14)0 162 y(When)28 b(this)f(routine)g(runs,)f(it)i
+(will)f(insert)g(new)g(prop)r(erties)f(in)n(to)h(the)h(comp)r(onen)n(t)
+e(to)h(indicate)h(an)n(y)e(errors)f(it)i(\034nds.)37
+b(See)0 275 y(section)27 b(6.5.3,)f(X-LIC-ERR)n(OR)i(for)f(more)f
+(information)h(ab)r(out)h(these)f(error)f(prop)r(erties.)0
+548 y Fd(6.2.9)94 b(Con)m(v)m(erting)32 b(Comp)s(onen)m(ts)d(to)j(T)-8
+b(ext)0 758 y Ff(T)h(o)22 b(create)g(an)g(RF)n(C2445)f(complian)n(t)h
+(text)h(represen)n(ttion)e(of)i(an)f(ob)5 b(ject,)23
+b(use)g(one)f(of)g(the)h(*_as_ical_string\(\))d(routines:)0
+997 y Fc(char*)41 b(icalcomponent_as_)o(ic)o(al_)o(st)o(ri)o(ng)c
+(\(icalcomponent*)g(component\))0 1111 y(char*)k(icalproperty_as_i)o
+(ca)o(l_s)o(tr)o(in)o(g)d(\(icalproperty*)f(property\))0
+1225 y(char*)k(icalparameter_as_)o(ic)o(al_)o(st)o(ri)o(ng)c
+(\(icalparameter*)g(parameter\))0 1338 y(char*)k(icalvalue_as_ical)o
+(_s)o(tri)o(ng)c(\(icalvalue*)i(value\))0 1578 y Ff(In)32
+b(most)h(cases,)f(y)n(ou)f(will)i(only)f(use)g(icalcomp)r(onen)n
+(t_as_ical_string)c(\(\),)34 b(since)e(it)h(will)f(cascade)f(and)h(con)
+n(v)n(ert)f(all)h(of)0 1691 y(the)c(parameters,)e(prop)r(erties)g(and)i
+(v)-5 b(alues)27 b(that)h(are)e(attac)n(hed)h(to)h(the)g(ro)r(ot)e
+(comp)r(onen)n(t.)0 1848 y(Icalprop)r(ert)n(y_as_ical_string\(\))34
+b(will)k(terminate)g(eac)n(h)g(line)g(with)h(the)g(RF)n(C2445)d(sp)r
+(eci\034ed)j(line)f(terminator)f("rn")0 1961 y(Ho)n(w)n(ev)n(er,)24
+b(if)i(y)n(ou)f(compile)g(with)h(the)g(sym)n(b)r(ol)f
+(ICAL_UNIX_NEWLINE)i(de\034ned,)f(it)g(will)g(terminate)f(lines)h(with)
+g("n")0 2118 y(Remem)n(b)r(er)35 b(that)h(the)f(string)g(returned)f(b)n
+(y)h(these)h(routines)e(is)h(o)n(wned)g(b)n(y)g(the)h(library)-7
+b(,)36 b(and)f(will)g(ev)n(en)n(tually)f(b)r(e)i(re-)0
+2231 y(written.)h(Y)-7 b(ou)28 b(should)f(cop)n(y)g(it)h(if)g(y)n(ou)e
+(w)n(an)n(t)h(to)h(preserv)n(e)e(it.)0 2523 y Fb(6.3)112
+b(Time)0 2733 y Fd(6.3.1)94 b(Time)30 b(structure)0 2943
+y Ff(LIbical)d(de\034nes)g(it's)g(o)n(wn)f(time)i(structure)e(for)h
+(storing)f(all)h(dates)f(and)h(times.)37 b(It)28 b(w)n(ould)e(ha)n(v)n
+(e)g(b)r(een)i(nice)f(to)g(re-use)f(the)0 3057 y(C)j(library's)e
+Fa(struct)j(tm,)h Ff(but)e(that)h(structure)e(do)r(es)g(not)h
+(di\033eren)n(tiate)g(b)r(et)n(w)n(een)g(dates)f(and)h(times,)g(and)g
+(b)r(et)n(w)n(een)g(lo)r(cal)0 3170 y(time)f(and)f(UTC.)h(The)g
+(libical)f(structure)g(is:)0 3410 y Fc(struct)41 b(icaltimetype)87
+3523 y(int)h(year;)87 3637 y(int)g(month;)87 3750 y(int)g(day;)87
+3864 y(int)g(hour;)87 3978 y(int)g(minute;)87 4091 y(int)g(second;)87
+4205 y(int)g(is_utc;)f(/*)i(1-)g(time)e(is)i(in)g(UTC)f(timezone)e(*/)
+87 4318 y(int)i(is_date;)f(/*)h(1)i(-)f(interpret)c(this)j(as)h(date.)e
+(*/)i(;)0 4558 y Ff(The)35 b(y)n(ear,)h(mon)n(th,)g(da)n(y)-7
+b(,)37 b(hour,)f(min)n(ute)f(and)g(second)g(\034elds)g(ho)n(w)f(the)h
+(brok)n(en-out)f(time)h(v)-5 b(alues.)59 b(The)35 b(is_utc)g(\034eld)0
+4671 y(distinguishes)30 b(b)r(et)n(w)n(een)h(times)g(UTC)g(and)g(a)f
+(lo)r(cal)g(time)i(zone.)45 b(The)31 b(is_date)f(\034eld)h(indicates)g
+(if)g(the)g(in)n(tra-da)n(y)e(\034elds)0 4785 y(hold)e(v)-5
+b(alid)28 b(data.)0 5057 y Fd(6.3.2)94 b(Time)30 b(manipulating)f
+(routines)0 5268 y Ff(The)f(n)n(ull)f(time)h(v)-5 b(alue)28
+b(is)f(used)h(to)f(indicate)h(that)g(the)g(data)f(in)g(the)h(structure)
+f(is)h(not)f(a)h(v)-5 b(alid)27 b(time.)p eop
+%%Page: 15 15
+15 14 bop 0 -167 3900 5 v 0 -200 a Fd(6.)73 b(Using)32
+b(libical)3149 b Ff(15)0 162 y Fc(struct)41 b(icaltimetype)e
+(icaltime_null_t)o(im)o(e\()o(voi)o(d\))o(;)0 275 y(int)j
+(icaltime_is_null_)o(ti)o(me)o(\(st)o(ru)o(ct)37 b(icaltimetype)h(t\);)
+0 515 y Ff(It)33 b(is)g(sensible)g(for)g(the)g(brok)n(en-out)f(time)h
+(\034elds)g(to)g(con)n(tain)g(v)-5 b(alues)32 b(that)i(are)e(not)h(p)r
+(ermitted)h(in)f(an)g(ISO)g(complian)n(t)0 628 y(time)g(string.)53
+b(F)-7 b(or)32 b(instance,)i(the)g(seconds)e(\034eld)h(can)g(hold)g(v)
+-5 b(alues)32 b(greater)f(than)j(59,)f(and)g(the)g(hours)f(\034eld)i
+(can)e(hold)0 742 y(v)-5 b(alues)29 b(larger)e(than)j(24.)41
+b(The)29 b(excessiv)n(e)f(v)-5 b(alues)29 b(will)g(b)r(e)h(rolled)e(o)n
+(v)n(er)g(in)n(to)h(the)g(next)h(larger)d(\034eld)j(when)f(the)h
+(structure)0 855 y(is)d(normalized.)0 1095 y Fc(struct)41
+b(icaltimetype)e(icaltime_normal)o(iz)o(e\()o(str)o(uc)o(t)e
+(icaltimetype)i(t\);)0 1334 y Ff(There)27 b(are)g(sev)n(eral)e
+(routines)i(to)h(get)f(the)h(da)n(y)f(of)g(the)h(w)n(eek)f(or)g(mon)n
+(th,)g(etc,)h(from)f(a)h(time)g(structure.)0 1574 y Fc(short)41
+b(icaltime_day_of_y)o(ea)o(r\(s)o(tr)o(uc)o(t)d(icaltimetype)g(t\);)0
+1688 y(struct)j(icaltimetype)e(icaltime_from_d)o(ay)o(_o)o(f_y)o(ea)o
+(r\()o(sho)o(rt)e(doy,)42 b(short)f(year\);)0 1801 y(short)g
+(icaltime_day_of_w)o(ee)o(k\(s)o(tr)o(uc)o(t)d(icaltimetype)g(t\);)0
+1915 y(short)j(icaltime_start_do)o(y_)o(of_)o(we)o(ek)o(\(st)o(ru)o(ct)
+c(icaltimetype)i(t\);)0 2028 y(short)i(icaltime_week_num)o(be)o(r\(s)o
+(ho)o(rt)c(day_of_month,)h(short)k(month,)f(short)g(year\);)0
+2142 y(struct)g(icaltimetype)e(icaltime_from_w)o(ee)o(k_)o(num)o(be)o
+(r\()o(sho)o(rt)e(week_number,)h(short)k(year\);)0 2255
+y(short)f(icaltime_days_in_)o(mo)o(nth)o(\(s)o(ho)o(rt)c(month,short)i
+(year\);)0 2495 y Ff(T)-7 b(w)n(o)37 b(routines)g(con)n(v)n(ert)g(time)
+h(structures)f(to)h(and)f(from)h(the)g(n)n(um)n(b)r(er)g(of)f(seconds)g
+(since)h(the)g(POSIX)g(ep)r(o)r(c)n(h.)68 b(The)0 2608
+y(is_date)31 b(\034eld)g(indicates)g(w)n(ether)g(or)f(not)h(the)h
+(hour,)g(min)n(ute)f(and)g(second)g(\034elds)g(should)g(b)r(e)h(used)f
+(in)h(the)f(con)n(v)n(ersion,)0 2722 y(and)h(is_utc)g(indicates)g(if)h
+(the)g(v)-5 b(alue)32 b(should)g(b)r(e)h(con)n(v)n(erted)d(to)i(a)g(lo)
+r(cal)g(time)h(or)e(a)h(UTC)h(time,)h(using)e(the)g(op)r(erating)0
+2836 y(system)27 b(suppled)h(notion)f(of)h(the)g(lo)r(cal)f(timezone.)0
+3075 y Fc(struct)41 b(icaltimetype)e(icaltime_from_t)o(im)o(et)o(\(ti)o
+(me)o(_t)e(v,)43 b(int)f(is_date,)e(int)j(is_utc\);)0
+3189 y(time_t)e(icaltime_as_time)o(t\()o(str)o(uc)o(t)c
+(icaltimetype\);)0 3428 y Ff(The)28 b(compare)e(routine)h(w)n(orks)f
+(exactly)h(lik)n(e)g(strcmp,)g(but)h(on)g(time)g(structures.)0
+3668 y Fc(int)42 b(icaltime_compare\()o(st)o(ru)o(ct)37
+b(icaltimetype)i(a,struct)h(icaltimetype)e(b\);)0 3907
+y Ff(The)d(follo)n(wing)e(routines)h(con)n(v)n(ert)g(b)r(et)n(w)n(een)g
+(UTC)h(and)g(a)f(named)h(timezone.)58 b(The)35 b(tzid)g(\034eld)g(m)n
+(ust)g(b)r(e)g(a)f(timezone)0 4021 y(name)27 b(from)h(the)f(Olsen)h
+(database,)e(suc)n(h)h(as)g("America/Los_Angeles.")0
+4177 y(The)h(utc_o\033set)f(routine)g(returns)g(the)h(o\033set)f(of)h
+(the)g(named)f(time)h(zone)f(from)h(UTC,)f(in)h(seconds.)0
+4334 y(The)e(tt)h(parmeter)f(in)g(the)h(fonllo)n(wing)e(routines)h
+(indicates)g(the)h(date)f(on)g(whic)n(h)g(the)h(con)n(v)n(ersion)d
+(should)i(b)r(e)h(made.)36 b(The)0 4447 y(tt)23 b(parameter)e(is)h
+(necessary)f(b)r(ecause)h(timezones)g(ha)n(v)n(e)f(man)n(y)g
+(di\033eren)n(t)i(rules)f(for)g(when)g(da)n(yligh)n(t)f(sa)n(vings)g
+(time)i(is)f(used,)0 4561 y(and)27 b(these)h(rules)f(can)g(c)n(hange)f
+(o)n(v)n(er)g(time.)37 b(So,)27 b(for)g(a)g(single)g(timezone)g(one)g
+(y)n(ear)f(ma)n(y)h(ha)n(v)n(e)f(da)n(yligh)n(t)h(sa)n(vings)e(time)j
+(on)0 4674 y(Marc)n(h)f(15,)f(but)j(for)e(other)g(y)n(ears)f(Marc)n(h)g
+(15)h(ma)n(y)g(b)r(e)h(standard)f(time,)h(and)f(some)g(y)n(ears)f(ma)n
+(y)h(ha)n(v)n(e)g(standard)f(time)i(all)0 4788 y(y)n(ear.)0
+5027 y Fc(int)42 b(icaltime_utc_offs)o(et)o(\(s)o(tru)o(ct)37
+b(icaltimetype)h(tt,)43 b(char*)e(tzid\))0 5141 y(struct)g
+(icaltimetype)e(icaltime_as_utc)o(\(s)o(tr)o(uct)e(icaltimetype)h
+(tt,char*)i(tzid\);)0 5255 y(struct)h(icaltimetype)e(icaltime_as_zon)o
+(e\()o(st)o(ruc)o(t)e(icaltimetype)i(tt,char*)h(tzid\);)p
+eop
+%%Page: 16 16
+16 15 bop 0 -167 3900 5 v 0 -200 a Fd(6.)73 b(Using)32
+b(libical)3149 b Ff(16)0 162 y Fb(6.4)112 b(Storing)37
+b(Ob)6 b(jects)0 372 y Ff(The)27 b(libical)g(distribution)h(inclues)f
+(a)g(sep)r(erate)f(library)-7 b(,)26 b(libicalss,)h(that)g(allo)n(ws)f
+(y)n(ou)g(to)i(store)e(iCal)h(comp)r(onen)n(t)g(data)f(to)0
+485 y(disk)h(in)h(a)f(v)-5 b(ariet)n(y)27 b(of)h(w)n(a)n(ys.)35
+b(This)27 b(library)g(is)g(do)r(cumen)n(ted)h(sep)r(erately)-7
+b(.)36 b(\()28 b(curren)n(tly)-7 b(,)26 b(not)i(at)f(all.)37
+b(\))0 777 y Fb(6.5)112 b(Memory)37 b(Managemen)m(t)0
+987 y Ff(Libical)25 b(relies)f(hea)n(vily)g(on)h(dynamic)g(allo)r
+(cation)f(for)h(b)r(oth)h(the)f(core)f(ob)5 b(jects)25
+b(and)g(for)f(the)i(strings)e(used)h(to)g(hold)g(v)-5
+b(alues.)0 1101 y(Some)34 b(of)f(this)h(memory)f(the)h(library)f
(caller)g(o)n(wns)g(and)g(m)n(ust)h(free,)h(and)f(some)f(of)h(the)g
-(memory)f(is)h(managed)e(b)n(y)i(the)0 4917 y(library)-7
+(memory)f(is)h(managed)e(b)n(y)i(the)0 1214 y(library)-7
b(.)36 b(Here)27 b(is)g(a)g(summary)g(of)h(the)g(memory)e(rules.)0
-5138 y Fb(1\))208 5281 y Fh(If)k(the)g(function)g(name)g(has)f
-Fd(")p Fh(new)p Fd(")g Fh(in)h(it,)h(the)f(caller)f(gets)g(con)n(trol)g
-(of)h(the)g(memory)-7 b(.)42 b(\()31 b(suc)n(h)e(as)g(icalcomp)r(onen-)
-208 5394 y(t_new\(\),)f(or)e(icalprop)r(ert)n(y_new_clone\(\))f(\))0
-5566 y Fb(2\))208 5709 y Fh(If)j(y)n(ou)g(got)g(the)h(memory)f(from)g
+1454 y Fd(1\))208 1600 y Ff(If)40 b(the)h(function)g(name)g(has)f(new)g
+(in)h(it,)j(the)d(caller)e(gets)h(con)n(trol)f(of)i(the)g(memory)-7
+b(.)75 b(\()40 b(suc)n(h)h(as)e(icalcomp)r(o-)208 1714
+y(nen)n(t_new\(\),)27 b(or)g(icalprop)r(ert)n(y_new_clone\(\))e(\))0
+1894 y Fd(2\))208 2041 y Ff(If)j(y)n(ou)g(got)g(the)h(memory)f(from)g
(a)g(routine)g(with)h(new)f(in)h(it,)g(y)n(ou)f(m)n(ust)h(call)f(the)h
-(corresp)r(onding)d(*_free)i(routine)208 5823 y(to)f(free)g(the)h
+(corresp)r(onding)d(*_free)i(routine)208 2154 y(to)f(free)g(the)h
(memory)-7 b(.)36 b(\()28 b(Use)g(icalcomp)r(onen)n(t_free\(\))e(to)i
(free)f(ob)5 b(jects)27 b(created)g(with)h(icalcomp)r(onen)n
-(t_new\(\)\))p eop
-%%Page: 9 9
-9 8 bop 0 -167 3900 5 v 0 -200 a Fb(6.)73 b(Using)32
-b(libical)3190 b Fh(9)0 162 y Fb(3\))208 307 y Fh(If)29
-b(the)g(function)g(name)f(has)g Fd(")p Fh(add)p Fd(")g
-Fh(in)h(it,)g(the)g(caller)e(is)i(transfering)e(con)n(trol)g(of)i(the)g
-(memory)f(to)g(the)h(routine.)40 b(\()208 420 y(icalprop)r(ert)n
-(y_add_parameter\(\))23 b(\))0 596 y Fb(4\))208 741 y
-Fh(If)29 b(the)h(function)g(name)f(has)g Fd(")p Fh(remo)n(v)n(e)p
-Fd(")e Fh(in)j(it,)g(the)g(caller)f(passes)f(in)i(a)f(p)r(oin)n(ter)g
-(to)g(an)g(ob)5 b(ject)29 b(and)h(after)f(the)g(call)208
-855 y(returns,)j(the)h(caller)e(o)n(wns)g(the)h(ob)5
+(t_new\(\)\))0 2334 y Fd(3\))208 2481 y Ff(If)33 b(the)g(function)g
+(name)f(has)h(add)f(in)h(it,)i(the)e(caller)e(is)i(transfering)e(con)n
+(trol)h(of)g(the)h(memory)f(to)h(the)g(routine.)52 b(\()208
+2595 y(icalprop)r(ert)n(y_add_parameter\(\))23 b(\))0
+2775 y Fd(4\))208 2921 y Ff(If)34 b(the)g(function)g(name)g(has)f(remo)
+n(v)n(e)f(in)i(it,)i(the)e(caller)f(passes)f(in)i(a)g(p)r(oin)n(ter)f
+(to)g(an)h(ob)5 b(ject)33 b(and)h(after)f(the)h(call)208
+3035 y(returns,)e(the)h(caller)e(o)n(wns)g(the)h(ob)5
b(ject.)50 b(So,)33 b(b)r(efore)f(y)n(ou)f(call)h(icalcomp)r(onen)n
-(t_remo)n(v)n(e_prop)r(ert)n(y\(comp,fo)r(o\),)208 968
-y(y)n(ou)26 b(do)i(not)f(o)n(wn)g Fd(")p Fh(fo)r(o)p
-Fd(")g Fh(and)g(after)g(the)h(call)f(returns,)g(y)n(ou)g(do.)0
-1145 y Fb(5\))208 1290 y Fh(If)d(the)g(routine)f(returns)g(a)g(string,)
-h(libical)g(o)n(wns)f(the)h(memory)f(and)g(will)h(put)g(it)h(on)e(a)g
-(ring)g(bu\033er)h(to)g(reclaim)f(later.)208 1403 y(Y)-7
-b(ou'd)27 b(b)r(etter)h(strdup\(\))g(it)g(if)g(y)n(ou)f(w)n(an)n(t)g
-(to)h(k)n(eep)f(it,)h(and)f(y)n(ou)g(don't)h(ha)n(v)n(e)e(to)h(delete)h
-(it.)0 1693 y Fc(6.5)112 b(Error)36 b(Handling)0 1903
-y Fh(Libical)27 b(has)g(sev)n(eral)e(error)h(handling)h(mec)n(hanisms)f
-(for)h(the)h(v)-5 b(arioust)n(yp)r(es)25 b(of)j(programming,)d(seman)n
-(tic)i(and)g(syn)n(tactic)0 2017 y(errors)e(y)n(ou)i(ma)n(y)g(encoun)n
-(ter.)0 2288 y Fb(6.5.1)94 b(Return)31 b(v)-5 b(alues)0
-2498 y Fh(Man)n(y)29 b(library)f(routines)g(signal)h(errors)e(through)h
-(their)h(return)g(v)-5 b(alues.)42 b(All)30 b(routines)e(that)i(return)
-f(a)f(p)r(oin)n(ter,)i(suc)n(h)f(as)0 2611 y(icalcomp)r(onen)n
-(t_new\(\),)36 b(will)f(return)f(0)g(\()h(zero)f(\))h(on)f(a)g(fatal)h
-(error.)56 b(Some)35 b(routines)f(will)g(return)h(a)f(v)-5
-b(alue)34 b(of)h(en)n(um)0 2725 y(icalerroren)n(um.)0
-2996 y Fb(6.5.2)94 b(icalerrno)0 3206 y Fh(Most)23 b(routines)f(will)h
-(set)g(the)g(global)f(error)f(v)-5 b(alue)23 b(icalerrno)e(on)h
-(errors.)33 b(This)23 b(v)-5 b(ariable)22 b(is)h(an)f(en)n(umeration;)i
-(p)r(ermissable)0 3320 y(v)-5 b(alues)21 b(can)h(b)r(e)g(found)g(in)g
+(t_remo)n(v)n(e_prop)r(ert)n(y\(comp,fo)r(o\),)208 3149
+y(y)n(ou)26 b(do)i(not)f(o)n(wn)g(fo)r(o)g(and)h(after)f(the)h(call)f
+(returns,)g(y)n(ou)g(do.)0 3329 y Fd(5\))208 3475 y Ff(If)d(the)g
+(routine)f(returns)g(a)g(string,)h(libical)g(o)n(wns)f(the)h(memory)f
+(and)g(will)h(put)g(it)h(on)e(a)g(ring)g(bu\033er)h(to)g(reclaim)f
+(later.)208 3589 y(Y)-7 b(ou'd)27 b(b)r(etter)h(strdup\(\))g(it)g(if)g
+(y)n(ou)f(w)n(an)n(t)g(to)h(k)n(eep)f(it,)h(and)f(y)n(ou)g(don't)h(ha)n
+(v)n(e)e(to)h(delete)h(it.)0 3880 y Fb(6.6)112 b(Error)36
+b(Handling)0 4091 y Ff(Libical)27 b(has)g(sev)n(eral)e(error)h
+(handling)h(mec)n(hanisms)f(for)h(the)h(v)-5 b(arioust)n(yp)r(es)25
+b(of)j(programming,)d(seman)n(tic)i(and)g(syn)n(tactic)0
+4204 y(errors)e(y)n(ou)i(ma)n(y)g(encoun)n(ter.)0 4477
+y Fd(6.6.1)94 b(Return)31 b(v)-5 b(alues)0 4687 y Ff(Man)n(y)29
+b(library)f(routines)g(signal)h(errors)e(through)h(their)h(return)g(v)
+-5 b(alues.)42 b(All)30 b(routines)e(that)i(return)f(a)f(p)r(oin)n
+(ter,)i(suc)n(h)f(as)0 4800 y(icalcomp)r(onen)n(t_new\(\),)36
+b(will)f(return)f(0)g(\()h(zero)f(\))h(on)f(a)g(fatal)h(error.)56
+b(Some)35 b(routines)f(will)g(return)h(a)f(v)-5 b(alue)34
+b(of)h(en)n(um)0 4914 y(icalerroren)n(um.)p eop
+%%Page: 17 17
+17 16 bop 0 -167 3900 5 v 0 -200 a Fd(6.)73 b(Using)32
+b(libical)3149 b Ff(17)0 162 y Fd(6.6.2)94 b(icalerrno)0
+372 y Ff(Most)23 b(routines)f(will)h(set)g(the)g(global)f(error)f(v)-5
+b(alue)23 b(icalerrno)e(on)h(errors.)33 b(This)23 b(v)-5
+b(ariable)22 b(is)h(an)f(en)n(umeration;)i(p)r(ermissable)0
+485 y(v)-5 b(alues)21 b(can)h(b)r(e)g(found)g(in)g
(libical/icalerror.h.)32 b(If)22 b(the)g(routine)g(returns)f(an)g(en)n
(um)h(icalerroren)n(um,)f(then)h(the)g(return)f(v)-5
-b(alue)0 3433 y(will)28 b(b)r(e)g(the)g(same)f(as)g(icalerrno.)35
+b(alue)0 599 y(will)28 b(b)r(e)g(the)g(same)f(as)g(icalerrno.)35
b(Y)-7 b(ou)27 b(can)g(use)h(icalerror_strerror\(\))22
b(to)28 b(get)f(a)g(string)g(that)h(describ)r(es)f(the)h(error)0
-3704 y Fb(6.5.3)94 b(X-LIC-ERR)m(OR)0 3914 y Fh(The)38
-b(library)f(handles)g(seman)n(tic)g(and)h(syn)n(tactic)f(errors)f(in)i
-(comp)r(onen)n(ts)g(b)n(y)f(inserting)g(errors)f(prop)r(erties)h(in)n
-(to)h(the)0 4028 y(comp)r(onen)n(ts.)k(If)30 b(the)g(parser)d(cannot)i
-(parse)g(incoming)g(text)g(\()h(a)f(syn)n(tactic)g(error)e(\))j(or)f
-(if)h(the)g(icalrestriction_c)n(hec)n(k\(\))0 4141 y(routine)j
-(indicates)h(that)f(the)h(comp)r(onen)n(t)g(do)r(es)f(not)h(meet)g(the)
-g(requirmen)n(ts)e(of)i(RF)n(C2446)d(\()j(a)g(seman)n(tic)f(error\))f
-(the)0 4255 y(library)g(will)h(insert)g(prop)r(erties)f(of)h(the)h(t)n
-(yp)r(e)f(X-LIC-ERR)n(OR)g(to)g(describ)r(e)g(the)g(error.)52
-b(Here)33 b(is)g(an)g(example)g(of)g(the)0 4368 y(error)26
-b(prop)r(ert)n(y:)0 4598 y Fd(X-LIC-ERROR;X-LI)o(C-)o(ERR)o(OR)o(TY)o
+868 y Fd(6.6.3)94 b(X-LIC-ERR)m(OR)30 b(and)j(X-LIC-INV)-11
+b(ALID-COMPONENT)0 1078 y Ff(The)38 b(library)f(handles)g(seman)n(tic)g
+(and)h(syn)n(tactic)f(errors)f(in)i(comp)r(onen)n(ts)g(b)n(y)f
+(inserting)g(errors)f(prop)r(erties)h(in)n(to)h(the)0
+1192 y(comp)r(onen)n(ts.)k(If)30 b(the)g(parser)d(cannot)i(parse)g
+(incoming)g(text)g(\()h(a)f(syn)n(tactic)g(error)e(\))j(or)f(if)h(the)g
+(icalrestriction_c)n(hec)n(k\(\))0 1305 y(routine)j(indicates)h(that)f
+(the)h(comp)r(onen)n(t)g(do)r(es)f(not)h(meet)g(the)g(requirmen)n(ts)e
+(of)i(RF)n(C2446)d(\()j(a)g(seman)n(tic)f(error\))f(the)0
+1419 y(library)g(will)h(insert)g(prop)r(erties)f(of)h(the)h(t)n(yp)r(e)
+f(X-LIC-ERR)n(OR)g(to)g(describ)r(e)g(the)g(error.)52
+b(Here)33 b(is)g(an)g(example)g(of)g(the)0 1532 y(error)26
+b(prop)r(ert)n(y:)0 1752 y Fc(X-LIC-ERROR;X-LI)o(C-)o(ERR)o(OR)o(TY)o
(PE=)o(IN)o(VA)o(LID)o(_I)o(TI)o(P)38 b(:Failed)i(iTIP)i(restrictions)d
(for)j(property)e(DTSTART.)g(Expected)g(1)k(instances)39
-b(of)k(the)f(property)f(and)h(got)g(0)0 4942 y Fh(This)35
+b(of)k(the)f(property)f(and)h(got)g(0)0 1971 y Ff(This)35
b(error)f(resulted)h(from)g(a)g(call)g(to)h(icalrestriction_c)n(hec)n
(k\(\),)f(whic)n(h)g(disco)n(v)n(ered)e(that)j(the)g(comp)r(onen)n(t)f
-(do)r(es)g(not)0 5056 y(ha)n(v)n(e)26 b(a)i(DTST)-7 b(AR)g(T)28
+(do)r(es)g(not)0 2084 y(ha)n(v)n(e)26 b(a)i(DTST)-7 b(AR)g(T)28
b(prop)r(ert)n(y)-7 b(,)27 b(as)g(required)f(b)n(y)h(RF)n(C2445.)0
-5212 y(There)g(are)g(a)g(few)h(routines)e(to)i(manipulate)f(error)f
-(prop)r(erties:)0 5369 y(Routine)g(Purp)r(ose)g(v)n(oid)f
-(icalrestriction_c)n(hec)n(k\(\))e(Chec)n(k)i(a)h(comp)r(onen)n(t)f
-(against)g(RF)n(C2446)e(and)j(insert)g(error)d(prop)r(er-)0
-5482 y(ties)e(to)g(indicate)g(an)n(y)f(non-complianes)g(in)n(t)h
-(icalcomp)r(onen)n(t_coun)n(t_errors\(\))d(Return)j(the)g(n)n(um)n(b)r
-(er)g(of)g(error)e(prop)r(erties)0 5596 y(in)33 b(a)f(comp)r(onen)n(t)h
-(v)n(oid)f(icalcomp)r(onen)n(t_strip_errors\(\))d(Remo)n(v)n(e)j(all)g
-(error)f(prop)r(erties)h(in)h(a)f(comp)r(onen)n(t)h(v)n(oid)f(ical-)0
-5709 y(comp)r(onen)n(t_con)n(v)n(ert_errors\(\))18 b(Con)n(v)n(ert)k
-(some)g(error)f(prop)r(erties)h(in)n(to)h(REQUEST-ST)-7
-b(A)g(TUS)24 b(prop)r(erties)e(to)h(indicate)0 5823 y(the)28
-b(inabilit)n(y)f(to)h(pro)r(cess)e(the)i(comp)r(onen)n(t)f(as)g(an)h
-(iTIP)g(request.)p eop
-%%Page: 10 10
-10 9 bop 0 -167 3900 5 v 0 -200 a Fb(7.)73 b(Useful)32
-b(Recipies)3026 b Fh(10)0 162 y Fc(6.6)112 b(Naming)36
-b(Standard)0 372 y Fh(Structures)26 b(that)i(y)n(ou)e(access)f(with)j
+2241 y(There)g(are)g(a)g(few)h(routines)e(to)i(manipulate)f(error)f
+(prop)r(erties:)0 2397 y(Routine)i(Purp)r(ose)f(v)n(oid)g
+(icalrestriction_c)n(hec)n(k\(\))e(Chec)n(k)i(a)g(comp)r(onen)n(t)g
+(against)g(RF)n(C2446)e(and)j(insert)0 2554 y(error)g(prop)r(erties)g
+(to)i(indicate)f(non)g(compliance)g(in)n(t)h(icalcomp)r(onen)n(t_coun)n
+(t_errors\(\))c(Return)j(the)h(n)n(um)n(b)r(er)g(of)f(error)0
+2667 y(prop)r(erties)0 2824 y(in)f(a)f(comp)r(onen)n(t)g(v)n(oid)g
+(icalcomp)r(onen)n(t_strip_errors\(\))d(Remo)n(v)n(e)i(all)i(error)d
+(prop)r(erties)i(in)h(as)0 2980 y(comp)r(onen)n(t)f(v)n(oid)g(icalcomp)
+r(onen)n(t_con)n(v)n(ert_errors\(\))c(Con)n(v)n(ert)j(some)h(error)e
+(prop)r(erties)i(in)n(to)0 3137 y(REQUESTS-ST)-7 b(A)g(TUS)29
+b(to)f(indicate)f(the)h(inabilit)n(y)g(to)0 3293 y(pro)r(cess)e(the)i
+(comp)r(onen)n(t)g(as)e(an)i(iTIP)g(request.)0 3450 y(The)g(t)n(yp)r
+(es)f(of)h(errors)d(are)i(listed)g(in)h(icalerror.h.)35
+b(They)27 b(are:)0 3669 y Fc(ICAL_XLICERRORTY)o(PE)o(_CO)o(MP)o(ON)o
+(ENT)o(PA)o(RS)o(EER)o(RO)o(R)0 3782 y(ICAL_XLICERRORTY)o(PE)o(_PA)o
+(RA)o(ME)o(TER)o(VA)o(LU)o(EPA)o(RS)o(EE)o(RRO)o(R)0
+3896 y(ICAL_XLICERRORTY)o(PE)o(_PA)o(RA)o(ME)o(TER)o(NA)o(ME)o(PAR)o
+(SE)o(ER)o(ROR)0 4009 y(ICAL_XLICERRORTY)o(PE)o(_PR)o(OP)o(ER)o(TYP)o
+(AR)o(SE)o(ERR)o(OR)0 4123 y(ICAL_XLICERRORTY)o(PE)o(_VA)o(LU)o(EP)o
+(ARS)o(EE)o(RR)o(OR)0 4237 y(ICAL_XLICERRORTY)o(PE)o(_UN)o(KV)o(CA)o
+(LPR)o(OP)0 4350 y(ICAL_XLICERRORTY)o(PE)o(_IN)o(VA)o(LI)o(DIT)o(IP)0
+4569 y Ff(The)46 b(libical)f(parser)f(will)i(generate)e(the)i(error)d
+(that)j(end)g(in)g(P)-7 b(ARSEERR)n(OR)47 b(when)e(it)h(encoun)n(ters)f
+(garbage)e(in)0 4683 y(the)d(input)g(steam.)72 b(ICAL_XLICERR)n(OR)-7
+b(TYPE_INV)e(ALIDITIP)42 b(is)d(inserted)g(b)n(y)g(icalrestriction_c)n
+(hec)n(k\(\),)h(and)0 4796 y(ICAL_XLICERR)n(OR)-7 b(TYPE_UNKV)n(CALPR)n
+(OP)21 b(is)e(generated)f(b)n(y)i(icalv)n(cal_con)n(v)n(ert\(\))c(when)
+k(it)g(encoun)n(ters)f(a)g(vCal)0 4910 y(prop)r(ert)n(y)26
+b(that)i(it)g(cannot)f(con)n(v)n(ert)f(or)h(do)r(es)g(not)h(kno)n(w)f
+(ab)r(out.)0 5066 y(Icalcomp)r(onen)n(t_con)n(v)n(ert_errors\(\))37
+b(con)n(v)n(erts)j(some)i(of)g(the)g(error)f(prop)r(erties)g(ina)h
+(comp)r(onen)n(t)g(in)n(to)f(REQUEST-)0 5180 y(ST)-7
+b(A)g(TUS)29 b(prop)r(erties)e(that)h(indicate)g(a)g(failure.)38
+b(As)28 b(of)g(libical)g(v)n(ersion0.18,)e(this)i(routine)g(only)f(con)
+n(v)n(ert)g(*P)-7 b(ARSEER-)0 5294 y(R)n(OR)29 b(errors)d(and)j(it)h
+(alw)n(a)n(ys)d(generates)h(a)g(3.x)h(\()g(failure)g(\))g(co)r(de.)42
+b(This)29 b(mak)n(es)f(it)h(more)f(of)h(a)g(go)r(o)r(d)g(idea)f(than)h
+(a)g(really)0 5407 y(useful)f(bit)g(of)g(co)r(de.)p eop
+%%Page: 18 18
+18 17 bop 0 -167 3900 5 v 0 -200 a Fd(7.)73 b(Useful)32
+b(Recipies)3026 b Ff(18)0 162 y Fb(6.7)112 b(Naming)36
+b(Standard)0 372 y Ff(Structures)26 b(that)i(y)n(ou)e(access)f(with)j
(the)f("struct")f(k)n(eyw)n(ord,)f(suc)n(h)h(as)h("struct)f(icaltimet)n
(yp)r(e")g(are)g(things)h(that)g(y)n(ou)f(are)0 485 y(allo)n(w)n(ed)g
(to)i(see)f(inside)g(and)h(p)r(ok)n(e)f(at.)0 642 y(Structures)33
@@ -1577,28 +2088,28 @@ b(Ho)n(w)n(ev)n(er,)0 1139 y(they)34 b(lo)r(ok)f(and)g(act)h(lik)n(e)f
(libical.)55 b(Names)33 b(that)h(start)f(with)h("XLIC")f(or)0
1253 y("X-LIC")26 b(are)h(not)h(part)f(of)g(an)n(y)g(iCal)g(sp)r(ec.)37
b(They)27 b(are)g(used)h(in)n(ternally)e(b)n(y)i(libical.)0
-1409 y(En)n(ums)d(that)f(iden)n(tify)h(a)f(comp)r(onen)n(t,)h(prop)r
-(ert)n(y)-7 b(,)24 b(v)-5 b(alue)24 b(or)g(parameter)e(end)j(with)g
-("_COMPONENT,")e("_PR)n(OPER-)0 1523 y(TY,")k("_V)-9
-b(ALUE,")28 b(or)e("_P)-7 b(ARAMETER"s)0 1679 y(En)n(ums)31
-b(that)f(iden)n(tify)h(a)f(parameter)f(v)-5 b(alue)30
-b(ha)n(v)n(e)f(the)i(name)f(of)h(the)f(parameter)f(as)h(the)h(second)e
-(w)n(ord.)45 b(F)-7 b(or)29 b(instance:)0 1793 y(ICAL_R)n(OLE_REQP)-7
-b(AR)g(TICIP)g(ANT)29 b(or)d(ICAL_P)-7 b(AR)g(TST)g(A)g(T_A)n(CCEPTED.)
-0 1949 y(The)28 b(en)n(ums)f(for)g(the)h(parts)f(of)g(a)g(recurarance)e
-(rule)j(and)f(request)g(statuses)g(are)f(irregular.)0
-2287 y Fe(7)131 b(Useful)44 b(Recipies)0 2526 y Fh(Iteration)0
-2683 y(Cop)n(ying)24 b(comp)r(onen)n(ts.)36 b(Remem)n(b)r(er)25
-b(that)g(y)n(ou)g(m)n(ust)g(clone)g(or)f(remo)n(v)n(e)g(an)h(ob)5
-b(ject)25 b(b)r(efore)g(putting)h(in)f(on)h(another)e(list.)0
-2839 y(Finding)k(compliance)f(errors)0 3177 y Fe(8)131
-b(P)l(erformance)0 3416 y Fh(Chec)n(king)27 b(restrictions)f(is)h
-(computationally)g(exp)r(ensiv)n(e.)0 3754 y Fe(9)131
-b(Hac)l(ks)45 b(and)e(Bugs)0 3993 y Fh(There)22 b(are)f(a)g(lot)h(of)g
-(hac)n(ks)f(in)i(the)f(library)f(\025)h(bits)g(of)g(co)r(de)g(that)g(I)
-g(am)g(not)g(proud)g(of)g(and)g(should)g(propbably)f(b)r(e)h(c)n
-(hanged.)0 4107 y(These)27 b(are)g(mark)n(ed)f(with)i(the)g(commen)n(t)
-g(string)e("HA)n(CK.")p eop
+1409 y(En)n(ums)34 b(that)h(iden)n(tify)f(a)g(comp)r(onen)n(t,)h(prop)r
+(ert)n(y)-7 b(,)35 b(v)-5 b(alue)33 b(or)h(parameter)e(end)i(with)h
+("_COMPONENT,")e("_PR)n(OP-)0 1523 y(ER)-7 b(TY,")28
+b("_V)-9 b(ALUE,")27 b(or)g("_P)-7 b(ARAMETER"s)0 1679
+y(En)n(ums)31 b(that)f(iden)n(tify)h(a)f(parameter)f(v)-5
+b(alue)30 b(ha)n(v)n(e)f(the)i(name)f(of)h(the)f(parameter)f(as)h(the)h
+(second)e(w)n(ord.)45 b(F)-7 b(or)29 b(instance:)0 1793
+y(ICAL_R)n(OLE_REQP)-7 b(AR)g(TICIP)g(ANT)29 b(or)d(ICAL_P)-7
+b(AR)g(TST)g(A)g(T_A)n(CCEPTED.)0 1949 y(The)28 b(en)n(ums)f(for)g(the)
+h(parts)f(of)g(a)g(recurarance)e(rule)j(and)f(request)g(statuses)g(are)
+f(irregular.)0 2287 y Fe(7)131 b(Useful)44 b(Recipies)0
+2526 y Ff(Iteration)0 2683 y(Cop)n(ying)24 b(comp)r(onen)n(ts.)36
+b(Remem)n(b)r(er)25 b(that)g(y)n(ou)g(m)n(ust)g(clone)g(or)f(remo)n(v)n
+(e)g(an)h(ob)5 b(ject)25 b(b)r(efore)g(putting)h(in)f(on)h(another)e
+(list.)0 2839 y(Finding)k(compliance)f(errors)0 3177
+y Fe(8)131 b(P)l(erformance)0 3416 y Ff(Chec)n(king)27
+b(restrictions)f(is)h(computationally)g(exp)r(ensiv)n(e.)0
+3754 y Fe(9)131 b(Hac)l(ks)45 b(and)e(Bugs)0 3993 y Ff(There)22
+b(are)f(a)g(lot)h(of)g(hac)n(ks)f(in)i(the)f(library)f(\025)h(bits)g
+(of)g(co)r(de)g(that)g(I)g(am)g(not)g(proud)g(of)g(and)g(should)g
+(propbably)f(b)r(e)h(c)n(hanged.)0 4107 y(These)27 b(are)g(mark)n(ed)f
+(with)i(the)g(commen)n(t)g(string)e("HA)n(CK.")p eop
%%Trailer
end
userdict /end-hook known{end-hook}if
diff --git a/libical/doc/UsingLibical.txt b/libical/doc/UsingLibical.txt
index de803cbfde..ea5726f401 100644
--- a/libical/doc/UsingLibical.txt
+++ b/libical/doc/UsingLibical.txt
@@ -4,9 +4,9 @@ Using Libical
Eric Busboom (eric@softwarestudio.org)
-May 2000
+November 2000
+
-\tableofcontents{}
1 Introduction
@@ -54,14 +54,20 @@ my version of the library if they are similarly dual-licensed.
1.3 Example Code
A lot of the documentation for this library is in the form of example
-code. These examples are in the ``examples'' directory of the distribution.
-Also look in ``src/test'' for more annotated examples.
+code. These examples are in the "examples" directory of the distribution.
+Also look in "src/test" for more annotated examples.
2 Building the Library
Libical uses autoconf to generate makefiles, although it uses none
of the autoconf flags to influence the compilation. It should built
-with no adjustments on Linux, FreeBSD and Solaris.
+with no adjustments on Linux, FreeBSD and Solaris under gcc. Some
+version have been successfully been build on MacOS, Solaris and UnixWare
+without gcc, but you may run into problems with a particular later
+version.
+
+For a more complete guide to building the library, see the README file
+in the distribution.
3 Structure
@@ -75,8 +81,8 @@ content line
ORGANIZER;ROLE=CHAIR:MAILTO:mrbig@host.com
-The property name is ``ORGANIZER,'' the value of the property is ``mrbig@host.com''
-and the ``ROLE'' parameter specifies that Mr Big is the chair of the
+The property name is "ORGANIZER," the value of the property is "mrbig@host.com"
+and the "ROLE" parameter specifies that Mr Big is the chair of the
meetings associated with this property.
Components are groups of properties that represent the core objects
@@ -84,9 +90,10 @@ of a calendar system, such as events or timezones.
The central goal of libical is to parse iTIP data into an internal
representation of Components, Properties, Parameters an Values, and
-to allow the user to manipulate the data in various ways ([fig] \includegraphics{icaluml.eps} ) When
-a component is sent across a network, if it is un-encrypted, it will
-look something like:
+to allow the user to manipulate the data in various ways
+
+When a component is sent across a network, if it is un-encrypted, it
+will look something like:
BEGIN:VEVENT
@@ -137,7 +144,7 @@ structures, classes that aid in creating and using iCal components.
3.2.2 Types
-3.2.3 The Parser
+3.2.3 The parser
3.2.4 Restrictions
@@ -163,11 +170,11 @@ like components, but are not defined as components in the specification.
XDAYLIGHT and XSTANDARD are notable examples. These pseudo components
group properties within the VTIMEZONE components. For instanace, the
timezone properties associated with daylight savings time starts with
-``BEGIN:DAYLIGHT'' and ends with ``END:DAYLIGHT, just like other components,
+"BEGIN:DAYLIGHT" and ends with "END:DAYLIGHT, just like other components,
but is not defined as a component in RFC2445. ( See RFC2445, page
61 ) In Libical,this grouping is represented by the XDAYLIGHT component.
-Standard iCAL components all start with the letter ``V,'' while pseudo
-components start with''X.''
+Standard iCAL components all start with the letter "V," while pseudo
+components start with"X."
There are also pseudo components that are conceptually derived classess
of VALARM. RFC2446 defines what properties may be included in each
@@ -175,8 +182,8 @@ component, and for VALARM, the set of properties it may have depends
on the value of the ACTION property.
For instance, if a VALARM component has an ACTION property with the
-value of ``AUDIO,'' the component must also have an ``ATTACH'' property.
-However, if the ACTION value is ``DISPLAY,'' the component must have
+value of "AUDIO," the component must also have an "ATTACH" property.
+However, if the ACTION value is "DISPLAY," the component must have
a DESCRIPTION property.
To handle these various, complex restrictions, libical has pseudo components
@@ -266,14 +273,14 @@ icalcomponent_add_property(event,prop);
While we are on this example, you should notice that libical uses a
semi-object-oriented style of interface. Most things you work with
-are objects, that are instantiated with a constructor that has ``new''
+are objects, that are instantiated with a constructor that has "new"
in the name. Also note that, other than the object reference, most
structure data is passed in to libical routines by value. Strings,
of course, are passed in by reference, but libical will take ownership
of the memory, so you had beter strdup() the data unless you want
a core dump when the memory is freed for the second time. Libical
has some complex but very regular memory handling rules. These are
-detailed in section \ref{sec:memory}.
+detailed in section [sec:memory].
If any of the constructors fail, they will return 0. If you try to
insert 0 into a property or component, or use a zero-valued object
@@ -296,7 +303,9 @@ of text.
icalproperty_new_version(strdup("2.0")),
- icalproperty_new_prodid(strdup("-//RDU Software//NONSGML HandCal//EN")),
+ icalproperty_new_prodid(strdup(
+
+ "-//RDU Software//NONSGML HandCal//EN")),
icalcomponent_vanew(
@@ -320,7 +329,9 @@ of text.
strdup("employee-A@host.com"),
- icalparameter_new_role(ICAL_ROLE_REQPARTICIPANT),
+ icalparameter_new_role(
+
+ ICAL_ROLE_REQPARTICIPANT),
icalparameter_new_rsvp(1),
@@ -330,7 +341,9 @@ of text.
),
- icalproperty_new_location(strdup("1CP Conference Room 4350")),
+ icalproperty_new_location(strdup(
+
+ "1CP Conference Room 4350")),
0
@@ -341,8 +354,8 @@ of text.
);
This form is similar to the regular constructor, except that they have
-``vanew'' instead of ``new'' in the name. The arguments are similar
-too, except that the component contstructor can have a list of properties,
+"vanew" instead of "new" in the name. The arguments are similar too,
+except that the component contstructor can have a list of properties,
and the property constructor can have a list or parameters. Be sure
to terminate every list with a '0', or your code will crash, if you
are lucky.
@@ -432,7 +445,8 @@ is a convienience routine;
icalcomponent* icalparser_parse(icalparser *parser,
- char* (*line_gen_func)(char *s, size_t size, void* d))
+ char* (*line_gen_func)(char *s, size_t sise, void*
+d))
To use this routine, you still must construct the parser object and
pass in a reference to a line reading routine. If the parser can create
@@ -456,9 +470,9 @@ To find a sub-component of a component, use:
icalcomponent* icalcomponent_get_first_component(
- icalcomponent* component,
+ icalcomponent* component,
- icalcomponent_kind kind);
+ icalcomponent_kind kind);
This routine will return a reference to the first component of the
type 'kind.' The key kind values, listed in icalenums.h are:
@@ -491,7 +505,9 @@ the first:
icalcomponent* icalcomponent_get_next_component(
- icalcomponent* component, icalcomponent_kind kind);
+ icalcomponent* component,
+
+ icalcomponent_kind kind);
With the 'first' and 'next' routines, you can create a for loop to
iterate through all of a components subcomponents
@@ -500,7 +516,7 @@ iterate through all of a components subcomponents
c != 0;
- c = icalcomponent_get_next_component(comp,ICAL_ANY_COMPONENT))
+ c = icalcomponent_get_next_component(comp,ICAL_ANY_COMPONENT))
{
@@ -512,16 +528,68 @@ This code bit wil iterate through all of the subcomponents in 'comp'
but you can select a specific type of component by changing ICAL_ANY_COMPONENT
to another component type.
-6.2.3 Removing Components
+6.2.3 Using Component Iterators
+
+The iteration model in the previous section requires the component
+to keep the state of the iteration. So, you could not use this model
+to perform a sorting operations, since you'd need two iterators and
+there is only space for one. If you ever call icalcomponent_get_first_component()
+which an iteration is in progress, the pointer will be reset to the
+beginning.
+
+To solve this problem, there are also external iterators for components.
+The routines associated with these external iterators are:
+
+icalcompiter icalcomponent_begin_component(icalcomponent* component,
+icalcomponent_kind kind);
+
+icalcompiter icalcomponent_end_component(icalcomponent* component,
+icalcomponent_kind kind);
+
+icalcomponent* icalcompiter_next(icalcompiter* i);
+
+icalcomponent* icalcompiter_prior(icalcompiter* i);
+
+icalcomponent* icalcompiter_deref(icalcompiter* i);
+
+The _begin_() and _end_() routines return a new iterator that points
+to the begining and ending of the list of subcomponent for the given
+component, and the kind argument works like the kind argument for
+internal iterators.
+
+After creating an iterators, use _next_() and _prior_() to step forward
+and backward through the list and get the component that the iterator
+points to, and use _deref() to return the component that the iterator
+points to without moving the iterator. All routines will return 0
+when they move to point off the end of the list.
+
+Here is an example of a loop using these routines:
+
+for(
+
+ i = icalcomponent_begin_component(impl->cluster,ICAL_ANY_COMPONENT);
+
+ icalcompiter_deref(&i)!= 0;
+
+ icalcompiter_next(&i)
+
+) {
+
+ icalcomponent *this = icalcompiter_deref(&i);
+
+}
+
+6.2.4 Removing Components
Libical component have internal iterators, so you can only have one
iteration over a component at a time. Removing an element from a list
while iterating through the list can cause problems, since you will
probably be removing the element that the internal iterator points
-to. This will result in the iteration loop terminating immediately
-after removing the element. To avoid the problem, you will need to
-step the iterator ahead of the element you are going to remove, like
-this:
+to. The _remove() routine will keep the iterator valid by moving it
+to the next component, but in a normal loop, this will result in two
+advances per iteration, and you will remove only every other component.
+ To avoid the problem, you will need to step the iterator ahead of
+the element you are going to remove, like this:
for(c = icalcomponent_get_first_component(parent_comp,ICAL_ANY_COMPONENT);
@@ -537,7 +605,28 @@ for(c = icalcomponent_get_first_component(parent_comp,ICAL_ANY_COMPONENT);
}
-6.2.4 Working with properties and parameters
+Another way to remove components is to rely on the side effect of icalcomponent_remove_component:
+if component iterator in the parent component is pointing to the child
+that will be removed, it will move the iterator to the component after
+the child. The following code will exploit this behavior:
+
+icalcomponent_get_first_component(parent_comp,ICAL_VEVENT_COMPONENT);
+
+while((c=icalcomponent_get_current_component(c)) != 0 ){
+
+ if(icalcomponent_isa(c) == ICAL_VEVENT_COMPONENT){
+
+ icalcomponent_remove_component(parent_comp,inner);
+
+ } else {
+
+ icalcomponent_get_next_component(parent_comp,ICAL_VEVENT_COMPONENT);
+
+ }
+
+}
+
+6.2.5 Working with properties and parameters
Finding, iterating and removing properties works the same as it does
for components, using the property-specific or parameter-specific
@@ -591,17 +680,55 @@ void icalproperty_remove_parameter(
icalparameter_kind kind);
-6.2.5 Getting Values
+6.2.6 Working with values
+
+Values are typically part of a property, although they can exist on
+their own. You can maniplulate them either as part of the property
+or independantly.
+
+The most common way to work with values to is to maniplate them from
+they properties that contain them. This involves fewer routine calls
+and intermediate variables than working with them independently, and
+it is type-safe.
+
+For each property, there are a _get_ and a _set_ routine that access
+the internal value. For instnace, for the UID property, the routines
+are:
+
+void icalproperty_set_uid(icalproperty* prop, const char* v)
+
+const char* icalproperty_get_uid(icalproperty* prop)
+
+For multivalued properties, like ATTACH, the value type is usually
+a struct or union that holds both possible types.
+
+If you want to work with the underlying value object, you can get and
+set it with:
-6.2.6 Setting Values
+icalvalue* icalproperty_get_value (icalproperty* prop)
-6.2.7 Getting Parameters
+void icalproperty_set_value(icalproperty* prop, icalvalue* value);
-6.2.8 Setting Parameters
+Icalproperty_get_value() will return a reference that you can manipluate
+with other icalvalue routines. Most of the time, you will have to
+know what the type of the value is. For instance, if you know that
+the value is a DATETIME type, you can manipluate it with:
-6.2.9 Removing Parameters
+struct icaltimetype icalvalue_get_datetime(icalvalue* value);
-6.2.10 Checking Component Validity
+void icalvalue_set_datetime(icalvalue* value, struct icaltimetype v);
+
+When working with an extension property or value (and X-PROPERTY or
+a property that has the parameter VALUE=x-name ) the value type is
+always a string. To get and set the value, use:
+
+void icalproperty_set_x(icalproperty* prop, char* v);
+
+char* icalproperty_get_x(icalproperty* prop);
+
+6.2.7 Working with parameters
+
+6.2.8 Checking Component Validity
RFC 2446 defines rules for what properties must exist in a component
to be used for transfering scheduling data. Most of these rules relate
@@ -609,7 +736,7 @@ to the existence of properties relative to the METHOD property, which
declares what operation a remote reciever should use to process a
component. For instance, if the METHOD is REQUEST and the component
is a VEVENT, the sender is probably asking the reciever to join in
-a meeting. I this case, RFC2446 says that the component must specify
+a meeting. In this case, RFC2446 says that the component must specify
a start time (DTSTART) and list the reciever as an attendee (ATTENDEE).
Libical can check these restrictions with the routine:
@@ -624,7 +751,7 @@ When this routine runs, it will insert new properties into the component
to indicate any errors it finds. See section 6.5.3, X-LIC-ERROR for
more information about these error properties.
-6.2.11 Converting Components to Text
+6.2.9 Converting Components to Text
To create an RFC2445 compliant text representtion of an object, use
one of the *_as_ical_string() routines:
@@ -642,21 +769,125 @@ it will cascade and convert all of the parameters, properties and
values that are attached to the root component.
Icalproperty_as_ical_string() will terminate each line with the RFC2445
-specified line terminator ``\r\n'' However, if you compile with the
-symbol ICAL_UNIX_NEWLINE defined, it will terminate lines with ``\n''
+specified line terminator "\r\n" However, if you compile with the symbol
+ICAL_UNIX_NEWLINE defined, it will terminate lines with "\n"
Remember that the string returned by these routines is owned by the
library, and will eventually be re-written. You should copy it if
you want to preserve it.
-6.3 Storing Objects
+6.3 Time
+
+6.3.1 Time structure
+
+LIbical defines it's own time structure for storing all dates and times.
+It would have been nice to re-use the C library's struct tm, but that
+structure does not differentiate between dates and times, and between
+local time and UTC. The libical structure is:
+
+struct icaltimetype {
+
+ int year;
+
+ int month;
+
+ int day;
+
+ int hour;
+
+ int minute;
+
+ int second;
+
+ int is_utc; /* 1-> time is in UTC timezone */
+
+ int is_date; /* 1 -> interpret this as date. */ };
+
+The year, month, day, hour, minute and second fields how the broken-out
+time values. The is_utc field distinguishes between times UTC and
+a local time zone. The is_date field indicates if the intra-day fields
+hold valid data.
+
+6.3.2 Time manipulating routines
+
+The null time value is used to indicate that the data in the structure
+is not a valid time.
+
+struct icaltimetype icaltime_null_time(void);
+
+int icaltime_is_null_time(struct icaltimetype t);
+
+It is sensible for the broken-out time fields to contain values that
+are not permitted in an ISO compliant time string. For instance, the
+seconds field can hold values greater than 59, and the hours field
+can hold values larger than 24. The excessive values will be rolled
+over into the next larger field when the structure is normalized.
+
+struct icaltimetype icaltime_normalize(struct icaltimetype t);
+
+There are several routines to get the day of the week or month, etc,
+from a time structure.
+
+short icaltime_day_of_year(struct icaltimetype t);
+
+struct icaltimetype icaltime_from_day_of_year(short doy, short year);
+
+short icaltime_day_of_week(struct icaltimetype t);
+
+short icaltime_start_doy_of_week(struct icaltimetype t);
+
+short icaltime_week_number(short day_of_month, short month, short year);
+
+struct icaltimetype icaltime_from_week_number(short week_number, short
+year);
+
+short icaltime_days_in_month(short month,short year);
+
+Two routines convert time structures to and from the number of seconds
+since the POSIX epoch. The is_date field indicates wether or not the
+hour, minute and second fields should be used in the conversion, and
+is_utc indicates if the value should be converted to a local time
+or a UTC time, using the operating system suppled notion of the local
+timezone.
+
+struct icaltimetype icaltime_from_timet(time_t v, int is_date, int
+is_utc);
+
+time_t icaltime_as_timet(struct icaltimetype);
+
+The compare routine works exactly like strcmp, but on time structures.
+
+int icaltime_compare(struct icaltimetype a,struct icaltimetype b);
+
+The following routines convert between UTC and a named timezone. The
+tzid field must be a timezone name from the Olsen database, such as
+"America/Los_Angeles."
+
+The utc_offset routine returns the offset of the named time zone from
+UTC, in seconds.
+
+The tt parmeter in the fonllowing routines indicates the date on which
+the conversion should be made. The tt parameter is necessary because
+timezones have many different rules for when daylight savings time
+is used, and these rules can change over time. So, for a single timezone
+one year may have daylight savings time on March 15, but for other
+years March 15 may be standard time, and some years may have standard
+time all year.
+
+int icaltime_utc_offset(struct icaltimetype tt, char* tzid)
+
+struct icaltimetype icaltime_as_utc(struct icaltimetype tt,char* tzid);
+
+struct icaltimetype icaltime_as_zone(struct icaltimetype tt,char* tzid);
+
+6.4 Storing Objects
The libical distribution inclues a seperate library, libicalss, that
allows you to store iCal component data to disk in a variety of ways.
This library is documented seperately. ( & currently, not at all.
)
-6.4 \label{sec:memory}Memory Management
+6.5 <sec:memory>Memory Management
Libical relies heavily on dynamic allocation for both the core objects
and for the strings used to hold values. Some of this memory the library
@@ -683,19 +914,19 @@ library. Here is a summary of the memory rules.
put it on a ring buffer to reclaim later. You'd better strdup()
it if you want to keep it, and you don't have to delete it.
-6.5 Error Handling
+6.6 Error Handling
Libical has several error handling mechanisms for the varioustypes
of programming, semantic and syntactic errors you may encounter.
-6.5.1 Return values
+6.6.1 Return values
Many library routines signal errors through their return values. All
routines that return a pointer, such as icalcomponent_new(), will
return 0 ( zero ) on a fatal error. Some routines will return a value
of enum icalerrorenum.
-6.5.2 icalerrno
+6.6.2 icalerrno
Most routines will set the global error value icalerrno on errors.
This variable is an enumeration; permissable values can be found in
@@ -703,7 +934,7 @@ libical/icalerror.h. If the routine returns an enum icalerrorenum,
then the return value will be the same as icalerrno. You can use icalerror_strerror()
to get a string that describes the error
-6.5.3 X-LIC-ERROR and X-LIC-INVALID-COMPONENT
+6.6.3 X-LIC-ERROR and X-LIC-INVALID-COMPONENT
The library handles semantic and syntactic errors in components by
inserting errors properties into the components. If the parser cannot
@@ -723,27 +954,27 @@ RFC2445.
There are a few routines to manipulate error properties:
-+------------------------------------+--------------------------------+
-|Routine | Purpose |
-+------------------------------------+--------------------------------+
-+------------------------------------+--------------------------------+
-|void icalrestriction_check() | Check a component against |
-| | RFC2446 and insert error prop­ |
-| | erties to indicate non compli­ |
-| | ance |
-|int icalcomponent_count_errors() | Return the number of error |
-| | properties in a component |
-|void icalcomponent_strip_errors() | Remove all error properties in |
-| | as component |
-+------------------------------------+--------------------------------+
-|void icalcomponent_convert_errors() | Convert some error properties |
-| | into REQUESTS-STATUS to indi­ |
-| | cate the inability to process |
-| | the component as an iTIP re­ |
-| | quest. |
-+------------------------------------+--------------------------------+
-| | |
-+------------------------------------+--------------------------------+
++-------------------------------------+-----------------------------------------------+
+| Routine | Purpose |
++-------------------------------------+-----------------------------------------------+
+| void icalrestriction_check() | Check a component against RFC2446 and insert |
++-------------------------------------+-----------------------------------------------+
+| | error properties to indicate non compliance |
++-------------------------------------+-----------------------------------------------+
+| int icalcomponent_count_errors() | Return the number of error properties |
++-------------------------------------+-----------------------------------------------+
+| | in a component |
++-------------------------------------+-----------------------------------------------+
+| void icalcomponent_strip_errors() | Remove all error properties in as |
++-------------------------------------+-----------------------------------------------+
+| | component |
++-------------------------------------+-----------------------------------------------+
+| void icalcomponent_convert_errors() | Convert some error properties into |
++-------------------------------------+-----------------------------------------------+
+| | REQUESTS-STATUS to indicate the inability to |
++-------------------------------------+-----------------------------------------------+
+| | process the component as an iTIP request. |
++-------------------------------------+-----------------------------------------------+
The types of errors are listed in icalerror.h. They are:
@@ -774,24 +1005,24 @@ As of libical version0.18, this routine only convert *PARSEERROR errors
and it always generates a 3.x ( failure ) code. This makes it more
of a good idea than a really useful bit of code.
-6.6 Naming Standard
+6.7 Naming Standard
-Structures that you access with the ``struct'' keyword, such as ``struct
-icaltimetype'' are things that you are allowed to see inside and poke
+Structures that you access with the "struct" keyword, such as "struct
+icaltimetype" are things that you are allowed to see inside and poke
at.
-Structures that you access though a typedef, such as ``icalcomponent''
+Structures that you access though a typedef, such as "icalcomponent"
are things where all of the data is hidden.
-Component names that start with ``V'' are part of RFC 2445 or another
-iCal standard. Component names that start with ``X'' are also part
-of the spec, but they are not actually components in the spec. However,
+Component names that start with "V" are part of RFC 2445 or another
+iCal standard. Component names that start with "X" are also part of
+the spec, but they are not actually components in the spec. However,
they look and act like components, so they are components in libical.
-Names that start with ``XLIC'' or ``X-LIC'' are not part of any iCal
-spec. They are used internally by libical.
+Names that start with "XLIC" or "X-LIC" are not part of any iCal spec.
+They are used internally by libical.
Enums that identify a component, property, value or parameter end with
-``_COMPONENT,'' ``_PROPERTY,'' ``_VALUE,'' or ``_PARAMETER''s
+"_COMPONENT," "_PROPERTY," "_VALUE," or "_PARAMETER"s
Enums that identify a parameter value have the name of the parameter
as the second word. For instance: ICAL_ROLE_REQPARTICIPANT or ICAL_PARTSTAT_ACCEPTED.
@@ -816,4 +1047,4 @@ Checking restrictions is computationally expensive.
There are a lot of hacks in the library -- bits of code that I am not
proud of and should propbably be changed. These are marked with the
-comment string ``HACK.''
+comment string "HACK."
diff --git a/libical/examples/Makefile.am b/libical/examples/Makefile.am
index f18663723d..8636c318b4 100644
--- a/libical/examples/Makefile.am
+++ b/libical/examples/Makefile.am
@@ -1,8 +1,9 @@
noinst_PROGRAMS = doesnothing
-LDADD = ../src/libical/libical.a ../src/libicalss/libicalss.a ../src/libicalvcal/libicalvcal.a
-INCLUDES = -I . -I../src/libical -I../src/libicalss -I../src/libicalvcal
+LDADD = ../src/libical/libical.la ../src/libicalss/libicalss.la ../src/libicalvcal/libicalvcal.la
+
+INCLUDES = -I . -I../src/libical -I$(srcdir)/../src/libical -I../src/libicalss -I../src/libicalvcal
doesnothing_SOURCES = \
access_components.c \
diff --git a/libical/examples/Makefile.in b/libical/examples/Makefile.in
index 74aabc1016..d28e4cf461 100644
--- a/libical/examples/Makefile.in
+++ b/libical/examples/Makefile.in
@@ -57,11 +57,18 @@ POST_INSTALL = :
NORMAL_UNINSTALL = :
PRE_UNINSTALL = :
POST_UNINSTALL = :
+host_alias = @host_alias@
+host_triplet = @host@
AR = @AR@
+AS = @AS@
CC = @CC@
+DLLTOOL = @DLLTOOL@
LEX = @LEX@
+LIBTOOL = @LIBTOOL@
LN_S = @LN_S@
+MAINT = @MAINT@
MAKEINFO = @MAKEINFO@
+OBJDUMP = @OBJDUMP@
PACKAGE = @PACKAGE@
RANLIB = @RANLIB@
VERSION = @VERSION@
@@ -69,8 +76,9 @@ YACC = @YACC@
noinst_PROGRAMS = doesnothing
-LDADD = ../src/libical/libical.a ../src/libicalss/libicalss.a ../src/libicalvcal/libicalvcal.a
-INCLUDES = -I . -I../src/libical -I../src/libicalss -I../src/libicalvcal
+LDADD = ../src/libical/libical.la ../src/libicalss/libicalss.la ../src/libicalvcal/libicalvcal.la
+
+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 errors.c main.c parse_text.c
@@ -87,13 +95,14 @@ LIBS = @LIBS@
doesnothing_OBJECTS = access_components.o \
access_properties_and_parameters.o errors.o main.o parse_text.o
doesnothing_LDADD = $(LDADD)
-doesnothing_DEPENDENCIES = ../src/libical/libical.a \
-../src/libicalss/libicalss.a ../src/libicalvcal/libicalvcal.a
+doesnothing_DEPENDENCIES = ../src/libical/libical.la \
+../src/libicalss/libicalss.la ../src/libicalvcal/libicalvcal.la
doesnothing_LDFLAGS =
CFLAGS = @CFLAGS@
COMPILE = $(CC) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
+LTCOMPILE = $(LIBTOOL) --mode=compile $(CC) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
CCLD = $(CC)
-LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(LDFLAGS) -o $@
+LINK = $(LIBTOOL) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(LDFLAGS) -o $@
DIST_COMMON = Makefile.am Makefile.in
@@ -106,8 +115,8 @@ OBJECTS = $(doesnothing_OBJECTS)
all: all-redirect
.SUFFIXES:
-.SUFFIXES: .S .c .o .s
-$(srcdir)/Makefile.in: Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4)
+.SUFFIXES: .S .c .lo .o .s
+$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4)
cd $(top_srcdir) && $(AUTOMAKE) --gnu --include-deps examples/Makefile
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
@@ -143,6 +152,25 @@ distclean-compile:
maintainer-clean-compile:
+.c.lo:
+ $(LIBTOOL) --mode=compile $(COMPILE) -c $<
+
+.s.lo:
+ $(LIBTOOL) --mode=compile $(COMPILE) -c $<
+
+.S.lo:
+ $(LIBTOOL) --mode=compile $(COMPILE) -c $<
+
+mostlyclean-libtool:
+ -rm -f *.lo
+
+clean-libtool:
+ -rm -rf .libs _libs
+
+distclean-libtool:
+
+maintainer-clean-libtool:
+
doesnothing: $(doesnothing_OBJECTS) $(doesnothing_DEPENDENCIES)
@rm -f doesnothing
$(LINK) $(doesnothing_LDFLAGS) $(doesnothing_OBJECTS) $(doesnothing_LDADD) $(LIBS)
@@ -191,40 +219,6 @@ distdir: $(DISTFILES)
|| cp -p $$d/$$file $(distdir)/$$file || :; \
fi; \
done
-access_components.o: access_components.c ../src/libical/ical.h \
- ../src/libical/icalversion.h ../src/libical/icalenums.h \
- ../src/libical/icalvalue.h ../src/libical/icaltypes.h \
- ../src/libical/icaltime.h ../src/libical/icalparameter.h \
- ../src/libical/icalproperty.h ../src/libical/icalcomponent.h \
- ../src/libical/pvl.h ../src/libical/icalparser.h \
- ../src/libical/icalmemory.h ../src/libical/icalerror.h \
- ../src/libical/icalrestriction.h ../src/libical/icalrecur.h
-access_properties_and_parameters.o: access_properties_and_parameters.c \
- ../src/libical/ical.h ../src/libical/icalversion.h \
- ../src/libical/icalenums.h ../src/libical/icalvalue.h \
- ../src/libical/icaltypes.h ../src/libical/icaltime.h \
- ../src/libical/icalparameter.h ../src/libical/icalproperty.h \
- ../src/libical/icalcomponent.h ../src/libical/pvl.h \
- ../src/libical/icalparser.h ../src/libical/icalmemory.h \
- ../src/libical/icalerror.h ../src/libical/icalrestriction.h \
- ../src/libical/icalrecur.h
-errors.o: errors.c ../src/libical/ical.h ../src/libical/icalversion.h \
- ../src/libical/icalenums.h ../src/libical/icalvalue.h \
- ../src/libical/icaltypes.h ../src/libical/icaltime.h \
- ../src/libical/icalparameter.h ../src/libical/icalproperty.h \
- ../src/libical/icalcomponent.h ../src/libical/pvl.h \
- ../src/libical/icalparser.h ../src/libical/icalmemory.h \
- ../src/libical/icalerror.h ../src/libical/icalrestriction.h \
- ../src/libical/icalrecur.h
-main.o: main.c
-parse_text.o: parse_text.c ../src/libical/ical.h \
- ../src/libical/icalversion.h ../src/libical/icalenums.h \
- ../src/libical/icalvalue.h ../src/libical/icaltypes.h \
- ../src/libical/icaltime.h ../src/libical/icalparameter.h \
- ../src/libical/icalproperty.h ../src/libical/icalcomponent.h \
- ../src/libical/pvl.h ../src/libical/icalparser.h \
- ../src/libical/icalmemory.h ../src/libical/icalerror.h \
- ../src/libical/icalrestriction.h ../src/libical/icalrecur.h
info-am:
info: info-am
@@ -262,23 +256,27 @@ distclean-generic:
maintainer-clean-generic:
mostlyclean-am: mostlyclean-noinstPROGRAMS mostlyclean-compile \
- mostlyclean-tags mostlyclean-generic
+ mostlyclean-libtool mostlyclean-tags \
+ mostlyclean-generic
mostlyclean: mostlyclean-am
-clean-am: clean-noinstPROGRAMS clean-compile clean-tags clean-generic \
- mostlyclean-am
+clean-am: clean-noinstPROGRAMS clean-compile clean-libtool clean-tags \
+ clean-generic mostlyclean-am
clean: clean-am
-distclean-am: distclean-noinstPROGRAMS distclean-compile distclean-tags \
- distclean-generic clean-am
+distclean-am: distclean-noinstPROGRAMS distclean-compile \
+ distclean-libtool distclean-tags distclean-generic \
+ clean-am
+ -rm -f libtool
distclean: distclean-am
maintainer-clean-am: maintainer-clean-noinstPROGRAMS \
- maintainer-clean-compile maintainer-clean-tags \
- maintainer-clean-generic distclean-am
+ maintainer-clean-compile maintainer-clean-libtool \
+ maintainer-clean-tags maintainer-clean-generic \
+ distclean-am
@echo "This command is intended for maintainers to use;"
@echo "it deletes files that may require special tools to rebuild."
@@ -287,13 +285,14 @@ maintainer-clean: maintainer-clean-am
.PHONY: mostlyclean-noinstPROGRAMS distclean-noinstPROGRAMS \
clean-noinstPROGRAMS maintainer-clean-noinstPROGRAMS \
mostlyclean-compile distclean-compile clean-compile \
-maintainer-clean-compile tags mostlyclean-tags distclean-tags \
-clean-tags maintainer-clean-tags distdir info-am info dvi-am dvi check \
-check-am installcheck-am installcheck install-exec-am install-exec \
-install-data-am install-data install-am install uninstall-am uninstall \
-all-redirect all-am all installdirs mostlyclean-generic \
-distclean-generic clean-generic maintainer-clean-generic clean \
-mostlyclean distclean maintainer-clean
+maintainer-clean-compile mostlyclean-libtool distclean-libtool \
+clean-libtool maintainer-clean-libtool tags mostlyclean-tags \
+distclean-tags clean-tags maintainer-clean-tags distdir info-am info \
+dvi-am dvi check check-am installcheck-am installcheck install-exec-am \
+install-exec install-data-am install-data install-am install \
+uninstall-am uninstall all-redirect all-am all installdirs \
+mostlyclean-generic distclean-generic clean-generic \
+maintainer-clean-generic clean mostlyclean distclean maintainer-clean
# Tell versions [3.59,3.63) of GNU make to not export all variables.
diff --git a/libical/examples/access_components.c b/libical/examples/access_components.c
index 6b655b42f7..18fc6a6144 100644
--- a/libical/examples/access_components.c
+++ b/libical/examples/access_components.c
@@ -9,6 +9,8 @@
#include <time.h> /* for time() */
#include "icalmemory.h"
+void do_something(icalcomponent *c);
+
/* Creating iCal Components
There are two ways to create new component in libical. You can
@@ -59,14 +61,9 @@ icalcomponent* create_new_component()
icalcomponent_add_property(
calendar,
- icalproperty_new_version(strdup("2.0"))
+ icalproperty_new_version("2.0")
);
- /* Note the use of strdup() in the previous and next call. All
- properties constructors for properties with value types of
- TEXT will take control of the string you pass into them. Since
- the string '2.0' is a static string, we need to duplicate it in
- new memory before giving it to the property */
/* Here is the short version of the memory rules:
@@ -88,7 +85,7 @@ icalcomponent* create_new_component()
icalcomponent_add_property(
calendar,
- icalproperty_new_prodid(strdup("-//RDU Software//NONSGML HandCal//EN"))
+ icalproperty_new_prodid("-//RDU Software//NONSGML HandCal//EN")
);
/* Add an event */
@@ -105,11 +102,11 @@ icalcomponent* create_new_component()
icalcomponent_add_property(
event,
- icalproperty_new_uid(strdup("guid-1.host1.com"))
+ icalproperty_new_uid("guid-1.host1.com")
);
/* add a property that has parameters */
- property = icalproperty_new_organizer(strdup("mailto:mrbig@host.com"));
+ property = icalproperty_new_organizer("mailto:mrbig@host.com");
icalproperty_add_parameter(
property,
@@ -123,7 +120,7 @@ icalcomponent* create_new_component()
operation is the same as adding a property to a component */
/* add another property that has parameters */
- property = icalproperty_new_attendee(strdup("mailto:employee-A@host.com"));
+ property = icalproperty_new_attendee("mailto:employee-A@host.com");
icalproperty_add_parameter(
property,
@@ -147,17 +144,17 @@ icalcomponent* create_new_component()
icalcomponent_add_property(
event,
- icalproperty_new_description(strdup("Project XYZ Review Meeting"))
+ icalproperty_new_description("Project XYZ Review Meeting")
);
icalcomponent_add_property(
event,
- icalproperty_new_categories(strdup("MEETING"))
+ icalproperty_new_categories("MEETING")
);
icalcomponent_add_property(
event,
- icalproperty_new_class(strdup("PUBLIC"))
+ icalproperty_new_class("PUBLIC")
);
icalcomponent_add_property(
@@ -167,14 +164,14 @@ icalcomponent* create_new_component()
icalcomponent_add_property(
event,
- icalproperty_new_summary(strdup("XYZ Project Review"))
+ icalproperty_new_summary("XYZ Project Review")
);
property = icalproperty_new_dtstart(atime);
icalproperty_add_parameter(
property,
- icalparameter_new_tzid(strdup("US-Eastern"))
+ icalparameter_new_tzid("US-Eastern")
);
icalcomponent_add_property(event,property);
@@ -184,14 +181,14 @@ icalcomponent* create_new_component()
icalproperty_add_parameter(
property,
- icalparameter_new_tzid(strdup("US-Eastern"))
+ icalparameter_new_tzid("US-Eastern")
);
icalcomponent_add_property(event,property);
icalcomponent_add_property(
event,
- icalproperty_new_location(strdup("1CP Conference Room 4350"))
+ icalproperty_new_location("1CP Conference Room 4350")
);
icalcomponent_add_component(calendar,event);
@@ -224,44 +221,41 @@ icalcomponent* create_new_component_with_va_args()
calendar =
icalcomponent_vanew(
ICAL_VCALENDAR_COMPONENT,
- icalproperty_new_version(strdup("2.0")),
- icalproperty_new_prodid(strdup("-//RDU Software//NONSGML HandCal//EN")),
+ icalproperty_new_version("2.0"),
+ icalproperty_new_prodid("-//RDU Software//NONSGML HandCal//EN"),
icalcomponent_vanew(
ICAL_VEVENT_COMPONENT,
icalproperty_new_dtstamp(atime),
- icalproperty_new_uid(strdup("guid-1.host1.com")),
+ icalproperty_new_uid("guid-1.host1.com"),
icalproperty_vanew_organizer(
- strdup("mailto:mrbig@host.com"),
+ "mailto:mrbig@host.com",
icalparameter_new_role(ICAL_ROLE_CHAIR),
0
),
icalproperty_vanew_attendee(
- strdup("mailto:employee-A@host.com"),
+ "mailto:employee-A@host.com",
icalparameter_new_role(ICAL_ROLE_REQPARTICIPANT),
icalparameter_new_rsvp(1),
icalparameter_new_cutype(ICAL_CUTYPE_GROUP),
0
),
- icalproperty_new_description(strdup("Project XYZ Review Meeting")),
-
- /* Again, note the use of strdup to give libical
- ownership of a static string. */
+ icalproperty_new_description("Project XYZ Review Meeting"),
- icalproperty_new_categories(strdup("MEETING")),
- icalproperty_new_class(strdup("PUBLIC")),
+ icalproperty_new_categories("MEETING"),
+ icalproperty_new_class("PUBLIC"),
icalproperty_new_created(atime),
- icalproperty_new_summary(strdup("XYZ Project Review")),
+ icalproperty_new_summary("XYZ Project Review"),
icalproperty_vanew_dtstart(
atime,
- icalparameter_new_tzid(strdup("US-Eastern")),
+ icalparameter_new_tzid("US-Eastern"),
0
),
icalproperty_vanew_dtend(
atime,
- icalparameter_new_tzid(strdup("US-Eastern")),
+ icalparameter_new_tzid("US-Eastern"),
0
),
- icalproperty_new_location(strdup("1CP Conference Room 4350")),
+ icalproperty_new_location("1CP Conference Room 4350"),
0
),
0
diff --git a/libical/examples/access_properties_and_parameters.c b/libical/examples/access_properties_and_parameters.c
index e19656f57f..8591786bf0 100644
--- a/libical/examples/access_properties_and_parameters.c
+++ b/libical/examples/access_properties_and_parameters.c
@@ -1,6 +1,7 @@
/* access_properties_and_parameters.c */
#include "ical.h"
+#include <string.h>
/* Get a particular parameter out of a component. This routine will
return a list of strings of all attendees who are required. Note
@@ -11,7 +12,6 @@ void get_required_attendees(icalcomponent* event)
{
icalproperty* p;
icalparameter* parameter;
- int c=0;
assert(event != 0);
assert(icalcomponent_isa(event) == ICAL_VEVENT_COMPONENT);
@@ -59,7 +59,7 @@ void update_attendees(icalcomponent* event)
icalparameter* parameter;
assert(event != 0);
- assert(icalcomponent_isa(event) == ICAL_VEVENT_COMPONENT);
+ assert(icalcomponent_isa(event) == ICAL_VEVENT_COMPONENT);
for(
p = icalcomponent_get_first_property(event,ICAL_ATTENDEE_PROPERTY);
@@ -108,7 +108,7 @@ void test_properties()
/* Create a new property */
prop = icalproperty_vanew_comment(
- strdup("Another Comment"),
+ "Another Comment",
icalparameter_new_cn("A Common Name 1"),
icalparameter_new_cn("A Common Name 2"),
icalparameter_new_cn("A Common Name 3"),
diff --git a/libical/examples/errors.c b/libical/examples/errors.c
index 071a2de816..86d963bd75 100644
--- a/libical/examples/errors.c
+++ b/libical/examples/errors.c
@@ -32,7 +32,7 @@ void component_errors(icalcomponent *comp)
errors = icalcomponent_count_errors(comp);
- printf("This component has %d parsing errors\n");
+ printf("This component has %d parsing errors\n", errors);
/* Print out all of the parsing errors. This is not strictly
correct, because it does not descend into any sub-components,
diff --git a/libical/examples/main.c b/libical/examples/main.c
index 88d6621365..1be2de5c9e 100644
--- a/libical/examples/main.c
+++ b/libical/examples/main.c
@@ -1,9 +1,12 @@
/* This is just to make the code in the example directory link properly. */
+#include "ical.h"
-main()
+int main()
{
+
+ return 1;
}
-int do_something(){
+void do_something(icalcomponent* comp){
}
diff --git a/libical/examples/parse_text.c b/libical/examples/parse_text.c
index 2761e6f951..6de3e76dd5 100644
--- a/libical/examples/parse_text.c
+++ b/libical/examples/parse_text.c
@@ -25,10 +25,9 @@ char* read_stream(char *s, size_t size, void *d)
}
-int parse_text(int argc, char* argv[])
+void parse_text(int argc, char* argv[])
{
- int lineno = 0;
char* line;
FILE* stream;
icalcomponent *c;
diff --git a/libical/scripts/Makefile.in b/libical/scripts/Makefile.in
index ef0df12fd7..cba4aab0c6 100644
--- a/libical/scripts/Makefile.in
+++ b/libical/scripts/Makefile.in
@@ -57,11 +57,18 @@ POST_INSTALL = :
NORMAL_UNINSTALL = :
PRE_UNINSTALL = :
POST_UNINSTALL = :
+host_alias = @host_alias@
+host_triplet = @host@
AR = @AR@
+AS = @AS@
CC = @CC@
+DLLTOOL = @DLLTOOL@
LEX = @LEX@
+LIBTOOL = @LIBTOOL@
LN_S = @LN_S@
+MAINT = @MAINT@
MAKEINFO = @MAKEINFO@
+OBJDUMP = @OBJDUMP@
PACKAGE = @PACKAGE@
RANLIB = @RANLIB@
VERSION = @VERSION@
@@ -81,7 +88,7 @@ TAR = gtar
GZIP_ENV = --best
all: all-redirect
.SUFFIXES:
-$(srcdir)/Makefile.in: Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4)
+$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4)
cd $(top_srcdir) && $(AUTOMAKE) --gnu --include-deps scripts/Makefile
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
@@ -151,6 +158,7 @@ clean-am: clean-generic mostlyclean-am
clean: clean-am
distclean-am: distclean-generic clean-am
+ -rm -f libtool
distclean: distclean-am
diff --git a/libical/scripts/mkderivedparameters.pl b/libical/scripts/mkderivedparameters.pl
index 2b505c878a..5715220ea3 100755
--- a/libical/scripts/mkderivedparameters.pl
+++ b/libical/scripts/mkderivedparameters.pl
@@ -272,6 +272,6 @@ EOM
if ($opt_h){
print <<EOM;
-#endif ICALPARAMETER_H
+#endif /*ICALPARAMETER_H*/
EOM
}
diff --git a/libical/scripts/mkderivedproperties.pl b/libical/scripts/mkderivedproperties.pl
index 010e35d178..9778c30a77 100755
--- a/libical/scripts/mkderivedproperties.pl
+++ b/libical/scripts/mkderivedproperties.pl
@@ -30,6 +30,7 @@ while (<F>){
my @v = split(/\t+/,$_);
my $value = shift @v;
+ my $mode = shift @v;
my $type = shift @v;
my $comment = join(" ",@v);
@@ -284,7 +285,7 @@ if ($opt_p)
if ($opt_h){
print <<EOM;
-#endif ICALPROPERTY_H
+#endif /*ICALPROPERTY_H*/
EOM
}
diff --git a/libical/scripts/mkderivedvalues.pl b/libical/scripts/mkderivedvalues.pl
index 103c54a8e2..a04928ab59 100755
--- a/libical/scripts/mkderivedvalues.pl
+++ b/libical/scripts/mkderivedvalues.pl
@@ -128,6 +128,7 @@ while(<F>)
my @v = split(/\t+/,$_);
my $value = shift @v;
+ my $mode = shift @v;
my $type = shift @v;
my $comment = join(" ",@v);
@@ -155,7 +156,7 @@ while(<F>)
$union_data = $lc;
}
- if ($opt_c) {
+ if ($opt_c && $mode eq "std") {
print <<EOM;
icalvalue*
@@ -182,7 +183,7 @@ icalvalue_set_${lc}(icalvalue* value, $type v)
EOM
if( ${union_data} eq 'string'){
-print" if(impl->data.v_${union_data}!=0) {free(impl->data.v_${union_data});}\n";
+print" if(impl->data.v_${union_data}!=0) {free((void*)impl->data.v_${union_data});}\n";
}
print <<EOM;
@@ -216,15 +217,15 @@ EOM
if ( $ud{$union_data}++ == 0) {
print<<EOM;
-char* icalvalue_${union_data}_as_ical_string(icalvalue* value) {
+const char* icalvalue_${union_data}_as_ical_string(icalvalue* value) {
$type data;
char temp[1024];
char *str;
- icalerror_check_arg( (value!=0),"value");
+ icalerror_check_airg( (value!=0),"value");
data = ((struct icalvalue_impl*)value)->data.v_${union_data}
- str = strdup(temp);
+ str = icalmemory_strdup(temp);
return str;
}
@@ -306,7 +307,7 @@ if ($opt_p)
if ($opt_h){
print <<EOM;
-#endif ICALVALUE_H
+#endif /*ICALVALUE_H*/
EOM
}
diff --git a/libical/scripts/mkrestrictiontable.pl b/libical/scripts/mkrestrictiontable.pl
index 1dab5709b9..e1e1a0ca53 100755
--- a/libical/scripts/mkrestrictiontable.pl
+++ b/libical/scripts/mkrestrictiontable.pl
@@ -46,10 +46,12 @@ while(<F>)
if(!$sub) {
$sub = "0";
+ } else {
+ $sub = "icalrestriction_".$sub;
}
if($prop ne "NONE"){
- print(" \{ICAL_METHOD_${method},ICAL_${targetcomp}_COMPONENT,ICAL_${prop}_PROPERTY,ICAL_RESTRICTION_${restr},$sub\},\n");
+ print(" \{ICAL_METHOD_${method},ICAL_${targetcomp}_COMPONENT,ICAL_${prop}_PROPERTY,ICAL_RESTRICTION_${restr},$sub},\n");
}
}
@@ -80,6 +82,8 @@ while(<F>)
if(!$sub) {
$sub = "0";
+ } else {
+ $sub = "icalrestriction_".$sub;
}
diff --git a/libical/src/libical/Makefile.am b/libical/src/libical/Makefile.am
index a761242986..ee87c992e1 100644
--- a/libical/src/libical/Makefile.am
+++ b/libical/src/libical/Makefile.am
@@ -1,99 +1,175 @@
-
-#AUTOMAKE_OPTIONS = no-dependencies
-
-#noinst_LTLIBRARIES = libical.la
-lib_LIBRARIES = libical.a
-
-YFLAGS =-d -v -t
-
-libical_a_SOURCES = \
- ical.h \
- icalcomponent.c \
- icalcomponent.h \
- icalenums.c \
- icalenums.h \
- icalerror.c \
- icalerror.h \
- icalyacc.y \
- icallexer.l \
- icalmemory.c \
- icalmemory.h \
- icalparameter.c \
- icalparameter.h \
- icalparser.c \
- icalparser.h \
- icalproperty.c \
- icalproperty.h \
- icalrestriction.c \
- icalrestriction.h \
- icaltypes.c \
- icaltypes.h \
- icalvalue.c \
- icalvalue.h \
- icalrecur.c \
- icalrecur.h \
- icaltime.h \
- icaltime.c \
- pvl.c \
- pvl.h \
- sspm.c \
- sspm.h \
- icalmime.c \
- icalmime.h
-
-include_HEADERS=\
- ical.h \
- icalcomponent.h \
- icalenums.h \
- icalerror.h \
- icalmemory.h \
- icalparameter.h \
- icalparser.h \
- icalproperty.h \
- icalrestriction.h \
- icaltypes.h \
- icalvalue.h \
- icalrecur.h \
- icalversion.h \
- icaltime.h \
- pvl.h \
- sspm.h \
- icalmime.h
-
-
-
-EXTRA_DIST = icallexer.c icalyacc.c icalyacc.h
-
-CONFIG_CLEAN_FILES = y.output *~
-
-DESIGNDATA = ../../design-data
-ICALSCRIPTS = ../../scripts
-derived: icalproperty icalparameter icalvalue icalrestriction
-
-icalproperty:
- $(ICALSCRIPTS)/mkderivedproperties.pl -i icalproperty.h -h $(DESIGNDATA)/prop-to-value.txt ${DESIGNDATA}/value-c-types.txt > icalproperty.newh
- mv icalproperty.newh icalproperty.h
-
- $(ICALSCRIPTS)/mkderivedproperties.pl -i icalproperty.c -c $(DESIGNDATA)/prop-to-value.txt ${DESIGNDATA}/value-c-types.txt > icalproperty.newc
- mv icalproperty.newc icalproperty.c
-
-
-icalparameter:
- $(ICALSCRIPTS)/mkderivedparameters.pl -i icalparameter.h -h $(DESIGNDATA)/param-c-types.txt > icalparameter.newh
- mv icalparameter.newh icalparameter.h
-
- $(ICALSCRIPTS)/mkderivedparameters.pl -i icalparameter.c -c $(DESIGNDATA)/param-c-types.txt > icalparameter.newc
- mv icalparameter.newc icalparameter.c
-
-icalvalue:
- $(ICALSCRIPTS)/mkderivedvalues.pl -i icalvalue.h -h $(DESIGNDATA)/value-c-types.txt > icalvalue.newh
- mv icalvalue.newh icalvalue.h
-
- $(ICALSCRIPTS)/mkderivedvalues.pl -i icalvalue.c -c $(DESIGNDATA)/value-c-types.txt > icalvalue.newc
- mv icalvalue.newc icalvalue.c
-
-icalrestriction:
- $(ICALSCRIPTS)/mkrestrictiontable.pl -i icalrestriction.c $(DESIGNDATA)/restrictions.csv > icalrestriction.newc
- mv icalrestriction.newc icalrestriction.c
-
-
+DESIGNDATA = $(top_srcdir)/design-data
+ICALSCRIPTS = $(top_srcdir)/scripts
+
+lib_LTLIBRARIES = libical.la
+
+YFLAGS = -d -v -t -pical_yy
+LFLAGS = -Pical_yy
+LEX_OUTPUT_ROOT = lex.ical_yy
+
+all: ical.h
+
+INCLUDES = \
+ -I$(top_builddir) \
+ -I$(top_srcdir)/src \
+ -I$(top_builddir)/src \
+ -I$(srcdir)
+
+libical_la_LDFLAGS = -version-info 0:0:0
+
+libical_la_SOURCES = \
+ icalcomponent.c \
+ icalcomponent.h \
+ icalenums.c \
+ icalenums.h \
+ icalerror.c \
+ icalerror.h \
+ icallexer.l \
+ icalmemory.c \
+ icalmemory.h \
+ icalmime.c \
+ icalmime.h \
+ icalparameter.c \
+ icalparameter.h \
+ icalparser.c \
+ icalparser.h \
+ icalproperty.c \
+ icalproperty.h \
+ icalrecur.c \
+ icalrecur.h \
+ icalrestriction.c \
+ icalrestriction.h \
+ icaltime.c \
+ icaltime.h \
+ icaltypes.c \
+ icaltypes.h \
+ icalvalue.c \
+ icalvalue.h \
+ icalyacc.h \
+ icalyacc.y \
+ pvl.c \
+ pvl.h \
+ sspm.c \
+ sspm.h
+
+libicalincludedir = $(includedir)
+
+libicalinclude_HEADERS = ical.h
+
+# ORDERING OF HEADERS IS SIGNIFICANT. Don't change this ordering. It
+# is required to make the combined header ical.h properly
+COMBINEDHEADERS = \
+ $(top_builddir)/src/libical/icalversion.h \
+ $(top_srcdir)/src/libical/icaltime.h \
+ $(top_srcdir)/src/libical/icalenums.h \
+ $(top_srcdir)/src/libical/icaltypes.h \
+ $(top_srcdir)/src/libical/icalrecur.h \
+ $(top_srcdir)/src/libical/icalvalue.h \
+ $(top_srcdir)/src/libical/icalparameter.h \
+ $(top_srcdir)/src/libical/icalproperty.h \
+ $(top_srcdir)/src/libical/pvl.h \
+ $(top_srcdir)/src/libical/icalcomponent.h \
+ $(top_srcdir)/src/libical/icalparser.h \
+ $(top_srcdir)/src/libical/icalmemory.h \
+ $(top_srcdir)/src/libical/icalerror.h \
+ $(top_srcdir)/src/libical/icalrestriction.h \
+ $(top_srcdir)/src/libical/sspm.h \
+ $(top_srcdir)/src/libical/icalmime.h
+
+BUILT_SOURCES = \
+ icalparameter.c \
+ icalparameter.h \
+ icalproperty.c \
+ icalproperty.h \
+ icalrestriction.c \
+ icalvalue.c \
+ icalvalue.h
+
+ical.h: $(COMBINEDHEADERS) $(BUILT_SOURCES)
+ cat $(COMBINEDHEADERS) \
+ | egrep -v "#include.*\"ical" \
+ | egrep -v "#include.*\"pvl\.h\"" > ical.h
+
+icallexer.c : icalyacc.h
+
+
+# parameters
+
+PARAMETERDEPS = \
+ $(ICALSCRIPTS)/mkderivedparameters.pl \
+ $(DESIGNDATA)/param-c-types.txt \
+ icalparameter.c.in \
+ icalparameter.h.in
+
+icalparameter.h: $(PARAMETERDEPS)
+ $(PERL) $(ICALSCRIPTS)/mkderivedparameters.pl -i icalparameter.h.in -h $(DESIGNDATA)/param-c-types.txt > icalparameter.newh \
+ && mv icalparameter.newh icalparameter.h
+
+icalparameter.c: $(PARAMETERDEPS) icalparameter.h
+ $(PERL) $(ICALSCRIPTS)/mkderivedparameters.pl -i icalparameter.c.in -c $(DESIGNDATA)/param-c-types.txt > icalparameter.newc \
+ && mv icalparameter.newc icalparameter.c
+
+# properties
+
+PROPERTYDEPS = \
+ $(ICALSCRIPTS)/mkderivedproperties.pl \
+ $(DESIGNDATA)/prop-to-value.txt \
+ $(DESIGNDATA)/value-c-types.txt \
+ icalproperty.c.in \
+ icalproperty.h.in
+
+
+icalproperty.h: $(PROPERTYDEPS)
+ $(PERL) $(ICALSCRIPTS)/mkderivedproperties.pl -i icalproperty.h.in -h \
+ $(DESIGNDATA)/prop-to-value.txt \
+ ${DESIGNDATA}/value-c-types.txt > icalproperty.h
+
+icalproperty.c: $(PROPERTYDEPS) icalproperty.h
+ $(PERL) $(ICALSCRIPTS)/mkderivedproperties.pl -i icalproperty.c.in -c \
+ $(DESIGNDATA)/prop-to-value.txt \
+ ${DESIGNDATA}/value-c-types.txt > icalproperty.c
+
+# restrictions
+
+RESTRICTIONDEPS = \
+ $(ICALSCRIPTS)/mkrestrictiontable.pl \
+ $(DESIGNDATA)/restrictions.csv \
+ icalrestriction.c.in
+
+icalrestriction.c: $(RESTRICTIONDEPS)
+ $(PERL) $(ICALSCRIPTS)/mkrestrictiontable.pl -i icalrestriction.c.in \
+ $(DESIGNDATA)/restrictions.csv > icalrestriction.c
+
+# values
+
+VALUEDEPS = \
+ $(ICALSCRIPTS)/mkderivedvalues.pl \
+ $(DESIGNDATA)/value-c-types.txt \
+ icalvalue.c.in \
+ icalvalue.h.in
+
+icalvalue.h: $(VALUEDEPS)
+ $(PERL) $(ICALSCRIPTS)/mkderivedvalues.pl -i icalvalue.h.in -h \
+ $(DESIGNDATA)/value-c-types.txt > icalvalue.h
+
+icalvalue.c: $(VALUEDEPS) icalvalue.h
+ $(PERL) $(ICALSCRIPTS)/mkderivedvalues.pl -i icalvalue.c.in -c \
+ $(DESIGNDATA)/value-c-types.txt > icalvalue.c
+
+
+
+# housekeeping
+CONFIG_CLEAN_FILES = y.output
+
+EXTRA_DIST = \
+ icalparameter.c.in \
+ icalparameter.h.in \
+ icalproperty.c.in \
+ icalproperty.h.in \
+ icalrestriction.c.in \
+ icalvalue.c.in \
+ icalvalue.h.in \
+ icalversion.h.in \
+ $(BUILT_SOURCES) \
+ icallexer.c \
+ icalyacc.c
diff --git a/libical/src/libical/Makefile.in b/libical/src/libical/Makefile.in
index ded5c95cf8..7fe192ac92 100644
--- a/libical/src/libical/Makefile.in
+++ b/libical/src/libical/Makefile.in
@@ -10,10 +10,6 @@
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
# PARTICULAR PURPOSE.
-#AUTOMAKE_OPTIONS = no-dependencies
-
-#noinst_LTLIBRARIES = libical.la
-
SHELL = @SHELL@
@@ -61,53 +57,98 @@ POST_INSTALL = :
NORMAL_UNINSTALL = :
PRE_UNINSTALL = :
POST_UNINSTALL = :
+host_alias = @host_alias@
+host_triplet = @host@
AR = @AR@
+AS = @AS@
CC = @CC@
+DLLTOOL = @DLLTOOL@
LEX = @LEX@
+LIBTOOL = @LIBTOOL@
LN_S = @LN_S@
+MAINT = @MAINT@
MAKEINFO = @MAKEINFO@
+OBJDUMP = @OBJDUMP@
PACKAGE = @PACKAGE@
RANLIB = @RANLIB@
VERSION = @VERSION@
YACC = @YACC@
-lib_LIBRARIES = libical.a
+DESIGNDATA = $(top_srcdir)/design-data
+ICALSCRIPTS = $(top_srcdir)/scripts
+
+lib_LTLIBRARIES = libical.la
+
+YFLAGS = -d -v -t -pical_yy
+LFLAGS = -Pical_yy
+LEX_OUTPUT_ROOT = lex.ical_yy
+
+INCLUDES = -I$(top_builddir) -I$(top_srcdir)/src -I$(top_builddir)/src -I$(srcdir)
+
+
+libical_la_LDFLAGS = -version-info 0:0:0
+
+libical_la_SOURCES = icalcomponent.c icalcomponent.h icalenums.c icalenums.h icalerror.c icalerror.h icallexer.l icalmemory.c icalmemory.h icalmime.c icalmime.h icalparameter.c icalparameter.h icalparser.c icalparser.h icalproperty.c icalproperty.h icalrecur.c icalrecur.h icalrestriction.c icalrestriction.h icaltime.c icaltime.h icaltypes.c icaltypes.h icalvalue.c icalvalue.h icalyacc.h icalyacc.y pvl.c pvl.h sspm.c sspm.h
+
+
+libicalincludedir = $(includedir)
+
+libicalinclude_HEADERS = ical.h
+
+# ORDERING OF HEADERS IS SIGNIFICANT. Don't change this ordering. It
+# is required to make the combined header ical.h properly
+COMBINEDHEADERS = $(top_builddir)/src/libical/icalversion.h $(top_srcdir)/src/libical/icaltime.h $(top_srcdir)/src/libical/icalenums.h $(top_srcdir)/src/libical/icaltypes.h $(top_srcdir)/src/libical/icalrecur.h $(top_srcdir)/src/libical/icalvalue.h $(top_srcdir)/src/libical/icalparameter.h $(top_srcdir)/src/libical/icalproperty.h $(top_srcdir)/src/libical/pvl.h $(top_srcdir)/src/libical/icalcomponent.h $(top_srcdir)/src/libical/icalparser.h $(top_srcdir)/src/libical/icalmemory.h $(top_srcdir)/src/libical/icalerror.h $(top_srcdir)/src/libical/icalrestriction.h $(top_srcdir)/src/libical/sspm.h $(top_srcdir)/src/libical/icalmime.h
+
+
+BUILT_SOURCES = icalparameter.c icalparameter.h icalproperty.c icalproperty.h icalrestriction.c icalvalue.c icalvalue.h
+
+
+# parameters
+
+PARAMETERDEPS = $(ICALSCRIPTS)/mkderivedparameters.pl $(DESIGNDATA)/param-c-types.txt icalparameter.c.in icalparameter.h.in
+
-YFLAGS = -d -v -t
+# properties
-libical_a_SOURCES = ical.h icalcomponent.c icalcomponent.h icalenums.c icalenums.h icalerror.c icalerror.h icalyacc.y icallexer.l icalmemory.c icalmemory.h icalparameter.c icalparameter.h icalparser.c icalparser.h icalproperty.c icalproperty.h icalrestriction.c icalrestriction.h icaltypes.c icaltypes.h icalvalue.c icalvalue.h icalrecur.c icalrecur.h icaltime.h icaltime.c pvl.c pvl.h sspm.c sspm.h icalmime.c icalmime.h
+PROPERTYDEPS = $(ICALSCRIPTS)/mkderivedproperties.pl $(DESIGNDATA)/prop-to-value.txt $(DESIGNDATA)/value-c-types.txt icalproperty.c.in icalproperty.h.in
-include_HEADERS = ical.h icalcomponent.h icalenums.h icalerror.h icalmemory.h icalparameter.h icalparser.h icalproperty.h icalrestriction.h icaltypes.h icalvalue.h icalrecur.h icalversion.h icaltime.h pvl.h sspm.h icalmime.h
+# restrictions
+RESTRICTIONDEPS = $(ICALSCRIPTS)/mkrestrictiontable.pl $(DESIGNDATA)/restrictions.csv icalrestriction.c.in
-EXTRA_DIST = icallexer.c icalyacc.c icalyacc.h
-CONFIG_CLEAN_FILES = y.output *~
+# values
+
+VALUEDEPS = $(ICALSCRIPTS)/mkderivedvalues.pl $(DESIGNDATA)/value-c-types.txt icalvalue.c.in icalvalue.h.in
+
+
+# housekeeping
+CONFIG_CLEAN_FILES = y.output
+
+EXTRA_DIST = icalparameter.c.in icalparameter.h.in icalproperty.c.in icalproperty.h.in icalrestriction.c.in icalvalue.c.in icalvalue.h.in icalversion.h.in $(BUILT_SOURCES) icallexer.c icalyacc.c
-DESIGNDATA = ../../design-data
-ICALSCRIPTS = ../../scripts
mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
CONFIG_HEADER = ../../config.h
-LIBRARIES = $(lib_LIBRARIES)
+LTLIBRARIES = $(lib_LTLIBRARIES)
DEFS = @DEFS@ -I. -I$(srcdir) -I../..
CPPFLAGS = @CPPFLAGS@
LDFLAGS = @LDFLAGS@
LIBS = @LIBS@
-libical_a_LIBADD =
-libical_a_OBJECTS = icalcomponent.o icalenums.o icalerror.o icalyacc.o \
-icallexer.o icalmemory.o icalparameter.o icalparser.o icalproperty.o \
-icalrestriction.o icaltypes.o icalvalue.o icalrecur.o icaltime.o pvl.o \
-sspm.o icalmime.o
-LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@
+libical_la_LIBADD =
+libical_la_OBJECTS = icalcomponent.lo icalenums.lo icalerror.lo \
+icallexer.lo icalmemory.lo icalmime.lo icalparameter.lo icalparser.lo \
+icalproperty.lo icalrecur.lo icalrestriction.lo icaltime.lo \
+icaltypes.lo icalvalue.lo icalyacc.lo pvl.lo sspm.lo
LEXLIB = @LEXLIB@
CFLAGS = @CFLAGS@
COMPILE = $(CC) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
+LTCOMPILE = $(LIBTOOL) --mode=compile $(CC) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
CCLD = $(CC)
-LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(LDFLAGS) -o $@
-HEADERS = $(include_HEADERS)
+LINK = $(LIBTOOL) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(LDFLAGS) -o $@
+HEADERS = $(libicalinclude_HEADERS)
DIST_COMMON = Makefile.am Makefile.in icallexer.c icalversion.h.in \
icalyacc.c
@@ -117,13 +158,13 @@ DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST)
TAR = gtar
GZIP_ENV = --best
-SOURCES = $(libical_a_SOURCES)
-OBJECTS = $(libical_a_OBJECTS)
+SOURCES = $(libical_la_SOURCES)
+OBJECTS = $(libical_la_OBJECTS)
all: all-redirect
.SUFFIXES:
-.SUFFIXES: .S .c .l .o .s .y
-$(srcdir)/Makefile.in: Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4)
+.SUFFIXES: .S .c .l .lo .o .s .y
+$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4)
cd $(top_srcdir) && $(AUTOMAKE) --gnu --include-deps src/libical/Makefile
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
@@ -133,36 +174,29 @@ Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
icalversion.h: $(top_builddir)/config.status icalversion.h.in
cd $(top_builddir) && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status
-mostlyclean-libLIBRARIES:
+mostlyclean-libLTLIBRARIES:
-clean-libLIBRARIES:
- -test -z "$(lib_LIBRARIES)" || rm -f $(lib_LIBRARIES)
+clean-libLTLIBRARIES:
+ -test -z "$(lib_LTLIBRARIES)" || rm -f $(lib_LTLIBRARIES)
-distclean-libLIBRARIES:
+distclean-libLTLIBRARIES:
-maintainer-clean-libLIBRARIES:
+maintainer-clean-libLTLIBRARIES:
-install-libLIBRARIES: $(lib_LIBRARIES)
+install-libLTLIBRARIES: $(lib_LTLIBRARIES)
@$(NORMAL_INSTALL)
$(mkinstalldirs) $(DESTDIR)$(libdir)
- @list='$(lib_LIBRARIES)'; for p in $$list; do \
+ @list='$(lib_LTLIBRARIES)'; for p in $$list; do \
if test -f $$p; then \
- echo " $(INSTALL_DATA) $$p $(DESTDIR)$(libdir)/$$p"; \
- $(INSTALL_DATA) $$p $(DESTDIR)$(libdir)/$$p; \
- else :; fi; \
- done
- @$(POST_INSTALL)
- @list='$(lib_LIBRARIES)'; for p in $$list; do \
- if test -f $$p; then \
- echo " $(RANLIB) $(DESTDIR)$(libdir)/$$p"; \
- $(RANLIB) $(DESTDIR)$(libdir)/$$p; \
+ echo "$(LIBTOOL) --mode=install $(INSTALL) $$p $(DESTDIR)$(libdir)/$$p"; \
+ $(LIBTOOL) --mode=install $(INSTALL) $$p $(DESTDIR)$(libdir)/$$p; \
else :; fi; \
done
-uninstall-libLIBRARIES:
+uninstall-libLTLIBRARIES:
@$(NORMAL_UNINSTALL)
- list='$(lib_LIBRARIES)'; for p in $$list; do \
- rm -f $(DESTDIR)$(libdir)/$$p; \
+ list='$(lib_LTLIBRARIES)'; for p in $$list; do \
+ $(LIBTOOL) --mode=uninstall rm -f $(DESTDIR)$(libdir)/$$p; \
done
.c.o:
@@ -184,10 +218,27 @@ distclean-compile:
maintainer-clean-compile:
-libical.a: $(libical_a_OBJECTS) $(libical_a_DEPENDENCIES)
- -rm -f libical.a
- $(AR) cru libical.a $(libical_a_OBJECTS) $(libical_a_LIBADD)
- $(RANLIB) libical.a
+.c.lo:
+ $(LIBTOOL) --mode=compile $(COMPILE) -c $<
+
+.s.lo:
+ $(LIBTOOL) --mode=compile $(COMPILE) -c $<
+
+.S.lo:
+ $(LIBTOOL) --mode=compile $(COMPILE) -c $<
+
+mostlyclean-libtool:
+ -rm -f *.lo
+
+clean-libtool:
+ -rm -rf .libs _libs
+
+distclean-libtool:
+
+maintainer-clean-libtool:
+
+libical.la: $(libical_la_OBJECTS) $(libical_la_DEPENDENCIES)
+ $(LINK) -rpath $(libdir) $(libical_la_LDFLAGS) $(libical_la_OBJECTS) $(libical_la_LIBADD) $(LIBS)
.l.c:
$(LEX) $(AM_LFLAGS) $(LFLAGS) $< && mv $(LEX_OUTPUT_ROOT).c $@
.y.c:
@@ -198,19 +249,19 @@ libical.a: $(libical_a_OBJECTS) $(libical_a_DEPENDENCIES)
icalyacc.h: icalyacc.c
-install-includeHEADERS: $(include_HEADERS)
+install-libicalincludeHEADERS: $(libicalinclude_HEADERS)
@$(NORMAL_INSTALL)
- $(mkinstalldirs) $(DESTDIR)$(includedir)
- @list='$(include_HEADERS)'; for p in $$list; do \
+ $(mkinstalldirs) $(DESTDIR)$(libicalincludedir)
+ @list='$(libicalinclude_HEADERS)'; for p in $$list; do \
if test -f "$$p"; then d= ; else d="$(srcdir)/"; fi; \
- echo " $(INSTALL_DATA) $$d$$p $(DESTDIR)$(includedir)/$$p"; \
- $(INSTALL_DATA) $$d$$p $(DESTDIR)$(includedir)/$$p; \
+ echo " $(INSTALL_DATA) $$d$$p $(DESTDIR)$(libicalincludedir)/$$p"; \
+ $(INSTALL_DATA) $$d$$p $(DESTDIR)$(libicalincludedir)/$$p; \
done
-uninstall-includeHEADERS:
+uninstall-libicalincludeHEADERS:
@$(NORMAL_UNINSTALL)
- list='$(include_HEADERS)'; for p in $$list; do \
- rm -f $(DESTDIR)$(includedir)/$$p; \
+ list='$(libicalinclude_HEADERS)'; for p in $$list; do \
+ rm -f $(DESTDIR)$(libicalincludedir)/$$p; \
done
tags: TAGS
@@ -257,54 +308,19 @@ distdir: $(DISTFILES)
|| cp -p $$d/$$file $(distdir)/$$file || :; \
fi; \
done
-icalcomponent.o: icalcomponent.c ../../config.h ical.h icalversion.h \
- icalenums.h icalvalue.h icaltypes.h icaltime.h icalparameter.h \
- icalproperty.h icalcomponent.h pvl.h icalparser.h icalmemory.h \
- icalerror.h icalrestriction.h icalrecur.h
-icalenums.o: icalenums.c ../../config.h icalenums.h
-icalerror.o: icalerror.c ../../config.h icalerror.h
-icallexer.o: icallexer.c icalyacc.h icalparser.h ical.h icalversion.h \
- icalenums.h icalvalue.h icaltypes.h icaltime.h icalparameter.h \
- icalproperty.h icalcomponent.h pvl.h icalmemory.h icalerror.h \
- icalrestriction.h icalrecur.h
-icalmemory.o: icalmemory.c ../../config.h icalmemory.h icalerror.h
-icalmime.o: icalmime.c icalmime.h ical.h icalversion.h icalenums.h \
- icalvalue.h icaltypes.h icaltime.h icalparameter.h \
- icalproperty.h icalcomponent.h pvl.h icalparser.h icalmemory.h \
- icalerror.h icalrestriction.h icalrecur.h sspm.h
-icalparameter.o: icalparameter.c ../../config.h ical.h icalversion.h \
- icalenums.h icalvalue.h icaltypes.h icaltime.h icalparameter.h \
- icalproperty.h icalcomponent.h pvl.h icalparser.h icalmemory.h \
- icalerror.h icalrestriction.h icalrecur.h
-icalparser.o: icalparser.c ../../config.h ical.h icalversion.h \
- icalenums.h icalvalue.h icaltypes.h icaltime.h icalparameter.h \
- icalproperty.h icalcomponent.h pvl.h icalparser.h icalmemory.h \
- icalerror.h icalrestriction.h icalrecur.h
-icalproperty.o: icalproperty.c ../../config.h ical.h icalversion.h \
- icalenums.h icalvalue.h icaltypes.h icaltime.h icalparameter.h \
- icalproperty.h icalcomponent.h pvl.h icalparser.h icalmemory.h \
- icalerror.h icalrestriction.h icalrecur.h
-icalrecur.o: icalrecur.c ../../config.h icalrecur.h icaltypes.h \
- icalenums.h icaltime.h icalerror.h icalmemory.h ical.h \
- icalversion.h icalvalue.h icalparameter.h icalproperty.h \
- icalcomponent.h pvl.h icalparser.h icalrestriction.h
-icalrestriction.o: icalrestriction.c ../../config.h icalenums.h \
- icalrestriction.h ical.h icalversion.h icalvalue.h icaltypes.h \
- icaltime.h icalparameter.h icalproperty.h icalcomponent.h pvl.h \
- icalparser.h icalmemory.h icalerror.h icalrecur.h
-icaltime.o: icaltime.c icaltime.h
-icaltypes.o: icaltypes.c ../../config.h icaltypes.h icalenums.h \
- icaltime.h icalerror.h icalmemory.h
-icalvalue.o: icalvalue.c ../../config.h ical.h icalversion.h icalenums.h \
- icalvalue.h icaltypes.h icaltime.h icalparameter.h \
- icalproperty.h icalcomponent.h pvl.h icalparser.h icalmemory.h \
- icalerror.h icalrestriction.h icalrecur.h
-icalyacc.o: icalyacc.c icalparser.h ical.h icalversion.h icalenums.h \
- icalvalue.h icaltypes.h icaltime.h icalparameter.h \
- icalproperty.h icalcomponent.h pvl.h icalmemory.h icalerror.h \
- icalrestriction.h icalrecur.h
-pvl.o: pvl.c ../../config.h pvl.h
-sspm.o: sspm.c sspm.h
+icalrecur.lo icalrecur.o : icalrecur.c ../../config.h icalrecur.h \
+ icaltime.h ical.h
+icaltime.lo icaltime.o : icaltime.c icaltime.h icalvalue.h icalenums.h \
+ icaltypes.h icalrecur.h
+icaltypes.lo icaltypes.o : icaltypes.c ../../config.h icaltypes.h \
+ icalenums.h icaltime.h icalerror.h icalmemory.h
+icalvalue.lo icalvalue.o : icalvalue.c ../../config.h icalerror.h \
+ icalmemory.h icalparser.h icalenums.h icaltypes.h icaltime.h \
+ icalcomponent.h icalproperty.h icalparameter.h icalvalue.h \
+ icalrecur.h pvl.h
+icalyacc.lo icalyacc.o : icalyacc.c icalparser.h icalenums.h icaltypes.h \
+ icaltime.h icalcomponent.h icalproperty.h icalparameter.h \
+ icalvalue.h icalrecur.h pvl.h
info-am:
info: info-am
@@ -314,23 +330,23 @@ check-am: all-am
check: check-am
installcheck-am:
installcheck: installcheck-am
-install-exec-am: install-libLIBRARIES
+install-exec-am: install-libLTLIBRARIES
install-exec: install-exec-am
-install-data-am: install-includeHEADERS
+install-data-am: install-libicalincludeHEADERS
install-data: install-data-am
install-am: all-am
@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
install: install-am
-uninstall-am: uninstall-libLIBRARIES uninstall-includeHEADERS
+uninstall-am: uninstall-libLTLIBRARIES uninstall-libicalincludeHEADERS
uninstall: uninstall-am
-all-am: Makefile $(LIBRARIES) $(HEADERS)
+all-am: Makefile $(LTLIBRARIES) $(HEADERS)
all-redirect: all-am
install-strip:
$(MAKE) $(AM_MAKEFLAGS) AM_INSTALL_PROGRAM_FLAGS=-s install
installdirs:
- $(mkinstalldirs) $(DESTDIR)$(libdir) $(DESTDIR)$(includedir)
+ $(mkinstalldirs) $(DESTDIR)$(libdir) $(DESTDIR)$(libicalincludedir)
mostlyclean-generic:
@@ -342,68 +358,87 @@ distclean-generic:
-rm -f config.cache config.log stamp-h stamp-h[0-9]*
maintainer-clean-generic:
- -test -z "icallexerlicalyacchicalyaccc" || rm -f icallexerl icalyacch icalyaccc
-mostlyclean-am: mostlyclean-libLIBRARIES mostlyclean-compile \
- mostlyclean-tags mostlyclean-generic
+ -test -z "icallexerlicalyacchicalyaccc$(BUILT_SOURCES)" || rm -f icallexerl icalyacch icalyaccc $(BUILT_SOURCES)
+mostlyclean-am: mostlyclean-libLTLIBRARIES mostlyclean-compile \
+ mostlyclean-libtool mostlyclean-tags \
+ mostlyclean-generic
mostlyclean: mostlyclean-am
-clean-am: clean-libLIBRARIES clean-compile clean-tags clean-generic \
- mostlyclean-am
+clean-am: clean-libLTLIBRARIES clean-compile clean-libtool clean-tags \
+ clean-generic mostlyclean-am
clean: clean-am
-distclean-am: distclean-libLIBRARIES distclean-compile distclean-tags \
- distclean-generic clean-am
+distclean-am: distclean-libLTLIBRARIES distclean-compile \
+ distclean-libtool distclean-tags distclean-generic \
+ clean-am
+ -rm -f libtool
distclean: distclean-am
-maintainer-clean-am: maintainer-clean-libLIBRARIES \
- maintainer-clean-compile maintainer-clean-tags \
- maintainer-clean-generic distclean-am
+maintainer-clean-am: maintainer-clean-libLTLIBRARIES \
+ maintainer-clean-compile maintainer-clean-libtool \
+ maintainer-clean-tags maintainer-clean-generic \
+ distclean-am
@echo "This command is intended for maintainers to use;"
@echo "it deletes files that may require special tools to rebuild."
maintainer-clean: maintainer-clean-am
-.PHONY: mostlyclean-libLIBRARIES distclean-libLIBRARIES \
-clean-libLIBRARIES maintainer-clean-libLIBRARIES uninstall-libLIBRARIES \
-install-libLIBRARIES mostlyclean-compile distclean-compile \
-clean-compile maintainer-clean-compile uninstall-includeHEADERS \
-install-includeHEADERS tags mostlyclean-tags distclean-tags clean-tags \
-maintainer-clean-tags distdir info-am info dvi-am dvi check check-am \
-installcheck-am installcheck install-exec-am install-exec \
+.PHONY: mostlyclean-libLTLIBRARIES distclean-libLTLIBRARIES \
+clean-libLTLIBRARIES maintainer-clean-libLTLIBRARIES \
+uninstall-libLTLIBRARIES install-libLTLIBRARIES mostlyclean-compile \
+distclean-compile clean-compile maintainer-clean-compile \
+mostlyclean-libtool distclean-libtool clean-libtool \
+maintainer-clean-libtool uninstall-libicalincludeHEADERS \
+install-libicalincludeHEADERS tags mostlyclean-tags distclean-tags \
+clean-tags maintainer-clean-tags distdir info-am info dvi-am dvi check \
+check-am installcheck-am installcheck install-exec-am install-exec \
install-data-am install-data install-am install uninstall-am uninstall \
all-redirect all-am all installdirs mostlyclean-generic \
distclean-generic clean-generic maintainer-clean-generic clean \
mostlyclean distclean maintainer-clean
-derived: icalproperty icalparameter icalvalue icalrestriction
-icalproperty:
- $(ICALSCRIPTS)/mkderivedproperties.pl -i icalproperty.h -h $(DESIGNDATA)/prop-to-value.txt ${DESIGNDATA}/value-c-types.txt > icalproperty.newh
- mv icalproperty.newh icalproperty.h
+all: ical.h
+
+ical.h: $(COMBINEDHEADERS) $(BUILT_SOURCES)
+ cat $(COMBINEDHEADERS) \
+ | egrep -v "#include.*\"ical" \
+ | egrep -v "#include.*\"pvl\.h\"" > ical.h
+
+icallexer.c : icalyacc.h
+
+icalparameter.h: $(PARAMETERDEPS)
+ $(PERL) $(ICALSCRIPTS)/mkderivedparameters.pl -i icalparameter.h.in -h $(DESIGNDATA)/param-c-types.txt > icalparameter.newh \
+ && mv icalparameter.newh icalparameter.h
- $(ICALSCRIPTS)/mkderivedproperties.pl -i icalproperty.c -c $(DESIGNDATA)/prop-to-value.txt ${DESIGNDATA}/value-c-types.txt > icalproperty.newc
- mv icalproperty.newc icalproperty.c
+icalparameter.c: $(PARAMETERDEPS) icalparameter.h
+ $(PERL) $(ICALSCRIPTS)/mkderivedparameters.pl -i icalparameter.c.in -c $(DESIGNDATA)/param-c-types.txt > icalparameter.newc \
+ && mv icalparameter.newc icalparameter.c
-icalparameter:
- $(ICALSCRIPTS)/mkderivedparameters.pl -i icalparameter.h -h $(DESIGNDATA)/param-c-types.txt > icalparameter.newh
- mv icalparameter.newh icalparameter.h
+icalproperty.h: $(PROPERTYDEPS)
+ $(PERL) $(ICALSCRIPTS)/mkderivedproperties.pl -i icalproperty.h.in -h \
+ $(DESIGNDATA)/prop-to-value.txt \
+ ${DESIGNDATA}/value-c-types.txt > icalproperty.h
- $(ICALSCRIPTS)/mkderivedparameters.pl -i icalparameter.c -c $(DESIGNDATA)/param-c-types.txt > icalparameter.newc
- mv icalparameter.newc icalparameter.c
+icalproperty.c: $(PROPERTYDEPS) icalproperty.h
+ $(PERL) $(ICALSCRIPTS)/mkderivedproperties.pl -i icalproperty.c.in -c \
+ $(DESIGNDATA)/prop-to-value.txt \
+ ${DESIGNDATA}/value-c-types.txt > icalproperty.c
-icalvalue:
- $(ICALSCRIPTS)/mkderivedvalues.pl -i icalvalue.h -h $(DESIGNDATA)/value-c-types.txt > icalvalue.newh
- mv icalvalue.newh icalvalue.h
+icalrestriction.c: $(RESTRICTIONDEPS)
+ $(PERL) $(ICALSCRIPTS)/mkrestrictiontable.pl -i icalrestriction.c.in \
+ $(DESIGNDATA)/restrictions.csv > icalrestriction.c
- $(ICALSCRIPTS)/mkderivedvalues.pl -i icalvalue.c -c $(DESIGNDATA)/value-c-types.txt > icalvalue.newc
- mv icalvalue.newc icalvalue.c
+icalvalue.h: $(VALUEDEPS)
+ $(PERL) $(ICALSCRIPTS)/mkderivedvalues.pl -i icalvalue.h.in -h \
+ $(DESIGNDATA)/value-c-types.txt > icalvalue.h
-icalrestriction:
- $(ICALSCRIPTS)/mkrestrictiontable.pl -i icalrestriction.c $(DESIGNDATA)/restrictions.csv > icalrestriction.newc
- mv icalrestriction.newc icalrestriction.c
+icalvalue.c: $(VALUEDEPS) icalvalue.h
+ $(PERL) $(ICALSCRIPTS)/mkderivedvalues.pl -i icalvalue.c.in -c \
+ $(DESIGNDATA)/value-c-types.txt > icalvalue.c
# Tell versions [3.59,3.63) of GNU make to not export all variables.
# Otherwise a system limit (for SysV at least) may be exceeded.
diff --git a/libical/src/libical/ical.h b/libical/src/libical/ical.h
index 05e7ca82bc..506d69a6db 100644
--- a/libical/src/libical/ical.h
+++ b/libical/src/libical/ical.h
@@ -1,6 +1,596 @@
+#ifndef ICAL_VERSION_H
+#define ICAL_VERSION_H
+
+#define ICAL_PACKAGE "libical"
+#define ICAL_VERSION "0.21a"
+
+#endif
+/* -*- Mode: C -*- */
+/*======================================================================
+ FILE: icaltime.h
+ CREATOR: eric 02 June 2000
+
+
+ $Id$
+ $Locker$
+
+ (C) COPYRIGHT 2000, Eric Busboom, http://www.softwarestudio.org
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of either:
+
+ The LGPL as published by the Free Software Foundation, version
+ 2.1, available at: http://www.fsf.org/copyleft/lesser.html
+
+ Or:
+
+ The Mozilla Public License Version 1.0. You may obtain a copy of
+ the License at http://www.mozilla.org/MPL/
+
+ The Original Code is eric. The Initial Developer of the Original
+ Code is Eric Busboom
+
+
+======================================================================*/
+
+#ifndef ICALTIME_H
+#define ICALTIME_H
+
+#include <time.h>
+
+/* icaltime_span is returned by icalcomponent_get_span() */
+struct icaltime_span {
+ time_t start; /* in UTC */
+ time_t end; /* in UTC */
+ int is_busy; /* 1->busy time, 0-> free time */
+};
+
+struct icaltimetype
+{
+ int year;
+ int month;
+ int day;
+ int hour;
+ int minute;
+ int second;
+
+ int is_utc; /* 1-> time is in UTC timezone */
+
+ int is_date; /* 1 -> interpret this as date. */
+};
+
+struct icaltimetype icaltime_null_time(void);
+
+int icaltime_is_null_time(struct icaltimetype t);
+
+struct icaltimetype icaltime_normalize(struct icaltimetype t);
+
+short icaltime_day_of_year(struct icaltimetype t);
+struct icaltimetype icaltime_from_day_of_year(short doy, short year);
+
+short icaltime_day_of_week(struct icaltimetype t);
+short icaltime_start_doy_of_week(struct icaltimetype t);
+
+struct icaltimetype icaltime_from_timet(time_t v, int is_date, int is_utc);
+struct icaltimetype icaltime_from_string(const char* str);
+time_t icaltime_as_timet(struct icaltimetype);
+char* icaltime_as_ctime(struct icaltimetype);
+
+short icaltime_week_number(short day_of_month, short month, short year);
+
+struct icaltimetype icaltime_from_week_number(short week_number, short year);
+
+int icaltime_compare(struct icaltimetype a,struct icaltimetype b);
+
+int icaltime_compare_date_only(struct icaltimetype a, struct icaltimetype b);
+
+
+short icaltime_days_in_month(short month,short year);
+
+/* Routines for handling timezones */
+
+/* Return the offset of the named zone as seconds. tt is a time
+ indicating the date for which you want the offset */
+time_t icaltime_utc_offset(struct icaltimetype tt, const char* tzid);
+
+time_t icaltime_local_utc_offset();
+
+
+/* convert tt, of timezone tzid, into a utc time */
+struct icaltimetype icaltime_as_utc(struct icaltimetype tt,const char* tzid);
+
+/* convert tt, a time in UTC, into a time in timezone tzid */
+struct icaltimetype icaltime_as_zone(struct icaltimetype tt,const char* tzid);
+
+
+
+struct icaldurationtype
+{
+ int is_neg;
+ unsigned int days;
+ unsigned int weeks;
+ unsigned int hours;
+ unsigned int minutes;
+ unsigned int seconds;
+};
+
+struct icaldurationtype icaldurationtype_from_timet(time_t t);
+struct icaldurationtype icaldurationtype_from_string(const char*);
+time_t icaldurationtype_as_timet(struct icaldurationtype duration);
+
+
+struct icalperiodtype
+{
+ struct icaltimetype start; /* Must be absolute */
+ struct icaltimetype end; /* Must be absolute */
+ struct icaldurationtype duration;
+};
+
+time_t icalperiodtype_duration(struct icalperiodtype period);
+time_t icalperiodtype_end(struct icalperiodtype period);
+
+
+
+struct icaltimetype icaltime_add(struct icaltimetype t,
+ struct icaldurationtype d);
+
+struct icaldurationtype icaltime_subtract(struct icaltimetype t1,
+ struct icaltimetype t2);
+
+
+#endif /* !ICALTIME_H */
+
+
+
+
+/* -*- Mode: C -*-*/
+/*======================================================================
+ FILE: icalenums.h
+
+
+
+ (C) COPYRIGHT 2000, Eric Busboom, http://www.softwarestudio.org
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of either:
+
+ The LGPL as published by the Free Software Foundation, version
+ 2.1, available at: http://www.fsf.org/copyleft/lesser.html
+
+ Or:
+
+ The Mozilla Public License Version 1.0. You may obtain a copy of
+ the License at http://www.mozilla.org/MPL/
+
+ The original code is icalenums.h
+
+ Contributions from:
+ Graham Davison (g.m.davison@computer.org)
+
+======================================================================*/
+
+#ifndef ICALENUMS_H
+#define ICALENUMS_H
+
+
+
+/***********************************************************************
+ * Component enumerations
+**********************************************************************/
+
+typedef enum icalcomponent_kind {
+ ICAL_NO_COMPONENT,
+ ICAL_ANY_COMPONENT, /* Used to select all components*/
+ ICAL_XROOT_COMPONENT,
+ ICAL_XATTACH_COMPONENT, /* MIME attached data, returned by parser. */
+ ICAL_VEVENT_COMPONENT,
+ ICAL_VTODO_COMPONENT,
+ ICAL_VJOURNAL_COMPONENT,
+ ICAL_VCALENDAR_COMPONENT,
+ ICAL_VFREEBUSY_COMPONENT,
+ ICAL_VALARM_COMPONENT,
+ ICAL_XAUDIOALARM_COMPONENT,
+ ICAL_XDISPLAYALARM_COMPONENT,
+ ICAL_XEMAILALARM_COMPONENT,
+ ICAL_XPROCEDUREALARM_COMPONENT,
+ ICAL_VTIMEZONE_COMPONENT,
+ ICAL_XSTANDARD_COMPONENT,
+ ICAL_XDAYLIGHT_COMPONENT,
+ ICAL_X_COMPONENT,
+ ICAL_VSCHEDULE_COMPONENT,
+ ICAL_VQUERY_COMPONENT,
+ ICAL_VCAR_COMPONENT,
+ ICAL_VCOMMAND_COMPONENT,
+ ICAL_XLICINVALID_COMPONENT,
+ ICAL_XLICMIMEPART_COMPONENT /* a non-stardard component that mirrors
+ structure of MIME data */
+
+} icalcomponent_kind;
+
+/***********************************************************************
+ * Property Enumerations
+**********************************************************************/
+
+typedef enum icalproperty_kind {
+ ICAL_ANY_PROPERTY = 0, /* This must be the first enum, for iteration */
+ ICAL_CALSCALE_PROPERTY,
+ ICAL_METHOD_PROPERTY,
+ ICAL_PRODID_PROPERTY,
+ ICAL_VERSION_PROPERTY,
+ ICAL_ATTACH_PROPERTY,
+ ICAL_CATEGORIES_PROPERTY,
+ ICAL_CLASS_PROPERTY,
+ ICAL_COMMENT_PROPERTY,
+ ICAL_DESCRIPTION_PROPERTY,
+ ICAL_GEO_PROPERTY,
+ ICAL_LOCATION_PROPERTY,
+ ICAL_PERCENTCOMPLETE_PROPERTY,
+ ICAL_PRIORITY_PROPERTY,
+ ICAL_RESOURCES_PROPERTY,
+ ICAL_STATUS_PROPERTY,
+ ICAL_SUMMARY_PROPERTY,
+ ICAL_COMPLETED_PROPERTY,
+ ICAL_DTEND_PROPERTY,
+ ICAL_DUE_PROPERTY,
+ ICAL_DTSTART_PROPERTY,
+ ICAL_DURATION_PROPERTY,
+ ICAL_FREEBUSY_PROPERTY,
+ ICAL_TRANSP_PROPERTY,
+ ICAL_TZID_PROPERTY,
+ ICAL_TZNAME_PROPERTY,
+ ICAL_TZOFFSETFROM_PROPERTY,
+ ICAL_TZOFFSETTO_PROPERTY,
+ ICAL_TZURL_PROPERTY,
+ ICAL_ATTENDEE_PROPERTY,
+ ICAL_CONTACT_PROPERTY,
+ ICAL_ORGANIZER_PROPERTY,
+ ICAL_RECURRENCEID_PROPERTY,
+ ICAL_RELATEDTO_PROPERTY,
+ ICAL_URL_PROPERTY,
+ ICAL_UID_PROPERTY,
+ ICAL_EXDATE_PROPERTY,
+ ICAL_EXRULE_PROPERTY,
+ ICAL_RDATE_PROPERTY,
+ ICAL_RRULE_PROPERTY,
+ ICAL_ACTION_PROPERTY,
+ ICAL_REPEAT_PROPERTY,
+ ICAL_TRIGGER_PROPERTY,
+ ICAL_CREATED_PROPERTY,
+ ICAL_DTSTAMP_PROPERTY,
+ ICAL_LASTMODIFIED_PROPERTY,
+ ICAL_SEQUENCE_PROPERTY,
+ ICAL_REQUESTSTATUS_PROPERTY,
+ ICAL_X_PROPERTY,
+
+ /* CAP Properties */
+ ICAL_SCOPE_PROPERTY,
+ ICAL_MAXRESULTS_PROPERTY,
+ ICAL_MAXRESULTSSIZE_PROPERTY,
+ ICAL_QUERY_PROPERTY,
+ ICAL_QUERYNAME_PROPERTY,
+ ICAL_TARGET_PROPERTY,
+
+ /* libical private properties */
+ ICAL_XLICERROR_PROPERTY,
+ ICAL_XLICCLUSTERCOUNT_PROPERTY,
+ ICAL_XLICMIMECONTENTTYPE_PROPERTY,
+ ICAL_XLICMIMEENCODING_PROPERTY,
+ ICAL_XLICMIMECID_PROPERTY,
+ ICAL_XLICMIMEFILENAME_PROPERTY,
+ ICAL_XLICMIMECHARSET_PROPERTY,
+ ICAL_XLICMIMEOPTINFO_PROPERTY,
+
+ ICAL_NO_PROPERTY /* This must be the last enum, for iteration */
+
+} icalproperty_kind;
+
+/***********************************************************************
+ * Enumerations for the values of properties
+ ***********************************************************************/
+
+typedef enum icalproperty_method {
+ ICAL_METHOD_PUBLISH,
+ ICAL_METHOD_REQUEST,
+ ICAL_METHOD_REPLY,
+ ICAL_METHOD_ADD,
+ ICAL_METHOD_CANCEL,
+ ICAL_METHOD_REFRESH,
+ ICAL_METHOD_COUNTER,
+ ICAL_METHOD_DECLINECOUNTER,
+ /* CAP Methods */
+ ICAL_METHOD_CREATE,
+ ICAL_METHOD_READ,
+ ICAL_METHOD_RESPONSE,
+ ICAL_METHOD_MOVE,
+ ICAL_METHOD_MODIFY,
+ ICAL_METHOD_GENERATEUID,
+ ICAL_METHOD_DELETE,
+ ICAL_METHOD_NONE
+} icalproperty_method ;
+
+typedef enum icalproperty_transp {
+ ICAL_TRANSP_OPAQUE,
+ ICAL_TRANS_TRANSPARENT
+} icalproperty_trans;
+
+typedef enum icalproperty_calscale {
+ ICAL_CALSCALE_GREGORIAN
+} icalproperty_calscale ;
+
+
+typedef enum icalproperty_class {
+ ICAL_CLASS_PUBLIC,
+ ICAL_CLASS_PRIVATE,
+ ICAL_CLASS_CONFIDENTIAL,
+ ICAL_CLASS_XNAME
+} icalproperty_class;
+
+
+typedef enum icalproperty_status {
+ ICAL_STATUS_NONE,
+ ICAL_STATUS_TENTATIVE,
+ ICAL_STATUS_CONFIRMED,
+ ICAL_STATUS_CANCELLED, /* CANCELED? SIC from RFC*/
+ ICAL_STATUS_NEEDSACTION,
+ ICAL_STATUS_COMPLETED,
+ ICAL_STATUS_INPROCESS,
+ ICAL_STATUS_DRAFT,
+ ICAL_STATUS_FINAL
+} icalproperty_status;
+
+typedef enum icalproperty_action {
+ ICAL_ACTION_AUDIO,
+ ICAL_ACTION_DISPLAY,
+ ICAL_ACTION_EMAIL,
+ ICAL_ACTION_PROCEDURE,
+ ICAL_ACTION_XNAME
+} icalproperty_action;
+
+/***********************************************************************
+ * Value enumerations
+**********************************************************************/
+
+typedef enum icalvalue_kind {
+ ICAL_NO_VALUE,
+ ICAL_ATTACH_VALUE, /* Non-Standard*/
+ ICAL_BINARY_VALUE,
+ ICAL_BOOLEAN_VALUE,
+ ICAL_CALADDRESS_VALUE,
+ ICAL_DATE_VALUE,
+ ICAL_DATETIME_VALUE,
+ ICAL_DATETIMEDATE_VALUE, /* Non-Standard */
+ ICAL_DATETIMEPERIOD_VALUE, /* Non-Standard */
+ ICAL_DURATION_VALUE,
+ ICAL_FLOAT_VALUE,
+ ICAL_GEO_VALUE, /* Non-Standard */
+ ICAL_INTEGER_VALUE,
+ ICAL_METHOD_VALUE, /* Non-Standard */
+ ICAL_STATUS_VALUE, /* Non-Standard */
+ ICAL_PERIOD_VALUE,
+ ICAL_RECUR_VALUE,
+ ICAL_STRING_VALUE, /* Non-Standard */
+ ICAL_TEXT_VALUE,
+ ICAL_TIME_VALUE,
+ ICAL_TRIGGER_VALUE, /* Non-Standard */
+ ICAL_URI_VALUE,
+ ICAL_UTCOFFSET_VALUE,
+ ICAL_QUERY_VALUE,
+ ICAL_XNAME_VALUE
+} icalvalue_kind;
+
+
+/***********************************************************************
+ * Parameter Enumerations
+ **********************************************************************/
+
+
+typedef enum icalparameter_kind {
+ ICAL_NO_PARAMETER,
+ ICAL_ANY_PARAMETER,
+ ICAL_ALTREP_PARAMETER, /* DQUOTE uri DQUOTE */
+ ICAL_CN_PARAMETER, /* text */
+ ICAL_CUTYPE_PARAMETER, /*INDIVIDUAL, GROUP, RESOURCE,ROOM,UNKNOWN, x-name*/
+ ICAL_DELEGATEDFROM_PARAMETER, /* *("," DQUOTE cal-address DQUOTE) */
+ ICAL_DELEGATEDTO_PARAMETER, /* *("," DQUOTE cal-address DQUOTE) */
+ ICAL_DIR_PARAMETER, /* DQUOTE uri DQUOTE */
+ ICAL_ENCODING_PARAMETER, /* *BIT, BASE64, x-name */
+ ICAL_FMTTYPE_PARAMETER, /* registered MINE content type */
+ ICAL_FBTYPE_PARAMETER, /* FREE, BUSY, BUSY-UNAVAILABLE, BUSY-TENTATIVE,x-name */
+ ICAL_LANGUAGE_PARAMETER, /* text from RFC 1766 */
+ ICAL_MEMBER_PARAMETER, /* DQUOTE cal-address DQUOTE */
+ ICAL_PARTSTAT_PARAMETER, /* NEEDS-ACTION, ACCEPTED, DECLINED, TENTATIVE, DELEGATED, x-name */
+ ICAL_RANGE_PARAMETER, /* THISANDPRIOR, THISANDFUTURE */
+ ICAL_RELATED_PARAMETER, /* START, END */
+ ICAL_RELTYPE_PARAMETER, /* PARENT, CHILD, SIBLING,x-name */
+ ICAL_ROLE_PARAMETER, /* CHAIR, REQ_PARTICIPANT, OPT_PARTICIPANT, NON_PARTICIPANT, x-name */
+ ICAL_RSVP_PARAMETER, /* TRUE. FALSE */
+ ICAL_SENTBY_PARAMETER, /* DQUOTE uri DQUOTE */
+ ICAL_TZID_PARAMETER, /* [tzidprefix] paramtext CRLF */
+ ICAL_VALUE_PARAMETER, /* BINARY, BOOLEAN, CAL_ADDRESS, DATE, DATE-TIME, DURATION, FLOAT, INTEGER, PERIOD, RECUR, TEXT, TIME, UTC_OFFSET, x-name */
+ ICAL_XLICERRORTYPE_PARAMETER, /*ICAL_XLICERROR_PARSE_ERROR,ICAL_XLICERROR_INVALID_ITIP*/
+ ICAL_XLICCOMPARETYPE_PARAMETER, /**/
+ ICAL_X_PARAMETER /* text */
+} icalparameter_kind;
+
+typedef enum icalparameter_cutype {
+ ICAL_CUTYPE_INDIVIDUAL,
+ ICAL_CUTYPE_GROUP,
+ ICAL_CUTYPE_RESOURCE,
+ ICAL_CUTYPE_ROOM,
+ ICAL_CUTYPE_UNKNOWN,
+ ICAL_CUTYPE_XNAME
+} icalparameter_cutype;
+
+
+typedef enum icalparameter_encoding {
+ ICAL_ENCODING_8BIT,
+ ICAL_ENCODING_BASE64,
+ ICAL_ENCODING_XNAME
+} icalparameter_encoding;
+
+typedef enum icalparameter_fbtype {
+ ICAL_FBTYPE_FREE,
+ ICAL_FBTYPE_BUSY,
+ ICAL_FBTYPE_BUSYUNAVAILABLE,
+ ICAL_FBTYPE_BUSYTENTATIVE,
+ ICAL_FBTYPE_XNAME
+} icalparameter_fbtype;
+
+typedef enum icalparameter_partstat {
+ ICAL_PARTSTAT_NEEDSACTION,
+ ICAL_PARTSTAT_ACCEPTED,
+ ICAL_PARTSTAT_DECLINED,
+ ICAL_PARTSTAT_TENTATIVE,
+ ICAL_PARTSTAT_DELEGATED,
+ ICAL_PARTSTAT_COMPLETED,
+ ICAL_PARTSTAT_INPROCESS,
+ ICAL_PARTSTAT_XNAME,
+ ICAL_PARTSTAT_NONE
+} icalparameter_partstat;
+
+typedef enum icalparameter_range {
+ ICAL_RANGE_THISANDPRIOR,
+ ICAL_RANGE_THISANDFUTURE
+} icalparameter_range;
+
+typedef enum icalparameter_related {
+ ICAL_RELATED_START,
+ ICAL_RELATED_END
+} icalparameter_related;
+
+typedef enum icalparameter_reltype {
+ ICAL_RELTYPE_PARENT,
+ ICAL_RELTYPE_CHILD,
+ ICAL_RELTYPE_SIBLING,
+ ICAL_RELTYPE_XNAME
+} icalparameter_reltype;
+
+typedef enum icalparameter_role {
+ ICAL_ROLE_CHAIR,
+ ICAL_ROLE_REQPARTICIPANT,
+ ICAL_ROLE_OPTPARTICIPANT,
+ ICAL_ROLE_NONPARTICIPANT,
+ ICAL_ROLE_XNAME
+} icalparameter_role;
+
+typedef enum icalparameter_xlicerrortype {
+ ICAL_XLICERRORTYPE_COMPONENTPARSEERROR,
+ ICAL_XLICERRORTYPE_PARAMETERVALUEPARSEERROR,
+ ICAL_XLICERRORTYPE_PARAMETERNAMEPARSEERROR,
+ ICAL_XLICERRORTYPE_PROPERTYPARSEERROR,
+ ICAL_XLICERRORTYPE_VALUEPARSEERROR,
+ ICAL_XLICERRORTYPE_UNKVCALPROP,
+ ICAL_XLICERRORTYPE_INVALIDITIP,
+ ICAL_XLICERRORTYPE_MIMEPARSEERROR
+} icalparameter_xlicerrortype;
+
+typedef enum icalparameter_xliccomparetype {
+ ICAL_XLICCOMPARETYPE_EQUAL=0,
+ ICAL_XLICCOMPARETYPE_LESS=-1,
+ ICAL_XLICCOMPARETYPE_LESSEQUAL=2,
+ ICAL_XLICCOMPARETYPE_GREATER=1,
+ ICAL_XLICCOMPARETYPE_GREATEREQUAL=3,
+ ICAL_XLICCOMPARETYPE_NOTEQUAL=4,
+ ICAL_XLICCOMPARETYPE_REGEX=5
+} icalparameter_xliccomparetype;
+
+typedef enum icalparameter_value {
+ ICAL_VALUE_XNAME = ICAL_XNAME_VALUE,
+ ICAL_VALUE_BINARY = ICAL_BINARY_VALUE,
+ ICAL_VALUE_BOOLEAN = ICAL_BOOLEAN_VALUE,
+ ICAL_VALUE_CALADDRESS = ICAL_CALADDRESS_VALUE,
+ ICAL_VALUE_DATE = ICAL_DATE_VALUE,
+ ICAL_VALUE_DATETIME = ICAL_DATETIME_VALUE,
+ ICAL_VALUE_DURATION = ICAL_DURATION_VALUE,
+ ICAL_VALUE_FLOAT = ICAL_FLOAT_VALUE,
+ ICAL_VALUE_INTEGER = ICAL_INTEGER_VALUE,
+ ICAL_VALUE_PERIOD = ICAL_PERIOD_VALUE,
+ ICAL_VALUE_RECUR = ICAL_RECUR_VALUE,
+ ICAL_VALUE_TEXT = ICAL_TEXT_VALUE,
+ ICAL_VALUE_TIME = ICAL_TIME_VALUE,
+ ICAL_VALUE_UTCOFFSET = ICAL_UTCOFFSET_VALUE,
+ ICAL_VALUE_URI = ICAL_URI_VALUE,
+ ICAL_VALUE_ERROR = ICAL_NO_VALUE
+} icalparameter_value;
+
+
+/***********************************************************************
+ * Request Status codes
+ **********************************************************************/
+
+typedef enum icalrequeststatus {
+ ICAL_UNKNOWN_STATUS,
+ ICAL_2_0_SUCCESS_STATUS,
+ ICAL_2_1_FALLBACK_STATUS,
+ ICAL_2_2_IGPROP_STATUS,
+ ICAL_2_3_IGPARAM_STATUS,
+ ICAL_2_4_IGXPROP_STATUS,
+ ICAL_2_5_IGXPARAM_STATUS,
+ ICAL_2_6_IGCOMP_STATUS,
+ ICAL_2_7_FORWARD_STATUS,
+ ICAL_2_8_ONEEVENT_STATUS,
+ ICAL_2_9_TRUNC_STATUS,
+ ICAL_2_10_ONETODO_STATUS,
+ ICAL_2_11_TRUNCRRULE_STATUS,
+ ICAL_3_0_INVPROPNAME_STATUS,
+ ICAL_3_1_INVPROPVAL_STATUS,
+ ICAL_3_2_INVPARAM_STATUS,
+ ICAL_3_3_INVPARAMVAL_STATUS,
+ ICAL_3_4_INVCOMP_STATUS,
+ ICAL_3_5_INVTIME_STATUS,
+ ICAL_3_6_INVRULE_STATUS,
+ ICAL_3_7_INVCU_STATUS,
+ ICAL_3_8_NOAUTH_STATUS,
+ ICAL_3_9_BADVERSION_STATUS,
+ ICAL_3_10_TOOBIG_STATUS,
+ ICAL_3_11_MISSREQCOMP_STATUS,
+ ICAL_3_12_UNKCOMP_STATUS,
+ ICAL_3_13_BADCOMP_STATUS,
+ ICAL_3_14_NOCAP_STATUS,
+ ICAL_4_0_BUSY_STATUS,
+ ICAL_5_0_MAYBE_STATUS,
+ ICAL_5_1_UNAVAIL_STATUS,
+ ICAL_5_2_NOSERVICE_STATUS,
+ ICAL_5_3_NOSCHED_STATUS
+} icalrequeststatus;
+
+
+const char* icalenum_reqstat_desc(icalrequeststatus stat);
+short icalenum_reqstat_major(icalrequeststatus stat);
+short icalenum_reqstat_minor(icalrequeststatus stat);
+icalrequeststatus icalenum_num_to_reqstat(short major, short minor);
+
+/***********************************************************************
+ * Conversion functions
+**********************************************************************/
+
+const char* icalenum_property_kind_to_string(icalproperty_kind kind);
+icalproperty_kind icalenum_string_to_property_kind(char* string);
+
+const char* icalenum_value_kind_to_string(icalvalue_kind kind);
+icalvalue_kind icalenum_value_kind_by_prop(icalproperty_kind kind);
+
+const char* icalenum_parameter_kind_to_string(icalparameter_kind kind);
+icalparameter_kind icalenum_string_to_parameter_kind(char* string);
+
+const char* icalenum_component_kind_to_string(icalcomponent_kind kind);
+icalcomponent_kind icalenum_string_to_component_kind(char* string);
+
+icalvalue_kind icalenum_property_kind_to_value_kind(icalproperty_kind kind);
+
+const char* icalenum_method_to_string(icalproperty_method);
+icalproperty_method icalenum_string_to_method(const char* string);
+
+const char* icalenum_status_to_string(icalproperty_status);
+icalproperty_status icalenum_string_to_status(const char* string);
+
+#endif /* !ICALENUMS_H */
+
+
+
/* -*- Mode: C -*- */
/*======================================================================
- FILE: ical.h
+ FILE: icaltypes.h
CREATOR: eric 20 March 1999
@@ -17,34 +607,1836 @@
The Mozilla Public License Version 1.0. You may obtain a copy of
the License at http://www.mozilla.org/MPL/
- The original code is ical.h
+ The original code is icaltypes.h
======================================================================*/
-#ifndef ICAL_H
-#define ICAL_H
+#ifndef ICALTYPES_H
+#define ICALTYPES_H
+
+#include <time.h>
+
+/* This type type should probably be an opaque type... */
+struct icalattachtype
+{
+ void* binary;
+ int owns_binary;
+
+ char* base64;
+ int owns_base64;
+
+ char* url;
+
+ int refcount;
+
+};
+
+/* converts base64 to binary, fetches url and stores as binary, or
+ just returns data */
+
+struct icalattachtype* icalattachtype_new(void);
+void icalattachtype_add_reference(struct icalattachtype* v);
+void icalattachtype_free(struct icalattachtype* v);
+
+void icalattachtype_set_url(struct icalattachtype* v, char* url);
+char* icalattachtype_get_url(struct icalattachtype* v);
+
+void icalattachtype_set_base64(struct icalattachtype* v, char* base64,
+ int owns);
+char* icalattachtype_get_base64(struct icalattachtype* v);
+
+void icalattachtype_set_binary(struct icalattachtype* v, char* binary,
+ int owns);
+void* icalattachtype_get_binary(struct icalattachtype* v);
+
+struct icalgeotype
+{
+ float lat;
+ float lon;
+};
+
+
+
+union icaltriggertype
+{
+ struct icaltimetype time;
+ struct icaldurationtype duration;
+};
+
+
+
+/* struct icalreqstattype. This struct contains two string pointers,
+but don't try to free either of them. The "desc" string is a pointer
+to a static table inside the library. Don't try to free it. The
+"debug" string is a pointer into the string that the called passed
+into to icalreqstattype_from_string. Don't try to free it either, and
+don't use it after the original string has been freed.
+
+BTW, you would get that original string from
+*icalproperty_get_requeststatus() or icalvalue_get_text(), when
+operating on a the value of a request_status property. */
+
+struct icalreqstattype {
+
+ icalrequeststatus code;
+ const char* desc;
+ const char* debug;
+};
+
+struct icalreqstattype icalreqstattype_from_string(char* str);
+char* icalreqstattype_as_string(struct icalreqstattype);
+
+#endif /* !ICALTYPES_H */
+/* -*- Mode: C -*- */
+/*======================================================================
+ FILE: icalrecur.h
+ CREATOR: eric 20 March 2000
+
+
+ (C) COPYRIGHT 2000, Eric Busboom, http://www.softwarestudio.org
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of either:
+
+ The LGPL as published by the Free Software Foundation, version
+ 2.1, available at: http://www.fsf.org/copyleft/lesser.html
+
+ Or:
+
+ The Mozilla Public License Version 1.0. You may obtain a copy of
+ the License at http://www.mozilla.org/MPL/
+
+
+======================================================================*/
+
+#ifndef ICALRECUR_H
+#define ICALRECUR_H
+
+#include <time.h>
+
+
+/***********************************************************************
+ * Recurrance enumerations
+**********************************************************************/
+
+typedef enum icalrecurrencetype_frequency
+{
+ /* These enums are used to index an array, so don't change the
+ order or the integers */
+
+ ICAL_SECONDLY_RECURRENCE=0,
+ ICAL_MINUTELY_RECURRENCE=1,
+ ICAL_HOURLY_RECURRENCE=2,
+ ICAL_DAILY_RECURRENCE=3,
+ ICAL_WEEKLY_RECURRENCE=4,
+ ICAL_MONTHLY_RECURRENCE=5,
+ ICAL_YEARLY_RECURRENCE=6,
+ ICAL_NO_RECURRENCE=7
+
+} icalrecurrencetype_frequency;
+
+typedef enum icalrecurrencetype_weekday
+{
+ ICAL_NO_WEEKDAY,
+ ICAL_SUNDAY_WEEKDAY,
+ ICAL_MONDAY_WEEKDAY,
+ ICAL_TUESDAY_WEEKDAY,
+ ICAL_WEDNESDAY_WEEKDAY,
+ ICAL_THURSDAY_WEEKDAY,
+ ICAL_FRIDAY_WEEKDAY,
+ ICAL_SATURDAY_WEEKDAY
+} icalrecurrencetype_weekday;
+
+enum {
+ ICAL_RECURRENCE_ARRAY_MAX = 0x7f7f,
+ ICAL_RECURRENCE_ARRAY_MAX_BYTE = 0x7f
+};
+
+const char* icalrecur_recurrence_to_string(icalrecurrencetype_frequency kind);
+const char* icalrecur_weekday_to_string(icalrecurrencetype_weekday kind);
+
+
+/********************** Recurrence type routines **************/
+
+/* See RFC 2445 Section 4.3.10, RECUR Value, for an explaination of
+ the values and fields in struct icalrecurrencetype */
+
+
+struct icalrecurrencetype
+{
+ icalrecurrencetype_frequency freq;
+
+
+ /* until and count are mutually exclusive. */
+ struct icaltimetype until; /* Hack. Must be time_t for general use */
+ int count;
+
+ short interval;
+
+ icalrecurrencetype_weekday week_start;
+
+ /* The BY* parameters can each take a list of values. Here I
+ * assume that the list of values will not be larger than the
+ * range of the value -- that is, the client will not name a
+ * value more than once.
+
+ * Each of the lists is terminated with the value
+ * ICALRECURRENCE_ARRAY_MAX unless the the list is full.
+ */
+
+ short by_second[61];
+ short by_minute[61];
+ short by_hour[25];
+ short by_day[8]; /* Encoded value, see below */
+ short by_month_day[32];
+ short by_year_day[367];
+ short by_week_no[54];
+ short by_month[13];
+ short by_set_pos[367];
+};
+
+
+void icalrecurrencetype_clear(struct icalrecurrencetype *r);
+
+/* The 'day' element of icalrecurrencetype_weekday is encoded to allow
+representation of both the day of the week ( Monday, Tueday), but also
+the Nth day of the week ( First tuesday of the month, last thursday of
+the year) These routines decode the day values */
+
+/* 1 == Monday, etc. */
+enum icalrecurrencetype_weekday icalrecurrencetype_day_day_of_week(short day);
+
+/* 0 == any of day of week. 1 == first, 2 = second, -2 == second to last, etc */
+short icalrecurrencetype_day_position(short day);
+
+/* Return the next occurance of 'r' after the time specified by 'after' */
+struct icaltimetype icalrecurrencetype_next_occurance(
+ struct icalrecurrencetype *r,
+ struct icaltimetype *after);
+
+
+
+typedef void icalrecur_iterator;
+void icalrecurrencetype_test();
+
+
+/********** recurrence routines ********************/
+
+icalrecur_iterator* icalrecur_iterator_new(struct icalrecurrencetype rule, struct icaltimetype dtstart);
+
+struct icaltimetype icalrecur_iterator_next(icalrecur_iterator*);
+
+int icalrecur_iterator_count(icalrecur_iterator*);
+
+void icalrecur_iterator_free(icalrecur_iterator*);
-#include "icalversion.h"
-#include "icalenums.h"
-#include "icalvalue.h"
-#include "icalparameter.h"
-#include "icalproperty.h"
-#include "icalcomponent.h"
-#include "icaltypes.h"
-#include "icalparser.h"
-#include "icalmemory.h"
-#include "icalerror.h"
-#include "icalrestriction.h"
-#include "icaltime.h"
-#include "icalrecur.h"
-#ifdef DMALLOC
-#include "dmalloc.h"
#endif
+/* -*- Mode: C -*- */
+/*======================================================================
+ FILE: icalvalue.h
+ CREATOR: eric 20 March 1999
+
+
+ $Id$
+ $Locker$
+
+
+
+ (C) COPYRIGHT 2000, Eric Busboom, http://www.softwarestudio.org
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of either:
+
+ The LGPL as published by the Free Software Foundation, version
+ 2.1, available at: http://www.fsf.org/copyleft/lesser.html
+
+ Or:
+
+ The Mozilla Public License Version 1.0. You may obtain a copy of
+ the License at http://www.mozilla.org/MPL/
+
+ The original code is icalvalue.h
+
+ ======================================================================*/
+
+#ifndef ICALVALUE_H
+#define ICALVALUE_H
+
+#include <time.h>
+
+typedef void icalvalue;
+
+icalvalue* icalvalue_new(icalvalue_kind kind);
+
+icalvalue* icalvalue_new_clone(icalvalue* value);
+
+icalvalue* icalvalue_new_from_string(icalvalue_kind kind, const char* str);
+
+void icalvalue_free(icalvalue* value);
+
+int icalvalue_is_valid(icalvalue* value);
+
+const char* icalvalue_as_ical_string(icalvalue* value);
+
+icalvalue_kind icalvalue_isa(icalvalue* value);
+
+int icalvalue_isa_value(void*);
+
+icalparameter_xliccomparetype
+icalvalue_compare(icalvalue* a, icalvalue *b);
+
+/* Everything below this line is machine generated. Do not edit. */
+/* ATTACH # Non-std */
+icalvalue* icalvalue_new_attach(struct icalattachtype v);
+struct icalattachtype icalvalue_get_attach(icalvalue* value);
+void icalvalue_set_attach(icalvalue* value, struct icalattachtype v);
+
+/* BINARY */
+icalvalue* icalvalue_new_binary(const char* v);
+const char* icalvalue_get_binary(icalvalue* value);
+void icalvalue_set_binary(icalvalue* value, const char* v);
+
+/* BOOLEAN */
+icalvalue* icalvalue_new_boolean(int v);
+int icalvalue_get_boolean(icalvalue* value);
+void icalvalue_set_boolean(icalvalue* value, int v);
+
+/* CAL-ADDRESS */
+icalvalue* icalvalue_new_caladdress(const char* v);
+const char* icalvalue_get_caladdress(icalvalue* value);
+void icalvalue_set_caladdress(icalvalue* value, const char* v);
+
+/* DATE */
+icalvalue* icalvalue_new_date(struct icaltimetype v);
+struct icaltimetype icalvalue_get_date(icalvalue* value);
+void icalvalue_set_date(icalvalue* value, struct icaltimetype v);
+
+/* DATE-TIME */
+icalvalue* icalvalue_new_datetime(struct icaltimetype v);
+struct icaltimetype icalvalue_get_datetime(icalvalue* value);
+void icalvalue_set_datetime(icalvalue* value, struct icaltimetype v);
+
+/* DATE-TIME-DATE # Non-std */
+icalvalue* icalvalue_new_datetimedate(struct icaltimetype v);
+struct icaltimetype icalvalue_get_datetimedate(icalvalue* value);
+void icalvalue_set_datetimedate(icalvalue* value, struct icaltimetype v);
+
+/* DATE-TIME-PERIOD # Non-std */
+icalvalue* icalvalue_new_datetimeperiod(struct icalperiodtype v);
+struct icalperiodtype icalvalue_get_datetimeperiod(icalvalue* value);
+void icalvalue_set_datetimeperiod(icalvalue* value, struct icalperiodtype v);
+
+/* DURATION */
+icalvalue* icalvalue_new_duration(struct icaldurationtype v);
+struct icaldurationtype icalvalue_get_duration(icalvalue* value);
+void icalvalue_set_duration(icalvalue* value, struct icaldurationtype v);
+
+/* FLOAT */
+icalvalue* icalvalue_new_float(float v);
+float icalvalue_get_float(icalvalue* value);
+void icalvalue_set_float(icalvalue* value, float v);
+
+/* GEO # Non-std */
+icalvalue* icalvalue_new_geo(struct icalgeotype v);
+struct icalgeotype icalvalue_get_geo(icalvalue* value);
+void icalvalue_set_geo(icalvalue* value, struct icalgeotype v);
+
+/* INTEGER */
+icalvalue* icalvalue_new_integer(int v);
+int icalvalue_get_integer(icalvalue* value);
+void icalvalue_set_integer(icalvalue* value, int v);
+
+/* METHOD # Non-std */
+icalvalue* icalvalue_new_method(icalproperty_method v);
+icalproperty_method icalvalue_get_method(icalvalue* value);
+void icalvalue_set_method(icalvalue* value, icalproperty_method v);
+
+/* PERIOD */
+icalvalue* icalvalue_new_period(struct icalperiodtype v);
+struct icalperiodtype icalvalue_get_period(icalvalue* value);
+void icalvalue_set_period(icalvalue* value, struct icalperiodtype v);
+
+/* RECUR */
+icalvalue* icalvalue_new_recur(struct icalrecurrencetype v);
+struct icalrecurrencetype icalvalue_get_recur(icalvalue* value);
+void icalvalue_set_recur(icalvalue* value, struct icalrecurrencetype v);
+
+/* STRING # Non-std */
+icalvalue* icalvalue_new_string(const char* v);
+const char* icalvalue_get_string(icalvalue* value);
+void icalvalue_set_string(icalvalue* value, const char* v);
+
+/* TEXT */
+icalvalue* icalvalue_new_text(const char* v);
+const char* icalvalue_get_text(icalvalue* value);
+void icalvalue_set_text(icalvalue* value, const char* v);
+
+/* TIME */
+icalvalue* icalvalue_new_time(struct icaltimetype v);
+struct icaltimetype icalvalue_get_time(icalvalue* value);
+void icalvalue_set_time(icalvalue* value, struct icaltimetype v);
+
+/* TRIGGER # Non-std */
+icalvalue* icalvalue_new_trigger(union icaltriggertype v);
+union icaltriggertype icalvalue_get_trigger(icalvalue* value);
+void icalvalue_set_trigger(icalvalue* value, union icaltriggertype v);
+
+/* URI */
+icalvalue* icalvalue_new_uri(const char* v);
+const char* icalvalue_get_uri(icalvalue* value);
+void icalvalue_set_uri(icalvalue* value, const char* v);
+
+/* UTC-OFFSET */
+icalvalue* icalvalue_new_utcoffset(int v);
+int icalvalue_get_utcoffset(icalvalue* value);
+void icalvalue_set_utcoffset(icalvalue* value, int v);
+
+/* QUERY */
+icalvalue* icalvalue_new_query(const char* v);
+const char* icalvalue_get_query(icalvalue* value);
+void icalvalue_set_query(icalvalue* value, const char* v);
+
+/* STATUS #Non-st */
+icalvalue* icalvalue_new_status(icalproperty_status v);
+icalproperty_status icalvalue_get_status(icalvalue* value);
+void icalvalue_set_status(icalvalue* value, icalproperty_status v);
+
+#endif /*ICALVALUE_H*/
+/* -*- Mode: C -*- */
+/*======================================================================
+ FILE: icalparam.h
+ CREATOR: eric 20 March 1999
+
+
+ $Id$
+ $Locker$
+
+
+
+ (C) COPYRIGHT 2000, Eric Busboom, http://www.softwarestudio.org
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of either:
+
+ The LGPL as published by the Free Software Foundation, version
+ 2.1, available at: http://www.fsf.org/copyleft/lesser.html
+
+ Or:
+
+ The Mozilla Public License Version 1.0. You may obtain a copy of
+ the License at http://www.mozilla.org/MPL/
+
+ The original code is icalparam.h
+
+ ======================================================================*/
+
+#ifndef ICALPARAM_H
+#define ICALPARAM_H
+
+
+typedef void icalparameter;
+
+icalparameter* icalparameter_new(icalparameter_kind kind);
+icalparameter* icalparameter_new_clone(icalparameter* p);
+icalparameter* icalparameter_new_from_string(icalparameter_kind kind, char* value);
+
+void icalparameter_free(icalparameter* parameter);
+
+char* icalparameter_as_ical_string(icalparameter* parameter);
+
+int icalparameter_is_valid(icalparameter* parameter);
+
+icalparameter_kind icalparameter_isa(icalparameter* parameter);
+
+int icalparameter_isa_parameter(void* param);
+
+/* Acess the name of an X parameer */
+void icalparameter_set_xname (icalparameter* param, const char* v);
+const char* icalparameter_get_xname(icalparameter* param);
+void icalparameter_set_xvalue (icalparameter* param, const char* v);
+const char* icalparameter_get_xvalue(icalparameter* param);
+
+
+/* Everything below this line is machine generated. Do not edit. */
+/* ALTREP */
+icalparameter* icalparameter_new_altrep(const char* v);
+const char* icalparameter_get_altrep(icalparameter* value);
+void icalparameter_set_altrep(icalparameter* value, const char* v);
+
+/* CN */
+icalparameter* icalparameter_new_cn(const char* v);
+const char* icalparameter_get_cn(icalparameter* value);
+void icalparameter_set_cn(icalparameter* value, const char* v);
+
+/* CUTYPE */
+icalparameter* icalparameter_new_cutype(icalparameter_cutype v);
+icalparameter_cutype icalparameter_get_cutype(icalparameter* value);
+void icalparameter_set_cutype(icalparameter* value, icalparameter_cutype v);
+
+/* DELEGATED-FROM */
+icalparameter* icalparameter_new_delegatedfrom(const char* v);
+const char* icalparameter_get_delegatedfrom(icalparameter* value);
+void icalparameter_set_delegatedfrom(icalparameter* value, const char* v);
+
+/* DELEGATED-TO */
+icalparameter* icalparameter_new_delegatedto(const char* v);
+const char* icalparameter_get_delegatedto(icalparameter* value);
+void icalparameter_set_delegatedto(icalparameter* value, const char* v);
+
+/* DIR */
+icalparameter* icalparameter_new_dir(const char* v);
+const char* icalparameter_get_dir(icalparameter* value);
+void icalparameter_set_dir(icalparameter* value, const char* v);
+
+/* ENCODING */
+icalparameter* icalparameter_new_encoding(icalparameter_encoding v);
+icalparameter_encoding icalparameter_get_encoding(icalparameter* value);
+void icalparameter_set_encoding(icalparameter* value, icalparameter_encoding v);
+
+/* FBTYPE */
+icalparameter* icalparameter_new_fbtype(icalparameter_fbtype v);
+icalparameter_fbtype icalparameter_get_fbtype(icalparameter* value);
+void icalparameter_set_fbtype(icalparameter* value, icalparameter_fbtype v);
+
+/* FMTTYPE */
+icalparameter* icalparameter_new_fmttype(const char* v);
+const char* icalparameter_get_fmttype(icalparameter* value);
+void icalparameter_set_fmttype(icalparameter* value, const char* v);
+
+/* LANGUAGE */
+icalparameter* icalparameter_new_language(const char* v);
+const char* icalparameter_get_language(icalparameter* value);
+void icalparameter_set_language(icalparameter* value, const char* v);
+
+/* MEMBER */
+icalparameter* icalparameter_new_member(const char* v);
+const char* icalparameter_get_member(icalparameter* value);
+void icalparameter_set_member(icalparameter* value, const char* v);
+
+/* PARTSTAT */
+icalparameter* icalparameter_new_partstat(icalparameter_partstat v);
+icalparameter_partstat icalparameter_get_partstat(icalparameter* value);
+void icalparameter_set_partstat(icalparameter* value, icalparameter_partstat v);
+
+/* RANGE */
+icalparameter* icalparameter_new_range(icalparameter_range v);
+icalparameter_range icalparameter_get_range(icalparameter* value);
+void icalparameter_set_range(icalparameter* value, icalparameter_range v);
+
+/* RELATED */
+icalparameter* icalparameter_new_related(icalparameter_related v);
+icalparameter_related icalparameter_get_related(icalparameter* value);
+void icalparameter_set_related(icalparameter* value, icalparameter_related v);
+
+/* RELTYPE */
+icalparameter* icalparameter_new_reltype(icalparameter_reltype v);
+icalparameter_reltype icalparameter_get_reltype(icalparameter* value);
+void icalparameter_set_reltype(icalparameter* value, icalparameter_reltype v);
+
+/* ROLE */
+icalparameter* icalparameter_new_role(icalparameter_role v);
+icalparameter_role icalparameter_get_role(icalparameter* value);
+void icalparameter_set_role(icalparameter* value, icalparameter_role v);
+
+/* RSVP */
+icalparameter* icalparameter_new_rsvp(int v);
+int icalparameter_get_rsvp(icalparameter* value);
+void icalparameter_set_rsvp(icalparameter* value, int v);
+
+/* SENT-BY */
+icalparameter* icalparameter_new_sentby(const char* v);
+const char* icalparameter_get_sentby(icalparameter* value);
+void icalparameter_set_sentby(icalparameter* value, const char* v);
+
+/* TZID */
+icalparameter* icalparameter_new_tzid(const char* v);
+const char* icalparameter_get_tzid(icalparameter* value);
+void icalparameter_set_tzid(icalparameter* value, const char* v);
+
+/* VALUE */
+icalparameter* icalparameter_new_value(icalparameter_value v);
+icalparameter_value icalparameter_get_value(icalparameter* value);
+void icalparameter_set_value(icalparameter* value, icalparameter_value v);
+
+/* X */
+icalparameter* icalparameter_new_x(const char* v);
+const char* icalparameter_get_x(icalparameter* value);
+void icalparameter_set_x(icalparameter* value, const char* v);
+
+/* X-LIC-ERRORTYPE */
+icalparameter* icalparameter_new_xlicerrortype(icalparameter_xlicerrortype v);
+icalparameter_xlicerrortype icalparameter_get_xlicerrortype(icalparameter* value);
+void icalparameter_set_xlicerrortype(icalparameter* value, icalparameter_xlicerrortype v);
+
+/* X-LIC-COMPARETYPE */
+icalparameter* icalparameter_new_xliccomparetype(icalparameter_xliccomparetype v);
+icalparameter_xliccomparetype icalparameter_get_xliccomparetype(icalparameter* value);
+void icalparameter_set_xliccomparetype(icalparameter* value, icalparameter_xliccomparetype v);
+
+#endif /*ICALPARAMETER_H*/
+/* -*- Mode: C -*-
+ ======================================================================
+ FILE: icalderivedproperties.{c,h}
+ CREATOR: eric 09 May 1999
+
+ $Id$
+
+ (C) COPYRIGHT 2000, Eric Busboom, http://www.softwarestudio.org
+ ======================================================================*/
+
+
+#ifndef ICALPROPERTY_H
+#define ICALPROPERTY_H
+
+#include <time.h>
+
+typedef void icalproperty;
+
+icalproperty* icalproperty_new(icalproperty_kind kind);
+
+icalproperty* icalproperty_new_clone(icalproperty * prop);
+
+icalproperty* icalproperty_new_from_string(char* str);
+
+char* icalproperty_as_ical_string(icalproperty* prop);
+
+void icalproperty_free(icalproperty* prop);
+
+icalproperty_kind icalproperty_isa(icalproperty* property);
+int icalproperty_isa_property(void* property);
+
+void icalproperty_add_parameter(icalproperty* prop,icalparameter* parameter);
+void icalproperty_set_parameter(icalproperty* prop,icalparameter* parameter);
+
+void icalproperty_remove_parameter(icalproperty* prop,
+ icalparameter_kind kind);
+
+int icalproperty_count_parameters(icalproperty* prop);
+
+/* Iterate through the parameters */
+icalparameter* icalproperty_get_first_parameter(icalproperty* prop,
+ icalparameter_kind kind);
+icalparameter* icalproperty_get_next_parameter(icalproperty* prop,
+ icalparameter_kind kind);
+/* Access the value of the property */
+void icalproperty_set_value(icalproperty* prop, icalvalue* value);
+icalvalue* icalproperty_get_value(icalproperty* prop);
+
+/* Deal with X properties */
+
+void icalproperty_set_x_name(icalproperty* prop, char* name);
+char* icalproperty_get_x_name(icalproperty* prop);
+
+/* Everything below this line is machine generated. Do not edit. */
+
+/* METHOD */
+icalproperty* icalproperty_new_method(icalproperty_method v);
+icalproperty* icalproperty_vanew_method(icalproperty_method v, ...);
+void icalproperty_set_method(icalproperty* prop, icalproperty_method v);
+icalproperty_method icalproperty_get_method(icalproperty* prop);
+
+/* X-LIC-MIMECID */
+icalproperty* icalproperty_new_xlicmimecid(const char* v);
+icalproperty* icalproperty_vanew_xlicmimecid(const char* v, ...);
+void icalproperty_set_xlicmimecid(icalproperty* prop, const char* v);
+const char* icalproperty_get_xlicmimecid(icalproperty* prop);
+
+/* LAST-MODIFIED */
+icalproperty* icalproperty_new_lastmodified(struct icaltimetype v);
+icalproperty* icalproperty_vanew_lastmodified(struct icaltimetype v, ...);
+void icalproperty_set_lastmodified(icalproperty* prop, struct icaltimetype v);
+struct icaltimetype icalproperty_get_lastmodified(icalproperty* prop);
+
+/* UID */
+icalproperty* icalproperty_new_uid(const char* v);
+icalproperty* icalproperty_vanew_uid(const char* v, ...);
+void icalproperty_set_uid(icalproperty* prop, const char* v);
+const char* icalproperty_get_uid(icalproperty* prop);
+
+/* PRODID */
+icalproperty* icalproperty_new_prodid(const char* v);
+icalproperty* icalproperty_vanew_prodid(const char* v, ...);
+void icalproperty_set_prodid(icalproperty* prop, const char* v);
+const char* icalproperty_get_prodid(icalproperty* prop);
+
+/* STATUS */
+icalproperty* icalproperty_new_status(icalproperty_status v);
+icalproperty* icalproperty_vanew_status(icalproperty_status v, ...);
+void icalproperty_set_status(icalproperty* prop, icalproperty_status v);
+icalproperty_status icalproperty_get_status(icalproperty* prop);
+
+/* DESCRIPTION */
+icalproperty* icalproperty_new_description(const char* v);
+icalproperty* icalproperty_vanew_description(const char* v, ...);
+void icalproperty_set_description(icalproperty* prop, const char* v);
+const char* icalproperty_get_description(icalproperty* prop);
+
+/* DURATION */
+icalproperty* icalproperty_new_duration(struct icaldurationtype v);
+icalproperty* icalproperty_vanew_duration(struct icaldurationtype v, ...);
+void icalproperty_set_duration(icalproperty* prop, struct icaldurationtype v);
+struct icaldurationtype icalproperty_get_duration(icalproperty* prop);
+
+/* CATEGORIES */
+icalproperty* icalproperty_new_categories(const char* v);
+icalproperty* icalproperty_vanew_categories(const char* v, ...);
+void icalproperty_set_categories(icalproperty* prop, const char* v);
+const char* icalproperty_get_categories(icalproperty* prop);
+
+/* VERSION */
+icalproperty* icalproperty_new_version(const char* v);
+icalproperty* icalproperty_vanew_version(const char* v, ...);
+void icalproperty_set_version(icalproperty* prop, const char* v);
+const char* icalproperty_get_version(icalproperty* prop);
+
+/* TZOFFSETFROM */
+icalproperty* icalproperty_new_tzoffsetfrom(int v);
+icalproperty* icalproperty_vanew_tzoffsetfrom(int v, ...);
+void icalproperty_set_tzoffsetfrom(icalproperty* prop, int v);
+int icalproperty_get_tzoffsetfrom(icalproperty* prop);
+
+/* RRULE */
+icalproperty* icalproperty_new_rrule(struct icalrecurrencetype v);
+icalproperty* icalproperty_vanew_rrule(struct icalrecurrencetype v, ...);
+void icalproperty_set_rrule(icalproperty* prop, struct icalrecurrencetype v);
+struct icalrecurrencetype icalproperty_get_rrule(icalproperty* prop);
+
+/* ATTENDEE */
+icalproperty* icalproperty_new_attendee(const char* v);
+icalproperty* icalproperty_vanew_attendee(const char* v, ...);
+void icalproperty_set_attendee(icalproperty* prop, const char* v);
+const char* icalproperty_get_attendee(icalproperty* prop);
+
+/* CONTACT */
+icalproperty* icalproperty_new_contact(const char* v);
+icalproperty* icalproperty_vanew_contact(const char* v, ...);
+void icalproperty_set_contact(icalproperty* prop, const char* v);
+const char* icalproperty_get_contact(icalproperty* prop);
+
+/* X-LIC-MIMECONTENTTYPE */
+icalproperty* icalproperty_new_xlicmimecontenttype(const char* v);
+icalproperty* icalproperty_vanew_xlicmimecontenttype(const char* v, ...);
+void icalproperty_set_xlicmimecontenttype(icalproperty* prop, const char* v);
+const char* icalproperty_get_xlicmimecontenttype(icalproperty* prop);
+
+/* X-LIC-MIMEOPTINFO */
+icalproperty* icalproperty_new_xlicmimeoptinfo(const char* v);
+icalproperty* icalproperty_vanew_xlicmimeoptinfo(const char* v, ...);
+void icalproperty_set_xlicmimeoptinfo(icalproperty* prop, const char* v);
+const char* icalproperty_get_xlicmimeoptinfo(icalproperty* prop);
+
+/* RELATED-TO */
+icalproperty* icalproperty_new_relatedto(const char* v);
+icalproperty* icalproperty_vanew_relatedto(const char* v, ...);
+void icalproperty_set_relatedto(icalproperty* prop, const char* v);
+const char* icalproperty_get_relatedto(icalproperty* prop);
+
+/* ORGANIZER */
+icalproperty* icalproperty_new_organizer(const char* v);
+icalproperty* icalproperty_vanew_organizer(const char* v, ...);
+void icalproperty_set_organizer(icalproperty* prop, const char* v);
+const char* icalproperty_get_organizer(icalproperty* prop);
+
+/* COMMENT */
+icalproperty* icalproperty_new_comment(const char* v);
+icalproperty* icalproperty_vanew_comment(const char* v, ...);
+void icalproperty_set_comment(icalproperty* prop, const char* v);
+const char* icalproperty_get_comment(icalproperty* prop);
+
+/* X-LIC-ERROR */
+icalproperty* icalproperty_new_xlicerror(const char* v);
+icalproperty* icalproperty_vanew_xlicerror(const char* v, ...);
+void icalproperty_set_xlicerror(icalproperty* prop, const char* v);
+const char* icalproperty_get_xlicerror(icalproperty* prop);
+
+/* TRIGGER */
+icalproperty* icalproperty_new_trigger(union icaltriggertype v);
+icalproperty* icalproperty_vanew_trigger(union icaltriggertype v, ...);
+void icalproperty_set_trigger(icalproperty* prop, union icaltriggertype v);
+union icaltriggertype icalproperty_get_trigger(icalproperty* prop);
+
+/* CLASS */
+icalproperty* icalproperty_new_class(const char* v);
+icalproperty* icalproperty_vanew_class(const char* v, ...);
+void icalproperty_set_class(icalproperty* prop, const char* v);
+const char* icalproperty_get_class(icalproperty* prop);
+
+/* X */
+icalproperty* icalproperty_new_x(const char* v);
+icalproperty* icalproperty_vanew_x(const char* v, ...);
+void icalproperty_set_x(icalproperty* prop, const char* v);
+const char* icalproperty_get_x(icalproperty* prop);
+
+/* TZOFFSETTO */
+icalproperty* icalproperty_new_tzoffsetto(int v);
+icalproperty* icalproperty_vanew_tzoffsetto(int v, ...);
+void icalproperty_set_tzoffsetto(icalproperty* prop, int v);
+int icalproperty_get_tzoffsetto(icalproperty* prop);
+
+/* TRANSP */
+icalproperty* icalproperty_new_transp(const char* v);
+icalproperty* icalproperty_vanew_transp(const char* v, ...);
+void icalproperty_set_transp(icalproperty* prop, const char* v);
+const char* icalproperty_get_transp(icalproperty* prop);
+
+/* X-LIC-MIMEENCODING */
+icalproperty* icalproperty_new_xlicmimeencoding(const char* v);
+icalproperty* icalproperty_vanew_xlicmimeencoding(const char* v, ...);
+void icalproperty_set_xlicmimeencoding(icalproperty* prop, const char* v);
+const char* icalproperty_get_xlicmimeencoding(icalproperty* prop);
+
+/* SEQUENCE */
+icalproperty* icalproperty_new_sequence(int v);
+icalproperty* icalproperty_vanew_sequence(int v, ...);
+void icalproperty_set_sequence(icalproperty* prop, int v);
+int icalproperty_get_sequence(icalproperty* prop);
+
+/* LOCATION */
+icalproperty* icalproperty_new_location(const char* v);
+icalproperty* icalproperty_vanew_location(const char* v, ...);
+void icalproperty_set_location(icalproperty* prop, const char* v);
+const char* icalproperty_get_location(icalproperty* prop);
+
+/* REQUEST-STATUS */
+icalproperty* icalproperty_new_requeststatus(const char* v);
+icalproperty* icalproperty_vanew_requeststatus(const char* v, ...);
+void icalproperty_set_requeststatus(icalproperty* prop, const char* v);
+const char* icalproperty_get_requeststatus(icalproperty* prop);
+
+/* EXDATE */
+icalproperty* icalproperty_new_exdate(struct icaltimetype v);
+icalproperty* icalproperty_vanew_exdate(struct icaltimetype v, ...);
+void icalproperty_set_exdate(icalproperty* prop, struct icaltimetype v);
+struct icaltimetype icalproperty_get_exdate(icalproperty* prop);
+
+/* TZID */
+icalproperty* icalproperty_new_tzid(const char* v);
+icalproperty* icalproperty_vanew_tzid(const char* v, ...);
+void icalproperty_set_tzid(icalproperty* prop, const char* v);
+const char* icalproperty_get_tzid(icalproperty* prop);
+
+/* RESOURCES */
+icalproperty* icalproperty_new_resources(const char* v);
+icalproperty* icalproperty_vanew_resources(const char* v, ...);
+void icalproperty_set_resources(icalproperty* prop, const char* v);
+const char* icalproperty_get_resources(icalproperty* prop);
+
+/* TZURL */
+icalproperty* icalproperty_new_tzurl(const char* v);
+icalproperty* icalproperty_vanew_tzurl(const char* v, ...);
+void icalproperty_set_tzurl(icalproperty* prop, const char* v);
+const char* icalproperty_get_tzurl(icalproperty* prop);
+
+/* REPEAT */
+icalproperty* icalproperty_new_repeat(int v);
+icalproperty* icalproperty_vanew_repeat(int v, ...);
+void icalproperty_set_repeat(icalproperty* prop, int v);
+int icalproperty_get_repeat(icalproperty* prop);
+
+/* PRIORITY */
+icalproperty* icalproperty_new_priority(int v);
+icalproperty* icalproperty_vanew_priority(int v, ...);
+void icalproperty_set_priority(icalproperty* prop, int v);
+int icalproperty_get_priority(icalproperty* prop);
+
+/* FREEBUSY */
+icalproperty* icalproperty_new_freebusy(struct icalperiodtype v);
+icalproperty* icalproperty_vanew_freebusy(struct icalperiodtype v, ...);
+void icalproperty_set_freebusy(icalproperty* prop, struct icalperiodtype v);
+struct icalperiodtype icalproperty_get_freebusy(icalproperty* prop);
+
+/* DTSTART */
+icalproperty* icalproperty_new_dtstart(struct icaltimetype v);
+icalproperty* icalproperty_vanew_dtstart(struct icaltimetype v, ...);
+void icalproperty_set_dtstart(icalproperty* prop, struct icaltimetype v);
+struct icaltimetype icalproperty_get_dtstart(icalproperty* prop);
+
+/* RECURRENCE-ID */
+icalproperty* icalproperty_new_recurrenceid(struct icaltimetype v);
+icalproperty* icalproperty_vanew_recurrenceid(struct icaltimetype v, ...);
+void icalproperty_set_recurrenceid(icalproperty* prop, struct icaltimetype v);
+struct icaltimetype icalproperty_get_recurrenceid(icalproperty* prop);
+
+/* SUMMARY */
+icalproperty* icalproperty_new_summary(const char* v);
+icalproperty* icalproperty_vanew_summary(const char* v, ...);
+void icalproperty_set_summary(icalproperty* prop, const char* v);
+const char* icalproperty_get_summary(icalproperty* prop);
+
+/* DTEND */
+icalproperty* icalproperty_new_dtend(struct icaltimetype v);
+icalproperty* icalproperty_vanew_dtend(struct icaltimetype v, ...);
+void icalproperty_set_dtend(icalproperty* prop, struct icaltimetype v);
+struct icaltimetype icalproperty_get_dtend(icalproperty* prop);
+
+/* TZNAME */
+icalproperty* icalproperty_new_tzname(const char* v);
+icalproperty* icalproperty_vanew_tzname(const char* v, ...);
+void icalproperty_set_tzname(icalproperty* prop, const char* v);
+const char* icalproperty_get_tzname(icalproperty* prop);
+
+/* RDATE */
+icalproperty* icalproperty_new_rdate(struct icalperiodtype v);
+icalproperty* icalproperty_vanew_rdate(struct icalperiodtype v, ...);
+void icalproperty_set_rdate(icalproperty* prop, struct icalperiodtype v);
+struct icalperiodtype icalproperty_get_rdate(icalproperty* prop);
+
+/* X-LIC-MIMEFILENAME */
+icalproperty* icalproperty_new_xlicmimefilename(const char* v);
+icalproperty* icalproperty_vanew_xlicmimefilename(const char* v, ...);
+void icalproperty_set_xlicmimefilename(icalproperty* prop, const char* v);
+const char* icalproperty_get_xlicmimefilename(icalproperty* prop);
+
+/* URL */
+icalproperty* icalproperty_new_url(const char* v);
+icalproperty* icalproperty_vanew_url(const char* v, ...);
+void icalproperty_set_url(icalproperty* prop, const char* v);
+const char* icalproperty_get_url(icalproperty* prop);
+
+/* X-LIC-CLUSTERCOUNT */
+icalproperty* icalproperty_new_xlicclustercount(int v);
+icalproperty* icalproperty_vanew_xlicclustercount(int v, ...);
+void icalproperty_set_xlicclustercount(icalproperty* prop, int v);
+int icalproperty_get_xlicclustercount(icalproperty* prop);
+
+/* ATTACH */
+icalproperty* icalproperty_new_attach(struct icalattachtype v);
+icalproperty* icalproperty_vanew_attach(struct icalattachtype v, ...);
+void icalproperty_set_attach(icalproperty* prop, struct icalattachtype v);
+struct icalattachtype icalproperty_get_attach(icalproperty* prop);
+
+/* EXRULE */
+icalproperty* icalproperty_new_exrule(struct icalrecurrencetype v);
+icalproperty* icalproperty_vanew_exrule(struct icalrecurrencetype v, ...);
+void icalproperty_set_exrule(icalproperty* prop, struct icalrecurrencetype v);
+struct icalrecurrencetype icalproperty_get_exrule(icalproperty* prop);
+
+/* QUERY */
+icalproperty* icalproperty_new_query(const char* v);
+icalproperty* icalproperty_vanew_query(const char* v, ...);
+void icalproperty_set_query(icalproperty* prop, const char* v);
+const char* icalproperty_get_query(icalproperty* prop);
+
+/* PERCENT-COMPLETE */
+icalproperty* icalproperty_new_percentcomplete(int v);
+icalproperty* icalproperty_vanew_percentcomplete(int v, ...);
+void icalproperty_set_percentcomplete(icalproperty* prop, int v);
+int icalproperty_get_percentcomplete(icalproperty* prop);
+
+/* CALSCALE */
+icalproperty* icalproperty_new_calscale(const char* v);
+icalproperty* icalproperty_vanew_calscale(const char* v, ...);
+void icalproperty_set_calscale(icalproperty* prop, const char* v);
+const char* icalproperty_get_calscale(icalproperty* prop);
+
+/* CREATED */
+icalproperty* icalproperty_new_created(struct icaltimetype v);
+icalproperty* icalproperty_vanew_created(struct icaltimetype v, ...);
+void icalproperty_set_created(icalproperty* prop, struct icaltimetype v);
+struct icaltimetype icalproperty_get_created(icalproperty* prop);
+
+/* GEO */
+icalproperty* icalproperty_new_geo(struct icalgeotype v);
+icalproperty* icalproperty_vanew_geo(struct icalgeotype v, ...);
+void icalproperty_set_geo(icalproperty* prop, struct icalgeotype v);
+struct icalgeotype icalproperty_get_geo(icalproperty* prop);
+
+/* X-LIC-MIMECHARSET */
+icalproperty* icalproperty_new_xlicmimecharset(const char* v);
+icalproperty* icalproperty_vanew_xlicmimecharset(const char* v, ...);
+void icalproperty_set_xlicmimecharset(icalproperty* prop, const char* v);
+const char* icalproperty_get_xlicmimecharset(icalproperty* prop);
+
+/* COMPLETED */
+icalproperty* icalproperty_new_completed(struct icaltimetype v);
+icalproperty* icalproperty_vanew_completed(struct icaltimetype v, ...);
+void icalproperty_set_completed(icalproperty* prop, struct icaltimetype v);
+struct icaltimetype icalproperty_get_completed(icalproperty* prop);
+
+/* DTSTAMP */
+icalproperty* icalproperty_new_dtstamp(struct icaltimetype v);
+icalproperty* icalproperty_vanew_dtstamp(struct icaltimetype v, ...);
+void icalproperty_set_dtstamp(icalproperty* prop, struct icaltimetype v);
+struct icaltimetype icalproperty_get_dtstamp(icalproperty* prop);
+
+/* DUE */
+icalproperty* icalproperty_new_due(struct icaltimetype v);
+icalproperty* icalproperty_vanew_due(struct icaltimetype v, ...);
+void icalproperty_set_due(icalproperty* prop, struct icaltimetype v);
+struct icaltimetype icalproperty_get_due(icalproperty* prop);
+
+/* ACTION */
+icalproperty* icalproperty_new_action(const char* v);
+icalproperty* icalproperty_vanew_action(const char* v, ...);
+void icalproperty_set_action(icalproperty* prop, const char* v);
+const char* icalproperty_get_action(icalproperty* prop);
+#endif /*ICALPROPERTY_H*/
+/*======================================================================
+ FILE: pvl.h
+ CREATOR: eric November, 1995
+
+
+ (C) COPYRIGHT 2000, Eric Busboom, http://www.softwarestudio.org
+======================================================================*/
+
+
+#ifndef __PVL_H__
+#define __PVL_H__
+
+typedef void* pvl_list;
+typedef void* pvl_elem;
+
+/*
+ struct pvl_elem_t
+
+ This type is private. Always use pvl_elem instead. The struct would
+ not even appear in this header except to make code in the USE_MACROS
+ blocks work
+
+ */
+typedef struct pvl_elem_t
+{
+ int MAGIC; /* Magic Identifier */
+ void *d; /* Pointer to data user is storing */
+ struct pvl_elem_t *next; /* Next element */
+ struct pvl_elem_t *prior; /* prior element */
+} pvl_elem_t;
+
+
+
+/* This global is incremented for each call to pvl_new_element(); it gives each
+ * list a unique identifer */
+
+extern int pvl_elem_count;
+extern int pvl_list_count;
+
+/* Create new lists or elements */
+pvl_elem pvl_new_element(void* d, pvl_elem next,pvl_elem prior);
+pvl_list pvl_newlist(void);
+void pvl_free(pvl_list);
+
+/* Add, remove, or get the head of the list */
+void pvl_unshift(pvl_list l,void *d);
+void* pvl_shift(pvl_list l);
+pvl_elem pvl_head(pvl_list);
+
+/* Add, remove or get the tail of the list */
+void pvl_push(pvl_list l,void *d);
+void* pvl_pop(pvl_list l);
+pvl_elem pvl_tail(pvl_list);
+
+/* Insert elements in random places */
+typedef int (*pvl_comparef)(void* a, void* b); /* a, b are of the data type*/
+void pvl_insert_ordered(pvl_list l,pvl_comparef f,void *d);
+void pvl_insert_after(pvl_list l,pvl_elem e,void *d);
+void pvl_insert_before(pvl_list l,pvl_elem e,void *d);
+
+/* Remove an element, or clear the entire list */
+void* pvl_remove(pvl_list,pvl_elem); /* Remove element, return data */
+void pvl_clear(pvl_list); /* Remove all elements, de-allocate all data */
+
+int pvl_count(pvl_list);
+
+/* Navagate the list */
+pvl_elem pvl_next(pvl_elem e);
+pvl_elem pvl_prior(pvl_elem e);
+
+/* get the data in the list */
+#ifndef PVL_USE_MACROS
+void* pvl_data(pvl_elem);
+#else
+#define pvl_data(x) x==0 ? 0 : ((struct pvl_elem_t *)x)->d;
+#endif
+
+
+/* Find an element for which a function returns true */
+typedef int (*pvl_findf)(void* a, void* b); /*a is list elem, b is other data*/
+pvl_elem pvl_find(pvl_list l,pvl_findf f,void* v);
+pvl_elem pvl_find_next(pvl_list l,pvl_findf f,void* v);
+
+/* Pass each element in the list to a function */
+typedef void (*pvl_applyf)(void* a, void* b); /*a is list elem, b is other data*/
+void pvl_apply(pvl_list l,pvl_applyf f, void *v);
+
+
+#endif /* __PVL_H__ */
+
+
+
+
+
+/* -*- Mode: C -*- */
+/*======================================================================
+ FILE: icalcomponent.h
+ CREATOR: eric 20 March 1999
+
+
+ (C) COPYRIGHT 2000, Eric Busboom, http://www.softwarestudio.org
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of either:
+
+ The LGPL as published by the Free Software Foundation, version
+ 2.1, available at: http://www.fsf.org/copyleft/lesser.html
+
+ Or:
+
+ The Mozilla Public License Version 1.0. You may obtain a copy of
+ the License at http://www.mozilla.org/MPL/
+
+ The original code is icalcomponent.h
+
+======================================================================*/
+
+#ifndef ICALCOMPONENT_H
+#define ICALCOMPONENT_H
+
+
+typedef void icalcomponent;
+
+/* This is exposed so that callers will not have to allocate and
+ deallocate iterators. Pretend that you can't see it. */
+typedef struct icalcompiter
+{
+ icalcomponent_kind kind;
+ pvl_elem iter;
+
+} icalcompiter;
+
+icalcomponent* icalcomponent_new(icalcomponent_kind kind);
+icalcomponent* icalcomponent_new_clone(icalcomponent* component);
+icalcomponent* icalcomponent_new_from_string(char* str);
+icalcomponent* icalcomponent_vanew(icalcomponent_kind kind, ...);
+void icalcomponent_free(icalcomponent* component);
+
+char* icalcomponent_as_ical_string(icalcomponent* component);
+
+int icalcomponent_is_valid(icalcomponent* component);
+
+icalcomponent_kind icalcomponent_isa(icalcomponent* component);
+
+int icalcomponent_isa_component (void* component);
+
+/*
+ * Working with properties
+ */
+
+void icalcomponent_add_property(icalcomponent* component,
+ icalproperty* property);
+
+void icalcomponent_remove_property(icalcomponent* component,
+ icalproperty* property);
+
+int icalcomponent_count_properties(icalcomponent* component,
+ icalproperty_kind kind);
+
+/* Iterate through the properties */
+icalproperty* icalcomponent_get_current_property(icalcomponent* component);
+
+icalproperty* icalcomponent_get_first_property(icalcomponent* component,
+ icalproperty_kind kind);
+icalproperty* icalcomponent_get_next_property(icalcomponent* component,
+ icalproperty_kind kind);
+
+/* Return a null-terminated array of icalproperties*/
+
+icalproperty** icalcomponent_get_properties(icalcomponent* component,
+ icalproperty_kind kind);
+
+
+/*
+ * Working with components
+ */
+
+
+void icalcomponent_add_component(icalcomponent* parent,
+ icalcomponent* child);
+
+void icalcomponent_remove_component(icalcomponent* parent,
+ icalcomponent* child);
+
+int icalcomponent_count_components(icalcomponent* component,
+ icalcomponent_kind kind);
+
+/* Iteration Routines. There are two forms of iterators, internal and
+external. The internal ones came first, and are almost completely
+sufficient, but they fail badly when you want to construct a loop that
+removes components from the container.
+
+The internal iterators are deprecated. */
+
+/* Using external iterators */
+icalcompiter icalcomponent_begin_component(icalcomponent* component,
+ icalcomponent_kind kind);
+
+icalcompiter icalcomponent_end_component(icalcomponent* component,
+ icalcomponent_kind kind);
+
+/* Iterate through components */
+icalcomponent* icalcomponent_get_current_component (icalcomponent* component);
+
+icalcomponent* icalcomponent_get_first_component(icalcomponent* component,
+ icalcomponent_kind kind);
+icalcomponent* icalcomponent_get_next_component(icalcomponent* component,
+ icalcomponent_kind kind);
+
+
+
+
+/* Working with embedded error properties */
+
+int icalcomponent_count_errors(icalcomponent* component);
+
+/* Remove all X-LIC-ERROR properties*/
+void icalcomponent_strip_errors(icalcomponent* component);
+
+/* Convert some X-LIC-ERROR properties into RETURN-STATUS properties*/
+void icalcomponent_convert_errors(icalcomponent* component);
+
+/* Internal operations. You don't see these... */
+icalcomponent* icalcomponent_get_parent(icalcomponent* component);
+void icalcomponent_set_parent(icalcomponent* component,
+ icalcomponent* parent);
+/* External component iterator */
+icalcomponent* icalcompiter_next(icalcompiter* i);
+icalcomponent* icalcompiter_prior(icalcompiter* i);
+icalcomponent* icalcompiter_deref(icalcompiter* i);
+
+/************* Derived class methods. ****************************
+
+If the code was in an OO language, the remaining routines would be
+members of classes derived from icalcomponent. Don't call them on the
+wrong component subtypes. */
+
+/* For VCOMPONENT: Return a reference to the first VEVENT, VTODO or
+ VJOURNAL */
+icalcomponent* icalcomponent_get_first_real_component(icalcomponent *c);
+
+/* For VEVENT, VTODO, VJOURNAL and VTIMEZONE: report the start and end
+ times of an event in UTC */
+struct icaltime_span icalcomponent_get_span(icalcomponent* comp);
+
+/******************** Convienience routines **********************/
+
+void icalcomponent_set_dtstart(icalcomponent* comp, struct icaltimetype v);
+struct icaltimetype icalcomponent_get_dtstart(icalcomponent* comp);
+
+/* For the icalcomponent routines only, dtend and duration are tied
+ together. If you call the set routine for one and the other exists,
+ the routine will calculate the change to the other. That is, if
+ there is a DTEND and you call set_duration, the routine will modify
+ DTEND to be the sum of DTSTART and the duration. If you call a get
+ routine for one and the other exists, the routine will calculate
+ the return value. If you call a set routine and neither exists, the
+ routine will create the apcompriate comperty */
+
+
+struct icaltimetype icalcomponent_get_dtend(icalcomponent* comp);
+void icalcomponent_set_dtend(icalcomponent* comp, struct icaltimetype v);
+
+void icalcomponent_set_duration(icalcomponent* comp,
+ struct icaldurationtype v);
+struct icaldurationtype icalcomponent_get_duration(icalcomponent* comp);
+
+void icalcomponent_set_method(icalcomponent* comp, icalproperty_method method);
+icalproperty_method icalcomponent_get_method(icalcomponent* comp);
+
+struct icaltimetype icalcomponent_get_dtstamp(icalcomponent* comp);
+void icalcomponent_set_dtstamp(icalcomponent* comp, struct icaltimetype v);
+
+
+void icalcomponent_set_summary(icalcomponent* comp, const char* v);
+const char* icalcomponent_get_summary(icalcomponent* comp);
+
+void icalcomponent_set_comment(icalcomponent* comp, const char* v);
+const char* icalcomponent_get_comment(icalcomponent* comp);
+
+void icalcomponent_set_organizer(icalcomponent* comp, const char* v);
+const char* icalcomponent_get_organizer(icalcomponent* comp);
+
+void icalcomponent_set_uid(icalcomponent* comp, const char* v);
+const char* icalcomponent_get_uid(icalcomponent* comp);
+
+void icalcomponent_set_recurrenceid(icalcomponent* comp,
+ struct icaltimetype v);
+struct icaltimetype icalcomponent_get_recurrenceid(icalcomponent* comp);
+
+/*************** Type Specific routines ***************/
+
+icalcomponent* icalcomponent_new_vcalendar();
+icalcomponent* icalcomponent_new_vevent();
+icalcomponent* icalcomponent_new_vtodo();
+icalcomponent* icalcomponent_new_vjournal();
+icalcomponent* icalcomponent_new_vfreebusy();
+icalcomponent* icalcomponent_new_vtimezone();
+icalcomponent* icalcomponent_new_xstandard();
+icalcomponent* icalcomponent_new_xdaylight();
+
+
+
+#endif /* !ICALCOMPONENT_H */
+
+
+
+/* -*- Mode: C -*- */
+/*======================================================================
+ FILE: icalparser.h
+ CREATOR: eric 20 April 1999
+
+ $Id$
+
+
+ (C) COPYRIGHT 2000, Eric Busboom, http://www.softwarestudio.org
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of either:
+
+ The LGPL as published by the Free Software Foundation, version
+ 2.1, available at: http://www.fsf.org/copyleft/lesser.html
+
+ Or:
+
+ The Mozilla Public License Version 1.0. You may obtain a copy of
+ the License at http://www.mozilla.org/MPL/
+
+ The original code is icalparser.h
+
+======================================================================*/
+
+
+#ifndef ICALPARSER_H
+#define ICALPARSER_H
+
+
+#include <stdio.h> /* For FILE* */
+
+typedef void* icalparser;
+
+
+/***********************************************************************
+ * Line-oriented parsing.
+ *
+ * Create a new parser via icalparse_new_parser, then add ines one at
+ * a time with icalparse_add_line(). icalparser_add_line() will return
+ * non-zero when it has finished with a component.
+ ***********************************************************************/
+
+typedef enum icalparser_state {
+ ICALPARSER_ERROR,
+ ICALPARSER_SUCCESS,
+ ICALPARSER_BEGIN_COMP,
+ ICALPARSER_END_COMP,
+ ICALPARSER_IN_PROGRESS
+} icalparser_state;
+
+icalparser* icalparser_new(void);
+icalcomponent* icalparser_add_line(icalparser* parser, char* str );
+icalcomponent* icalparser_claim(icalparser* parser);
+icalcomponent* icalparser_clean(icalparser* parser);
+icalparser_state icalparser_get_state(icalparser* parser);
+void icalparser_free(icalparser* parser);
+
+
+/***********************************************************************
+ * Message oriented parsing. icalparser_parse takes a string that
+ * holds the text ( in RFC 2445 format ) and returns a pointer to an
+ * icalcomponent. The caller owns the memory. line_gen_func is a
+ * pointer to a function that returns one content line per invocation
+ **********************************************************************/
+
+icalcomponent* icalparser_parse(icalparser *parser,
+ char* (*line_gen_func)(char *s, size_t size, void *d));
+
+/* Set the data that icalparser_parse will give to the line_gen_func
+ as the parameter 'd'*/
+void icalparser_set_gen_data(icalparser* parser, void* data);
+
+
+icalcomponent* icalparser_parse_string(char* str);
+
+
+/***********************************************************************
+ * Parser support functions
+ ***********************************************************************/
+
+/* Use the flex/bison parser to turn a string into a value type */
+icalvalue* icalparser_parse_value(icalvalue_kind kind,
+ const char* str, icalcomponent** errors);
+
+/* Given a line generator function, return a single iCal content line.*/
+char* icalparser_get_line(icalparser* parser, char* (*line_gen_func)(char *s, size_t size, void *d));
+
+char* string_line_generator(char *out, size_t buf_size, void *d);
+
+#endif /* !ICALPARSE_H */
+/* -*- Mode: C -*- */
+/*======================================================================
+ FILE: icalmemory.h
+ CREATOR: eric 30 June 1999
+
+
+ $Id$
+ $Locker$
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of either:
+
+ The LGPL as published by the Free Software Foundation, version
+ 2.1, available at: http://www.fsf.org/copyleft/lesser.html
+
+ Or:
+
+ The Mozilla Public License Version 1.0. You may obtain a copy of
+ the License at http://www.mozilla.org/MPL/
+
+ The Initial Developer of the Original Code is Eric Busboom
+
+ (C) COPYRIGHT 2000, Eric Busboom, http://www.softwarestudio.org
+======================================================================*/
+
+#ifndef ICALMEMORY_H
+#define ICALMEMORY_H
+
+#include <sys/types.h> /* for size_t */
+
+
+/* Tmp buffers are managed by ical. References can be returned to the
+ caller, although the caller will not own the memory. */
+
+void* icalmemory_tmp_buffer(size_t size);
+char* icalmemory_tmp_copy(const char* str);
+
+/* Add an externally allocated buffer to the ring. */
+void icalmemory_add_tmp_buffer(void*);
+
+
+/* Free all memory used in the ring */
+void icalmemory_free_ring(void);
+
+/* Non-tmp buffers must be freed. These are mostly wrappers around
+ * malloc, etc, but are used so the caller can change the memory
+ * allocators in a future version of the library */
+
+void* icalmemory_new_buffer(size_t size);
+void* icalmemory_resize_buffer(void* buf, size_t size);
+void icalmemory_free_buffer(void* buf);
+
+/* icalmemory_append_string will copy the string 'string' to the
+ buffer 'buf' starting at position 'pos', reallocing 'buf' if it is
+ too small. 'buf_size' is the size of 'buf' and will be changed if
+ 'buf' is reallocated. 'pos' will point to the last byte of the new
+ string in 'buf', usually a '\0' */
+
+/* THESE ROUTINES CAN NOT BE USED ON TMP BUFFERS. Only use them on
+ normally allocated memory, or on buffers created from
+ icalmemory_new_buffer, never with buffers created by
+ icalmemory_tmp_buffer. If icalmemory_append_string has to resize a
+ buffer on the ring, the ring will loose track of it an you will
+ have memory problems. */
+
+void icalmemory_append_string(char** buf, char** pos, size_t* buf_size,
+ const char* string);
+
+/* icalmemory_append_char is similar, but is appends a character instead of a string */
+void icalmemory_append_char(char** buf, char** pos, size_t* buf_size,
+ char ch);
+
+/* A wrapper around strdup */
+char* icalmemory_strdup(const char *s);
+
+#endif /* !ICALMEMORY_H */
+
+
+
+/* -*- Mode: C -*- */
+/*======================================================================
+ FILE: icalerror.h
+ CREATOR: eric 09 May 1999
+
+ $Id$
+
+
+ (C) COPYRIGHT 2000, Eric Busboom, http://www.softwarestudio.org
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of either:
+
+ The LGPL as published by the Free Software Foundation, version
+ 2.1, available at: http://www.fsf.org/copyleft/lesser.html
+
+ Or:
+
+ The Mozilla Public License Version 1.0. You may obtain a copy of
+ the License at http://www.mozilla.org/MPL/
+
+ The original code is icalerror.h
+
+======================================================================*/
+
+
+#ifndef ICALERROR_H
+#define ICALERROR_H
+
+#include <assert.h>
+#include <stdio.h> /* For icalerror_warn() */
+
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+
+/* This routine is called before any error is triggered. It is called
+ by icalerror_set_errno, so it does not appear in all of the macros
+ below */
+void icalerror_stop_here(void);
+
+void icalerror_crash_here(void);
+
+#ifdef ICAL_ERRORS_ARE_FATAL
+#undef NDEBUG
+#endif
+
+#define icalerror_check_value_type(value,type);
+#define icalerror_check_property_type(value,type);
+#define icalerror_check_parameter_type(value,type);
+#define icalerror_check_component_type(value,type);
+
+/* Assert with a message */
+#ifdef ICAL_ERRORS_ARE_FATAL
+
+#ifdef __GNUC__
+#define icalerror_assert(test,message) if(!(test)){fprintf(stderr,"%s(), %s:%d: %s\n",__FUNCTION__,__FILE__,__LINE__,message);icalerror_stop_here(); abort();}
+#else /*__GNUC__*/
+#define icalerror_assert(test,message) if(!(test)){fprintf(stderr,"%s:%d: %s\n",__FILE__,__LINE__,message);icalerror_stop_here(); abort();}
+#endif /*__GNUC__*/
+#else
+#define icalerror_assert(test,message)
+#endif
+
+/* Check & abort if check fails */
+#ifdef ICAL_ERRORS_ARE_FATAL
+#define icalerror_check_arg(test,arg) icalerror_stop_here();assert(test)
+#else
+#define icalerror_check_arg(test,arg)
+#endif
+/* Check & return void if check fails*/
+
+#ifdef ICAL_ERRORS_ARE_FATAL
+#define icalerror_check_arg_rv(test,arg) icalerror_stop_here();assert(test);
+#else
+#define icalerror_check_arg_rv(test,arg) if(!(test)) { icalerror_set_errno(ICAL_BADARG_ERROR); return; }
+#endif
+
+/* Check & return 0 if check fails*/
+#ifdef ICAL_ERRORS_ARE_FATAL
+#define icalerror_check_arg_rz(test,arg) icalerror_stop_here();assert(test);
+#else
+#define icalerror_check_arg_rz(test,arg) if(!(test)) {icalerror_set_errno(ICAL_BADARG_ERROR); return 0;}
+#endif
+
+
+/* Check & return an error if check fails*/
+#ifdef ICAL_ERRORS_ARE_FATAL
+#define icalerror_check_arg_re(test,arg,error) icalerror_stop_here();assert(test);
+#else
+#define icalerror_check_arg_re(test,arg,error) if(!(test)) {icalerror_stop_here(); return error;}
+#endif
+
+
+/* Warning messages */
+
+#ifdef ICAL_ERRORS_ARE_FATAL
+
+#ifdef __GNUC__
+#define icalerror_warn(message) {fprintf(stderr,"%s(), %s:%d: %s\n",__FUNCTION__,__FILE__,__LINE__,message); abort();}
+#else /* __GNU_C__ */
+#define icalerror_warn(message) {fprintf(stderr,"%s:%d: %s\n",__FILE__,__LINE__,message); abort();}
+#endif /* __GNU_C__ */
+
+#else /*ICAL_ERRORS_ARE_FATAL */
+
+#ifdef __GNUC__
+#define icalerror_warn(message) {fprintf(stderr,"%s(), %s:%d: %s\n",__FUNCTION__,__FILE__,__LINE__,message);}
+#else /* __GNU_C__ */
+#define icalerror_warn(message) {fprintf(stderr,"%s:%d: %s\n",__FILE__,__LINE__,message);}
+#endif /* __GNU_C__ */
+
+#endif /*ICAL_ERRORS_ARE_FATAL*/
+
+typedef enum icalerrorenum {
+
+ ICAL_BADARG_ERROR,
+ ICAL_NEWFAILED_ERROR,
+ ICAL_MALFORMEDDATA_ERROR,
+ ICAL_PARSE_ERROR,
+ ICAL_INTERNAL_ERROR, /* Like assert --internal consist. prob */
+ ICAL_FILE_ERROR,
+ ICAL_ALLOCATION_ERROR,
+ ICAL_USAGE_ERROR,
+ ICAL_NO_ERROR,
+ ICAL_MULTIPLEINCLUSION_ERROR,
+ ICAL_TIMEDOUT_ERROR,
+ ICAL_UNKNOWN_ERROR /* Used for problems in input to icalerror_strerror()*/
+
+} icalerrorenum;
+
+extern icalerrorenum icalerrno;
+
+
+void icalerror_clear_errno(void);
+void icalerror_set_errno(icalerrorenum);
+
+char* icalerror_strerror(icalerrorenum e);
+
+
+#endif /* !ICALERROR_H */
+
+
+
+/* -*- Mode: C -*- */
+/*======================================================================
+ FILE: icalrestriction.h
+ CREATOR: eric 24 April 1999
+
+ $Id$
+
+
+ (C) COPYRIGHT 2000, Eric Busboom, http://www.softwarestudio.org
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of either:
+
+ The LGPL as published by the Free Software Foundation, version
+ 2.1, available at: http://www.fsf.org/copyleft/lesser.html
+
+ Or:
+
+ The Mozilla Public License Version 1.0. You may obtain a copy of
+ the License at http://www.mozilla.org/MPL/
+
+ The original code is icalrestriction.h
+
+ Contributions from:
+ Graham Davison (g.m.davison@computer.org)
+
+
+======================================================================*/
+
+
+#ifndef ICALRESTRICTION_H
+#define ICALRESTRICTION_H
+
+/* These must stay in this order for icalrestriction_compare to work */
+typedef enum icalrestriction_kind {
+ ICAL_RESTRICTION_NONE=0, /* 0 */
+ ICAL_RESTRICTION_ZERO, /* 1 */
+ ICAL_RESTRICTION_ONE, /* 2 */
+ ICAL_RESTRICTION_ZEROPLUS, /* 3 */
+ ICAL_RESTRICTION_ONEPLUS, /* 4 */
+ ICAL_RESTRICTION_ZEROORONE, /* 5 */
+ ICAL_RESTRICTION_ONEEXCLUSIVE, /* 6 */
+ ICAL_RESTRICTION_ONEMUTUAL, /* 7 */
+ ICAL_RESTRICTION_UNKNOWN /* 8 */
+} icalrestriction_kind;
+
+int
+icalrestriction_compare(icalrestriction_kind restr, int count);
+
+
+int
+icalrestriction_is_parameter_allowed(icalproperty_kind property,
+ icalparameter_kind parameter);
+
+int icalrestriction_check(icalcomponent* comp);
+
+
+#endif /* !ICALRESTRICTION_H */
+
+
+
+/* -*- Mode: C -*-
+ ======================================================================
+ FILE: sspm.h Mime Parser
+ CREATOR: eric 25 June 2000
+
+ $Id$
+ $Locker$
+
+ The contents of this file are subject to the Mozilla Public License
+ Version 1.0 (the "License"); you may not use this file except in
+ compliance with the License. You may obtain a copy of the License at
+ http://www.mozilla.org/MPL/
+
+ Software distributed under the License is distributed on an "AS IS"
+ basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
+ the License for the specific language governing rights and
+ limitations under the License.
+
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of either:
+
+ The LGPL as published by the Free Software Foundation, version
+ 2.1, available at: http://www.fsf.org/copyleft/lesser.html
+
+ Or:
+
+ The Mozilla Public License Version 1.0. You may obtain a copy of
+ the License at http://www.mozilla.org/MPL/
+
+ The Initial Developer of the Original Code is Eric Busboom
+
+ (C) COPYRIGHT 2000, Eric Busboom, http://www.softwarestudio.org
+ ======================================================================*/
+
+#ifndef SSPM_H
+#define SSPM_H
+
+enum sspm_major_type {
+ SSPM_NO_MAJOR_TYPE,
+ SSPM_TEXT_MAJOR_TYPE,
+ SSPM_IMAGE_MAJOR_TYPE,
+ SSPM_AUDIO_MAJOR_TYPE,
+ SSPM_VIDEO_MAJOR_TYPE,
+ SSPM_APPLICATION_MAJOR_TYPE,
+ SSPM_MULTIPART_MAJOR_TYPE,
+ SSPM_MESSAGE_MAJOR_TYPE,
+ SSPM_UNKNOWN_MAJOR_TYPE
+};
+
+enum sspm_minor_type {
+ SSPM_NO_MINOR_TYPE,
+ SSPM_ANY_MINOR_TYPE,
+ SSPM_PLAIN_MINOR_TYPE,
+ SSPM_RFC822_MINOR_TYPE,
+ SSPM_DIGEST_MINOR_TYPE,
+ SSPM_CALENDAR_MINOR_TYPE,
+ SSPM_MIXED_MINOR_TYPE,
+ SSPM_RELATED_MINOR_TYPE,
+ SSPM_ALTERNATIVE_MINOR_TYPE,
+ SSPM_PARALLEL_MINOR_TYPE,
+ SSPM_UNKNOWN_MINOR_TYPE
+};
+
+enum sspm_encoding {
+ SSPM_NO_ENCODING,
+ SSPM_QUOTED_PRINTABLE_ENCODING,
+ SSPM_8BIT_ENCODING,
+ SSPM_7BIT_ENCODING,
+ SSPM_BINARY_ENCODING,
+ SSPM_BASE64_ENCODING,
+ SSPM_UNKNOWN_ENCODING
+};
+
+enum sspm_error{
+ SSPM_NO_ERROR,
+ SSPM_UNEXPECTED_BOUNDARY_ERROR,
+ SSPM_WRONG_BOUNDARY_ERROR,
+ SSPM_NO_BOUNDARY_ERROR,
+ SSPM_NO_HEADER_ERROR,
+ SSPM_MALFORMED_HEADER_ERROR
+};
+
+
+struct sspm_header
+{
+ int def;
+ char* boundary;
+ enum sspm_major_type major;
+ enum sspm_minor_type minor;
+ char *minor_text;
+ char ** content_type_params;
+ char* charset;
+ enum sspm_encoding encoding;
+ char* filename;
+ char* content_id;
+ enum sspm_error error;
+ char* error_text;
+};
+
+struct sspm_part {
+ struct sspm_header header;
+ int level;
+ size_t data_size;
+ void *data;
+};
+
+struct sspm_action_map {
+ enum sspm_major_type major;
+ enum sspm_minor_type minor;
+ void* (*new_part)();
+ void (*add_line)(void *part, struct sspm_header *header,
+ char* line, size_t size);
+ void* (*end_part)(void* part);
+ void (*free_part)(void *part);
+};
+
+char* sspm_major_type_string(enum sspm_major_type type);
+char* sspm_minor_type_string(enum sspm_major_type type);
+char* sspm_encoding_string(enum sspm_encoding type);
+
+int sspm_parse_mime(struct sspm_part *parts,
+ size_t max_parts,
+ struct sspm_action_map *actions,
+ char* (*get_string)(char *s, size_t size, void* data),
+ void *get_string_data,
+ struct sspm_header *first_header
+ );
+
+void sspm_free_parts(struct sspm_part *parts, size_t max_parts);
+
+char *decode_quoted_printable(char *dest,
+ char *src,
+ size_t *size);
+char *decode_base64(char *dest,
+ char *src,
+ size_t *size);
+
+
+int sspm_write_mime(struct sspm_part *parts,size_t num_parts,
+ char **output_string, char* header);
+
+#endif /*SSPM_H*/
+/* -*- Mode: C -*- */
+/*======================================================================
+ FILE: icalmime.h
+ CREATOR: eric 26 July 2000
+
+
+ $Id$
+ $Locker$
+
+ (C) COPYRIGHT 2000, Eric Busboom, http://www.softwarestudio.org
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of either:
+
+ The LGPL as published by the Free Software Foundation, version
+ 2.1, available at: http://www.fsf.org/copyleft/lesser.html
+
+ Or:
+
+ The Mozilla Public License Version 1.0. You may obtain a copy of
+ the License at http://www.mozilla.org/MPL/
+
+======================================================================*/
+
+#ifndef ICALMIME_H
+#define ICALMIME_H
+
+
+icalcomponent* icalmime_parse( char* (*line_gen_func)(char *s, size_t size,
+ void *d),
+ void *data);
+
+/* The inverse of icalmime_parse, not implemented yet. Use sspm.h directly. */
+char* icalmime_as_mime_string(char* component);
-#endif /* !ICAL_H */
+#endif /* !ICALMIME_H */
diff --git a/libical/src/libical/icalcomponent.c b/libical/src/libical/icalcomponent.c
index 08afcaf1a8..e36faae8e7 100644
--- a/libical/src/libical/icalcomponent.c
+++ b/libical/src/libical/icalcomponent.c
@@ -27,28 +27,21 @@
#include "config.h"
#endif
-#include "ical.h"
+#include "icalcomponent.h"
#include "pvl.h" /* "Pointer-to-void list" */
+#include "icalerror.h"
+#include "icalmemory.h"
+#include "icalenums.h"
+#include "icaltime.h"
+
#include <stdlib.h> /* for malloc */
#include <stdarg.h> /* for va_list, etc */
#include <errno.h>
-#include "icalerror.h"
#include <assert.h>
#include <stdio.h> /* for fprintf */
-#include "icalmemory.h"
-#include "icalenums.h"
#define MAX_TMP 1024
-
-/* icalproperty functions that only components get to use */
-void icalproperty_set_parent(icalproperty* property,
- icalcomponent* component);
-
-icalcomponent* icalproperty_get_parent(icalproperty* property);
-
-
-
struct icalcomponent_impl
{
char id[5];
@@ -61,6 +54,15 @@ struct icalcomponent_impl
icalcomponent* parent;
};
+/* icalproperty functions that only components get to use */
+void icalproperty_set_parent(icalproperty* property,
+ icalcomponent* component);
+icalcomponent* icalproperty_get_parent(icalproperty* property);
+void icalcomponent_add_children(struct icalcomponent_impl *impl,va_list args);
+icalcomponent* icalcomponent_new_impl (icalcomponent_kind kind);
+int icalcomponent_property_sorter(void *a, void *b);
+
+
void icalcomponent_add_children(struct icalcomponent_impl *impl,va_list args)
{
void* vp;
@@ -256,7 +258,7 @@ icalcomponent_as_ical_string (icalcomponent* component)
icalproperty *p;
icalcomponent_kind kind = icalcomponent_isa(component);
- char* kind_string;
+ const char* kind_string;
buf = icalmemory_new_buffer(buf_size);
buf_ptr = buf;
@@ -360,7 +362,7 @@ icalcomponent_isa_component (void* component)
int icalcomponent_property_sorter(void *a, void *b)
{
icalproperty_kind kinda, kindb;
- char *ksa, *ksb;
+ const char *ksa, *ksb;
kinda = icalproperty_isa((icalproperty*)a);
kindb = icalproperty_isa((icalproperty*)b);
@@ -531,7 +533,7 @@ icalcomponent_add_component (icalcomponent* parent, icalcomponent* child)
impl = (struct icalcomponent_impl*)parent;
cimpl = (struct icalcomponent_impl*)child;
- icalerror_assert( (cimpl->parent ==0),"The child component has already been added to a parent component. Remove the component with icalcomponent_remove_componenet before calling icalcomponent_add_component");
+ icalerror_assert( (cimpl->parent ==0),"The child component has already been added to a parent component. Remove the component with icalcomponent_remove_component before calling icalcomponent_add_component");
cimpl->parent = parent;
@@ -581,8 +583,7 @@ icalcomponent_count_components (icalcomponent* component,
{
int count=0;
pvl_elem itr;
- struct icalcomponent_impl *impl =
- (struct iccalcomponent_impl*)component;
+ struct icalcomponent_impl *impl = (struct icalcomponent_impl*)component;
icalerror_check_arg_rz( (component!=0), "component");
@@ -663,9 +664,186 @@ icalcomponent_get_next_component (icalcomponent* component, icalcomponent_kind k
return 0;
}
+icalcomponent* icalcomponent_get_first_real_component(icalcomponent *c)
+{
+ icalcomponent *comp;
-icalproperty**
-icalcomponent_get_component (icalcomponent* component, icalproperty_kind kind);
+ for(comp = icalcomponent_get_first_component(c,ICAL_ANY_COMPONENT);
+ comp != 0;
+ comp = icalcomponent_get_next_component(c,ICAL_ANY_COMPONENT)){
+
+ icalcomponent_kind kind = icalcomponent_isa(comp);
+
+ if(kind == ICAL_VEVENT_COMPONENT ||
+ kind == ICAL_VTODO_COMPONENT ||
+ kind == ICAL_VJOURNAL_COMPONENT ){
+ return comp;
+ }
+ }
+ return 0;
+}
+
+time_t icalcomponent_convert_time(icalproperty *p)
+{
+ struct icaltimetype sict;
+ time_t convt;
+ icalproperty *tzp;
+
+
+ /* Though it says _dtstart, it will work for dtend too */
+ sict = icalproperty_get_dtstart(p);
+
+ tzp = icalproperty_get_first_parameter(p,ICAL_TZID_PARAMETER);
+
+ if (sict.is_utc == 1 && tzp != 0){
+ icalerror_set_errno(ICAL_MALFORMEDDATA_ERROR);
+ icalerror_warn("icalcomponent_get_span: component has a UTC DTSTART with a timezone specified ");
+ return 0;
+ }
+
+ if(sict.is_utc == 1){
+ /* _as_timet will use gmtime() to do the conversion */
+ convt = icaltime_as_timet(sict);
+
+#ifdef TEST_CONVERT_TIME
+ printf("convert time: use as_timet:\n %s\n %s",
+ icalproperty_as_ical_string(p), ctime(&convt));
+#endif
+
+ } else if (sict.is_utc == 0 && tzp == 0 ) {
+ time_t offset;
+
+ /* _as_timet will use localtime() to do the conversion */
+ convt = icaltime_as_timet(sict);
+ offset = icaltime_local_utc_offset();
+ convt += offset;
+
+#ifdef TEST_CONVERT_TIME
+ printf("convert time: use as_timet and adjust:\n %s\n %s",
+ icalproperty_as_ical_string(p), ctime(&convt));
+#endif
+ } else {
+ /* Convert the time to UTC for the named timezone*/
+ const char* timezone = icalparameter_get_tzid(tzp);
+ convt = icaltime_as_timet(icaltime_as_utc(sict,timezone));
+
+#ifdef TEST_CONVERT_TIME
+ printf("convert time: use _as_utc:\n %s\n %s",
+ icalproperty_as_ical_string(p), ctime(&convt));
+#endif
+ }
+
+ return convt;
+}
+struct icaltime_span icalcomponent_get_span(icalcomponent* comp)
+{
+ icalcomponent *inner;
+ icalproperty *p, *duration;
+ icalcomponent_kind kind;
+ struct icaltime_span span;
+ struct icaltimetype start;
+
+ span.start = 0;
+ span.end = 0;
+ span.is_busy= 1;
+
+ /* initial Error checking */
+
+/* icalerror_check_arg_rz( (comp!=0),"comp");*/
+
+ kind = icalcomponent_isa(comp);
+
+ if(kind == ICAL_VCALENDAR_COMPONENT){
+ inner = icalcomponent_get_first_real_component(comp);
+
+ /* Maybe there is a VTIMEZONE in there */
+ if (inner == 0){
+ inner = icalcomponent_get_first_component(comp,
+ ICAL_VTIMEZONE_COMPONENT);
+ }
+
+ } else {
+ inner = comp;
+ }
+
+ if (inner == 0){
+ icalerror_set_errno(ICAL_MALFORMEDDATA_ERROR);
+ /*icalerror_warn("icalcomponent_get_span: no component specified, or empty VCALENDAR component");*/
+ return span;
+ }
+
+ kind = icalcomponent_isa(inner);
+
+ if( !( kind == ICAL_VEVENT_COMPONENT ||
+ kind == ICAL_VJOURNAL_COMPONENT ||
+ kind == ICAL_VTODO_COMPONENT ||
+ kind == ICAL_VFREEBUSY_COMPONENT )) {
+ icalerror_set_errno(ICAL_MALFORMEDDATA_ERROR);
+ /*icalerror_warn("icalcomponent_get_span: no component specified, or empty VCALENDAR component");*/
+ return span;
+
+ }
+
+
+
+ /* Get to work. starting with DTSTART */
+
+ p = icalcomponent_get_first_property(inner, ICAL_DTSTART_PROPERTY);
+
+ if (p ==0 ) {
+ icalerror_set_errno(ICAL_MALFORMEDDATA_ERROR);
+ /*icalerror_warn("icalcomponent_get_span: component has no DTSTART time");*/
+ return span;
+ }
+
+
+ start = icalproperty_get_dtstart(p);
+
+ icalerror_clear_errno();
+
+ span.start = icalcomponent_convert_time(p);
+
+#ifdef TEST_CONVERT_TIME
+ printf("convert time:\n %s %s",
+ icalproperty_as_ical_string(p), ctime(&span.start));
+#endif
+
+ if(icalerrno != ICAL_NO_ERROR){
+ span.start = 0;
+ return span;
+ }
+
+ /* The end time could be specified as either a DTEND or a DURATION */
+ p = icalcomponent_get_first_property(inner, ICAL_DTEND_PROPERTY);
+ duration = icalcomponent_get_first_property(inner, ICAL_DURATION_PROPERTY);
+
+ if (p==0 && duration == 0 && start.is_date != 1) {
+ icalerror_set_errno(ICAL_MALFORMEDDATA_ERROR);
+ /*icalerror_warn("icalcomponent_get_span: component has neither DTEND nor DURATION time");*/
+ span.start = 0;
+ return span;
+ }
+
+ if (p!=0){
+ span.end = icalcomponent_convert_time(p);
+ } else if (start.is_date == 1) {
+ /* Duration is all day */
+ span.end = span.start + 60*60*24;
+ } else {
+ /* Use the duration */
+ struct icaldurationtype dur;
+ time_t durt;
+
+
+ dur = icalproperty_get_duration(duration);
+
+ durt = icaldurationtype_as_timet(dur);
+ span.end = span.start+durt;
+ }
+
+ return span;
+
+}
int icalcomponent_count_errors(icalcomponent* component)
@@ -827,7 +1005,7 @@ icalcomponent_begin_component(icalcomponent* component,icalcomponent_kind kind)
itr.kind = kind;
- icalerror_check_arg_rz( (component!=0),"component");
+ icalerror_check_arg_re( (component!=0),"component",icalcompiter_null);
for( i = pvl_head(impl->components); i != 0; i = pvl_next(itr.iter)) {
@@ -841,7 +1019,7 @@ icalcomponent_begin_component(icalcomponent* component,icalcomponent_kind kind)
}
}
- return icalcompiter_null;;
+ return icalcompiter_null;
}
icalcompiter
@@ -853,7 +1031,7 @@ icalcomponent_end_component(icalcomponent* component,icalcomponent_kind kind)
itr.kind = kind;
- icalerror_check_arg_rz( (component!=0),"component");
+ icalerror_check_arg_re( (component!=0),"component",icalcompiter_null);
for( i = pvl_tail(impl->components); i != 0; i = pvl_prior(i)) {
@@ -877,6 +1055,8 @@ icalcomponent* icalcompiter_next(icalcompiter* i)
return 0;
}
+ icalerror_check_arg_rz( (i!=0),"i");
+
for( i->iter = pvl_next(i->iter);
i->iter != 0;
i->iter = pvl_next(i->iter)) {
@@ -924,3 +1104,298 @@ icalcomponent* icalcompiter_deref(icalcompiter* i)
return pvl_data(i->iter);
}
+
+icalcomponent* icalcomponent_get_inner(icalcomponent* comp)
+{
+ if (icalcomponent_isa(comp) == ICAL_VCALENDAR_COMPONENT){
+ return icalcomponent_get_first_real_component(comp);
+ } else {
+ return comp;
+ }
+}
+
+
+void icalcomponent_set_dtstart(icalcomponent* comp, struct icaltimetype v)
+{
+
+ icalcomponent *inner = icalcomponent_get_inner(comp);
+ icalproperty *prop
+ = icalcomponent_get_first_property(inner, ICAL_DTSTART_PROPERTY);
+
+
+ if (prop == 0){
+ prop = icalproperty_new_dtstart(v);
+ icalcomponent_add_property(inner, prop);
+ }
+
+ icalproperty_set_dtstart(prop,v);
+
+}
+
+
+struct icaltimetype icalcomponent_get_dtstart(icalcomponent* comp)
+{
+ icalcomponent *inner = icalcomponent_get_inner(comp);
+ icalproperty *prop
+ = icalcomponent_get_first_property(inner,ICAL_DTSTART_PROPERTY);
+
+ if (prop == 0){
+ return icaltime_null_time();
+ }
+
+ return icalproperty_get_dtstart(prop);
+}
+
+
+struct icaltimetype icalcomponent_get_dtend(icalcomponent* comp)
+{
+ icalcomponent *inner = icalcomponent_get_inner(comp);
+
+ icalproperty *end_prop
+ = icalcomponent_get_first_property(inner,ICAL_DTEND_PROPERTY);
+
+ icalproperty *dur_prop
+ = icalcomponent_get_first_property(inner, ICAL_DURATION_PROPERTY);
+
+
+ if( end_prop == 0 && dur_prop == 0){
+ return icaltime_null_time();
+ } else if ( end_prop != 0) {
+ return icalproperty_get_dtend(end_prop);
+ } else if ( dur_prop != 0) {
+ struct icaltimetype start =
+ icalcomponent_get_dtstart(inner);
+ time_t startt = icaltime_as_timet(start);
+ struct icaldurationtype duration =
+ icalproperty_get_duration(dur_prop);
+ time_t durt = icaldurationtype_as_timet(duration);
+
+ return icaltime_from_timet(startt+durt,start.is_date,start.is_utc);
+ } else {
+ /* Error, both duration and dtend have been specified */
+ icalerror_set_errno(ICAL_MALFORMEDDATA_ERROR);
+ return icaltime_null_time();
+
+ }
+
+}
+
+
+void icalcomponent_set_dtend(icalcomponent* comp, struct icaltimetype v)
+{
+ icalcomponent *inner = icalcomponent_get_inner(comp);
+
+ icalproperty *end_prop
+ = icalcomponent_get_first_property(inner,ICAL_DTEND_PROPERTY);
+
+ icalproperty *dur_prop
+ = icalcomponent_get_first_property(inner,ICAL_DURATION_PROPERTY);
+
+
+ if( end_prop == 0 && dur_prop == 0){
+ end_prop = icalproperty_new_dtend(v);
+ icalcomponent_add_property(inner,end_prop);
+ } else if ( end_prop != 0) {
+ icalproperty_set_dtend(end_prop,v);
+ } else if ( dur_prop != 0) {
+ struct icaltimetype start =
+ icalcomponent_get_dtstart(inner);
+ time_t startt = icaltime_as_timet(start);
+
+ struct icaltimetype end =
+ icalcomponent_get_dtend(inner);
+ time_t endt = icaltime_as_timet(end);
+
+ struct icaldurationtype dur
+ = icaldurationtype_from_timet(endt-startt);
+
+ icalproperty_set_duration(dur_prop,dur);
+
+ } else {
+ /* Error, both duration and dtend have been specified */
+ icalerror_set_errno(ICAL_MALFORMEDDATA_ERROR);
+ }
+}
+
+void icalcomponent_set_duration(icalcomponent* comp,
+ struct icaldurationtype v)
+{
+ icalcomponent *inner = icalcomponent_get_inner(comp);
+
+ icalproperty *end_prop
+ = icalcomponent_get_first_property(inner,ICAL_DTEND_PROPERTY);
+
+ icalproperty *dur_prop
+ = icalcomponent_get_first_property(inner,ICAL_DURATION_PROPERTY);
+
+
+ if( end_prop == 0 && dur_prop == 0){
+ dur_prop = icalproperty_new_duration(v);
+ icalcomponent_add_property(inner, dur_prop);
+ } else if ( end_prop != 0) {
+ struct icaltimetype start =
+ icalcomponent_get_dtstart(inner);
+ time_t startt = icaltime_as_timet(start);
+
+ time_t durt = icaldurationtype_as_timet(v);
+
+ struct icaltimetype new_end
+ = icaltime_from_timet(startt+durt,start.is_date,start.is_utc);
+
+ icalproperty_set_dtend(end_prop,new_end);
+
+ } else if ( dur_prop != 0) {
+ icalproperty_set_duration(end_prop,v);
+ } else {
+ /* Error, both duration and dtend have been specified */
+ icalerror_set_errno(ICAL_MALFORMEDDATA_ERROR);
+ }
+}
+
+struct icaldurationtype icalcomponent_get_duration(icalcomponent* comp)
+{
+ icalcomponent *inner = icalcomponent_get_inner(comp);
+
+ icalproperty *end_prop
+ = icalcomponent_get_first_property(inner,ICAL_DTEND_PROPERTY);
+
+ icalproperty *dur_prop
+ = icalcomponent_get_first_property(inner,ICAL_DURATION_PROPERTY);
+
+ struct icaldurationtype null_duration;
+ memset(&null_duration,0,sizeof(struct icaldurationtype));
+
+
+ if( end_prop == 0 && dur_prop == 0){
+ return null_duration;
+ } else if ( end_prop != 0) {
+ struct icaltimetype start =
+ icalcomponent_get_dtstart(inner);
+ time_t startt = icaltime_as_timet(start);
+
+ struct icaltimetype end =
+ icalcomponent_get_dtend(inner);
+ time_t endt = icaltime_as_timet(end);
+
+ return icaldurationtype_from_timet(endt-startt);
+ } else if ( dur_prop != 0) {
+ return icalproperty_get_duration(dur_prop);
+ } else {
+ /* Error, both duration and dtend have been specified */
+ icalerror_set_errno(ICAL_MALFORMEDDATA_ERROR);
+ return null_duration;
+ }
+}
+
+
+
+void icalcomponent_set_method(icalcomponent* comp, icalproperty_method method)
+{
+ icalproperty *prop
+ = icalcomponent_get_first_property(comp, ICAL_METHOD_PROPERTY);
+
+
+ if (prop == 0){
+ prop = icalproperty_new_method(method);
+ icalcomponent_add_property(comp, prop);
+ }
+
+ icalproperty_set_method(prop,method);
+
+}
+
+icalproperty_method icalcomponent_get_method(icalcomponent* comp)
+{
+ icalproperty *prop
+ = icalcomponent_get_first_property(comp,ICAL_METHOD_PROPERTY);
+
+ if (prop == 0){
+ return ICAL_METHOD_NONE;
+ }
+
+ return icalproperty_get_method(prop);
+}
+
+void icalcomponent_set_dtstamp(icalcomponent* comp, struct icaltimetype v)
+{
+
+ icalcomponent *inner = icalcomponent_get_inner(comp);
+ icalproperty *prop
+ = icalcomponent_get_first_property(inner, ICAL_DTSTAMP_PROPERTY);
+
+
+ if (prop == 0){
+ prop = icalproperty_new_dtstamp(v);
+ icalcomponent_add_property(inner, prop);
+ }
+
+ icalproperty_set_dtstamp(prop,v);
+
+}
+
+
+struct icaltimetype icalcomponent_get_dtstamp(icalcomponent* comp)
+{
+ icalcomponent *inner = icalcomponent_get_inner(comp);
+ icalproperty *prop
+ = icalcomponent_get_first_property(inner,ICAL_DTSTAMP_PROPERTY);
+
+ if (prop == 0){
+ return icaltime_null_time();
+ }
+
+ return icalproperty_get_dtstamp(prop);
+}
+
+
+void icalcomponent_set_summary(icalcomponent* comp, const char* v);
+const char* icalcomponent_get_summary(icalcomponent* comp);
+
+void icalcomponent_set_comment(icalcomponent* comp, const char* v);
+const char* icalcomponent_get_comment(icalcomponent* comp);
+
+void icalcomponent_set_organizer(icalcomponent* comp, const char* v);
+const char* icalcomponent_get_organizer(icalcomponent* comp);
+
+void icalcomponent_set_uid(icalcomponent* comp, const char* v);
+const char* icalcomponent_get_uid(icalcomponent* comp);
+
+void icalcomponent_set_recurrenceid(icalcomponent* comp,
+ struct icaltimetype v);
+struct icaltimetype icalcomponent_get_recurrenceid(icalcomponent* comp);
+
+
+
+
+icalcomponent* icalcomponent_new_vcalendar()
+{
+ return icalcomponent_new(ICAL_VCALENDAR_COMPONENT);
+}
+icalcomponent* icalcomponent_new_vevent()
+{
+ return icalcomponent_new(ICAL_VEVENT_COMPONENT);
+}
+icalcomponent* icalcomponent_new_vtodo()
+{
+ return icalcomponent_new(ICAL_VTODO_COMPONENT);
+}
+icalcomponent* icalcomponent_new_vjournal()
+{
+ return icalcomponent_new(ICAL_VJOURNAL_COMPONENT);
+}
+icalcomponent* icalcomponent_new_vfreebusy()
+{
+ return icalcomponent_new(ICAL_VFREEBUSY_COMPONENT);
+}
+icalcomponent* icalcomponent_new_vtimezone()
+{
+ return icalcomponent_new(ICAL_VTIMEZONE_COMPONENT);
+}
+icalcomponent* icalcomponent_new_xstandard()
+{
+ return icalcomponent_new(ICAL_XSTANDARD_COMPONENT);
+}
+icalcomponent* icalcomponent_new_xdaylight()
+{
+ return icalcomponent_new(ICAL_XDAYLIGHT_COMPONENT);
+}
diff --git a/libical/src/libical/icalcomponent.h b/libical/src/libical/icalcomponent.h
index b0d1e33630..b08d488db3 100644
--- a/libical/src/libical/icalcomponent.h
+++ b/libical/src/libical/icalcomponent.h
@@ -119,9 +119,6 @@ icalcomponent* icalcomponent_get_next_component(icalcomponent* component,
-/* Return a null-terminated array of icalproperties*/
-icalproperty** icalcomponent_get_component(icalcomponent* component,
- icalproperty_kind kind);
/* Working with embedded error properties */
@@ -137,14 +134,82 @@ void icalcomponent_convert_errors(icalcomponent* component);
icalcomponent* icalcomponent_get_parent(icalcomponent* component);
void icalcomponent_set_parent(icalcomponent* component,
icalcomponent* parent);
-
-
-
/* External component iterator */
icalcomponent* icalcompiter_next(icalcompiter* i);
icalcomponent* icalcompiter_prior(icalcompiter* i);
icalcomponent* icalcompiter_deref(icalcompiter* i);
+/************* Derived class methods. ****************************
+
+If the code was in an OO language, the remaining routines would be
+members of classes derived from icalcomponent. Don't call them on the
+wrong component subtypes. */
+
+/* For VCOMPONENT: Return a reference to the first VEVENT, VTODO or
+ VJOURNAL */
+icalcomponent* icalcomponent_get_first_real_component(icalcomponent *c);
+
+/* For VEVENT, VTODO, VJOURNAL and VTIMEZONE: report the start and end
+ times of an event in UTC */
+struct icaltime_span icalcomponent_get_span(icalcomponent* comp);
+
+/******************** Convienience routines **********************/
+
+void icalcomponent_set_dtstart(icalcomponent* comp, struct icaltimetype v);
+struct icaltimetype icalcomponent_get_dtstart(icalcomponent* comp);
+
+/* For the icalcomponent routines only, dtend and duration are tied
+ together. If you call the set routine for one and the other exists,
+ the routine will calculate the change to the other. That is, if
+ there is a DTEND and you call set_duration, the routine will modify
+ DTEND to be the sum of DTSTART and the duration. If you call a get
+ routine for one and the other exists, the routine will calculate
+ the return value. If you call a set routine and neither exists, the
+ routine will create the apcompriate comperty */
+
+
+struct icaltimetype icalcomponent_get_dtend(icalcomponent* comp);
+void icalcomponent_set_dtend(icalcomponent* comp, struct icaltimetype v);
+
+void icalcomponent_set_duration(icalcomponent* comp,
+ struct icaldurationtype v);
+struct icaldurationtype icalcomponent_get_duration(icalcomponent* comp);
+
+void icalcomponent_set_method(icalcomponent* comp, icalproperty_method method);
+icalproperty_method icalcomponent_get_method(icalcomponent* comp);
+
+struct icaltimetype icalcomponent_get_dtstamp(icalcomponent* comp);
+void icalcomponent_set_dtstamp(icalcomponent* comp, struct icaltimetype v);
+
+
+void icalcomponent_set_summary(icalcomponent* comp, const char* v);
+const char* icalcomponent_get_summary(icalcomponent* comp);
+
+void icalcomponent_set_comment(icalcomponent* comp, const char* v);
+const char* icalcomponent_get_comment(icalcomponent* comp);
+
+void icalcomponent_set_organizer(icalcomponent* comp, const char* v);
+const char* icalcomponent_get_organizer(icalcomponent* comp);
+
+void icalcomponent_set_uid(icalcomponent* comp, const char* v);
+const char* icalcomponent_get_uid(icalcomponent* comp);
+
+void icalcomponent_set_recurrenceid(icalcomponent* comp,
+ struct icaltimetype v);
+struct icaltimetype icalcomponent_get_recurrenceid(icalcomponent* comp);
+
+/*************** Type Specific routines ***************/
+
+icalcomponent* icalcomponent_new_vcalendar();
+icalcomponent* icalcomponent_new_vevent();
+icalcomponent* icalcomponent_new_vtodo();
+icalcomponent* icalcomponent_new_vjournal();
+icalcomponent* icalcomponent_new_vfreebusy();
+icalcomponent* icalcomponent_new_vtimezone();
+icalcomponent* icalcomponent_new_xstandard();
+icalcomponent* icalcomponent_new_xdaylight();
+
+
#endif /* !ICALCOMPONENT_H */
diff --git a/libical/src/libical/icalenums.c b/libical/src/libical/icalenums.c
index 8185eb53d7..2e04214739 100644
--- a/libical/src/libical/icalenums.c
+++ b/libical/src/libical/icalenums.c
@@ -30,9 +30,13 @@
#include "icalenums.h"
+#include <stdio.h> /* For fprintf */
+#include <stdio.h> /* For stderr */
+#include <assert.h>
+
struct icalproperty_kind_map {
icalproperty_kind kind;
- char *name;
+ const char *name;
};
static struct icalproperty_kind_map property_map[] =
@@ -108,7 +112,7 @@ static struct icalproperty_kind_map property_map[] =
};
-char* icalenum_property_kind_to_string(icalproperty_kind kind)
+const char* icalenum_property_kind_to_string(icalproperty_kind kind)
{
int i;
@@ -180,7 +184,7 @@ static struct icalparameter_kind_map parameter_map[] =
{ ICAL_NO_PARAMETER, ""}
};
-char* icalenum_parameter_kind_to_string(icalparameter_kind kind)
+const char* icalenum_parameter_kind_to_string(icalparameter_kind kind)
{
int i;
@@ -233,6 +237,7 @@ static struct icalvalue_kind_map value_map[] =
{ ICAL_URI_VALUE, "URI"},
{ ICAL_UTCOFFSET_VALUE, "UTC-OFFSET"},
{ ICAL_METHOD_VALUE, "METHOD"}, /* Not an RFC2445 type */
+ { ICAL_STATUS_VALUE, "STATUS"}, /* Not an RFC2445 type */
{ ICAL_GEO_VALUE, "FLOAT"}, /* Not an RFC2445 type */
{ ICAL_ATTACH_VALUE, "XATTACH"}, /* Not an RFC2445 type */
{ ICAL_DATETIMEDATE_VALUE, "XDATETIMEDATE"}, /* Not an RFC2445 type */
@@ -241,7 +246,7 @@ static struct icalvalue_kind_map value_map[] =
{ ICAL_NO_VALUE, ""},
};
-char* icalenum_value_kind_to_string(icalvalue_kind kind)
+const char* icalenum_value_kind_to_string(icalvalue_kind kind)
{
int i;
@@ -257,7 +262,9 @@ char* icalenum_value_kind_to_string(icalvalue_kind kind)
icalvalue_kind icalenum_value_kind_by_prop(icalproperty_kind kind)
{
-
+ fprintf(stderr,"icalenum_value_kind_by_prop is not implemented\n");
+ assert(0) ;
+ kind = ICAL_NO_VALUE;
return ICAL_NO_VALUE;
}
@@ -298,7 +305,7 @@ static struct icalcomponent_kind_map component_map[] =
{ ICAL_NO_COMPONENT, "" },
};
-char* icalenum_component_kind_to_string(icalcomponent_kind kind)
+const char* icalenum_component_kind_to_string(icalcomponent_kind kind)
{
int i;
@@ -348,7 +355,7 @@ static struct icalproperty_kind_value_map propval_map[] =
{ ICAL_PERCENTCOMPLETE_PROPERTY, ICAL_INTEGER_VALUE },
{ ICAL_PRIORITY_PROPERTY, ICAL_INTEGER_VALUE },
{ ICAL_RESOURCES_PROPERTY, ICAL_TEXT_VALUE },
- { ICAL_STATUS_PROPERTY, ICAL_TEXT_VALUE },
+ { ICAL_STATUS_PROPERTY, ICAL_STATUS_VALUE },
{ ICAL_SUMMARY_PROPERTY, ICAL_TEXT_VALUE },
{ ICAL_COMPLETED_PROPERTY, ICAL_DATETIME_VALUE },
{ ICAL_FREEBUSY_PROPERTY, ICAL_PERIOD_VALUE },
@@ -417,65 +424,13 @@ icalvalue_kind icalenum_property_kind_to_value_kind(icalproperty_kind kind)
return ICAL_NO_VALUE;
}
-struct {icalrecurrencetype_weekday wd; char * str; }
-wd_map[] = {
- {ICAL_SUNDAY_WEEKDAY,"SU"},
- {ICAL_MONDAY_WEEKDAY,"MO"},
- {ICAL_TUESDAY_WEEKDAY,"TU"},
- {ICAL_WEDNESDAY_WEEKDAY,"WE"},
- {ICAL_THURSDAY_WEEKDAY,"TH"},
- {ICAL_FRIDAY_WEEKDAY,"FR"},
- {ICAL_SATURDAY_WEEKDAY,"SA"},
- {ICAL_NO_WEEKDAY,0}
-};
-
-char* icalenum_weekday_to_string(icalrecurrencetype_weekday kind)
-{
- int i;
-
- for (i=0; wd_map[i].wd != ICAL_NO_WEEKDAY; i++) {
- if ( wd_map[i].wd == kind) {
- return wd_map[i].str;
- }
- }
-
- return 0;
-}
-
struct {
- icalrecurrencetype_frequency kind;
- char* str;
-} freq_map[] = {
- {ICAL_SECONDLY_RECURRENCE,"SECONDLY"},
- {ICAL_MINUTELY_RECURRENCE,"MINUTELY"},
- {ICAL_HOURLY_RECURRENCE,"HOURLY"},
- {ICAL_DAILY_RECURRENCE,"DAILY"},
- {ICAL_WEEKLY_RECURRENCE,"WEEKLY"},
- {ICAL_MONTHLY_RECURRENCE,"MONTHLY"},
- {ICAL_YEARLY_RECURRENCE,"YEARLY"},
- {ICAL_NO_RECURRENCE,0}
-};
-
-char* icalenum_recurrence_to_string(icalrecurrencetype_frequency kind)
-{
- int i;
-
- for (i=0; freq_map[i].kind != ICAL_NO_RECURRENCE ; i++) {
- if ( freq_map[i].kind == kind ) {
- return freq_map[i].str;
- }
- }
- return 0;
-}
-
-
-struct {
- icalrecurrencetype_frequency kind;
+ enum icalrequeststatus kind;
int major;
int minor;
- char* str;
-} status_map[] = {
+ const char* str;
+} request_status_map[] = {
{ICAL_2_0_SUCCESS_STATUS, 2,0,"Success."},
{ICAL_2_1_FALLBACK_STATUS, 2,1,"Success but fallback taken on one or more property values."},
{ICAL_2_2_IGPROP_STATUS, 2,2,"Success, invalid property ignored."},
@@ -512,14 +467,14 @@ struct {
};
-char* icalenum_reqstat_desc(icalrequeststatus stat)
+const char* icalenum_reqstat_desc(icalrequeststatus stat)
{
int i;
- for (i=0; status_map[i].kind != ICAL_UNKNOWN_STATUS; i++) {
- if ( status_map[i].kind == stat) {
- return status_map[i].str;
+ for (i=0; request_status_map[i].kind != ICAL_UNKNOWN_STATUS; i++) {
+ if ( request_status_map[i].kind == stat) {
+ return request_status_map[i].str;
}
}
@@ -531,9 +486,9 @@ short icalenum_reqstat_major(icalrequeststatus stat)
{
int i;
- for (i=0; status_map[i].kind != ICAL_UNKNOWN_STATUS; i++) {
- if ( status_map[i].kind == stat) {
- return status_map[i].major;
+ for (i=0; request_status_map[i].kind != ICAL_UNKNOWN_STATUS; i++) {
+ if ( request_status_map[i].kind == stat) {
+ return request_status_map[i].major;
}
}
return -1;
@@ -543,9 +498,9 @@ short icalenum_reqstat_minor(icalrequeststatus stat)
{
int i;
- for (i=0; status_map[i].kind != ICAL_UNKNOWN_STATUS; i++) {
- if ( status_map[i].kind == stat) {
- return status_map[i].minor;
+ for (i=0; request_status_map[i].kind != ICAL_UNKNOWN_STATUS; i++) {
+ if ( request_status_map[i].kind == stat) {
+ return request_status_map[i].minor;
}
}
return -1;
@@ -556,9 +511,9 @@ icalrequeststatus icalenum_num_to_reqstat(short major, short minor)
{
int i;
- for (i=0; status_map[i].kind != ICAL_UNKNOWN_STATUS; i++) {
- if ( status_map[i].major == major && status_map[i].minor == minor) {
- return status_map[i].kind;
+ for (i=0; request_status_map[i].kind != ICAL_UNKNOWN_STATUS; i++) {
+ if ( request_status_map[i].major == major && request_status_map[i].minor == minor) {
+ return request_status_map[i].kind;
}
}
return 0;
@@ -566,7 +521,7 @@ icalrequeststatus icalenum_num_to_reqstat(short major, short minor)
-struct {icalproperty_method method; char* str;} method_map[] = {
+struct {icalproperty_method method; const char* str;} method_map[] = {
{ICAL_METHOD_PUBLISH,"PUBLISH"},
{ICAL_METHOD_REQUEST,"REQUEST"},
{ICAL_METHOD_REPLY,"REPLY"},
@@ -587,7 +542,7 @@ struct {icalproperty_method method; char* str;} method_map[] = {
};
-char* icalenum_method_to_string(icalproperty_method method)
+const char* icalenum_method_to_string(icalproperty_method method)
{
int i;
@@ -600,7 +555,7 @@ char* icalenum_method_to_string(icalproperty_method method)
return method_map[i].str; /* should be ICAL_METHOD_NONE */
}
-icalproperty_method icalenum_string_to_method(char* str)
+icalproperty_method icalenum_string_to_method(const char* str)
{
int i;
@@ -617,3 +572,46 @@ icalproperty_method icalenum_string_to_method(char* str)
return ICAL_METHOD_NONE;
}
+
+
+struct {icalproperty_status status; const char* str;} status_map[] = {
+ {ICAL_STATUS_TENTATIVE,"TENTATIVE"},
+ {ICAL_STATUS_CONFIRMED,"CONFIRMED"},
+ {ICAL_STATUS_NEEDSACTION,"NEEDS-ACTION"},
+ {ICAL_STATUS_COMPLETED,"COMPLETED"},
+ {ICAL_STATUS_INPROCESS,"IN-PROCESS"},
+ {ICAL_STATUS_DRAFT,"DRAFT"},
+ {ICAL_STATUS_FINAL,"FINAL"},
+ {ICAL_STATUS_NONE,"NONE"}
+};
+
+const char* icalenum_status_to_string(icalproperty_status status)
+{
+ int i;
+
+ for (i=0; status_map[i].status != ICAL_STATUS_NONE; i++) {
+ if ( status_map[i].status == status) {
+ return status_map[i].str;
+ }
+ }
+
+ return status_map[i].str; /* should be ICAL_STATUS_NONE */
+}
+
+icalproperty_status icalenum_string_to_status(const char* str)
+{
+ int i;
+
+ while(*str == ' '){
+ str++;
+ }
+
+
+ for (i=0; status_map[i].status != ICAL_STATUS_NONE; i++) {
+ if ( strcmp(status_map[i].str, str) == 0) {
+ return status_map[i].status;
+ }
+ }
+
+ return ICAL_STATUS_NONE;
+}
diff --git a/libical/src/libical/icalenums.h b/libical/src/libical/icalenums.h
index ba3137803e..ab25532cf6 100644
--- a/libical/src/libical/icalenums.h
+++ b/libical/src/libical/icalenums.h
@@ -183,9 +183,10 @@ typedef enum icalproperty_class {
typedef enum icalproperty_status {
+ ICAL_STATUS_NONE,
ICAL_STATUS_TENTATIVE,
ICAL_STATUS_CONFIRMED,
- ICAL_STATUS_CANCELLED, /* CANCELED? SIC */
+ ICAL_STATUS_CANCELLED, /* CANCELED? SIC from RFC*/
ICAL_STATUS_NEEDSACTION,
ICAL_STATUS_COMPLETED,
ICAL_STATUS_INPROCESS,
@@ -220,6 +221,7 @@ typedef enum icalvalue_kind {
ICAL_GEO_VALUE, /* Non-Standard */
ICAL_INTEGER_VALUE,
ICAL_METHOD_VALUE, /* Non-Standard */
+ ICAL_STATUS_VALUE, /* Non-Standard */
ICAL_PERIOD_VALUE,
ICAL_RECUR_VALUE,
ICAL_STRING_VALUE, /* Non-Standard */
@@ -298,7 +300,8 @@ typedef enum icalparameter_partstat {
ICAL_PARTSTAT_DELEGATED,
ICAL_PARTSTAT_COMPLETED,
ICAL_PARTSTAT_INPROCESS,
- ICAL_PARTSTAT_XNAME
+ ICAL_PARTSTAT_XNAME,
+ ICAL_PARTSTAT_NONE
} icalparameter_partstat;
typedef enum icalparameter_range {
@@ -334,7 +337,7 @@ typedef enum icalparameter_xlicerrortype {
ICAL_XLICERRORTYPE_VALUEPARSEERROR,
ICAL_XLICERRORTYPE_UNKVCALPROP,
ICAL_XLICERRORTYPE_INVALIDITIP,
- ICAL_XLICERRORTYPE_MIMEPARSEERROR,
+ ICAL_XLICERRORTYPE_MIMEPARSEERROR
} icalparameter_xlicerrortype;
typedef enum icalparameter_xliccomparetype {
@@ -366,46 +369,6 @@ typedef enum icalparameter_value {
ICAL_VALUE_ERROR = ICAL_NO_VALUE
} icalparameter_value;
-/***********************************************************************
- * Recurrances
-**********************************************************************/
-
-typedef enum icalrecurrencetype_frequency
-{
- /* These enums are used to index an array, so don't change the
- order or the integers */
-
- ICAL_SECONDLY_RECURRENCE=0,
- ICAL_MINUTELY_RECURRENCE=1,
- ICAL_HOURLY_RECURRENCE=2,
- ICAL_DAILY_RECURRENCE=3,
- ICAL_WEEKLY_RECURRENCE=4,
- ICAL_MONTHLY_RECURRENCE=5,
- ICAL_YEARLY_RECURRENCE=6,
- ICAL_NO_RECURRENCE=7
-
-} icalrecurrencetype_frequency;
-
-typedef enum icalrecurrencetype_weekday
-{
- ICAL_NO_WEEKDAY,
- ICAL_SUNDAY_WEEKDAY,
- ICAL_MONDAY_WEEKDAY,
- ICAL_TUESDAY_WEEKDAY,
- ICAL_WEDNESDAY_WEEKDAY,
- ICAL_THURSDAY_WEEKDAY,
- ICAL_FRIDAY_WEEKDAY,
- ICAL_SATURDAY_WEEKDAY
-} icalrecurrencetype_weekday;
-
-enum {
- ICAL_RECURRENCE_ARRAY_MAX = 0x7f7f,
- ICAL_RECURRENCE_ARRAY_MAX_BYTE = 0x7f
-};
-
-
-char* icalenum_recurrence_to_string(icalrecurrencetype_frequency kind);
-char* icalenum_weekday_to_string(icalrecurrencetype_weekday kind);
/***********************************************************************
* Request Status codes
@@ -448,7 +411,7 @@ typedef enum icalrequeststatus {
} icalrequeststatus;
-char* icalenum_reqstat_desc(icalrequeststatus stat);
+const char* icalenum_reqstat_desc(icalrequeststatus stat);
short icalenum_reqstat_major(icalrequeststatus stat);
short icalenum_reqstat_minor(icalrequeststatus stat);
icalrequeststatus icalenum_num_to_reqstat(short major, short minor);
@@ -457,22 +420,25 @@ icalrequeststatus icalenum_num_to_reqstat(short major, short minor);
* Conversion functions
**********************************************************************/
-char* icalenum_property_kind_to_string(icalproperty_kind kind);
+const char* icalenum_property_kind_to_string(icalproperty_kind kind);
icalproperty_kind icalenum_string_to_property_kind(char* string);
-char* icalenum_value_kind_to_string(icalvalue_kind kind);
+const char* icalenum_value_kind_to_string(icalvalue_kind kind);
icalvalue_kind icalenum_value_kind_by_prop(icalproperty_kind kind);
-char* icalenum_parameter_kind_to_string(icalparameter_kind kind);
+const char* icalenum_parameter_kind_to_string(icalparameter_kind kind);
icalparameter_kind icalenum_string_to_parameter_kind(char* string);
-char* icalenum_component_kind_to_string(icalcomponent_kind kind);
+const char* icalenum_component_kind_to_string(icalcomponent_kind kind);
icalcomponent_kind icalenum_string_to_component_kind(char* string);
icalvalue_kind icalenum_property_kind_to_value_kind(icalproperty_kind kind);
-char* icalenum_method_to_string(icalproperty_method);
-icalproperty_method icalenum_string_to_method(char* string);
+const char* icalenum_method_to_string(icalproperty_method);
+icalproperty_method icalenum_string_to_method(const char* string);
+
+const char* icalenum_status_to_string(icalproperty_status);
+icalproperty_status icalenum_string_to_status(const char* string);
#endif /* !ICALENUMS_H */
diff --git a/libical/src/libical/icalerror.c b/libical/src/libical/icalerror.c
index f7d93de427..76212afdae 100644
--- a/libical/src/libical/icalerror.c
+++ b/libical/src/libical/icalerror.c
@@ -55,6 +55,11 @@ void icalerror_clear_errno() {
void icalerror_set_errno(icalerrorenum e) {
+#ifdef ICAL_ERRORS_ARE_FATAL
+ fprintf(stderr,"libical: icalerrno_set_error: %s",icalerror_strerror(e));
+ icalerror_crash_here();
+#endif
+
icalerror_stop_here();
icalerrno = e;
}
@@ -67,9 +72,9 @@ struct icalerror_string_map {
static struct icalerror_string_map string_map[] =
{
- {ICAL_BADARG_ERROR,"Bad argumnet to function"},
+ {ICAL_BADARG_ERROR,"Bad argument to function"},
{ICAL_NEWFAILED_ERROR,"Failed to create a new object via a *_new() routine"},
- {ICAL_MALFORMEDDATA_ERROR,"An input string was not correctly formed"},
+ {ICAL_MALFORMEDDATA_ERROR,"An input string was not correctly formed or a component has missing or extra properties"},
{ICAL_PARSE_ERROR,"Failed to parse a part of an iCal componet"},
{ICAL_INTERNAL_ERROR,"Random internal error. This indicates an error in the library code, not an error in use"},
{ICAL_FILE_ERROR,"An operation on a file failed. Check errno for more detail."},
diff --git a/libical/src/libical/icalerror.h b/libical/src/libical/icalerror.h
index fbf6076dd6..d954b4d7f3 100644
--- a/libical/src/libical/icalerror.h
+++ b/libical/src/libical/icalerror.h
@@ -30,6 +30,12 @@
#include <assert.h>
#include <stdio.h> /* For icalerror_warn() */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+
/* This routine is called before any error is triggered. It is called
by icalerror_set_errno, so it does not appear in all of the macros
below */
@@ -58,14 +64,13 @@ void icalerror_crash_here(void);
#define icalerror_assert(test,message)
#endif
-
/* Check & abort if check fails */
#ifdef ICAL_ERRORS_ARE_FATAL
#define icalerror_check_arg(test,arg) icalerror_stop_here();assert(test)
#else
#define icalerror_check_arg(test,arg)
#endif
-/* Check & return void if check failes*/
+/* Check & return void if check fails*/
#ifdef ICAL_ERRORS_ARE_FATAL
#define icalerror_check_arg_rv(test,arg) icalerror_stop_here();assert(test);
@@ -73,7 +78,7 @@ void icalerror_crash_here(void);
#define icalerror_check_arg_rv(test,arg) if(!(test)) { icalerror_set_errno(ICAL_BADARG_ERROR); return; }
#endif
-/* Check & return 0 if check failes*/
+/* Check & return 0 if check fails*/
#ifdef ICAL_ERRORS_ARE_FATAL
#define icalerror_check_arg_rz(test,arg) icalerror_stop_here();assert(test);
#else
@@ -81,7 +86,7 @@ void icalerror_crash_here(void);
#endif
-/* Check & return an error if check failes*/
+/* Check & return an error if check fails*/
#ifdef ICAL_ERRORS_ARE_FATAL
#define icalerror_check_arg_re(test,arg,error) icalerror_stop_here();assert(test);
#else
@@ -113,7 +118,7 @@ typedef enum icalerrorenum {
ICAL_BADARG_ERROR,
ICAL_NEWFAILED_ERROR,
- ICAL_MALFORMEDDATA_ERROR,
+ ICAL_MALFORMEDDATA_ERROR,
ICAL_PARSE_ERROR,
ICAL_INTERNAL_ERROR, /* Like assert --internal consist. prob */
ICAL_FILE_ERROR,
@@ -129,7 +134,7 @@ typedef enum icalerrorenum {
extern icalerrorenum icalerrno;
-void icalerror_clear_errno();
+void icalerror_clear_errno(void);
void icalerror_set_errno(icalerrorenum);
char* icalerror_strerror(icalerrorenum e);
diff --git a/libical/src/libical/icallexer.c b/libical/src/libical/icallexer.c
index 26b9ce7bbc..00dfbdb7ef 100644
--- a/libical/src/libical/icallexer.c
+++ b/libical/src/libical/icallexer.c
@@ -1,3 +1,21 @@
+#define yy_create_buffer ical_yy_create_buffer
+#define yy_delete_buffer ical_yy_delete_buffer
+#define yy_scan_buffer ical_yy_scan_buffer
+#define yy_scan_string ical_yy_scan_string
+#define yy_scan_bytes ical_yy_scan_bytes
+#define yy_flex_debug ical_yy_flex_debug
+#define yy_init_buffer ical_yy_init_buffer
+#define yy_flush_buffer ical_yy_flush_buffer
+#define yy_load_buffer_state ical_yy_load_buffer_state
+#define yy_switch_to_buffer ical_yy_switch_to_buffer
+#define yyin ical_yyin
+#define yyleng ical_yyleng
+#define yylex ical_yylex
+#define yyout ical_yyout
+#define yyrestart ical_yyrestart
+#define yytext ical_yytext
+#define yywrap ical_yywrap
+
/* A lexical scanner generated by flex */
/* Scanner skeleton version:
@@ -285,35 +303,36 @@ static void yy_fatal_error YY_PROTO(( yyconst char msg[] ));
yy_flex_strncpy( yytext, yytext_ptr, yyleng + 1 ); \
yy_c_buf_p = yy_cp;
-#define YY_NUM_RULES 65
-#define YY_END_OF_BUFFER 66
-static yyconst short int yy_accept[231] =
+#define YY_NUM_RULES 66
+#define YY_END_OF_BUFFER 67
+static yyconst short int yy_accept[232] =
{ 0,
0, 0, 0, 0, 1, 1, 0, 0, 5, 5,
7, 7, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 66, 65, 1, 2, 1, 3,
+ 0, 0, 0, 0, 67, 66, 1, 2, 1, 3,
4, 3, 5, 6, 5, 11, 10, 11, 7, 8,
- 9, 15, 65, 14, 12, 13, 18, 17, 18, 16,
- 23, 65, 22, 19, 20, 21, 58, 65, 55, 53,
- 54, 52, 65, 65, 65, 65, 65, 65, 65, 65,
- 56, 65, 65, 65, 57, 59, 65, 60, 65, 62,
-
- 63, 62, 64, 1, 2, 4, 5, 6, 10, 7,
- 15, 12, 17, 16, 23, 19, 58, 55, 0, 0,
- 0, 51, 0, 0, 0, 45, 46, 0, 47, 50,
- 48, 0, 49, 0, 0, 59, 61, 63, 0, 0,
+ 9, 15, 66, 14, 12, 13, 18, 17, 18, 16,
+ 23, 66, 22, 19, 20, 21, 59, 66, 56, 53,
+ 55, 54, 52, 66, 66, 66, 66, 66, 66, 66,
+ 66, 57, 66, 66, 66, 58, 60, 66, 61, 66,
+
+ 63, 64, 63, 65, 1, 2, 4, 5, 6, 10,
+ 7, 15, 12, 17, 16, 23, 19, 59, 56, 0,
+ 0, 0, 51, 0, 0, 0, 45, 46, 0, 47,
+ 50, 48, 0, 49, 0, 0, 60, 62, 64, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 27, 0, 0, 0, 0,
- 0, 0, 0, 44, 0, 28, 0, 0, 0, 0,
- 0, 0, 0, 25, 37, 0, 0, 0, 0, 0,
- 26, 0, 0, 29, 0, 0, 0, 0, 0, 0,
-
- 40, 0, 0, 0, 0, 42, 43, 0, 31, 0,
- 0, 0, 0, 0, 0, 41, 0, 30, 0, 33,
- 34, 35, 0, 24, 39, 38, 0, 36, 32, 0
+ 0, 0, 0, 0, 0, 0, 27, 0, 0, 0,
+ 0, 0, 0, 0, 44, 0, 28, 0, 0, 0,
+ 0, 0, 0, 0, 25, 37, 0, 0, 0, 0,
+ 0, 26, 0, 0, 29, 0, 0, 0, 0, 0,
+
+ 0, 40, 0, 0, 0, 0, 42, 43, 0, 31,
+ 0, 0, 0, 0, 0, 0, 41, 0, 30, 0,
+ 33, 34, 35, 0, 24, 39, 38, 0, 36, 32,
+ 0
} ;
static yyconst int yy_ec[256] =
@@ -356,140 +375,138 @@ static yyconst int yy_meta[35] =
1, 1, 1, 1
} ;
-static yyconst short int yy_base[240] =
+static yyconst short int yy_base[241] =
{ 0,
0, 0, 0, 0, 0, 2, 4, 6, 8, 10,
12, 14, 47, 0, 78, 86, 94, 0, 128, 0,
0, 0, 16, 24, 29, 32, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 261, 260, 0, 0,
- 0, 0, 0, 0, 264, 267, 0, 267, 261, 267,
- 267, 260, 0, 267, 259, 267, 267, 258, 250, 267,
- 267, 267, 256, 267, 248, 267, 267, 267, 254, 33,
- 267, 253, 267, 245, 267, 267, 267, 251, 48, 267,
- 267, 267, 219, 227, 238, 222, 224, 224, 5, 43,
- 40, 223, 44, 229, 267, 267, 242, 267, 234, 267,
-
- 267, 240, 267, 0, 267, 267, 0, 267, 267, 232,
- 267, 231, 267, 101, 267, 230, 267, 57, 148, 208,
- 218, 220, 205, 205, 210, 209, 267, 217, 267, 267,
- 267, 201, 213, 200, 215, 267, 267, 267, 214, 201,
- 59, 208, 207, 206, 198, 199, 193, 191, 201, 186,
- 186, 190, 194, 192, 182, 183, 176, 178, 184, 183,
- 57, 189, 192, 174, 169, 267, 180, 173, 170, 180,
- 174, 175, 158, 267, 157, 267, 150, 145, 145, 149,
- 147, 151, 142, 267, 267, 135, 136, 149, 143, 112,
- 267, 92, 91, 267, 92, 102, 95, 93, 92, 99,
-
- 267, 101, 90, 73, 83, 267, 267, 85, 84, 79,
- 63, 53, 62, 47, 34, 267, 14, 267, 33, 267,
- 267, 267, 11, 267, 267, 267, 5, 267, 267, 267,
- 181, 183, 185, 187, 189, 191, 193, 35, 0
+ 0, 0, 0, 0, 0, 0, 259, 258, 0, 0,
+ 0, 0, 0, 0, 262, 265, 0, 265, 259, 265,
+ 265, 258, 0, 265, 257, 265, 265, 256, 248, 265,
+ 265, 265, 254, 265, 246, 265, 265, 265, 252, 33,
+ 265, 251, 265, 243, 265, 265, 265, 249, 20, 265,
+ 265, 265, 265, 217, 225, 236, 220, 222, 222, 28,
+ 43, 27, 221, 38, 227, 265, 265, 240, 265, 232,
+
+ 265, 265, 238, 265, 0, 265, 265, 0, 265, 265,
+ 230, 265, 229, 265, 57, 265, 228, 265, 74, 148,
+ 206, 216, 218, 203, 203, 208, 207, 265, 215, 265,
+ 265, 265, 199, 211, 198, 213, 265, 265, 265, 212,
+ 199, 67, 206, 205, 204, 196, 197, 191, 189, 199,
+ 184, 184, 188, 192, 190, 180, 181, 174, 176, 182,
+ 181, 85, 187, 190, 172, 167, 265, 178, 171, 168,
+ 178, 156, 157, 156, 265, 154, 265, 147, 143, 143,
+ 147, 144, 148, 140, 265, 265, 132, 133, 111, 104,
+ 109, 265, 88, 87, 265, 89, 99, 92, 89, 88,
+
+ 95, 265, 96, 86, 73, 84, 265, 265, 88, 86,
+ 79, 49, 50, 59, 49, 35, 265, 34, 265, 48,
+ 265, 265, 265, 11, 265, 265, 265, 5, 265, 265,
+ 265, 181, 183, 185, 187, 189, 191, 193, 35, 0
} ;
-static yyconst short int yy_def[240] =
+static yyconst short int yy_def[241] =
{ 0,
- 231, 231, 231, 231, 232, 232, 233, 233, 234, 234,
- 235, 235, 231, 13, 236, 236, 13, 17, 230, 19,
- 231, 231, 231, 231, 237, 237, 231, 231, 231, 231,
+ 232, 232, 232, 232, 233, 233, 234, 234, 235, 235,
+ 236, 236, 232, 13, 237, 237, 13, 17, 231, 19,
+ 232, 232, 232, 232, 238, 238, 232, 232, 232, 232,
+ 232, 232, 232, 232, 232, 232, 232, 232, 232, 232,
+ 232, 232, 232, 232, 231, 231, 239, 231, 239, 231,
+ 231, 231, 240, 231, 240, 231, 231, 231, 231, 231,
+ 231, 231, 231, 231, 231, 231, 231, 231, 231, 231,
+ 231, 231, 231, 231, 231, 231, 231, 231, 231, 231,
+ 231, 231, 231, 231, 231, 231, 231, 231, 231, 231,
+ 231, 231, 231, 231, 231, 231, 231, 231, 231, 231,
+
+ 231, 231, 231, 231, 239, 231, 231, 240, 231, 231,
+ 231, 231, 231, 231, 231, 231, 231, 231, 231, 231,
+ 231, 231, 231, 231, 231, 231, 231, 231, 231, 231,
+ 231, 231, 231, 231, 231, 231, 231, 231, 231, 231,
+ 231, 231, 231, 231, 231, 231, 231, 231, 231, 231,
+ 231, 231, 231, 231, 231, 231, 231, 231, 231, 231,
+ 231, 231, 231, 231, 231, 231, 231, 231, 231, 231,
+ 231, 231, 231, 231, 231, 231, 231, 231, 231, 231,
+ 231, 231, 231, 231, 231, 231, 231, 231, 231, 231,
+ 231, 231, 231, 231, 231, 231, 231, 231, 231, 231,
+
+ 231, 231, 231, 231, 231, 231, 231, 231, 231, 231,
+ 231, 231, 231, 231, 231, 231, 231, 231, 231, 231,
231, 231, 231, 231, 231, 231, 231, 231, 231, 231,
- 231, 231, 231, 231, 230, 230, 238, 230, 238, 230,
- 230, 230, 239, 230, 239, 230, 230, 230, 230, 230,
- 230, 230, 230, 230, 230, 230, 230, 230, 230, 230,
- 230, 230, 230, 230, 230, 230, 230, 230, 230, 230,
- 230, 230, 230, 230, 230, 230, 230, 230, 230, 230,
- 230, 230, 230, 230, 230, 230, 230, 230, 230, 230,
-
- 230, 230, 230, 238, 230, 230, 239, 230, 230, 230,
- 230, 230, 230, 230, 230, 230, 230, 230, 230, 230,
- 230, 230, 230, 230, 230, 230, 230, 230, 230, 230,
- 230, 230, 230, 230, 230, 230, 230, 230, 230, 230,
- 230, 230, 230, 230, 230, 230, 230, 230, 230, 230,
- 230, 230, 230, 230, 230, 230, 230, 230, 230, 230,
- 230, 230, 230, 230, 230, 230, 230, 230, 230, 230,
- 230, 230, 230, 230, 230, 230, 230, 230, 230, 230,
- 230, 230, 230, 230, 230, 230, 230, 230, 230, 230,
- 230, 230, 230, 230, 230, 230, 230, 230, 230, 230,
-
- 230, 230, 230, 230, 230, 230, 230, 230, 230, 230,
- 230, 230, 230, 230, 230, 230, 230, 230, 230, 230,
- 230, 230, 230, 230, 230, 230, 230, 230, 230, 0,
- 230, 230, 230, 230, 230, 230, 230, 230, 230
+ 0, 231, 231, 231, 231, 231, 231, 231, 231, 231
} ;
-static yyconst short int yy_nxt[302] =
+static yyconst short int yy_nxt[300] =
{ 0,
- 107, 48, 49, 48, 49, 51, 52, 51, 52, 54,
- 55, 54, 55, 57, 58, 57, 58, 96, 97, 98,
- 59, 98, 59, 125, 99, 96, 97, 98, 126, 98,
- 101, 102, 99, 101, 102, 104, 114, 229, 114, 114,
- 60, 114, 60, 228, 227, 61, 226, 61, 62, 63,
- 64, 118, 64, 118, 127, 65, 118, 130, 128, 133,
- 118, 64, 118, 134, 64, 118, 225, 224, 64, 131,
- 180, 64, 129, 223, 64, 66, 222, 159, 64, 68,
- 69, 70, 160, 70, 70, 181, 70, 68, 69, 70,
- 221, 70, 70, 220, 70, 71, 72, 73, 219, 73,
-
- 218, 73, 74, 217, 114, 216, 114, 114, 73, 114,
- 215, 73, 214, 213, 212, 73, 211, 210, 73, 209,
- 208, 73, 75, 207, 206, 73, 205, 76, 46, 77,
- 78, 79, 80, 79, 46, 46, 79, 81, 82, 46,
- 83, 84, 85, 46, 86, 87, 88, 46, 46, 89,
- 46, 46, 46, 46, 46, 90, 91, 92, 46, 93,
- 94, 95, 139, 204, 203, 140, 202, 201, 200, 141,
- 199, 198, 197, 196, 195, 142, 194, 193, 192, 143,
- 144, 46, 46, 47, 47, 50, 50, 53, 53, 56,
- 56, 67, 67, 100, 100, 191, 190, 189, 188, 187,
-
- 186, 185, 184, 183, 182, 179, 178, 177, 176, 175,
- 174, 173, 172, 171, 170, 169, 168, 167, 166, 165,
- 164, 163, 162, 161, 158, 157, 156, 155, 154, 153,
- 152, 151, 150, 149, 148, 147, 146, 145, 116, 112,
- 110, 138, 137, 136, 135, 132, 124, 123, 122, 121,
- 120, 119, 117, 116, 115, 113, 112, 111, 110, 109,
- 108, 106, 105, 230, 103, 103, 45, 230, 230, 230,
- 230, 230, 230, 230, 230, 230, 230, 230, 230, 230,
- 230, 230, 230, 230, 230, 230, 230, 230, 230, 230,
- 230, 230, 230, 230, 230, 230, 230, 230, 230, 230,
-
- 230
+ 108, 48, 49, 48, 49, 51, 52, 51, 52, 54,
+ 55, 54, 55, 57, 58, 57, 58, 97, 98, 99,
+ 59, 99, 59, 119, 100, 97, 98, 99, 119, 99,
+ 102, 103, 100, 102, 103, 105, 115, 230, 115, 115,
+ 60, 115, 60, 229, 131, 61, 126, 61, 62, 63,
+ 64, 127, 64, 134, 128, 65, 132, 135, 129, 228,
+ 115, 64, 115, 115, 64, 115, 227, 226, 64, 225,
+ 224, 64, 130, 223, 64, 66, 222, 119, 64, 68,
+ 69, 70, 119, 70, 70, 160, 70, 68, 69, 70,
+ 161, 70, 70, 221, 70, 71, 72, 73, 181, 73,
+
+ 220, 73, 74, 219, 218, 217, 216, 215, 73, 214,
+ 213, 73, 212, 182, 211, 73, 210, 209, 73, 208,
+ 207, 73, 75, 206, 205, 73, 204, 76, 46, 77,
+ 78, 79, 80, 81, 46, 46, 79, 82, 83, 46,
+ 84, 85, 86, 46, 87, 88, 89, 46, 46, 90,
+ 46, 46, 46, 46, 46, 91, 92, 93, 46, 94,
+ 95, 96, 140, 203, 202, 141, 201, 200, 199, 142,
+ 198, 197, 196, 195, 194, 143, 193, 192, 191, 144,
+ 145, 46, 46, 47, 47, 50, 50, 53, 53, 56,
+ 56, 67, 67, 101, 101, 190, 189, 188, 187, 186,
+
+ 185, 184, 183, 180, 179, 178, 177, 176, 175, 174,
+ 173, 172, 171, 170, 169, 168, 167, 166, 165, 164,
+ 163, 162, 159, 158, 157, 156, 155, 154, 153, 152,
+ 151, 150, 149, 148, 147, 146, 117, 113, 111, 139,
+ 138, 137, 136, 133, 125, 124, 123, 122, 121, 120,
+ 118, 117, 116, 114, 113, 112, 111, 110, 109, 107,
+ 106, 231, 104, 104, 45, 231, 231, 231, 231, 231,
+ 231, 231, 231, 231, 231, 231, 231, 231, 231, 231,
+ 231, 231, 231, 231, 231, 231, 231, 231, 231, 231,
+ 231, 231, 231, 231, 231, 231, 231, 231, 231
+
} ;
-static yyconst short int yy_chk[302] =
+static yyconst short int yy_chk[300] =
{ 0,
- 239, 5, 5, 6, 6, 7, 7, 8, 8, 9,
+ 240, 5, 5, 6, 6, 7, 7, 8, 8, 9,
9, 10, 10, 11, 11, 12, 12, 23, 23, 23,
- 11, 23, 12, 89, 23, 24, 24, 24, 89, 24,
- 25, 25, 24, 26, 26, 238, 70, 227, 70, 70,
- 11, 70, 12, 223, 219, 11, 217, 12, 13, 13,
- 13, 79, 13, 79, 90, 13, 79, 91, 90, 93,
- 118, 13, 118, 93, 13, 118, 215, 214, 13, 91,
- 161, 13, 90, 213, 13, 13, 212, 141, 13, 15,
- 15, 15, 141, 15, 15, 161, 15, 16, 16, 16,
- 211, 16, 16, 210, 16, 17, 17, 17, 209, 17,
-
- 208, 17, 17, 205, 114, 204, 114, 114, 17, 114,
- 203, 17, 202, 200, 199, 17, 198, 197, 17, 196,
- 195, 17, 17, 193, 192, 17, 190, 17, 19, 19,
+ 11, 23, 12, 79, 23, 24, 24, 24, 79, 24,
+ 25, 25, 24, 26, 26, 239, 70, 228, 70, 70,
+ 11, 70, 12, 224, 92, 11, 90, 12, 13, 13,
+ 13, 90, 13, 94, 91, 13, 92, 94, 91, 220,
+ 115, 13, 115, 115, 13, 115, 218, 216, 13, 215,
+ 214, 13, 91, 213, 13, 13, 212, 119, 13, 15,
+ 15, 15, 119, 15, 15, 142, 15, 16, 16, 16,
+ 142, 16, 16, 211, 16, 17, 17, 17, 162, 17,
+
+ 210, 17, 17, 209, 206, 205, 204, 203, 17, 201,
+ 200, 17, 199, 162, 198, 17, 197, 196, 17, 194,
+ 193, 17, 17, 191, 190, 17, 189, 17, 19, 19,
19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
- 19, 19, 119, 189, 188, 119, 187, 186, 183, 119,
- 182, 181, 180, 179, 178, 119, 177, 175, 173, 119,
- 119, 231, 231, 232, 232, 233, 233, 234, 234, 235,
- 235, 236, 236, 237, 237, 172, 171, 170, 169, 168,
-
- 167, 165, 164, 163, 162, 160, 159, 158, 157, 156,
- 155, 154, 153, 152, 151, 150, 149, 148, 147, 146,
- 145, 144, 143, 142, 140, 139, 135, 134, 133, 132,
- 128, 126, 125, 124, 123, 122, 121, 120, 116, 112,
- 110, 102, 99, 97, 94, 92, 88, 87, 86, 85,
- 84, 83, 78, 74, 72, 69, 65, 63, 59, 58,
- 55, 52, 49, 45, 38, 37, 230, 230, 230, 230,
- 230, 230, 230, 230, 230, 230, 230, 230, 230, 230,
- 230, 230, 230, 230, 230, 230, 230, 230, 230, 230,
- 230, 230, 230, 230, 230, 230, 230, 230, 230, 230,
-
- 230
+ 19, 19, 120, 188, 187, 120, 184, 183, 182, 120,
+ 181, 180, 179, 178, 176, 120, 174, 173, 172, 120,
+ 120, 232, 232, 233, 233, 234, 234, 235, 235, 236,
+ 236, 237, 237, 238, 238, 171, 170, 169, 168, 166,
+
+ 165, 164, 163, 161, 160, 159, 158, 157, 156, 155,
+ 154, 153, 152, 151, 150, 149, 148, 147, 146, 145,
+ 144, 143, 141, 140, 136, 135, 134, 133, 129, 127,
+ 126, 125, 124, 123, 122, 121, 117, 113, 111, 103,
+ 100, 98, 95, 93, 89, 88, 87, 86, 85, 84,
+ 78, 74, 72, 69, 65, 63, 59, 58, 55, 52,
+ 49, 45, 38, 37, 231, 231, 231, 231, 231, 231,
+ 231, 231, 231, 231, 231, 231, 231, 231, 231, 231,
+ 231, 231, 231, 231, 231, 231, 231, 231, 231, 231,
+ 231, 231, 231, 231, 231, 231, 231, 231, 231
+
} ;
static yy_state_type yy_last_accepting_state;
@@ -521,34 +538,35 @@ char *yytext_ptr;
$Id$
$Locker$
- (C) COPYRIGHT 2000, Eric Busboom, http://www.softwarestudio.org
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of either:
-
- The LGPL as published by the Free Software Foundation, version
- 2.1, available at: http://www.fsf.org/copyleft/lesser.html
-
- Or:
+ (C) COPYRIGHT 1999 Eric Busboom
+ http://www.softwarestudio.org
- The Mozilla Public License Version 1.0. You may obtain a copy of
- the License at http://www.mozilla.org/MPL/
+ The contents of this file are subject to the Mozilla Public License
+ Version 1.0 (the "License"); you may not use this file except in
+ compliance with the License. You may obtain a copy of the License at
+ http://www.mozilla.org/MPL/
+
+ Software distributed under the License is distributed on an "AS IS"
+ basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
+ the License for the specific language governing rights and
+ limitations under the License.
+ The original author is Eric Busboom
The original code is icalitip.y
======================================================================*/
-#include "icalyacc.h"
#include "icalparser.h"
#include "icalenums.h"
#include "icalmemory.h"
#include "assert.h"
+#include "icalyacc.h"
#include <string.h> /* For strdup() */
int icalparser_flex_input(char* buf, int max_size);
-void icalparser_clear_flex_input();
+void icalparser_clear_flex_input(void);
#define ICAL_MAX_STR_CONST 1024
@@ -558,15 +576,15 @@ void icalparser_clear_flex_input();
#undef yywrap
#undef YY_FATAL_ERROR
-#define YY_FATAL_ERROR(msg) yyerror(msg)
+#define YY_FATAL_ERROR(msg) ical_yyerror(msg)
icalvalue_kind value_kind=ICAL_NO_VALUE;
-void set_parser_value_state();
+void set_parser_value_state(icalvalue_kind kind);
extern int yydebug;
-void yyerror(char *s);
+void ical_yyerror(char *s);
-void init_str_buf();
+void init_str_buf(void);
int last_state;
@@ -574,6 +592,11 @@ char *str_buf;
char *str_buf_p;
size_t buf_sz; /* = ICAL_MAX_STR_CONST;*/
+/* Define routines that were not propertly defined because of the
+renaming hack applied in icalyacc.y */
+YY_BUFFER_STATE ical_yy_scan_buffer ( char *base, yy_size_t size );
+YY_BUFFER_STATE ical_yy_scan_string ( yyconst char *yy_str );
+YY_BUFFER_STATE ical_yy_scan_bytes ( yyconst char *bytes, int len );
#define quoted_string 1
@@ -599,7 +622,7 @@ size_t buf_sz; /* = ICAL_MAX_STR_CONST;*/
#define end_of_value 20
#define paramtext 21
-#line 604 "lex.yy.c"
+#line 626 "lex.ical_yy.c"
/* Macros after this point can all be overridden by user definitions in
* section 1.
@@ -747,17 +770,17 @@ YY_MALLOC_DECL
YY_DECL
{
register yy_state_type yy_current_state;
- register char *yy_cp, *yy_bp;
+ register char *yy_cp = NULL, *yy_bp = NULL;
register int yy_act;
-#line 92 "icallexer.l"
+#line 97 "icallexer.l"
-#line 762 "lex.yy.c"
+#line 784 "lex.ical_yy.c"
if ( yy_init )
{
@@ -808,13 +831,13 @@ yy_match:
while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
{
yy_current_state = (int) yy_def[yy_current_state];
- if ( yy_current_state >= 231 )
+ if ( yy_current_state >= 232 )
yy_c = yy_meta[(unsigned int) yy_c];
}
yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
++yy_cp;
}
- while ( yy_base[yy_current_state] != 267 );
+ while ( yy_base[yy_current_state] != 265 );
yy_find_action:
yy_act = yy_accept[yy_current_state];
@@ -843,357 +866,362 @@ do_action: /* This label is used only to access EOF actions. */
case 1:
YY_RULE_SETUP
-#line 99 "icallexer.l"
-{ yylval.v_string= icalmemory_tmp_copy(yytext);
+#line 104 "icallexer.l"
+{ ical_yylval.v_string= icalmemory_tmp_copy(yytext);
return STRING;}
YY_BREAK
case 2:
YY_RULE_SETUP
-#line 101 "icallexer.l"
+#line 106 "icallexer.l"
{ return EOL;}
YY_BREAK
case 3:
YY_RULE_SETUP
-#line 106 "icallexer.l"
+#line 111 "icallexer.l"
{ return CHARACTER; }
YY_BREAK
case 4:
YY_RULE_SETUP
-#line 107 "icallexer.l"
+#line 112 "icallexer.l"
{ return EOL;}
YY_BREAK
case 5:
YY_RULE_SETUP
-#line 112 "icallexer.l"
-{ yylval.v_string= icalmemory_tmp_copy(yytext);
+#line 117 "icallexer.l"
+{ ical_yylval.v_string= icalmemory_tmp_copy(yytext);
return STRING;}
YY_BREAK
case 6:
YY_RULE_SETUP
-#line 114 "icallexer.l"
+#line 119 "icallexer.l"
{ return EOL;}
YY_BREAK
case 7:
YY_RULE_SETUP
-#line 120 "icallexer.l"
-{ yylval.v_string= icalmemory_tmp_copy(yytext);
+#line 125 "icallexer.l"
+{ ical_yylval.v_string= icalmemory_tmp_copy(yytext);
return DIGITS; }
YY_BREAK
case 8:
YY_RULE_SETUP
-#line 122 "icallexer.l"
+#line 127 "icallexer.l"
{ return TIME_CHAR; }
YY_BREAK
case 9:
YY_RULE_SETUP
-#line 123 "icallexer.l"
+#line 128 "icallexer.l"
{ return UTC_CHAR; }
YY_BREAK
case 10:
YY_RULE_SETUP
-#line 124 "icallexer.l"
+#line 129 "icallexer.l"
{ return EOL;}
YY_BREAK
case 11:
YY_RULE_SETUP
-#line 125 "icallexer.l"
+#line 130 "icallexer.l"
{ return CHARACTER; }
YY_BREAK
case 12:
YY_RULE_SETUP
-#line 130 "icallexer.l"
-{ yylval.v_string =icalmemory_tmp_copy(yytext);
+#line 135 "icallexer.l"
+{ ical_yylval.v_string =icalmemory_tmp_copy(yytext);
return DIGITS; }
YY_BREAK
case 13:
YY_RULE_SETUP
-#line 132 "icallexer.l"
+#line 137 "icallexer.l"
{ return TIME_CHAR; }
YY_BREAK
case 14:
YY_RULE_SETUP
-#line 133 "icallexer.l"
+#line 138 "icallexer.l"
{ return yytext[0]; }
YY_BREAK
case 15:
YY_RULE_SETUP
-#line 134 "icallexer.l"
+#line 139 "icallexer.l"
{ return EOL;}
YY_BREAK
case 16:
YY_RULE_SETUP
-#line 139 "icallexer.l"
-{ yylval.v_int=atoi(yytext); return INTNUMBER; }
+#line 144 "icallexer.l"
+{ ical_yylval.v_int=atoi(yytext); return INTNUMBER; }
YY_BREAK
case 17:
YY_RULE_SETUP
-#line 140 "icallexer.l"
+#line 145 "icallexer.l"
{ return EOL;}
YY_BREAK
case 18:
YY_RULE_SETUP
-#line 141 "icallexer.l"
+#line 146 "icallexer.l"
{ return CHARACTER; }
YY_BREAK
case 19:
YY_RULE_SETUP
-#line 146 "icallexer.l"
-{ yylval.v_string =icalmemory_tmp_copy(yytext) ;
+#line 151 "icallexer.l"
+{ ical_yylval.v_string =icalmemory_tmp_copy(yytext) ;
return DIGITS; }
YY_BREAK
case 20:
YY_RULE_SETUP
-#line 148 "icallexer.l"
+#line 153 "icallexer.l"
{ return TIME_CHAR; }
YY_BREAK
case 21:
YY_RULE_SETUP
-#line 149 "icallexer.l"
+#line 154 "icallexer.l"
{ return UTC_CHAR; }
YY_BREAK
case 22:
YY_RULE_SETUP
-#line 150 "icallexer.l"
+#line 155 "icallexer.l"
{ return yytext[0]; }
YY_BREAK
case 23:
YY_RULE_SETUP
-#line 151 "icallexer.l"
+#line 156 "icallexer.l"
{ return EOL;}
YY_BREAK
case 24:
YY_RULE_SETUP
-#line 156 "icallexer.l"
+#line 161 "icallexer.l"
{ return INTERVAL; }
YY_BREAK
case 25:
YY_RULE_SETUP
-#line 157 "icallexer.l"
+#line 162 "icallexer.l"
{ return COUNT; }
YY_BREAK
case 26:
YY_RULE_SETUP
-#line 158 "icallexer.l"
+#line 163 "icallexer.l"
{ return UNTIL; }
YY_BREAK
case 27:
YY_RULE_SETUP
-#line 159 "icallexer.l"
+#line 164 "icallexer.l"
{ return FREQ; }
YY_BREAK
case 28:
YY_RULE_SETUP
-#line 160 "icallexer.l"
+#line 165 "icallexer.l"
{ return BYDAY; }
YY_BREAK
case 29:
YY_RULE_SETUP
-#line 161 "icallexer.l"
+#line 166 "icallexer.l"
{ return BYHOUR; }
YY_BREAK
case 30:
YY_RULE_SETUP
-#line 162 "icallexer.l"
+#line 167 "icallexer.l"
{ return BYMINUTE; }
YY_BREAK
case 31:
YY_RULE_SETUP
-#line 163 "icallexer.l"
+#line 168 "icallexer.l"
{ return BYMONTH; }
YY_BREAK
case 32:
YY_RULE_SETUP
-#line 164 "icallexer.l"
+#line 169 "icallexer.l"
{ return BYMONTHDAY; }
YY_BREAK
case 33:
YY_RULE_SETUP
-#line 165 "icallexer.l"
+#line 170 "icallexer.l"
{ return BYSECOND; }
YY_BREAK
case 34:
YY_RULE_SETUP
-#line 166 "icallexer.l"
+#line 171 "icallexer.l"
{ return BYSETPOS; }
YY_BREAK
case 35:
YY_RULE_SETUP
-#line 167 "icallexer.l"
+#line 172 "icallexer.l"
{ return BYWEEKNO; }
YY_BREAK
case 36:
YY_RULE_SETUP
-#line 168 "icallexer.l"
+#line 173 "icallexer.l"
{ return BYYEARDAY; }
YY_BREAK
case 37:
YY_RULE_SETUP
-#line 169 "icallexer.l"
+#line 174 "icallexer.l"
{ return DAILY; }
YY_BREAK
case 38:
YY_RULE_SETUP
-#line 170 "icallexer.l"
+#line 175 "icallexer.l"
{ return SECONDLY; }
YY_BREAK
case 39:
YY_RULE_SETUP
-#line 171 "icallexer.l"
+#line 176 "icallexer.l"
{ return MINUTELY; }
YY_BREAK
case 40:
YY_RULE_SETUP
-#line 172 "icallexer.l"
+#line 177 "icallexer.l"
{ return HOURLY; }
YY_BREAK
case 41:
YY_RULE_SETUP
-#line 173 "icallexer.l"
+#line 178 "icallexer.l"
{ return MONTHLY; }
YY_BREAK
case 42:
YY_RULE_SETUP
-#line 174 "icallexer.l"
+#line 179 "icallexer.l"
{ return WEEKLY; }
YY_BREAK
case 43:
YY_RULE_SETUP
-#line 175 "icallexer.l"
+#line 180 "icallexer.l"
{ return YEARLY; }
YY_BREAK
case 44:
YY_RULE_SETUP
-#line 176 "icallexer.l"
+#line 181 "icallexer.l"
{ return WKST; }
YY_BREAK
case 45:
YY_RULE_SETUP
-#line 177 "icallexer.l"
+#line 182 "icallexer.l"
{ return MO; }
YY_BREAK
case 46:
YY_RULE_SETUP
-#line 178 "icallexer.l"
+#line 183 "icallexer.l"
{ return SA; }
YY_BREAK
case 47:
YY_RULE_SETUP
-#line 179 "icallexer.l"
+#line 184 "icallexer.l"
{ return SU; }
YY_BREAK
case 48:
YY_RULE_SETUP
-#line 180 "icallexer.l"
+#line 185 "icallexer.l"
{ return TU; }
YY_BREAK
case 49:
YY_RULE_SETUP
-#line 181 "icallexer.l"
+#line 186 "icallexer.l"
{ return WE; }
YY_BREAK
case 50:
YY_RULE_SETUP
-#line 182 "icallexer.l"
+#line 187 "icallexer.l"
{ return TH; }
YY_BREAK
case 51:
YY_RULE_SETUP
-#line 183 "icallexer.l"
+#line 188 "icallexer.l"
{ return FR; }
YY_BREAK
case 52:
YY_RULE_SETUP
-#line 184 "icallexer.l"
+#line 189 "icallexer.l"
{ return EQUALS; }
YY_BREAK
case 53:
YY_RULE_SETUP
-#line 185 "icallexer.l"
+#line 190 "icallexer.l"
{ return COMMA; }
YY_BREAK
case 54:
YY_RULE_SETUP
-#line 186 "icallexer.l"
+#line 191 "icallexer.l"
{ return SEMICOLON; }
YY_BREAK
case 55:
YY_RULE_SETUP
-#line 187 "icallexer.l"
-{ yylval.v_string= icalmemory_tmp_copy(yytext);
- return DIGITS; }
+#line 192 "icallexer.l"
+{ return MINUS; }
YY_BREAK
case 56:
YY_RULE_SETUP
-#line 189 "icallexer.l"
-{ return TIME_CHAR; }
+#line 193 "icallexer.l"
+{ ical_yylval.v_string= icalmemory_tmp_copy(yytext);
+ return DIGITS; }
YY_BREAK
case 57:
YY_RULE_SETUP
-#line 190 "icallexer.l"
-{ return UTC_CHAR; }
+#line 195 "icallexer.l"
+{ return TIME_CHAR; }
YY_BREAK
case 58:
YY_RULE_SETUP
-#line 191 "icallexer.l"
+#line 196 "icallexer.l"
+{ return UTC_CHAR; }
+ YY_BREAK
+case 59:
+YY_RULE_SETUP
+#line 197 "icallexer.l"
{ return EOL;}
YY_BREAK
-case 59:
+case 60:
YY_RULE_SETUP
-#line 195 "icallexer.l"
+#line 201 "icallexer.l"
{ return EOL;}
YY_BREAK
-case 60:
+case 61:
YY_RULE_SETUP
-#line 196 "icallexer.l"
+#line 202 "icallexer.l"
{ return yytext[0]; }
YY_BREAK
-case 61:
+case 62:
YY_RULE_SETUP
-#line 197 "icallexer.l"
-{ yylval.v_int=atoi(yytext); return INTNUMBER; }
+#line 203 "icallexer.l"
+{ ical_yylval.v_int=atoi(yytext); return INTNUMBER; }
YY_BREAK
-case 62:
+case 63:
YY_RULE_SETUP
-#line 202 "icallexer.l"
+#line 208 "icallexer.l"
{ return CHARACTER; }
YY_BREAK
-case 63:
+case 64:
YY_RULE_SETUP
-#line 203 "icallexer.l"
+#line 209 "icallexer.l"
{ return EOL;}
YY_BREAK
-case 64:
+case 65:
YY_RULE_SETUP
-#line 208 "icallexer.l"
+#line 214 "icallexer.l"
{ BEGIN(last_state); return COMMA; }
YY_BREAK
-case 65:
+case 66:
YY_RULE_SETUP
-#line 212 "icallexer.l"
+#line 218 "icallexer.l"
ECHO;
YY_BREAK
-#line 1198 "lex.yy.c"
+#line 1225 "lex.ical_yy.c"
case YY_STATE_EOF(INITIAL):
case YY_STATE_EOF(quoted_string):
case YY_STATE_EOF(binary_value):
@@ -1506,7 +1534,7 @@ static yy_state_type yy_get_previous_state()
while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
{
yy_current_state = (int) yy_def[yy_current_state];
- if ( yy_current_state >= 231 )
+ if ( yy_current_state >= 232 )
yy_c = yy_meta[(unsigned int) yy_c];
}
yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
@@ -1541,11 +1569,11 @@ yy_state_type yy_current_state;
while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
{
yy_current_state = (int) yy_def[yy_current_state];
- if ( yy_current_state >= 231 )
+ if ( yy_current_state >= 232 )
yy_c = yy_meta[(unsigned int) yy_c];
}
yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
- yy_is_jam = (yy_current_state == 230);
+ yy_is_jam = (yy_current_state == 231);
return yy_is_jam ? 0 : yy_current_state;
}
@@ -2100,7 +2128,7 @@ int main()
return 0;
}
#endif
-#line 212 "icallexer.l"
+#line 218 "icallexer.l"
int yywrap()
@@ -2167,7 +2195,7 @@ void set_parser_value_state(icalvalue_kind kind)
}
}
-void init_str_buf()
+void init_str_buf(void)
{
str_buf = icalmemory_tmp_buffer(ICAL_MAX_STR_CONST);
str_buf_p = str_buf;
diff --git a/libical/src/libical/icallexer.l b/libical/src/libical/icallexer.l
index a59716d67c..50fce37caa 100644
--- a/libical/src/libical/icallexer.l
+++ b/libical/src/libical/icallexer.l
@@ -6,7 +6,7 @@
DESCRIPTION:
- $Id: icallexer.l,v 1.1.1.1 2000/05/15 04:24:50 ericb Exp $
+ $Id: icallexer.l,v 1.1.1.2 2000/12/11 22:05:20 federico Exp $
$Locker: $
(C) COPYRIGHT 1999 Eric Busboom
@@ -28,16 +28,16 @@
======================================================================*/
-#include "icalyacc.h"
#include "icalparser.h"
#include "icalenums.h"
#include "icalmemory.h"
#include "assert.h"
+#include "icalyacc.h"
#include <string.h> /* For strdup() */
int icalparser_flex_input(char* buf, int max_size);
-void icalparser_clear_flex_input();
+void icalparser_clear_flex_input(void);
#define ICAL_MAX_STR_CONST 1024
@@ -47,15 +47,15 @@ void icalparser_clear_flex_input();
#undef yywrap
#undef YY_FATAL_ERROR
-#define YY_FATAL_ERROR(msg) yyerror(msg)
+#define YY_FATAL_ERROR(msg) ical_yyerror(msg)
icalvalue_kind value_kind=ICAL_NO_VALUE;
-void set_parser_value_state();
+void set_parser_value_state(icalvalue_kind kind);
extern int yydebug;
-void yyerror(char *s);
+void ical_yyerror(char *s);
-void init_str_buf();
+void init_str_buf(void);
int last_state;
@@ -63,6 +63,11 @@ char *str_buf;
char *str_buf_p;
size_t buf_sz; /* = ICAL_MAX_STR_CONST;*/
+/* Define routines that were not propertly defined because of the
+renaming hack applied in icalyacc.y */
+YY_BUFFER_STATE ical_yy_scan_buffer ( char *base, yy_size_t size );
+YY_BUFFER_STATE ical_yy_scan_string ( yyconst char *yy_str );
+YY_BUFFER_STATE ical_yy_scan_bytes ( yyconst char *bytes, int len );
%}
@@ -96,7 +101,7 @@ digit [0-9]
<binary_value>{
-.* { yylval.v_string= icalmemory_tmp_copy(yytext);
+.* { ical_yylval.v_string= icalmemory_tmp_copy(yytext);
return STRING;}
{crlf} { return EOL;}
@@ -109,7 +114,7 @@ digit [0-9]
}
<uri_value>{
-.* { yylval.v_string= icalmemory_tmp_copy(yytext);
+.* { ical_yylval.v_string= icalmemory_tmp_copy(yytext);
return STRING;}
{crlf} { return EOL;}
@@ -117,7 +122,7 @@ digit [0-9]
<time_value>{
-{digit}* { yylval.v_string= icalmemory_tmp_copy(yytext);
+{digit}* { ical_yylval.v_string= icalmemory_tmp_copy(yytext);
return DIGITS; }
T { return TIME_CHAR; }
Z { return UTC_CHAR; }
@@ -127,7 +132,7 @@ Z { return UTC_CHAR; }
}
<duration_value>{
-{digit}+ { yylval.v_string =icalmemory_tmp_copy(yytext);
+{digit}+ { ical_yylval.v_string =icalmemory_tmp_copy(yytext);
return DIGITS; }
T { return TIME_CHAR; }
[\+\-PTWHMSD] { return yytext[0]; }
@@ -136,14 +141,14 @@ T { return TIME_CHAR; }
}
<number_value>{
-[\+\-\.0-9]+ { yylval.v_int=atoi(yytext); return INTNUMBER; }
+[\+\-\.0-9]+ { ical_yylval.v_int=atoi(yytext); return INTNUMBER; }
{crlf} { return EOL;}
. { return CHARACTER; }
}
<period_value>{
-{digit}+ { yylval.v_string =icalmemory_tmp_copy(yytext) ;
+{digit}+ { ical_yylval.v_string =icalmemory_tmp_copy(yytext) ;
return DIGITS; }
T { return TIME_CHAR; }
Z { return UTC_CHAR; }
@@ -184,7 +189,8 @@ FR { return FR; }
= { return EQUALS; }
, { return COMMA; }
; { return SEMICOLON; }
-[\-\+0-9]+ { yylval.v_string= icalmemory_tmp_copy(yytext);
+- { return MINUS; }
+[\+0-9]+ { ical_yylval.v_string= icalmemory_tmp_copy(yytext);
return DIGITS; }
T { return TIME_CHAR; }
Z { return UTC_CHAR; }
@@ -194,7 +200,7 @@ Z { return UTC_CHAR; }
<utcoffset_value>{
{crlf} { return EOL;}
\-|\+ { return yytext[0]; }
-{digit}{digit} { yylval.v_int=atoi(yytext); return INTNUMBER; }
+{digit}{digit} { ical_yylval.v_int=atoi(yytext); return INTNUMBER; }
}
@@ -275,7 +281,7 @@ void set_parser_value_state(icalvalue_kind kind)
}
}
-void init_str_buf()
+void init_str_buf(void)
{
str_buf = icalmemory_tmp_buffer(ICAL_MAX_STR_CONST);
str_buf_p = str_buf;
diff --git a/libical/src/libical/icalmemory.c b/libical/src/libical/icalmemory.c
index 9b505350f4..297ead8826 100644
--- a/libical/src/libical/icalmemory.c
+++ b/libical/src/libical/icalmemory.c
@@ -30,20 +30,6 @@
The Original Code is icalmemory.h
- This program is free software; you can redistribute it and/or modify
- it under the terms of either:
-
- The LGPL as published by the Free Software Foundation, version
- 2.1, available at: http://www.fsf.org/copyleft/lesser.html
-
- Or:
-
- The Mozilla Public License Version 1.0. You may obtain a copy of
- the License at http://www.mozilla.org/MPL/
-
- The Initial Developer of the Original Code is Eric Busboom
-
- (C) COPYRIGHT 2000, Eric Busboom, http://www.softwarestudio.org
======================================================================*/
/* libical often passes strings back to the caller. To make these
@@ -72,11 +58,14 @@
#include <stdio.h> /* for printf (debugging) */
#include <stdlib.h> /* for malloc, realloc */
-#include <string.h> /* for memset() */
+#include <string.h> /* for memset(), strdup */
#define BUFFER_RING_SIZE 25
#define MIN_BUFFER_SIZE 200
+void icalmemory_free_tmp_buffer (void* buf);
+
+
/* HACK. Not threadsafe */
void* buffer_ring[BUFFER_RING_SIZE];
int buffer_pos = -1;
@@ -154,7 +143,7 @@ void icalmemory_free_ring()
/* Like strdup, but the buffer is on the ring. */
char*
-icalmemory_tmp_copy(char* str)
+icalmemory_tmp_copy(const char* str)
{
char* b = icalmemory_tmp_buffer(strlen(str)+1);
@@ -217,7 +206,7 @@ void icalmemory_free_buffer(void* buf)
void
icalmemory_append_string(char** buf, char** pos, size_t* buf_size,
- char* string)
+ const char* string)
{
char *new_buf;
char *new_pos;
diff --git a/libical/src/libical/icalmemory.h b/libical/src/libical/icalmemory.h
index 6c974cdc95..63ede3f3ac 100644
--- a/libical/src/libical/icalmemory.h
+++ b/libical/src/libical/icalmemory.h
@@ -7,30 +7,6 @@
$Id$
$Locker$
- The contents of this file are subject to the Mozilla Public License
- Version 1.0 (the "License"); you may not use this file except in
- compliance with the License. You may obtain a copy of the License at
- http://www.mozilla.org/MPL/
-
- Software distributed under the License is distributed on an "AS IS"
- basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
- the License for the specific language governing rights and
- limitations under the License.
-
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of either:
-
- The LGPL as published by the Free Software Foundation, version
- 2.1, available at: http://www.fsf.org/copyleft/lesser.html
-
- Or:
-
- The Mozilla Public License Version 1.0. You may obtain a copy of
- the License at http://www.mozilla.org/MPL/
-
- The Original Code is icalmemory.h
-
This program is free software; you can redistribute it and/or modify
it under the terms of either:
@@ -52,18 +28,19 @@
#include <sys/types.h> /* for size_t */
+
/* Tmp buffers are managed by ical. References can be returned to the
caller, although the caller will not own the memory. */
void* icalmemory_tmp_buffer(size_t size);
-char* icalmemory_tmp_copy(char* str);
+char* icalmemory_tmp_copy(const char* str);
/* Add an externally allocated buffer to the ring. */
void icalmemory_add_tmp_buffer(void*);
/* Free all memory used in the ring */
-void icalmemory_free_ring();
+void icalmemory_free_ring(void);
/* Non-tmp buffers must be freed. These are mostly wrappers around
* malloc, etc, but are used so the caller can change the memory
@@ -87,7 +64,7 @@ void icalmemory_free_buffer(void* buf);
have memory problems. */
void icalmemory_append_string(char** buf, char** pos, size_t* buf_size,
- char* string);
+ const char* string);
/* icalmemory_append_char is similar, but is appends a character instead of a string */
void icalmemory_append_char(char** buf, char** pos, size_t* buf_size,
diff --git a/libical/src/libical/icalmime.c b/libical/src/libical/icalmime.c
index a3fb7deaef..1aaf9c9aa9 100644
--- a/libical/src/libical/icalmime.c
+++ b/libical/src/libical/icalmime.c
@@ -27,8 +27,11 @@
======================================================================*/
#include "icalmime.h"
+#include "icalerror.h"
+#include "icalmemory.h"
#include "sspm.h"
#include "stdlib.h"
+#include <string.h> /* For strdup */
#ifdef DMALLOC
#include "dmalloc.h"
@@ -99,6 +102,7 @@ void* icalmime_text_end_part(void* part)
void icalmime_text_free_part(void *part)
{
+ part = part;
}
@@ -111,6 +115,10 @@ void* icalmime_attachment_new_part()
void icalmime_attachment_add_line(void *part, struct sspm_header *header,
char* line, size_t size)
{
+ part = part;
+ header = header;
+ line = line;
+ size = size;
}
void* icalmime_attachment_end_part(void* part)
@@ -129,6 +137,7 @@ struct sspm_action_map icalmime_local_action_map[] =
{
{SSPM_TEXT_MAJOR_TYPE,SSPM_CALENDAR_MINOR_TYPE,icalmime_text_new_part,icalmime_text_add_line,icalmime_textcalendar_end_part,icalmime_text_free_part},
{SSPM_TEXT_MAJOR_TYPE,SSPM_ANY_MINOR_TYPE,icalmime_text_new_part,icalmime_text_add_line,icalmime_text_end_part,icalmime_text_free_part},
+ {SSPM_TEXT_MAJOR_TYPE,SSPM_PLAIN_MINOR_TYPE,icalmime_text_new_part,icalmime_text_add_line,icalmime_text_end_part,icalmime_text_free_part},
{SSPM_APPLICATION_MAJOR_TYPE,SSPM_CALENDAR_MINOR_TYPE,icalmime_attachment_new_part,icalmime_attachment_add_line,icalmime_attachment_end_part,icalmime_attachment_free_part},
{SSPM_IMAGE_MAJOR_TYPE,SSPM_CALENDAR_MINOR_TYPE,icalmime_attachment_new_part,icalmime_attachment_add_line,icalmime_attachment_end_part,icalmime_attachment_free_part},
{SSPM_AUDIO_MAJOR_TYPE,SSPM_CALENDAR_MINOR_TYPE,icalmime_attachment_new_part,icalmime_attachment_add_line,icalmime_attachment_end_part,icalmime_attachment_free_part},
@@ -136,14 +145,22 @@ struct sspm_action_map icalmime_local_action_map[] =
{SSPM_UNKNOWN_MAJOR_TYPE,SSPM_UNKNOWN_MINOR_TYPE,0,0,0,0}
};
+#define NUM_PARTS 100 /* HACK. Hard Limit */
+
+
+
+struct sspm_part* icalmime_make_part(icalcomponent* comp)
+{
+ comp = comp;
+ return 0;
+}
+
+char* icalmime_as_mime_string(char* icalcomponent);
icalcomponent* icalmime_parse(char* (*get_string)(char *s, size_t size,
void *d),
void *data)
{
-
-#define NUM_PARTS 100 /* HACK. Hard Limit */
-
struct sspm_part *parts;
int i, last_level=0;
icalcomponent *root=0, *parent=0, *comp=0, *last = 0;
@@ -179,8 +196,6 @@ icalcomponent* icalmime_parse(char* (*get_string)(char *s, size_t size,
sprintf(mimetype,"%s/%s",major,minor);
- printf("%d: %-10s %p\n",parts[i].level,mimetype,data);
-
comp = icalcomponent_new(ICAL_XLICMIMEPART_COMPONENT);
if(comp == 0){
@@ -205,8 +220,8 @@ icalcomponent* icalmime_parse(char* (*get_string)(char *s, size_t size,
}
if(parts[i].header.error==SSPM_NO_HEADER_ERROR){
- str = "Did not get a header for the part. Is there a blank
-line between the header and the previous boundary?";
+ str = "Did not get a header for the part. Is there a blank\
+line between the header and the previous boundary\?";
}
@@ -226,15 +241,21 @@ line between the header and the previous boundary?";
0));
}
-#if 0
- icalcomponent_add_property(comp,
- icalproperty_new_xlicmimecontenttype((char*)icalmemory_strdup(mimetype)));
+ if(parts[i].header.major != SSPM_NO_MAJOR_TYPE &&
+ parts[i].header.major != SSPM_UNKNOWN_MAJOR_TYPE){
+
+ icalcomponent_add_property(comp,
+ icalproperty_new_xlicmimecontenttype((char*)
+ icalmemory_strdup(mimetype)));
+
+ }
+
+ if (parts[i].header.encoding != SSPM_NO_ENCODING){
- if (parts[i].header.encoding != 0){
icalcomponent_add_property(comp,
- icalproperty_new_xlicmimeencoding(parts[i].header.encoding));
+ icalproperty_new_xlicmimeencoding(
+ sspm_encoding_string(parts[i].header.encoding)));
}
-#endif
if (parts[i].header.filename != 0){
icalcomponent_add_property(comp,
@@ -323,3 +344,42 @@ line between the header and the previous boundary?";
+int icalmime_test(char* (*get_string)(char *s, size_t size, void *d),
+ void *data)
+{
+ char *out;
+ struct sspm_part *parts;
+ int i;
+
+ if ( (parts = (struct sspm_part *)
+ malloc(NUM_PARTS*sizeof(struct sspm_part)))==0) {
+ icalerror_set_errno(ICAL_NEWFAILED_ERROR);
+ return 0;
+ }
+
+ memset(parts,0,sizeof(parts));
+
+ sspm_parse_mime(parts,
+ NUM_PARTS, /* Max parts */
+ icalmime_local_action_map, /* Actions */
+ get_string,
+ data, /* data for get_string*/
+ 0 /* First header */);
+
+ for(i = 0; i <NUM_PARTS && parts[i].header.major != SSPM_NO_MAJOR_TYPE ;
+ i++){
+ if(parts[i].header.minor == SSPM_CALENDAR_MINOR_TYPE){
+ parts[i].data = strdup(
+ icalcomponent_as_ical_string((icalcomponent*)parts[i].data));
+ }
+ }
+
+ sspm_write_mime(parts,NUM_PARTS,&out,"To: bob@bob.org");
+
+ printf("%s\n",out);
+
+ return 0;
+
+}
+
+
diff --git a/libical/src/libical/icalmime.h b/libical/src/libical/icalmime.h
index d301debf7b..b22288842d 100644
--- a/libical/src/libical/icalmime.h
+++ b/libical/src/libical/icalmime.h
@@ -1,4 +1,4 @@
-// -*- Mode: C -*-
+/* -*- Mode: C -*- */
/*======================================================================
FILE: icalmime.h
CREATOR: eric 26 July 2000
@@ -20,21 +20,23 @@
The Mozilla Public License Version 1.0. You may obtain a copy of
the License at http://www.mozilla.org/MPL/
- The Original Code is eric. The Initial Developer of the Original
- Code is Eric Busboom
-
-
======================================================================*/
#ifndef ICALMIME_H
#define ICALMIME_H
-#include "ical.h"
+#include "icalcomponent.h"
+#include "icalparser.h"
icalcomponent* icalmime_parse( char* (*line_gen_func)(char *s, size_t size,
void *d),
void *data);
+/* The inverse of icalmime_parse, not implemented yet. Use sspm.h directly. */
+char* icalmime_as_mime_string(char* component);
+
+
+
#endif /* !ICALMIME_H */
diff --git a/libical/src/libical/icalparameter.c b/libical/src/libical/icalparameter.c
index d806f37342..abb6b53987 100644
--- a/libical/src/libical/icalparameter.c
+++ b/libical/src/libical/icalparameter.c
@@ -26,42 +26,47 @@
Graham Davison (g.m.davison@computer.org)
======================================================================*/
-
+#line 29 "icalparameter.c.in"
#ifdef HAVE_CONFIG_H
-#include "config.h"
+#include <config.h>
#endif
-#include "ical.h"
+
+#include "icalparameter.h"
+#include "icalproperty.h"
#include "icalerror.h"
+#include "icalmemory.h"
+
#include <stdlib.h> /* for malloc() */
#include <errno.h>
#include <string.h> /* for memset() */
-#include "icalmemory.h"
+
+union icalparameter_impl_data {
+ int v_int;
+ int v_rsvp;
+ icalparameter_cutype v_cutype;
+ icalparameter_encoding v_encoding;
+ icalparameter_fbtype v_fbtype;
+ icalparameter_partstat v_partstat;
+ icalparameter_range v_range;
+ icalparameter_related v_related;
+ icalparameter_reltype v_reltype;
+ icalparameter_role v_role;
+ icalparameter_value v_value;
+ icalparameter_xlicerrortype v_xlicerrortype;
+ icalparameter_xliccomparetype v_xliccomparetype;
+} data;
struct icalparameter_impl
{
icalparameter_kind kind;
char id[5];
int size;
- char* string;
- char* x_name;
+ const char* string;
+ const char* x_name;
icalproperty* parent;
- union data {
- int v_int;
- int v_rsvp;
- icalparameter_cutype v_cutype;
- icalparameter_encoding v_encoding;
- icalparameter_fbtype v_fbtype;
- icalparameter_partstat v_partstat;
- icalparameter_range v_range;
- icalparameter_related v_related;
- icalparameter_reltype v_reltype;
- icalparameter_role v_role;
- icalparameter_value v_value;
- icalparameter_xlicerrortype v_xlicerrortype;
- icalparameter_xliccomparetype v_xliccomparetype;
- } data;
+ union icalparameter_impl_data data;
};
struct icalparameter_impl* icalparameter_new_impl(icalparameter_kind kind)
@@ -131,12 +136,13 @@ icalparameter_new_clone(icalparameter* param)
return new;
}
-#if 0
-
+#if 1
+/* The following code is meant to replace most of the case-switch
+ statements, but it is still a work in progress */
struct param_string_map {
icalparameter_kind kind;
int val; /* Actually, union of several types of enums */
- char* str;
+ const char* str;
} param_string_map[] =
{
{ICAL_CUTYPE_PARAMETER,ICAL_CUTYPE_INDIVIDUAL,"INDIVIDUAL"},
@@ -163,6 +169,9 @@ struct param_string_map {
{ICAL_RELTYPE_PARAMETER,ICAL_RELTYPE_CHILD,"CHILD"},
{ICAL_RELTYPE_PARAMETER,ICAL_RELTYPE_SIBLING,"SIBLING"},
{ICAL_ROLE_PARAMETER,ICAL_ROLE_CHAIR,"CHAIR"},
+ {ICAL_ROLE_PARAMETER,ICAL_ROLE_REQPARTICIPANT,"REQ-PARTICIPANT"},
+ {ICAL_ROLE_PARAMETER,ICAL_ROLE_OPTPARTICIPANT,"OPT-PARTICIPANT"},
+ {ICAL_ROLE_PARAMETER,ICAL_ROLE_NONPARTICIPANT,"NON-PARTICIPANT"},
{ICAL_RSVP_PARAMETER,ICAL_RSVP_PARAMETER,"TRUE"},
{ICAL_RSVP_PARAMETER,ICAL_RSVP_PARAMETER,"FALSE"},
{ICAL_VALUE_PARAMETER,ICAL_VALUE_BINARY,"BINARY"},
@@ -196,8 +205,39 @@ struct param_string_map {
};
+void icalparameter_set_impl_data(icalparameter_kind kind,
+ union icalparameter_impl_data *data,
+ int value)
+{
-icalparameter* icalparameter_new_from_string(icalparameter_kind kind, char* val)
+ switch (kind){
+ case ICAL_CUTYPE_PARAMETER:
+ data->v_cutype=value; break;
+ case ICAL_FBTYPE_PARAMETER:
+ data->v_fbtype=value; break;
+ case ICAL_PARTSTAT_PARAMETER:
+ data->v_partstat=value; break;
+ case ICAL_RANGE_PARAMETER:
+ data->v_range=value; break;
+ case ICAL_RELATED_PARAMETER:
+ data->v_related=value; break;
+ case ICAL_RELTYPE_PARAMETER:
+ data->v_reltype=value; break;
+ case ICAL_ROLE_PARAMETER:
+ data->v_role=value; break;
+ case ICAL_RSVP_PARAMETER:
+ data->v_rsvp=value; break;
+ case ICAL_VALUE_PARAMETER:
+ data->v_value=value; break;
+ case ICAL_XLICERRORTYPE_PARAMETER:
+ data->v_xlicerrortype=value; break;
+ case ICAL_XLICCOMPARETYPE_PARAMETER:
+ data->v_xliccomparetype=value; break;
+ default:
+ }
+}
+
+icalparameter* icalparameter_new_from_string_test(icalparameter_kind kind, char* val)
{
int i =0;
icalparameter* param=0;
@@ -205,6 +245,8 @@ icalparameter* icalparameter_new_from_string(icalparameter_kind kind, char* val)
icalerror_check_arg_rz((val!=0),"val");
switch(kind){
+
+ /* These are all string values parameters */
case ICAL_SENTBY_PARAMETER:
case ICAL_TZID_PARAMETER:
case ICAL_X_PARAMETER:
@@ -217,9 +259,15 @@ icalparameter* icalparameter_new_from_string(icalparameter_kind kind, char* val)
case ICAL_ALTREP_PARAMETER:
case ICAL_CN_PARAMETER:
{
- if (impl->string == 0){ return no_parameter;}
- strcpy(tend,impl->string);break;
- break;
+ struct icalparameter_impl *impl = icalparameter_new_impl(kind);
+ if (impl == 0) {
+ return 0;
+ }
+ ((struct icalparameter_impl*)param)->string =
+ icalmemory_strdup(val);
+
+ return (icalparameter*) impl;
+
}
case ICAL_NO_PARAMETER:
@@ -228,18 +276,41 @@ icalparameter* icalparameter_new_from_string(icalparameter_kind kind, char* val)
}
default: {
+ int found = 0;
/* All other types are enumerated */
- for(i = 0; param_string_map[i].kind != ICAL_NO_PARAMETER){
+ for(i = 0; param_string_map[i].kind != ICAL_NO_PARAMETER; i++){
+
if(kind == param_string_map[i].kind &&
- strcmp(val,param_string_map[i].str) == 0){
-
-
- }
+ strcmp(val,param_string_map[i].str) == 0){
+
+ struct icalparameter_impl *impl =
+ icalparameter_new_impl(kind);
+ found = 1;
+
+ icalparameter_set_impl_data(kind,&impl->data,
+ param_string_map[i].val);
+
+ return (icalparameter*)impl;
+ }
}
+
+ /* Didn't find the standard enumerated type, so it must be
+ an X parameter */
+ if (found ==0) {
+ icalparameter *param = icalparameter_new(kind);
+
+ icalparameter_set_xvalue(param,val);
+
+ return param;
+
+ }
}
+ }
+
+ return 0;
}
-
-#endif
+
+#endif
icalparameter* icalparameter_new_from_string(icalparameter_kind kind, char* val)
@@ -616,11 +687,11 @@ icalparameter_free (icalparameter* parameter)
if (impl->string != 0){
- free (impl->string);
+ free ((void*)impl->string);
}
if (impl->x_name != 0){
- free (impl->x_name);
+ free ((void*)impl->x_name);
}
memset(impl,0,sizeof(impl));
@@ -640,7 +711,7 @@ icalparameter_as_ical_string (icalparameter* parameter)
char* buf;
char* buf_ptr;
char *out_buf;
- char *kind_string;
+ const char *kind_string;
char tend[1024]; /* HACK . Should be using memory buffer ring */
@@ -1082,14 +1153,14 @@ icalparameter_isa_parameter (void* parameter)
void
-icalparameter_set_xname (icalparameter* param, char* v)
+icalparameter_set_xname (icalparameter* param, const char* v)
{
struct icalparameter_impl *impl = (struct icalparameter_impl*)param;
icalerror_check_arg_rv( (param!=0),"param");
icalerror_check_arg_rv( (v!=0),"v");
if (impl->x_name != 0){
- free(impl->x_name);
+ free((void*)impl->x_name);
}
impl->x_name = icalmemory_strdup(v);
@@ -1100,7 +1171,7 @@ icalparameter_set_xname (icalparameter* param, char* v)
}
-char*
+const char*
icalparameter_get_xname (icalparameter* param)
{
struct icalparameter_impl *impl = (struct icalparameter_impl*)param;
@@ -1110,7 +1181,7 @@ icalparameter_get_xname (icalparameter* param)
}
void
-icalparameter_set_xvalue (icalparameter* param, char* v)
+icalparameter_set_xvalue (icalparameter* param, const char* v)
{
struct icalparameter_impl *impl = (struct icalparameter_impl*)param;
@@ -1118,7 +1189,7 @@ icalparameter_set_xvalue (icalparameter* param, char* v)
icalerror_check_arg_rv( (v!=0),"v");
if (impl->string != 0){
- free(impl->string);
+ free((void*)impl->string);
}
impl->string = icalmemory_strdup(v);
@@ -1129,7 +1200,7 @@ icalparameter_set_xvalue (icalparameter* param, char* v)
}
-char*
+const char*
icalparameter_get_xvalue (icalparameter* param)
{
struct icalparameter_impl *impl = (struct icalparameter_impl*)param;
@@ -1162,7 +1233,7 @@ icalproperty* icalparameter_get_parent(icalparameter* param)
/* Everything below this line is machine generated. Do not edit. */
/* ALTREP */
-icalparameter* icalparameter_new_altrep(char* v)
+icalparameter* icalparameter_new_altrep(const char* v)
{
struct icalparameter_impl *impl;
icalerror_clear_errno();
@@ -1181,24 +1252,24 @@ icalparameter* icalparameter_new_altrep(char* v)
return (icalparameter*) impl;
}
-char* icalparameter_get_altrep(icalparameter* param)
+const char* icalparameter_get_altrep(icalparameter* param)
{
icalerror_clear_errno();
icalerror_check_arg_rz( (param!=0), "param");
return ((struct icalparameter_impl*)param)->string;
}
-void icalparameter_set_altrep(icalparameter* param, char* v)
+void icalparameter_set_altrep(icalparameter* param, const char* v)
{
icalerror_check_arg_rv( (v!=0),"v");
icalerror_check_arg_rv( (param!=0), "param");
icalerror_clear_errno();
- ((struct icalparameter_impl*)param)->string = icalmemory_strdup(v);
+ ((struct icalparameter_impl*)param)->string = strdup(v);
}
/* CN */
-icalparameter* icalparameter_new_cn(char* v)
+icalparameter* icalparameter_new_cn(const char* v)
{
struct icalparameter_impl *impl;
icalerror_clear_errno();
@@ -1217,20 +1288,20 @@ icalparameter* icalparameter_new_cn(char* v)
return (icalparameter*) impl;
}
-char* icalparameter_get_cn(icalparameter* param)
+const char* icalparameter_get_cn(icalparameter* param)
{
icalerror_clear_errno();
icalerror_check_arg_rz( (param!=0), "param");
return ((struct icalparameter_impl*)param)->string;
}
-void icalparameter_set_cn(icalparameter* param, char* v)
+void icalparameter_set_cn(icalparameter* param, const char* v)
{
icalerror_check_arg_rv( (v!=0),"v");
icalerror_check_arg_rv( (param!=0), "param");
icalerror_clear_errno();
- ((struct icalparameter_impl*)param)->string = icalmemory_strdup(v);
+ ((struct icalparameter_impl*)param)->string = strdup(v);
}
/* CUTYPE */
@@ -1275,7 +1346,7 @@ void icalparameter_set_cutype(icalparameter* param, icalparameter_cutype v)
}
/* DELEGATED-FROM */
-icalparameter* icalparameter_new_delegatedfrom(char* v)
+icalparameter* icalparameter_new_delegatedfrom(const char* v)
{
struct icalparameter_impl *impl;
icalerror_clear_errno();
@@ -1294,24 +1365,24 @@ icalparameter* icalparameter_new_delegatedfrom(char* v)
return (icalparameter*) impl;
}
-char* icalparameter_get_delegatedfrom(icalparameter* param)
+const char* icalparameter_get_delegatedfrom(icalparameter* param)
{
icalerror_clear_errno();
icalerror_check_arg_rz( (param!=0), "param");
return ((struct icalparameter_impl*)param)->string;
}
-void icalparameter_set_delegatedfrom(icalparameter* param, char* v)
+void icalparameter_set_delegatedfrom(icalparameter* param, const char* v)
{
icalerror_check_arg_rv( (v!=0),"v");
icalerror_check_arg_rv( (param!=0), "param");
icalerror_clear_errno();
- ((struct icalparameter_impl*)param)->string = icalmemory_strdup(v);
+ ((struct icalparameter_impl*)param)->string = strdup(v);
}
/* DELEGATED-TO */
-icalparameter* icalparameter_new_delegatedto(char* v)
+icalparameter* icalparameter_new_delegatedto(const char* v)
{
struct icalparameter_impl *impl;
icalerror_clear_errno();
@@ -1330,24 +1401,24 @@ icalparameter* icalparameter_new_delegatedto(char* v)
return (icalparameter*) impl;
}
-char* icalparameter_get_delegatedto(icalparameter* param)
+const char* icalparameter_get_delegatedto(icalparameter* param)
{
icalerror_clear_errno();
icalerror_check_arg_rz( (param!=0), "param");
return ((struct icalparameter_impl*)param)->string;
}
-void icalparameter_set_delegatedto(icalparameter* param, char* v)
+void icalparameter_set_delegatedto(icalparameter* param, const char* v)
{
icalerror_check_arg_rv( (v!=0),"v");
icalerror_check_arg_rv( (param!=0), "param");
icalerror_clear_errno();
- ((struct icalparameter_impl*)param)->string = icalmemory_strdup(v);
+ ((struct icalparameter_impl*)param)->string = strdup(v);
}
/* DIR */
-icalparameter* icalparameter_new_dir(char* v)
+icalparameter* icalparameter_new_dir(const char* v)
{
struct icalparameter_impl *impl;
icalerror_clear_errno();
@@ -1366,20 +1437,20 @@ icalparameter* icalparameter_new_dir(char* v)
return (icalparameter*) impl;
}
-char* icalparameter_get_dir(icalparameter* param)
+const char* icalparameter_get_dir(icalparameter* param)
{
icalerror_clear_errno();
icalerror_check_arg_rz( (param!=0), "param");
return ((struct icalparameter_impl*)param)->string;
}
-void icalparameter_set_dir(icalparameter* param, char* v)
+void icalparameter_set_dir(icalparameter* param, const char* v)
{
icalerror_check_arg_rv( (v!=0),"v");
icalerror_check_arg_rv( (param!=0), "param");
icalerror_clear_errno();
- ((struct icalparameter_impl*)param)->string = icalmemory_strdup(v);
+ ((struct icalparameter_impl*)param)->string = strdup(v);
}
/* ENCODING */
@@ -1465,7 +1536,7 @@ void icalparameter_set_fbtype(icalparameter* param, icalparameter_fbtype v)
}
/* FMTTYPE */
-icalparameter* icalparameter_new_fmttype(char* v)
+icalparameter* icalparameter_new_fmttype(const char* v)
{
struct icalparameter_impl *impl;
icalerror_clear_errno();
@@ -1484,24 +1555,24 @@ icalparameter* icalparameter_new_fmttype(char* v)
return (icalparameter*) impl;
}
-char* icalparameter_get_fmttype(icalparameter* param)
+const char* icalparameter_get_fmttype(icalparameter* param)
{
icalerror_clear_errno();
icalerror_check_arg_rz( (param!=0), "param");
return ((struct icalparameter_impl*)param)->string;
}
-void icalparameter_set_fmttype(icalparameter* param, char* v)
+void icalparameter_set_fmttype(icalparameter* param, const char* v)
{
icalerror_check_arg_rv( (v!=0),"v");
icalerror_check_arg_rv( (param!=0), "param");
icalerror_clear_errno();
- ((struct icalparameter_impl*)param)->string = icalmemory_strdup(v);
+ ((struct icalparameter_impl*)param)->string = strdup(v);
}
/* LANGUAGE */
-icalparameter* icalparameter_new_language(char* v)
+icalparameter* icalparameter_new_language(const char* v)
{
struct icalparameter_impl *impl;
icalerror_clear_errno();
@@ -1520,24 +1591,24 @@ icalparameter* icalparameter_new_language(char* v)
return (icalparameter*) impl;
}
-char* icalparameter_get_language(icalparameter* param)
+const char* icalparameter_get_language(icalparameter* param)
{
icalerror_clear_errno();
icalerror_check_arg_rz( (param!=0), "param");
return ((struct icalparameter_impl*)param)->string;
}
-void icalparameter_set_language(icalparameter* param, char* v)
+void icalparameter_set_language(icalparameter* param, const char* v)
{
icalerror_check_arg_rv( (v!=0),"v");
icalerror_check_arg_rv( (param!=0), "param");
icalerror_clear_errno();
- ((struct icalparameter_impl*)param)->string = icalmemory_strdup(v);
+ ((struct icalparameter_impl*)param)->string = strdup(v);
}
/* MEMBER */
-icalparameter* icalparameter_new_member(char* v)
+icalparameter* icalparameter_new_member(const char* v)
{
struct icalparameter_impl *impl;
icalerror_clear_errno();
@@ -1556,20 +1627,20 @@ icalparameter* icalparameter_new_member(char* v)
return (icalparameter*) impl;
}
-char* icalparameter_get_member(icalparameter* param)
+const char* icalparameter_get_member(icalparameter* param)
{
icalerror_clear_errno();
icalerror_check_arg_rz( (param!=0), "param");
return ((struct icalparameter_impl*)param)->string;
}
-void icalparameter_set_member(icalparameter* param, char* v)
+void icalparameter_set_member(icalparameter* param, const char* v)
{
icalerror_check_arg_rv( (v!=0),"v");
icalerror_check_arg_rv( (param!=0), "param");
icalerror_clear_errno();
- ((struct icalparameter_impl*)param)->string = icalmemory_strdup(v);
+ ((struct icalparameter_impl*)param)->string = strdup(v);
}
/* PARTSTAT */
@@ -1810,7 +1881,7 @@ void icalparameter_set_rsvp(icalparameter* param, int v)
}
/* SENT-BY */
-icalparameter* icalparameter_new_sentby(char* v)
+icalparameter* icalparameter_new_sentby(const char* v)
{
struct icalparameter_impl *impl;
icalerror_clear_errno();
@@ -1829,24 +1900,24 @@ icalparameter* icalparameter_new_sentby(char* v)
return (icalparameter*) impl;
}
-char* icalparameter_get_sentby(icalparameter* param)
+const char* icalparameter_get_sentby(icalparameter* param)
{
icalerror_clear_errno();
icalerror_check_arg_rz( (param!=0), "param");
return ((struct icalparameter_impl*)param)->string;
}
-void icalparameter_set_sentby(icalparameter* param, char* v)
+void icalparameter_set_sentby(icalparameter* param, const char* v)
{
icalerror_check_arg_rv( (v!=0),"v");
icalerror_check_arg_rv( (param!=0), "param");
icalerror_clear_errno();
- ((struct icalparameter_impl*)param)->string = icalmemory_strdup(v);
+ ((struct icalparameter_impl*)param)->string = strdup(v);
}
/* TZID */
-icalparameter* icalparameter_new_tzid(char* v)
+icalparameter* icalparameter_new_tzid(const char* v)
{
struct icalparameter_impl *impl;
icalerror_clear_errno();
@@ -1865,20 +1936,20 @@ icalparameter* icalparameter_new_tzid(char* v)
return (icalparameter*) impl;
}
-char* icalparameter_get_tzid(icalparameter* param)
+const char* icalparameter_get_tzid(icalparameter* param)
{
icalerror_clear_errno();
icalerror_check_arg_rz( (param!=0), "param");
return ((struct icalparameter_impl*)param)->string;
}
-void icalparameter_set_tzid(icalparameter* param, char* v)
+void icalparameter_set_tzid(icalparameter* param, const char* v)
{
icalerror_check_arg_rv( (v!=0),"v");
icalerror_check_arg_rv( (param!=0), "param");
icalerror_clear_errno();
- ((struct icalparameter_impl*)param)->string = icalmemory_strdup(v);
+ ((struct icalparameter_impl*)param)->string = strdup(v);
}
/* VALUE */
@@ -1923,7 +1994,7 @@ void icalparameter_set_value(icalparameter* param, icalparameter_value v)
}
/* X */
-icalparameter* icalparameter_new_x(char* v)
+icalparameter* icalparameter_new_x(const char* v)
{
struct icalparameter_impl *impl;
icalerror_clear_errno();
@@ -1942,20 +2013,20 @@ icalparameter* icalparameter_new_x(char* v)
return (icalparameter*) impl;
}
-char* icalparameter_get_x(icalparameter* param)
+const char* icalparameter_get_x(icalparameter* param)
{
icalerror_clear_errno();
icalerror_check_arg_rz( (param!=0), "param");
return ((struct icalparameter_impl*)param)->string;
}
-void icalparameter_set_x(icalparameter* param, char* v)
+void icalparameter_set_x(icalparameter* param, const char* v)
{
icalerror_check_arg_rv( (v!=0),"v");
icalerror_check_arg_rv( (param!=0), "param");
icalerror_clear_errno();
- ((struct icalparameter_impl*)param)->string = icalmemory_strdup(v);
+ ((struct icalparameter_impl*)param)->string = strdup(v);
}
/* X-LIC-ERRORTYPE */
diff --git a/libical/src/libical/icalparameter.h b/libical/src/libical/icalparameter.h
index ad97f34e58..2666e1a126 100644
--- a/libical/src/libical/icalparameter.h
+++ b/libical/src/libical/icalparameter.h
@@ -29,7 +29,7 @@
#ifndef ICALPARAM_H
#define ICALPARAM_H
-#include "icalenums.h" /* defined icalparameter_kind and other enums */
+#include "icalenums.h"
typedef void icalparameter;
@@ -48,22 +48,22 @@ icalparameter_kind icalparameter_isa(icalparameter* parameter);
int icalparameter_isa_parameter(void* param);
/* Acess the name of an X parameer */
-void icalparameter_set_xname (icalparameter* param, char* v);
-char* icalparameter_get_xname(icalparameter* param);
-void icalparameter_set_xvalue (icalparameter* param, char* v);
-char* icalparameter_get_xvalue(icalparameter* param);
+void icalparameter_set_xname (icalparameter* param, const char* v);
+const char* icalparameter_get_xname(icalparameter* param);
+void icalparameter_set_xvalue (icalparameter* param, const char* v);
+const char* icalparameter_get_xvalue(icalparameter* param);
/* Everything below this line is machine generated. Do not edit. */
/* ALTREP */
-icalparameter* icalparameter_new_altrep(char* v);
-char* icalparameter_get_altrep(icalparameter* value);
-void icalparameter_set_altrep(icalparameter* value, char* v);
+icalparameter* icalparameter_new_altrep(const char* v);
+const char* icalparameter_get_altrep(icalparameter* value);
+void icalparameter_set_altrep(icalparameter* value, const char* v);
/* CN */
-icalparameter* icalparameter_new_cn(char* v);
-char* icalparameter_get_cn(icalparameter* value);
-void icalparameter_set_cn(icalparameter* value, char* v);
+icalparameter* icalparameter_new_cn(const char* v);
+const char* icalparameter_get_cn(icalparameter* value);
+void icalparameter_set_cn(icalparameter* value, const char* v);
/* CUTYPE */
icalparameter* icalparameter_new_cutype(icalparameter_cutype v);
@@ -71,19 +71,19 @@ icalparameter_cutype icalparameter_get_cutype(icalparameter* value);
void icalparameter_set_cutype(icalparameter* value, icalparameter_cutype v);
/* DELEGATED-FROM */
-icalparameter* icalparameter_new_delegatedfrom(char* v);
-char* icalparameter_get_delegatedfrom(icalparameter* value);
-void icalparameter_set_delegatedfrom(icalparameter* value, char* v);
+icalparameter* icalparameter_new_delegatedfrom(const char* v);
+const char* icalparameter_get_delegatedfrom(icalparameter* value);
+void icalparameter_set_delegatedfrom(icalparameter* value, const char* v);
/* DELEGATED-TO */
-icalparameter* icalparameter_new_delegatedto(char* v);
-char* icalparameter_get_delegatedto(icalparameter* value);
-void icalparameter_set_delegatedto(icalparameter* value, char* v);
+icalparameter* icalparameter_new_delegatedto(const char* v);
+const char* icalparameter_get_delegatedto(icalparameter* value);
+void icalparameter_set_delegatedto(icalparameter* value, const char* v);
/* DIR */
-icalparameter* icalparameter_new_dir(char* v);
-char* icalparameter_get_dir(icalparameter* value);
-void icalparameter_set_dir(icalparameter* value, char* v);
+icalparameter* icalparameter_new_dir(const char* v);
+const char* icalparameter_get_dir(icalparameter* value);
+void icalparameter_set_dir(icalparameter* value, const char* v);
/* ENCODING */
icalparameter* icalparameter_new_encoding(icalparameter_encoding v);
@@ -96,19 +96,19 @@ icalparameter_fbtype icalparameter_get_fbtype(icalparameter* value);
void icalparameter_set_fbtype(icalparameter* value, icalparameter_fbtype v);
/* FMTTYPE */
-icalparameter* icalparameter_new_fmttype(char* v);
-char* icalparameter_get_fmttype(icalparameter* value);
-void icalparameter_set_fmttype(icalparameter* value, char* v);
+icalparameter* icalparameter_new_fmttype(const char* v);
+const char* icalparameter_get_fmttype(icalparameter* value);
+void icalparameter_set_fmttype(icalparameter* value, const char* v);
/* LANGUAGE */
-icalparameter* icalparameter_new_language(char* v);
-char* icalparameter_get_language(icalparameter* value);
-void icalparameter_set_language(icalparameter* value, char* v);
+icalparameter* icalparameter_new_language(const char* v);
+const char* icalparameter_get_language(icalparameter* value);
+void icalparameter_set_language(icalparameter* value, const char* v);
/* MEMBER */
-icalparameter* icalparameter_new_member(char* v);
-char* icalparameter_get_member(icalparameter* value);
-void icalparameter_set_member(icalparameter* value, char* v);
+icalparameter* icalparameter_new_member(const char* v);
+const char* icalparameter_get_member(icalparameter* value);
+void icalparameter_set_member(icalparameter* value, const char* v);
/* PARTSTAT */
icalparameter* icalparameter_new_partstat(icalparameter_partstat v);
@@ -141,14 +141,14 @@ int icalparameter_get_rsvp(icalparameter* value);
void icalparameter_set_rsvp(icalparameter* value, int v);
/* SENT-BY */
-icalparameter* icalparameter_new_sentby(char* v);
-char* icalparameter_get_sentby(icalparameter* value);
-void icalparameter_set_sentby(icalparameter* value, char* v);
+icalparameter* icalparameter_new_sentby(const char* v);
+const char* icalparameter_get_sentby(icalparameter* value);
+void icalparameter_set_sentby(icalparameter* value, const char* v);
/* TZID */
-icalparameter* icalparameter_new_tzid(char* v);
-char* icalparameter_get_tzid(icalparameter* value);
-void icalparameter_set_tzid(icalparameter* value, char* v);
+icalparameter* icalparameter_new_tzid(const char* v);
+const char* icalparameter_get_tzid(icalparameter* value);
+void icalparameter_set_tzid(icalparameter* value, const char* v);
/* VALUE */
icalparameter* icalparameter_new_value(icalparameter_value v);
@@ -156,9 +156,9 @@ icalparameter_value icalparameter_get_value(icalparameter* value);
void icalparameter_set_value(icalparameter* value, icalparameter_value v);
/* X */
-icalparameter* icalparameter_new_x(char* v);
-char* icalparameter_get_x(icalparameter* value);
-void icalparameter_set_x(icalparameter* value, char* v);
+icalparameter* icalparameter_new_x(const char* v);
+const char* icalparameter_get_x(icalparameter* value);
+void icalparameter_set_x(icalparameter* value, const char* v);
/* X-LIC-ERRORTYPE */
icalparameter* icalparameter_new_xlicerrortype(icalparameter_xlicerrortype v);
@@ -170,4 +170,4 @@ icalparameter* icalparameter_new_xliccomparetype(icalparameter_xliccomparetype v
icalparameter_xliccomparetype icalparameter_get_xliccomparetype(icalparameter* value);
void icalparameter_set_xliccomparetype(icalparameter* value, icalparameter_xliccomparetype v);
-#endif ICALPARAMETER_H
+#endif /*ICALPARAMETER_H*/
diff --git a/libical/src/libical/icalparser.c b/libical/src/libical/icalparser.c
index e00419034c..e7960eacae 100644
--- a/libical/src/libical/icalparser.c
+++ b/libical/src/libical/icalparser.c
@@ -38,10 +38,15 @@
#endif
-#include "ical.h"
-#include "pvl.h"
#include "icalparser.h"
+#include "pvl.h"
#include "icalmemory.h"
+#include "icalerror.h"
+#include "icalvalue.h"
+#include "icalparameter.h"
+#include "icalproperty.h"
+#include "icalcomponent.h"
+
#include <string.h> /* For strncpy & size_t */
#include <stdio.h> /* For FILE and fgets and sprintf */
#include <stdlib.h> /* for free */
@@ -49,7 +54,7 @@
extern icalvalue* icalparser_yy_value;
void set_parser_value_state(icalvalue_kind kind);
-int ical_yy_parse(void);
+int ical_yyparse(void);
char* icalparser_get_next_char(char c, char *str);
char* icalparser_get_next_parameter(char* line,char** end);
@@ -77,10 +82,9 @@ struct icalparser_impl
};
-icalparser* icalparser_new()
+icalparser* icalparser_new(void)
{
struct icalparser_impl* impl = 0;
-
if ( ( impl = (struct icalparser_impl*)
malloc(sizeof(struct icalparser_impl))) == 0) {
icalerror_set_errno(ICAL_NEWFAILED_ERROR);
@@ -177,8 +181,8 @@ char* make_segment(char* start, char* end)
}
-char* input_buffer;
-char* input_buffer_p;
+const char* input_buffer;
+const char* input_buffer_p;
#define min(a,b) ((a) < (b) ? (a) : (b))
int icalparser_flex_input(char* buf, int max_size)
@@ -194,7 +198,7 @@ int icalparser_flex_input(char* buf, int max_size)
}
}
-void icalparser_clear_flex_input()
+void icalparser_clear_flex_input(void)
{
input_buffer_p = input_buffer+strlen(input_buffer);
}
@@ -202,7 +206,7 @@ void icalparser_clear_flex_input()
/* Cal the flex parser to parse a complex value */
icalvalue* icalparser_parse_value(icalvalue_kind kind,
- char* str, icalproperty** error)
+ const char* str, icalproperty** error)
{
int r;
input_buffer_p = input_buffer = str;
@@ -210,7 +214,7 @@ icalvalue* icalparser_parse_value(icalvalue_kind kind,
set_parser_value_state(kind);
icalparser_yy_value = 0;
- r = ical_yy_parse();
+ r = ical_yyparse();
/* Error. Parse failed */
if( icalparser_yy_value == 0 || r != 0){
diff --git a/libical/src/libical/icalparser.h b/libical/src/libical/icalparser.h
index 161127379f..673d514f65 100644
--- a/libical/src/libical/icalparser.h
+++ b/libical/src/libical/icalparser.h
@@ -27,7 +27,10 @@
#ifndef ICALPARSER_H
#define ICALPARSER_H
-#include "ical.h"
+#include "icalenums.h"
+#include "icaltypes.h"
+#include"icalcomponent.h"
+
#include <stdio.h> /* For FILE* */
typedef void* icalparser;
@@ -49,7 +52,7 @@ typedef enum icalparser_state {
ICALPARSER_IN_PROGRESS
} icalparser_state;
-icalparser* icalparser_new();
+icalparser* icalparser_new(void);
icalcomponent* icalparser_add_line(icalparser* parser, char* str );
icalcomponent* icalparser_claim(icalparser* parser);
icalcomponent* icalparser_clean(icalparser* parser);
@@ -80,7 +83,8 @@ icalcomponent* icalparser_parse_string(char* str);
***********************************************************************/
/* Use the flex/bison parser to turn a string into a value type */
-icalvalue* icalparser_parse_value(icalvalue_kind kind, char* str, icalcomponent** errors);
+icalvalue* icalparser_parse_value(icalvalue_kind kind,
+ const char* str, icalcomponent** errors);
/* Given a line generator function, return a single iCal content line.*/
char* icalparser_get_line(icalparser* parser, char* (*line_gen_func)(char *s, size_t size, void *d));
diff --git a/libical/src/libical/icalproperty.c b/libical/src/libical/icalproperty.c
index 1040215108..4631ffc3b3 100644
--- a/libical/src/libical/icalproperty.c
+++ b/libical/src/libical/icalproperty.c
@@ -23,24 +23,26 @@
The original code is icalproperty.c
======================================================================*/
+#line 27 "icalproperty.c.in"
#ifdef HAVE_CONFIG_H
-#include "config.h"
+#include <config.h>
#endif
-#include <string.h> /* For icalmemory_strdup, rindex */
-#include <assert.h>
-#include <stdlib.h>
-#include <errno.h>
-#include <stdio.h> /* for printf */
-#include <stdarg.h> /* for va_list, va_start, etc. */
-
-#include "ical.h"
+#include "icalproperty.h"
+#include "icalcomponent.h"
#include "pvl.h"
#include "icalenums.h"
#include "icalerror.h"
#include "icalmemory.h"
+#include <string.h> /* For icalmemory_strdup, rindex */
+#include <assert.h>
+#include <stdlib.h>
+#include <errno.h>
+#include <stdio.h> /* for printf */
+#include <stdarg.h> /* for va_list, va_start, etc. */
+
#define TMP_BUF_SIZE 1024
/* Private routines for icalproperty */
@@ -87,6 +89,7 @@ void icalproperty_add_parameters(struct icalproperty_impl *impl,va_list args)
}
+
struct icalproperty_impl*
icalproperty_new_impl (icalproperty_kind kind)
{
@@ -251,18 +254,14 @@ icalproperty_as_ical_string (icalproperty* prop)
by libical, so it can be given to the caller without fear of
the caller forgetting to free it */
- char* property_name = 0;
+ const char* property_name = 0;
size_t buf_size = 1024;
char* buf = icalmemory_new_buffer(buf_size);
char* buf_ptr = buf;
icalvalue* value;
char *out_buf;
-#ifdef ICAL_UNIX_NEWLINE
char newline[] = "\n";
-#else
- char newline[] = "\r\n";
-#endif
struct icalproperty_impl *impl = (struct icalproperty_impl*)prop;
@@ -315,7 +314,7 @@ icalproperty_as_ical_string (icalproperty* prop)
value = icalproperty_get_value(prop);
if (value != 0){
- char *str = icalvalue_as_ical_string(value);
+ const char *str = icalvalue_as_ical_string(value);
icalerror_assert((str !=0),"Could not get string representation of a value");
icalmemory_append_string(&buf, &buf_ptr, &buf_size, str);
} else {
@@ -378,13 +377,35 @@ icalproperty_add_parameter (icalproperty* prop,icalparameter* parameter)
}
+void
+icalproperty_set_parameter (icalproperty* prop,icalparameter* parameter)
+{
+ icalproperty_kind kind;
+
+ kind = icalparameter_isa(parameter);
+
+ icalproperty_remove_parameter(prop,kind);
+
+ icalproperty_add_parameter(prop,parameter);
+}
+
void
icalproperty_remove_parameter (icalproperty* prop, icalparameter_kind kind)
{
- icalerror_check_arg_rv((prop!=0),"prop");
+ pvl_elem p;
+ struct icalproperty_impl *impl = (struct icalproperty_impl*)prop;
- assert(0); /* This routine is not implemented */
+ icalerror_check_arg_rv((prop!=0),"prop");
+
+ for(p=pvl_head(impl->parameters);p != 0; p = pvl_next(p)){
+ icalparameter* param = (icalparameter *)pvl_data (p);
+ if (icalparameter_isa(param) == kind) {
+ pvl_remove (impl->parameters, p);
+ icalparameter_free (param);
+ break;
+ }
+ }
}
@@ -415,27 +436,45 @@ icalproperty_get_first_parameter (icalproperty* prop, icalparameter_kind kind)
return 0;
}
- return (icalparameter*) pvl_data(p->parameter_iterator);
+ for( p->parameter_iterator = pvl_head(p->parameters);
+ p->parameter_iterator !=0;
+ p->parameter_iterator = pvl_next(p->parameter_iterator)){
+
+ icalparameter *param = (icalparameter*)pvl_data(p->parameter_iterator);
+
+ if(icalparameter_isa(param) == kind || kind == ICAL_ANY_PARAMETER){
+ return param;
+ }
+ }
+
+ return 0;
}
icalparameter*
icalproperty_get_next_parameter (icalproperty* prop, icalparameter_kind kind)
{
- struct icalproperty_impl *p = (struct icalproperty_impl*)prop;
- icalerror_check_arg_rz( (prop!=0),"prop");
-
- if (p->parameter_iterator == 0 ) {
- return 0;
- }
-
- p->parameter_iterator = pvl_next(p->parameter_iterator);
-
- if (p->parameter_iterator == 0 ) {
- return 0;
- }
+ struct icalproperty_impl *p = (struct icalproperty_impl*)prop;
+
+ icalerror_check_arg_rz( (prop!=0),"prop");
+
+ if (p->parameter_iterator == 0) {
+ return 0;
+ }
+
+ for( p->parameter_iterator = pvl_next(p->parameter_iterator);
+ p->parameter_iterator !=0;
+ p->parameter_iterator = pvl_next(p->parameter_iterator)){
+
+ icalparameter *param = (icalparameter*)pvl_data(p->parameter_iterator);
+
+ if(icalparameter_isa(param) == kind || kind == ICAL_ANY_PARAMETER){
+ return param;
+ }
+ }
+
+ return 0;
- return (icalparameter*) pvl_data(p->parameter_iterator);
}
void
@@ -572,7 +611,7 @@ icalproperty_method icalproperty_get_method(icalproperty* prop)
/* X-LIC-MIMECID */
-icalproperty* icalproperty_new_xlicmimecid(char* v)
+icalproperty* icalproperty_new_xlicmimecid(const char* v)
{
struct icalproperty_impl *impl = icalproperty_new_impl(ICAL_XLICMIMECID_PROPERTY);
icalerror_check_arg_rz( (v!=0),"v");
@@ -583,7 +622,7 @@ icalproperty* icalproperty_new_xlicmimecid(char* v)
return (icalproperty*)impl;
}
-icalproperty* icalproperty_vanew_xlicmimecid(char* v, ...)
+icalproperty* icalproperty_vanew_xlicmimecid(const char* v, ...)
{
va_list args;
struct icalproperty_impl *impl = icalproperty_new_impl(ICAL_XLICMIMECID_PROPERTY);
@@ -599,7 +638,7 @@ icalproperty* icalproperty_vanew_xlicmimecid(char* v, ...)
return (icalproperty*)impl;
}
-void icalproperty_set_xlicmimecid(icalproperty* prop, char* v)
+void icalproperty_set_xlicmimecid(icalproperty* prop, const char* v)
{
icalvalue *value;
@@ -613,7 +652,7 @@ void icalproperty_set_xlicmimecid(icalproperty* prop, char* v)
}
-char* icalproperty_get_xlicmimecid(icalproperty* prop)
+const char* icalproperty_get_xlicmimecid(icalproperty* prop)
{
icalvalue *value;
icalerror_check_arg( (prop!=0),"prop");
@@ -675,7 +714,7 @@ struct icaltimetype icalproperty_get_lastmodified(icalproperty* prop)
/* UID */
-icalproperty* icalproperty_new_uid(char* v)
+icalproperty* icalproperty_new_uid(const char* v)
{
struct icalproperty_impl *impl = icalproperty_new_impl(ICAL_UID_PROPERTY);
icalerror_check_arg_rz( (v!=0),"v");
@@ -686,7 +725,7 @@ icalproperty* icalproperty_new_uid(char* v)
return (icalproperty*)impl;
}
-icalproperty* icalproperty_vanew_uid(char* v, ...)
+icalproperty* icalproperty_vanew_uid(const char* v, ...)
{
va_list args;
struct icalproperty_impl *impl = icalproperty_new_impl(ICAL_UID_PROPERTY);
@@ -702,7 +741,7 @@ icalproperty* icalproperty_vanew_uid(char* v, ...)
return (icalproperty*)impl;
}
-void icalproperty_set_uid(icalproperty* prop, char* v)
+void icalproperty_set_uid(icalproperty* prop, const char* v)
{
icalvalue *value;
@@ -716,7 +755,7 @@ void icalproperty_set_uid(icalproperty* prop, char* v)
}
-char* icalproperty_get_uid(icalproperty* prop)
+const char* icalproperty_get_uid(icalproperty* prop)
{
icalvalue *value;
icalerror_check_arg( (prop!=0),"prop");
@@ -728,7 +767,7 @@ char* icalproperty_get_uid(icalproperty* prop)
/* PRODID */
-icalproperty* icalproperty_new_prodid(char* v)
+icalproperty* icalproperty_new_prodid(const char* v)
{
struct icalproperty_impl *impl = icalproperty_new_impl(ICAL_PRODID_PROPERTY);
icalerror_check_arg_rz( (v!=0),"v");
@@ -739,7 +778,7 @@ icalproperty* icalproperty_new_prodid(char* v)
return (icalproperty*)impl;
}
-icalproperty* icalproperty_vanew_prodid(char* v, ...)
+icalproperty* icalproperty_vanew_prodid(const char* v, ...)
{
va_list args;
struct icalproperty_impl *impl = icalproperty_new_impl(ICAL_PRODID_PROPERTY);
@@ -755,7 +794,7 @@ icalproperty* icalproperty_vanew_prodid(char* v, ...)
return (icalproperty*)impl;
}
-void icalproperty_set_prodid(icalproperty* prop, char* v)
+void icalproperty_set_prodid(icalproperty* prop, const char* v)
{
icalvalue *value;
@@ -769,7 +808,7 @@ void icalproperty_set_prodid(icalproperty* prop, char* v)
}
-char* icalproperty_get_prodid(icalproperty* prop)
+const char* icalproperty_get_prodid(icalproperty* prop)
{
icalvalue *value;
icalerror_check_arg( (prop!=0),"prop");
@@ -781,23 +820,21 @@ char* icalproperty_get_prodid(icalproperty* prop)
/* STATUS */
-icalproperty* icalproperty_new_status(char* v)
+icalproperty* icalproperty_new_status(icalproperty_status v)
{
struct icalproperty_impl *impl = icalproperty_new_impl(ICAL_STATUS_PROPERTY);
- icalerror_check_arg_rz( (v!=0),"v");
-
+
icalproperty_set_status((icalproperty*)impl,v);
return (icalproperty*)impl;
}
-icalproperty* icalproperty_vanew_status(char* v, ...)
+icalproperty* icalproperty_vanew_status(icalproperty_status v, ...)
{
va_list args;
struct icalproperty_impl *impl = icalproperty_new_impl(ICAL_STATUS_PROPERTY);
- icalerror_check_arg_rz( (v!=0),"v");
-
+
icalproperty_set_status((icalproperty*)impl,v);
@@ -808,33 +845,32 @@ icalproperty* icalproperty_vanew_status(char* v, ...)
return (icalproperty*)impl;
}
-void icalproperty_set_status(icalproperty* prop, char* v)
+void icalproperty_set_status(icalproperty* prop, icalproperty_status v)
{
icalvalue *value;
- icalerror_check_arg_rv( (v!=0),"v");
-
+
icalerror_check_arg_rv( (prop!=0),"prop");
- value = icalvalue_new_text(v);
+ value = icalvalue_new_status(v);
icalproperty_set_value(prop,value);
}
-char* icalproperty_get_status(icalproperty* prop)
+icalproperty_status icalproperty_get_status(icalproperty* prop)
{
icalvalue *value;
icalerror_check_arg( (prop!=0),"prop");
value = icalproperty_get_value(prop);
- return icalvalue_get_text(value);
+ return icalvalue_get_status(value);
}
/* DESCRIPTION */
-icalproperty* icalproperty_new_description(char* v)
+icalproperty* icalproperty_new_description(const char* v)
{
struct icalproperty_impl *impl = icalproperty_new_impl(ICAL_DESCRIPTION_PROPERTY);
icalerror_check_arg_rz( (v!=0),"v");
@@ -845,7 +881,7 @@ icalproperty* icalproperty_new_description(char* v)
return (icalproperty*)impl;
}
-icalproperty* icalproperty_vanew_description(char* v, ...)
+icalproperty* icalproperty_vanew_description(const char* v, ...)
{
va_list args;
struct icalproperty_impl *impl = icalproperty_new_impl(ICAL_DESCRIPTION_PROPERTY);
@@ -861,7 +897,7 @@ icalproperty* icalproperty_vanew_description(char* v, ...)
return (icalproperty*)impl;
}
-void icalproperty_set_description(icalproperty* prop, char* v)
+void icalproperty_set_description(icalproperty* prop, const char* v)
{
icalvalue *value;
@@ -875,7 +911,7 @@ void icalproperty_set_description(icalproperty* prop, char* v)
}
-char* icalproperty_get_description(icalproperty* prop)
+const char* icalproperty_get_description(icalproperty* prop)
{
icalvalue *value;
icalerror_check_arg( (prop!=0),"prop");
@@ -937,7 +973,7 @@ struct icaldurationtype icalproperty_get_duration(icalproperty* prop)
/* CATEGORIES */
-icalproperty* icalproperty_new_categories(char* v)
+icalproperty* icalproperty_new_categories(const char* v)
{
struct icalproperty_impl *impl = icalproperty_new_impl(ICAL_CATEGORIES_PROPERTY);
icalerror_check_arg_rz( (v!=0),"v");
@@ -948,7 +984,7 @@ icalproperty* icalproperty_new_categories(char* v)
return (icalproperty*)impl;
}
-icalproperty* icalproperty_vanew_categories(char* v, ...)
+icalproperty* icalproperty_vanew_categories(const char* v, ...)
{
va_list args;
struct icalproperty_impl *impl = icalproperty_new_impl(ICAL_CATEGORIES_PROPERTY);
@@ -964,7 +1000,7 @@ icalproperty* icalproperty_vanew_categories(char* v, ...)
return (icalproperty*)impl;
}
-void icalproperty_set_categories(icalproperty* prop, char* v)
+void icalproperty_set_categories(icalproperty* prop, const char* v)
{
icalvalue *value;
@@ -978,7 +1014,7 @@ void icalproperty_set_categories(icalproperty* prop, char* v)
}
-char* icalproperty_get_categories(icalproperty* prop)
+const char* icalproperty_get_categories(icalproperty* prop)
{
icalvalue *value;
icalerror_check_arg( (prop!=0),"prop");
@@ -990,7 +1026,7 @@ char* icalproperty_get_categories(icalproperty* prop)
/* VERSION */
-icalproperty* icalproperty_new_version(char* v)
+icalproperty* icalproperty_new_version(const char* v)
{
struct icalproperty_impl *impl = icalproperty_new_impl(ICAL_VERSION_PROPERTY);
icalerror_check_arg_rz( (v!=0),"v");
@@ -1001,7 +1037,7 @@ icalproperty* icalproperty_new_version(char* v)
return (icalproperty*)impl;
}
-icalproperty* icalproperty_vanew_version(char* v, ...)
+icalproperty* icalproperty_vanew_version(const char* v, ...)
{
va_list args;
struct icalproperty_impl *impl = icalproperty_new_impl(ICAL_VERSION_PROPERTY);
@@ -1017,7 +1053,7 @@ icalproperty* icalproperty_vanew_version(char* v, ...)
return (icalproperty*)impl;
}
-void icalproperty_set_version(icalproperty* prop, char* v)
+void icalproperty_set_version(icalproperty* prop, const char* v)
{
icalvalue *value;
@@ -1031,7 +1067,7 @@ void icalproperty_set_version(icalproperty* prop, char* v)
}
-char* icalproperty_get_version(icalproperty* prop)
+const char* icalproperty_get_version(icalproperty* prop)
{
icalvalue *value;
icalerror_check_arg( (prop!=0),"prop");
@@ -1143,7 +1179,7 @@ struct icalrecurrencetype icalproperty_get_rrule(icalproperty* prop)
/* ATTENDEE */
-icalproperty* icalproperty_new_attendee(char* v)
+icalproperty* icalproperty_new_attendee(const char* v)
{
struct icalproperty_impl *impl = icalproperty_new_impl(ICAL_ATTENDEE_PROPERTY);
icalerror_check_arg_rz( (v!=0),"v");
@@ -1154,7 +1190,7 @@ icalproperty* icalproperty_new_attendee(char* v)
return (icalproperty*)impl;
}
-icalproperty* icalproperty_vanew_attendee(char* v, ...)
+icalproperty* icalproperty_vanew_attendee(const char* v, ...)
{
va_list args;
struct icalproperty_impl *impl = icalproperty_new_impl(ICAL_ATTENDEE_PROPERTY);
@@ -1170,7 +1206,7 @@ icalproperty* icalproperty_vanew_attendee(char* v, ...)
return (icalproperty*)impl;
}
-void icalproperty_set_attendee(icalproperty* prop, char* v)
+void icalproperty_set_attendee(icalproperty* prop, const char* v)
{
icalvalue *value;
@@ -1184,7 +1220,7 @@ void icalproperty_set_attendee(icalproperty* prop, char* v)
}
-char* icalproperty_get_attendee(icalproperty* prop)
+const char* icalproperty_get_attendee(icalproperty* prop)
{
icalvalue *value;
icalerror_check_arg( (prop!=0),"prop");
@@ -1196,7 +1232,7 @@ char* icalproperty_get_attendee(icalproperty* prop)
/* CONTACT */
-icalproperty* icalproperty_new_contact(char* v)
+icalproperty* icalproperty_new_contact(const char* v)
{
struct icalproperty_impl *impl = icalproperty_new_impl(ICAL_CONTACT_PROPERTY);
icalerror_check_arg_rz( (v!=0),"v");
@@ -1207,7 +1243,7 @@ icalproperty* icalproperty_new_contact(char* v)
return (icalproperty*)impl;
}
-icalproperty* icalproperty_vanew_contact(char* v, ...)
+icalproperty* icalproperty_vanew_contact(const char* v, ...)
{
va_list args;
struct icalproperty_impl *impl = icalproperty_new_impl(ICAL_CONTACT_PROPERTY);
@@ -1223,7 +1259,7 @@ icalproperty* icalproperty_vanew_contact(char* v, ...)
return (icalproperty*)impl;
}
-void icalproperty_set_contact(icalproperty* prop, char* v)
+void icalproperty_set_contact(icalproperty* prop, const char* v)
{
icalvalue *value;
@@ -1237,7 +1273,7 @@ void icalproperty_set_contact(icalproperty* prop, char* v)
}
-char* icalproperty_get_contact(icalproperty* prop)
+const char* icalproperty_get_contact(icalproperty* prop)
{
icalvalue *value;
icalerror_check_arg( (prop!=0),"prop");
@@ -1249,7 +1285,7 @@ char* icalproperty_get_contact(icalproperty* prop)
/* X-LIC-MIMECONTENTTYPE */
-icalproperty* icalproperty_new_xlicmimecontenttype(char* v)
+icalproperty* icalproperty_new_xlicmimecontenttype(const char* v)
{
struct icalproperty_impl *impl = icalproperty_new_impl(ICAL_XLICMIMECONTENTTYPE_PROPERTY);
icalerror_check_arg_rz( (v!=0),"v");
@@ -1260,7 +1296,7 @@ icalproperty* icalproperty_new_xlicmimecontenttype(char* v)
return (icalproperty*)impl;
}
-icalproperty* icalproperty_vanew_xlicmimecontenttype(char* v, ...)
+icalproperty* icalproperty_vanew_xlicmimecontenttype(const char* v, ...)
{
va_list args;
struct icalproperty_impl *impl = icalproperty_new_impl(ICAL_XLICMIMECONTENTTYPE_PROPERTY);
@@ -1276,7 +1312,7 @@ icalproperty* icalproperty_vanew_xlicmimecontenttype(char* v, ...)
return (icalproperty*)impl;
}
-void icalproperty_set_xlicmimecontenttype(icalproperty* prop, char* v)
+void icalproperty_set_xlicmimecontenttype(icalproperty* prop, const char* v)
{
icalvalue *value;
@@ -1290,7 +1326,7 @@ void icalproperty_set_xlicmimecontenttype(icalproperty* prop, char* v)
}
-char* icalproperty_get_xlicmimecontenttype(icalproperty* prop)
+const char* icalproperty_get_xlicmimecontenttype(icalproperty* prop)
{
icalvalue *value;
icalerror_check_arg( (prop!=0),"prop");
@@ -1302,7 +1338,7 @@ char* icalproperty_get_xlicmimecontenttype(icalproperty* prop)
/* X-LIC-MIMEOPTINFO */
-icalproperty* icalproperty_new_xlicmimeoptinfo(char* v)
+icalproperty* icalproperty_new_xlicmimeoptinfo(const char* v)
{
struct icalproperty_impl *impl = icalproperty_new_impl(ICAL_XLICMIMEOPTINFO_PROPERTY);
icalerror_check_arg_rz( (v!=0),"v");
@@ -1313,7 +1349,7 @@ icalproperty* icalproperty_new_xlicmimeoptinfo(char* v)
return (icalproperty*)impl;
}
-icalproperty* icalproperty_vanew_xlicmimeoptinfo(char* v, ...)
+icalproperty* icalproperty_vanew_xlicmimeoptinfo(const char* v, ...)
{
va_list args;
struct icalproperty_impl *impl = icalproperty_new_impl(ICAL_XLICMIMEOPTINFO_PROPERTY);
@@ -1329,7 +1365,7 @@ icalproperty* icalproperty_vanew_xlicmimeoptinfo(char* v, ...)
return (icalproperty*)impl;
}
-void icalproperty_set_xlicmimeoptinfo(icalproperty* prop, char* v)
+void icalproperty_set_xlicmimeoptinfo(icalproperty* prop, const char* v)
{
icalvalue *value;
@@ -1343,7 +1379,7 @@ void icalproperty_set_xlicmimeoptinfo(icalproperty* prop, char* v)
}
-char* icalproperty_get_xlicmimeoptinfo(icalproperty* prop)
+const char* icalproperty_get_xlicmimeoptinfo(icalproperty* prop)
{
icalvalue *value;
icalerror_check_arg( (prop!=0),"prop");
@@ -1355,7 +1391,7 @@ char* icalproperty_get_xlicmimeoptinfo(icalproperty* prop)
/* RELATED-TO */
-icalproperty* icalproperty_new_relatedto(char* v)
+icalproperty* icalproperty_new_relatedto(const char* v)
{
struct icalproperty_impl *impl = icalproperty_new_impl(ICAL_RELATEDTO_PROPERTY);
icalerror_check_arg_rz( (v!=0),"v");
@@ -1366,7 +1402,7 @@ icalproperty* icalproperty_new_relatedto(char* v)
return (icalproperty*)impl;
}
-icalproperty* icalproperty_vanew_relatedto(char* v, ...)
+icalproperty* icalproperty_vanew_relatedto(const char* v, ...)
{
va_list args;
struct icalproperty_impl *impl = icalproperty_new_impl(ICAL_RELATEDTO_PROPERTY);
@@ -1382,7 +1418,7 @@ icalproperty* icalproperty_vanew_relatedto(char* v, ...)
return (icalproperty*)impl;
}
-void icalproperty_set_relatedto(icalproperty* prop, char* v)
+void icalproperty_set_relatedto(icalproperty* prop, const char* v)
{
icalvalue *value;
@@ -1396,7 +1432,7 @@ void icalproperty_set_relatedto(icalproperty* prop, char* v)
}
-char* icalproperty_get_relatedto(icalproperty* prop)
+const char* icalproperty_get_relatedto(icalproperty* prop)
{
icalvalue *value;
icalerror_check_arg( (prop!=0),"prop");
@@ -1408,7 +1444,7 @@ char* icalproperty_get_relatedto(icalproperty* prop)
/* ORGANIZER */
-icalproperty* icalproperty_new_organizer(char* v)
+icalproperty* icalproperty_new_organizer(const char* v)
{
struct icalproperty_impl *impl = icalproperty_new_impl(ICAL_ORGANIZER_PROPERTY);
icalerror_check_arg_rz( (v!=0),"v");
@@ -1419,7 +1455,7 @@ icalproperty* icalproperty_new_organizer(char* v)
return (icalproperty*)impl;
}
-icalproperty* icalproperty_vanew_organizer(char* v, ...)
+icalproperty* icalproperty_vanew_organizer(const char* v, ...)
{
va_list args;
struct icalproperty_impl *impl = icalproperty_new_impl(ICAL_ORGANIZER_PROPERTY);
@@ -1435,7 +1471,7 @@ icalproperty* icalproperty_vanew_organizer(char* v, ...)
return (icalproperty*)impl;
}
-void icalproperty_set_organizer(icalproperty* prop, char* v)
+void icalproperty_set_organizer(icalproperty* prop, const char* v)
{
icalvalue *value;
@@ -1449,7 +1485,7 @@ void icalproperty_set_organizer(icalproperty* prop, char* v)
}
-char* icalproperty_get_organizer(icalproperty* prop)
+const char* icalproperty_get_organizer(icalproperty* prop)
{
icalvalue *value;
icalerror_check_arg( (prop!=0),"prop");
@@ -1461,7 +1497,7 @@ char* icalproperty_get_organizer(icalproperty* prop)
/* COMMENT */
-icalproperty* icalproperty_new_comment(char* v)
+icalproperty* icalproperty_new_comment(const char* v)
{
struct icalproperty_impl *impl = icalproperty_new_impl(ICAL_COMMENT_PROPERTY);
icalerror_check_arg_rz( (v!=0),"v");
@@ -1472,7 +1508,7 @@ icalproperty* icalproperty_new_comment(char* v)
return (icalproperty*)impl;
}
-icalproperty* icalproperty_vanew_comment(char* v, ...)
+icalproperty* icalproperty_vanew_comment(const char* v, ...)
{
va_list args;
struct icalproperty_impl *impl = icalproperty_new_impl(ICAL_COMMENT_PROPERTY);
@@ -1488,7 +1524,7 @@ icalproperty* icalproperty_vanew_comment(char* v, ...)
return (icalproperty*)impl;
}
-void icalproperty_set_comment(icalproperty* prop, char* v)
+void icalproperty_set_comment(icalproperty* prop, const char* v)
{
icalvalue *value;
@@ -1502,7 +1538,7 @@ void icalproperty_set_comment(icalproperty* prop, char* v)
}
-char* icalproperty_get_comment(icalproperty* prop)
+const char* icalproperty_get_comment(icalproperty* prop)
{
icalvalue *value;
icalerror_check_arg( (prop!=0),"prop");
@@ -1514,7 +1550,7 @@ char* icalproperty_get_comment(icalproperty* prop)
/* X-LIC-ERROR */
-icalproperty* icalproperty_new_xlicerror(char* v)
+icalproperty* icalproperty_new_xlicerror(const char* v)
{
struct icalproperty_impl *impl = icalproperty_new_impl(ICAL_XLICERROR_PROPERTY);
icalerror_check_arg_rz( (v!=0),"v");
@@ -1525,7 +1561,7 @@ icalproperty* icalproperty_new_xlicerror(char* v)
return (icalproperty*)impl;
}
-icalproperty* icalproperty_vanew_xlicerror(char* v, ...)
+icalproperty* icalproperty_vanew_xlicerror(const char* v, ...)
{
va_list args;
struct icalproperty_impl *impl = icalproperty_new_impl(ICAL_XLICERROR_PROPERTY);
@@ -1541,7 +1577,7 @@ icalproperty* icalproperty_vanew_xlicerror(char* v, ...)
return (icalproperty*)impl;
}
-void icalproperty_set_xlicerror(icalproperty* prop, char* v)
+void icalproperty_set_xlicerror(icalproperty* prop, const char* v)
{
icalvalue *value;
@@ -1555,7 +1591,7 @@ void icalproperty_set_xlicerror(icalproperty* prop, char* v)
}
-char* icalproperty_get_xlicerror(icalproperty* prop)
+const char* icalproperty_get_xlicerror(icalproperty* prop)
{
icalvalue *value;
icalerror_check_arg( (prop!=0),"prop");
@@ -1617,7 +1653,7 @@ union icaltriggertype icalproperty_get_trigger(icalproperty* prop)
/* CLASS */
-icalproperty* icalproperty_new_class(char* v)
+icalproperty* icalproperty_new_class(const char* v)
{
struct icalproperty_impl *impl = icalproperty_new_impl(ICAL_CLASS_PROPERTY);
icalerror_check_arg_rz( (v!=0),"v");
@@ -1628,7 +1664,7 @@ icalproperty* icalproperty_new_class(char* v)
return (icalproperty*)impl;
}
-icalproperty* icalproperty_vanew_class(char* v, ...)
+icalproperty* icalproperty_vanew_class(const char* v, ...)
{
va_list args;
struct icalproperty_impl *impl = icalproperty_new_impl(ICAL_CLASS_PROPERTY);
@@ -1644,7 +1680,7 @@ icalproperty* icalproperty_vanew_class(char* v, ...)
return (icalproperty*)impl;
}
-void icalproperty_set_class(icalproperty* prop, char* v)
+void icalproperty_set_class(icalproperty* prop, const char* v)
{
icalvalue *value;
@@ -1658,7 +1694,7 @@ void icalproperty_set_class(icalproperty* prop, char* v)
}
-char* icalproperty_get_class(icalproperty* prop)
+const char* icalproperty_get_class(icalproperty* prop)
{
icalvalue *value;
icalerror_check_arg( (prop!=0),"prop");
@@ -1670,7 +1706,7 @@ char* icalproperty_get_class(icalproperty* prop)
/* X */
-icalproperty* icalproperty_new_x(char* v)
+icalproperty* icalproperty_new_x(const char* v)
{
struct icalproperty_impl *impl = icalproperty_new_impl(ICAL_X_PROPERTY);
icalerror_check_arg_rz( (v!=0),"v");
@@ -1681,7 +1717,7 @@ icalproperty* icalproperty_new_x(char* v)
return (icalproperty*)impl;
}
-icalproperty* icalproperty_vanew_x(char* v, ...)
+icalproperty* icalproperty_vanew_x(const char* v, ...)
{
va_list args;
struct icalproperty_impl *impl = icalproperty_new_impl(ICAL_X_PROPERTY);
@@ -1697,7 +1733,7 @@ icalproperty* icalproperty_vanew_x(char* v, ...)
return (icalproperty*)impl;
}
-void icalproperty_set_x(icalproperty* prop, char* v)
+void icalproperty_set_x(icalproperty* prop, const char* v)
{
icalvalue *value;
@@ -1711,7 +1747,7 @@ void icalproperty_set_x(icalproperty* prop, char* v)
}
-char* icalproperty_get_x(icalproperty* prop)
+const char* icalproperty_get_x(icalproperty* prop)
{
icalvalue *value;
icalerror_check_arg( (prop!=0),"prop");
@@ -1773,7 +1809,7 @@ int icalproperty_get_tzoffsetto(icalproperty* prop)
/* TRANSP */
-icalproperty* icalproperty_new_transp(char* v)
+icalproperty* icalproperty_new_transp(const char* v)
{
struct icalproperty_impl *impl = icalproperty_new_impl(ICAL_TRANSP_PROPERTY);
icalerror_check_arg_rz( (v!=0),"v");
@@ -1784,7 +1820,7 @@ icalproperty* icalproperty_new_transp(char* v)
return (icalproperty*)impl;
}
-icalproperty* icalproperty_vanew_transp(char* v, ...)
+icalproperty* icalproperty_vanew_transp(const char* v, ...)
{
va_list args;
struct icalproperty_impl *impl = icalproperty_new_impl(ICAL_TRANSP_PROPERTY);
@@ -1800,7 +1836,7 @@ icalproperty* icalproperty_vanew_transp(char* v, ...)
return (icalproperty*)impl;
}
-void icalproperty_set_transp(icalproperty* prop, char* v)
+void icalproperty_set_transp(icalproperty* prop, const char* v)
{
icalvalue *value;
@@ -1814,7 +1850,7 @@ void icalproperty_set_transp(icalproperty* prop, char* v)
}
-char* icalproperty_get_transp(icalproperty* prop)
+const char* icalproperty_get_transp(icalproperty* prop)
{
icalvalue *value;
icalerror_check_arg( (prop!=0),"prop");
@@ -1826,7 +1862,7 @@ char* icalproperty_get_transp(icalproperty* prop)
/* X-LIC-MIMEENCODING */
-icalproperty* icalproperty_new_xlicmimeencoding(char* v)
+icalproperty* icalproperty_new_xlicmimeencoding(const char* v)
{
struct icalproperty_impl *impl = icalproperty_new_impl(ICAL_XLICMIMEENCODING_PROPERTY);
icalerror_check_arg_rz( (v!=0),"v");
@@ -1837,7 +1873,7 @@ icalproperty* icalproperty_new_xlicmimeencoding(char* v)
return (icalproperty*)impl;
}
-icalproperty* icalproperty_vanew_xlicmimeencoding(char* v, ...)
+icalproperty* icalproperty_vanew_xlicmimeencoding(const char* v, ...)
{
va_list args;
struct icalproperty_impl *impl = icalproperty_new_impl(ICAL_XLICMIMEENCODING_PROPERTY);
@@ -1853,7 +1889,7 @@ icalproperty* icalproperty_vanew_xlicmimeencoding(char* v, ...)
return (icalproperty*)impl;
}
-void icalproperty_set_xlicmimeencoding(icalproperty* prop, char* v)
+void icalproperty_set_xlicmimeencoding(icalproperty* prop, const char* v)
{
icalvalue *value;
@@ -1867,7 +1903,7 @@ void icalproperty_set_xlicmimeencoding(icalproperty* prop, char* v)
}
-char* icalproperty_get_xlicmimeencoding(icalproperty* prop)
+const char* icalproperty_get_xlicmimeencoding(icalproperty* prop)
{
icalvalue *value;
icalerror_check_arg( (prop!=0),"prop");
@@ -1929,7 +1965,7 @@ int icalproperty_get_sequence(icalproperty* prop)
/* LOCATION */
-icalproperty* icalproperty_new_location(char* v)
+icalproperty* icalproperty_new_location(const char* v)
{
struct icalproperty_impl *impl = icalproperty_new_impl(ICAL_LOCATION_PROPERTY);
icalerror_check_arg_rz( (v!=0),"v");
@@ -1940,7 +1976,7 @@ icalproperty* icalproperty_new_location(char* v)
return (icalproperty*)impl;
}
-icalproperty* icalproperty_vanew_location(char* v, ...)
+icalproperty* icalproperty_vanew_location(const char* v, ...)
{
va_list args;
struct icalproperty_impl *impl = icalproperty_new_impl(ICAL_LOCATION_PROPERTY);
@@ -1956,7 +1992,7 @@ icalproperty* icalproperty_vanew_location(char* v, ...)
return (icalproperty*)impl;
}
-void icalproperty_set_location(icalproperty* prop, char* v)
+void icalproperty_set_location(icalproperty* prop, const char* v)
{
icalvalue *value;
@@ -1970,7 +2006,7 @@ void icalproperty_set_location(icalproperty* prop, char* v)
}
-char* icalproperty_get_location(icalproperty* prop)
+const char* icalproperty_get_location(icalproperty* prop)
{
icalvalue *value;
icalerror_check_arg( (prop!=0),"prop");
@@ -1982,7 +2018,7 @@ char* icalproperty_get_location(icalproperty* prop)
/* REQUEST-STATUS */
-icalproperty* icalproperty_new_requeststatus(char* v)
+icalproperty* icalproperty_new_requeststatus(const char* v)
{
struct icalproperty_impl *impl = icalproperty_new_impl(ICAL_REQUESTSTATUS_PROPERTY);
icalerror_check_arg_rz( (v!=0),"v");
@@ -1993,7 +2029,7 @@ icalproperty* icalproperty_new_requeststatus(char* v)
return (icalproperty*)impl;
}
-icalproperty* icalproperty_vanew_requeststatus(char* v, ...)
+icalproperty* icalproperty_vanew_requeststatus(const char* v, ...)
{
va_list args;
struct icalproperty_impl *impl = icalproperty_new_impl(ICAL_REQUESTSTATUS_PROPERTY);
@@ -2009,7 +2045,7 @@ icalproperty* icalproperty_vanew_requeststatus(char* v, ...)
return (icalproperty*)impl;
}
-void icalproperty_set_requeststatus(icalproperty* prop, char* v)
+void icalproperty_set_requeststatus(icalproperty* prop, const char* v)
{
icalvalue *value;
@@ -2023,7 +2059,7 @@ void icalproperty_set_requeststatus(icalproperty* prop, char* v)
}
-char* icalproperty_get_requeststatus(icalproperty* prop)
+const char* icalproperty_get_requeststatus(icalproperty* prop)
{
icalvalue *value;
icalerror_check_arg( (prop!=0),"prop");
@@ -2085,7 +2121,7 @@ struct icaltimetype icalproperty_get_exdate(icalproperty* prop)
/* TZID */
-icalproperty* icalproperty_new_tzid(char* v)
+icalproperty* icalproperty_new_tzid(const char* v)
{
struct icalproperty_impl *impl = icalproperty_new_impl(ICAL_TZID_PROPERTY);
icalerror_check_arg_rz( (v!=0),"v");
@@ -2096,7 +2132,7 @@ icalproperty* icalproperty_new_tzid(char* v)
return (icalproperty*)impl;
}
-icalproperty* icalproperty_vanew_tzid(char* v, ...)
+icalproperty* icalproperty_vanew_tzid(const char* v, ...)
{
va_list args;
struct icalproperty_impl *impl = icalproperty_new_impl(ICAL_TZID_PROPERTY);
@@ -2112,7 +2148,7 @@ icalproperty* icalproperty_vanew_tzid(char* v, ...)
return (icalproperty*)impl;
}
-void icalproperty_set_tzid(icalproperty* prop, char* v)
+void icalproperty_set_tzid(icalproperty* prop, const char* v)
{
icalvalue *value;
@@ -2126,7 +2162,7 @@ void icalproperty_set_tzid(icalproperty* prop, char* v)
}
-char* icalproperty_get_tzid(icalproperty* prop)
+const char* icalproperty_get_tzid(icalproperty* prop)
{
icalvalue *value;
icalerror_check_arg( (prop!=0),"prop");
@@ -2138,7 +2174,7 @@ char* icalproperty_get_tzid(icalproperty* prop)
/* RESOURCES */
-icalproperty* icalproperty_new_resources(char* v)
+icalproperty* icalproperty_new_resources(const char* v)
{
struct icalproperty_impl *impl = icalproperty_new_impl(ICAL_RESOURCES_PROPERTY);
icalerror_check_arg_rz( (v!=0),"v");
@@ -2149,7 +2185,7 @@ icalproperty* icalproperty_new_resources(char* v)
return (icalproperty*)impl;
}
-icalproperty* icalproperty_vanew_resources(char* v, ...)
+icalproperty* icalproperty_vanew_resources(const char* v, ...)
{
va_list args;
struct icalproperty_impl *impl = icalproperty_new_impl(ICAL_RESOURCES_PROPERTY);
@@ -2165,7 +2201,7 @@ icalproperty* icalproperty_vanew_resources(char* v, ...)
return (icalproperty*)impl;
}
-void icalproperty_set_resources(icalproperty* prop, char* v)
+void icalproperty_set_resources(icalproperty* prop, const char* v)
{
icalvalue *value;
@@ -2179,7 +2215,7 @@ void icalproperty_set_resources(icalproperty* prop, char* v)
}
-char* icalproperty_get_resources(icalproperty* prop)
+const char* icalproperty_get_resources(icalproperty* prop)
{
icalvalue *value;
icalerror_check_arg( (prop!=0),"prop");
@@ -2191,7 +2227,7 @@ char* icalproperty_get_resources(icalproperty* prop)
/* TZURL */
-icalproperty* icalproperty_new_tzurl(char* v)
+icalproperty* icalproperty_new_tzurl(const char* v)
{
struct icalproperty_impl *impl = icalproperty_new_impl(ICAL_TZURL_PROPERTY);
icalerror_check_arg_rz( (v!=0),"v");
@@ -2202,7 +2238,7 @@ icalproperty* icalproperty_new_tzurl(char* v)
return (icalproperty*)impl;
}
-icalproperty* icalproperty_vanew_tzurl(char* v, ...)
+icalproperty* icalproperty_vanew_tzurl(const char* v, ...)
{
va_list args;
struct icalproperty_impl *impl = icalproperty_new_impl(ICAL_TZURL_PROPERTY);
@@ -2218,7 +2254,7 @@ icalproperty* icalproperty_vanew_tzurl(char* v, ...)
return (icalproperty*)impl;
}
-void icalproperty_set_tzurl(icalproperty* prop, char* v)
+void icalproperty_set_tzurl(icalproperty* prop, const char* v)
{
icalvalue *value;
@@ -2232,7 +2268,7 @@ void icalproperty_set_tzurl(icalproperty* prop, char* v)
}
-char* icalproperty_get_tzurl(icalproperty* prop)
+const char* icalproperty_get_tzurl(icalproperty* prop)
{
icalvalue *value;
icalerror_check_arg( (prop!=0),"prop");
@@ -2494,7 +2530,7 @@ struct icaltimetype icalproperty_get_recurrenceid(icalproperty* prop)
/* SUMMARY */
-icalproperty* icalproperty_new_summary(char* v)
+icalproperty* icalproperty_new_summary(const char* v)
{
struct icalproperty_impl *impl = icalproperty_new_impl(ICAL_SUMMARY_PROPERTY);
icalerror_check_arg_rz( (v!=0),"v");
@@ -2505,7 +2541,7 @@ icalproperty* icalproperty_new_summary(char* v)
return (icalproperty*)impl;
}
-icalproperty* icalproperty_vanew_summary(char* v, ...)
+icalproperty* icalproperty_vanew_summary(const char* v, ...)
{
va_list args;
struct icalproperty_impl *impl = icalproperty_new_impl(ICAL_SUMMARY_PROPERTY);
@@ -2521,7 +2557,7 @@ icalproperty* icalproperty_vanew_summary(char* v, ...)
return (icalproperty*)impl;
}
-void icalproperty_set_summary(icalproperty* prop, char* v)
+void icalproperty_set_summary(icalproperty* prop, const char* v)
{
icalvalue *value;
@@ -2535,7 +2571,7 @@ void icalproperty_set_summary(icalproperty* prop, char* v)
}
-char* icalproperty_get_summary(icalproperty* prop)
+const char* icalproperty_get_summary(icalproperty* prop)
{
icalvalue *value;
icalerror_check_arg( (prop!=0),"prop");
@@ -2597,7 +2633,7 @@ struct icaltimetype icalproperty_get_dtend(icalproperty* prop)
/* TZNAME */
-icalproperty* icalproperty_new_tzname(char* v)
+icalproperty* icalproperty_new_tzname(const char* v)
{
struct icalproperty_impl *impl = icalproperty_new_impl(ICAL_TZNAME_PROPERTY);
icalerror_check_arg_rz( (v!=0),"v");
@@ -2608,7 +2644,7 @@ icalproperty* icalproperty_new_tzname(char* v)
return (icalproperty*)impl;
}
-icalproperty* icalproperty_vanew_tzname(char* v, ...)
+icalproperty* icalproperty_vanew_tzname(const char* v, ...)
{
va_list args;
struct icalproperty_impl *impl = icalproperty_new_impl(ICAL_TZNAME_PROPERTY);
@@ -2624,7 +2660,7 @@ icalproperty* icalproperty_vanew_tzname(char* v, ...)
return (icalproperty*)impl;
}
-void icalproperty_set_tzname(icalproperty* prop, char* v)
+void icalproperty_set_tzname(icalproperty* prop, const char* v)
{
icalvalue *value;
@@ -2638,7 +2674,7 @@ void icalproperty_set_tzname(icalproperty* prop, char* v)
}
-char* icalproperty_get_tzname(icalproperty* prop)
+const char* icalproperty_get_tzname(icalproperty* prop)
{
icalvalue *value;
icalerror_check_arg( (prop!=0),"prop");
@@ -2700,7 +2736,7 @@ struct icalperiodtype icalproperty_get_rdate(icalproperty* prop)
/* X-LIC-MIMEFILENAME */
-icalproperty* icalproperty_new_xlicmimefilename(char* v)
+icalproperty* icalproperty_new_xlicmimefilename(const char* v)
{
struct icalproperty_impl *impl = icalproperty_new_impl(ICAL_XLICMIMEFILENAME_PROPERTY);
icalerror_check_arg_rz( (v!=0),"v");
@@ -2711,7 +2747,7 @@ icalproperty* icalproperty_new_xlicmimefilename(char* v)
return (icalproperty*)impl;
}
-icalproperty* icalproperty_vanew_xlicmimefilename(char* v, ...)
+icalproperty* icalproperty_vanew_xlicmimefilename(const char* v, ...)
{
va_list args;
struct icalproperty_impl *impl = icalproperty_new_impl(ICAL_XLICMIMEFILENAME_PROPERTY);
@@ -2727,7 +2763,7 @@ icalproperty* icalproperty_vanew_xlicmimefilename(char* v, ...)
return (icalproperty*)impl;
}
-void icalproperty_set_xlicmimefilename(icalproperty* prop, char* v)
+void icalproperty_set_xlicmimefilename(icalproperty* prop, const char* v)
{
icalvalue *value;
@@ -2741,7 +2777,7 @@ void icalproperty_set_xlicmimefilename(icalproperty* prop, char* v)
}
-char* icalproperty_get_xlicmimefilename(icalproperty* prop)
+const char* icalproperty_get_xlicmimefilename(icalproperty* prop)
{
icalvalue *value;
icalerror_check_arg( (prop!=0),"prop");
@@ -2753,7 +2789,7 @@ char* icalproperty_get_xlicmimefilename(icalproperty* prop)
/* URL */
-icalproperty* icalproperty_new_url(char* v)
+icalproperty* icalproperty_new_url(const char* v)
{
struct icalproperty_impl *impl = icalproperty_new_impl(ICAL_URL_PROPERTY);
icalerror_check_arg_rz( (v!=0),"v");
@@ -2764,7 +2800,7 @@ icalproperty* icalproperty_new_url(char* v)
return (icalproperty*)impl;
}
-icalproperty* icalproperty_vanew_url(char* v, ...)
+icalproperty* icalproperty_vanew_url(const char* v, ...)
{
va_list args;
struct icalproperty_impl *impl = icalproperty_new_impl(ICAL_URL_PROPERTY);
@@ -2780,7 +2816,7 @@ icalproperty* icalproperty_vanew_url(char* v, ...)
return (icalproperty*)impl;
}
-void icalproperty_set_url(icalproperty* prop, char* v)
+void icalproperty_set_url(icalproperty* prop, const char* v)
{
icalvalue *value;
@@ -2794,7 +2830,7 @@ void icalproperty_set_url(icalproperty* prop, char* v)
}
-char* icalproperty_get_url(icalproperty* prop)
+const char* icalproperty_get_url(icalproperty* prop)
{
icalvalue *value;
icalerror_check_arg( (prop!=0),"prop");
@@ -2956,7 +2992,7 @@ struct icalrecurrencetype icalproperty_get_exrule(icalproperty* prop)
/* QUERY */
-icalproperty* icalproperty_new_query(char* v)
+icalproperty* icalproperty_new_query(const char* v)
{
struct icalproperty_impl *impl = icalproperty_new_impl(ICAL_QUERY_PROPERTY);
icalerror_check_arg_rz( (v!=0),"v");
@@ -2967,7 +3003,7 @@ icalproperty* icalproperty_new_query(char* v)
return (icalproperty*)impl;
}
-icalproperty* icalproperty_vanew_query(char* v, ...)
+icalproperty* icalproperty_vanew_query(const char* v, ...)
{
va_list args;
struct icalproperty_impl *impl = icalproperty_new_impl(ICAL_QUERY_PROPERTY);
@@ -2983,7 +3019,7 @@ icalproperty* icalproperty_vanew_query(char* v, ...)
return (icalproperty*)impl;
}
-void icalproperty_set_query(icalproperty* prop, char* v)
+void icalproperty_set_query(icalproperty* prop, const char* v)
{
icalvalue *value;
@@ -2997,7 +3033,7 @@ void icalproperty_set_query(icalproperty* prop, char* v)
}
-char* icalproperty_get_query(icalproperty* prop)
+const char* icalproperty_get_query(icalproperty* prop)
{
icalvalue *value;
icalerror_check_arg( (prop!=0),"prop");
@@ -3059,7 +3095,7 @@ int icalproperty_get_percentcomplete(icalproperty* prop)
/* CALSCALE */
-icalproperty* icalproperty_new_calscale(char* v)
+icalproperty* icalproperty_new_calscale(const char* v)
{
struct icalproperty_impl *impl = icalproperty_new_impl(ICAL_CALSCALE_PROPERTY);
icalerror_check_arg_rz( (v!=0),"v");
@@ -3070,7 +3106,7 @@ icalproperty* icalproperty_new_calscale(char* v)
return (icalproperty*)impl;
}
-icalproperty* icalproperty_vanew_calscale(char* v, ...)
+icalproperty* icalproperty_vanew_calscale(const char* v, ...)
{
va_list args;
struct icalproperty_impl *impl = icalproperty_new_impl(ICAL_CALSCALE_PROPERTY);
@@ -3086,7 +3122,7 @@ icalproperty* icalproperty_vanew_calscale(char* v, ...)
return (icalproperty*)impl;
}
-void icalproperty_set_calscale(icalproperty* prop, char* v)
+void icalproperty_set_calscale(icalproperty* prop, const char* v)
{
icalvalue *value;
@@ -3100,7 +3136,7 @@ void icalproperty_set_calscale(icalproperty* prop, char* v)
}
-char* icalproperty_get_calscale(icalproperty* prop)
+const char* icalproperty_get_calscale(icalproperty* prop)
{
icalvalue *value;
icalerror_check_arg( (prop!=0),"prop");
@@ -3212,7 +3248,7 @@ struct icalgeotype icalproperty_get_geo(icalproperty* prop)
/* X-LIC-MIMECHARSET */
-icalproperty* icalproperty_new_xlicmimecharset(char* v)
+icalproperty* icalproperty_new_xlicmimecharset(const char* v)
{
struct icalproperty_impl *impl = icalproperty_new_impl(ICAL_XLICMIMECHARSET_PROPERTY);
icalerror_check_arg_rz( (v!=0),"v");
@@ -3223,7 +3259,7 @@ icalproperty* icalproperty_new_xlicmimecharset(char* v)
return (icalproperty*)impl;
}
-icalproperty* icalproperty_vanew_xlicmimecharset(char* v, ...)
+icalproperty* icalproperty_vanew_xlicmimecharset(const char* v, ...)
{
va_list args;
struct icalproperty_impl *impl = icalproperty_new_impl(ICAL_XLICMIMECHARSET_PROPERTY);
@@ -3239,7 +3275,7 @@ icalproperty* icalproperty_vanew_xlicmimecharset(char* v, ...)
return (icalproperty*)impl;
}
-void icalproperty_set_xlicmimecharset(icalproperty* prop, char* v)
+void icalproperty_set_xlicmimecharset(icalproperty* prop, const char* v)
{
icalvalue *value;
@@ -3253,7 +3289,7 @@ void icalproperty_set_xlicmimecharset(icalproperty* prop, char* v)
}
-char* icalproperty_get_xlicmimecharset(icalproperty* prop)
+const char* icalproperty_get_xlicmimecharset(icalproperty* prop)
{
icalvalue *value;
icalerror_check_arg( (prop!=0),"prop");
@@ -3415,7 +3451,7 @@ struct icaltimetype icalproperty_get_due(icalproperty* prop)
/* ACTION */
-icalproperty* icalproperty_new_action(char* v)
+icalproperty* icalproperty_new_action(const char* v)
{
struct icalproperty_impl *impl = icalproperty_new_impl(ICAL_ACTION_PROPERTY);
icalerror_check_arg_rz( (v!=0),"v");
@@ -3426,7 +3462,7 @@ icalproperty* icalproperty_new_action(char* v)
return (icalproperty*)impl;
}
-icalproperty* icalproperty_vanew_action(char* v, ...)
+icalproperty* icalproperty_vanew_action(const char* v, ...)
{
va_list args;
struct icalproperty_impl *impl = icalproperty_new_impl(ICAL_ACTION_PROPERTY);
@@ -3442,7 +3478,7 @@ icalproperty* icalproperty_vanew_action(char* v, ...)
return (icalproperty*)impl;
}
-void icalproperty_set_action(icalproperty* prop, char* v)
+void icalproperty_set_action(icalproperty* prop, const char* v)
{
icalvalue *value;
@@ -3456,7 +3492,7 @@ void icalproperty_set_action(icalproperty* prop, char* v)
}
-char* icalproperty_get_action(icalproperty* prop)
+const char* icalproperty_get_action(icalproperty* prop)
{
icalvalue *value;
icalerror_check_arg( (prop!=0),"prop");
diff --git a/libical/src/libical/icalproperty.h b/libical/src/libical/icalproperty.h
index 278c4d533f..633a48f148 100644
--- a/libical/src/libical/icalproperty.h
+++ b/libical/src/libical/icalproperty.h
@@ -13,6 +13,9 @@
#define ICALPROPERTY_H
#include <time.h>
+#include "icalparameter.h"
+#include "icalvalue.h"
+#include "icalrecur.h"
typedef void icalproperty;
@@ -30,6 +33,7 @@ icalproperty_kind icalproperty_isa(icalproperty* property);
int icalproperty_isa_property(void* property);
void icalproperty_add_parameter(icalproperty* prop,icalparameter* parameter);
+void icalproperty_set_parameter(icalproperty* prop,icalparameter* parameter);
void icalproperty_remove_parameter(icalproperty* prop,
icalparameter_kind kind);
@@ -59,10 +63,10 @@ void icalproperty_set_method(icalproperty* prop, icalproperty_method v);
icalproperty_method icalproperty_get_method(icalproperty* prop);
/* X-LIC-MIMECID */
-icalproperty* icalproperty_new_xlicmimecid(char* v);
-icalproperty* icalproperty_vanew_xlicmimecid(char* v, ...);
-void icalproperty_set_xlicmimecid(icalproperty* prop, char* v);
-char* icalproperty_get_xlicmimecid(icalproperty* prop);
+icalproperty* icalproperty_new_xlicmimecid(const char* v);
+icalproperty* icalproperty_vanew_xlicmimecid(const char* v, ...);
+void icalproperty_set_xlicmimecid(icalproperty* prop, const char* v);
+const char* icalproperty_get_xlicmimecid(icalproperty* prop);
/* LAST-MODIFIED */
icalproperty* icalproperty_new_lastmodified(struct icaltimetype v);
@@ -71,28 +75,28 @@ void icalproperty_set_lastmodified(icalproperty* prop, struct icaltimetype v);
struct icaltimetype icalproperty_get_lastmodified(icalproperty* prop);
/* UID */
-icalproperty* icalproperty_new_uid(char* v);
-icalproperty* icalproperty_vanew_uid(char* v, ...);
-void icalproperty_set_uid(icalproperty* prop, char* v);
-char* icalproperty_get_uid(icalproperty* prop);
+icalproperty* icalproperty_new_uid(const char* v);
+icalproperty* icalproperty_vanew_uid(const char* v, ...);
+void icalproperty_set_uid(icalproperty* prop, const char* v);
+const char* icalproperty_get_uid(icalproperty* prop);
/* PRODID */
-icalproperty* icalproperty_new_prodid(char* v);
-icalproperty* icalproperty_vanew_prodid(char* v, ...);
-void icalproperty_set_prodid(icalproperty* prop, char* v);
-char* icalproperty_get_prodid(icalproperty* prop);
+icalproperty* icalproperty_new_prodid(const char* v);
+icalproperty* icalproperty_vanew_prodid(const char* v, ...);
+void icalproperty_set_prodid(icalproperty* prop, const char* v);
+const char* icalproperty_get_prodid(icalproperty* prop);
/* STATUS */
-icalproperty* icalproperty_new_status(char* v);
-icalproperty* icalproperty_vanew_status(char* v, ...);
-void icalproperty_set_status(icalproperty* prop, char* v);
-char* icalproperty_get_status(icalproperty* prop);
+icalproperty* icalproperty_new_status(icalproperty_status v);
+icalproperty* icalproperty_vanew_status(icalproperty_status v, ...);
+void icalproperty_set_status(icalproperty* prop, icalproperty_status v);
+icalproperty_status icalproperty_get_status(icalproperty* prop);
/* DESCRIPTION */
-icalproperty* icalproperty_new_description(char* v);
-icalproperty* icalproperty_vanew_description(char* v, ...);
-void icalproperty_set_description(icalproperty* prop, char* v);
-char* icalproperty_get_description(icalproperty* prop);
+icalproperty* icalproperty_new_description(const char* v);
+icalproperty* icalproperty_vanew_description(const char* v, ...);
+void icalproperty_set_description(icalproperty* prop, const char* v);
+const char* icalproperty_get_description(icalproperty* prop);
/* DURATION */
icalproperty* icalproperty_new_duration(struct icaldurationtype v);
@@ -101,16 +105,16 @@ void icalproperty_set_duration(icalproperty* prop, struct icaldurationtype v);
struct icaldurationtype icalproperty_get_duration(icalproperty* prop);
/* CATEGORIES */
-icalproperty* icalproperty_new_categories(char* v);
-icalproperty* icalproperty_vanew_categories(char* v, ...);
-void icalproperty_set_categories(icalproperty* prop, char* v);
-char* icalproperty_get_categories(icalproperty* prop);
+icalproperty* icalproperty_new_categories(const char* v);
+icalproperty* icalproperty_vanew_categories(const char* v, ...);
+void icalproperty_set_categories(icalproperty* prop, const char* v);
+const char* icalproperty_get_categories(icalproperty* prop);
/* VERSION */
-icalproperty* icalproperty_new_version(char* v);
-icalproperty* icalproperty_vanew_version(char* v, ...);
-void icalproperty_set_version(icalproperty* prop, char* v);
-char* icalproperty_get_version(icalproperty* prop);
+icalproperty* icalproperty_new_version(const char* v);
+icalproperty* icalproperty_vanew_version(const char* v, ...);
+void icalproperty_set_version(icalproperty* prop, const char* v);
+const char* icalproperty_get_version(icalproperty* prop);
/* TZOFFSETFROM */
icalproperty* icalproperty_new_tzoffsetfrom(int v);
@@ -125,52 +129,52 @@ void icalproperty_set_rrule(icalproperty* prop, struct icalrecurrencetype v);
struct icalrecurrencetype icalproperty_get_rrule(icalproperty* prop);
/* ATTENDEE */
-icalproperty* icalproperty_new_attendee(char* v);
-icalproperty* icalproperty_vanew_attendee(char* v, ...);
-void icalproperty_set_attendee(icalproperty* prop, char* v);
-char* icalproperty_get_attendee(icalproperty* prop);
+icalproperty* icalproperty_new_attendee(const char* v);
+icalproperty* icalproperty_vanew_attendee(const char* v, ...);
+void icalproperty_set_attendee(icalproperty* prop, const char* v);
+const char* icalproperty_get_attendee(icalproperty* prop);
/* CONTACT */
-icalproperty* icalproperty_new_contact(char* v);
-icalproperty* icalproperty_vanew_contact(char* v, ...);
-void icalproperty_set_contact(icalproperty* prop, char* v);
-char* icalproperty_get_contact(icalproperty* prop);
+icalproperty* icalproperty_new_contact(const char* v);
+icalproperty* icalproperty_vanew_contact(const char* v, ...);
+void icalproperty_set_contact(icalproperty* prop, const char* v);
+const char* icalproperty_get_contact(icalproperty* prop);
/* X-LIC-MIMECONTENTTYPE */
-icalproperty* icalproperty_new_xlicmimecontenttype(char* v);
-icalproperty* icalproperty_vanew_xlicmimecontenttype(char* v, ...);
-void icalproperty_set_xlicmimecontenttype(icalproperty* prop, char* v);
-char* icalproperty_get_xlicmimecontenttype(icalproperty* prop);
+icalproperty* icalproperty_new_xlicmimecontenttype(const char* v);
+icalproperty* icalproperty_vanew_xlicmimecontenttype(const char* v, ...);
+void icalproperty_set_xlicmimecontenttype(icalproperty* prop, const char* v);
+const char* icalproperty_get_xlicmimecontenttype(icalproperty* prop);
/* X-LIC-MIMEOPTINFO */
-icalproperty* icalproperty_new_xlicmimeoptinfo(char* v);
-icalproperty* icalproperty_vanew_xlicmimeoptinfo(char* v, ...);
-void icalproperty_set_xlicmimeoptinfo(icalproperty* prop, char* v);
-char* icalproperty_get_xlicmimeoptinfo(icalproperty* prop);
+icalproperty* icalproperty_new_xlicmimeoptinfo(const char* v);
+icalproperty* icalproperty_vanew_xlicmimeoptinfo(const char* v, ...);
+void icalproperty_set_xlicmimeoptinfo(icalproperty* prop, const char* v);
+const char* icalproperty_get_xlicmimeoptinfo(icalproperty* prop);
/* RELATED-TO */
-icalproperty* icalproperty_new_relatedto(char* v);
-icalproperty* icalproperty_vanew_relatedto(char* v, ...);
-void icalproperty_set_relatedto(icalproperty* prop, char* v);
-char* icalproperty_get_relatedto(icalproperty* prop);
+icalproperty* icalproperty_new_relatedto(const char* v);
+icalproperty* icalproperty_vanew_relatedto(const char* v, ...);
+void icalproperty_set_relatedto(icalproperty* prop, const char* v);
+const char* icalproperty_get_relatedto(icalproperty* prop);
/* ORGANIZER */
-icalproperty* icalproperty_new_organizer(char* v);
-icalproperty* icalproperty_vanew_organizer(char* v, ...);
-void icalproperty_set_organizer(icalproperty* prop, char* v);
-char* icalproperty_get_organizer(icalproperty* prop);
+icalproperty* icalproperty_new_organizer(const char* v);
+icalproperty* icalproperty_vanew_organizer(const char* v, ...);
+void icalproperty_set_organizer(icalproperty* prop, const char* v);
+const char* icalproperty_get_organizer(icalproperty* prop);
/* COMMENT */
-icalproperty* icalproperty_new_comment(char* v);
-icalproperty* icalproperty_vanew_comment(char* v, ...);
-void icalproperty_set_comment(icalproperty* prop, char* v);
-char* icalproperty_get_comment(icalproperty* prop);
+icalproperty* icalproperty_new_comment(const char* v);
+icalproperty* icalproperty_vanew_comment(const char* v, ...);
+void icalproperty_set_comment(icalproperty* prop, const char* v);
+const char* icalproperty_get_comment(icalproperty* prop);
/* X-LIC-ERROR */
-icalproperty* icalproperty_new_xlicerror(char* v);
-icalproperty* icalproperty_vanew_xlicerror(char* v, ...);
-void icalproperty_set_xlicerror(icalproperty* prop, char* v);
-char* icalproperty_get_xlicerror(icalproperty* prop);
+icalproperty* icalproperty_new_xlicerror(const char* v);
+icalproperty* icalproperty_vanew_xlicerror(const char* v, ...);
+void icalproperty_set_xlicerror(icalproperty* prop, const char* v);
+const char* icalproperty_get_xlicerror(icalproperty* prop);
/* TRIGGER */
icalproperty* icalproperty_new_trigger(union icaltriggertype v);
@@ -179,16 +183,16 @@ void icalproperty_set_trigger(icalproperty* prop, union icaltriggertype v);
union icaltriggertype icalproperty_get_trigger(icalproperty* prop);
/* CLASS */
-icalproperty* icalproperty_new_class(char* v);
-icalproperty* icalproperty_vanew_class(char* v, ...);
-void icalproperty_set_class(icalproperty* prop, char* v);
-char* icalproperty_get_class(icalproperty* prop);
+icalproperty* icalproperty_new_class(const char* v);
+icalproperty* icalproperty_vanew_class(const char* v, ...);
+void icalproperty_set_class(icalproperty* prop, const char* v);
+const char* icalproperty_get_class(icalproperty* prop);
/* X */
-icalproperty* icalproperty_new_x(char* v);
-icalproperty* icalproperty_vanew_x(char* v, ...);
-void icalproperty_set_x(icalproperty* prop, char* v);
-char* icalproperty_get_x(icalproperty* prop);
+icalproperty* icalproperty_new_x(const char* v);
+icalproperty* icalproperty_vanew_x(const char* v, ...);
+void icalproperty_set_x(icalproperty* prop, const char* v);
+const char* icalproperty_get_x(icalproperty* prop);
/* TZOFFSETTO */
icalproperty* icalproperty_new_tzoffsetto(int v);
@@ -197,16 +201,16 @@ void icalproperty_set_tzoffsetto(icalproperty* prop, int v);
int icalproperty_get_tzoffsetto(icalproperty* prop);
/* TRANSP */
-icalproperty* icalproperty_new_transp(char* v);
-icalproperty* icalproperty_vanew_transp(char* v, ...);
-void icalproperty_set_transp(icalproperty* prop, char* v);
-char* icalproperty_get_transp(icalproperty* prop);
+icalproperty* icalproperty_new_transp(const char* v);
+icalproperty* icalproperty_vanew_transp(const char* v, ...);
+void icalproperty_set_transp(icalproperty* prop, const char* v);
+const char* icalproperty_get_transp(icalproperty* prop);
/* X-LIC-MIMEENCODING */
-icalproperty* icalproperty_new_xlicmimeencoding(char* v);
-icalproperty* icalproperty_vanew_xlicmimeencoding(char* v, ...);
-void icalproperty_set_xlicmimeencoding(icalproperty* prop, char* v);
-char* icalproperty_get_xlicmimeencoding(icalproperty* prop);
+icalproperty* icalproperty_new_xlicmimeencoding(const char* v);
+icalproperty* icalproperty_vanew_xlicmimeencoding(const char* v, ...);
+void icalproperty_set_xlicmimeencoding(icalproperty* prop, const char* v);
+const char* icalproperty_get_xlicmimeencoding(icalproperty* prop);
/* SEQUENCE */
icalproperty* icalproperty_new_sequence(int v);
@@ -215,16 +219,16 @@ void icalproperty_set_sequence(icalproperty* prop, int v);
int icalproperty_get_sequence(icalproperty* prop);
/* LOCATION */
-icalproperty* icalproperty_new_location(char* v);
-icalproperty* icalproperty_vanew_location(char* v, ...);
-void icalproperty_set_location(icalproperty* prop, char* v);
-char* icalproperty_get_location(icalproperty* prop);
+icalproperty* icalproperty_new_location(const char* v);
+icalproperty* icalproperty_vanew_location(const char* v, ...);
+void icalproperty_set_location(icalproperty* prop, const char* v);
+const char* icalproperty_get_location(icalproperty* prop);
/* REQUEST-STATUS */
-icalproperty* icalproperty_new_requeststatus(char* v);
-icalproperty* icalproperty_vanew_requeststatus(char* v, ...);
-void icalproperty_set_requeststatus(icalproperty* prop, char* v);
-char* icalproperty_get_requeststatus(icalproperty* prop);
+icalproperty* icalproperty_new_requeststatus(const char* v);
+icalproperty* icalproperty_vanew_requeststatus(const char* v, ...);
+void icalproperty_set_requeststatus(icalproperty* prop, const char* v);
+const char* icalproperty_get_requeststatus(icalproperty* prop);
/* EXDATE */
icalproperty* icalproperty_new_exdate(struct icaltimetype v);
@@ -233,22 +237,22 @@ void icalproperty_set_exdate(icalproperty* prop, struct icaltimetype v);
struct icaltimetype icalproperty_get_exdate(icalproperty* prop);
/* TZID */
-icalproperty* icalproperty_new_tzid(char* v);
-icalproperty* icalproperty_vanew_tzid(char* v, ...);
-void icalproperty_set_tzid(icalproperty* prop, char* v);
-char* icalproperty_get_tzid(icalproperty* prop);
+icalproperty* icalproperty_new_tzid(const char* v);
+icalproperty* icalproperty_vanew_tzid(const char* v, ...);
+void icalproperty_set_tzid(icalproperty* prop, const char* v);
+const char* icalproperty_get_tzid(icalproperty* prop);
/* RESOURCES */
-icalproperty* icalproperty_new_resources(char* v);
-icalproperty* icalproperty_vanew_resources(char* v, ...);
-void icalproperty_set_resources(icalproperty* prop, char* v);
-char* icalproperty_get_resources(icalproperty* prop);
+icalproperty* icalproperty_new_resources(const char* v);
+icalproperty* icalproperty_vanew_resources(const char* v, ...);
+void icalproperty_set_resources(icalproperty* prop, const char* v);
+const char* icalproperty_get_resources(icalproperty* prop);
/* TZURL */
-icalproperty* icalproperty_new_tzurl(char* v);
-icalproperty* icalproperty_vanew_tzurl(char* v, ...);
-void icalproperty_set_tzurl(icalproperty* prop, char* v);
-char* icalproperty_get_tzurl(icalproperty* prop);
+icalproperty* icalproperty_new_tzurl(const char* v);
+icalproperty* icalproperty_vanew_tzurl(const char* v, ...);
+void icalproperty_set_tzurl(icalproperty* prop, const char* v);
+const char* icalproperty_get_tzurl(icalproperty* prop);
/* REPEAT */
icalproperty* icalproperty_new_repeat(int v);
@@ -281,10 +285,10 @@ void icalproperty_set_recurrenceid(icalproperty* prop, struct icaltimetype v);
struct icaltimetype icalproperty_get_recurrenceid(icalproperty* prop);
/* SUMMARY */
-icalproperty* icalproperty_new_summary(char* v);
-icalproperty* icalproperty_vanew_summary(char* v, ...);
-void icalproperty_set_summary(icalproperty* prop, char* v);
-char* icalproperty_get_summary(icalproperty* prop);
+icalproperty* icalproperty_new_summary(const char* v);
+icalproperty* icalproperty_vanew_summary(const char* v, ...);
+void icalproperty_set_summary(icalproperty* prop, const char* v);
+const char* icalproperty_get_summary(icalproperty* prop);
/* DTEND */
icalproperty* icalproperty_new_dtend(struct icaltimetype v);
@@ -293,10 +297,10 @@ void icalproperty_set_dtend(icalproperty* prop, struct icaltimetype v);
struct icaltimetype icalproperty_get_dtend(icalproperty* prop);
/* TZNAME */
-icalproperty* icalproperty_new_tzname(char* v);
-icalproperty* icalproperty_vanew_tzname(char* v, ...);
-void icalproperty_set_tzname(icalproperty* prop, char* v);
-char* icalproperty_get_tzname(icalproperty* prop);
+icalproperty* icalproperty_new_tzname(const char* v);
+icalproperty* icalproperty_vanew_tzname(const char* v, ...);
+void icalproperty_set_tzname(icalproperty* prop, const char* v);
+const char* icalproperty_get_tzname(icalproperty* prop);
/* RDATE */
icalproperty* icalproperty_new_rdate(struct icalperiodtype v);
@@ -305,16 +309,16 @@ void icalproperty_set_rdate(icalproperty* prop, struct icalperiodtype v);
struct icalperiodtype icalproperty_get_rdate(icalproperty* prop);
/* X-LIC-MIMEFILENAME */
-icalproperty* icalproperty_new_xlicmimefilename(char* v);
-icalproperty* icalproperty_vanew_xlicmimefilename(char* v, ...);
-void icalproperty_set_xlicmimefilename(icalproperty* prop, char* v);
-char* icalproperty_get_xlicmimefilename(icalproperty* prop);
+icalproperty* icalproperty_new_xlicmimefilename(const char* v);
+icalproperty* icalproperty_vanew_xlicmimefilename(const char* v, ...);
+void icalproperty_set_xlicmimefilename(icalproperty* prop, const char* v);
+const char* icalproperty_get_xlicmimefilename(icalproperty* prop);
/* URL */
-icalproperty* icalproperty_new_url(char* v);
-icalproperty* icalproperty_vanew_url(char* v, ...);
-void icalproperty_set_url(icalproperty* prop, char* v);
-char* icalproperty_get_url(icalproperty* prop);
+icalproperty* icalproperty_new_url(const char* v);
+icalproperty* icalproperty_vanew_url(const char* v, ...);
+void icalproperty_set_url(icalproperty* prop, const char* v);
+const char* icalproperty_get_url(icalproperty* prop);
/* X-LIC-CLUSTERCOUNT */
icalproperty* icalproperty_new_xlicclustercount(int v);
@@ -335,10 +339,10 @@ void icalproperty_set_exrule(icalproperty* prop, struct icalrecurrencetype v);
struct icalrecurrencetype icalproperty_get_exrule(icalproperty* prop);
/* QUERY */
-icalproperty* icalproperty_new_query(char* v);
-icalproperty* icalproperty_vanew_query(char* v, ...);
-void icalproperty_set_query(icalproperty* prop, char* v);
-char* icalproperty_get_query(icalproperty* prop);
+icalproperty* icalproperty_new_query(const char* v);
+icalproperty* icalproperty_vanew_query(const char* v, ...);
+void icalproperty_set_query(icalproperty* prop, const char* v);
+const char* icalproperty_get_query(icalproperty* prop);
/* PERCENT-COMPLETE */
icalproperty* icalproperty_new_percentcomplete(int v);
@@ -347,10 +351,10 @@ void icalproperty_set_percentcomplete(icalproperty* prop, int v);
int icalproperty_get_percentcomplete(icalproperty* prop);
/* CALSCALE */
-icalproperty* icalproperty_new_calscale(char* v);
-icalproperty* icalproperty_vanew_calscale(char* v, ...);
-void icalproperty_set_calscale(icalproperty* prop, char* v);
-char* icalproperty_get_calscale(icalproperty* prop);
+icalproperty* icalproperty_new_calscale(const char* v);
+icalproperty* icalproperty_vanew_calscale(const char* v, ...);
+void icalproperty_set_calscale(icalproperty* prop, const char* v);
+const char* icalproperty_get_calscale(icalproperty* prop);
/* CREATED */
icalproperty* icalproperty_new_created(struct icaltimetype v);
@@ -365,10 +369,10 @@ void icalproperty_set_geo(icalproperty* prop, struct icalgeotype v);
struct icalgeotype icalproperty_get_geo(icalproperty* prop);
/* X-LIC-MIMECHARSET */
-icalproperty* icalproperty_new_xlicmimecharset(char* v);
-icalproperty* icalproperty_vanew_xlicmimecharset(char* v, ...);
-void icalproperty_set_xlicmimecharset(icalproperty* prop, char* v);
-char* icalproperty_get_xlicmimecharset(icalproperty* prop);
+icalproperty* icalproperty_new_xlicmimecharset(const char* v);
+icalproperty* icalproperty_vanew_xlicmimecharset(const char* v, ...);
+void icalproperty_set_xlicmimecharset(icalproperty* prop, const char* v);
+const char* icalproperty_get_xlicmimecharset(icalproperty* prop);
/* COMPLETED */
icalproperty* icalproperty_new_completed(struct icaltimetype v);
@@ -389,8 +393,8 @@ void icalproperty_set_due(icalproperty* prop, struct icaltimetype v);
struct icaltimetype icalproperty_get_due(icalproperty* prop);
/* ACTION */
-icalproperty* icalproperty_new_action(char* v);
-icalproperty* icalproperty_vanew_action(char* v, ...);
-void icalproperty_set_action(icalproperty* prop, char* v);
-char* icalproperty_get_action(icalproperty* prop);
-#endif ICALPROPERTY_H
+icalproperty* icalproperty_new_action(const char* v);
+icalproperty* icalproperty_vanew_action(const char* v, ...);
+void icalproperty_set_action(icalproperty* prop, const char* v);
+const char* icalproperty_get_action(icalproperty* prop);
+#endif /*ICALPROPERTY_H*/
diff --git a/libical/src/libical/icalrecur.c b/libical/src/libical/icalrecur.c
index a4b51e60d5..9ec1b699c0 100644
--- a/libical/src/libical/icalrecur.c
+++ b/libical/src/libical/icalrecur.c
@@ -25,7 +25,7 @@
Processing starts when the caller generates a new recurrence
iterator via icalrecur_iterator_new(). This routine copies the
- recurrence rule into the iterator, extracts things like start and
+ recurrence rule into the iterator and extracts things like start and
end dates. Then, it checks if the rule is legal, using some logic
from RFC2445 and some logic that probably should be in RFC2445.
@@ -118,18 +118,25 @@
#endif
#include "icalrecur.h"
+
+#ifdef ICAL_NO_LIBICAL
#include "icalerror.h"
-#include "icalmemory.h"
+#else
+#define icalerror_set_errno(x)
+#define icalerror_check_arg_rv(x,y)
+#endif
+
#include <stdlib.h> /* for malloc */
#include <errno.h> /* for errno */
-#include <string.h> /* for icalmemory_strdup */
+#include <string.h> /* for strdup */
#include <assert.h>
-#include <limits.h> /* for SHRT_MAX */
#define TEMP_MAX 1024
+
+
enum byrule {
NO_CONTRACTION = -1,
BY_SECOND = 0,
@@ -147,7 +154,7 @@ enum byrule {
struct icalrecur_iterator_impl {
- struct icaltimetype dtstart;
+ 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 */
struct icalrecurrencetype rule;
@@ -181,6 +188,10 @@ enum expand_table {
ILLEGAL=3
};
+/* The split map indicates, for a particular interval, wether a BY_*
+ rule part expands the number of instances in the occcurrence set or
+ contracts it. 1=> contract, 2=>expand, and 3 means the pairing is
+ not allowed. */
struct expand_split_map_struct
{
icalrecurrencetype_frequency frequency;
@@ -193,14 +204,14 @@ struct expand_split_map_struct
struct expand_split_map_struct expand_map[] =
{
- {ICAL_SECONDLY_RECURRENCE,1,1,1,1,1,1,1,1},
- {ICAL_MINUTELY_RECURRENCE,2,1,1,1,1,1,1,1},
- {ICAL_HOURLY_RECURRENCE, 2,2,1,1,1,1,1,1},
- {ICAL_DAILY_RECURRENCE, 2,2,2,1,1,1,1,1},
- {ICAL_WEEKLY_RECURRENCE, 2,2,2,2,3,3,1,1},
- {ICAL_MONTHLY_RECURRENCE, 2,2,2,2,2,3,3,1},
- {ICAL_YEARLY_RECURRENCE, 2,2,2,2,2,2,2,2},
- {ICAL_NO_RECURRENCE, 0,0,0,0,0,0,0,0}
+ {ICAL_SECONDLY_RECURRENCE,{1,1,1,1,1,1,1,1}},
+ {ICAL_MINUTELY_RECURRENCE,{2,1,1,1,1,1,1,1}},
+ {ICAL_HOURLY_RECURRENCE, {2,2,1,1,1,1,1,1}},
+ {ICAL_DAILY_RECURRENCE, {2,2,2,1,1,1,1,1}},
+ {ICAL_WEEKLY_RECURRENCE, {2,2,2,2,3,3,1,1}},
+ {ICAL_MONTHLY_RECURRENCE, {2,2,2,2,2,3,3,1}},
+ {ICAL_YEARLY_RECURRENCE, {2,2,2,2,2,2,2,2}},
+ {ICAL_NO_RECURRENCE, {0,0,0,0,0,0,0,0}}
};
@@ -278,7 +289,7 @@ void setup_defaults(struct icalrecur_iterator_impl* impl,
freq = impl->rule.freq;
/* Re-write the BY rule arrays with data from the DTSTART time so
- we don't hav to explicitly deal with DTSTART */
+ we don't have to explicitly deal with DTSTART */
if(impl->by_ptrs[byrule][0] == ICAL_RECURRENCE_ARRAY_MAX &&
expand_map[freq].map[byrule] != CONTRACT){
@@ -296,7 +307,8 @@ void setup_defaults(struct icalrecur_iterator_impl* impl,
int expand_year_days(struct icalrecur_iterator_impl* impl,short year);
-icalrecur_iterator* icalrecur_iterator_new(struct icalrecurrencetype rule, struct icaltimetype dtstart)
+icalrecur_iterator* icalrecur_iterator_new(struct icalrecurrencetype rule,
+ struct icaltimetype dtstart)
{
struct icalrecur_iterator_impl* impl;
icalrecurrencetype_frequency freq;
@@ -388,7 +400,9 @@ icalrecur_iterator* icalrecur_iterator_new(struct icalrecurrencetype rule, struc
/* Rewrite some of the rules and set up defaults to make later
- processing easier */
+ processing easier. Primarily, this involves copying an element
+ from the start time into the coresponding BY_* array when the
+ BY_* array is empty */
setup_defaults(impl,BY_SECOND,ICAL_SECONDLY_RECURRENCE,impl->dtstart.second,
@@ -445,63 +459,121 @@ void increment_year(struct icalrecur_iterator_impl* impl, int inc)
void increment_month(struct icalrecur_iterator_impl* impl, int inc)
{
+ int years;
+
impl->last.month+=inc;
- if (impl->last.month > 12){
- impl->last.month = 1;
- increment_year(impl,1);
+ /* Months are offset by one */
+ impl->last.month--;
+
+ years = impl->last.month / 12;
+
+ impl->last.month = impl->last.month % 12;
+
+ impl->last.month++;
+
+ if (years != 0){
+ increment_year(impl,years);
}
}
void increment_monthday(struct icalrecur_iterator_impl* impl, int inc)
{
-
- short days_in_month = icaltime_days_in_month(impl->last.month,impl->last.year);
+ int i;
- impl->last.day+=inc;
+ for(i=0; i<inc; i++){
+
+ short days_in_month =
+ icaltime_days_in_month(impl->last.month,impl->last.year);
- if (impl->last.day > days_in_month){
- int md = impl->last.day -days_in_month;
- impl->last.day = md;
- increment_month(impl,1);
+ impl->last.day++;
+
+ if (impl->last.day > days_in_month){
+ impl->last.day = impl->last.day-days_in_month;
+ increment_month(impl,1);
+ }
}
-
}
void increment_hour(struct icalrecur_iterator_impl* impl, int inc)
{
+ short days;
+
impl->last.hour+=inc;
- if (impl->last.hour > 24){
- impl->last.hour = 0;
- increment_monthday(impl,1);
- }
+ days = impl->last.hour / 24;
+ impl->last.hour = impl->last.hour % 24;
+ if (impl->days != 0){
+ increment_monthday(impl,days);
+ }
}
void increment_minute(struct icalrecur_iterator_impl* impl, int inc)
{
+ short hours;
+
impl->last.minute+=inc;
- if (impl->last.minute > 59){
- impl->last.minute = 0;
- increment_hour(impl,1);
+ hours = impl->last.minute / 60;
+ impl->last.minute = impl->last.minute % 60;
+
+ if (hours != 0){
+ increment_hour(impl,hours);
}
}
void increment_second(struct icalrecur_iterator_impl* impl, int inc)
{
+ short minutes;
+
impl->last.second+=inc;
+
+ minutes = impl->last.second / 60;
+ impl->last.second = impl->last.second % 60;
+
+ if (minutes != 0)
+ {
+ increment_minute(impl, minutes);
+ }
+}
- if (impl->last.second > 59){
- impl->last.second = 0;
- increment_minute(impl,1);
- }
+#if 1
+
+#include "ical.h"
+void test_increment()
+{
+ struct icalrecur_iterator_impl impl;
+
+ impl.last = icaltime_from_string("20000101T000000Z");
+ printf("Orig: %s\n",icaltime_as_ctime(impl.last));
+
+ increment_second(&impl,5);
+ printf("+ 5 sec : %s\n",icaltime_as_ctime(impl.last));
+
+ increment_second(&impl,355);
+ printf("+ 355 sec : %s\n",icaltime_as_ctime(impl.last));
+
+ increment_minute(&impl,5);
+ printf("+ 5 min : %s\n",icaltime_as_ctime(impl.last));
+
+ increment_minute(&impl,360);
+ printf("+ 360 min : %s\n",icaltime_as_ctime(impl.last));
+ increment_hour(&impl,5);
+ printf("+ 5 hours : %s\n",icaltime_as_ctime(impl.last));
+ increment_hour(&impl,43);
+ printf("+ 43 hours : %s\n",icaltime_as_ctime(impl.last));
+ increment_monthday(&impl,3);
+ printf("+ 3 days : %s\n",icaltime_as_ctime(impl.last));
+ increment_monthday(&impl,600);
+ printf("+ 600 days : %s\n",icaltime_as_ctime(impl.last));
+
}
+#endif
short next_second(struct icalrecur_iterator_impl* impl)
{
@@ -766,6 +838,8 @@ int next_weekday(struct icalrecur_iterator_impl* impl)
end_of_data = 1;
}
+ /* 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);
@@ -1146,29 +1220,94 @@ struct icaltimetype icalrecur_iterator_next(icalrecur_iterator *itr)
return impl->last;
}
-#include "ical.h"
-void icalrecurrencetype_test()
+
+/************************** Type Routines **********************/
+
+
+void icalrecurrencetype_clear(struct icalrecurrencetype *recur)
{
- icalvalue *v = icalvalue_new_from_string(
- ICAL_RECUR_VALUE,
- "FREQ=YEARLY;UNTIL=20060101T000000;INTERVAL=2;BYDAY=SU,WE;BYSECOND=15,30; BYMONTH=1,6,11");
+ memset(recur,ICAL_RECURRENCE_ARRAY_MAX_BYTE,
+ sizeof(struct icalrecurrencetype));
+
+ recur->week_start = ICAL_MONDAY_WEEKDAY;
+ recur->freq = ICAL_NO_RECURRENCE;
+ recur->interval = 1;
+ memset(&(recur->until),0,sizeof(struct icaltimetype));
+ recur->count = 0;
+}
- struct icalrecurrencetype r = icalvalue_get_recur(v);
- struct icaltimetype t = icaltime_from_timet( time(0), 0, 0);
- struct icaltimetype next;
- time_t tt;
+/* The 'day' element of icalrecurrencetype_weekday is encoded to allow
+reporesentation of both the day of the week ( Monday, Tueday), but
+also the Nth day of the week ( First tuesday of the month, last
+thursday of the year) These routines decode the day values.
- struct icalrecur_iterator_impl* itr
- = (struct icalrecur_iterator_impl*) icalrecur_iterator_new(r,t);
+The day's position in the period ( Nth-ness) and the numerical value
+of the day are encoded together as: pos*7 + dow
+ */
- do {
+enum icalrecurrencetype_weekday icalrecurrencetype_day_day_of_week(short day)
+{
+ return abs(day)%8;
+}
+
+short icalrecurrencetype_day_position(short day)
+{
+ return (day-icalrecurrencetype_day_day_of_week(day))/8;
+}
- next = icalrecur_iterator_next(itr);
- tt = icaltime_as_timet(next);
- printf("%s",ctime(&tt ));
+/****************** Enumeration Routines ******************/
+
+struct {icalrecurrencetype_weekday wd; const char * str; }
+wd_map[] = {
+ {ICAL_SUNDAY_WEEKDAY,"SU"},
+ {ICAL_MONDAY_WEEKDAY,"MO"},
+ {ICAL_TUESDAY_WEEKDAY,"TU"},
+ {ICAL_WEDNESDAY_WEEKDAY,"WE"},
+ {ICAL_THURSDAY_WEEKDAY,"TH"},
+ {ICAL_FRIDAY_WEEKDAY,"FR"},
+ {ICAL_SATURDAY_WEEKDAY,"SA"},
+ {ICAL_NO_WEEKDAY,0}
+};
+
+const char* icalrecur_weekday_to_string(icalrecurrencetype_weekday kind)
+{
+ int i;
- } while( ! icaltime_is_null_time(next));
-
+ for (i=0; wd_map[i].wd != ICAL_NO_WEEKDAY; i++) {
+ if ( wd_map[i].wd == kind) {
+ return wd_map[i].str;
+ }
+ }
+
+ return 0;
}
+
+struct {
+ icalrecurrencetype_frequency kind;
+ const char* str;
+} freq_map[] = {
+ {ICAL_SECONDLY_RECURRENCE,"SECONDLY"},
+ {ICAL_MINUTELY_RECURRENCE,"MINUTELY"},
+ {ICAL_HOURLY_RECURRENCE,"HOURLY"},
+ {ICAL_DAILY_RECURRENCE,"DAILY"},
+ {ICAL_WEEKLY_RECURRENCE,"WEEKLY"},
+ {ICAL_MONTHLY_RECURRENCE,"MONTHLY"},
+ {ICAL_YEARLY_RECURRENCE,"YEARLY"},
+ {ICAL_NO_RECURRENCE,0}
+};
+
+const char* icalrecur_recurrence_to_string(icalrecurrencetype_frequency kind)
+{
+ int i;
+
+ for (i=0; freq_map[i].kind != ICAL_NO_RECURRENCE ; i++) {
+ if ( freq_map[i].kind == kind ) {
+ return freq_map[i].str;
+ }
+ }
+ return 0;
+}
+
+
diff --git a/libical/src/libical/icalrecur.h b/libical/src/libical/icalrecur.h
index cfafc01b02..fe82ff960c 100644
--- a/libical/src/libical/icalrecur.h
+++ b/libical/src/libical/icalrecur.h
@@ -17,7 +17,6 @@
The Mozilla Public License Version 1.0. You may obtain a copy of
the License at http://www.mozilla.org/MPL/
- The original code is icaltypes.h
======================================================================*/
@@ -25,13 +24,116 @@
#define ICALRECUR_H
#include <time.h>
-#include "icaltypes.h"
-#include "icalenums.h" /* for recurrence enums */
+#include "icaltime.h"
+
+
+/***********************************************************************
+ * Recurrance enumerations
+**********************************************************************/
+
+typedef enum icalrecurrencetype_frequency
+{
+ /* These enums are used to index an array, so don't change the
+ order or the integers */
+
+ ICAL_SECONDLY_RECURRENCE=0,
+ ICAL_MINUTELY_RECURRENCE=1,
+ ICAL_HOURLY_RECURRENCE=2,
+ ICAL_DAILY_RECURRENCE=3,
+ ICAL_WEEKLY_RECURRENCE=4,
+ ICAL_MONTHLY_RECURRENCE=5,
+ ICAL_YEARLY_RECURRENCE=6,
+ ICAL_NO_RECURRENCE=7
+
+} icalrecurrencetype_frequency;
+
+typedef enum icalrecurrencetype_weekday
+{
+ ICAL_NO_WEEKDAY,
+ ICAL_SUNDAY_WEEKDAY,
+ ICAL_MONDAY_WEEKDAY,
+ ICAL_TUESDAY_WEEKDAY,
+ ICAL_WEDNESDAY_WEEKDAY,
+ ICAL_THURSDAY_WEEKDAY,
+ ICAL_FRIDAY_WEEKDAY,
+ ICAL_SATURDAY_WEEKDAY
+} icalrecurrencetype_weekday;
+
+enum {
+ ICAL_RECURRENCE_ARRAY_MAX = 0x7f7f,
+ ICAL_RECURRENCE_ARRAY_MAX_BYTE = 0x7f
+};
+
+const char* icalrecur_recurrence_to_string(icalrecurrencetype_frequency kind);
+const char* icalrecur_weekday_to_string(icalrecurrencetype_weekday kind);
+
+
+/********************** Recurrence type routines **************/
+
+/* See RFC 2445 Section 4.3.10, RECUR Value, for an explaination of
+ the values and fields in struct icalrecurrencetype */
+
+
+struct icalrecurrencetype
+{
+ icalrecurrencetype_frequency freq;
+
+
+ /* until and count are mutually exclusive. */
+ struct icaltimetype until; /* Hack. Must be time_t for general use */
+ int count;
+
+ short interval;
+
+ icalrecurrencetype_weekday week_start;
+
+ /* The BY* parameters can each take a list of values. Here I
+ * assume that the list of values will not be larger than the
+ * range of the value -- that is, the client will not name a
+ * value more than once.
+
+ * Each of the lists is terminated with the value
+ * ICALRECURRENCE_ARRAY_MAX unless the the list is full.
+ */
+
+ short by_second[61];
+ short by_minute[61];
+ short by_hour[25];
+ short by_day[8]; /* Encoded value, see below */
+ short by_month_day[32];
+ short by_year_day[367];
+ short by_week_no[54];
+ short by_month[13];
+ short by_set_pos[367];
+};
+
+
+void icalrecurrencetype_clear(struct icalrecurrencetype *r);
+
+/* The 'day' element of icalrecurrencetype_weekday is encoded to allow
+representation of both the day of the week ( Monday, Tueday), but also
+the Nth day of the week ( First tuesday of the month, last thursday of
+the year) These routines decode the day values */
+
+/* 1 == Monday, etc. */
+enum icalrecurrencetype_weekday icalrecurrencetype_day_day_of_week(short day);
+
+/* 0 == any of day of week. 1 == first, 2 = second, -2 == second to last, etc */
+short icalrecurrencetype_day_position(short day);
+
+/* Return the next occurance of 'r' after the time specified by 'after' */
+struct icaltimetype icalrecurrencetype_next_occurance(
+ struct icalrecurrencetype *r,
+ struct icaltimetype *after);
+
+
typedef void icalrecur_iterator;
void icalrecurrencetype_test();
+/********** recurrence routines ********************/
+
icalrecur_iterator* icalrecur_iterator_new(struct icalrecurrencetype rule, struct icaltimetype dtstart);
struct icaltimetype icalrecur_iterator_next(icalrecur_iterator*);
diff --git a/libical/src/libical/icalrestriction.c b/libical/src/libical/icalrestriction.c
index be0e292d28..8607c3adab 100644
--- a/libical/src/libical/icalrestriction.c
+++ b/libical/src/libical/icalrestriction.c
@@ -4,20 +4,29 @@
(C) COPYRIGHT 2000, Eric Busboom, http://www.softwarestudio.org
======================================================================*/
+/*#line 7 "icalrestriction.c.in"*/
#ifdef HAVE_CONFIG_H
-#include "config.h"
+#include <config.h>
#endif
-#include "icalenums.h"
#include "icalrestriction.h"
+#include "icalenums.h"
+#include "icalerror.h"
+
+#include <assert.h>
+#include <stdio.h> /* For snprintf */
#define TMP_BUF_SIZE 1024
+
/* Define the structs for the restrictions. these data are filled out
in machine generated code below */
-typedef int (*restriction_func)(icalcomponent* comp);
+struct icalrestriction_property_record;
+
+typedef char* (*restriction_func)(struct icalrestriction_property_record* rec,icalcomponent* comp,icalproperty* prop);
+
typedef struct icalrestriction_property_record {
icalproperty_method method;
@@ -36,9 +45,22 @@ typedef struct icalrestriction_component_record {
restriction_func function;
} icalrestriction_component_record;
+icalrestriction_property_record*
+icalrestriction_get_property_restriction(icalproperty_method method,
+ icalcomponent_kind component,
+ icalproperty_kind property);
+icalrestriction_component_record*
+icalrestriction_get_component_restriction(icalproperty_method method,
+ icalcomponent_kind component,
+ icalcomponent_kind subcomponent);
+
icalrestriction_component_record icalrestriction_component_records[];
icalrestriction_property_record icalrestriction_property_records[];
+icalrestriction_property_record null_prop_record = {ICAL_METHOD_NONE,ICAL_NO_COMPONENT,ICAL_NO_PROPERTY,ICAL_RESTRICTION_UNKNOWN,0};
+icalrestriction_component_record null_comp_record = {ICAL_METHOD_NONE,ICAL_NO_COMPONENT,ICAL_NO_COMPONENT,ICAL_RESTRICTION_UNKNOWN,0};
+
+
/* The each row gives the result of comparing a restriction against a
count. The columns in each row represent 0,1,2+. '-1' indicates
'invalid, 'don't care' or 'needs more analysis' So, for
@@ -86,22 +108,173 @@ icalrestriction_compare(icalrestriction_kind restr, int count){
}
-int icalrestriction_check_mutual(icalcomponent *comp){
- /* HACK. This function does nothing */
- return 1;
+/* Special case routines */
+
+char* icalrestriction_may_be_draft_final_canceled(
+ icalrestriction_property_record *rec,
+ icalcomponent* comp,
+ icalproperty* prop)
+{
+
+ icalproperty_status stat = icalproperty_get_status(prop);
+
+ if( !( stat == ICAL_STATUS_DRAFT ||
+ stat == ICAL_STATUS_FINAL ||
+ stat == ICAL_STATUS_CANCELLED )){
+
+ return "Failed iTIP restrictions for STATUS property. Value must be one of DRAFT, FINAL, or CANCELED";
+
+ }
+
+ return 0;
}
-int icalrestriction_check_exclusive(icalcomponent *comp){
- /* HACK. This function does nothing */
- return 1;
+char* icalrestriction_may_be_comp_need_process(
+ icalrestriction_property_record *rec,
+ icalcomponent* comp,
+ icalproperty* prop)
+{
+ icalproperty_status stat = icalproperty_get_status(prop);
+
+ if( !( stat == ICAL_STATUS_COMPLETED ||
+ stat == ICAL_STATUS_NEEDSACTION ||
+ stat == ICAL_STATUS_INPROCESS )){
+
+ return "Failed iTIP restrictions for STATUS property. Value must be one of COMPLETED, NEEDS-ACTION or IN-PROCESS";
+
+ }
+
+ return 0;
+}
+char* icalrestriction_may_be_tent_conf(icalrestriction_property_record *rec,
+ icalcomponent* comp,
+ icalproperty* prop){
+ icalproperty_status stat = icalproperty_get_status(prop);
+
+ if( !( stat == ICAL_STATUS_TENTATIVE ||
+ stat == ICAL_STATUS_CONFIRMED )){
+
+ return "Failed iTIP restrictions for STATUS property. Value must be one of TENTATIVE or CONFIRMED";
+
+ }
+
+ return 0;
+}
+char* icalrestriction_may_be_tent_conf_cancel(
+ icalrestriction_property_record *rec,
+ icalcomponent* comp,
+ icalproperty* prop)
+{
+ icalproperty_status stat = icalproperty_get_status(prop);
+
+ if( !( stat == ICAL_STATUS_TENTATIVE ||
+ stat == ICAL_STATUS_CONFIRMED ||
+ stat == ICAL_STATUS_CANCELLED )){
+
+ return "Failed iTIP restrictions for STATUS property. Value must be one of TENTATIVE, CONFIRMED or CANCELED";
+
+ }
+
+ return 0;
+}
+
+char* icalrestriction_must_be_cancel_if_present(
+ icalrestriction_property_record *rec,
+ icalcomponent* comp,
+ icalproperty* prop)
+{
+ /* This routine will not be called if prop == 0 */
+ icalproperty_status stat = icalproperty_get_status(prop);
+
+ if( stat != ICAL_STATUS_CANCELLED)
+ {
+ return "Failed iTIP restrictions for STATUS property. Value must be CANCELLED";
+
+ }
+
+
+ return 0;
}
+char* icalrestriction_must_be_canceled_no_attendee(
+ icalrestriction_property_record *rec,
+ icalcomponent* comp,
+ icalproperty* prop)
+{
+
+ /* Hack. see rfc2446, 3.2.5 CANCEL for porperty STATUS. I don't
+ understand the note */
+
+ return 0;
+}
+char* icalrestriction_must_be_recurring(icalrestriction_property_record *rec,
+ icalcomponent* comp,
+ icalproperty* prop){
+ /* Hack */
+ return 0;
+}
+char* icalrestriction_must_have_duration(icalrestriction_property_record *rec,
+ icalcomponent* comp,
+ icalproperty* prop){
+
+ if( !icalcomponent_get_first_property(comp,ICAL_DURATION_PROPERTY)){
+
+ return "Failed iTIP restrictions for STATUS property. This component must have a DURATION property";
+
+ }
+
+ return 0;
+}
+char* icalrestriction_must_have_repeat(icalrestriction_property_record *rec,
+ icalcomponent* comp,
+ icalproperty* prop){
+ if( !icalcomponent_get_first_property(comp,ICAL_REPEAT_PROPERTY)){
+
+ return "Failed iTIP restrictions for STATUS property. This component must have a REPEAT property";
+
+ }
+
+ return 0;
+}
+char* icalrestriction_must_if_tz_ref(icalrestriction_property_record *rec,
+ icalcomponent* comp,
+ icalproperty* prop){
+
+ /* Hack */
+ return 0;
+}
+char* icalrestriction_no_dtend(icalrestriction_property_record *rec,
+ icalcomponent* comp,
+ icalproperty* prop){
+
+ if( icalcomponent_get_first_property(comp,ICAL_DTEND_PROPERTY)){
+
+ return "Failed iTIP restrictions for DTEND property. The component must not have both DURATION and DTEND";
+
+ }
+
+ return 0;
+}
+char* icalrestriction_no_duration(icalrestriction_property_record *rec,
+ icalcomponent* comp,
+ icalproperty* prop){
+
+ /* _no_dtend takes care of this one */
+ return 0;
+}
+
+
int icalrestriction_check_component(icalproperty_method method,
icalcomponent* comp)
{
icalproperty_kind kind;
icalcomponent_kind comp_kind;
icalrestriction_kind restr;
+ icalrestriction_property_record *prop_record;
+ icalrestriction_component_record *comp_record;
+ char* funcr = 0;
+ icalproperty *prop;
+
int count;
int compare;
int valid = 1;
@@ -113,30 +286,30 @@ int icalrestriction_check_component(icalproperty_method method,
for(kind = ICAL_ANY_PROPERTY+1; kind != ICAL_NO_PROPERTY; kind++){
count = icalcomponent_count_properties(comp, kind);
- restr = icalrestriction_get_property_restriction(method,
+ prop_record = icalrestriction_get_property_restriction(method,
comp_kind,
kind);
+ restr = prop_record->restriction;
- if(restr == ICAL_RESTRICTION_ONEEXCLUSIVE ) {
- /* HACK. Treat this as a 0/1 restriction */
- restr = ICAL_RESTRICTION_ZEROORONE;
- compare = icalrestriction_compare(restr,count);
- } else if (restr == ICAL_RESTRICTION_ONEMUTUAL ) {
- /* HACK. Treat this as a 0/1 restriction */
+ if(restr == ICAL_RESTRICTION_ONEEXCLUSIVE ||
+ restr == ICAL_RESTRICTION_ONEMUTUAL) {
+
+ /* First treat is as a 0/1 restriction */
restr = ICAL_RESTRICTION_ZEROORONE;
compare = icalrestriction_compare(restr,count);
+
} else {
+
compare = icalrestriction_compare(restr,count);
}
assert(compare != -1);
-
if (compare == 0){
char temp[TMP_BUF_SIZE];
- snprintf(temp, TMP_BUF_SIZE,"Failed iTIP restrictions for property %s. Expected %s instances of the property and got %d",
+ snprintf(temp, TMP_BUF_SIZE,"Failed iTIP restrictions for %s property. Expected %s instances of the property and got %d",
icalenum_property_kind_to_string(kind),
restr_string_map[restr], count);
@@ -149,6 +322,25 @@ int icalrestriction_check_component(icalproperty_method method,
}
+ prop = icalcomponent_get_first_property(comp, kind);
+
+ if (prop != 0 && prop_record->function !=0 ){
+ funcr = prop_record->function(prop_record,comp,prop);
+ }
+
+ if(funcr !=0){
+ icalcomponent_add_property
+ (comp,
+ icalproperty_vanew_xlicerror(
+ funcr,
+ icalparameter_new_xlicerrortype(
+ ICAL_XLICERRORTYPE_INVALIDITIP),
+ 0));
+
+ compare = 0;
+ funcr = 0;
+ }
+
valid = valid && compare;
}
@@ -210,7 +402,7 @@ int icalrestriction_check(icalcomponent* outer_comp)
}
-icalrestriction_kind
+icalrestriction_property_record*
icalrestriction_get_property_restriction(icalproperty_method method,
icalcomponent_kind component,
icalproperty_kind property)
@@ -224,19 +416,20 @@ icalrestriction_get_property_restriction(icalproperty_method method,
if (method == icalrestriction_property_records[i].method &&
component == icalrestriction_property_records[i].component &&
property == icalrestriction_property_records[i].property ){
- return icalrestriction_property_records[i].restriction;
+ return &icalrestriction_property_records[i];
}
}
- return ICAL_RESTRICTION_UNKNOWN;
+ return &null_prop_record;
}
-icalrestriction_kind
+
+icalrestriction_component_record*
icalrestriction_get_component_restriction(icalproperty_method method,
icalcomponent_kind component,
icalcomponent_kind subcomponent)
{
-
+
int i;
for(i = 0;
@@ -246,11 +439,11 @@ icalrestriction_get_component_restriction(icalproperty_method method,
if (method == icalrestriction_component_records[i].method &&
component == icalrestriction_component_records[i].component &&
subcomponent == icalrestriction_component_records[i].subcomponent ){
- return icalrestriction_component_records[i].restriction;
+ return &icalrestriction_component_records[i];
}
}
- return ICAL_RESTRICTION_UNKNOWN;
+ return &null_comp_record;
}
/* Everything below this line is machine generated. Do not edit. */
@@ -260,7 +453,7 @@ icalrestriction_property_record icalrestriction_property_records[] = {
{ICAL_METHOD_PUBLISH,ICAL_VEVENT_COMPONENT,ICAL_ORGANIZER_PROPERTY,ICAL_RESTRICTION_ONE,0},
{ICAL_METHOD_PUBLISH,ICAL_VEVENT_COMPONENT,ICAL_SUMMARY_PROPERTY,ICAL_RESTRICTION_ONE,0},
{ICAL_METHOD_PUBLISH,ICAL_VEVENT_COMPONENT,ICAL_UID_PROPERTY,ICAL_RESTRICTION_ONE,0},
- {ICAL_METHOD_PUBLISH,ICAL_VEVENT_COMPONENT,ICAL_RECURRENCEID_PROPERTY,ICAL_RESTRICTION_ZEROORONE,0},
+ {ICAL_METHOD_PUBLISH,ICAL_VEVENT_COMPONENT,ICAL_RECURRENCEID_PROPERTY,ICAL_RESTRICTION_ZEROORONE,icalrestriction_must_be_recurring},
{ICAL_METHOD_PUBLISH,ICAL_VEVENT_COMPONENT,ICAL_SEQUENCE_PROPERTY,ICAL_RESTRICTION_ZEROORONE,0},
{ICAL_METHOD_PUBLISH,ICAL_VEVENT_COMPONENT,ICAL_ATTACH_PROPERTY,ICAL_RESTRICTION_ZEROPLUS,0},
{ICAL_METHOD_PUBLISH,ICAL_VEVENT_COMPONENT,ICAL_CATEGORIES_PROPERTY,ICAL_RESTRICTION_ZEROPLUS ,0},
@@ -281,7 +474,7 @@ icalrestriction_property_record icalrestriction_property_records[] = {
{ICAL_METHOD_PUBLISH,ICAL_VEVENT_COMPONENT,ICAL_RELATEDTO_PROPERTY,ICAL_RESTRICTION_ZEROPLUS,0},
{ICAL_METHOD_PUBLISH,ICAL_VEVENT_COMPONENT,ICAL_RESOURCES_PROPERTY,ICAL_RESTRICTION_ZEROORONE,0},
{ICAL_METHOD_PUBLISH,ICAL_VEVENT_COMPONENT,ICAL_RRULE_PROPERTY,ICAL_RESTRICTION_ZEROPLUS,0},
- {ICAL_METHOD_PUBLISH,ICAL_VEVENT_COMPONENT,ICAL_STATUS_PROPERTY,ICAL_RESTRICTION_ZEROORONE,0},
+ {ICAL_METHOD_PUBLISH,ICAL_VEVENT_COMPONENT,ICAL_STATUS_PROPERTY,ICAL_RESTRICTION_ZEROORONE,icalrestriction_may_be_tent_conf_cancel},
{ICAL_METHOD_PUBLISH,ICAL_VEVENT_COMPONENT,ICAL_TRANSP_PROPERTY,ICAL_RESTRICTION_ZEROORONE,0},
{ICAL_METHOD_PUBLISH,ICAL_VEVENT_COMPONENT,ICAL_URL_PROPERTY,ICAL_RESTRICTION_ZEROORONE,0},
{ICAL_METHOD_PUBLISH,ICAL_VEVENT_COMPONENT,ICAL_X_PROPERTY,ICAL_RESTRICTION_ZEROPLUS,0},
@@ -301,8 +494,8 @@ icalrestriction_property_record icalrestriction_property_records[] = {
{ICAL_METHOD_REQUEST,ICAL_VEVENT_COMPONENT,ICAL_CONTACT_PROPERTY,ICAL_RESTRICTION_ZEROPLUS,0},
{ICAL_METHOD_REQUEST,ICAL_VEVENT_COMPONENT,ICAL_CREATED_PROPERTY,ICAL_RESTRICTION_ZEROORONE,0},
{ICAL_METHOD_REQUEST,ICAL_VEVENT_COMPONENT,ICAL_DESCRIPTION_PROPERTY,ICAL_RESTRICTION_ZEROORONE,0},
- {ICAL_METHOD_REQUEST,ICAL_VEVENT_COMPONENT,ICAL_DTEND_PROPERTY,ICAL_RESTRICTION_ONEEXCLUSIVE,icalrestriction_check_exclusive},
- {ICAL_METHOD_REQUEST,ICAL_VEVENT_COMPONENT,ICAL_DURATION_PROPERTY,ICAL_RESTRICTION_ONEEXCLUSIVE,icalrestriction_check_exclusive},
+ {ICAL_METHOD_REQUEST,ICAL_VEVENT_COMPONENT,ICAL_DTEND_PROPERTY,ICAL_RESTRICTION_ONEEXCLUSIVE,icalrestriction_no_duration},
+ {ICAL_METHOD_REQUEST,ICAL_VEVENT_COMPONENT,ICAL_DURATION_PROPERTY,ICAL_RESTRICTION_ONEEXCLUSIVE,icalrestriction_no_dtend},
{ICAL_METHOD_REQUEST,ICAL_VEVENT_COMPONENT,ICAL_EXDATE_PROPERTY,ICAL_RESTRICTION_ZEROPLUS,0},
{ICAL_METHOD_REQUEST,ICAL_VEVENT_COMPONENT,ICAL_EXRULE_PROPERTY,ICAL_RESTRICTION_ZEROPLUS,0},
{ICAL_METHOD_REQUEST,ICAL_VEVENT_COMPONENT,ICAL_GEO_PROPERTY,ICAL_RESTRICTION_ZEROORONE,0},
@@ -310,19 +503,19 @@ icalrestriction_property_record icalrestriction_property_records[] = {
{ICAL_METHOD_REQUEST,ICAL_VEVENT_COMPONENT,ICAL_LOCATION_PROPERTY,ICAL_RESTRICTION_ZEROORONE,0},
{ICAL_METHOD_REQUEST,ICAL_VEVENT_COMPONENT,ICAL_PRIORITY_PROPERTY,ICAL_RESTRICTION_ZEROORONE,0},
{ICAL_METHOD_REQUEST,ICAL_VEVENT_COMPONENT,ICAL_RDATE_PROPERTY,ICAL_RESTRICTION_ZEROPLUS,0},
- {ICAL_METHOD_REQUEST,ICAL_VEVENT_COMPONENT,ICAL_RECURRENCEID_PROPERTY,ICAL_RESTRICTION_ZEROORONE,0},
+ {ICAL_METHOD_REQUEST,ICAL_VEVENT_COMPONENT,ICAL_RECURRENCEID_PROPERTY,ICAL_RESTRICTION_ZEROORONE,icalrestriction_must_be_recurring},
{ICAL_METHOD_REQUEST,ICAL_VEVENT_COMPONENT,ICAL_RELATEDTO_PROPERTY,ICAL_RESTRICTION_ZEROPLUS,0},
{ICAL_METHOD_REQUEST,ICAL_VEVENT_COMPONENT,ICAL_REQUESTSTATUS_PROPERTY,ICAL_RESTRICTION_ZEROPLUS,0},
{ICAL_METHOD_REQUEST,ICAL_VEVENT_COMPONENT,ICAL_RESOURCES_PROPERTY,ICAL_RESTRICTION_ZEROORONE,0},
{ICAL_METHOD_REQUEST,ICAL_VEVENT_COMPONENT,ICAL_RRULE_PROPERTY,ICAL_RESTRICTION_ZEROPLUS,0},
- {ICAL_METHOD_REQUEST,ICAL_VEVENT_COMPONENT,ICAL_STATUS_PROPERTY,ICAL_RESTRICTION_ZEROORONE,0},
+ {ICAL_METHOD_REQUEST,ICAL_VEVENT_COMPONENT,ICAL_STATUS_PROPERTY,ICAL_RESTRICTION_ZEROORONE,icalrestriction_may_be_tent_conf},
{ICAL_METHOD_REQUEST,ICAL_VEVENT_COMPONENT,ICAL_TRANSP_PROPERTY,ICAL_RESTRICTION_ZEROORONE,0},
{ICAL_METHOD_REQUEST,ICAL_VEVENT_COMPONENT,ICAL_URL_PROPERTY,ICAL_RESTRICTION_ZEROORONE,0},
{ICAL_METHOD_REQUEST,ICAL_VEVENT_COMPONENT,ICAL_X_PROPERTY,ICAL_RESTRICTION_ZEROPLUS,0},
{ICAL_METHOD_REPLY,ICAL_VEVENT_COMPONENT,ICAL_ATTENDEE_PROPERTY,ICAL_RESTRICTION_ONE,0},
{ICAL_METHOD_REPLY,ICAL_VEVENT_COMPONENT,ICAL_DTSTAMP_PROPERTY,ICAL_RESTRICTION_ONE,0},
{ICAL_METHOD_REPLY,ICAL_VEVENT_COMPONENT,ICAL_ORGANIZER_PROPERTY,ICAL_RESTRICTION_ONE,0},
- {ICAL_METHOD_REPLY,ICAL_VEVENT_COMPONENT,ICAL_RECURRENCEID_PROPERTY,ICAL_RESTRICTION_ZEROORONE,0},
+ {ICAL_METHOD_REPLY,ICAL_VEVENT_COMPONENT,ICAL_RECURRENCEID_PROPERTY,ICAL_RESTRICTION_ZEROORONE,icalrestriction_must_be_recurring},
{ICAL_METHOD_REPLY,ICAL_VEVENT_COMPONENT,ICAL_UID_PROPERTY,ICAL_RESTRICTION_ONE,0},
{ICAL_METHOD_REPLY,ICAL_VEVENT_COMPONENT,ICAL_SEQUENCE_PROPERTY,ICAL_RESTRICTION_ZEROORONE,0},
{ICAL_METHOD_REPLY,ICAL_VEVENT_COMPONENT,ICAL_ATTACH_PROPERTY,ICAL_RESTRICTION_ZEROPLUS,0},
@@ -332,9 +525,9 @@ icalrestriction_property_record icalrestriction_property_records[] = {
{ICAL_METHOD_REPLY,ICAL_VEVENT_COMPONENT,ICAL_CONTACT_PROPERTY,ICAL_RESTRICTION_ZEROPLUS,0},
{ICAL_METHOD_REPLY,ICAL_VEVENT_COMPONENT,ICAL_CREATED_PROPERTY,ICAL_RESTRICTION_ZEROORONE,0},
{ICAL_METHOD_REPLY,ICAL_VEVENT_COMPONENT,ICAL_DESCRIPTION_PROPERTY,ICAL_RESTRICTION_ZEROORONE,0},
- {ICAL_METHOD_REPLY,ICAL_VEVENT_COMPONENT,ICAL_DTEND_PROPERTY,ICAL_RESTRICTION_ONEEXCLUSIVE,icalrestriction_check_exclusive},
+ {ICAL_METHOD_REPLY,ICAL_VEVENT_COMPONENT,ICAL_DTEND_PROPERTY,ICAL_RESTRICTION_ONEEXCLUSIVE,icalrestriction_no_duration},
{ICAL_METHOD_REPLY,ICAL_VEVENT_COMPONENT,ICAL_DTSTART_PROPERTY,ICAL_RESTRICTION_ZEROORONE,0},
- {ICAL_METHOD_REPLY,ICAL_VEVENT_COMPONENT,ICAL_DURATION_PROPERTY,ICAL_RESTRICTION_ONEEXCLUSIVE,icalrestriction_check_exclusive},
+ {ICAL_METHOD_REPLY,ICAL_VEVENT_COMPONENT,ICAL_DURATION_PROPERTY,ICAL_RESTRICTION_ONEEXCLUSIVE,icalrestriction_no_dtend},
{ICAL_METHOD_REPLY,ICAL_VEVENT_COMPONENT,ICAL_EXDATE_PROPERTY,ICAL_RESTRICTION_ZEROPLUS,0},
{ICAL_METHOD_REPLY,ICAL_VEVENT_COMPONENT,ICAL_EXRULE_PROPERTY,ICAL_RESTRICTION_ZEROPLUS,0},
{ICAL_METHOD_REPLY,ICAL_VEVENT_COMPONENT,ICAL_GEO_PROPERTY,ICAL_RESTRICTION_ZEROORONE,0},
@@ -365,8 +558,8 @@ icalrestriction_property_record icalrestriction_property_records[] = {
{ICAL_METHOD_ADD,ICAL_VEVENT_COMPONENT,ICAL_CONTACT_PROPERTY,ICAL_RESTRICTION_ZEROPLUS,0},
{ICAL_METHOD_ADD,ICAL_VEVENT_COMPONENT,ICAL_CREATED_PROPERTY,ICAL_RESTRICTION_ZEROORONE,0},
{ICAL_METHOD_ADD,ICAL_VEVENT_COMPONENT,ICAL_DESCRIPTION_PROPERTY,ICAL_RESTRICTION_ZEROORONE,0},
- {ICAL_METHOD_ADD,ICAL_VEVENT_COMPONENT,ICAL_DTEND_PROPERTY,ICAL_RESTRICTION_ONEEXCLUSIVE, icalrestriction_check_exclusive},
- {ICAL_METHOD_ADD,ICAL_VEVENT_COMPONENT,ICAL_DURATION_PROPERTY,ICAL_RESTRICTION_ONEEXCLUSIVE, icalrestriction_check_exclusive},
+ {ICAL_METHOD_ADD,ICAL_VEVENT_COMPONENT,ICAL_DTEND_PROPERTY,ICAL_RESTRICTION_ONEEXCLUSIVE,icalrestriction_no_duration},
+ {ICAL_METHOD_ADD,ICAL_VEVENT_COMPONENT,ICAL_DURATION_PROPERTY,ICAL_RESTRICTION_ONEEXCLUSIVE,icalrestriction_no_duration},
{ICAL_METHOD_ADD,ICAL_VEVENT_COMPONENT,ICAL_EXDATE_PROPERTY,ICAL_RESTRICTION_ZEROPLUS,0},
{ICAL_METHOD_ADD,ICAL_VEVENT_COMPONENT,ICAL_EXRULE_PROPERTY,ICAL_RESTRICTION_ZEROPLUS,0},
{ICAL_METHOD_ADD,ICAL_VEVENT_COMPONENT,ICAL_GEO_PROPERTY,ICAL_RESTRICTION_ZEROORONE,0},
@@ -377,11 +570,11 @@ icalrestriction_property_record icalrestriction_property_records[] = {
{ICAL_METHOD_ADD,ICAL_VEVENT_COMPONENT,ICAL_RELATEDTO_PROPERTY,ICAL_RESTRICTION_ZEROPLUS,0},
{ICAL_METHOD_ADD,ICAL_VEVENT_COMPONENT,ICAL_RESOURCES_PROPERTY,ICAL_RESTRICTION_ZEROORONE,0},
{ICAL_METHOD_ADD,ICAL_VEVENT_COMPONENT,ICAL_RRULE_PROPERTY,ICAL_RESTRICTION_ZEROPLUS,0},
- {ICAL_METHOD_ADD,ICAL_VEVENT_COMPONENT,ICAL_STATUS_PROPERTY,ICAL_RESTRICTION_ZEROORONE,0},
+ {ICAL_METHOD_ADD,ICAL_VEVENT_COMPONENT,ICAL_STATUS_PROPERTY,ICAL_RESTRICTION_ZEROORONE,icalrestriction_may_be_tent_conf},
{ICAL_METHOD_ADD,ICAL_VEVENT_COMPONENT,ICAL_TRANSP_PROPERTY,ICAL_RESTRICTION_ZEROORONE,0},
{ICAL_METHOD_ADD,ICAL_VEVENT_COMPONENT,ICAL_URL_PROPERTY,ICAL_RESTRICTION_ZEROORONE,0},
{ICAL_METHOD_ADD,ICAL_VEVENT_COMPONENT,ICAL_X_PROPERTY,ICAL_RESTRICTION_ZEROPLUS,0},
- {ICAL_METHOD_ADD,ICAL_VEVENT_COMPONENT,ICAL_RECURRENCEID_PROPERTY,ICAL_RESTRICTION_ZERO,0},
+ {ICAL_METHOD_ADD,ICAL_VEVENT_COMPONENT,ICAL_RECURRENCEID_PROPERTY,ICAL_RESTRICTION_ZERO,icalrestriction_must_be_recurring},
{ICAL_METHOD_ADD,ICAL_VEVENT_COMPONENT,ICAL_REQUESTSTATUS_PROPERTY,ICAL_RESTRICTION_ZERO,0},
{ICAL_METHOD_CANCEL,ICAL_VEVENT_COMPONENT,ICAL_ATTENDEE_PROPERTY,ICAL_RESTRICTION_ZEROPLUS,0},
{ICAL_METHOD_CANCEL,ICAL_VEVENT_COMPONENT,ICAL_DTSTAMP_PROPERTY,ICAL_RESTRICTION_ONE,0},
@@ -395,9 +588,9 @@ icalrestriction_property_record icalrestriction_property_records[] = {
{ICAL_METHOD_CANCEL,ICAL_VEVENT_COMPONENT,ICAL_CONTACT_PROPERTY,ICAL_RESTRICTION_ZEROPLUS,0},
{ICAL_METHOD_CANCEL,ICAL_VEVENT_COMPONENT,ICAL_CREATED_PROPERTY,ICAL_RESTRICTION_ZEROORONE,0},
{ICAL_METHOD_CANCEL,ICAL_VEVENT_COMPONENT,ICAL_DESCRIPTION_PROPERTY,ICAL_RESTRICTION_ZEROORONE,0},
- {ICAL_METHOD_CANCEL,ICAL_VEVENT_COMPONENT,ICAL_DTEND_PROPERTY,ICAL_RESTRICTION_ONEEXCLUSIVE, icalrestriction_check_exclusive},
+ {ICAL_METHOD_CANCEL,ICAL_VEVENT_COMPONENT,ICAL_DTEND_PROPERTY,ICAL_RESTRICTION_ONEEXCLUSIVE ,icalrestriction_no_duration},
{ICAL_METHOD_CANCEL,ICAL_VEVENT_COMPONENT,ICAL_DTSTART_PROPERTY,ICAL_RESTRICTION_ZEROORONE,0},
- {ICAL_METHOD_CANCEL,ICAL_VEVENT_COMPONENT,ICAL_DURATION_PROPERTY,ICAL_RESTRICTION_ONEEXCLUSIVE, icalrestriction_check_exclusive},
+ {ICAL_METHOD_CANCEL,ICAL_VEVENT_COMPONENT,ICAL_DURATION_PROPERTY,ICAL_RESTRICTION_ONEEXCLUSIVE,icalrestriction_no_duration},
{ICAL_METHOD_CANCEL,ICAL_VEVENT_COMPONENT,ICAL_EXDATE_PROPERTY,ICAL_RESTRICTION_ZEROPLUS,0},
{ICAL_METHOD_CANCEL,ICAL_VEVENT_COMPONENT,ICAL_EXRULE_PROPERTY,ICAL_RESTRICTION_ZEROPLUS,0},
{ICAL_METHOD_CANCEL,ICAL_VEVENT_COMPONENT,ICAL_GEO_PROPERTY,ICAL_RESTRICTION_ZEROORONE,0},
@@ -405,11 +598,11 @@ icalrestriction_property_record icalrestriction_property_records[] = {
{ICAL_METHOD_CANCEL,ICAL_VEVENT_COMPONENT,ICAL_LOCATION_PROPERTY,ICAL_RESTRICTION_ZEROORONE,0},
{ICAL_METHOD_CANCEL,ICAL_VEVENT_COMPONENT,ICAL_PRIORITY_PROPERTY,ICAL_RESTRICTION_ZEROORONE,0},
{ICAL_METHOD_CANCEL,ICAL_VEVENT_COMPONENT,ICAL_RDATE_PROPERTY,ICAL_RESTRICTION_ZEROPLUS,0},
- {ICAL_METHOD_CANCEL,ICAL_VEVENT_COMPONENT,ICAL_RECURRENCEID_PROPERTY,ICAL_RESTRICTION_ZEROORONE,0},
+ {ICAL_METHOD_CANCEL,ICAL_VEVENT_COMPONENT,ICAL_RECURRENCEID_PROPERTY,ICAL_RESTRICTION_ZEROORONE,icalrestriction_must_be_recurring},
{ICAL_METHOD_CANCEL,ICAL_VEVENT_COMPONENT,ICAL_RELATEDTO_PROPERTY,ICAL_RESTRICTION_ZEROPLUS,0},
{ICAL_METHOD_CANCEL,ICAL_VEVENT_COMPONENT,ICAL_RESOURCES_PROPERTY,ICAL_RESTRICTION_ZEROORONE,0},
{ICAL_METHOD_CANCEL,ICAL_VEVENT_COMPONENT,ICAL_RRULE_PROPERTY,ICAL_RESTRICTION_ZEROPLUS,0},
- {ICAL_METHOD_CANCEL,ICAL_VEVENT_COMPONENT,ICAL_STATUS_PROPERTY,ICAL_RESTRICTION_ZEROORONE,0},
+ {ICAL_METHOD_CANCEL,ICAL_VEVENT_COMPONENT,ICAL_STATUS_PROPERTY,ICAL_RESTRICTION_ZEROORONE,icalrestriction_must_be_canceled_no_attendee},
{ICAL_METHOD_CANCEL,ICAL_VEVENT_COMPONENT,ICAL_SUMMARY_PROPERTY,ICAL_RESTRICTION_ZEROORONE,0},
{ICAL_METHOD_CANCEL,ICAL_VEVENT_COMPONENT,ICAL_TRANSP_PROPERTY,ICAL_RESTRICTION_ZEROORONE,0},
{ICAL_METHOD_CANCEL,ICAL_VEVENT_COMPONENT,ICAL_URL_PROPERTY,ICAL_RESTRICTION_ZEROORONE,0},
@@ -420,7 +613,7 @@ icalrestriction_property_record icalrestriction_property_records[] = {
{ICAL_METHOD_REFRESH,ICAL_VEVENT_COMPONENT,ICAL_ORGANIZER_PROPERTY,ICAL_RESTRICTION_ONE,0},
{ICAL_METHOD_REFRESH,ICAL_VEVENT_COMPONENT,ICAL_UID_PROPERTY,ICAL_RESTRICTION_ONE,0},
{ICAL_METHOD_REFRESH,ICAL_VEVENT_COMPONENT,ICAL_COMMENT_PROPERTY,ICAL_RESTRICTION_ZEROORONE,0},
- {ICAL_METHOD_REFRESH,ICAL_VEVENT_COMPONENT,ICAL_RECURRENCEID_PROPERTY,ICAL_RESTRICTION_ZEROORONE,0},
+ {ICAL_METHOD_REFRESH,ICAL_VEVENT_COMPONENT,ICAL_RECURRENCEID_PROPERTY,ICAL_RESTRICTION_ZEROORONE,icalrestriction_must_be_recurring},
{ICAL_METHOD_REFRESH,ICAL_VEVENT_COMPONENT,ICAL_X_PROPERTY,ICAL_RESTRICTION_ZEROPLUS,0},
{ICAL_METHOD_REFRESH,ICAL_VEVENT_COMPONENT,ICAL_ATTACH_PROPERTY,ICAL_RESTRICTION_ZERO,0},
{ICAL_METHOD_REFRESH,ICAL_VEVENT_COMPONENT,ICAL_CATEGORIES_PROPERTY,ICAL_RESTRICTION_ZERO,0},
@@ -461,8 +654,8 @@ icalrestriction_property_record icalrestriction_property_records[] = {
{ICAL_METHOD_COUNTER,ICAL_VEVENT_COMPONENT,ICAL_CONTACT_PROPERTY,ICAL_RESTRICTION_ZEROPLUS,0},
{ICAL_METHOD_COUNTER,ICAL_VEVENT_COMPONENT,ICAL_CREATED_PROPERTY,ICAL_RESTRICTION_ZEROORONE,0},
{ICAL_METHOD_COUNTER,ICAL_VEVENT_COMPONENT,ICAL_DESCRIPTION_PROPERTY,ICAL_RESTRICTION_ZEROORONE,0},
- {ICAL_METHOD_COUNTER,ICAL_VEVENT_COMPONENT,ICAL_DTEND_PROPERTY,ICAL_RESTRICTION_ONEEXCLUSIVE, icalrestriction_check_exclusive},
- {ICAL_METHOD_COUNTER,ICAL_VEVENT_COMPONENT,ICAL_DURATION_PROPERTY,ICAL_RESTRICTION_ONEEXCLUSIVE, icalrestriction_check_exclusive},
+ {ICAL_METHOD_COUNTER,ICAL_VEVENT_COMPONENT,ICAL_DTEND_PROPERTY,ICAL_RESTRICTION_ONEEXCLUSIVE,icalrestriction_no_duration},
+ {ICAL_METHOD_COUNTER,ICAL_VEVENT_COMPONENT,ICAL_DURATION_PROPERTY,ICAL_RESTRICTION_ONEEXCLUSIVE,icalrestriction_no_duration},
{ICAL_METHOD_COUNTER,ICAL_VEVENT_COMPONENT,ICAL_EXDATE_PROPERTY,ICAL_RESTRICTION_ZEROPLUS,0},
{ICAL_METHOD_COUNTER,ICAL_VEVENT_COMPONENT,ICAL_EXRULE_PROPERTY,ICAL_RESTRICTION_ZEROPLUS,0},
{ICAL_METHOD_COUNTER,ICAL_VEVENT_COMPONENT,ICAL_GEO_PROPERTY,ICAL_RESTRICTION_ZEROORONE,0},
@@ -470,12 +663,12 @@ icalrestriction_property_record icalrestriction_property_records[] = {
{ICAL_METHOD_COUNTER,ICAL_VEVENT_COMPONENT,ICAL_LOCATION_PROPERTY,ICAL_RESTRICTION_ZEROORONE,0},
{ICAL_METHOD_COUNTER,ICAL_VEVENT_COMPONENT,ICAL_PRIORITY_PROPERTY,ICAL_RESTRICTION_ZEROORONE,0},
{ICAL_METHOD_COUNTER,ICAL_VEVENT_COMPONENT,ICAL_RDATE_PROPERTY,ICAL_RESTRICTION_ZEROPLUS,0},
- {ICAL_METHOD_COUNTER,ICAL_VEVENT_COMPONENT,ICAL_RECURRENCEID_PROPERTY,ICAL_RESTRICTION_ZEROORONE,0},
+ {ICAL_METHOD_COUNTER,ICAL_VEVENT_COMPONENT,ICAL_RECURRENCEID_PROPERTY,ICAL_RESTRICTION_ZEROORONE,icalrestriction_must_be_recurring},
{ICAL_METHOD_COUNTER,ICAL_VEVENT_COMPONENT,ICAL_RELATEDTO_PROPERTY,ICAL_RESTRICTION_ZEROPLUS,0},
{ICAL_METHOD_COUNTER,ICAL_VEVENT_COMPONENT,ICAL_REQUESTSTATUS_PROPERTY,ICAL_RESTRICTION_ZEROPLUS,0},
{ICAL_METHOD_COUNTER,ICAL_VEVENT_COMPONENT,ICAL_RESOURCES_PROPERTY,ICAL_RESTRICTION_ZEROORONE,0},
{ICAL_METHOD_COUNTER,ICAL_VEVENT_COMPONENT,ICAL_RRULE_PROPERTY,ICAL_RESTRICTION_ZEROPLUS,0},
- {ICAL_METHOD_COUNTER,ICAL_VEVENT_COMPONENT,ICAL_STATUS_PROPERTY,ICAL_RESTRICTION_ZEROORONE,0},
+ {ICAL_METHOD_COUNTER,ICAL_VEVENT_COMPONENT,ICAL_STATUS_PROPERTY,ICAL_RESTRICTION_ZEROORONE,icalrestriction_may_be_tent_conf_cancel},
{ICAL_METHOD_COUNTER,ICAL_VEVENT_COMPONENT,ICAL_TRANSP_PROPERTY,ICAL_RESTRICTION_ZEROORONE,0},
{ICAL_METHOD_COUNTER,ICAL_VEVENT_COMPONENT,ICAL_URL_PROPERTY,ICAL_RESTRICTION_ZEROORONE,0},
{ICAL_METHOD_COUNTER,ICAL_VEVENT_COMPONENT,ICAL_X_PROPERTY,ICAL_RESTRICTION_ZEROPLUS,0},
@@ -483,7 +676,7 @@ icalrestriction_property_record icalrestriction_property_records[] = {
{ICAL_METHOD_DECLINECOUNTER,ICAL_VEVENT_COMPONENT,ICAL_ORGANIZER_PROPERTY,ICAL_RESTRICTION_ONE,0},
{ICAL_METHOD_DECLINECOUNTER,ICAL_VEVENT_COMPONENT,ICAL_UID_PROPERTY,ICAL_RESTRICTION_ONE,0},
{ICAL_METHOD_DECLINECOUNTER,ICAL_VEVENT_COMPONENT,ICAL_COMMENT_PROPERTY,ICAL_RESTRICTION_ZEROORONE,0},
- {ICAL_METHOD_DECLINECOUNTER,ICAL_VEVENT_COMPONENT,ICAL_RECURRENCEID_PROPERTY,ICAL_RESTRICTION_ZEROORONE,0},
+ {ICAL_METHOD_DECLINECOUNTER,ICAL_VEVENT_COMPONENT,ICAL_RECURRENCEID_PROPERTY,ICAL_RESTRICTION_ZEROORONE,icalrestriction_must_be_recurring},
{ICAL_METHOD_DECLINECOUNTER,ICAL_VEVENT_COMPONENT,ICAL_REQUESTSTATUS_PROPERTY,ICAL_RESTRICTION_ZEROPLUS,0},
{ICAL_METHOD_DECLINECOUNTER,ICAL_VEVENT_COMPONENT,ICAL_SEQUENCE_PROPERTY,ICAL_RESTRICTION_ZERO,0},
{ICAL_METHOD_DECLINECOUNTER,ICAL_VEVENT_COMPONENT,ICAL_X_PROPERTY,ICAL_RESTRICTION_ZEROPLUS,0},
@@ -574,7 +767,7 @@ icalrestriction_property_record icalrestriction_property_records[] = {
{ICAL_METHOD_PUBLISH,ICAL_VTODO_COMPONENT,ICAL_LOCATION_PROPERTY,ICAL_RESTRICTION_ZEROORONE,0},
{ICAL_METHOD_PUBLISH,ICAL_VTODO_COMPONENT,ICAL_PERCENTCOMPLETE_PROPERTY,ICAL_RESTRICTION_ZEROORONE,0},
{ICAL_METHOD_PUBLISH,ICAL_VTODO_COMPONENT,ICAL_RDATE_PROPERTY,ICAL_RESTRICTION_ZEROPLUS,0},
- {ICAL_METHOD_PUBLISH,ICAL_VTODO_COMPONENT,ICAL_RECURRENCEID_PROPERTY,ICAL_RESTRICTION_ZEROORONE,0},
+ {ICAL_METHOD_PUBLISH,ICAL_VTODO_COMPONENT,ICAL_RECURRENCEID_PROPERTY,ICAL_RESTRICTION_ZEROORONE,icalrestriction_must_be_recurring},
{ICAL_METHOD_PUBLISH,ICAL_VTODO_COMPONENT,ICAL_RELATEDTO_PROPERTY,ICAL_RESTRICTION_ZEROPLUS,0},
{ICAL_METHOD_PUBLISH,ICAL_VTODO_COMPONENT,ICAL_RESOURCES_PROPERTY,ICAL_RESTRICTION_ZEROORONE,0},
{ICAL_METHOD_PUBLISH,ICAL_VTODO_COMPONENT,ICAL_RRULE_PROPERTY,ICAL_RESTRICTION_ZEROPLUS,0},
@@ -607,11 +800,11 @@ icalrestriction_property_record icalrestriction_property_records[] = {
{ICAL_METHOD_REQUEST,ICAL_VTODO_COMPONENT,ICAL_LOCATION_PROPERTY,ICAL_RESTRICTION_ZEROORONE,0},
{ICAL_METHOD_REQUEST,ICAL_VTODO_COMPONENT,ICAL_PERCENTCOMPLETE_PROPERTY,ICAL_RESTRICTION_ZEROORONE,0},
{ICAL_METHOD_REQUEST,ICAL_VTODO_COMPONENT,ICAL_RDATE_PROPERTY,ICAL_RESTRICTION_ZEROPLUS,0},
- {ICAL_METHOD_REQUEST,ICAL_VTODO_COMPONENT,ICAL_RECURRENCEID_PROPERTY,ICAL_RESTRICTION_ZEROORONE,0},
+ {ICAL_METHOD_REQUEST,ICAL_VTODO_COMPONENT,ICAL_RECURRENCEID_PROPERTY,ICAL_RESTRICTION_ZEROORONE,icalrestriction_must_be_recurring},
{ICAL_METHOD_REQUEST,ICAL_VTODO_COMPONENT,ICAL_RELATEDTO_PROPERTY,ICAL_RESTRICTION_ZEROPLUS,0},
{ICAL_METHOD_REQUEST,ICAL_VTODO_COMPONENT,ICAL_RESOURCES_PROPERTY,ICAL_RESTRICTION_ZEROORONE,0},
{ICAL_METHOD_REQUEST,ICAL_VTODO_COMPONENT,ICAL_RRULE_PROPERTY,ICAL_RESTRICTION_ZEROPLUS,0},
- {ICAL_METHOD_REQUEST,ICAL_VTODO_COMPONENT,ICAL_STATUS_PROPERTY,ICAL_RESTRICTION_ZEROORONE,0},
+ {ICAL_METHOD_REQUEST,ICAL_VTODO_COMPONENT,ICAL_STATUS_PROPERTY,ICAL_RESTRICTION_ZEROORONE,icalrestriction_may_be_comp_need_process},
{ICAL_METHOD_REQUEST,ICAL_VTODO_COMPONENT,ICAL_URL_PROPERTY,ICAL_RESTRICTION_ZEROORONE,0},
{ICAL_METHOD_REQUEST,ICAL_VTODO_COMPONENT,ICAL_X_PROPERTY,ICAL_RESTRICTION_ZEROPLUS,0},
{ICAL_METHOD_REQUEST,ICAL_VTODO_COMPONENT,ICAL_REQUESTSTATUS_PROPERTY,ICAL_RESTRICTION_ZERO,0},
@@ -641,7 +834,7 @@ icalrestriction_property_record icalrestriction_property_records[] = {
{ICAL_METHOD_REPLY,ICAL_VTODO_COMPONENT,ICAL_RELATEDTO_PROPERTY,ICAL_RESTRICTION_ZEROPLUS,0},
{ICAL_METHOD_REPLY,ICAL_VTODO_COMPONENT,ICAL_RESOURCES_PROPERTY,ICAL_RESTRICTION_ZEROORONE,0},
{ICAL_METHOD_REPLY,ICAL_VTODO_COMPONENT,ICAL_RRULE_PROPERTY,ICAL_RESTRICTION_ZEROPLUS,0},
- {ICAL_METHOD_REPLY,ICAL_VTODO_COMPONENT,ICAL_RECURRENCEID_PROPERTY,ICAL_RESTRICTION_ZEROORONE,0},
+ {ICAL_METHOD_REPLY,ICAL_VTODO_COMPONENT,ICAL_RECURRENCEID_PROPERTY,ICAL_RESTRICTION_ZEROORONE,icalrestriction_must_be_recurring},
{ICAL_METHOD_REPLY,ICAL_VTODO_COMPONENT,ICAL_SEQUENCE_PROPERTY,ICAL_RESTRICTION_ZEROORONE,0},
{ICAL_METHOD_REPLY,ICAL_VTODO_COMPONENT,ICAL_STATUS_PROPERTY,ICAL_RESTRICTION_ZEROORONE,0},
{ICAL_METHOD_REPLY,ICAL_VTODO_COMPONENT,ICAL_SUMMARY_PROPERTY,ICAL_RESTRICTION_ZEROORONE,0},
@@ -674,10 +867,10 @@ icalrestriction_property_record icalrestriction_property_records[] = {
{ICAL_METHOD_ADD,ICAL_VTODO_COMPONENT,ICAL_RELATEDTO_PROPERTY,ICAL_RESTRICTION_ZEROPLUS,0},
{ICAL_METHOD_ADD,ICAL_VTODO_COMPONENT,ICAL_RESOURCES_PROPERTY,ICAL_RESTRICTION_ZEROORONE,0},
{ICAL_METHOD_ADD,ICAL_VTODO_COMPONENT,ICAL_RRULE_PROPERTY,ICAL_RESTRICTION_ZEROPLUS,0},
- {ICAL_METHOD_ADD,ICAL_VTODO_COMPONENT,ICAL_STATUS_PROPERTY,ICAL_RESTRICTION_ZEROORONE,0},
+ {ICAL_METHOD_ADD,ICAL_VTODO_COMPONENT,ICAL_STATUS_PROPERTY,ICAL_RESTRICTION_ZEROORONE,icalrestriction_may_be_comp_need_process},
{ICAL_METHOD_ADD,ICAL_VTODO_COMPONENT,ICAL_URL_PROPERTY,ICAL_RESTRICTION_ZEROORONE,0},
{ICAL_METHOD_ADD,ICAL_VTODO_COMPONENT,ICAL_X_PROPERTY,ICAL_RESTRICTION_ZEROPLUS,0},
- {ICAL_METHOD_ADD,ICAL_VTODO_COMPONENT,ICAL_RECURRENCEID_PROPERTY,ICAL_RESTRICTION_ZERO,0},
+ {ICAL_METHOD_ADD,ICAL_VTODO_COMPONENT,ICAL_RECURRENCEID_PROPERTY,ICAL_RESTRICTION_ZERO,icalrestriction_must_be_recurring},
{ICAL_METHOD_ADD,ICAL_VTODO_COMPONENT,ICAL_REQUESTSTATUS_PROPERTY,ICAL_RESTRICTION_ZERO,0},
{ICAL_METHOD_CANCEL,ICAL_VTODO_COMPONENT,ICAL_ATTENDEE_PROPERTY,ICAL_RESTRICTION_ZEROPLUS,0},
{ICAL_METHOD_CANCEL,ICAL_VTODO_COMPONENT,ICAL_UID_PROPERTY,ICAL_RESTRICTION_ONE,0},
@@ -701,19 +894,19 @@ icalrestriction_property_record icalrestriction_property_records[] = {
{ICAL_METHOD_CANCEL,ICAL_VTODO_COMPONENT,ICAL_LOCATION_PROPERTY,ICAL_RESTRICTION_ZEROORONE,0},
{ICAL_METHOD_CANCEL,ICAL_VTODO_COMPONENT,ICAL_PERCENTCOMPLETE_PROPERTY,ICAL_RESTRICTION_ZEROORONE,0},
{ICAL_METHOD_CANCEL,ICAL_VTODO_COMPONENT,ICAL_RDATE_PROPERTY,ICAL_RESTRICTION_ZEROPLUS,0},
- {ICAL_METHOD_CANCEL,ICAL_VTODO_COMPONENT,ICAL_RECURRENCEID_PROPERTY,ICAL_RESTRICTION_ZEROORONE,0},
+ {ICAL_METHOD_CANCEL,ICAL_VTODO_COMPONENT,ICAL_RECURRENCEID_PROPERTY,ICAL_RESTRICTION_ZEROORONE,icalrestriction_must_be_recurring},
{ICAL_METHOD_CANCEL,ICAL_VTODO_COMPONENT,ICAL_RELATEDTO_PROPERTY,ICAL_RESTRICTION_ZEROPLUS,0},
{ICAL_METHOD_CANCEL,ICAL_VTODO_COMPONENT,ICAL_RESOURCES_PROPERTY,ICAL_RESTRICTION_ZEROORONE,0},
{ICAL_METHOD_CANCEL,ICAL_VTODO_COMPONENT,ICAL_RRULE_PROPERTY,ICAL_RESTRICTION_ZEROPLUS,0},
{ICAL_METHOD_CANCEL,ICAL_VTODO_COMPONENT,ICAL_PRIORITY_PROPERTY,ICAL_RESTRICTION_ZEROORONE,0},
- {ICAL_METHOD_CANCEL,ICAL_VTODO_COMPONENT,ICAL_STATUS_PROPERTY,ICAL_RESTRICTION_ZEROORONE,0},
+ {ICAL_METHOD_CANCEL,ICAL_VTODO_COMPONENT,ICAL_STATUS_PROPERTY,ICAL_RESTRICTION_ZEROORONE,icalrestriction_must_be_canceled_no_attendee},
{ICAL_METHOD_CANCEL,ICAL_VTODO_COMPONENT,ICAL_URL_PROPERTY,ICAL_RESTRICTION_ZEROORONE,0},
{ICAL_METHOD_CANCEL,ICAL_VTODO_COMPONENT,ICAL_X_PROPERTY,ICAL_RESTRICTION_ZEROPLUS,0},
{ICAL_METHOD_CANCEL,ICAL_VTODO_COMPONENT,ICAL_REQUESTSTATUS_PROPERTY,ICAL_RESTRICTION_ZERO,0},
{ICAL_METHOD_REFRESH,ICAL_VTODO_COMPONENT,ICAL_ATTENDEE_PROPERTY,ICAL_RESTRICTION_ONE,0},
{ICAL_METHOD_REFRESH,ICAL_VTODO_COMPONENT,ICAL_DTSTAMP_PROPERTY,ICAL_RESTRICTION_ONE,0},
{ICAL_METHOD_REFRESH,ICAL_VTODO_COMPONENT,ICAL_UID_PROPERTY,ICAL_RESTRICTION_ONE,0},
- {ICAL_METHOD_REFRESH,ICAL_VTODO_COMPONENT,ICAL_RECURRENCEID_PROPERTY,ICAL_RESTRICTION_ZEROORONE,0},
+ {ICAL_METHOD_REFRESH,ICAL_VTODO_COMPONENT,ICAL_RECURRENCEID_PROPERTY,ICAL_RESTRICTION_ZEROORONE,icalrestriction_must_be_recurring},
{ICAL_METHOD_REFRESH,ICAL_VTODO_COMPONENT,ICAL_X_PROPERTY,ICAL_RESTRICTION_ZEROPLUS,0},
{ICAL_METHOD_REFRESH,ICAL_VTODO_COMPONENT,ICAL_ATTACH_PROPERTY,ICAL_RESTRICTION_ZERO,0},
{ICAL_METHOD_REFRESH,ICAL_VTODO_COMPONENT,ICAL_CATEGORIES_PROPERTY,ICAL_RESTRICTION_ZERO,0},
@@ -764,13 +957,13 @@ icalrestriction_property_record icalrestriction_property_records[] = {
{ICAL_METHOD_COUNTER,ICAL_VTODO_COMPONENT,ICAL_LOCATION_PROPERTY,ICAL_RESTRICTION_ZEROORONE,0},
{ICAL_METHOD_COUNTER,ICAL_VTODO_COMPONENT,ICAL_PERCENTCOMPLETE_PROPERTY,ICAL_RESTRICTION_ZEROORONE,0},
{ICAL_METHOD_COUNTER,ICAL_VTODO_COMPONENT,ICAL_RDATE_PROPERTY,ICAL_RESTRICTION_ZEROPLUS,0},
- {ICAL_METHOD_COUNTER,ICAL_VTODO_COMPONENT,ICAL_RECURRENCEID_PROPERTY,ICAL_RESTRICTION_ZEROORONE,0},
+ {ICAL_METHOD_COUNTER,ICAL_VTODO_COMPONENT,ICAL_RECURRENCEID_PROPERTY,ICAL_RESTRICTION_ZEROORONE,icalrestriction_must_be_recurring},
{ICAL_METHOD_COUNTER,ICAL_VTODO_COMPONENT,ICAL_RELATEDTO_PROPERTY,ICAL_RESTRICTION_ZEROPLUS,0},
{ICAL_METHOD_COUNTER,ICAL_VTODO_COMPONENT,ICAL_REQUESTSTATUS_PROPERTY,ICAL_RESTRICTION_ZEROPLUS,0},
{ICAL_METHOD_COUNTER,ICAL_VTODO_COMPONENT,ICAL_RESOURCES_PROPERTY,ICAL_RESTRICTION_ZEROORONE,0},
{ICAL_METHOD_COUNTER,ICAL_VTODO_COMPONENT,ICAL_RRULE_PROPERTY,ICAL_RESTRICTION_ZEROORONE,0},
{ICAL_METHOD_COUNTER,ICAL_VTODO_COMPONENT,ICAL_SEQUENCE_PROPERTY,ICAL_RESTRICTION_ZEROORONE,0},
- {ICAL_METHOD_COUNTER,ICAL_VTODO_COMPONENT,ICAL_STATUS_PROPERTY,ICAL_RESTRICTION_ZEROORONE,0},
+ {ICAL_METHOD_COUNTER,ICAL_VTODO_COMPONENT,ICAL_STATUS_PROPERTY,ICAL_RESTRICTION_ZEROORONE,icalrestriction_may_be_comp_need_process},
{ICAL_METHOD_COUNTER,ICAL_VTODO_COMPONENT,ICAL_URL_PROPERTY,ICAL_RESTRICTION_ZEROORONE,0},
{ICAL_METHOD_COUNTER,ICAL_VTODO_COMPONENT,ICAL_X_PROPERTY,ICAL_RESTRICTION_ZEROPLUS,0},
{ICAL_METHOD_DECLINECOUNTER,ICAL_VTODO_COMPONENT,ICAL_ATTENDEE_PROPERTY,ICAL_RESTRICTION_ONEPLUS,0},
@@ -796,7 +989,7 @@ icalrestriction_property_record icalrestriction_property_records[] = {
{ICAL_METHOD_DECLINECOUNTER,ICAL_VTODO_COMPONENT,ICAL_PERCENTCOMPLETE_PROPERTY,ICAL_RESTRICTION_ZEROORONE,0},
{ICAL_METHOD_DECLINECOUNTER,ICAL_VTODO_COMPONENT,ICAL_PRIORITY_PROPERTY,ICAL_RESTRICTION_ZEROORONE,0},
{ICAL_METHOD_DECLINECOUNTER,ICAL_VTODO_COMPONENT,ICAL_RDATE_PROPERTY,ICAL_RESTRICTION_ZEROPLUS,0},
- {ICAL_METHOD_DECLINECOUNTER,ICAL_VTODO_COMPONENT,ICAL_RECURRENCEID_PROPERTY,ICAL_RESTRICTION_ZEROORONE,0},
+ {ICAL_METHOD_DECLINECOUNTER,ICAL_VTODO_COMPONENT,ICAL_RECURRENCEID_PROPERTY,ICAL_RESTRICTION_ZEROORONE,icalrestriction_must_be_recurring},
{ICAL_METHOD_DECLINECOUNTER,ICAL_VTODO_COMPONENT,ICAL_RELATEDTO_PROPERTY,ICAL_RESTRICTION_ZEROPLUS,0},
{ICAL_METHOD_DECLINECOUNTER,ICAL_VTODO_COMPONENT,ICAL_REQUESTSTATUS_PROPERTY,ICAL_RESTRICTION_ZEROPLUS,0},
{ICAL_METHOD_DECLINECOUNTER,ICAL_VTODO_COMPONENT,ICAL_RESOURCES_PROPERTY,ICAL_RESTRICTION_ZEROORONE,0},
@@ -819,11 +1012,11 @@ icalrestriction_property_record icalrestriction_property_records[] = {
{ICAL_METHOD_PUBLISH,ICAL_VJOURNAL_COMPONENT,ICAL_EXRULE_PROPERTY,ICAL_RESTRICTION_ZEROPLUS,0},
{ICAL_METHOD_PUBLISH,ICAL_VJOURNAL_COMPONENT,ICAL_LASTMODIFIED_PROPERTY,ICAL_RESTRICTION_ZEROORONE,0},
{ICAL_METHOD_PUBLISH,ICAL_VJOURNAL_COMPONENT,ICAL_RDATE_PROPERTY,ICAL_RESTRICTION_ZEROPLUS,0},
- {ICAL_METHOD_PUBLISH,ICAL_VJOURNAL_COMPONENT,ICAL_RECURRENCEID_PROPERTY,ICAL_RESTRICTION_ZEROORONE,0},
+ {ICAL_METHOD_PUBLISH,ICAL_VJOURNAL_COMPONENT,ICAL_RECURRENCEID_PROPERTY,ICAL_RESTRICTION_ZEROORONE,icalrestriction_must_be_recurring},
{ICAL_METHOD_PUBLISH,ICAL_VJOURNAL_COMPONENT,ICAL_RELATEDTO_PROPERTY,ICAL_RESTRICTION_ZEROPLUS,0},
{ICAL_METHOD_PUBLISH,ICAL_VJOURNAL_COMPONENT,ICAL_RRULE_PROPERTY,ICAL_RESTRICTION_ZEROPLUS,0},
{ICAL_METHOD_PUBLISH,ICAL_VJOURNAL_COMPONENT,ICAL_SEQUENCE_PROPERTY,ICAL_RESTRICTION_ZEROORONE,0},
- {ICAL_METHOD_PUBLISH,ICAL_VJOURNAL_COMPONENT,ICAL_STATUS_PROPERTY,ICAL_RESTRICTION_ZEROORONE,0},
+ {ICAL_METHOD_PUBLISH,ICAL_VJOURNAL_COMPONENT,ICAL_STATUS_PROPERTY,ICAL_RESTRICTION_ZEROORONE,icalrestriction_may_be_draft_final_canceled},
{ICAL_METHOD_PUBLISH,ICAL_VJOURNAL_COMPONENT,ICAL_SUMMARY_PROPERTY,ICAL_RESTRICTION_ZEROORONE,0},
{ICAL_METHOD_PUBLISH,ICAL_VJOURNAL_COMPONENT,ICAL_URL_PROPERTY,ICAL_RESTRICTION_ZEROORONE,0},
{ICAL_METHOD_PUBLISH,ICAL_VJOURNAL_COMPONENT,ICAL_X_PROPERTY,ICAL_RESTRICTION_ZEROPLUS,0},
@@ -869,10 +1062,10 @@ icalrestriction_property_record icalrestriction_property_records[] = {
{ICAL_METHOD_CANCEL,ICAL_VJOURNAL_COMPONENT,ICAL_EXRULE_PROPERTY,ICAL_RESTRICTION_ZEROPLUS,0},
{ICAL_METHOD_CANCEL,ICAL_VJOURNAL_COMPONENT,ICAL_LASTMODIFIED_PROPERTY,ICAL_RESTRICTION_ZEROORONE,0},
{ICAL_METHOD_CANCEL,ICAL_VJOURNAL_COMPONENT,ICAL_RDATE_PROPERTY,ICAL_RESTRICTION_ZEROPLUS,0},
- {ICAL_METHOD_CANCEL,ICAL_VJOURNAL_COMPONENT,ICAL_RECURRENCEID_PROPERTY,ICAL_RESTRICTION_ZEROORONE,0},
+ {ICAL_METHOD_CANCEL,ICAL_VJOURNAL_COMPONENT,ICAL_RECURRENCEID_PROPERTY,ICAL_RESTRICTION_ZEROORONE,icalrestriction_must_be_recurring},
{ICAL_METHOD_CANCEL,ICAL_VJOURNAL_COMPONENT,ICAL_RELATEDTO_PROPERTY,ICAL_RESTRICTION_ZEROPLUS,0},
{ICAL_METHOD_CANCEL,ICAL_VJOURNAL_COMPONENT,ICAL_RRULE_PROPERTY,ICAL_RESTRICTION_ZEROPLUS,0},
- {ICAL_METHOD_CANCEL,ICAL_VJOURNAL_COMPONENT,ICAL_STATUS_PROPERTY,ICAL_RESTRICTION_ZEROORONE,0},
+ {ICAL_METHOD_CANCEL,ICAL_VJOURNAL_COMPONENT,ICAL_STATUS_PROPERTY,ICAL_RESTRICTION_ZEROORONE,icalrestriction_must_be_cancel_if_present},
{ICAL_METHOD_CANCEL,ICAL_VJOURNAL_COMPONENT,ICAL_SUMMARY_PROPERTY,ICAL_RESTRICTION_ZEROORONE,0},
{ICAL_METHOD_CANCEL,ICAL_VJOURNAL_COMPONENT,ICAL_URL_PROPERTY,ICAL_RESTRICTION_ZEROORONE,0},
{ICAL_METHOD_CANCEL,ICAL_VJOURNAL_COMPONENT,ICAL_X_PROPERTY,ICAL_RESTRICTION_ZEROPLUS,0},
@@ -936,11 +1129,11 @@ icalrestriction_property_record icalrestriction_property_records[] = {
{ICAL_METHOD_NONE,ICAL_VEVENT_COMPONENT,ICAL_CONTACT_PROPERTY,ICAL_RESTRICTION_ZEROPLUS,0},
{ICAL_METHOD_NONE,ICAL_VEVENT_COMPONENT,ICAL_CREATED_PROPERTY,ICAL_RESTRICTION_ZEROORONE,0},
{ICAL_METHOD_NONE,ICAL_VEVENT_COMPONENT,ICAL_DESCRIPTION_PROPERTY,ICAL_RESTRICTION_ZEROORONE,0},
- {ICAL_METHOD_NONE,ICAL_VEVENT_COMPONENT,ICAL_DTEND_PROPERTY,ICAL_RESTRICTION_ONEEXCLUSIVE, icalrestriction_check_exclusive},
+ {ICAL_METHOD_NONE,ICAL_VEVENT_COMPONENT,ICAL_DTEND_PROPERTY,ICAL_RESTRICTION_ONEEXCLUSIVE,icalrestriction_no_duration},
{ICAL_METHOD_NONE,ICAL_VEVENT_COMPONENT,ICAL_DTSTAMP_PROPERTY,ICAL_RESTRICTION_ZEROORONE,0},
{ICAL_METHOD_NONE,ICAL_VEVENT_COMPONENT,ICAL_DTSTART_PROPERTY,ICAL_RESTRICTION_ZEROORONE,0},
{ICAL_METHOD_NONE,ICAL_VEVENT_COMPONENT,ICAL_DUE_PROPERTY,ICAL_RESTRICTION_ZERO,0},
- {ICAL_METHOD_NONE,ICAL_VEVENT_COMPONENT,ICAL_DURATION_PROPERTY,ICAL_RESTRICTION_ONEEXCLUSIVE, icalrestriction_check_exclusive},
+ {ICAL_METHOD_NONE,ICAL_VEVENT_COMPONENT,ICAL_DURATION_PROPERTY,ICAL_RESTRICTION_ONEEXCLUSIVE,icalrestriction_no_duration},
{ICAL_METHOD_NONE,ICAL_VEVENT_COMPONENT,ICAL_EXDATE_PROPERTY,ICAL_RESTRICTION_ZEROPLUS,0},
{ICAL_METHOD_NONE,ICAL_VEVENT_COMPONENT,ICAL_EXRULE_PROPERTY,ICAL_RESTRICTION_ZEROPLUS,0},
{ICAL_METHOD_NONE,ICAL_VEVENT_COMPONENT,ICAL_FREEBUSY_PROPERTY,ICAL_RESTRICTION_ZERO,0},
@@ -953,7 +1146,7 @@ icalrestriction_property_record icalrestriction_property_records[] = {
{ICAL_METHOD_NONE,ICAL_VEVENT_COMPONENT,ICAL_PRIORITY_PROPERTY,ICAL_RESTRICTION_ZEROORONE,0},
{ICAL_METHOD_NONE,ICAL_VEVENT_COMPONENT,ICAL_PRODID_PROPERTY,ICAL_RESTRICTION_ZERO,0},
{ICAL_METHOD_NONE,ICAL_VEVENT_COMPONENT,ICAL_RDATE_PROPERTY,ICAL_RESTRICTION_ZEROPLUS,0},
- {ICAL_METHOD_NONE,ICAL_VEVENT_COMPONENT,ICAL_RECURRENCEID_PROPERTY,ICAL_RESTRICTION_ZEROORONE,0},
+ {ICAL_METHOD_NONE,ICAL_VEVENT_COMPONENT,ICAL_RECURRENCEID_PROPERTY,ICAL_RESTRICTION_ZEROORONE,icalrestriction_must_be_recurring},
{ICAL_METHOD_NONE,ICAL_VEVENT_COMPONENT,ICAL_RELATEDTO_PROPERTY,ICAL_RESTRICTION_ZEROPLUS,0},
{ICAL_METHOD_NONE,ICAL_VEVENT_COMPONENT,ICAL_REPEAT_PROPERTY,ICAL_RESTRICTION_ZERO,0},
{ICAL_METHOD_NONE,ICAL_VEVENT_COMPONENT,ICAL_REQUESTSTATUS_PROPERTY,ICAL_RESTRICTION_ZEROPLUS,0},
@@ -1001,7 +1194,7 @@ icalrestriction_property_record icalrestriction_property_records[] = {
{ICAL_METHOD_NONE,ICAL_VTODO_COMPONENT,ICAL_PRIORITY_PROPERTY,ICAL_RESTRICTION_ZEROORONE,0},
{ICAL_METHOD_NONE,ICAL_VTODO_COMPONENT,ICAL_PRODID_PROPERTY,ICAL_RESTRICTION_ZERO,0},
{ICAL_METHOD_NONE,ICAL_VTODO_COMPONENT,ICAL_RDATE_PROPERTY,ICAL_RESTRICTION_ZEROPLUS,0},
- {ICAL_METHOD_NONE,ICAL_VTODO_COMPONENT,ICAL_RECURRENCEID_PROPERTY,ICAL_RESTRICTION_ZEROORONE,0},
+ {ICAL_METHOD_NONE,ICAL_VTODO_COMPONENT,ICAL_RECURRENCEID_PROPERTY,ICAL_RESTRICTION_ZEROORONE,icalrestriction_must_be_recurring},
{ICAL_METHOD_NONE,ICAL_VTODO_COMPONENT,ICAL_RELATEDTO_PROPERTY,ICAL_RESTRICTION_ZEROPLUS,0},
{ICAL_METHOD_NONE,ICAL_VTODO_COMPONENT,ICAL_REPEAT_PROPERTY,ICAL_RESTRICTION_ZERO,0},
{ICAL_METHOD_NONE,ICAL_VTODO_COMPONENT,ICAL_REQUESTSTATUS_PROPERTY,ICAL_RESTRICTION_ZEROPLUS,0},
@@ -1049,7 +1242,7 @@ icalrestriction_property_record icalrestriction_property_records[] = {
{ICAL_METHOD_NONE,ICAL_VJOURNAL_COMPONENT,ICAL_PRIORITY_PROPERTY,ICAL_RESTRICTION_ZERO,0},
{ICAL_METHOD_NONE,ICAL_VJOURNAL_COMPONENT,ICAL_PRODID_PROPERTY,ICAL_RESTRICTION_ZERO,0},
{ICAL_METHOD_NONE,ICAL_VJOURNAL_COMPONENT,ICAL_RDATE_PROPERTY,ICAL_RESTRICTION_ZEROPLUS,0},
- {ICAL_METHOD_NONE,ICAL_VJOURNAL_COMPONENT,ICAL_RECURRENCEID_PROPERTY,ICAL_RESTRICTION_ZEROORONE,0},
+ {ICAL_METHOD_NONE,ICAL_VJOURNAL_COMPONENT,ICAL_RECURRENCEID_PROPERTY,ICAL_RESTRICTION_ZEROORONE,icalrestriction_must_be_recurring},
{ICAL_METHOD_NONE,ICAL_VJOURNAL_COMPONENT,ICAL_RELATEDTO_PROPERTY,ICAL_RESTRICTION_ZEROPLUS,0},
{ICAL_METHOD_NONE,ICAL_VJOURNAL_COMPONENT,ICAL_REPEAT_PROPERTY,ICAL_RESTRICTION_ZERO,0},
{ICAL_METHOD_NONE,ICAL_VJOURNAL_COMPONENT,ICAL_REQUESTSTATUS_PROPERTY,ICAL_RESTRICTION_ZEROPLUS,0},
@@ -1276,8 +1469,8 @@ icalrestriction_property_record icalrestriction_property_records[] = {
{ICAL_METHOD_NONE,ICAL_XAUDIOALARM_COMPONENT,ICAL_DTSTAMP_PROPERTY,ICAL_RESTRICTION_ZERO,0},
{ICAL_METHOD_NONE,ICAL_XAUDIOALARM_COMPONENT,ICAL_DTSTART_PROPERTY,ICAL_RESTRICTION_ZERO,0},
{ICAL_METHOD_NONE,ICAL_XAUDIOALARM_COMPONENT,ICAL_DUE_PROPERTY,ICAL_RESTRICTION_ZERO,0},
- {ICAL_METHOD_NONE,ICAL_XAUDIOALARM_COMPONENT,ICAL_DURATION_PROPERTY,ICAL_RESTRICTION_ONEMUTUAL,icalrestriction_check_mutual},
- {ICAL_METHOD_NONE,ICAL_XAUDIOALARM_COMPONENT,ICAL_REPEAT_PROPERTY,ICAL_RESTRICTION_ONEMUTUAL,icalrestriction_check_mutual},
+ {ICAL_METHOD_NONE,ICAL_XAUDIOALARM_COMPONENT,ICAL_DURATION_PROPERTY,ICAL_RESTRICTION_ONEMUTUAL,icalrestriction_must_have_repeat},
+ {ICAL_METHOD_NONE,ICAL_XAUDIOALARM_COMPONENT,ICAL_REPEAT_PROPERTY,ICAL_RESTRICTION_ONEMUTUAL,icalrestriction_must_have_duration},
{ICAL_METHOD_NONE,ICAL_XAUDIOALARM_COMPONENT,ICAL_EXDATE_PROPERTY,ICAL_RESTRICTION_ZERO,0},
{ICAL_METHOD_NONE,ICAL_XAUDIOALARM_COMPONENT,ICAL_EXRULE_PROPERTY,ICAL_RESTRICTION_ZERO,0},
{ICAL_METHOD_NONE,ICAL_XAUDIOALARM_COMPONENT,ICAL_FREEBUSY_PROPERTY,ICAL_RESTRICTION_ZERO,0},
@@ -1324,8 +1517,8 @@ icalrestriction_property_record icalrestriction_property_records[] = {
{ICAL_METHOD_NONE,ICAL_XDISPLAYALARM_COMPONENT,ICAL_DTSTAMP_PROPERTY,ICAL_RESTRICTION_ZERO,0},
{ICAL_METHOD_NONE,ICAL_XDISPLAYALARM_COMPONENT,ICAL_DTSTART_PROPERTY,ICAL_RESTRICTION_ZERO,0},
{ICAL_METHOD_NONE,ICAL_XDISPLAYALARM_COMPONENT,ICAL_DUE_PROPERTY,ICAL_RESTRICTION_ZERO,0},
- {ICAL_METHOD_NONE,ICAL_XDISPLAYALARM_COMPONENT,ICAL_DURATION_PROPERTY,ICAL_RESTRICTION_ONEMUTUAL,icalrestriction_check_mutual},
- {ICAL_METHOD_NONE,ICAL_XDISPLAYALARM_COMPONENT,ICAL_REPEAT_PROPERTY,ICAL_RESTRICTION_ONEMUTUAL,icalrestriction_check_mutual},
+ {ICAL_METHOD_NONE,ICAL_XDISPLAYALARM_COMPONENT,ICAL_DURATION_PROPERTY,ICAL_RESTRICTION_ONEMUTUAL,icalrestriction_must_have_repeat},
+ {ICAL_METHOD_NONE,ICAL_XDISPLAYALARM_COMPONENT,ICAL_REPEAT_PROPERTY,ICAL_RESTRICTION_ONEMUTUAL,icalrestriction_must_have_duration},
{ICAL_METHOD_NONE,ICAL_XDISPLAYALARM_COMPONENT,ICAL_EXDATE_PROPERTY,ICAL_RESTRICTION_ZERO,0},
{ICAL_METHOD_NONE,ICAL_XDISPLAYALARM_COMPONENT,ICAL_EXRULE_PROPERTY,ICAL_RESTRICTION_ZERO,0},
{ICAL_METHOD_NONE,ICAL_XDISPLAYALARM_COMPONENT,ICAL_FREEBUSY_PROPERTY,ICAL_RESTRICTION_ZERO,0},
@@ -1372,8 +1565,8 @@ icalrestriction_property_record icalrestriction_property_records[] = {
{ICAL_METHOD_NONE,ICAL_XEMAILALARM_COMPONENT,ICAL_DTSTAMP_PROPERTY,ICAL_RESTRICTION_ZERO,0},
{ICAL_METHOD_NONE,ICAL_XEMAILALARM_COMPONENT,ICAL_DTSTART_PROPERTY,ICAL_RESTRICTION_ZERO,0},
{ICAL_METHOD_NONE,ICAL_XEMAILALARM_COMPONENT,ICAL_DUE_PROPERTY,ICAL_RESTRICTION_ZERO,0},
- {ICAL_METHOD_NONE,ICAL_XEMAILALARM_COMPONENT,ICAL_DURATION_PROPERTY,ICAL_RESTRICTION_ONEMUTUAL,icalrestriction_check_mutual},
- {ICAL_METHOD_NONE,ICAL_XEMAILALARM_COMPONENT,ICAL_REPEAT_PROPERTY,ICAL_RESTRICTION_ONEMUTUAL,icalrestriction_check_mutual},
+ {ICAL_METHOD_NONE,ICAL_XEMAILALARM_COMPONENT,ICAL_DURATION_PROPERTY,ICAL_RESTRICTION_ONEMUTUAL,icalrestriction_must_have_repeat},
+ {ICAL_METHOD_NONE,ICAL_XEMAILALARM_COMPONENT,ICAL_REPEAT_PROPERTY,ICAL_RESTRICTION_ONEMUTUAL,icalrestriction_must_have_duration},
{ICAL_METHOD_NONE,ICAL_XEMAILALARM_COMPONENT,ICAL_EXDATE_PROPERTY,ICAL_RESTRICTION_ZERO,0},
{ICAL_METHOD_NONE,ICAL_XEMAILALARM_COMPONENT,ICAL_EXRULE_PROPERTY,ICAL_RESTRICTION_ZERO,0},
{ICAL_METHOD_NONE,ICAL_XEMAILALARM_COMPONENT,ICAL_FREEBUSY_PROPERTY,ICAL_RESTRICTION_ZERO,0},
@@ -1420,8 +1613,8 @@ icalrestriction_property_record icalrestriction_property_records[] = {
{ICAL_METHOD_NONE,ICAL_XPROCEDUREALARM_COMPONENT,ICAL_DTSTAMP_PROPERTY,ICAL_RESTRICTION_ZERO,0},
{ICAL_METHOD_NONE,ICAL_XPROCEDUREALARM_COMPONENT,ICAL_DTSTART_PROPERTY,ICAL_RESTRICTION_ZERO,0},
{ICAL_METHOD_NONE,ICAL_XPROCEDUREALARM_COMPONENT,ICAL_DUE_PROPERTY,ICAL_RESTRICTION_ZERO,0},
- {ICAL_METHOD_NONE,ICAL_XPROCEDUREALARM_COMPONENT,ICAL_DURATION_PROPERTY,ICAL_RESTRICTION_ONEMUTUAL,icalrestriction_check_mutual},
- {ICAL_METHOD_NONE,ICAL_XPROCEDUREALARM_COMPONENT,ICAL_REPEAT_PROPERTY,ICAL_RESTRICTION_ONEMUTUAL,icalrestriction_check_mutual},
+ {ICAL_METHOD_NONE,ICAL_XPROCEDUREALARM_COMPONENT,ICAL_DURATION_PROPERTY,ICAL_RESTRICTION_ONEMUTUAL,icalrestriction_must_have_repeat},
+ {ICAL_METHOD_NONE,ICAL_XPROCEDUREALARM_COMPONENT,ICAL_REPEAT_PROPERTY,ICAL_RESTRICTION_ONEMUTUAL,icalrestriction_must_have_duration},
{ICAL_METHOD_NONE,ICAL_XPROCEDUREALARM_COMPONENT,ICAL_EXDATE_PROPERTY,ICAL_RESTRICTION_ZERO,0},
{ICAL_METHOD_NONE,ICAL_XPROCEDUREALARM_COMPONENT,ICAL_EXRULE_PROPERTY,ICAL_RESTRICTION_ZERO,0},
{ICAL_METHOD_NONE,ICAL_XPROCEDUREALARM_COMPONENT,ICAL_FREEBUSY_PROPERTY,ICAL_RESTRICTION_ZERO,0},
@@ -1453,34 +1646,34 @@ icalrestriction_property_record icalrestriction_property_records[] = {
{ICAL_METHOD_NONE,ICAL_XPROCEDUREALARM_COMPONENT,ICAL_URL_PROPERTY,ICAL_RESTRICTION_ZERO,0},
{ICAL_METHOD_NONE,ICAL_XPROCEDUREALARM_COMPONENT,ICAL_VERSION_PROPERTY,ICAL_RESTRICTION_ZERO,0},
{ICAL_METHOD_NONE,ICAL_XPROCEDUREALARM_COMPONENT,ICAL_X_PROPERTY,ICAL_RESTRICTION_ZEROPLUS,0},
- {ICAL_METHOD_NONE,ICAL_NO_COMPONENT,ICAL_NO_PROPERTY,ICAL_RESTRICTION_NONE,0}
+ {ICAL_METHOD_NONE,ICAL_NO_COMPONENT,ICAL_NO_PROPERTY,ICAL_RESTRICTION_NONE}
};
icalrestriction_component_record icalrestriction_component_records[] = {
{ICAL_METHOD_PUBLISH,ICAL_VEVENT_COMPONENT,ICAL_VALARM_COMPONENT,ICAL_RESTRICTION_ZEROPLUS,0},
{ICAL_METHOD_PUBLISH,ICAL_VEVENT_COMPONENT,ICAL_VFREEBUSY_COMPONENT,ICAL_RESTRICTION_ZERO,0},
{ICAL_METHOD_PUBLISH,ICAL_VEVENT_COMPONENT,ICAL_VJOURNAL_COMPONENT,ICAL_RESTRICTION_ZERO,0},
{ICAL_METHOD_PUBLISH,ICAL_VEVENT_COMPONENT,ICAL_VTODO_COMPONENT,ICAL_RESTRICTION_ZERO,0},
- {ICAL_METHOD_PUBLISH,ICAL_VEVENT_COMPONENT,ICAL_VTIMEZONE_COMPONENT,ICAL_RESTRICTION_ZEROPLUS,0},
+ {ICAL_METHOD_PUBLISH,ICAL_VEVENT_COMPONENT,ICAL_VTIMEZONE_COMPONENT,ICAL_RESTRICTION_ZEROPLUS,icalrestriction_must_if_tz_ref},
{ICAL_METHOD_PUBLISH,ICAL_VEVENT_COMPONENT,ICAL_X_COMPONENT,ICAL_RESTRICTION_ZEROPLUS,0},
{ICAL_METHOD_REQUEST,ICAL_VEVENT_COMPONENT,ICAL_VALARM_COMPONENT,ICAL_RESTRICTION_ZEROPLUS,0},
- {ICAL_METHOD_REQUEST,ICAL_VEVENT_COMPONENT,ICAL_VTIMEZONE_COMPONENT,ICAL_RESTRICTION_ZEROPLUS,0},
+ {ICAL_METHOD_REQUEST,ICAL_VEVENT_COMPONENT,ICAL_VTIMEZONE_COMPONENT,ICAL_RESTRICTION_ZEROPLUS,icalrestriction_must_if_tz_ref},
{ICAL_METHOD_REQUEST,ICAL_VEVENT_COMPONENT,ICAL_X_COMPONENT,ICAL_RESTRICTION_ZEROPLUS,0},
{ICAL_METHOD_REQUEST,ICAL_VEVENT_COMPONENT,ICAL_VFREEBUSY_COMPONENT,ICAL_RESTRICTION_ZERO,0},
{ICAL_METHOD_REQUEST,ICAL_VEVENT_COMPONENT,ICAL_VJOURNAL_COMPONENT,ICAL_RESTRICTION_ZERO,0},
{ICAL_METHOD_REQUEST,ICAL_VEVENT_COMPONENT,ICAL_VTODO_COMPONENT,ICAL_RESTRICTION_ZERO,0},
- {ICAL_METHOD_REPLY,ICAL_VEVENT_COMPONENT,ICAL_VTIMEZONE_COMPONENT,ICAL_RESTRICTION_ZEROORONE,0},
+ {ICAL_METHOD_REPLY,ICAL_VEVENT_COMPONENT,ICAL_VTIMEZONE_COMPONENT,ICAL_RESTRICTION_ZEROORONE,icalrestriction_must_if_tz_ref},
{ICAL_METHOD_REPLY,ICAL_VEVENT_COMPONENT,ICAL_X_COMPONENT,ICAL_RESTRICTION_ZEROPLUS,0},
{ICAL_METHOD_REPLY,ICAL_VEVENT_COMPONENT,ICAL_VALARM_COMPONENT,ICAL_RESTRICTION_ZERO,0},
{ICAL_METHOD_REPLY,ICAL_VEVENT_COMPONENT,ICAL_VFREEBUSY_COMPONENT,ICAL_RESTRICTION_ZERO,0},
{ICAL_METHOD_REPLY,ICAL_VEVENT_COMPONENT,ICAL_VJOURNAL_COMPONENT,ICAL_RESTRICTION_ZERO,0},
{ICAL_METHOD_REPLY,ICAL_VEVENT_COMPONENT,ICAL_VTODO_COMPONENT,ICAL_RESTRICTION_ZERO,0},
{ICAL_METHOD_ADD,ICAL_VEVENT_COMPONENT,ICAL_VALARM_COMPONENT,ICAL_RESTRICTION_ZEROPLUS,0},
- {ICAL_METHOD_ADD,ICAL_VEVENT_COMPONENT,ICAL_VTIMEZONE_COMPONENT,ICAL_RESTRICTION_ZEROPLUS,0},
+ {ICAL_METHOD_ADD,ICAL_VEVENT_COMPONENT,ICAL_VTIMEZONE_COMPONENT,ICAL_RESTRICTION_ZEROPLUS,icalrestriction_must_if_tz_ref},
{ICAL_METHOD_ADD,ICAL_VEVENT_COMPONENT,ICAL_X_COMPONENT,ICAL_RESTRICTION_ZEROPLUS,0},
{ICAL_METHOD_ADD,ICAL_VEVENT_COMPONENT,ICAL_VFREEBUSY_COMPONENT,ICAL_RESTRICTION_ZERO,0},
{ICAL_METHOD_ADD,ICAL_VEVENT_COMPONENT,ICAL_VTODO_COMPONENT,ICAL_RESTRICTION_ZERO,0},
{ICAL_METHOD_ADD,ICAL_VEVENT_COMPONENT,ICAL_VJOURNAL_COMPONENT,ICAL_RESTRICTION_ZERO,0},
- {ICAL_METHOD_CANCEL,ICAL_VEVENT_COMPONENT,ICAL_VTIMEZONE_COMPONENT,ICAL_RESTRICTION_ZEROPLUS,0},
+ {ICAL_METHOD_CANCEL,ICAL_VEVENT_COMPONENT,ICAL_VTIMEZONE_COMPONENT,ICAL_RESTRICTION_ZEROPLUS,icalrestriction_must_if_tz_ref},
{ICAL_METHOD_CANCEL,ICAL_VEVENT_COMPONENT,ICAL_X_COMPONENT,ICAL_RESTRICTION_ZEROPLUS,0},
{ICAL_METHOD_CANCEL,ICAL_VEVENT_COMPONENT,ICAL_VTODO_COMPONENT,ICAL_RESTRICTION_ZERO,0},
{ICAL_METHOD_CANCEL,ICAL_VEVENT_COMPONENT,ICAL_VJOURNAL_COMPONENT,ICAL_RESTRICTION_ZERO,0},
@@ -1490,10 +1683,10 @@ icalrestriction_component_record icalrestriction_component_records[] = {
{ICAL_METHOD_REFRESH,ICAL_VEVENT_COMPONENT,ICAL_VTODO_COMPONENT,ICAL_RESTRICTION_ZERO,0},
{ICAL_METHOD_REFRESH,ICAL_VEVENT_COMPONENT,ICAL_VJOURNAL_COMPONENT,ICAL_RESTRICTION_ZERO,0},
{ICAL_METHOD_REFRESH,ICAL_VEVENT_COMPONENT,ICAL_VFREEBUSY_COMPONENT,ICAL_RESTRICTION_ZERO,0},
- {ICAL_METHOD_REFRESH,ICAL_VEVENT_COMPONENT,ICAL_VTIMEZONE_COMPONENT,ICAL_RESTRICTION_ZERO,0},
+ {ICAL_METHOD_REFRESH,ICAL_VEVENT_COMPONENT,ICAL_VTIMEZONE_COMPONENT,ICAL_RESTRICTION_ZERO,icalrestriction_must_if_tz_ref},
{ICAL_METHOD_REFRESH,ICAL_VEVENT_COMPONENT,ICAL_VALARM_COMPONENT,ICAL_RESTRICTION_ZERO,0},
{ICAL_METHOD_COUNTER,ICAL_VEVENT_COMPONENT,ICAL_VALARM_COMPONENT,ICAL_RESTRICTION_ZEROPLUS,0},
- {ICAL_METHOD_COUNTER,ICAL_VEVENT_COMPONENT,ICAL_VTIMEZONE_COMPONENT,ICAL_RESTRICTION_ZEROPLUS,0},
+ {ICAL_METHOD_COUNTER,ICAL_VEVENT_COMPONENT,ICAL_VTIMEZONE_COMPONENT,ICAL_RESTRICTION_ZEROPLUS,icalrestriction_must_if_tz_ref},
{ICAL_METHOD_COUNTER,ICAL_VEVENT_COMPONENT,ICAL_X_COMPONENT,ICAL_RESTRICTION_ZEROPLUS,0},
{ICAL_METHOD_COUNTER,ICAL_VEVENT_COMPONENT,ICAL_VTODO_COMPONENT,ICAL_RESTRICTION_ZERO,0},
{ICAL_METHOD_COUNTER,ICAL_VEVENT_COMPONENT,ICAL_VJOURNAL_COMPONENT,ICAL_RESTRICTION_ZERO,0},
@@ -1502,13 +1695,13 @@ icalrestriction_component_record icalrestriction_component_records[] = {
{ICAL_METHOD_DECLINECOUNTER,ICAL_VEVENT_COMPONENT,ICAL_VTODO_COMPONENT,ICAL_RESTRICTION_ZERO,0},
{ICAL_METHOD_DECLINECOUNTER,ICAL_VEVENT_COMPONENT,ICAL_VJOURNAL_COMPONENT,ICAL_RESTRICTION_ZERO,0},
{ICAL_METHOD_DECLINECOUNTER,ICAL_VEVENT_COMPONENT,ICAL_VFREEBUSY_COMPONENT,ICAL_RESTRICTION_ZERO,0},
- {ICAL_METHOD_DECLINECOUNTER,ICAL_VEVENT_COMPONENT,ICAL_VTIMEZONE_COMPONENT,ICAL_RESTRICTION_ZERO,0},
+ {ICAL_METHOD_DECLINECOUNTER,ICAL_VEVENT_COMPONENT,ICAL_VTIMEZONE_COMPONENT,ICAL_RESTRICTION_ZERO,icalrestriction_must_if_tz_ref},
{ICAL_METHOD_DECLINECOUNTER,ICAL_VEVENT_COMPONENT,ICAL_VALARM_COMPONENT,ICAL_RESTRICTION_ZERO,0},
{ICAL_METHOD_PUBLISH,ICAL_VFREEBUSY_COMPONENT,ICAL_X_COMPONENT,ICAL_RESTRICTION_ZEROPLUS,0},
{ICAL_METHOD_PUBLISH,ICAL_VFREEBUSY_COMPONENT,ICAL_VEVENT_COMPONENT,ICAL_RESTRICTION_ZERO,0},
{ICAL_METHOD_PUBLISH,ICAL_VFREEBUSY_COMPONENT,ICAL_VTODO_COMPONENT,ICAL_RESTRICTION_ZERO,0},
{ICAL_METHOD_PUBLISH,ICAL_VFREEBUSY_COMPONENT,ICAL_VJOURNAL_COMPONENT,ICAL_RESTRICTION_ZERO,0},
- {ICAL_METHOD_PUBLISH,ICAL_VFREEBUSY_COMPONENT,ICAL_VTIMEZONE_COMPONENT,ICAL_RESTRICTION_ZERO,0},
+ {ICAL_METHOD_PUBLISH,ICAL_VFREEBUSY_COMPONENT,ICAL_VTIMEZONE_COMPONENT,ICAL_RESTRICTION_ZERO,icalrestriction_must_if_tz_ref},
{ICAL_METHOD_PUBLISH,ICAL_VFREEBUSY_COMPONENT,ICAL_VALARM_COMPONENT,ICAL_RESTRICTION_ZERO,0},
{ICAL_METHOD_REQUEST,ICAL_VFREEBUSY_COMPONENT,ICAL_X_COMPONENT,ICAL_RESTRICTION_ZEROPLUS,0},
{ICAL_METHOD_REQUEST,ICAL_VFREEBUSY_COMPONENT,ICAL_VALARM_COMPONENT,ICAL_RESTRICTION_ZERO,0},
@@ -1583,5 +1776,5 @@ icalrestriction_component_record icalrestriction_component_records[] = {
{ICAL_METHOD_CANCEL,ICAL_VJOURNAL_COMPONENT,ICAL_VEVENT_COMPONENT,ICAL_RESTRICTION_ZERO,0},
{ICAL_METHOD_CANCEL,ICAL_VJOURNAL_COMPONENT,ICAL_VFREEBUSY_COMPONENT,ICAL_RESTRICTION_ZERO,0},
{ICAL_METHOD_CANCEL,ICAL_VJOURNAL_COMPONENT,ICAL_VTODO_COMPONENT,ICAL_RESTRICTION_ZERO,0},
- {ICAL_METHOD_NONE,ICAL_NO_COMPONENT,ICAL_NO_COMPONENT,ICAL_RESTRICTION_NONE,0}
+ {ICAL_METHOD_NONE,ICAL_NO_COMPONENT,ICAL_NO_COMPONENT,ICAL_RESTRICTION_NONE}
};
diff --git a/libical/src/libical/icalrestriction.h b/libical/src/libical/icalrestriction.h
index 12421d0f32..409334cf28 100644
--- a/libical/src/libical/icalrestriction.h
+++ b/libical/src/libical/icalrestriction.h
@@ -27,7 +27,8 @@
======================================================================*/
-#include "ical.h"
+#include "icalproperty.h"
+#include "icalcomponent.h"
#ifndef ICALRESTRICTION_H
#define ICALRESTRICTION_H
@@ -48,15 +49,6 @@ typedef enum icalrestriction_kind {
int
icalrestriction_compare(icalrestriction_kind restr, int count);
-icalrestriction_kind
-icalrestriction_get_property_restriction(icalproperty_method method,
- icalcomponent_kind component,
- icalproperty_kind property);
-
-icalrestriction_kind
-icalrestriction_get_component_restriction(icalproperty_method method,
- icalcomponent_kind component,
- icalcomponent_kind subcomponent);
int
icalrestriction_is_parameter_allowed(icalproperty_kind property,
diff --git a/libical/src/libical/icaltime.c b/libical/src/libical/icaltime.c
index 6f17278bde..f43602a721 100644
--- a/libical/src/libical/icaltime.c
+++ b/libical/src/libical/icaltime.c
@@ -26,7 +26,12 @@
======================================================================*/
#include "icaltime.h"
+#include "icalvalue.h"
#include <assert.h>
+#include <string.h>
+#include <stdlib.h>
+#include <stdio.h>
+
struct icaltimetype
icaltime_from_timet(time_t tm, int is_date, int is_utc)
@@ -34,11 +39,12 @@ icaltime_from_timet(time_t tm, int is_date, int is_utc)
struct icaltimetype tt;
struct tm t;
- if(is_utc == 1){
- t = *(gmtime(&tm));
- } else {
- t = *(localtime(&tm));
+ if(is_utc == 0){
+ tm += icaltime_local_utc_offset();
}
+
+ t = *(localtime(&tm));
+
tt.second = t.tm_sec;
tt.minute = t.tm_min;
tt.hour = t.tm_hour;
@@ -52,6 +58,7 @@ icaltime_from_timet(time_t tm, int is_date, int is_utc)
return tt;
}
+/* Always returns time in UTC */
time_t icaltime_as_timet(struct icaltimetype tt)
{
struct tm stm;
@@ -68,11 +75,47 @@ time_t icaltime_as_timet(struct icaltimetype tt)
stm.tm_isdst = -1; /* prevents mktime from changing hour based on
daylight savings */
+ if(tt.is_utc == 0){
+ stm.tm_sec -= icaltime_local_utc_offset();
+ }
+
tut = mktime(&stm);
return tut;
}
+
+
+struct icaltimetype icaltime_from_string(const char* str)
+{
+ struct icaltimetype tt;
+ icalvalue *v = icalvalue_new_from_string(ICAL_DATETIME_VALUE,str);
+
+ if (v == 0){
+ return icaltime_null_time();
+ }
+
+ tt = icalvalue_get_datetime(v);
+
+ icalvalue_free(v);
+
+ return tt;
+
+}
+
+char ctime_str[20];
+char* icaltime_as_ctime(struct icaltimetype t)
+{
+ time_t tt = icaltime_as_timet(t);
+
+ sprintf(ctime_str,"%s",ctime(&tt));
+
+ ctime_str[strlen(ctime_str)-1] = 0;
+
+ return ctime_str;
+}
+
+
short days_in_month[] = {0,31,28,31,30,31,30,31,31,30,31,30,31};
short icaltime_days_in_month(short month,short year)
@@ -180,3 +223,189 @@ int icaltime_compare(struct icaltimetype a,struct icaltimetype b)
}
}
+
+int
+icaltime_compare_date_only (struct icaltimetype a, struct icaltimetype b)
+{
+ time_t t1;
+ time_t t2;
+
+ if (a.year == b.year && a.month == b.month && a.day == b.day)
+ return 0;
+
+ t1 = icaltime_as_timet (a);
+ t2 = icaltime_as_timet (b);
+
+ if (t1 > t2)
+ return 1;
+ else if (t1 < t2)
+ return -1;
+ else {
+ /* not reached */
+ assert (0);
+ return 0;
+ }
+}
+
+/* convert tt, of timezone tzid, into a utc time */
+struct icaltimetype icaltime_as_utc(struct icaltimetype tt,const char* tzid)
+{
+ time_t offset, tm;
+ struct icaltimetype utc;
+
+ offset = icaltime_utc_offset(tt,tzid);
+ tm = icaltime_as_timet(tt);
+
+ tm += offset;
+
+ utc = icaltime_from_timet(tm,0,0);
+
+ return utc;
+}
+
+/* convert tt, a time in UTC, into a time in timezone tzid */
+struct icaltimetype icaltime_as_zone(struct icaltimetype tt,const char* tzid)
+{
+ time_t offset, tm;
+ struct icaltimetype zone;
+
+ offset = icaltime_utc_offset(tt,tzid);
+ tm = icaltime_as_timet(tt);
+
+ tm -= offset;
+
+ zone = icaltime_from_timet(tm,0,0);
+
+ return zone;
+
+}
+
+/* Return the offset of the named zone as seconds. tt is a time
+ indicating the date for which you want the offset */
+time_t icaltime_utc_offset(struct icaltimetype tt, const char* tzid)
+{
+ extern long int timezone;
+ time_t now;
+ struct tm *stm;
+
+ char *tzstr = 0;
+ char *tmp;
+
+ /* Put the new time zone into the environment */
+ if(getenv("TZ") != 0){
+ tzstr = (char*)strdup(getenv("TZ"));
+ }
+
+ tmp = (char*)malloc(1024);
+ snprintf(tmp,1024,"TZ=%s",tzid);
+
+ putenv(tmp);
+
+ /* Get the offset */
+
+ now = icaltime_as_timet(tt);
+
+ stm = localtime(&now); /* This sets 'timezone'*/
+
+ /* restore the original environment */
+
+ if(tzstr!=0){
+ putenv(tzstr);
+ } else {
+ putenv("TZ"); /* Delete from environment */
+ }
+
+ return timezone;
+}
+
+time_t icaltime_local_utc_offset()
+{
+ time_t now;
+ struct tm *stm;
+
+ stm = localtime(&now); /* This sets 'timezone'*/
+
+ return timezone;
+
+}
+
+
+
+
+
+
+time_t
+icalperiodtype_duration (struct icalperiodtype period);
+
+
+time_t
+icalperiodtype_end (struct icalperiodtype period);
+
+
+/* From Russel Steinthal */
+time_t icaldurationtype_as_timet(struct icaldurationtype dur)
+{
+ return (time_t) (dur.seconds +
+ (60 * dur.minutes) +
+ (60 * 60 * dur.hours) +
+ (60 * 60 * 24 * dur.days) +
+ (60 * 60 * 24 * 7 * dur.weeks));
+}
+
+/* From Seth Alves, <alves@hungry.com> */
+struct icaldurationtype icaldurationtype_from_timet(time_t t)
+{
+ struct icaldurationtype dur;
+ time_t used = 0;
+
+ dur.weeks = (t - used) / (60 * 60 * 24 * 7);
+ used += dur.weeks * (60 * 60 * 24 * 7);
+ dur.days = (t - used) / (60 * 60 * 24);
+ used += dur.days * (60 * 60 * 24);
+ dur.hours = (t - used) / (60 * 60);
+ used += dur.hours * (60 * 60);
+ dur.minutes = (t - used) / (60);
+ used += dur.minutes * (60);
+ dur.seconds = (t - used);
+
+ return dur;
+}
+
+struct icaldurationtype icaldurationtype_from_string(const char* str)
+{
+
+ icalvalue *v = icalvalue_new_from_string(ICAL_DURATION_VALUE,str);
+
+ if( v !=0){
+ return icalvalue_get_duration(v);
+ } else {
+ struct icaldurationtype dur;
+ memset(&dur,0,sizeof(struct icaldurationtype));
+ return dur;
+ }
+
+}
+
+
+struct icaltimetype icaltime_add(struct icaltimetype t,
+ struct icaldurationtype d)
+{
+ time_t tt = icaltime_as_timet(t);
+ time_t dt = icaldurationtype_as_timet(d);
+
+ return icaltime_from_timet(tt + dt, t.is_date, t.is_utc);
+
+}
+
+struct icaldurationtype icaltime_subtract(struct icaltimetype t1,
+ struct icaltimetype t2)
+{
+
+ time_t t1t = icaltime_as_timet(t1);
+ time_t t2t = icaltime_as_timet(t2);
+
+ return icaldurationtype_from_timet(t1t-t2t);
+
+
+}
+
diff --git a/libical/src/libical/icaltime.h b/libical/src/libical/icaltime.h
index 64eaee0431..64617e578d 100644
--- a/libical/src/libical/icaltime.h
+++ b/libical/src/libical/icaltime.h
@@ -1,4 +1,4 @@
-// -*- Mode: C -*-
+/* -*- Mode: C -*- */
/*======================================================================
FILE: icaltime.h
CREATOR: eric 02 June 2000
@@ -31,6 +31,13 @@
#include <time.h>
+/* icaltime_span is returned by icalcomponent_get_span() */
+struct icaltime_span {
+ time_t start; /* in UTC */
+ time_t end; /* in UTC */
+ int is_busy; /* 1->busy time, 0-> free time */
+};
+
struct icaltimetype
{
int year;
@@ -45,7 +52,7 @@ struct icaltimetype
int is_date; /* 1 -> interpret this as date. */
};
-struct icaltimetype icaltime_null_time();
+struct icaltimetype icaltime_null_time(void);
int icaltime_is_null_time(struct icaltimetype t);
@@ -58,7 +65,9 @@ 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);
@@ -66,8 +75,62 @@ struct icaltimetype icaltime_from_week_number(short week_number, short year);
int icaltime_compare(struct icaltimetype a,struct icaltimetype b);
+int icaltime_compare_date_only(struct icaltimetype a, struct icaltimetype b);
+
+
short icaltime_days_in_month(short month,short year);
+/* Routines for handling timezones */
+
+/* Return the offset of the named zone as seconds. tt is a time
+ indicating the date for which you want the offset */
+time_t icaltime_utc_offset(struct icaltimetype tt, const char* tzid);
+
+time_t icaltime_local_utc_offset();
+
+
+/* convert tt, of timezone tzid, into a utc time */
+struct icaltimetype icaltime_as_utc(struct icaltimetype tt,const char* tzid);
+
+/* convert tt, a time in UTC, into a time in timezone tzid */
+struct icaltimetype icaltime_as_zone(struct icaltimetype tt,const char* tzid);
+
+
+
+struct icaldurationtype
+{
+ int is_neg;
+ unsigned int days;
+ unsigned int weeks;
+ unsigned int hours;
+ unsigned int minutes;
+ unsigned int seconds;
+};
+
+struct icaldurationtype icaldurationtype_from_timet(time_t t);
+struct icaldurationtype icaldurationtype_from_string(const char*);
+time_t icaldurationtype_as_timet(struct icaldurationtype duration);
+
+
+struct icalperiodtype
+{
+ struct icaltimetype start; /* Must be absolute */
+ struct icaltimetype end; /* Must be absolute */
+ struct icaldurationtype duration;
+};
+
+time_t icalperiodtype_duration(struct icalperiodtype period);
+time_t icalperiodtype_end(struct icalperiodtype period);
+
+
+
+struct icaltimetype icaltime_add(struct icaltimetype t,
+ struct icaldurationtype d);
+
+struct icaldurationtype icaltime_subtract(struct icaltimetype t1,
+ struct icaltimetype t2);
+
+
#endif /* !ICALTIME_H */
diff --git a/libical/src/libical/icaltypes.c b/libical/src/libical/icaltypes.c
index c7017eb2af..16d0ebf1b8 100644
--- a/libical/src/libical/icaltypes.c
+++ b/libical/src/libical/icaltypes.c
@@ -34,7 +34,6 @@
#include <errno.h> /* for errno */
#include <string.h> /* for icalmemory_strdup */
#include <assert.h>
-#include <limits.h> /* for SHRT_MAX */
#define TEMP_MAX 1024
@@ -151,75 +150,6 @@ void* icalattachtype_get_binary(struct icalattachtype* v)
-time_t
-icalperiodtype_duration (struct icalperiodtype period);
-
-
-time_t
-icalperiodtype_end (struct icalperiodtype period);
-
-
-/* From Russel Steinthal */
-time_t icaldurationtype_as_timet(struct icaldurationtype dur)
-{
- return (time_t) (dur.seconds +
- (60 * dur.minutes) +
- (60 * 60 * dur.hours) +
- (60 * 60 * 24 * dur.days) +
- (60 * 60 * 24 * 7 * dur.weeks));
-}
-
-/* From Seth Alves, <alves@hungry.com> */
-struct icaldurationtype icaldurationtype_from_timet(time_t t)
-{
- struct icaldurationtype dur;
- time_t used = 0;
-
- dur.weeks = (t - used) / (60 * 60 * 24 * 7);
- used += dur.weeks * (60 * 60 * 24 * 7);
- dur.days = (t - used) / (60 * 60 * 24);
- used += dur.days * (60 * 60 * 24);
- dur.hours = (t - used) / (60 * 60);
- used += dur.hours * (60 * 60);
- dur.minutes = (t - used) / (60);
- used += dur.minutes * (60);
- dur.seconds = (t - used);
-
- return dur;
-}
-
-void icalrecurrencetype_clear(struct icalrecurrencetype *recur)
-{
- memset(recur,ICAL_RECURRENCE_ARRAY_MAX_BYTE,
- sizeof(struct icalrecurrencetype));
-
- recur->week_start = ICAL_NO_WEEKDAY;
- recur->freq = ICAL_NO_RECURRENCE;
- recur->interval = 1;
- memset(&(recur->until),0,sizeof(struct icaltimetype));
- recur->count = 0;
-}
-
-/* The 'day' element of icalrecurrencetype_weekday is encoded to allow
-reporesentation of both the day of the week ( Monday, Tueday), but
-also the Nth day of the week ( First tuesday of the month, last
-thursday of the year) These routines decode the day values.
-
-The day's position in the period ( Nth-ness) and the numerical value
-of the day are encoded together as: pos*7 + dow
- */
-
-enum icalrecurrencetype_weekday icalrecurrencetype_day_day_of_week(short day)
-{
- return abs(day)%8;
-}
-
-short icalrecurrencetype_day_position(short day)
-{
- return (day-icalrecurrencetype_day_day_of_week(day))/8;
-}
-
-
struct icalreqstattype icalreqstattype_from_string(char* str)
{
char *p1,*p2;
diff --git a/libical/src/libical/icaltypes.h b/libical/src/libical/icaltypes.h
index 1130ab2457..d2a106883b 100644
--- a/libical/src/libical/icaltypes.h
+++ b/libical/src/libical/icaltypes.h
@@ -46,7 +46,7 @@ struct icalattachtype
/* converts base64 to binary, fetches url and stores as binary, or
just returns data */
-struct icalattachtype* icalattachtype_new();
+struct icalattachtype* icalattachtype_new(void);
void icalattachtype_add_reference(struct icalattachtype* v);
void icalattachtype_free(struct icalattachtype* v);
@@ -69,84 +69,6 @@ struct icalgeotype
-/* See RFC 2445 Section 4.3.10, RECUR Value, for an explaination of
- the values and fields in struct icalrecurrencetype */
-
-
-struct icalrecurrencetype
-{
- icalrecurrencetype_frequency freq;
-
-
- /* until and count are mutually exclusive. */
- struct icaltimetype until;
- int count;
-
- short interval;
-
- icalrecurrencetype_weekday week_start;
-
- /* The BY* parameters can each take a list of values. Here I
- * assume that the list of values will not be larger than the
- * range of the value -- that is, the client will not name a
- * value more than once.
-
- * Each of the lists is terminated with the value SHRT_MAX
- * unless the the list is full. */
-
- short by_second[61];
- short by_minute[61];
- short by_hour[25];
- short by_day[8]; /* Encoded value, see below */
- short by_month_day[32];
- short by_year_day[367];
- short by_week_no[54];
- short by_month[13];
- short by_set_pos[367];
-};
-
-
-void icalrecurrencetype_clear(struct icalrecurrencetype *r);
-
-/* The 'day' element of icalrecurrencetype_weekday is encoded to allow
-reporesentation of both the day of the week ( Monday, Tueday), but
-also the Nth day of the week ( First tuesday of the month, last
-thursday of the year) These routines decode the day values */
-
-/* 1 == Monday, etc. */
-enum icalrecurrencetype_weekday icalrecurrencetype_day_day_of_week(short day);
-
-/* 0 == any of day of week. 1 == first, 2 = second, -2 == second to last, etc */
-short icalrecurrencetype_day_position(short day);
-
-struct icaldurationtype
-{
- unsigned int days;
- unsigned int weeks;
- unsigned int hours;
- unsigned int minutes;
- unsigned int seconds;
-};
-
-struct icaldurationtype icaldurationtype_from_timet(time_t t);
-time_t icaldurationtype_as_timet(struct icaldurationtype duration);
-
-/* Return the next occurance of 'r' after the time specified by 'after' */
-struct icaltimetype icalrecurrencetype_next_occurance(
- struct icalrecurrencetype *r,
- struct icaltimetype *after);
-
-
-struct icalperiodtype
-{
- struct icaltimetype start; /* Must be absolute */
- struct icaltimetype end; /* Must be absolute */
- struct icaldurationtype duration;
-};
-
-time_t icalperiodtype_duration(struct icalperiodtype period);
-time_t icalperiodtype_end(struct icalperiodtype period);
-
union icaltriggertype
{
struct icaltimetype time;
@@ -154,6 +76,7 @@ union icaltriggertype
};
+
/* struct icalreqstattype. This struct contains two string pointers,
but don't try to free either of them. The "desc" string is a pointer
to a static table inside the library. Don't try to free it. The
@@ -168,8 +91,8 @@ operating on a the value of a request_status property. */
struct icalreqstattype {
icalrequeststatus code;
- char* desc;
- char* debug;
+ const char* desc;
+ const char* debug;
};
struct icalreqstattype icalreqstattype_from_string(char* str);
diff --git a/libical/src/libical/icalvalue.c b/libical/src/libical/icalvalue.c
index 0d059850f2..de08ecb8a1 100644
--- a/libical/src/libical/icalvalue.c
+++ b/libical/src/libical/icalvalue.c
@@ -28,11 +28,9 @@
======================================================================*/
#ifdef HAVE_CONFIG_H
-#include "config.h"
+#include <config.h>
#endif
-
-#include "ical.h"
#include "icalerror.h"
#include "icalmemory.h"
#include "icalparser.h"
@@ -45,7 +43,6 @@
#include <errno.h>
#include <time.h> /* for mktime */
#include <stdlib.h> /* for atoi and atof */
-#include <limits.h> /* for SHRT_MAX */
#if _MAC_OS_
#include "icalmemory_strdup.h"
@@ -67,7 +64,7 @@ struct icalvalue_impl {
union data {
struct icalattachtype v_attach;
/* void *v_binary; */ /* use v_attach */
- char *v_string;
+ const char *v_string;
/*char *v_text;*/
/*char *v_caladdress;*/
/*char *v_uri;*/
@@ -95,6 +92,7 @@ struct icalvalue_impl {
struct icalrecurrencetype *v_recur;
union icaltriggertype v_trigger;
icalproperty_method v_method;
+ icalproperty_status v_status;
} data;
};
@@ -196,7 +194,7 @@ icalvalue* icalvalue_new_clone(icalvalue* value){
return new;
}
-char* icalmemory_strdup_and_dequote(char* str)
+char* icalmemory_strdup_and_dequote(const char* str)
{
char* p;
char* out = (char*)malloc(sizeof(char) * strlen(str) +1);
@@ -254,7 +252,7 @@ char* icalmemory_strdup_and_dequote(char* str)
return out;
}
-icalvalue* icalvalue_new_from_string_with_error(icalvalue_kind kind,char* str,icalproperty** error)
+icalvalue* icalvalue_new_from_string_with_error(icalvalue_kind kind,const char* str,icalproperty** error)
{
icalvalue *value = 0;
@@ -382,6 +380,21 @@ icalvalue* icalvalue_new_from_string_with_error(icalvalue_kind kind,char* str,ic
break;
}
+
+
+ case ICAL_STATUS_VALUE:
+ {
+ icalproperty_status status = icalenum_string_to_status(str);
+
+ if(status == ICAL_STATUS_NONE){
+ value = 0;
+ } else {
+ value = icalvalue_new_status(status);
+ }
+
+ break;
+
+ }
case ICAL_GEO_VALUE:
{
value = 0;
@@ -454,7 +467,7 @@ icalvalue* icalvalue_new_from_string_with_error(icalvalue_kind kind,char* str,ic
}
-icalvalue* icalvalue_new_from_string(icalvalue_kind kind,char* str)
+icalvalue* icalvalue_new_from_string(icalvalue_kind kind,const char* str)
{
return icalvalue_new_from_string_with_error(kind,str,(icalproperty*)0);
}
@@ -488,7 +501,7 @@ icalvalue_free (icalvalue* value)
case ICAL_URI_VALUE:
{
if (v->data.v_string != 0) {
- free(v->data.v_string);
+ free((void*)v->data.v_string);
v->data.v_string = 0;
}
break;
@@ -496,7 +509,7 @@ icalvalue_free (icalvalue* value)
case ICAL_RECUR_VALUE:
{
if(v->data.v_recur != 0){
- free(v->data.v_recur);
+ free((void*)v->data.v_recur);
v->data.v_recur = 0;
}
break;
@@ -530,7 +543,7 @@ icalvalue_is_valid (icalvalue* value)
char* icalvalue_binary_as_ical_string(icalvalue* value) {
- char* data;
+ const char* data;
char* str;
icalerror_check_arg_rz( (value!=0),"value");
data = icalvalue_get_binary(value);
@@ -579,7 +592,7 @@ char* icalvalue_utcoffset_as_ical_string(icalvalue* value)
char* icalvalue_string_as_ical_string(icalvalue* value) {
- char* data;
+ const char* data;
char* str = 0;
icalerror_check_arg_rz( (value!=0),"value");
data = ((struct icalvalue_impl*)value)->data.v_string;
@@ -629,7 +642,7 @@ char* icalvalue_recur_as_ical_string(icalvalue* value)
icalmemory_append_string(&str,&str_p,&buf_sz,"FREQ=");
icalmemory_append_string(&str,&str_p,&buf_sz,
- icalenum_recurrence_to_string(recur->freq));
+ icalrecur_recurrence_to_string(recur->freq));
if(recur->until.year != 0){
@@ -665,10 +678,16 @@ char* icalvalue_recur_as_ical_string(icalvalue* value)
i++){
if (j == 3) { /* BYDAY */
short dow = icalrecurrencetype_day_day_of_week(array[i]);
- char *daystr = icalenum_weekday_to_string(dow);
-
- /* HACK, does not correctly handle the integer value */
- icalmemory_append_string(&str,&str_p,&buf_sz,daystr);
+ 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);
@@ -690,7 +709,7 @@ char* icalvalue_text_as_ical_string(icalvalue* value) {
char *str;
char *str_p;
char *rtrn;
- char *p;
+ const char *p;
size_t buf_sz;
int line_length;
@@ -1074,7 +1093,7 @@ char* icalvalue_trigger_as_ical_string(icalvalue* value) {
return str;
}
-char*
+const char*
icalvalue_as_ical_string (icalvalue* value)
{
struct icalvalue_impl* v = (struct icalvalue_impl*)value;
@@ -1139,6 +1158,10 @@ icalvalue_as_ical_string (icalvalue* value)
case ICAL_METHOD_VALUE:
return icalenum_method_to_string(v->data.v_method);
+ case ICAL_STATUS_VALUE:
+ return icalenum_status_to_string(v->data.v_status);
+
+
case ICAL_NO_VALUE:
default:
{
@@ -1263,6 +1286,17 @@ icalvalue_compare(icalvalue* a, icalvalue *b)
}
}
+
+ case ICAL_STATUS_VALUE:
+ {
+ if (icalvalue_get_status(a) == icalvalue_get_status(b)){
+ return ICAL_XLICCOMPARETYPE_EQUAL;
+ } else {
+ return ICAL_XLICCOMPARETYPE_NOTEQUAL;
+ }
+
+ }
+
case ICAL_PERIOD_VALUE:
case ICAL_GEO_VALUE:
case ICAL_RECUR_VALUE:
@@ -1388,7 +1422,7 @@ icalvalue_get_attach(icalvalue* value)
icalvalue*
-icalvalue_new_binary (char* v)
+icalvalue_new_binary (const char* v)
{
struct icalvalue_impl* impl = icalvalue_new_impl(ICAL_BINARY_VALUE);
@@ -1400,7 +1434,7 @@ icalvalue_new_binary (char* v)
}
void
-icalvalue_set_binary(icalvalue* value, char* v)
+icalvalue_set_binary(icalvalue* value, const char* v)
{
struct icalvalue_impl* impl;
@@ -1410,7 +1444,7 @@ icalvalue_set_binary(icalvalue* value, char* v)
icalerror_check_value_type(value, ICAL_BINARY_VALUE);
impl = (struct icalvalue_impl*)value;
- if(impl->data.v_string!=0) {free(impl->data.v_string);}
+ if(impl->data.v_string!=0) {free((void*)impl->data.v_string);}
impl->data.v_string = strdup(v);
@@ -1420,7 +1454,7 @@ icalvalue_set_binary(icalvalue* value, char* v)
}
-char*
+const char*
icalvalue_get_binary(icalvalue* value)
{
icalerror_check_arg( (value!=0),"value");
@@ -1466,7 +1500,7 @@ icalvalue_get_boolean(icalvalue* value)
icalvalue*
-icalvalue_new_caladdress (char* v)
+icalvalue_new_caladdress (const char* v)
{
struct icalvalue_impl* impl = icalvalue_new_impl(ICAL_CALADDRESS_VALUE);
@@ -1478,7 +1512,7 @@ icalvalue_new_caladdress (char* v)
}
void
-icalvalue_set_caladdress(icalvalue* value, char* v)
+icalvalue_set_caladdress(icalvalue* value, const char* v)
{
struct icalvalue_impl* impl;
@@ -1488,7 +1522,7 @@ icalvalue_set_caladdress(icalvalue* value, char* v)
icalerror_check_value_type(value, ICAL_CALADDRESS_VALUE);
impl = (struct icalvalue_impl*)value;
- if(impl->data.v_string!=0) {free(impl->data.v_string);}
+ if(impl->data.v_string!=0) {free((void*)impl->data.v_string);}
impl->data.v_string = strdup(v);
@@ -1498,7 +1532,7 @@ icalvalue_set_caladdress(icalvalue* value, char* v)
}
-char*
+const char*
icalvalue_get_caladdress(icalvalue* value)
{
icalerror_check_arg( (value!=0),"value");
@@ -1857,8 +1891,9 @@ icalvalue_get_period(icalvalue* value)
return ((struct icalvalue_impl*)value)->data.v_period;
}
+
icalvalue*
-icalvalue_new_string (char* v)
+icalvalue_new_string (const char* v)
{
struct icalvalue_impl* impl = icalvalue_new_impl(ICAL_STRING_VALUE);
@@ -1870,7 +1905,7 @@ icalvalue_new_string (char* v)
}
void
-icalvalue_set_string(icalvalue* value, char* v)
+icalvalue_set_string(icalvalue* value, const char* v)
{
struct icalvalue_impl* impl;
@@ -1880,7 +1915,7 @@ icalvalue_set_string(icalvalue* value, char* v)
icalerror_check_value_type(value, ICAL_STRING_VALUE);
impl = (struct icalvalue_impl*)value;
- if(impl->data.v_string!=0) {free(impl->data.v_string);}
+ if(impl->data.v_string!=0) {free((void*)impl->data.v_string);}
impl->data.v_string = strdup(v);
@@ -1890,7 +1925,7 @@ icalvalue_set_string(icalvalue* value, char* v)
}
-char*
+const char*
icalvalue_get_string(icalvalue* value)
{
icalerror_check_arg( (value!=0),"value");
@@ -1901,7 +1936,7 @@ icalvalue_get_string(icalvalue* value)
icalvalue*
-icalvalue_new_text (char* v)
+icalvalue_new_text (const char* v)
{
struct icalvalue_impl* impl = icalvalue_new_impl(ICAL_TEXT_VALUE);
@@ -1913,7 +1948,7 @@ icalvalue_new_text (char* v)
}
void
-icalvalue_set_text(icalvalue* value, char* v)
+icalvalue_set_text(icalvalue* value, const char* v)
{
struct icalvalue_impl* impl;
@@ -1923,7 +1958,7 @@ icalvalue_set_text(icalvalue* value, char* v)
icalerror_check_value_type(value, ICAL_TEXT_VALUE);
impl = (struct icalvalue_impl*)value;
- if(impl->data.v_string!=0) {free(impl->data.v_string);}
+ if(impl->data.v_string!=0) {free((void*)impl->data.v_string);}
impl->data.v_string = strdup(v);
@@ -1933,7 +1968,7 @@ icalvalue_set_text(icalvalue* value, char* v)
}
-char*
+const char*
icalvalue_get_text(icalvalue* value)
{
icalerror_check_arg( (value!=0),"value");
@@ -2014,7 +2049,7 @@ icalvalue_get_trigger(icalvalue* value)
icalvalue*
-icalvalue_new_uri (char* v)
+icalvalue_new_uri (const char* v)
{
struct icalvalue_impl* impl = icalvalue_new_impl(ICAL_URI_VALUE);
@@ -2026,7 +2061,7 @@ icalvalue_new_uri (char* v)
}
void
-icalvalue_set_uri(icalvalue* value, char* v)
+icalvalue_set_uri(icalvalue* value, const char* v)
{
struct icalvalue_impl* impl;
@@ -2036,7 +2071,7 @@ icalvalue_set_uri(icalvalue* value, char* v)
icalerror_check_value_type(value, ICAL_URI_VALUE);
impl = (struct icalvalue_impl*)value;
- if(impl->data.v_string!=0) {free(impl->data.v_string);}
+ if(impl->data.v_string!=0) {free((void*)impl->data.v_string);}
impl->data.v_string = strdup(v);
@@ -2046,7 +2081,7 @@ icalvalue_set_uri(icalvalue* value, char* v)
}
-char*
+const char*
icalvalue_get_uri(icalvalue* value)
{
icalerror_check_arg( (value!=0),"value");
@@ -2092,7 +2127,7 @@ icalvalue_get_utcoffset(icalvalue* value)
icalvalue*
-icalvalue_new_query (char* v)
+icalvalue_new_query (const char* v)
{
struct icalvalue_impl* impl = icalvalue_new_impl(ICAL_QUERY_VALUE);
@@ -2104,7 +2139,7 @@ icalvalue_new_query (char* v)
}
void
-icalvalue_set_query(icalvalue* value, char* v)
+icalvalue_set_query(icalvalue* value, const char* v)
{
struct icalvalue_impl* impl;
@@ -2114,7 +2149,7 @@ icalvalue_set_query(icalvalue* value, char* v)
icalerror_check_value_type(value, ICAL_QUERY_VALUE);
impl = (struct icalvalue_impl*)value;
- if(impl->data.v_string!=0) {free(impl->data.v_string);}
+ if(impl->data.v_string!=0) {free((void*)impl->data.v_string);}
impl->data.v_string = strdup(v);
@@ -2124,7 +2159,7 @@ icalvalue_set_query(icalvalue* value, char* v)
}
-char*
+const char*
icalvalue_get_query(icalvalue* value)
{
icalerror_check_arg( (value!=0),"value");
@@ -2133,3 +2168,38 @@ icalvalue_get_query(icalvalue* value)
return ((struct icalvalue_impl*)value)->data.v_string;
}
+
+icalvalue*
+icalvalue_new_status (icalproperty_status v)
+{
+ struct icalvalue_impl* impl = icalvalue_new_impl(ICAL_STATUS_VALUE);
+
+
+ icalvalue_set_status((icalvalue*)impl,v);
+
+ return (icalvalue*)impl;
+}
+
+void
+icalvalue_set_status(icalvalue* value, icalproperty_status v)
+{
+ struct icalvalue_impl* impl;
+
+ icalerror_check_arg_rv( (value!=0),"value");
+
+ icalerror_check_value_type(value, ICAL_STATUS_VALUE);
+
+ impl = (struct icalvalue_impl*)value;
+
+ impl->data.v_status = v;
+}
+
+icalproperty_status
+icalvalue_get_status(icalvalue* value)
+{
+ icalerror_check_arg( (value!=0),"value");
+ icalerror_check_value_type(value, ICAL_STATUS_VALUE);
+
+ return ((struct icalvalue_impl*)value)->data.v_status;
+}
+
diff --git a/libical/src/libical/icalvalue.h b/libical/src/libical/icalvalue.h
index 18c15abaf4..86a33306a4 100644
--- a/libical/src/libical/icalvalue.h
+++ b/libical/src/libical/icalvalue.h
@@ -32,20 +32,21 @@
#include <time.h>
#include "icalenums.h"
#include "icaltypes.h"
-
+#include "icalrecur.h"
+
typedef void icalvalue;
icalvalue* icalvalue_new(icalvalue_kind kind);
icalvalue* icalvalue_new_clone(icalvalue* value);
-icalvalue* icalvalue_new_from_string(icalvalue_kind kind, char* str);
+icalvalue* icalvalue_new_from_string(icalvalue_kind kind, const char* str);
void icalvalue_free(icalvalue* value);
int icalvalue_is_valid(icalvalue* value);
-char* icalvalue_as_ical_string(icalvalue* value);
+const char* icalvalue_as_ical_string(icalvalue* value);
icalvalue_kind icalvalue_isa(icalvalue* value);
@@ -61,9 +62,9 @@ struct icalattachtype icalvalue_get_attach(icalvalue* value);
void icalvalue_set_attach(icalvalue* value, struct icalattachtype v);
/* BINARY */
-icalvalue* icalvalue_new_binary(char* v);
-char* icalvalue_get_binary(icalvalue* value);
-void icalvalue_set_binary(icalvalue* value, char* v);
+icalvalue* icalvalue_new_binary(const char* v);
+const char* icalvalue_get_binary(icalvalue* value);
+void icalvalue_set_binary(icalvalue* value, const char* v);
/* BOOLEAN */
icalvalue* icalvalue_new_boolean(int v);
@@ -71,9 +72,9 @@ int icalvalue_get_boolean(icalvalue* value);
void icalvalue_set_boolean(icalvalue* value, int v);
/* CAL-ADDRESS */
-icalvalue* icalvalue_new_caladdress(char* v);
-char* icalvalue_get_caladdress(icalvalue* value);
-void icalvalue_set_caladdress(icalvalue* value, char* v);
+icalvalue* icalvalue_new_caladdress(const char* v);
+const char* icalvalue_get_caladdress(icalvalue* value);
+void icalvalue_set_caladdress(icalvalue* value, const char* v);
/* DATE */
icalvalue* icalvalue_new_date(struct icaltimetype v);
@@ -131,14 +132,14 @@ struct icalrecurrencetype icalvalue_get_recur(icalvalue* value);
void icalvalue_set_recur(icalvalue* value, struct icalrecurrencetype v);
/* STRING # Non-std */
-icalvalue* icalvalue_new_string(char* v);
-char* icalvalue_get_string(icalvalue* value);
-void icalvalue_set_string(icalvalue* value, char* v);
+icalvalue* icalvalue_new_string(const char* v);
+const char* icalvalue_get_string(icalvalue* value);
+void icalvalue_set_string(icalvalue* value, const char* v);
/* TEXT */
-icalvalue* icalvalue_new_text(char* v);
-char* icalvalue_get_text(icalvalue* value);
-void icalvalue_set_text(icalvalue* value, char* v);
+icalvalue* icalvalue_new_text(const char* v);
+const char* icalvalue_get_text(icalvalue* value);
+void icalvalue_set_text(icalvalue* value, const char* v);
/* TIME */
icalvalue* icalvalue_new_time(struct icaltimetype v);
@@ -151,9 +152,9 @@ union icaltriggertype icalvalue_get_trigger(icalvalue* value);
void icalvalue_set_trigger(icalvalue* value, union icaltriggertype v);
/* URI */
-icalvalue* icalvalue_new_uri(char* v);
-char* icalvalue_get_uri(icalvalue* value);
-void icalvalue_set_uri(icalvalue* value, char* v);
+icalvalue* icalvalue_new_uri(const char* v);
+const char* icalvalue_get_uri(icalvalue* value);
+void icalvalue_set_uri(icalvalue* value, const char* v);
/* UTC-OFFSET */
icalvalue* icalvalue_new_utcoffset(int v);
@@ -161,8 +162,13 @@ int icalvalue_get_utcoffset(icalvalue* value);
void icalvalue_set_utcoffset(icalvalue* value, int v);
/* QUERY */
-icalvalue* icalvalue_new_query(char* v);
-char* icalvalue_get_query(icalvalue* value);
-void icalvalue_set_query(icalvalue* value, char* v);
+icalvalue* icalvalue_new_query(const char* v);
+const char* icalvalue_get_query(icalvalue* value);
+void icalvalue_set_query(icalvalue* value, const char* v);
+
+/* STATUS #Non-st */
+icalvalue* icalvalue_new_status(icalproperty_status v);
+icalproperty_status icalvalue_get_status(icalvalue* value);
+void icalvalue_set_status(icalvalue* value, icalproperty_status v);
-#endif ICALVALUE_H
+#endif /*ICALVALUE_H*/
diff --git a/libical/src/libical/icalversion.h.in b/libical/src/libical/icalversion.h.in
index aaeeed6666..5d213693e5 100644
--- a/libical/src/libical/icalversion.h.in
+++ b/libical/src/libical/icalversion.h.in
@@ -1,3 +1,7 @@
+#ifndef ICAL_VERSION_H
+#define ICAL_VERSION_H
#define ICAL_PACKAGE "@PACKAGE@"
#define ICAL_VERSION "@VERSION@"
+
+#endif
diff --git a/libical/src/libical/icalyacc.c b/libical/src/libical/icalyacc.c
index e51642968a..8cfd94693f 100644
--- a/libical/src/libical/icalyacc.c
+++ b/libical/src/libical/icalyacc.c
@@ -1,10 +1,16 @@
/* A Bison parser, made from icalyacc.y
- by GNU Bison version 1.27
- */
+ by GNU Bison version 1.28 */
#define YYBISON 1 /* Identify Bison output. */
+#define yyparse ical_yyparse
+#define yylex ical_yylex
+#define yyerror ical_yyerror
+#define yylval ical_yylval
+#define yychar ical_yychar
+#define yydebug ical_yydebug
+#define yynerrs ical_yynerrs
#define DIGITS 257
#define INTNUMBER 258
#define FLOATNUMBER 259
@@ -15,124 +21,125 @@
#define COLON 264
#define COMMA 265
#define SEMICOLON 266
-#define TIMESEPERATOR 267
-#define TRUE 268
-#define FALSE 269
-#define FREQ 270
-#define BYDAY 271
-#define BYHOUR 272
-#define BYMINUTE 273
-#define BYMONTH 274
-#define BYMONTHDAY 275
-#define BYSECOND 276
-#define BYSETPOS 277
-#define BYWEEKNO 278
-#define BYYEARDAY 279
-#define DAILY 280
-#define MINUTELY 281
-#define MONTHLY 282
-#define SECONDLY 283
-#define WEEKLY 284
-#define HOURLY 285
-#define YEARLY 286
-#define INTERVAL 287
-#define COUNT 288
-#define UNTIL 289
-#define WKST 290
-#define MO 291
-#define SA 292
-#define SU 293
-#define TU 294
-#define WE 295
-#define TH 296
-#define FR 297
-#define BIT8 298
-#define ACCEPTED 299
-#define ADD 300
-#define AUDIO 301
-#define BASE64 302
-#define BINARY 303
-#define BOOLEAN 304
-#define BUSY 305
-#define BUSYTENTATIVE 306
-#define BUSYUNAVAILABLE 307
-#define CALADDRESS 308
-#define CANCEL 309
-#define CANCELLED 310
-#define CHAIR 311
-#define CHILD 312
-#define COMPLETED 313
-#define CONFIDENTIAL 314
-#define CONFIRMED 315
-#define COUNTER 316
-#define DATE 317
-#define DATETIME 318
-#define DECLINECOUNTER 319
-#define DECLINED 320
-#define DELEGATED 321
-#define DISPLAY 322
-#define DRAFT 323
-#define DURATION 324
-#define EMAIL 325
-#define END 326
-#define FINAL 327
-#define FLOAT 328
-#define FREE 329
-#define GREGORIAN 330
-#define GROUP 331
-#define INDIVIDUAL 332
-#define INPROCESS 333
-#define INTEGER 334
-#define NEEDSACTION 335
-#define NONPARTICIPANT 336
-#define OPAQUE 337
-#define OPTPARTICIPANT 338
-#define PARENT 339
-#define PERIOD 340
-#define PRIVATE 341
-#define PROCEDURE 342
-#define PUBLIC 343
-#define PUBLISH 344
-#define RECUR 345
-#define REFRESH 346
-#define REPLY 347
-#define REQPARTICIPANT 348
-#define REQUEST 349
-#define RESOURCE 350
-#define ROOM 351
-#define SIBLING 352
-#define START 353
-#define TENTATIVE 354
-#define TEXT 355
-#define THISANDFUTURE 356
-#define THISANDPRIOR 357
-#define TIME 358
-#define TRANSPAENT 359
-#define UNKNOWN 360
-#define UTCOFFSET 361
-#define XNAME 362
-#define ALTREP 363
-#define CN 364
-#define CUTYPE 365
-#define DAYLIGHT 366
-#define DIR 367
-#define ENCODING 368
-#define EVENT 369
-#define FBTYPE 370
-#define FMTTYPE 371
-#define LANGUAGE 372
-#define MEMBER 373
-#define PARTSTAT 374
-#define RANGE 375
-#define RELATED 376
-#define RELTYPE 377
-#define ROLE 378
-#define RSVP 379
-#define SENTBY 380
-#define STANDARD 381
-#define URI 382
-#define TIME_CHAR 383
-#define UTC_CHAR 384
+#define MINUS 267
+#define TIMESEPERATOR 268
+#define TRUE 269
+#define FALSE 270
+#define FREQ 271
+#define BYDAY 272
+#define BYHOUR 273
+#define BYMINUTE 274
+#define BYMONTH 275
+#define BYMONTHDAY 276
+#define BYSECOND 277
+#define BYSETPOS 278
+#define BYWEEKNO 279
+#define BYYEARDAY 280
+#define DAILY 281
+#define MINUTELY 282
+#define MONTHLY 283
+#define SECONDLY 284
+#define WEEKLY 285
+#define HOURLY 286
+#define YEARLY 287
+#define INTERVAL 288
+#define COUNT 289
+#define UNTIL 290
+#define WKST 291
+#define MO 292
+#define SA 293
+#define SU 294
+#define TU 295
+#define WE 296
+#define TH 297
+#define FR 298
+#define BIT8 299
+#define ACCEPTED 300
+#define ADD 301
+#define AUDIO 302
+#define BASE64 303
+#define BINARY 304
+#define BOOLEAN 305
+#define BUSY 306
+#define BUSYTENTATIVE 307
+#define BUSYUNAVAILABLE 308
+#define CALADDRESS 309
+#define CANCEL 310
+#define CANCELLED 311
+#define CHAIR 312
+#define CHILD 313
+#define COMPLETED 314
+#define CONFIDENTIAL 315
+#define CONFIRMED 316
+#define COUNTER 317
+#define DATE 318
+#define DATETIME 319
+#define DECLINECOUNTER 320
+#define DECLINED 321
+#define DELEGATED 322
+#define DISPLAY 323
+#define DRAFT 324
+#define DURATION 325
+#define EMAIL 326
+#define END 327
+#define FINAL 328
+#define FLOAT 329
+#define FREE 330
+#define GREGORIAN 331
+#define GROUP 332
+#define INDIVIDUAL 333
+#define INPROCESS 334
+#define INTEGER 335
+#define NEEDSACTION 336
+#define NONPARTICIPANT 337
+#define OPAQUE 338
+#define OPTPARTICIPANT 339
+#define PARENT 340
+#define PERIOD 341
+#define PRIVATE 342
+#define PROCEDURE 343
+#define PUBLIC 344
+#define PUBLISH 345
+#define RECUR 346
+#define REFRESH 347
+#define REPLY 348
+#define REQPARTICIPANT 349
+#define REQUEST 350
+#define RESOURCE 351
+#define ROOM 352
+#define SIBLING 353
+#define START 354
+#define TENTATIVE 355
+#define TEXT 356
+#define THISANDFUTURE 357
+#define THISANDPRIOR 358
+#define TIME 359
+#define TRANSPAENT 360
+#define UNKNOWN 361
+#define UTCOFFSET 362
+#define XNAME 363
+#define ALTREP 364
+#define CN 365
+#define CUTYPE 366
+#define DAYLIGHT 367
+#define DIR 368
+#define ENCODING 369
+#define EVENT 370
+#define FBTYPE 371
+#define FMTTYPE 372
+#define LANGUAGE 373
+#define MEMBER 374
+#define PARTSTAT 375
+#define RANGE 376
+#define RELATED 377
+#define RELTYPE 378
+#define ROLE 379
+#define RSVP 380
+#define SENTBY 381
+#define STANDARD 382
+#define URI 383
+#define TIME_CHAR 384
+#define UTC_CHAR 385
#line 1 "icalyacc.y"
@@ -146,37 +153,37 @@
$Id$
$Locker$
- (C) COPYRIGHT 2000, Eric Busboom, http://www.softwarestudio.org
+ (C) COPYRIGHT 1999 Eric Busboom
+ http://www.softwarestudio.org
- This program is free software; you can redistribute it and/or modify
- it under the terms of either:
-
- The LGPL as published by the Free Software Foundation, version
- 2.1, available at: http://www.fsf.org/copyleft/lesser.html
-
- Or:
-
- The Mozilla Public License Version 1.0. You may obtain a copy of
- the License at http://www.mozilla.org/MPL/
+ The contents of this file are subject to the Mozilla Public License
+ Version 1.0 (the "License"); you may not use this file except in
+ compliance with the License. You may obtain a copy of the License at
+ http://www.mozilla.org/MPL/
+
+ Software distributed under the License is distributed on an "AS IS"
+ basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
+ the License for the specific language governing rights and
+ limitations under the License.
+ The original author is Eric Busboom
The original code is icalitip.y
- ================================b======================================*/
+ =======================================================================*/
#include <stdlib.h>
#include <string.h> /* for strdup() */
-#include <limits.h> /* for SHRT_MAX*/
#include "icalparser.h"
-#include "ical.h"
#include "pvl.h"
-#define YYERROR_VERBOSE
-#define YYDEBUG 1
-
icalvalue *icalparser_yy_value; /* Current Value */
+void ical_yyerror(char* s);
+void icalparser_clear_flex_input();
+int ical_yy_lex(void);
+
/* Globals for UTCOFFSET values */
int utc;
int utc_b;
@@ -200,7 +207,7 @@ void set_value_type(icalvalue_kind kind);
void set_parser_value_state();
struct icaltimetype fill_datetime(char* d, char* t);
void ical_yy_error(char *s); /* Don't know why I need this.... */
-/*int yylex(void); /* Or this. */
+int yylex(void); /* Or this. */
@@ -208,58 +215,11 @@ void ical_yy_error(char *s); /* Don't know why I need this.... */
VALUEs, that is, ) correctly. */
-#line 76 "icalyacc.y"
+#line 75 "icalyacc.y"
typedef union {
float v_float;
int v_int;
char* v_string;
-
- /* Renaming hack */
-#define yymaxdepth ical_yy_maxdepth
-#define yyparse ical_yy_parse
-#define yylex ical_yy_lex
-#define yyerror ical_yy_error
-#define yylval ical_yy_lval
-#define yychar ical_yy_char
-#define yydebug ical_yy_debug
-#define yypact ical_yy_pact
-#define yyr1 ical_yy_r1
-#define yyr2 ical_yy_r2
-#define yydef ical_yy_def
-#define yychk ical_yy_chk
-#define yypgo ical_yy_pgo
-#define yyact ical_yy_act
-#define yyexca ical_yy_exca
-#define yyerrflag ical_yy_errflag
-#define yynerrs ical_yy_nerrs
-#define yyps ical_yy_ps
-#define yypv ical_yy_pv
-#define yys ical_yy_s
-#define yy_yys ical_yy_yys
-#define yystate ical_yy_state
-#define yytmp ical_yy_tmp
-#define yyv ical_yy_v
-#define yy_yyv ical_yy_yyv
-#define yyval ical_yy_val
-#define yylloc ical_yy_lloc
-#define yyreds ical_yy_reds
-#define yytoks ical_yy_toks
-#define yylhs ical_yy_yylhs
-#define yylen ical_yy_yylen
-#define yydefred ical_yy_yydefred
-#define yydgoto ical_yy_yydgoto
-#define yydefred ical_yy_yydefred
-#define yydgoto ical_yy_yydgoto
-#define yysindex ical_yy_yysindex
-#define yyrindex ical_yy_yyrindex
-#define yygindex ical_yy_yygindex
-#define yytable ical_yy_yytable
-#define yycheck ical_yy_yycheck
-#define yyname ical_yy_yyname
-#define yyrule ical_yy_yyrule
-
-
-
} YYSTYPE;
#ifndef YYDEBUG
#define YYDEBUG 1
@@ -275,22 +235,22 @@ typedef union {
-#define YYFINAL 137
+#define YYFINAL 143
#define YYFLAG -32768
-#define YYNTBASE 141
+#define YYNTBASE 142
-#define YYTRANSLATE(x) ((unsigned)(x) <= 385 ? yytranslate[x] : 167)
+#define YYTRANSLATE(x) ((unsigned)(x) <= 386 ? yytranslate[x] : 168)
static const short yytranslate[] = { 0,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
- 2, 2, 137, 2, 138, 2, 140, 2, 2, 2,
+ 2, 2, 138, 2, 139, 2, 141, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
- 2, 2, 2, 2, 2, 2, 2, 136, 2, 2,
- 2, 133, 2, 2, 2, 2, 134, 2, 2, 139,
- 2, 2, 135, 2, 2, 2, 132, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 137, 2, 2,
+ 2, 134, 2, 2, 2, 2, 135, 2, 2, 140,
+ 2, 2, 136, 2, 2, 2, 133, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
@@ -320,7 +280,7 @@ static const short yytranslate[] = { 0,
97, 98, 99, 100, 101, 102, 103, 104, 105, 106,
107, 108, 109, 110, 111, 112, 113, 114, 115, 116,
117, 118, 119, 120, 121, 122, 123, 124, 125, 126,
- 127, 128, 129, 130, 131
+ 127, 128, 129, 130, 131, 132
};
#if YYDEBUG != 0
@@ -330,55 +290,56 @@ static const short yyprhs[] = { 0,
42, 45, 48, 51, 54, 57, 61, 64, 68, 71,
74, 75, 77, 79, 83, 87, 91, 101, 108, 112,
116, 120, 124, 128, 132, 136, 138, 140, 142, 144,
- 146, 148, 150, 152, 155, 159, 164, 166, 170, 174,
- 178, 182, 186, 190, 194, 198, 202, 206, 210, 214,
- 218, 222, 226, 230, 234, 238, 242, 246, 250, 251,
- 255, 258, 260, 262, 266
+ 146, 148, 150, 152, 155, 159, 163, 168, 174, 176,
+ 180, 184, 188, 192, 196, 200, 204, 208, 212, 216,
+ 220, 224, 228, 232, 236, 240, 244, 248, 252, 256,
+ 260, 261, 265, 268, 270, 272, 276
};
-static const short yyrhs[] = { 142,
- 0, 143, 0, 144, 0, 147, 0, 156, 0, 157,
- 0, 164, 0, 166, 0, 1, 0, 131, 0, 14,
- 0, 15, 0, 3, 0, 0, 130, 0, 0, 130,
- 0, 3, 129, 3, 145, 0, 154, 0, 154, 150,
- 0, 3, 132, 0, 129, 151, 0, 129, 152, 0,
- 129, 153, 0, 3, 133, 0, 3, 133, 152, 0,
- 3, 134, 0, 3, 134, 153, 0, 3, 135, 0,
- 3, 136, 0, 0, 137, 0, 138, 0, 155, 139,
- 148, 0, 155, 139, 150, 0, 155, 139, 149, 0,
- 3, 129, 3, 145, 140, 3, 129, 3, 146, 0,
- 3, 129, 3, 145, 140, 156, 0, 16, 8, 29,
- 0, 16, 8, 27, 0, 16, 8, 31, 0, 16,
- 8, 26, 0, 16, 8, 30, 0, 16, 8, 28,
- 0, 16, 8, 32, 0, 39, 0, 37, 0, 40,
- 0, 41, 0, 42, 0, 43, 0, 38, 0, 159,
- 0, 3, 159, 0, 160, 11, 159, 0, 160, 11,
- 3, 159, 0, 3, 0, 161, 11, 3, 0, 33,
- 8, 3, 0, 36, 8, 39, 0, 36, 8, 37,
- 0, 36, 8, 40, 0, 36, 8, 41, 0, 36,
- 8, 42, 0, 36, 8, 43, 0, 36, 8, 38,
- 0, 22, 8, 161, 0, 19, 8, 161, 0, 18,
- 8, 161, 0, 17, 8, 160, 0, 20, 8, 161,
- 0, 21, 8, 161, 0, 25, 8, 161, 0, 24,
- 8, 161, 0, 23, 8, 161, 0, 35, 8, 147,
- 0, 35, 8, 144, 0, 34, 8, 3, 0, 0,
- 163, 12, 162, 0, 158, 163, 0, 137, 0, 138,
- 0, 165, 4, 4, 0, 165, 4, 4, 4, 0
+static const short yyrhs[] = { 143,
+ 0, 144, 0, 145, 0, 148, 0, 157, 0, 158,
+ 0, 165, 0, 167, 0, 1, 0, 132, 0, 15,
+ 0, 16, 0, 3, 0, 0, 131, 0, 0, 131,
+ 0, 3, 130, 3, 146, 0, 155, 0, 155, 151,
+ 0, 3, 133, 0, 130, 152, 0, 130, 153, 0,
+ 130, 154, 0, 3, 134, 0, 3, 134, 153, 0,
+ 3, 135, 0, 3, 135, 154, 0, 3, 136, 0,
+ 3, 137, 0, 0, 138, 0, 139, 0, 156, 140,
+ 149, 0, 156, 140, 151, 0, 156, 140, 150, 0,
+ 3, 130, 3, 146, 141, 3, 130, 3, 147, 0,
+ 3, 130, 3, 146, 141, 157, 0, 17, 8, 30,
+ 0, 17, 8, 28, 0, 17, 8, 32, 0, 17,
+ 8, 27, 0, 17, 8, 31, 0, 17, 8, 29,
+ 0, 17, 8, 33, 0, 40, 0, 38, 0, 41,
+ 0, 42, 0, 43, 0, 44, 0, 39, 0, 160,
+ 0, 3, 160, 0, 13, 3, 160, 0, 161, 11,
+ 160, 0, 161, 11, 3, 160, 0, 161, 11, 13,
+ 3, 160, 0, 3, 0, 162, 11, 3, 0, 34,
+ 8, 3, 0, 37, 8, 40, 0, 37, 8, 38,
+ 0, 37, 8, 41, 0, 37, 8, 42, 0, 37,
+ 8, 43, 0, 37, 8, 44, 0, 37, 8, 39,
+ 0, 23, 8, 162, 0, 20, 8, 162, 0, 19,
+ 8, 162, 0, 18, 8, 161, 0, 21, 8, 162,
+ 0, 22, 8, 162, 0, 26, 8, 162, 0, 25,
+ 8, 162, 0, 24, 8, 162, 0, 36, 8, 148,
+ 0, 36, 8, 145, 0, 35, 8, 3, 0, 0,
+ 164, 12, 163, 0, 159, 164, 0, 138, 0, 139,
+ 0, 166, 4, 4, 0, 166, 4, 4, 4, 0
};
#endif
#if YYDEBUG != 0
static const short yyrline[] = { 0,
- 159, 161, 162, 163, 164, 165, 166, 167, 168, 174,
- 176, 179, 182, 197, 199, 202, 204, 206, 222, 223,
- 225, 230, 233, 236, 240, 244, 249, 253, 258, 263,
- 268, 271, 274, 278, 283, 288, 297, 318, 350, 352,
- 353, 354, 355, 356, 357, 361, 364, 366, 368, 370,
- 372, 374, 379, 381, 382, 383, 386, 388, 391, 393,
- 394, 395, 396, 397, 398, 399, 400, 401, 402, 403,
- 404, 405, 406, 407, 408, 409, 412, 415, 419, 421,
- 423, 431, 432, 434, 440
+ 181, 183, 184, 185, 186, 187, 188, 189, 190, 196,
+ 198, 201, 204, 219, 221, 224, 226, 228, 244, 245,
+ 247, 252, 255, 258, 262, 266, 271, 275, 280, 285,
+ 290, 294, 298, 303, 308, 313, 322, 343, 375, 377,
+ 378, 379, 380, 381, 382, 386, 388, 389, 390, 391,
+ 392, 393, 398, 400, 402, 404, 405, 407, 411, 413,
+ 416, 418, 419, 420, 421, 422, 423, 424, 425, 426,
+ 427, 428, 429, 430, 431, 432, 433, 434, 437, 440,
+ 444, 446, 448, 456, 457, 459, 465
};
#endif
@@ -387,7 +348,7 @@ static const short yyrline[] = { 0,
static const char * const yytname[] = { "$","error","$undefined.","DIGITS",
"INTNUMBER","FLOATNUMBER","STRING","EOL","EQUALS","CHARACTER","COLON","COMMA",
-"SEMICOLON","TIMESEPERATOR","TRUE","FALSE","FREQ","BYDAY","BYHOUR","BYMINUTE",
+"SEMICOLON","MINUS","TIMESEPERATOR","TRUE","FALSE","FREQ","BYDAY","BYHOUR","BYMINUTE",
"BYMONTH","BYMONTHDAY","BYSECOND","BYSETPOS","BYWEEKNO","BYYEARDAY","DAILY",
"MINUTELY","MONTHLY","SECONDLY","WEEKLY","HOURLY","YEARLY","INTERVAL","COUNT",
"UNTIL","WKST","MO","SA","SU","TU","WE","TH","FR","BIT8","ACCEPTED","ADD","AUDIO",
@@ -401,7 +362,7 @@ static const char * const yytname[] = { "$","error","$undefined.","DIGITS",
"TEXT","THISANDFUTURE","THISANDPRIOR","TIME","TRANSPAENT","UNKNOWN","UTCOFFSET",
"XNAME","ALTREP","CN","CUTYPE","DAYLIGHT","DIR","ENCODING","EVENT","FBTYPE",
"FMTTYPE","LANGUAGE","MEMBER","PARTSTAT","RANGE","RELATED","RELTYPE","ROLE",
-"RSVP","SENTBY","STANDARD","URI","TIME_CHAR","UTC_CHAR","\"unimplemented2\\\"",
+"RSVP","SENTBY","STANDARD","URI","TIME_CHAR","UTC_CHAR","\"unimplemented2\"",
"'W'","'H'","'M'","'S'","'D'","'+'","'-'","'P'","'/'","value","binary_value",
"boolean_value","date_value","utc_char","utc_char_b","datetime_value","dur_date",
"dur_week","dur_time","dur_hour","dur_minute","dur_second","dur_day","dur_prefix",
@@ -411,15 +372,15 @@ static const char * const yytname[] = { "$","error","$undefined.","DIGITS",
#endif
static const short yyr1[] = { 0,
- 141, 141, 141, 141, 141, 141, 141, 141, 141, 142,
- 143, 143, 144, 145, 145, 146, 146, 147, 148, 148,
- 149, 150, 150, 150, 151, 151, 152, 152, 153, 154,
- 155, 155, 155, 156, 156, 156, 157, 157, 158, 158,
- 158, 158, 158, 158, 158, 159, 159, 159, 159, 159,
- 159, 159, 160, 160, 160, 160, 161, 161, 162, 162,
- 162, 162, 162, 162, 162, 162, 162, 162, 162, 162,
- 162, 162, 162, 162, 162, 162, 162, 162, 163, 163,
- 164, 165, 165, 166, 166
+ 142, 142, 142, 142, 142, 142, 142, 142, 142, 143,
+ 144, 144, 145, 146, 146, 147, 147, 148, 149, 149,
+ 150, 151, 151, 151, 152, 152, 153, 153, 154, 155,
+ 156, 156, 156, 157, 157, 157, 158, 158, 159, 159,
+ 159, 159, 159, 159, 159, 160, 160, 160, 160, 160,
+ 160, 160, 161, 161, 161, 161, 161, 161, 162, 162,
+ 163, 163, 163, 163, 163, 163, 163, 163, 163, 163,
+ 163, 163, 163, 163, 163, 163, 163, 163, 163, 163,
+ 164, 164, 165, 166, 166, 167, 167
};
static const short yyr2[] = { 0,
@@ -428,98 +389,102 @@ static const short yyr2[] = { 0,
2, 2, 2, 2, 2, 3, 2, 3, 2, 2,
0, 1, 1, 3, 3, 3, 9, 6, 3, 3,
3, 3, 3, 3, 3, 1, 1, 1, 1, 1,
- 1, 1, 1, 2, 3, 4, 1, 3, 3, 3,
+ 1, 1, 1, 2, 3, 3, 4, 5, 1, 3,
+ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
- 3, 3, 3, 3, 3, 3, 3, 3, 0, 3,
- 2, 1, 1, 3, 4
+ 0, 3, 2, 1, 1, 3, 4
};
static const short yydefact[] = { 0,
9, 13, 11, 12, 0, 10, 32, 33, 1, 2,
- 3, 4, 0, 5, 6, 79, 7, 0, 8, 0,
- 0, 0, 81, 0, 14, 42, 40, 44, 39, 43,
- 41, 45, 0, 0, 34, 36, 35, 19, 0, 84,
+ 3, 4, 0, 5, 6, 81, 7, 0, 8, 0,
+ 0, 0, 83, 0, 14, 42, 40, 44, 39, 43,
+ 41, 45, 0, 0, 34, 36, 35, 19, 0, 86,
15, 18, 21, 30, 0, 22, 23, 24, 20, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 80, 85, 31, 25, 27, 29, 0, 0,
+ 0, 0, 82, 87, 31, 25, 27, 29, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 32, 33, 38, 0, 26, 0, 28, 0,
- 47, 52, 46, 48, 49, 50, 51, 53, 70, 57,
- 69, 68, 71, 72, 67, 75, 74, 73, 59, 78,
- 13, 77, 76, 61, 66, 60, 62, 63, 64, 65,
- 0, 54, 0, 0, 0, 16, 0, 55, 58, 14,
- 17, 37, 56, 18, 0, 0, 0
+ 0, 47, 52, 46, 48, 49, 50, 51, 53, 72,
+ 59, 71, 70, 73, 74, 69, 77, 76, 75, 61,
+ 80, 13, 79, 78, 63, 68, 62, 64, 65, 66,
+ 67, 0, 54, 0, 0, 0, 0, 16, 55, 0,
+ 0, 56, 60, 14, 17, 37, 57, 0, 18, 58,
+ 0, 0, 0
};
-static const short yydefgoto[] = { 135,
- 9, 10, 11, 42, 132, 12, 35, 36, 37, 46,
- 47, 48, 38, 13, 14, 15, 16, 98, 99, 101,
+static const short yydefgoto[] = { 141,
+ 9, 10, 11, 42, 136, 12, 35, 36, 37, 46,
+ 47, 48, 38, 13, 14, 15, 16, 99, 100, 102,
63, 23, 17, 18, 19
};
static const short yypact[] = { -1,
--32768, -123,-32768,-32768, 1,-32768, 3, 8,-32768,-32768,
--32768,-32768, -122,-32768,-32768,-32768,-32768, 12,-32768, 33,
- -7, -2, 40, 49, -119,-32768,-32768,-32768,-32768,-32768,
--32768,-32768, -128, 51,-32768,-32768,-32768, -46, 39, 80,
--32768, -55,-32768,-32768, -100,-32768,-32768,-32768,-32768, 78,
- 79, 81, 82, 83, 84, 85, 86, 87, 88, 89,
- 90, 91,-32768,-32768, 2, 97, 98,-32768, 0, 99,
- 99, 99, 99, 99, 99, 99, 99, 100, 101, 102,
- -11, -41,-32768,-32768,-32768, -28,-32768, -27,-32768, 28,
--32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768, 96,-32768,
- 103, 103, 103, 103, 103, 103, 103, 103,-32768,-32768,
- -20,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,
- 107,-32768, 7, 108, 109, -17, 28,-32768,-32768, -119,
--32768,-32768,-32768,-32768, 115, 116,-32768
+-32768, -123,-32768,-32768, 5,-32768, 31, 32,-32768,-32768,
+-32768,-32768, -134,-32768,-32768,-32768,-32768, 35,-32768, 15,
+ -7, -2, 28, 37, -89,-32768,-32768,-32768,-32768,-32768,
+-32768,-32768, -129, 83,-32768,-32768,-32768, -43, 41, 84,
+-32768, -52,-32768,-32768, -124,-32768,-32768,-32768,-32768, 82,
+ 85, 86, 87, 88, 89, 90, 91, 92, 93, 94,
+ 95, 96,-32768,-32768, 2, 102, 103,-32768, 6, 104,
+ 104, 104, 104, 104, 104, 104, 104, 105, 106, 107,
+ -10, -39,-32768,-32768,-32768, -24,-32768, -44,-32768, 30,
+ 109,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768, 108,
+-32768, 110, 110, 110, 110, 110, 110, 110, 110,-32768,
+-32768, -17,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,
+-32768, 111,-32768, 30, 14, 112, 113, -14,-32768, 30,
+ 115,-32768,-32768, -89,-32768,-32768,-32768, 30,-32768,-32768,
+ 120, 122,-32768
};
static const short yypgoto[] = {-32768,
--32768,-32768, 37, -12,-32768, 41,-32768,-32768, 93,-32768,
- 53, 55,-32768,-32768, 58,-32768,-32768, -72,-32768, 5,
+-32768,-32768, 43, -9,-32768, 44,-32768,-32768, 97,-32768,
+ 60, 62,-32768,-32768, 65,-32768,-32768, -87,-32768, 8,
-32768,-32768,-32768,-32768,-32768
};
-#define YYLAST 140
+#define YYLAST 141
static const short yytable[] = { 1,
- 33, 2, 90, 43, 82, 20, -82, 44, 21, 127,
- 41, -83, 3, 4, 5, 24, 22, 122, 26, 27,
- 28, 29, 30, 31, 32, 114, 115, 116, 117, 118,
- 119, 120, 66, 67, 68, 25, 91, 92, 93, 94,
- 95, 96, 97, 91, 92, 93, 94, 95, 96, 97,
- 128, 39, 40, 45, 133, 50, 51, 52, 53, 54,
- 55, 56, 57, 58, 91, 92, 93, 94, 95, 96,
- 97, 59, 60, 61, 62, 102, 103, 104, 105, 106,
- 107, 108, 34, 64, 65, 69, 70, 121, 71, 72,
- 73, 74, 75, 76, 77, 78, 79, 80, 81, 86,
- 88, 100, 109, 110, 111, 67, 123, 68, 125, 126,
- 129, 130, 131, 124, 136, 137, 112, 134, 87, 0,
- 113, 89, 85, 0, 0, 0, 34, 0, 0, 6,
- 49, 0, 0, 0, 0, 7, 8, -31, 83, 84
+ 33, 2, 123, 43, 82, 22, 20, 44, 90, 66,
+ 67, 68, 21, 3, 4, 5, 130, 25, 91, 26,
+ 27, 28, 29, 30, 31, 32, 131, 115, 116, 117,
+ 118, 119, 120, 121, -84, -85, 129, 132, 24, 39,
+ 40, 41, 137, 92, 93, 94, 95, 96, 97, 98,
+ 140, 92, 93, 94, 95, 96, 97, 98, 50, 51,
+ 52, 53, 54, 55, 56, 57, 58, 92, 93, 94,
+ 95, 96, 97, 98, 59, 60, 61, 62, 103, 104,
+ 105, 106, 107, 108, 109, 45, 34, 64, 65, 69,
+ 122, 68, 70, 71, 72, 73, 74, 75, 76, 77,
+ 78, 79, 80, 81, 86, 88, 101, 110, 111, 112,
+ 67, 124, 127, 128, 133, 134, 135, 138, 125, 142,
+ 126, 143, 113, 114, 139, 87, 0, 34, 89, 85,
+ 6, 0, 0, 0, 49, 0, 7, 8, -31, 83,
+ 84
};
static const short yycheck[] = { 1,
- 3, 3, 3, 132, 3, 129, 4, 136, 8, 3,
- 130, 4, 14, 15, 16, 4, 139, 90, 26, 27,
- 28, 29, 30, 31, 32, 37, 38, 39, 40, 41,
- 42, 43, 133, 134, 135, 3, 37, 38, 39, 40,
- 41, 42, 43, 37, 38, 39, 40, 41, 42, 43,
- 123, 12, 4, 3, 127, 17, 18, 19, 20, 21,
- 22, 23, 24, 25, 37, 38, 39, 40, 41, 42,
- 43, 33, 34, 35, 36, 71, 72, 73, 74, 75,
- 76, 77, 129, 4, 140, 8, 8, 129, 8, 8,
- 8, 8, 8, 8, 8, 8, 8, 8, 8, 3,
- 3, 3, 3, 3, 3, 134, 11, 135, 129, 3,
- 3, 3, 130, 11, 0, 0, 80, 130, 66, -1,
- 80, 67, 65, -1, -1, -1, 129, -1, -1, 131,
- 38, -1, -1, -1, -1, 137, 138, 139, 137, 138
+ 3, 3, 90, 133, 3, 140, 130, 137, 3, 134,
+ 135, 136, 8, 15, 16, 17, 3, 3, 13, 27,
+ 28, 29, 30, 31, 32, 33, 13, 38, 39, 40,
+ 41, 42, 43, 44, 4, 4, 124, 125, 4, 12,
+ 4, 131, 130, 38, 39, 40, 41, 42, 43, 44,
+ 138, 38, 39, 40, 41, 42, 43, 44, 18, 19,
+ 20, 21, 22, 23, 24, 25, 26, 38, 39, 40,
+ 41, 42, 43, 44, 34, 35, 36, 37, 71, 72,
+ 73, 74, 75, 76, 77, 3, 130, 4, 141, 8,
+ 130, 136, 8, 8, 8, 8, 8, 8, 8, 8,
+ 8, 8, 8, 8, 3, 3, 3, 3, 3, 3,
+ 135, 3, 130, 3, 3, 3, 131, 3, 11, 0,
+ 11, 0, 80, 80, 134, 66, -1, 130, 67, 65,
+ 132, -1, -1, -1, 38, -1, 138, 139, 140, 138,
+ 139
};
/* -*-C-*- Note some compilers choke on comments on `#line' lines. */
#line 3 "/usr/lib/bison.simple"
-/* This file comes from bison-1.27. */
+/* This file comes from bison-1.28. */
/* Skeleton output parser for bison,
Copyright (C) 1984, 1989, 1990 Free Software Foundation, Inc.
@@ -732,7 +697,7 @@ __yy_memcpy (char *to, char *from, unsigned int count)
#endif
#endif
-#line 216 "/usr/lib/bison.simple"
+#line 217 "/usr/lib/bison.simple"
/* The user can define YYPARSE_PARAM as the name of an argument to be passed
into yyparse. The argument should have type void *.
@@ -1061,7 +1026,7 @@ yyreduce:
switch (yyn) {
case 9:
-#line 168 "icalyacc.y"
+#line 190 "icalyacc.y"
{
icalparser_yy_value = 0;
icalparser_clear_flex_input();
@@ -1069,15 +1034,15 @@ case 9:
;
break;}
case 11:
-#line 178 "icalyacc.y"
+#line 200 "icalyacc.y"
{ icalparser_yy_value = icalvalue_new_boolean(1); ;
break;}
case 12:
-#line 180 "icalyacc.y"
+#line 202 "icalyacc.y"
{ icalparser_yy_value = icalvalue_new_boolean(0); ;
break;}
case 13:
-#line 183 "icalyacc.y"
+#line 205 "icalyacc.y"
{
struct icaltimetype stm;
@@ -1093,23 +1058,23 @@ case 13:
;
break;}
case 14:
-#line 198 "icalyacc.y"
+#line 220 "icalyacc.y"
{utc = 0;;
break;}
case 15:
-#line 199 "icalyacc.y"
+#line 221 "icalyacc.y"
{utc = 1;;
break;}
case 16:
-#line 203 "icalyacc.y"
+#line 225 "icalyacc.y"
{utc_b = 0;;
break;}
case 17:
-#line 204 "icalyacc.y"
+#line 226 "icalyacc.y"
{utc_b = 1;;
break;}
case 18:
-#line 208 "icalyacc.y"
+#line 230 "icalyacc.y"
{
struct icaltimetype stm;
stm = fill_datetime(yyvsp[-3].v_string, yyvsp[-1].v_string);
@@ -1121,100 +1086,103 @@ case 18:
;
break;}
case 21:
-#line 226 "icalyacc.y"
+#line 248 "icalyacc.y"
{
duration.weeks = atoi(yyvsp[-1].v_string);
;
break;}
case 22:
-#line 231 "icalyacc.y"
+#line 253 "icalyacc.y"
{
;
break;}
case 23:
-#line 234 "icalyacc.y"
+#line 256 "icalyacc.y"
{
;
break;}
case 24:
-#line 237 "icalyacc.y"
+#line 259 "icalyacc.y"
{
;
break;}
case 25:
-#line 241 "icalyacc.y"
+#line 263 "icalyacc.y"
{
duration.hours = atoi(yyvsp[-1].v_string);
;
break;}
case 26:
-#line 245 "icalyacc.y"
+#line 267 "icalyacc.y"
{
duration.hours = atoi(yyvsp[-2].v_string);
;
break;}
case 27:
-#line 250 "icalyacc.y"
+#line 272 "icalyacc.y"
{
duration.minutes = atoi(yyvsp[-1].v_string);
;
break;}
case 28:
-#line 254 "icalyacc.y"
+#line 276 "icalyacc.y"
{
duration.minutes = atoi(yyvsp[-2].v_string);
;
break;}
case 29:
-#line 259 "icalyacc.y"
+#line 281 "icalyacc.y"
{
duration.seconds = atoi(yyvsp[-1].v_string);
;
break;}
case 30:
-#line 264 "icalyacc.y"
+#line 286 "icalyacc.y"
{
duration.days = atoi(yyvsp[-1].v_string);
;
break;}
case 31:
-#line 269 "icalyacc.y"
+#line 291 "icalyacc.y"
{
+ duration.is_neg = 0;
;
break;}
case 32:
-#line 272 "icalyacc.y"
+#line 295 "icalyacc.y"
{
+ duration.is_neg = 0;
;
break;}
case 33:
-#line 275 "icalyacc.y"
-{
+#line 299 "icalyacc.y"
+{
+ duration.is_neg = 1;
;
break;}
case 34:
-#line 279 "icalyacc.y"
+#line 304 "icalyacc.y"
{
icalparser_yy_value = icalvalue_new_duration(duration);
memset(&duration,0, sizeof(duration));
;
break;}
case 35:
-#line 284 "icalyacc.y"
+#line 309 "icalyacc.y"
{
icalparser_yy_value = icalvalue_new_duration(duration);
memset(&duration,0, sizeof(duration));
;
break;}
case 36:
-#line 289 "icalyacc.y"
+#line 314 "icalyacc.y"
{
icalparser_yy_value = icalvalue_new_duration(duration);
memset(&duration,0, sizeof(duration));
;
break;}
case 37:
-#line 298 "icalyacc.y"
+#line 323 "icalyacc.y"
{
struct icalperiodtype p;
@@ -1237,7 +1205,7 @@ case 37:
;
break;}
case 38:
-#line 319 "icalyacc.y"
+#line 344 "icalyacc.y"
{
struct icalperiodtype p;
@@ -1266,201 +1234,206 @@ case 38:
;
break;}
case 39:
-#line 351 "icalyacc.y"
+#line 376 "icalyacc.y"
{clear_recur();recur.freq = ICAL_SECONDLY_RECURRENCE;;
break;}
case 40:
-#line 352 "icalyacc.y"
+#line 377 "icalyacc.y"
{clear_recur();recur.freq = ICAL_MINUTELY_RECURRENCE;;
break;}
case 41:
-#line 353 "icalyacc.y"
+#line 378 "icalyacc.y"
{clear_recur();recur.freq = ICAL_HOURLY_RECURRENCE;;
break;}
case 42:
-#line 354 "icalyacc.y"
+#line 379 "icalyacc.y"
{clear_recur();recur.freq = ICAL_DAILY_RECURRENCE;;
break;}
case 43:
-#line 355 "icalyacc.y"
+#line 380 "icalyacc.y"
{clear_recur();recur.freq = ICAL_WEEKLY_RECURRENCE;;
break;}
case 44:
-#line 356 "icalyacc.y"
+#line 381 "icalyacc.y"
{clear_recur();recur.freq = ICAL_MONTHLY_RECURRENCE;;
break;}
case 45:
-#line 357 "icalyacc.y"
+#line 382 "icalyacc.y"
{clear_recur();recur.freq = ICAL_YEARLY_RECURRENCE;;
break;}
case 46:
-#line 362 "icalyacc.y"
-{ skiplist[skippos]=ICAL_SUNDAY_WEEKDAY+8*dow_pos;
- if( skippos<8) skippos++;;
+#line 387 "icalyacc.y"
+{ skiplist[skippos]=ICAL_SUNDAY_WEEKDAY; ;
break;}
case 47:
-#line 364 "icalyacc.y"
-{ skiplist[skippos]=ICAL_MONDAY_WEEKDAY+8*dow_pos;
- if( skippos<8) skippos++;;
+#line 388 "icalyacc.y"
+{ skiplist[skippos]=ICAL_MONDAY_WEEKDAY; ;
break;}
case 48:
-#line 366 "icalyacc.y"
-{ skiplist[skippos]=ICAL_TUESDAY_WEEKDAY+8*dow_pos;
- if( skippos<8) skippos++;;
+#line 389 "icalyacc.y"
+{ skiplist[skippos]=ICAL_TUESDAY_WEEKDAY; ;
break;}
case 49:
-#line 368 "icalyacc.y"
-{ skiplist[skippos]=ICAL_WEDNESDAY_WEEKDAY+8*dow_pos;
- if( skippos<8) skippos++;;
+#line 390 "icalyacc.y"
+{ skiplist[skippos]=ICAL_WEDNESDAY_WEEKDAY; ;
break;}
case 50:
-#line 370 "icalyacc.y"
-{ skiplist[skippos]=ICAL_THURSDAY_WEEKDAY+8*dow_pos;
- if( skippos<8) skippos++;;
+#line 391 "icalyacc.y"
+{ skiplist[skippos]=ICAL_THURSDAY_WEEKDAY; ;
break;}
case 51:
-#line 372 "icalyacc.y"
-{ skiplist[skippos]=ICAL_FRIDAY_WEEKDAY+8*dow_pos;
- if( skippos<8) skippos++;;
+#line 392 "icalyacc.y"
+{ skiplist[skippos]=ICAL_FRIDAY_WEEKDAY; ;
break;}
case 52:
-#line 374 "icalyacc.y"
-{ skiplist[skippos]=ICAL_SATURDAY_WEEKDAY+8*dow_pos;
- if( skippos<8) skippos++;;
+#line 393 "icalyacc.y"
+{ skiplist[skippos]=ICAL_SATURDAY_WEEKDAY; ;
break;}
case 53:
-#line 380 "icalyacc.y"
-{dow_pos = 0;
+#line 399 "icalyacc.y"
+{if( skippos<8) skippos++;;
break;}
case 54:
-#line 381 "icalyacc.y"
-{ dow_pos = atoi(yyvsp[-1].v_string);
+#line 400 "icalyacc.y"
+{ dow_pos = atoi(yyvsp[-1].v_string);
+ skiplist[skippos] += 8*dow_pos; if( skippos<8) skippos++; ;
break;}
case 55:
-#line 382 "icalyacc.y"
-{dow_pos = 0;
+#line 402 "icalyacc.y"
+{ dow_pos = atoi(yyvsp[-1].v_string);
+ skiplist[skippos] -= 8*dow_pos; if( skippos<8) skippos++; ;
break;}
case 56:
-#line 383 "icalyacc.y"
-{ dow_pos = atoi(yyvsp[-1].v_string);
+#line 404 "icalyacc.y"
+{if( skippos<8) skippos++;;
break;}
case 57:
-#line 387 "icalyacc.y"
-{ skiplist[skippos] = atoi(yyvsp[0].v_string); skippos++;;
+#line 405 "icalyacc.y"
+{ dow_pos = atoi(yyvsp[-1].v_string);
+ skiplist[skippos] += 8*dow_pos;if( skippos<8) skippos++;;
break;}
case 58:
-#line 388 "icalyacc.y"
-{ skiplist[skippos] = atoi(yyvsp[0].v_string); if (skippos<367) skippos++;;
+#line 407 "icalyacc.y"
+{ dow_pos = atoi(yyvsp[-1].v_string);
+ skiplist[skippos] -= 8*dow_pos;if( skippos<8) skippos++;;
break;}
case 59:
-#line 392 "icalyacc.y"
-{recur.interval = atoi(yyvsp[0].v_string);;
+#line 412 "icalyacc.y"
+{ skiplist[skippos] = atoi(yyvsp[0].v_string); skippos++;;
break;}
case 60:
-#line 393 "icalyacc.y"
-{recur.week_start = ICAL_SUNDAY_WEEKDAY;;
+#line 413 "icalyacc.y"
+{ skiplist[skippos] = atoi(yyvsp[0].v_string); if (skippos<367) skippos++;;
break;}
case 61:
-#line 394 "icalyacc.y"
-{recur.week_start = ICAL_MONDAY_WEEKDAY;;
+#line 417 "icalyacc.y"
+{recur.interval = atoi(yyvsp[0].v_string);;
break;}
case 62:
-#line 395 "icalyacc.y"
-{recur.week_start = ICAL_TUESDAY_WEEKDAY;;
+#line 418 "icalyacc.y"
+{recur.week_start = ICAL_SUNDAY_WEEKDAY;;
break;}
case 63:
-#line 396 "icalyacc.y"
-{recur.week_start = ICAL_WEDNESDAY_WEEKDAY;;
+#line 419 "icalyacc.y"
+{recur.week_start = ICAL_MONDAY_WEEKDAY;;
break;}
case 64:
-#line 397 "icalyacc.y"
-{recur.week_start = ICAL_THURSDAY_WEEKDAY;;
+#line 420 "icalyacc.y"
+{recur.week_start = ICAL_TUESDAY_WEEKDAY;;
break;}
case 65:
-#line 398 "icalyacc.y"
-{recur.week_start = ICAL_FRIDAY_WEEKDAY;;
+#line 421 "icalyacc.y"
+{recur.week_start = ICAL_WEDNESDAY_WEEKDAY;;
break;}
case 66:
-#line 399 "icalyacc.y"
-{recur.week_start = ICAL_SATURDAY_WEEKDAY;;
+#line 422 "icalyacc.y"
+{recur.week_start = ICAL_THURSDAY_WEEKDAY;;
break;}
case 67:
-#line 400 "icalyacc.y"
-{copy_list(recur.by_second,60);;
+#line 423 "icalyacc.y"
+{recur.week_start = ICAL_FRIDAY_WEEKDAY;;
break;}
case 68:
-#line 401 "icalyacc.y"
-{copy_list(recur.by_minute,60);;
+#line 424 "icalyacc.y"
+{recur.week_start = ICAL_SATURDAY_WEEKDAY;;
break;}
case 69:
-#line 402 "icalyacc.y"
-{copy_list(recur.by_hour,24);;
+#line 425 "icalyacc.y"
+{copy_list(recur.by_second,60);;
break;}
case 70:
-#line 403 "icalyacc.y"
-{copy_list(recur.by_day,7);;
+#line 426 "icalyacc.y"
+{copy_list(recur.by_minute,60);;
break;}
case 71:
-#line 404 "icalyacc.y"
-{copy_list(recur.by_month,12);;
+#line 427 "icalyacc.y"
+{copy_list(recur.by_hour,24);;
break;}
case 72:
-#line 405 "icalyacc.y"
-{copy_list(recur.by_month_day,31);;
+#line 428 "icalyacc.y"
+{copy_list(recur.by_day,7);;
break;}
case 73:
-#line 406 "icalyacc.y"
-{copy_list(recur.by_year_day,366);;
+#line 429 "icalyacc.y"
+{copy_list(recur.by_month,12);;
break;}
case 74:
-#line 407 "icalyacc.y"
-{copy_list(recur.by_week_no,53);;
+#line 430 "icalyacc.y"
+{copy_list(recur.by_month_day,31);;
break;}
case 75:
-#line 408 "icalyacc.y"
-{copy_list(recur.by_set_pos,366);;
+#line 431 "icalyacc.y"
+{copy_list(recur.by_year_day,366);;
break;}
case 76:
-#line 410 "icalyacc.y"
+#line 432 "icalyacc.y"
+{copy_list(recur.by_week_no,53);;
+ break;}
+case 77:
+#line 433 "icalyacc.y"
+{copy_list(recur.by_set_pos,366);;
+ break;}
+case 78:
+#line 435 "icalyacc.y"
{ recur.until = icalvalue_get_datetime(icalparser_yy_value);
icalvalue_free(icalparser_yy_value); icalparser_yy_value=0;;
break;}
-case 77:
-#line 413 "icalyacc.y"
+case 79:
+#line 438 "icalyacc.y"
{ recur.until = icalvalue_get_date(icalparser_yy_value);
icalvalue_free(icalparser_yy_value); icalparser_yy_value=0;;
break;}
-case 78:
-#line 416 "icalyacc.y"
+case 80:
+#line 441 "icalyacc.y"
{ recur.count = atoi(yyvsp[0].v_string); ;
break;}
-case 81:
-#line 425 "icalyacc.y"
+case 83:
+#line 450 "icalyacc.y"
{ icalparser_yy_value = icalvalue_new_recur(recur); ;
break;}
-case 82:
-#line 431 "icalyacc.y"
+case 84:
+#line 456 "icalyacc.y"
{ utcsign = 1; ;
break;}
-case 83:
-#line 432 "icalyacc.y"
+case 85:
+#line 457 "icalyacc.y"
{ utcsign = -1; ;
break;}
-case 84:
-#line 436 "icalyacc.y"
+case 86:
+#line 461 "icalyacc.y"
{
icalparser_yy_value = icalvalue_new_utcoffset( utcsign * (yyvsp[-1].v_int*3600) + (yyvsp[0].v_int*60) );
;
break;}
-case 85:
-#line 441 "icalyacc.y"
+case 87:
+#line 466 "icalyacc.y"
{
icalparser_yy_value = icalvalue_new_utcoffset(utcsign * (yyvsp[-2].v_int*3600) + (yyvsp[-1].v_int*60) +(yyvsp[0].v_int));
;
break;}
}
/* the action file gets copied in in place of this dollarsign */
-#line 542 "/usr/lib/bison.simple"
+#line 543 "/usr/lib/bison.simple"
yyvsp -= yylen;
yyssp -= yylen;
@@ -1680,7 +1653,7 @@ yyerrhandle:
}
return 1;
}
-#line 447 "icalyacc.y"
+#line 472 "icalyacc.y"
@@ -1719,7 +1692,7 @@ struct icaltimetype fill_datetime(char* datestr, char* timestr)
}
-void yyerror(char* s)
+void ical_yyerror(char* s)
{
/*fprintf(stderr,"Parse error \'%s\'\n", s);*/
}
diff --git a/libical/src/libical/icalyacc.h b/libical/src/libical/icalyacc.h
index 6519960994..f6d66bc526 100644
--- a/libical/src/libical/icalyacc.h
+++ b/libical/src/libical/icalyacc.h
@@ -2,53 +2,6 @@ typedef union {
float v_float;
int v_int;
char* v_string;
-
- /* Renaming hack */
-#define yymaxdepth ical_yy_maxdepth
-#define yyparse ical_yy_parse
-#define yylex ical_yy_lex
-#define yyerror ical_yy_error
-#define yylval ical_yy_lval
-#define yychar ical_yy_char
-#define yydebug ical_yy_debug
-#define yypact ical_yy_pact
-#define yyr1 ical_yy_r1
-#define yyr2 ical_yy_r2
-#define yydef ical_yy_def
-#define yychk ical_yy_chk
-#define yypgo ical_yy_pgo
-#define yyact ical_yy_act
-#define yyexca ical_yy_exca
-#define yyerrflag ical_yy_errflag
-#define yynerrs ical_yy_nerrs
-#define yyps ical_yy_ps
-#define yypv ical_yy_pv
-#define yys ical_yy_s
-#define yy_yys ical_yy_yys
-#define yystate ical_yy_state
-#define yytmp ical_yy_tmp
-#define yyv ical_yy_v
-#define yy_yyv ical_yy_yyv
-#define yyval ical_yy_val
-#define yylloc ical_yy_lloc
-#define yyreds ical_yy_reds
-#define yytoks ical_yy_toks
-#define yylhs ical_yy_yylhs
-#define yylen ical_yy_yylen
-#define yydefred ical_yy_yydefred
-#define yydgoto ical_yy_yydgoto
-#define yydefred ical_yy_yydefred
-#define yydgoto ical_yy_yydgoto
-#define yysindex ical_yy_yysindex
-#define yyrindex ical_yy_yyrindex
-#define yygindex ical_yy_yygindex
-#define yytable ical_yy_yytable
-#define yycheck ical_yy_yycheck
-#define yyname ical_yy_yyname
-#define yyrule ical_yy_yyrule
-
-
-
} YYSTYPE;
#define DIGITS 257
#define INTNUMBER 258
@@ -60,124 +13,125 @@ typedef union {
#define COLON 264
#define COMMA 265
#define SEMICOLON 266
-#define TIMESEPERATOR 267
-#define TRUE 268
-#define FALSE 269
-#define FREQ 270
-#define BYDAY 271
-#define BYHOUR 272
-#define BYMINUTE 273
-#define BYMONTH 274
-#define BYMONTHDAY 275
-#define BYSECOND 276
-#define BYSETPOS 277
-#define BYWEEKNO 278
-#define BYYEARDAY 279
-#define DAILY 280
-#define MINUTELY 281
-#define MONTHLY 282
-#define SECONDLY 283
-#define WEEKLY 284
-#define HOURLY 285
-#define YEARLY 286
-#define INTERVAL 287
-#define COUNT 288
-#define UNTIL 289
-#define WKST 290
-#define MO 291
-#define SA 292
-#define SU 293
-#define TU 294
-#define WE 295
-#define TH 296
-#define FR 297
-#define BIT8 298
-#define ACCEPTED 299
-#define ADD 300
-#define AUDIO 301
-#define BASE64 302
-#define BINARY 303
-#define BOOLEAN 304
-#define BUSY 305
-#define BUSYTENTATIVE 306
-#define BUSYUNAVAILABLE 307
-#define CALADDRESS 308
-#define CANCEL 309
-#define CANCELLED 310
-#define CHAIR 311
-#define CHILD 312
-#define COMPLETED 313
-#define CONFIDENTIAL 314
-#define CONFIRMED 315
-#define COUNTER 316
-#define DATE 317
-#define DATETIME 318
-#define DECLINECOUNTER 319
-#define DECLINED 320
-#define DELEGATED 321
-#define DISPLAY 322
-#define DRAFT 323
-#define DURATION 324
-#define EMAIL 325
-#define END 326
-#define FINAL 327
-#define FLOAT 328
-#define FREE 329
-#define GREGORIAN 330
-#define GROUP 331
-#define INDIVIDUAL 332
-#define INPROCESS 333
-#define INTEGER 334
-#define NEEDSACTION 335
-#define NONPARTICIPANT 336
-#define OPAQUE 337
-#define OPTPARTICIPANT 338
-#define PARENT 339
-#define PERIOD 340
-#define PRIVATE 341
-#define PROCEDURE 342
-#define PUBLIC 343
-#define PUBLISH 344
-#define RECUR 345
-#define REFRESH 346
-#define REPLY 347
-#define REQPARTICIPANT 348
-#define REQUEST 349
-#define RESOURCE 350
-#define ROOM 351
-#define SIBLING 352
-#define START 353
-#define TENTATIVE 354
-#define TEXT 355
-#define THISANDFUTURE 356
-#define THISANDPRIOR 357
-#define TIME 358
-#define TRANSPAENT 359
-#define UNKNOWN 360
-#define UTCOFFSET 361
-#define XNAME 362
-#define ALTREP 363
-#define CN 364
-#define CUTYPE 365
-#define DAYLIGHT 366
-#define DIR 367
-#define ENCODING 368
-#define EVENT 369
-#define FBTYPE 370
-#define FMTTYPE 371
-#define LANGUAGE 372
-#define MEMBER 373
-#define PARTSTAT 374
-#define RANGE 375
-#define RELATED 376
-#define RELTYPE 377
-#define ROLE 378
-#define RSVP 379
-#define SENTBY 380
-#define STANDARD 381
-#define URI 382
-#define TIME_CHAR 383
-#define UTC_CHAR 384
+#define MINUS 267
+#define TIMESEPERATOR 268
+#define TRUE 269
+#define FALSE 270
+#define FREQ 271
+#define BYDAY 272
+#define BYHOUR 273
+#define BYMINUTE 274
+#define BYMONTH 275
+#define BYMONTHDAY 276
+#define BYSECOND 277
+#define BYSETPOS 278
+#define BYWEEKNO 279
+#define BYYEARDAY 280
+#define DAILY 281
+#define MINUTELY 282
+#define MONTHLY 283
+#define SECONDLY 284
+#define WEEKLY 285
+#define HOURLY 286
+#define YEARLY 287
+#define INTERVAL 288
+#define COUNT 289
+#define UNTIL 290
+#define WKST 291
+#define MO 292
+#define SA 293
+#define SU 294
+#define TU 295
+#define WE 296
+#define TH 297
+#define FR 298
+#define BIT8 299
+#define ACCEPTED 300
+#define ADD 301
+#define AUDIO 302
+#define BASE64 303
+#define BINARY 304
+#define BOOLEAN 305
+#define BUSY 306
+#define BUSYTENTATIVE 307
+#define BUSYUNAVAILABLE 308
+#define CALADDRESS 309
+#define CANCEL 310
+#define CANCELLED 311
+#define CHAIR 312
+#define CHILD 313
+#define COMPLETED 314
+#define CONFIDENTIAL 315
+#define CONFIRMED 316
+#define COUNTER 317
+#define DATE 318
+#define DATETIME 319
+#define DECLINECOUNTER 320
+#define DECLINED 321
+#define DELEGATED 322
+#define DISPLAY 323
+#define DRAFT 324
+#define DURATION 325
+#define EMAIL 326
+#define END 327
+#define FINAL 328
+#define FLOAT 329
+#define FREE 330
+#define GREGORIAN 331
+#define GROUP 332
+#define INDIVIDUAL 333
+#define INPROCESS 334
+#define INTEGER 335
+#define NEEDSACTION 336
+#define NONPARTICIPANT 337
+#define OPAQUE 338
+#define OPTPARTICIPANT 339
+#define PARENT 340
+#define PERIOD 341
+#define PRIVATE 342
+#define PROCEDURE 343
+#define PUBLIC 344
+#define PUBLISH 345
+#define RECUR 346
+#define REFRESH 347
+#define REPLY 348
+#define REQPARTICIPANT 349
+#define REQUEST 350
+#define RESOURCE 351
+#define ROOM 352
+#define SIBLING 353
+#define START 354
+#define TENTATIVE 355
+#define TEXT 356
+#define THISANDFUTURE 357
+#define THISANDPRIOR 358
+#define TIME 359
+#define TRANSPAENT 360
+#define UNKNOWN 361
+#define UTCOFFSET 362
+#define XNAME 363
+#define ALTREP 364
+#define CN 365
+#define CUTYPE 366
+#define DAYLIGHT 367
+#define DIR 368
+#define ENCODING 369
+#define EVENT 370
+#define FBTYPE 371
+#define FMTTYPE 372
+#define LANGUAGE 373
+#define MEMBER 374
+#define PARTSTAT 375
+#define RANGE 376
+#define RELATED 377
+#define RELTYPE 378
+#define ROLE 379
+#define RSVP 380
+#define SENTBY 381
+#define STANDARD 382
+#define URI 383
+#define TIME_CHAR 384
+#define UTC_CHAR 385
-extern YYSTYPE yylval;
+extern YYSTYPE ical_yylval;
diff --git a/libical/src/libical/icalyacc.y b/libical/src/libical/icalyacc.y
index abec4202db..3d7d85be13 100644
--- a/libical/src/libical/icalyacc.y
+++ b/libical/src/libical/icalyacc.y
@@ -6,7 +6,7 @@
DESCRIPTION:
- $Id: icalyacc.y,v 1.1.1.2 2000/08/24 19:28:24 jpr Exp $
+ $Id: icalyacc.y,v 1.1.1.3 2000/12/11 22:05:45 federico Exp $
$Locker: $
(C) COPYRIGHT 1999 Eric Busboom
@@ -27,20 +27,19 @@
- ================================b======================================*/
+ =======================================================================*/
#include <stdlib.h>
#include <string.h> /* for strdup() */
-#include <limits.h> /* for SHRT_MAX*/
#include "icalparser.h"
-#include "ical.h"
#include "pvl.h"
-#define YYERROR_VERBOSE
-#define YYDEBUG 1
-
icalvalue *icalparser_yy_value; /* Current Value */
+void ical_yyerror(char* s);
+void icalparser_clear_flex_input();
+int ical_yy_lex(void);
+
/* Globals for UTCOFFSET values */
int utc;
int utc_b;
@@ -64,7 +63,7 @@ void set_value_type(icalvalue_kind kind);
void set_parser_value_state();
struct icaltimetype fill_datetime(char* d, char* t);
void ical_yy_error(char *s); /* Don't know why I need this.... */
-/*int yylex(void); /* Or this. */
+int yylex(void); /* Or this. */
@@ -77,11 +76,14 @@ void ical_yy_error(char *s); /* Don't know why I need this.... */
float v_float;
int v_int;
char* v_string;
+}
+
/* Renaming hack */
+
+/*
#define yymaxdepth ical_yy_maxdepth
#define yyparse ical_yy_parse
-#define yylex ical_yy_lex
#define yyerror ical_yy_error
#define yylval ical_yy_lval
#define yychar ical_yy_char
@@ -121,16 +123,36 @@ void ical_yy_error(char *s); /* Don't know why I need this.... */
#define yycheck ical_yy_yycheck
#define yyname ical_yy_yyname
#define yyrule ical_yy_yyrule
+#define yy_scan_bytes ical_yy_scan_bytes
+#define yy_scan_string ical_yy_scan_string
+#define yy_scan_buffer ical_yy_scan_buffer
+*/
+
+/* These are redefined with the -P option to flex */
+/*
+#define yy_create_buffer ical_yy_create_buffer
+#define yy_delete_buffer ical_yy_delete_buffer
+#define yy_flex_debug ical_yy_flex_debug
+#define yy_init_buffer ical_yy_init_buffer
+#define yy_flush_buffer ical_yy_flush_buffer
+#define yy_load_buffer_state ical_yy_load_buffer_state
+#define yy_switch_to_buffer ical_yy_switch_to_buffer
+#define yyin ical_yyin
+#define yyleng ical_yyleng
+#define yylex ical_yylex
+#define yylineno ical_yylineno
+#define yyout ical_yyout
+#define yyrestart ical_yyrestart
+#define yytext ical_yytext
+#define yywrap ical_yywrap
+*/
-
-}
-
%token <v_string> DIGITS
%token <v_int> INTNUMBER
%token <v_float> FLOATNUMBER
%token <v_string> STRING
-%token EOL EQUALS CHARACTER COLON COMMA SEMICOLON TIMESEPERATOR
+%token EOL EQUALS CHARACTER COLON COMMA SEMICOLON MINUS TIMESEPERATOR
%token TRUE FALSE
@@ -267,12 +289,15 @@ dur_day: DIGITS 'D'
dur_prefix: /* empty */
{
+ duration.is_neg = 0;
}
| '+'
{
+ duration.is_neg = 0;
}
| '-'
- {
+ {
+ duration.is_neg = 1;
}
duration_value: dur_prefix 'P' dur_date
@@ -359,28 +384,28 @@ recur_start:
weekday:
- SU { skiplist[skippos]=ICAL_SUNDAY_WEEKDAY+8*dow_pos;
- if( skippos<8) skippos++;}
- | MO { skiplist[skippos]=ICAL_MONDAY_WEEKDAY+8*dow_pos;
- if( skippos<8) skippos++;}
- | TU { skiplist[skippos]=ICAL_TUESDAY_WEEKDAY+8*dow_pos;
- if( skippos<8) skippos++;}
- | WE { skiplist[skippos]=ICAL_WEDNESDAY_WEEKDAY+8*dow_pos;
- if( skippos<8) skippos++;}
- | TH { skiplist[skippos]=ICAL_THURSDAY_WEEKDAY+8*dow_pos;
- if( skippos<8) skippos++;}
- | FR { skiplist[skippos]=ICAL_FRIDAY_WEEKDAY+8*dow_pos;
- if( skippos<8) skippos++;}
- | SA { skiplist[skippos]=ICAL_SATURDAY_WEEKDAY+8*dow_pos;
- if( skippos<8) skippos++;}
+ 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 {dow_pos = 0};
- | DIGITS weekday { dow_pos = atoi($1)}
- | weekday_list COMMA weekday {dow_pos = 0};
- | weekday_list COMMA DIGITS weekday { dow_pos = atoi($3)}
+ 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++;}
recur_list:
@@ -482,7 +507,7 @@ struct icaltimetype fill_datetime(char* datestr, char* timestr)
}
-void yyerror(char* s)
+void ical_yyerror(char* s)
{
/*fprintf(stderr,"Parse error \'%s\'\n", s);*/
}
diff --git a/libical/src/libical/pvl.c b/libical/src/libical/pvl.c
index 94eaeac874..2a733e8aa9 100644
--- a/libical/src/libical/pvl.c
+++ b/libical/src/libical/pvl.c
@@ -309,14 +309,14 @@ pvl_insert_ordered(pvl_list l,pvl_comparef f,void *d)
/* smaller than head, add to head */
- if ( ((*f)(d,L->head->d)) < 0)
+ if ( ((*f)(d,L->head->d)) <= 0)
{
pvl_unshift(l,d);
return;
}
/* larger than tail, add to tail */
- if ( (*f)(d,L->tail->d) > 0)
+ if ( (*f)(d,L->tail->d) >= 0)
{
pvl_push(l,d);
return;
@@ -324,10 +324,10 @@ pvl_insert_ordered(pvl_list l,pvl_comparef f,void *d)
/* Search for the first element that is smaller, and add before it */
-
+
for (P=L->head; P != 0; P = P->next)
{
- if ( (*f)(P->d,d) > 0)
+ if ( (*f)(P->d,d) >= 0)
{
pvl_insert_before(l,P,d);
return;
diff --git a/libical/src/libical/pvl.h b/libical/src/libical/pvl.h
index 40ca516e9f..14a15a15eb 100644
--- a/libical/src/libical/pvl.h
+++ b/libical/src/libical/pvl.h
@@ -39,7 +39,7 @@ extern int pvl_list_count;
/* Create new lists or elements */
pvl_elem pvl_new_element(void* d, pvl_elem next,pvl_elem prior);
-pvl_list pvl_newlist();
+pvl_list pvl_newlist(void);
void pvl_free(pvl_list);
/* Add, remove, or get the head of the list */
diff --git a/libical/src/libical/sspm.c b/libical/src/libical/sspm.c
index 36f69b506a..faaacb5592 100644
--- a/libical/src/libical/sspm.c
+++ b/libical/src/libical/sspm.c
@@ -125,6 +125,21 @@ struct minor_content_type_map
+struct encoding_map {
+ enum sspm_encoding encoding;
+ char* str;
+} sspm_encoding_map[] =
+{
+ {SSPM_NO_ENCODING,""},
+ {SSPM_QUOTED_PRINTABLE_ENCODING,"quoted-printable"},
+ {SSPM_8BIT_ENCODING,"8bit"},
+ {SSPM_7BIT_ENCODING,"7bit"},
+ {SSPM_BINARY_ENCODING,"binary"},
+ {SSPM_BASE64_ENCODING,"base64"},
+ {SSPM_UNKNOWN_ENCODING,""}
+
+};
+
char* sspm_get_parameter(char* line, char* parameter)
{
@@ -488,6 +503,19 @@ char* sspm_minor_type_string(enum sspm_major_type type)
}
+char* sspm_encoding_string(enum sspm_encoding type)
+{
+ int i;
+ for (i=0; sspm_encoding_map[i].encoding != SSPM_UNKNOWN_ENCODING;
+ i++){
+ if(type == sspm_encoding_map[i].encoding){
+ return sspm_encoding_map[i].str;
+ }
+ }
+
+ return sspm_encoding_map[i].str; /* Should return SSPM_UNKNOWN_MINOR_TYPE */
+}
+
/* Interpret a header line and add its data to the header
structure. */
void sspm_build_header(struct sspm_header *header, char* line)
@@ -543,6 +571,7 @@ void sspm_build_header(struct sspm_header *header, char* line)
header->encoding = SSPM_UNKNOWN_ENCODING;
}
+
free(lencoding);
header->def = 0;
@@ -570,12 +599,13 @@ char* sspm_get_next_line(struct mime_impl *impl)
void sspm_store_part(struct mime_impl *impl, struct sspm_header header,
- int level, void *part)
+ int level, void *part, size_t size)
{
impl->parts[impl->part_no].header = header;
impl->parts[impl->part_no].level = level;
impl->parts[impl->part_no].data = part;
+ impl->parts[impl->part_no].data_size = size;
impl->part_no++;
}
@@ -599,8 +629,10 @@ void sspm_set_error(struct sspm_header* header, enum sspm_error error,
}
void* sspm_make_part(struct mime_impl *impl,
- struct sspm_header *header,
- struct sspm_header *parent_header)
+ struct sspm_header *header,
+ struct sspm_header *parent_header,
+ void **end_part,
+ size_t *size)
{
/* For a single part type, read to the boundary, if there is a
@@ -609,7 +641,7 @@ void* sspm_make_part(struct mime_impl *impl,
at the first blank line */
char *line;
- void *part, *end_part;
+ void *part;
int end = 0;
struct sspm_action_map action = get_action(
@@ -617,6 +649,7 @@ void* sspm_make_part(struct mime_impl *impl,
header->major,
header->minor);
+ *size = 0;
part =action.new_part();
impl->state = IN_BODY;
@@ -630,7 +663,7 @@ void* sspm_make_part(struct mime_impl *impl,
if(parent_header == 0){
char* boundary;
end = 1;
- end_part = 0;
+ *end_part = 0;
sspm_set_error(header,SSPM_UNEXPECTED_BOUNDARY_ERROR,line);
@@ -654,7 +687,7 @@ void* sspm_make_part(struct mime_impl *impl,
if(strncmp((line+2),parent_header->boundary,
sizeof(parent_header->boundary)) == 0){
- end_part = action.end_part(part);
+ *end_part = action.end_part(part);
if(sspm_is_mime_boundary(line)){
impl->state = END_OF_PART;
@@ -684,7 +717,6 @@ void* sspm_make_part(struct mime_impl *impl,
strcpy(boundary,line);
strcat(boundary,"--");
while((line = sspm_get_next_line(impl)) != 0){
- /*printf("Error: %s\n",line);*/
if(strcmp(boundary,line)==0){
break;
}
@@ -693,16 +725,16 @@ void* sspm_make_part(struct mime_impl *impl,
}
} else {
- size_t size;
- char* data;
+ char* data=0;
char* rtrn=0;
- size = strlen(line);
+ *size = strlen(line);
- data = (char*)malloc(size+2);
+ data = (char*)malloc(*size+2);
+ assert(data != 0);
if (header->encoding == SSPM_BASE64_ENCODING){
- rtrn = decode_base64(data,line,&size);
+ rtrn = decode_base64(data,line,size);
} else if(header->encoding == SSPM_QUOTED_PRINTABLE_ENCODING){
- rtrn = decode_quoted_printable(data,line,&size);
+ rtrn = decode_quoted_printable(data,line,size);
}
if(rtrn == 0){
@@ -712,9 +744,9 @@ void* sspm_make_part(struct mime_impl *impl,
/* add a end-of-string after the data, just in case binary
data from decode64 gets passed to a tring handling
routine in add_line */
- data[size+1]='\0';
+ data[*size+1]='\0';
- action.add_line(part,header,data,size);
+ action.add_line(part,header,data,*size);
free(data);
}
@@ -722,7 +754,7 @@ void* sspm_make_part(struct mime_impl *impl,
if (end == 0){
/* End the part if the input is exhausted */
- end_part = action.end_part(part);
+ *end_part = action.end_part(part);
}
return end_part;
@@ -735,6 +767,7 @@ void* sspm_make_multipart_subpart(struct mime_impl *impl,
struct sspm_header header;
char *line;
void* part;
+ size_t size;
if(parent_header->boundary == 0){
/* Error. Multipart headers must have a boundary*/
@@ -785,7 +818,6 @@ void* sspm_make_multipart_subpart(struct mime_impl *impl,
strcpy(boundary,line);
strcat(boundary,"--");
while((line = sspm_get_next_line(impl)) != 0){
- /*printf("Error: %s\n",line);*/
if(strcmp(boundary,line)==0){
break;
}
@@ -809,7 +841,7 @@ void* sspm_make_multipart_subpart(struct mime_impl *impl,
}
if(header.error!= SSPM_NO_ERROR){
- sspm_store_part(impl,header,impl->level,0);
+ sspm_store_part(impl,header,impl->level,0,0);
return 0;
}
@@ -820,7 +852,7 @@ void* sspm_make_multipart_subpart(struct mime_impl *impl,
child_header = &(impl->parts[impl->part_no].header);
/* Store the multipart part */
- sspm_store_part(impl,header,impl->level,0);
+ sspm_store_part(impl,header,impl->level,0,0);
/* now get all of the sub-parts */
part = sspm_make_multipart_part(impl,child_header);
@@ -834,11 +866,11 @@ void* sspm_make_multipart_subpart(struct mime_impl *impl,
sspm_get_next_line(impl); /* Step past the terminating boundary */
} else {
- part = sspm_make_part(impl, &header,parent_header);
+ sspm_make_part(impl, &header,parent_header,&part,&size);
memset(&(impl->parts[impl->part_no]), 0, sizeof(struct sspm_part));
- sspm_store_part(impl,header,impl->level,part);
+ sspm_store_part(impl,header,impl->level,part,size);
}
@@ -1013,16 +1045,18 @@ int sspm_parse_mime(struct sspm_part *parts,
struct sspm_header *child_header;
child_header = &(impl.parts[impl.part_no].header);
- sspm_store_part(&impl,header,impl.level,0);
+ sspm_store_part(&impl,header,impl.level,0,0);
part = sspm_make_multipart_part(&impl,child_header);
} else {
- part = sspm_make_part(&impl, &header, 0);
+ void *part;
+ size_t size;
+ sspm_make_part(&impl, &header, 0,&part,&size);
memset(&(impl.parts[impl.part_no]), 0, sizeof(struct sspm_part));
- sspm_store_part(&impl,header,impl.level,part);
+ sspm_store_part(&impl,header,impl.level,part,size);
}
return 0;
@@ -1076,8 +1110,8 @@ The code is heavily modified by Eric Busboom.
***********************************************************************/
-unsigned char *decode_quoted_printable(unsigned char *dest,
- unsigned char *src,
+char *decode_quoted_printable(char *dest,
+ char *src,
size_t *size)
{
int cc;
@@ -1125,12 +1159,12 @@ unsigned char *decode_quoted_printable(unsigned char *dest,
return(dest);
}
-unsigned char *decode_base64(unsigned char *dest,
- unsigned char *src,
- size_t *size)
+char *decode_base64(char *dest,
+ char *src,
+ size_t *size)
{
int cc;
- unsigned char buf[4] = {0,0,0,0};
+ char buf[4] = {0,0,0,0};
int p = 0;
int valid_data = 0;
size_t size_out=0;
@@ -1189,3 +1223,391 @@ unsigned char *decode_base64(unsigned char *dest,
}
+/***********************************************************************
+
+ Routines to output MIME
+
+**********************************************************************/
+
+
+struct sspm_buffer {
+ char* buffer;
+ char* pos;
+ size_t buf_size;
+ int line_pos;
+};
+
+void sspm_append_string(struct sspm_buffer* buf, char* string);
+void sspm_write_part(struct sspm_buffer *buf,struct sspm_part *part, int *part_num);
+
+void sspm_append_hex(struct sspm_buffer* buf, char ch)
+{
+ char tmp[3];
+
+ sprintf(tmp,"=%02X",ch);
+
+ sspm_append_string(buf,tmp);
+}
+
+/* a copy of icalmemory_append_char */
+void sspm_append_char(struct sspm_buffer* buf, char ch)
+{
+ char *new_buf;
+ char *new_pos;
+
+ size_t data_length, final_length;
+
+ data_length = (size_t)buf->pos - (size_t)buf->buffer;
+
+ final_length = data_length + 2;
+
+ if ( final_length > (size_t) buf->buf_size ) {
+
+ buf->buf_size = (buf->buf_size) * 2 + final_length +1;
+
+ new_buf = realloc(buf->buffer,buf->buf_size);
+
+ new_pos = (void*)((size_t)new_buf + data_length);
+
+ buf->pos = new_pos;
+ buf->buffer = new_buf;
+ }
+
+ *(buf->pos) = ch;
+ buf->pos += 1;
+ *(buf->pos) = 0;
+}
+/* A copy of icalmemory_append_string */
+void sspm_append_string(struct sspm_buffer* buf, char* string)
+{
+ char *new_buf;
+ char *new_pos;
+
+ size_t data_length, final_length, string_length;
+
+ string_length = strlen(string);
+ data_length = (size_t)buf->pos - (size_t)buf->buffer;
+ final_length = data_length + string_length;
+
+ if ( final_length >= (size_t) buf->buf_size) {
+
+
+ buf->buf_size = (buf->buf_size) * 2 + final_length;
+
+ new_buf = realloc(buf->buffer,buf->buf_size);
+
+ new_pos = (void*)((size_t)new_buf + data_length);
+
+ buf->pos = new_pos;
+ buf->buffer = new_buf;
+ }
+
+ strcpy(buf->pos, string);
+
+ buf->pos += string_length;
+}
+
+
+
+static int sspm_is_printable(char c)
+{
+ return (c >= 33) && (c <= 126) && (c != '=');
+
+}
+
+
+void sspm_encode_quoted_printable(struct sspm_buffer *buf, char* data)
+{
+ char *p;
+ int lpos = 0;
+
+ for(p = data; *p != 0; p++){
+
+ if(sspm_is_printable(*p)){
+ /* plain characters can represent themselves */
+ /* RFC2045 Rule #2 */
+ sspm_append_char(buf,*p);
+ lpos++;
+ } else if ( *p == '\t' || *p == ' ' ) {
+
+ /* For tabs and spaces, only encode if they appear at the
+ end of the line */
+ /* RFC2045 Rule #3 */
+
+ char n = *(p+1);
+
+ if( n == '\n' || n == '\r'){
+ sspm_append_hex(buf,*p);
+ lpos += 3;
+ } else {
+ sspm_append_char(buf,*p);
+ lpos++;
+ }
+
+ } else if( *p == '\n' || *p == '\r'){
+ sspm_append_char(buf,*p);
+
+ lpos=0;
+
+ } else {
+ /* All others need to be encoded */
+ sspm_append_hex(buf,*p);
+ lpos+=3;
+ }
+
+
+ /* Add line breaks */
+ if (lpos > 72){
+ lpos = 0;
+ sspm_append_string(buf,"=\n");
+ }
+ }
+}
+
+static char BaseTable[64] = {
+ 'A','B','C','D','E','F','G','H','I','J','K','L','M','N','O','P',
+ 'Q','R','S','T','U','V','W','X','Y','Z','a','b','c','d','e','f',
+ 'g','h','i','j','k','l','m','n','o','p','q','r','s','t','u','v',
+ 'w','x','y','z','0','1','2','3','4','5','6','7','8','9','+','/'
+};
+
+void sspm_write_base64(struct sspm_buffer *buf, char* inbuf,int size )
+{
+
+ char outbuf[4];
+ int i;
+
+ outbuf[0] = outbuf[1] = outbuf[2] = outbuf[3] = 65;
+
+ switch(size){
+
+ case 4:
+ outbuf[3] = inbuf[2] & 0x3F;
+
+ case 3:
+ outbuf[2] = ((inbuf[1] & 0x0F) << 2) | ((inbuf[2] & 0xC0) >> 6);
+
+ case 2:
+ outbuf[0] = (inbuf[0] & 0xFC) >> 2;
+ outbuf[1] = ((inbuf[0] & 0x03) << 4) | ((inbuf[1] & 0xF0) >> 4);
+ break;
+
+ default:
+ assert(0);
+ }
+
+ for(i = 0; i < 4; i++){
+
+ if(outbuf[i] == 65){
+ sspm_append_char(buf,'=');
+ } else {
+ sspm_append_char(buf,BaseTable[(int)outbuf[i]]);
+ }
+ }
+}
+
+void sspm_encode_base64(struct sspm_buffer *buf, char* data, size_t size)
+{
+
+ char *p;
+ char inbuf[3];
+ int i = 0;
+ int first = 1;
+ int lpos = 0;
+
+ inbuf[0] = inbuf[1] = inbuf[2] = 0;
+
+ for (p = data; *p !=0; p++){
+
+ if (i%3 == 0 && first == 0){
+
+ sspm_write_base64(buf, inbuf, 4);
+ lpos+=4;
+
+ inbuf[0] = inbuf[1] = inbuf[2] = 0;
+ }
+
+ assert(lpos%4 == 0);
+
+ if (lpos == 72){
+ sspm_append_string(buf,"\n");
+ lpos = 0;
+ }
+
+ inbuf[i%3] = *p;
+
+ i++;
+ first = 0;
+
+ }
+
+
+ /* If the inbuf was not exactly filled on the last byte, we need
+ to spit out the odd bytes that did get in -- either one or
+ two. This will result in an output of two bytes and '==' or
+ three bytes and '=', respectively */
+
+ if (i%3 == 1 && first == 0){
+ sspm_write_base64(buf, inbuf, 2);
+ } else if (i%3 == 2 && first == 0){
+ sspm_write_base64(buf, inbuf, 3);
+ }
+
+}
+
+void sspm_write_header(struct sspm_buffer *buf,struct sspm_header *header)
+{
+
+ int i;
+ char temp[TMP_BUF_SIZE];
+ char* major;
+ char* minor;
+
+ /* Content-type */
+
+ major = sspm_major_type_string(header->major);
+ minor = sspm_minor_type_string(header->minor);
+
+ if(header->minor == SSPM_UNKNOWN_MINOR_TYPE ){
+ assert(header->minor_text !=0);
+ minor = header->minor_text;
+ }
+
+ sprintf(temp,"Content-Type: %s/%s",major,minor);
+
+ sspm_append_string(buf,temp);
+
+ if(header->boundary != 0){
+ sprintf(temp,";boundary=\"%s\"",header->boundary);
+ sspm_append_string(buf,temp);
+ }
+
+ /* Append any content type parameters */
+ if(header->content_type_params != 0){
+ for(i=0; *(header->content_type_params[i])!= 0;i++){
+ sprintf(temp,header->content_type_params[i]);
+ sspm_append_char(buf,';');
+ sspm_append_string(buf,temp);
+ }
+ }
+
+ sspm_append_char(buf,'\n');
+
+ /*Content-Transfer-Encoding */
+
+ if(header->encoding != SSPM_UNKNOWN_ENCODING &&
+ header->encoding != SSPM_NO_ENCODING){
+ sprintf(temp,"Content-Transfer-Encoding: %s\n",
+ sspm_encoding_string(header->encoding));
+ }
+
+ sspm_append_char(buf,'\n');
+
+}
+
+void sspm_write_multipart_part(struct sspm_buffer *buf,
+ struct sspm_part *parts,
+ int* part_num)
+{
+
+ int parent_level, level;
+ struct sspm_header *header = &(parts[*part_num].header);
+ /* Write the header for the multipart part */
+ sspm_write_header(buf,header);
+
+ parent_level = parts[*part_num].level;
+
+ (*part_num)++;
+
+ level = parts[*part_num].level;
+
+ while(parts[*part_num].header.major != SSPM_NO_MAJOR_TYPE &&
+ level == parent_level+1){
+
+ assert(header->boundary);
+ sspm_append_string(buf,header->boundary);
+ sspm_append_char(buf,'\n');
+
+ if (parts[*part_num].header.major == SSPM_MULTIPART_MAJOR_TYPE){
+ sspm_write_multipart_part(buf,parts,part_num);
+ } else {
+ sspm_write_part(buf, &(parts[*part_num]), part_num);
+ }
+
+ (*part_num)++;
+ level = parts[*part_num].level;
+ }
+
+ sspm_append_string(buf,"\n\n--");
+ sspm_append_string(buf,header->boundary);
+ sspm_append_string(buf,"\n");
+
+ (*part_num)--; /* undo last, spurious, increment */
+}
+
+void sspm_write_part(struct sspm_buffer *buf,struct sspm_part *part,int *part_num)
+{
+
+ /* Write header */
+ sspm_write_header(buf,&(part->header));
+
+ /* Write part data */
+
+ if(part->data == 0){
+ return;
+ }
+
+ if(part->header.encoding == SSPM_BASE64_ENCODING) {
+ assert(part->data_size != 0);
+ sspm_encode_base64(buf,part->data,part->data_size);
+ } else if(part->header.encoding == SSPM_QUOTED_PRINTABLE_ENCODING) {
+ sspm_encode_quoted_printable(buf,part->data);
+ } else {
+ sspm_append_string(buf,part->data);
+ }
+
+ sspm_append_string(buf,"\n\n");
+}
+
+int sspm_write_mime(struct sspm_part *parts,size_t num_parts,
+ char **output_string, char* header)
+{
+ struct sspm_buffer buf;
+ int part_num =0;
+
+ buf.buffer = malloc(4096);
+ buf.pos = buf.buffer;
+ buf.buf_size = 10;
+ buf.line_pos = 0;
+
+ /* write caller's header */
+ if(header != 0){
+ sspm_append_string(&buf,header);
+ }
+
+ if(buf.buffer[strlen(buf.buffer)-1] != '\n'){
+ sspm_append_char(&buf,'\n');
+ }
+
+ /* write mime-version header */
+ sspm_append_string(&buf,"Mime-Version: 1.0\n");
+
+ /* End of header */
+
+ /* Write body parts */
+ while(parts[part_num].header.major != SSPM_NO_MAJOR_TYPE){
+ if (parts[part_num].header.major == SSPM_MULTIPART_MAJOR_TYPE){
+ sspm_write_multipart_part(&buf,parts,&part_num);
+ } else {
+ sspm_write_part(&buf, &(parts[part_num]), &part_num);
+ }
+
+ part_num++;
+ }
+
+
+ *output_string = buf.buffer;
+
+ return 0;
+}
+
diff --git a/libical/src/libical/sspm.h b/libical/src/libical/sspm.h
index 657b77a8d7..417f83eefd 100644
--- a/libical/src/libical/sspm.h
+++ b/libical/src/libical/sspm.h
@@ -37,6 +37,7 @@
#define SSPM_H
enum sspm_major_type {
+ SSPM_NO_MAJOR_TYPE,
SSPM_TEXT_MAJOR_TYPE,
SSPM_IMAGE_MAJOR_TYPE,
SSPM_AUDIO_MAJOR_TYPE,
@@ -44,11 +45,11 @@ enum sspm_major_type {
SSPM_APPLICATION_MAJOR_TYPE,
SSPM_MULTIPART_MAJOR_TYPE,
SSPM_MESSAGE_MAJOR_TYPE,
- SSPM_UNKNOWN_MAJOR_TYPE,
- SSPM_NO_MAJOR_TYPE
+ SSPM_UNKNOWN_MAJOR_TYPE
};
enum sspm_minor_type {
+ SSPM_NO_MINOR_TYPE,
SSPM_ANY_MINOR_TYPE,
SSPM_PLAIN_MINOR_TYPE,
SSPM_RFC822_MINOR_TYPE,
@@ -58,8 +59,7 @@ enum sspm_minor_type {
SSPM_RELATED_MINOR_TYPE,
SSPM_ALTERNATIVE_MINOR_TYPE,
SSPM_PARALLEL_MINOR_TYPE,
- SSPM_UNKNOWN_MINOR_TYPE,
- SSPM_NO_MINOR_TYPE
+ SSPM_UNKNOWN_MINOR_TYPE
};
enum sspm_encoding {
@@ -89,6 +89,7 @@ struct sspm_header
enum sspm_major_type major;
enum sspm_minor_type minor;
char *minor_text;
+ char ** content_type_params;
char* charset;
enum sspm_encoding encoding;
char* filename;
@@ -100,6 +101,7 @@ struct sspm_header
struct sspm_part {
struct sspm_header header;
int level;
+ size_t data_size;
void *data;
};
@@ -115,7 +117,7 @@ struct sspm_action_map {
char* sspm_major_type_string(enum sspm_major_type type);
char* sspm_minor_type_string(enum sspm_major_type type);
-
+char* sspm_encoding_string(enum sspm_encoding type);
int sspm_parse_mime(struct sspm_part *parts,
size_t max_parts,
@@ -127,12 +129,15 @@ int sspm_parse_mime(struct sspm_part *parts,
void sspm_free_parts(struct sspm_part *parts, size_t max_parts);
-unsigned char *decode_quoted_printable(unsigned char *dest,
- unsigned char *src,
- size_t *size);
-unsigned char *decode_base64(unsigned char *dest,
- unsigned char *src,
+char *decode_quoted_printable(char *dest,
+ char *src,
size_t *size);
+char *decode_base64(char *dest,
+ char *src,
+ size_t *size);
+
+int sspm_write_mime(struct sspm_part *parts,size_t num_parts,
+ char **output_string, char* header);
-#endif SSPM_H
+#endif /*SSPM_H*/
diff --git a/libical/src/libicalss/Makefile.am b/libical/src/libicalss/Makefile.am
index 9f28164079..0cbecbedea 100644
--- a/libical/src/libicalss/Makefile.am
+++ b/libical/src/libicalss/Makefile.am
@@ -1,32 +1,59 @@
+lib_LTLIBRARIES = libicalss.la
+YFLAGS =-d -v -p ss
+LFLAGS = -Pss
+LEX_OUTPUT_ROOT = lex.ss
-#noinst_LTLIBRARIES = libicalss.la
-lib_LIBRARIES = libicalss.a
-
-libicalss_a_SOURCES =\
- icalcalendar.c \
- icalcalendar.h \
- icalset.h \
- icalset.c \
- icalfileset.c \
- icalfileset.h \
- icalfilesetimpl.h \
- icaldirset.c \
- icaldirset.h \
- icalcsdb.h \
- icalcstp.h \
- icalgauge.h \
- icalgauge.c
-
-include_HEADERS =\
- icalcalendar.h \
- icalset.h
- icalfileset.h \
- icalfilesetimpl.h \
- icaldirset.h \
- icalcsdb.h \
- icalcstp.h \
- icalgauge.h
-
-INCLUDES = -I../libical/
+all: icalss.h
+INCLUDES = \
+ -I$(top_builddir) \
+ -I$(top_srcdir)/src \
+ -I$(top_builddir)/src \
+ -I$(top_srcdir)/src/libical \
+ -I$(srcdir)/libical
+
+libicalss_la_LDFLAGS = -version-info 0:0:0
+
+libicalss_la_SOURCES = \
+ icalclassify.c \
+ icaldirset.c \
+ icaldirsetimpl.h \
+ icalfileset.c \
+ icalfilesetimpl.h \
+ icalgauge.c \
+ icalgaugeimpl.h \
+ icalset.c \
+ icalsslexer.l \
+ icalssutil.c \
+ icalssyacc.h \
+ icalssyacc.y \
+ icalspanlist.c \
+ icalmessage.c \
+ icalcstp.c
+
+libicalssincludedir = $(includedir)
+
+COMBINEDHEADERS = \
+ icalset.h \
+ icalfileset.h \
+ icaldirset.h \
+ icalcalendar.h \
+ icalgauge.h \
+ icalssutil.h \
+ icalclassify.h \
+ icalspanlist.h \
+ icalmessage.h \
+ icalcstp.h
+
+icalss.h: $(COMBINEDHEADERS)
+ cat $(COMBINEDHEADERS) | egrep -v "#include.*\"ical" \
+ | egrep -v "#include.*\"pvl\.h\"" > icalss.h
+
+
+libicalssinclude_HEADERS = icalss.h
+
+CONFIG_CLEAN_FILES = y.output
+
+EXTRA_DIST = \
+ $(COMBINEDHEADERS) \
diff --git a/libical/src/libicalss/icalcstp.h b/libical/src/libicalss/icalcstp.h
index fea6c89616..63f5af913f 100644
--- a/libical/src/libicalss/icalcstp.h
+++ b/libical/src/libicalss/icalcstp.h
@@ -29,43 +29,15 @@
#include "ical.h"
-typedef void* icalcstp;
-
-typedef struct icalcstp_stubs;
-
-icalcstp* icalcstp_new(icalcstp_stubs* stubs,
- int incoming, int outgoing);
-
-void* icalcstp_free(icalcstp* cstp);
-
-/* Send or recieve data directly to/from the network. These calls are
- needed for the AUTHENTICATE command and possibly others */
-ssize_t icalcstp_send(icalcstp* cstp, char* msg);
-ssize_t icalcstp_recieve(icalcstp* cstp, char* msg);
-
-int icalcstp_set_timeout(icalcstp* cstp, int sec);
-
-typedef struct icalcstp_response {
- icalrequeststatus code
- char *arg; /* These strings are owned by libical */
- char *debug_text;
- char *more_text;
- void* result;
-} icalcstp_response;
-
/********************** Server (Reciever) Interfaces *************************/
/* On the server side, the caller will recieve data from the incoming
- socket and pass it to icalcstp_process_incoming. The caller then
- takes the return from _process_incoming and sends it out through
- the socket. This gives the caller a point of control. If the cstp
- code connected to the socket itself, it would be hard for the
- caller to do anything else after the cstp code was started.
-
- However, some commands will use the sockets directly, though the
- _send and _recieve routines. Example is Authenticate and Starttls,
- which need several exchanges of data
+ socket and pass it to icalcstps_next_input. The caller then takes
+ the return from icalcstps_next_outpu and sends it out through the
+ socket. This gives the caller a point of control. If the cstp code
+ connected to the socket itself, it would be hard for the caller to
+ do anything else after the cstp code was started.
All of the server abd client command routines will generate
response codes. On the server side, these responses will be turned
@@ -73,63 +45,117 @@ typedef struct icalcstp_response {
is the one sent from the server.
Since each command can return multiple responses, the responses are
- stored in the icalcstp object and are accesses by
- icalcstp_first_response() and icalcstp_next_response()
+ stored in the icalcstps object and are accesses by
+ icalcstps_first_response() and icalcstps_next_response()
+
+ How to use:
+
+ 1) Construct a new icalcstps, bound to your code via stubs
+ 2) Repeat forever:
+ 2a) Get string from client & give to icalcstps_next_input()
+ 2b) Call icalcstps_next_output. Send string to client.
*/
-
-/* Process a single line of incomming data */
-char* icalcstp_process_incoming(icalcstp* cstp, char* string);
+
+typedef void icalcstps;
/* Er, they aren't really stubs, but pointers to the rountines that
- icalcstp_process_incoming will call when it recognizes a CSTP
+ icalcstps_process_incoming will call when it recognizes a CSTP
command in the data. BTW, the CONTINUE command is named 'cont'
because 'continue' is a C keyword */
-
-struct icalcstp_server_stubs {
- icalerrorenum (*abort)(icalcstp* cstp);
- icalerrorenum (*authenticate)(icalcstp* cstp, char* mechanism,
+struct icalcstps_stubs {
+ icalerrorenum (*abort)(icalcstps* cstp);
+ icalerrorenum (*authenticate)(icalcstps* cstp, char* mechanism,
char* data);
- icalerrorenum (*calidexpand)(icalcstp* cstp, char* calid);
- icalerrorenum (*capability)(icalcstp* cstp);
- icalerrorenum (*cont)(icalcstp* cstp, unsigned int time);
- icalerrorenum (*identify)(icalcstp* cstp, char* id);
- icalerrorenum (*disconnect)(icalcstp* cstp);
- icalerrorenum (*sendata)(icalcstp* cstp, unsigned int time,
+ icalerrorenum (*calidexpand)(icalcstps* cstp, char* calid);
+ icalerrorenum (*capability)(icalcstps* cstp);
+ icalerrorenum (*cont)(icalcstps* cstp, unsigned int time);
+ icalerrorenum (*identify)(icalcstps* cstp, char* id);
+ icalerrorenum (*disconnect)(icalcstps* cstp);
+ icalerrorenum (*sendata)(icalcstps* cstp, unsigned int time,
icalcomponent *comp);
- icalerrorenum (*starttls)(icalcstp* cstp, char* command,
+ icalerrorenum (*starttls)(icalcstps* cstp, char* command,
char* data);
- icalerrorenum (*upnexpand)(icalcstp* cstp, char* upn);
- icalerrorenum (*unknown)(icalcstp* cstp, char* command, char* data);
-}
+ icalerrorenum (*upnexpand)(icalcstps* cstp, char* upn);
+ icalerrorenum (*unknown)(icalcstps* cstp, char* command, char* data);
+};
+
+
+icalcstps* icalcstps_new(struct icalcstps_stubs stubs);
+
+void icalcstps_free(icalcstps* cstp);
+
+int icalcstps_set_timeout(icalcstps* cstp, int sec);
+
+/* Get the next string to send to the client */
+char* icalcstps_next_output(icalcstps* cstp);
+
+/* process the next string from the client */
+int icalcstps_next_input(icalcstps* cstp);
+
/********************** Client (Sender) Interfaces **************************/
-/* On the client side, the cstp code is connected directly to the
- socket, because the callers point of control is at the interfaces
- below. */
-
-icalerrorenum icalcstp_abort(icalcstp* cstp);
-icalerrorenum icalcstp_authenticate(icalcstp* cstp, char* mechanism,
- char* data);
-icalerrorenum icalcstp_capability(icalcstp* cstp);
-icalerrorenum icalcstp_calidexpand(icalcstp* cstp,char* calid);
-icalerrorenum icalcstp_continue(icalcstp* cstp, unsigned int time);
-icalerrorenum icalcstp_disconnect(icalcstp* cstp);
-icalerrorenum icalcstp_identify(icalcstp* cstp, char* id);
-icalerrorenum icalcstp_starttls(icalcstp* cstp, char* command,
- char* data);
-icalerrorenum icalcstp_senddata(icalcstp* cstp, unsigned int time,
- icalcomponent *comp);
-icalerrorenum icalcstp_upnexpand(icalcstp* cstp,char* calid);
-icalerrorenum icalcstp_sendata(icalcstp* cstp, unsigned int time,
- icalcomponent *comp);
+/* How to use:
+
+ 1) Construct a new icalcstpc
+ 2) Issue a command
+ 3) Repeat until both call icalcstpc_next_output and
+ icalcstpc_next_input return 0:
+ 3a) Call icalcstpc_next_output. Send string to server.
+ 3b) Get string from server, & give to icalcstp_next_input()
+ 4) Iterate with icalcstpc_first_response & icalcstp_next_response to
+ get the servers responses
+ 5) Repeat at #2
+*/
-icalcstp_response icalcstp_first_response(icalcstp* cstp);
-icalcstp_response icalcstp_next_response(icalcstp* cstp);
+typedef void* icalcstpc;
+/* Response code sent by the server. */
+typedef struct icalcstpc_response {
+ icalrequeststatus code;
+ char *arg; /* These strings are owned by libical */
+ char *debug_text;
+ char *more_text;
+ void* result;
+} icalcstpc_response;
+
+icalcstps* icalcstpc_new();
+
+void* icalcstpc_free(icalcstpc* cstpc);
+
+int icalcstpc_set_timeout(icalcstpc* cstp, int sec);
+
+
+/* Get the next string to send to the server */
+char* icalcstpc_next_output(icalcstpc* cstp);
+
+/* process the next string from the server */
+int icalcstpc_next_input(icalcstpc* cstp);
+
+/* After icalcstpc_next_input returns a 0, there are responses
+ ready. use these to get them */
+icalcstpc_response icalcstpc_first_response(icalcstpc* cstp);
+icalcstpc_response icalcstpc_next_response(icalcstpc* cstp);
+
+/* Issue a command */
+icalerrorenum icalcstpc_abort(icalcstpc* cstp);
+icalerrorenum icalcstpc_authenticate(icalcstpc* cstp, char* mechanism,
+ char* init_data, char* f(char*) );
+icalerrorenum icalcstpc_capability(icalcstpc* cstp);
+icalerrorenum icalcstpc_calidexpand(icalcstpc* cstp,char* calid);
+icalerrorenum icalcstpc_continue(icalcstpc* cstp, unsigned int time);
+icalerrorenum icalcstpc_disconnect(icalcstpc* cstp);
+icalerrorenum icalcstpc_identify(icalcstpc* cstp, char* id);
+icalerrorenum icalcstpc_starttls(icalcstpc* cstp, char* command,
+ char* init_data, char* f(char*));
+icalerrorenum icalcstpc_senddata(icalcstpc* cstp, unsigned int time,
+ icalcomponent *comp);
+icalerrorenum icalcstpc_upnexpand(icalcstpc* cstp,char* calid);
+icalerrorenum icalcstpc_sendata(icalcstpc* cstp, unsigned int time,
+ icalcomponent *comp);
#endif /* !ICALCSTP_H */
diff --git a/libical/src/libicalss/icaldirset.c b/libical/src/libicalss/icaldirset.c
index ff5357126c..b377d54571 100644
--- a/libical/src/libicalss/icaldirset.c
+++ b/libical/src/libicalss/icaldirset.c
@@ -31,11 +31,10 @@
icaldirset manages a database of ical components and offers
interfaces for reading, writting and searching for components.
- icaldirset groups components in to clusters based on their DTSTART
+ icaldirset groups components in to clusters based on their DTSTAMP
time -- all components that start in the same month are grouped
together in a single file. All files in a sotre are kept in a single
- directory. ( If a component does not have DTSTART, the store uses
- DTSTAMP or CREATE )
+ directory.
The primary interfaces are icaldirset_first and icaldirset_next. These
routine iterate through all of the components in the store, subject
@@ -76,32 +75,25 @@
#include <stdlib.h> /* for rand(), srand() */
#include <sys/utsname.h> /* for uname */
#include <string.h> /* for strdup */
+#include "icaldirsetimpl.h"
-struct icaldirset_impl
-{
- char* dir;
- icalcomponent* gauge;
- icaldirset* cluster;
- int first_component;
- pvl_list directory;
- pvl_elem directory_iterator;
-};
-
struct icaldirset_impl* icaldirset_new_impl()
{
- struct icaldirset_impl* comp;
+ struct icaldirset_impl* impl;
- if ( ( comp = (struct icaldirset_impl*)
+ if ( ( impl = (struct icaldirset_impl*)
malloc(sizeof(struct icaldirset_impl))) == 0) {
icalerror_set_errno(ICAL_NEWFAILED_ERROR);
return 0;
}
- return comp;
+ strcpy(impl->id,ICALDIRSET_ID);
+
+ return impl;
}
-char* icaldirset_path(icaldirset* cluster)
+const char* icaldirset_path(icaldirset* cluster)
{
struct icaldirset_impl *impl = icaldirset_new_impl();
@@ -125,12 +117,12 @@ icalerrorenum icaldirset_commit(icaldirset* store)
}
-void icaldirset_lock(char* dir)
+void icaldirset_lock(const char* dir)
{
}
-void icaldirset_unlock(char* dir)
+void icaldirset_unlock(const char* dir)
{
}
@@ -172,7 +164,7 @@ icalerrorenum icaldirset_read_directory(struct icaldirset_impl* impl)
return ICAL_NO_ERROR;
}
-icaldirset* icaldirset_new(char* dir)
+icaldirset* icaldirset_new(const char* dir)
{
struct icaldirset_impl *impl = icaldirset_new_impl();
struct stat sbuf;
@@ -366,7 +358,7 @@ void icaldirset_add_uid(icaldirset* store, icaldirset* comp)
/* This assumes that the top level component is a VCALENDAR, and there
is an inner component of type VEVENT, VTODO or VJOURNAL. The inner
- component must have a DTSTART property */
+ component must have a DTAMP property */
icalerrorenum icaldirset_add_component(icaldirset* store, icaldirset* comp)
{
@@ -392,15 +384,32 @@ icalerrorenum icaldirset_add_component(icaldirset* store, icaldirset* comp)
inner != 0;
inner = icalcomponent_get_next_component(comp,ICAL_ANY_COMPONENT)){
- dt = icalcomponent_get_first_property(inner,ICAL_DTSTART_PROPERTY);
-
+ dt = icalcomponent_get_first_property(inner,ICAL_DTSTAMP_PROPERTY);
+
if (dt != 0){
break;
}
}
if (dt == 0){
- icalerror_warn("The component does not have a DTSTART property, so it cannot be added to the store");
+
+ for(inner = icalcomponent_get_first_component(comp,ICAL_ANY_COMPONENT);
+ inner != 0;
+ inner = icalcomponent_get_next_component(comp,ICAL_ANY_COMPONENT)){
+
+ dt = icalcomponent_get_first_property(inner,ICAL_DTSTART_PROPERTY);
+
+ if (dt != 0){
+ break;
+ }
+ }
+
+ }
+
+ if (dt == 0){
+
+
+ icalerror_warn("The component does not have a DTSTAMP or DTSTART property, so it cannot be added to the store");
icalerror_set_errno(ICAL_BADARG_ERROR);
return ICAL_BADARG_ERROR;
}
@@ -488,7 +497,7 @@ icalerrorenum icaldirset_remove_component(icaldirset* store, icaldirset* comp)
icalerrorenum error = icaldirset_next_cluster(store);
if(impl->cluster != 0 && error == ICAL_NO_ERROR){
- icalfileset_get_first_component(impl->cluster,ICAL_ANY_COMPONENT);
+ icalfileset_get_first_component(impl->cluster);
} else {
/* HACK. Not strictly correct for impl->cluster==0 */
return error;
@@ -503,10 +512,24 @@ icalerrorenum icaldirset_remove_component(icaldirset* store, icaldirset* comp)
int icaldirset_count_components(icaldirset* store,
- icalcomponent_kind kind);
+ icalcomponent_kind kind)
+{
+ /* HACK, not implemented */
+
+ assert(0);
+
+ return 0;
+}
+
+
+icalcomponent* icaldirset_fetch_match(icaldirset* set, icalcomponent *c)
+{
+ fprintf(stderr," icaldirset_fetch_match is not implemented\n");
+ assert(0);
+}
-icalcomponent* icaldirset_fetch(icaldirset* store, char* uid)
+icalcomponent* icaldirset_fetch(icaldirset* store, const char* uid)
{
icalcomponent *gauge;
icalcomponent *old_gauge;
@@ -532,7 +555,7 @@ icalcomponent* icaldirset_fetch(icaldirset* store, char* uid)
old_gauge = impl->gauge;
impl->gauge = gauge;
- c= icaldirset_get_first_component(store,ICAL_ANY_COMPONENT);
+ c= icaldirset_get_first_component(store);
impl->gauge = old_gauge;
@@ -542,7 +565,7 @@ icalcomponent* icaldirset_fetch(icaldirset* store, char* uid)
}
-int icaldirset_has_uid(icaldirset* store, char* uid)
+int icaldirset_has_uid(icaldirset* store, const char* uid)
{
icalcomponent *c;
@@ -560,7 +583,7 @@ int icaldirset_has_uid(icaldirset* store, char* uid)
icalerrorenum icaldirset_select(icaldirset* store, icalcomponent* gauge)
-{
+ {
struct icaldirset_impl *impl = (struct icaldirset_impl*)store;
icalerror_check_arg_re( (store!=0), "store",ICAL_BADARG_ERROR);
@@ -575,16 +598,30 @@ icalerrorenum icaldirset_select(icaldirset* store, icalcomponent* gauge)
return ICAL_NO_ERROR;
}
-void icaldirset_clear(icaldirset* store);
-icalcomponent* icaldirset_fetch(icaldirset* store, char* uid);
-int icaldirset_has_uid(icaldirset* store, char* uid);
+
+icalerrorenum icaldirset_modify(icaldirset* store, icalcomponent *old,
+ icalcomponent *new)
+{
+ assert(0);
+ return ICAL_NO_ERROR; /* HACK, not implemented */
+
+}
+
+
+void icaldirset_clear(icaldirset* store)
+{
+
+ assert(0);
+ return;
+ /* HACK, not implemented */
+}
icalcomponent* icaldirset_get_current_component(icaldirset* store)
{
struct icaldirset_impl *impl = (struct icaldirset_impl*)store;
if(impl->cluster == 0){
- icaldirset_get_first_component(store,ICAL_ANY_COMPONENT);
+ icaldirset_get_first_component(store);
}
return icalfileset_get_current_component(impl->cluster);
@@ -592,8 +629,7 @@ icalcomponent* icaldirset_get_current_component(icaldirset* store)
}
-icalcomponent* icaldirset_get_first_component(icaldirset* store,
- icalcomponent_kind kind)
+icalcomponent* icaldirset_get_first_component(icaldirset* store)
{
struct icaldirset_impl *impl = (struct icaldirset_impl*)store;
icalerrorenum error;
@@ -638,11 +674,10 @@ icalcomponent* icaldirset_get_first_component(icaldirset* store,
impl->first_component = 1;
- return icaldirset_get_next_component(store, kind);
+ return icaldirset_get_next_component(store);
}
-icalcomponent* icaldirset_get_next_component(icaldirset* store,
- icalcomponent_kind kind)
+icalcomponent* icaldirset_get_next_component(icaldirset* store)
{
struct icaldirset_impl *impl;
icalcomponent *c;
@@ -662,10 +697,10 @@ icalcomponent* icaldirset_get_next_component(icaldirset* store,
/* Set the component iterator for the following for loop */
if (impl->first_component == 1){
- icalfileset_get_first_component(impl->cluster,kind);
+ icalfileset_get_first_component(impl->cluster);
impl->first_component = 0;
} else {
- icalfileset_get_next_component(impl->cluster,kind);
+ icalfileset_get_next_component(impl->cluster);
}
@@ -673,9 +708,7 @@ icalcomponent* icaldirset_get_next_component(icaldirset* store,
/* Iterate through all of the objects in the cluster*/
for( c = icalfileset_get_current_component(impl->cluster);
c != 0;
- c = icalfileset_get_next_component(
- impl->cluster,
- kind)){
+ c = icalfileset_get_next_component(impl->cluster)){
/* If there is a gauge defined and the component does not
pass the gauge, skip the rest of the loop */
@@ -698,9 +731,7 @@ icalcomponent* icaldirset_get_next_component(icaldirset* store,
/* No more clusters */
return 0;
} else {
- c = icalfileset_get_first_component(
- impl->cluster,
- kind);
+ c = icalfileset_get_first_component(impl->cluster);
return c;
}
diff --git a/libical/src/libicalss/icaldirset.h b/libical/src/libicalss/icaldirset.h
index e9d6240aeb..7d205ecf0a 100644
--- a/libical/src/libicalss/icaldirset.h
+++ b/libical/src/libicalss/icaldirset.h
@@ -30,7 +30,6 @@
#define ICALDIRSET_H
#include "ical.h"
-#include "icalerror.h"
/* icaldirset Routines for storing, fetching, and searching for ical
* objects in a database */
@@ -38,11 +37,11 @@
typedef void icaldirset;
-icaldirset* icaldirset_new(char* path);
+icaldirset* icaldirset_new(const char* path);
void icaldirset_free(icaldirset* store);
-char* icaldirset_path(icaldirset* store);
+const char* icaldirset_path(icaldirset* store);
/* Mark the cluster as changed, so it will be written to disk when it
is freed. Commit writes to disk immediately*/
@@ -61,22 +60,21 @@ icalerrorenum icaldirset_select(icaldirset* store, icalcomponent* gauge);
void icaldirset_clear(icaldirset* store);
/* Get a component by uid */
-icalcomponent* icaldirset_fetch(icaldirset* store, char* uid);
-int icaldirset_has_uid(icaldirset* store, char* uid);
+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);
/* Modify components according to the MODIFY method of CAP. Works on
the currently selected components. */
-icalerrorenum icaldirset_modify(icaldirset* store, icalcomponent *old,
- icalcomponent *new);
+icalerrorenum icaldirset_modify(icaldirset* store, icalcomponent *oldc,
+ icalcomponent *newc);
/* Iterate through the components. If a guage has been defined, these
will skip over components that do not pass the gauge */
icalcomponent* icaldirset_get_current_component(icaldirset* store);
-icalcomponent* icaldirset_get_first_component(icaldirset* store,
- icalcomponent_kind kind);
-icalcomponent* icaldirset_get_next_component(icaldirset* store,
- icalcomponent_kind kind);
+icalcomponent* icaldirset_get_first_component(icaldirset* store);
+icalcomponent* icaldirset_get_next_component(icaldirset* store);
#endif /* !ICALDIRSET_H */
diff --git a/libical/src/libicalss/icalfileset.c b/libical/src/libicalss/icalfileset.c
index 46c5cd2586..a7527ff3e0 100644
--- a/libical/src/libicalss/icalfileset.c
+++ b/libical/src/libicalss/icalfileset.c
@@ -30,7 +30,6 @@
#include "config.h"
#endif
-
#include "icalfileset.h"
#include <errno.h>
#include <limits.h> /* For PATH_MAX */
@@ -46,21 +45,22 @@
int icalfileset_lock(icalfileset *cluster);
int icalfileset_unlock(icalfileset *cluster);
-
-icalerrorenum icalfileset_create_cluster(char *path);
+icalerrorenum icalfileset_create_cluster(const char *path);
icalfileset* icalfileset_new_impl()
{
- struct icalfileset_impl* comp;
+ struct icalfileset_impl* impl;
- if ( ( comp = (struct icalfileset_impl*)
+ if ( ( impl = (struct icalfileset_impl*)
malloc(sizeof(struct icalfileset_impl))) == 0) {
icalerror_set_errno(ICAL_NEWFAILED_ERROR);
errno = ENOMEM;
return 0;
}
- return comp;
+ strcpy(impl->id,ICALFILESET_ID);
+
+ return impl;
}
char* read_from_file(char *s, size_t size, void *d)
@@ -69,7 +69,7 @@ char* read_from_file(char *s, size_t size, void *d)
return c;
}
-icalfileset* icalfileset_new(char* path)
+icalfileset* icalfileset_new(const char* path)
{
struct icalfileset_impl *impl = icalfileset_new_impl();
struct stat sbuf;
@@ -205,7 +205,7 @@ void icalfileset_free(icalfileset* cluster)
free(impl);
}
-char* icalfileset_path(icalfileset* cluster)
+const char* icalfileset_path(icalfileset* cluster)
{
struct icalfileset_impl *impl = (struct icalfileset_impl*)cluster;
icalerror_check_arg_rz((cluster!=0),"cluster");
@@ -250,7 +250,7 @@ int icalfileset_unlock(icalfileset *cluster)
}
-icalerrorenum icalfileset_create_cluster(char *path)
+icalerrorenum icalfileset_create_cluster(const char *path)
{
FILE* f;
@@ -387,11 +387,158 @@ int icalfileset_count_components(icalfileset *cluster,
return icalcomponent_count_components(impl->cluster,kind);
}
-icalerrorenum icalfileset_select(icalfileset* cluster, icalcomponent* gauge);
-void icalfileset_clear(icalfileset* cluster);
+icalerrorenum icalfileset_select(icalfileset* cluster, icalcomponent* gauge)
+{
+ assert(0); /* HACK, not implemented */
+ return ICAL_NO_ERROR;
+}
+
+void icalfileset_clear(icalfileset* cluster)
+{
+ assert(0); /* HACK, not implemented */
+}
+
+icalcomponent* icalfileset_fetch(icalfileset* store,const char* uid)
+{
+ icalcompiter i;
+ struct icalfileset_impl* impl = (struct icalfileset_impl*)store;
+
+ for(i = icalcomponent_begin_component(impl->cluster,ICAL_ANY_COMPONENT);
+ icalcompiter_deref(&i)!= 0; icalcompiter_next(&i)){
+
+ icalcomponent *this = icalcompiter_deref(&i);
+ icalcomponent *inner = icalcomponent_get_first_real_component(this);
+ icalcomponent *p;
+ const char *this_uid;
+
+ if(inner != 0){
+ p = icalcomponent_get_first_property(inner,ICAL_UID_PROPERTY);
+ this_uid = icalproperty_get_uid(p);
+
+ if(this_uid==0){
+ icalerror_warn("icalfileset_fetch found a component with no UID");
+ continue;
+ }
+
+ if (strcmp(uid,this_uid)==0){
+ return this;
+ }
+ }
+ }
+
+ return 0;
+}
+
+int icalfileset_has_uid(icalfileset* store,const char* uid)
+{
+ assert(0); /* HACK, not implemented */
+ return 0;
+}
+
+/******* support routines for icalfileset_fetch_match *********/
+
+struct icalfileset_id{
+ char* uid;
+ char* recurrence_id;
+ int sequence;
+};
+
+void icalfileset_id_free(struct icalfileset_id *id)
+{
+ if(id->recurrence_id != 0){
+ free(id->recurrence_id);
+ }
+
+ if(id->uid != 0){
+ free(id->uid);
+ }
+
+}
+
+struct icalfileset_id icalfileset_get_id(icalcomponent* comp)
+{
+
+ icalcomponent *inner;
+ struct icalfileset_id id;
+ icalproperty *p;
+
+ inner = icalcomponent_get_first_real_component(comp);
+
+ p = icalcomponent_get_first_property(inner, ICAL_UID_PROPERTY);
+
+ assert(p!= 0);
+
+ id.uid = strdup(icalproperty_get_uid(p));
+
+ p = icalcomponent_get_first_property(inner, ICAL_SEQUENCE_PROPERTY);
+
+ if(p == 0) {
+ id.sequence = 0;
+ } else {
+ id.sequence = icalproperty_get_sequence(p);
+ }
+
+ p = icalcomponent_get_first_property(inner, ICAL_RECURRENCEID_PROPERTY);
+
+ if (p == 0){
+ id.recurrence_id = 0;
+ } else {
+ icalvalue *v;
+ v = icalproperty_get_value(p);
+ id.recurrence_id = strdup(icalvalue_as_ical_string(v));
+
+ assert(id.recurrence_id != 0);
+ }
+
+ return id;
+}
+
+/* Find the component that is related to the given
+ component. Currently, it just matches based on UID and
+ RECURRENCE-ID */
+icalcomponent* icalfileset_fetch_match(icalfileset* set, icalcomponent *comp)
+{
+ struct icalfileset_impl* impl = (struct icalfileset_impl*)set;
+ icalcompiter i;
+
+ struct icalfileset_id comp_id, match_id;
+
+ comp_id = icalfileset_get_id(comp);
+
+ for(i = icalcomponent_begin_component(impl->cluster,ICAL_ANY_COMPONENT);
+ icalcompiter_deref(&i)!= 0; icalcompiter_next(&i)){
+
+ icalcomponent *match = icalcompiter_deref(&i);
+
+ match_id = icalfileset_get_id(match);
+
+ if(strcmp(comp_id.uid, match_id.uid) == 0 &&
+ ( comp_id.recurrence_id ==0 ||
+ strcmp(comp_id.recurrence_id, match_id.recurrence_id) ==0 )){
+
+ /* HACK. What to do with SEQUENCE? */
+
+ icalfileset_id_free(&match_id);
+ icalfileset_id_free(&comp_id);
+ return match;
+
+ }
+
+ icalfileset_id_free(&match_id);
+ }
+
+ icalfileset_id_free(&comp_id);
+ return 0;
+
+}
+
-icalcomponent* icalfileset_fetch(icalfileset* store, char* uid);
-int icalfileset_has_uid(icalfileset* store, char* uid);
+icalerrorenum icalfileset_modify(icalfileset* store, icalcomponent *old,
+ icalcomponent *new)
+{
+ assert(0); /* HACK, not implemented */
+ return ICAL_NO_ERROR;
+}
/* Iterate through components */
@@ -405,23 +552,21 @@ icalcomponent* icalfileset_get_current_component (icalfileset* cluster)
}
-icalcomponent* icalfileset_get_first_component(icalfileset* cluster,
- icalcomponent_kind kind)
+icalcomponent* icalfileset_get_first_component(icalfileset* cluster)
{
struct icalfileset_impl* impl = (struct icalfileset_impl*)cluster;
icalerror_check_arg_rz((cluster!=0),"cluster");
- return icalcomponent_get_first_component(impl->cluster,kind);
+ return icalcomponent_get_first_component(impl->cluster,ICAL_ANY_COMPONENT);
}
-icalcomponent* icalfileset_get_next_component(icalfileset* cluster,
- icalcomponent_kind kind)
+icalcomponent* icalfileset_get_next_component(icalfileset* cluster)
{
struct icalfileset_impl* impl = (struct icalfileset_impl*)cluster;
icalerror_check_arg_rz((cluster!=0),"cluster");
- return icalcomponent_get_next_component(impl->cluster,kind);
+ return icalcomponent_get_next_component(impl->cluster,ICAL_ANY_COMPONENT);
}
diff --git a/libical/src/libicalss/icalfileset.h b/libical/src/libicalss/icalfileset.h
index 8ceae632be..4430f1dc74 100644
--- a/libical/src/libicalss/icalfileset.h
+++ b/libical/src/libicalss/icalfileset.h
@@ -40,10 +40,10 @@ typedef void icalfileset;
*/
-icalfileset* icalfileset_new(char* path);
+icalfileset* icalfileset_new(const char* path);
void icalfileset_free(icalfileset* cluster);
-char* icalfileset_path(icalfileset* cluster);
+const char* icalfileset_path(icalfileset* cluster);
/* Mark the cluster as changed, so it will be written to disk when it
is freed. Commit writes to disk immediately. */
@@ -65,19 +65,22 @@ icalerrorenum icalfileset_select(icalfileset* store, icalcomponent* gauge);
void icalfileset_clear(icalfileset* store);
/* Get and search for a component by uid */
-icalcomponent* icalfileset_fetch(icalfileset* cluster, char* uid);
-int icalfileset_has_uid(icalfileset* cluster, char* uid);
+icalcomponent* icalfileset_fetch(icalfileset* cluster, const char* uid);
+int icalfileset_has_uid(icalfileset* cluster, const char* uid);
+icalcomponent* icalfileset_fetch_match(icalfileset* set, icalcomponent *c);
+/* Modify components according to the MODIFY method of CAP. Works on
+ the currently selected components. */
+icalerrorenum icalfileset_modify(icalfileset* store, icalcomponent *oldcomp,
+ icalcomponent *newcomp);
+
/* Iterate through components. If a guage has been defined, these
will skip over components that do not pass the gauge */
icalcomponent* icalfileset_get_current_component (icalfileset* cluster);
-icalcomponent* icalfileset_get_first_component(icalfileset* cluster,
- icalcomponent_kind kind);
-icalcomponent* icalfileset_get_next_component(icalfileset* cluster,
- icalcomponent_kind kind);
-
+icalcomponent* icalfileset_get_first_component(icalfileset* cluster);
+icalcomponent* icalfileset_get_next_component(icalfileset* cluster);
/* Return a reference to the internal component. You probably should
not be using this. */
diff --git a/libical/src/libicalss/icalfilesetimpl.h b/libical/src/libicalss/icalfilesetimpl.h
index de447c64eb..767dceeadd 100644
--- a/libical/src/libicalss/icalfilesetimpl.h
+++ b/libical/src/libicalss/icalfilesetimpl.h
@@ -33,7 +33,11 @@
/* This definition is in its own file so it can be kept out of the
main header file, but used by "friend classes" like icaldirset*/
+#define ICALFILESET_ID "fset"
+
struct icalfileset_impl {
+
+ char id[5]; /*fset*/
char *path;
icalcomponent* cluster;
int changed;
diff --git a/libical/src/libicalss/icalgauge.c b/libical/src/libicalss/icalgauge.c
index 60ce1587cd..0bbcd20bfc 100644
--- a/libical/src/libicalss/icalgauge.c
+++ b/libical/src/libicalss/icalgauge.c
@@ -27,6 +27,45 @@
======================================================================*/
#include "ical.h"
+#include "icalgauge.h"
+#include "icalgaugeimpl.h"
+#include <stdlib.h>
+
+
+extern char* input_buffer;
+extern char* input_buffer_p;
+int ssparse(void);
+
+struct icalgauge_impl *icalss_yy_gauge;
+
+icalgauge* icalgauge_new_from_sql(char* sql)
+{
+ struct icalgauge_impl *impl;
+
+ int r;
+
+ if ( ( impl = (struct icalgauge_impl*)
+ malloc(sizeof(struct icalgauge_impl))) == 0) {
+ icalerror_set_errno(ICAL_NEWFAILED_ERROR);
+ return 0;
+ }
+
+ impl->select = icalcomponent_new(ICAL_XROOT_COMPONENT);
+ impl->from = icalcomponent_new(ICAL_XROOT_COMPONENT);
+ impl->where = icalcomponent_new(ICAL_XROOT_COMPONENT);
+
+ icalss_yy_gauge = impl;
+
+ input_buffer_p = input_buffer = sql;
+ r = ssparse();
+
+ return impl;
+}
+
+
+void icalgauge_free(icalgauge* gauge)
+{
+}
/* Convert a VQUERY component into a gauge */
icalcomponent* icalgauge_make_gauge(icalcomponent* query);
@@ -44,22 +83,18 @@ icalcomponent* icalgauge_make_gauge(icalcomponent* query);
When a gauge has several sub-components, the results of testing the
target against each of them is ORed together - the target
component will pass if it matches any of the sub-components in the
- gauge. However, the results of matching the proeprties in a
+ gauge. However, the results of matching the properties in a
sub-component are ANDed -- the target must match every property in
a gauge sub-component to match the sub-component.
Here is an example:
BEGIN:XROOT
- BEGIN:VCOMPONENT
- BEGIN:VEVENT
DTSTART;X-LIC-COMPARETYPE=LESS:19981025T020000
ORGANIZER;X-LIC-COMPARETYPE=EQUAL:mrbig@host.com
- END:VEVENT
- BEGIN:VEVENT
+ END:XROOT
+ BEGIN:XROOT
LOCATION;X-LIC-COMPARETYPE=EQUAL:McNary's Pub
- END:VEVENT
- END:VCALENDAR
END:XROOT
This gauge has two sub-components; one which will match a VEVENT
@@ -194,9 +229,11 @@ int icalgauge_test(icalcomponent* comp,
icalerror_check_arg_rz( (comp!=0), "comp");
icalerror_check_arg_rz( (gauge!=0), "gauge");
- for(gauge = icalcomponent_get_first_component(gaugecontainer,ICAL_ANY_COMPONENT);
+ for(gauge = icalcomponent_get_first_component(gaugecontainer,
+ ICAL_ANY_COMPONENT);
gauge != 0;
- gauge = icalcomponent_get_next_component(gaugecontainer,ICAL_ANY_COMPONENT)){
+ gauge = icalcomponent_get_next_component(gaugecontainer,
+ ICAL_ANY_COMPONENT)){
pass += icalgauge_test_recurse(comp, gauge);
}
diff --git a/libical/src/libicalss/icalgauge.h b/libical/src/libicalss/icalgauge.h
index 401d9b7347..2fbb3aab8c 100644
--- a/libical/src/libicalss/icalgauge.h
+++ b/libical/src/libicalss/icalgauge.h
@@ -29,8 +29,14 @@
#ifndef ICALGAUGE_H
#define ICALGAUGE_H
-icalcomponent* icalgauge_new_from_vquery(char* vquery);
-char* icalgauge_as_vquery(icalcomponent* gauge);
+typedef void icalgauge;
+
+icalgauge* icalgauge_new_from_sql(char* sql);
+
+void icalgauge_free(icalgauge* gauge);
+
+char* icalgauge_as_sql(icalcomponent* gauge);
+
int icalgauge_test(icalcomponent* comp, icalcomponent* gaugecontainer);
diff --git a/libical/src/libicalss/icalset.c b/libical/src/libicalss/icalset.c
index 01a36c0129..2ffe0deff2 100644
--- a/libical/src/libicalss/icalset.c
+++ b/libical/src/libicalss/icalset.c
@@ -5,9 +5,9 @@
Icalset is the "base class" for representations of a collection of
- iCal components. Derived classes (actually delegatees) include:
+ iCal components. Derived classes (actually delegates) include:
- icalfileset Store componetns in a single file
+ icalfileset Store components in a single file
icaldirset Store components in multiple files in a directory
icalheapset Store components on the heap
icalmysqlset Store components in a mysql database.
@@ -37,49 +37,330 @@
#include "ical.h"
#include "icalset.h"
#include "icalfileset.h"
+#include "icalfilesetimpl.h"
#include "icaldirset.h"
+#include "icaldirsetimpl.h"
+#include <stdlib.h>
/*#include "icalheapset.h"*/
/*#include "icalmysqlset.h"*/
-icalset* icalset_new_file(char* path);
+#define ICALSET_ID "set "
-icalset* icalset_new_dir(char* path);
-
-icalset* icalset_new_heap(void);
-
-icalset* icalset_new_mysql(char* path);
-
-void icalset_free(icalset* set);
+struct icalset_fp {
+ void (*free)(icalset* set);
+ const char* (*path)(icalset* set);
+ void (*mark)(icalset* set);
+ icalerrorenum (*commit)(icalset* set);
+ icalerrorenum (*add_component)(icalset* set, icalcomponent* comp);
+ icalerrorenum (*remove_component)(icalset* set, icalcomponent* comp);
+ int (*count_components)(icalset* set,
+ icalcomponent_kind kind);
+ icalerrorenum (*select)(icalset* set, icalcomponent* gauge);
+ void (*clear)(icalset* set);
+ icalcomponent* (*fetch)(icalset* set, const char* uid);
+ icalcomponent* (*fetch_match)(icalset* set, icalcomponent *comp);
+ int (*has_uid)(icalset* set, const char* uid);
+ icalerrorenum (*modify)(icalset* set, icalcomponent *old,
+ icalcomponent *new);
+ icalcomponent* (*get_current_component)(icalset* set);
+ icalcomponent* (*get_first_component)(icalset* set);
+ icalcomponent* (*get_next_component)(icalset* set);
+};
+
+struct icalset_fp icalset_dirset_fp = {
+ icaldirset_free,
+ icaldirset_path,
+ icaldirset_mark,
+ icaldirset_commit,
+ icaldirset_add_component,
+ icaldirset_remove_component,
+ icaldirset_count_components,
+ icaldirset_select,
+ icaldirset_clear,
+ icaldirset_fetch,
+ icaldirset_fetch_match,
+ icaldirset_has_uid,
+ icaldirset_modify,
+ icaldirset_get_current_component,
+ icaldirset_get_first_component,
+ icaldirset_get_next_component
+};
+
+
+struct icalset_fp icalset_fileset_fp = {
+ icalfileset_free,
+ icalfileset_path,
+ icalfileset_mark,
+ icalfileset_commit,
+ icalfileset_add_component,
+ icalfileset_remove_component,
+ icalfileset_count_components,
+ icalfileset_select,
+ icalfileset_clear,
+ icalfileset_fetch,
+ icalfileset_fetch_match,
+ icalfileset_has_uid,
+ icalfileset_modify,
+ icalfileset_get_current_component,
+ icalfileset_get_first_component,
+ icalfileset_get_next_component
+};
+
+struct icalset_impl {
+
+ char id[5]; /* "set " */
+
+ void *derived_impl;
+ struct icalset_fp *fp;
+};
+
+/* Figure out what was actually passed in as the set. This could be a
+ set or and of the derived types such as dirset or fileset. Note
+ this routine returns a value, not a reference, to avoid memory
+ leaks in the methods */
+struct icalset_impl icalset_get_impl(icalset* set)
+{
+ struct icalset_impl impl;
+
+ memset(&impl,0,sizeof(impl));
+ icalerror_check_arg_rv( (set!=0),"set");
+
+ if(strcmp((char*)set,ICALSET_ID)==0) {
+ /* It is actually a set, so just sent the reference back out. */
+ return *(struct icalset_impl*)set;
+ } else if(strcmp((char*)set,ICALFILESET_ID)==0) {
+ /* Make a new set from the fileset */
+ impl.fp = &icalset_fileset_fp;
+ impl.derived_impl = set;
+ strcpy(impl.id,ICALFILESET_ID);/* HACK. Is this necessary? */
+ return impl;
+ } else if(strcmp((char*)set,ICALDIRSET_ID)==0) {
+ /* Make a new set from the dirset */
+ impl.fp = &icalset_dirset_fp;
+ impl.derived_impl = set;
+ strcpy(impl.id,ICALDIRSET_ID);/* HACK. Is this necessary? */
+ return impl;
+ } else {
+ /* The type of set is unknown, so throw an error */
+ icalerror_assert((0),"Unknown set type");
+ return impl;
+ }
+}
+
+
+struct icalset_impl* icalset_new_impl()
+{
+
+ struct icalset_impl* impl;
+
+ if ( ( impl = (struct icalset_impl*)
+ malloc(sizeof(struct icalset_impl))) == 0) {
+ icalerror_set_errno(ICAL_NEWFAILED_ERROR);
+ return 0;
+ }
+
+ strcpy(impl->id,ICALSET_ID);
+
+ impl->derived_impl = 0;
+ impl->fp = 0;
+
+ return impl;
+}
+
+struct icalset_impl* icalset_new_file_from_ref(icalfileset *fset)
+{
+ struct icalset_impl *impl = icalset_new_impl();
+
+ icalerror_check_arg_rz( (fset!=0),"fset");
+
+ if(impl == 0){
+ free(impl);
+ return 0;
+ }
+
+ impl->derived_impl = fset;
+
+ if (impl->derived_impl == 0){
+ free(impl);
+ return 0;
+ }
+
+ impl->fp = &icalset_fileset_fp;
+
+ return (struct icalset_impl*)impl;
+}
+
+icalset* icalset_new_file(const char* path)
+{
+ icalfileset *fset = icalfileset_new(path);
+
+ if(fset == 0){
+ return 0;
+ }
+
+ return (icalset*)icalset_new_file_from_ref(fset);
+}
+
+icalset* icalset_new_dir_from_ref(icaldirset *dset)
+{
+
+ struct icalset_impl *impl = icalset_new_impl();
+
+ icalerror_check_arg_rz( (dset!=0),"dset");
+
+ if(impl == 0){
+ return 0;
+ }
+
+ impl->derived_impl = dset;
+
+ if (impl->derived_impl == 0){
+ free(impl);
+ return 0;
+ }
+
+ impl->fp = &icalset_dirset_fp;
+
+ return impl;
+}
+
+icalset* icalset_new_dir(const char* path)
+{
+ icaldirset *dset = icaldirset_new(path);
+
+ if(dset == 0){
+ return 0;
+ }
+
+ return icalset_new_dir_from_ref(dset);
+}
+
+icalset* icalset_new_heap(void)
+{
+ struct icalset_impl *impl = icalset_new_impl();
-char* icalset_path(icalset* set);
-void icalset_mark(icalset* set);
+ if(impl == 0){
+ free(impl);
+ return 0;
+ }
-icalerrorenum icalset_commit(icalset* set);
+ return 0;
+}
-icalerrorenum icalset_add_component(icalset* set, icalcomponent* comp);
+icalset* icalset_new_mysql(const char* path)
+{
+ struct icalset_impl *impl = icalset_new_impl();
-icalerrorenum icalset_remove_component(icalset* set, icalcomponent* comp);
+ if(impl == 0){
+ free(impl);
+ return 0;
+ }
-int icalset_count_components(icalset* set,
- icalcomponent_kind kind);
+ return 0;
+}
-icalerrorenum icalset_select(icalset* set, icalcomponent* gauge);
+void icalset_free(icalset* set)
+{
+ struct icalset_impl impl = icalset_get_impl(set);
+ return (*(impl.fp->free))(impl.derived_impl);
-void icalset_clear_select(icalset* set);
+ if(strcmp((char*)set,ICALSET_ID)) {
+ free(set);
+ }
+}
-icalcomponent* icalset_fetch(icalset* set, char* uid);
+const char* icalset_path(icalset* set)
+{
+ struct icalset_impl impl = icalset_get_impl(set);
+ return (*(impl.fp->path))(impl.derived_impl);
+}
-int icalset_has_uid(icalset* set, char* uid);
+void icalset_mark(icalset* set)
+{
+ struct icalset_impl impl = icalset_get_impl(set);
+ return (*(impl.fp->mark))(impl.derived_impl);
+}
+
+icalerrorenum icalset_commit(icalset* set)
+{
+ struct icalset_impl impl = icalset_get_impl(set);
+ return (*(impl.fp->commit))(impl.derived_impl);
+}
+
+icalerrorenum icalset_add_component(icalset* set, icalcomponent* comp)
+{
+ struct icalset_impl impl = icalset_get_impl(set);
+ return (*(impl.fp->add_component))(impl.derived_impl,comp);
+}
+
+icalerrorenum icalset_remove_component(icalset* set, icalcomponent* comp)
+{
+ struct icalset_impl impl = icalset_get_impl(set);
+ return (*(impl.fp->remove_component))(impl.derived_impl,comp);
+}
+
+int icalset_count_components(icalset* set,icalcomponent_kind kind)
+{
+ struct icalset_impl impl = icalset_get_impl(set);
+ return (*(impl.fp->count_components))(impl.derived_impl,kind);
+}
+
+icalerrorenum icalset_select(icalset* set, icalcomponent* gauge)
+{
+ struct icalset_impl impl = icalset_get_impl(set);
+ return (*(impl.fp->select))(impl.derived_impl,gauge);
+}
+
+void icalset_clear(icalset* set)
+{
+ struct icalset_impl impl = icalset_get_impl(set);
+ return (*(impl.fp->clear))(impl.derived_impl);
+}
+
+icalcomponent* icalset_fetch(icalset* set, const char* uid)
+{
+ struct icalset_impl impl = icalset_get_impl(set);
+ return (*(impl.fp->fetch))(impl.derived_impl,uid);
+}
+
+icalcomponent* icalset_fetch_match(icalset* set, icalcomponent *comp)
+{
+ struct icalset_impl impl = icalset_get_impl(set);
+ return (*(impl.fp->fetch_match))(impl.derived_impl,comp);
+}
+
+
+int icalset_has_uid(icalset* set, const char* uid)
+{
+ struct icalset_impl impl = icalset_get_impl(set);
+ return (*(impl.fp->has_uid))(impl.derived_impl,uid);
+}
icalerrorenum icalset_modify(icalset* set, icalcomponent *old,
- icalcomponent *new);
-
-icalcomponent* icalset_get_current_component(icalset* set);
-
-icalcomponent* icalset_get_first_component(icalset* set);
-
-icalcomponent* icalset_get_next_component(icalset* set);
+ icalcomponent *new)
+{
+ struct icalset_impl impl = icalset_get_impl(set);
+ return (*(impl.fp->modify))(impl.derived_impl,old,new);
+}
+
+icalcomponent* icalset_get_current_component(icalset* set)
+{
+ struct icalset_impl impl = icalset_get_impl(set);
+ return (*(impl.fp->get_current_component))(impl.derived_impl);
+}
+
+icalcomponent* icalset_get_first_component(icalset* set)
+{
+ struct icalset_impl impl = icalset_get_impl(set);
+ return (*(impl.fp->get_first_component))(impl.derived_impl);
+}
+
+icalcomponent* icalset_get_next_component(icalset* set)
+{
+ struct icalset_impl impl = icalset_get_impl(set);
+ return (*(impl.fp->get_next_component))(impl.derived_impl);
+}
diff --git a/libical/src/libicalss/icalset.h b/libical/src/libicalss/icalset.h
index 15bb71f72e..d4678e3bed 100644
--- a/libical/src/libicalss/icalset.h
+++ b/libical/src/libicalss/icalset.h
@@ -52,15 +52,15 @@ typedef enum icalset_kind {
/* Create a specific derived type of set */
-icalset* icalset_new_file(char* path);
-icalset* icalset_new_dir(char* path);
+icalset* icalset_new_file(const char* path);
+icalset* icalset_new_dir(const char* path);
icalset* icalset_new_heap(void);
-icalset* icalset_new_mysql(char* path);
+icalset* icalset_new_mysql(const char* path);
/*icalset* icalset_new_cap(icalcstp* cstp);*/
void icalset_free(icalset* set);
-char* icalset_path(icalset* set);
+const char* icalset_path(icalset* set);
/* Mark the cluster as changed, so it will be written to disk when it
is freed. Commit writes to disk immediately*/
@@ -79,13 +79,14 @@ icalerrorenum icalset_select(icalset* set, icalcomponent* gauge);
void icalset_clear_select(icalset* set);
/* Get a component by uid */
-icalcomponent* icalset_fetch(icalset* set, char* uid);
-int icalset_has_uid(icalset* set, char* uid);
+icalcomponent* icalset_fetch(icalset* set, const char* uid);
+int icalset_has_uid(icalset* set, const char* uid);
+icalcomponent* icalset_fetch_match(icalset* set, icalcomponent *c);
/* Modify components according to the MODIFY method of CAP. Works on
the currently selected components. */
-icalerrorenum icalset_modify(icalset* set, icalcomponent *old,
- icalcomponent *new);
+icalerrorenum icalset_modify(icalset* set, icalcomponent *oldc,
+ icalcomponent *newc);
/* Iterate through the components. If a guage has been defined, these
will skip over components that do not pass the gauge */
diff --git a/libical/src/libicalvcal/Makefile.am b/libical/src/libicalvcal/Makefile.am
index 5e773c5d69..a4e9bba887 100644
--- a/libical/src/libicalvcal/Makefile.am
+++ b/libical/src/libicalvcal/Makefile.am
@@ -1,17 +1,29 @@
+lib_LTLIBRARIES = libicalvcal.la
-lib_LIBRARIES = libicalvcal.a
+INCLUDES = \
+ -I$(top_builddir) \
+ -I$(top_srcdir)/src/libical \
+ -I$(top_srcdir)/src/libicalss \
+ -I$(srcdir)
-libicalvcal_a_SOURCES = \
- vcc.y \
- vcc.h \
- vobject.c \
- vobject.h \
- port.h \
- vcaltmp.c \
- vcaltmp.h \
- icalvcal.c \
- icalvcal.h
+libicalvcal_la_LDFLAGS = -version-info 0:0:0
-EXTRA_DIST = README.TXT vcaltest.c vctest.c
+libicalvcal_la_SOURCES = \
+ icalvcal.c \
+ vcc.y \
+ vobject.c \
+ vcaltmp.c
-INCLUDES = -I../libical/ \ No newline at end of file
+libicalvcalincludedir = $(includedir)/libicalvcal
+
+libicalvcalinclude_HEADERS = \
+ icalvcal.h \
+ port.h \
+ vcc.h \
+ vobject.h \
+ vcaltmp.h
+
+EXTRA_DIST = \
+ README.TXT \
+ vcaltest.c \
+ vctest.c
diff --git a/libical/src/libicalvcal/Makefile.in b/libical/src/libicalvcal/Makefile.in
index e0cb416de6..8b4a12d34c 100644
--- a/libical/src/libicalvcal/Makefile.in
+++ b/libical/src/libicalvcal/Makefile.in
@@ -57,40 +57,59 @@ POST_INSTALL = :
NORMAL_UNINSTALL = :
PRE_UNINSTALL = :
POST_UNINSTALL = :
+host_alias = @host_alias@
+host_triplet = @host@
AR = @AR@
+AS = @AS@
CC = @CC@
+DLLTOOL = @DLLTOOL@
LEX = @LEX@
+LIBTOOL = @LIBTOOL@
LN_S = @LN_S@
+MAINT = @MAINT@
MAKEINFO = @MAKEINFO@
+OBJDUMP = @OBJDUMP@
PACKAGE = @PACKAGE@
RANLIB = @RANLIB@
VERSION = @VERSION@
YACC = @YACC@
-lib_LIBRARIES = libicalvcal.a
+lib_LTLIBRARIES = libicalvcal.la
-libicalvcal_a_SOURCES = vcc.y vcc.h vobject.c vobject.h port.h vcaltmp.c vcaltmp.h icalvcal.c icalvcal.h
+INCLUDES = -I$(top_builddir) -I$(top_srcdir)/src/libical -I$(top_srcdir)/src/libicalss -I$(srcdir)
-EXTRA_DIST = README.TXT vcaltest.c vctest.c
+libicalvcal_la_LDFLAGS = -version-info 0:0:0
+
+libicalvcal_la_SOURCES = icalvcal.c vcc.y vobject.c vcaltmp.c
+
+
+libicalvcalincludedir = $(includedir)/libicalvcal
+
+libicalvcalinclude_HEADERS = icalvcal.h port.h vcc.h vobject.h vcaltmp.h
+
+
+EXTRA_DIST = README.TXT vcaltest.c vctest.c
-INCLUDES = -I../libical/
mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
CONFIG_HEADER = ../../config.h
CONFIG_CLEAN_FILES =
-LIBRARIES = $(lib_LIBRARIES)
+LTLIBRARIES = $(lib_LTLIBRARIES)
DEFS = @DEFS@ -I. -I$(srcdir) -I../..
CPPFLAGS = @CPPFLAGS@
LDFLAGS = @LDFLAGS@
LIBS = @LIBS@
-libicalvcal_a_LIBADD =
-libicalvcal_a_OBJECTS = vcc.o vobject.o vcaltmp.o icalvcal.o
+libicalvcal_la_LIBADD =
+libicalvcal_la_OBJECTS = icalvcal.lo vcc.lo vobject.lo vcaltmp.lo
CFLAGS = @CFLAGS@
COMPILE = $(CC) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
+LTCOMPILE = $(LIBTOOL) --mode=compile $(CC) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
CCLD = $(CC)
-LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(LDFLAGS) -o $@
+LINK = $(LIBTOOL) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(LDFLAGS) -o $@
+HEADERS = $(libicalvcalinclude_HEADERS)
+
DIST_COMMON = Makefile.am Makefile.in vcc.c
@@ -98,13 +117,13 @@ DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST)
TAR = gtar
GZIP_ENV = --best
-SOURCES = $(libicalvcal_a_SOURCES)
-OBJECTS = $(libicalvcal_a_OBJECTS)
+SOURCES = $(libicalvcal_la_SOURCES)
+OBJECTS = $(libicalvcal_la_OBJECTS)
all: all-redirect
.SUFFIXES:
-.SUFFIXES: .S .c .o .s .y
-$(srcdir)/Makefile.in: Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4)
+.SUFFIXES: .S .c .lo .o .s .y
+$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4)
cd $(top_srcdir) && $(AUTOMAKE) --gnu --include-deps src/libicalvcal/Makefile
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
@@ -112,36 +131,29 @@ Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
&& CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status
-mostlyclean-libLIBRARIES:
+mostlyclean-libLTLIBRARIES:
-clean-libLIBRARIES:
- -test -z "$(lib_LIBRARIES)" || rm -f $(lib_LIBRARIES)
+clean-libLTLIBRARIES:
+ -test -z "$(lib_LTLIBRARIES)" || rm -f $(lib_LTLIBRARIES)
-distclean-libLIBRARIES:
+distclean-libLTLIBRARIES:
-maintainer-clean-libLIBRARIES:
+maintainer-clean-libLTLIBRARIES:
-install-libLIBRARIES: $(lib_LIBRARIES)
+install-libLTLIBRARIES: $(lib_LTLIBRARIES)
@$(NORMAL_INSTALL)
$(mkinstalldirs) $(DESTDIR)$(libdir)
- @list='$(lib_LIBRARIES)'; for p in $$list; do \
- if test -f $$p; then \
- echo " $(INSTALL_DATA) $$p $(DESTDIR)$(libdir)/$$p"; \
- $(INSTALL_DATA) $$p $(DESTDIR)$(libdir)/$$p; \
- else :; fi; \
- done
- @$(POST_INSTALL)
- @list='$(lib_LIBRARIES)'; for p in $$list; do \
+ @list='$(lib_LTLIBRARIES)'; for p in $$list; do \
if test -f $$p; then \
- echo " $(RANLIB) $(DESTDIR)$(libdir)/$$p"; \
- $(RANLIB) $(DESTDIR)$(libdir)/$$p; \
+ echo "$(LIBTOOL) --mode=install $(INSTALL) $$p $(DESTDIR)$(libdir)/$$p"; \
+ $(LIBTOOL) --mode=install $(INSTALL) $$p $(DESTDIR)$(libdir)/$$p; \
else :; fi; \
done
-uninstall-libLIBRARIES:
+uninstall-libLTLIBRARIES:
@$(NORMAL_UNINSTALL)
- list='$(lib_LIBRARIES)'; for p in $$list; do \
- rm -f $(DESTDIR)$(libdir)/$$p; \
+ list='$(lib_LTLIBRARIES)'; for p in $$list; do \
+ $(LIBTOOL) --mode=uninstall rm -f $(DESTDIR)$(libdir)/$$p; \
done
.c.o:
@@ -163,10 +175,27 @@ distclean-compile:
maintainer-clean-compile:
-libicalvcal.a: $(libicalvcal_a_OBJECTS) $(libicalvcal_a_DEPENDENCIES)
- -rm -f libicalvcal.a
- $(AR) cru libicalvcal.a $(libicalvcal_a_OBJECTS) $(libicalvcal_a_LIBADD)
- $(RANLIB) libicalvcal.a
+.c.lo:
+ $(LIBTOOL) --mode=compile $(COMPILE) -c $<
+
+.s.lo:
+ $(LIBTOOL) --mode=compile $(COMPILE) -c $<
+
+.S.lo:
+ $(LIBTOOL) --mode=compile $(COMPILE) -c $<
+
+mostlyclean-libtool:
+ -rm -f *.lo
+
+clean-libtool:
+ -rm -rf .libs _libs
+
+distclean-libtool:
+
+maintainer-clean-libtool:
+
+libicalvcal.la: $(libicalvcal_la_OBJECTS) $(libicalvcal_la_DEPENDENCIES)
+ $(LINK) -rpath $(libdir) $(libicalvcal_la_LDFLAGS) $(libicalvcal_la_OBJECTS) $(libicalvcal_la_LIBADD) $(LIBS)
.y.c:
$(YACC) $(AM_YFLAGS) $(YFLAGS) $< && mv y.tab.c $*.c
if test -f y.tab.h; then \
@@ -175,6 +204,21 @@ libicalvcal.a: $(libicalvcal_a_OBJECTS) $(libicalvcal_a_DEPENDENCIES)
vcc.h: vcc.c
+install-libicalvcalincludeHEADERS: $(libicalvcalinclude_HEADERS)
+ @$(NORMAL_INSTALL)
+ $(mkinstalldirs) $(DESTDIR)$(libicalvcalincludedir)
+ @list='$(libicalvcalinclude_HEADERS)'; for p in $$list; do \
+ if test -f "$$p"; then d= ; else d="$(srcdir)/"; fi; \
+ echo " $(INSTALL_DATA) $$d$$p $(DESTDIR)$(libicalvcalincludedir)/$$p"; \
+ $(INSTALL_DATA) $$d$$p $(DESTDIR)$(libicalvcalincludedir)/$$p; \
+ done
+
+uninstall-libicalvcalincludeHEADERS:
+ @$(NORMAL_UNINSTALL)
+ list='$(libicalvcalinclude_HEADERS)'; for p in $$list; do \
+ rm -f $(DESTDIR)$(libicalvcalincludedir)/$$p; \
+ done
+
tags: TAGS
ID: $(HEADERS) $(SOURCES) $(LISP)
@@ -219,18 +263,6 @@ distdir: $(DISTFILES)
|| cp -p $$d/$$file $(distdir)/$$file || :; \
fi; \
done
-icalvcal.o: icalvcal.c icalvcal.h ../libical/ical.h \
- ../libical/icalversion.h ../libical/icalenums.h \
- ../libical/icalvalue.h ../libical/icaltypes.h \
- ../libical/icaltime.h ../libical/icalparameter.h \
- ../libical/icalproperty.h ../libical/icalcomponent.h \
- ../libical/pvl.h ../libical/icalparser.h \
- ../libical/icalmemory.h ../libical/icalerror.h \
- ../libical/icalrestriction.h ../libical/icalrecur.h vcc.h \
- vobject.h port.h
-vcaltmp.o: vcaltmp.c vcaltmp.h vcc.h vobject.h port.h
-vcc.o: vcc.c vcc.h vobject.h port.h
-vobject.o: vobject.c vobject.h port.h
info-am:
info: info-am
@@ -240,23 +272,25 @@ check-am: all-am
check: check-am
installcheck-am:
installcheck: installcheck-am
-install-exec-am: install-libLIBRARIES
+install-exec-am: install-libLTLIBRARIES
install-exec: install-exec-am
-install-data-am:
+install-data-am: install-libicalvcalincludeHEADERS
install-data: install-data-am
install-am: all-am
@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
install: install-am
-uninstall-am: uninstall-libLIBRARIES
+uninstall-am: uninstall-libLTLIBRARIES \
+ uninstall-libicalvcalincludeHEADERS
uninstall: uninstall-am
-all-am: Makefile $(LIBRARIES)
+all-am: Makefile $(LTLIBRARIES) $(HEADERS)
all-redirect: all-am
install-strip:
$(MAKE) $(AM_MAKEFLAGS) AM_INSTALL_PROGRAM_FLAGS=-s install
installdirs:
- $(mkinstalldirs) $(DESTDIR)$(libdir)
+ $(mkinstalldirs) $(DESTDIR)$(libdir) \
+ $(DESTDIR)$(libicalvcalincludedir)
mostlyclean-generic:
@@ -269,39 +303,46 @@ distclean-generic:
maintainer-clean-generic:
-test -z "vcchvccc" || rm -f vcch vccc
-mostlyclean-am: mostlyclean-libLIBRARIES mostlyclean-compile \
- mostlyclean-tags mostlyclean-generic
+mostlyclean-am: mostlyclean-libLTLIBRARIES mostlyclean-compile \
+ mostlyclean-libtool mostlyclean-tags \
+ mostlyclean-generic
mostlyclean: mostlyclean-am
-clean-am: clean-libLIBRARIES clean-compile clean-tags clean-generic \
- mostlyclean-am
+clean-am: clean-libLTLIBRARIES clean-compile clean-libtool clean-tags \
+ clean-generic mostlyclean-am
clean: clean-am
-distclean-am: distclean-libLIBRARIES distclean-compile distclean-tags \
- distclean-generic clean-am
+distclean-am: distclean-libLTLIBRARIES distclean-compile \
+ distclean-libtool distclean-tags distclean-generic \
+ clean-am
+ -rm -f libtool
distclean: distclean-am
-maintainer-clean-am: maintainer-clean-libLIBRARIES \
- maintainer-clean-compile maintainer-clean-tags \
- maintainer-clean-generic distclean-am
+maintainer-clean-am: maintainer-clean-libLTLIBRARIES \
+ maintainer-clean-compile maintainer-clean-libtool \
+ maintainer-clean-tags maintainer-clean-generic \
+ distclean-am
@echo "This command is intended for maintainers to use;"
@echo "it deletes files that may require special tools to rebuild."
maintainer-clean: maintainer-clean-am
-.PHONY: mostlyclean-libLIBRARIES distclean-libLIBRARIES \
-clean-libLIBRARIES maintainer-clean-libLIBRARIES uninstall-libLIBRARIES \
-install-libLIBRARIES mostlyclean-compile distclean-compile \
-clean-compile maintainer-clean-compile tags mostlyclean-tags \
-distclean-tags clean-tags maintainer-clean-tags distdir info-am info \
-dvi-am dvi check check-am installcheck-am installcheck install-exec-am \
-install-exec install-data-am install-data install-am install \
-uninstall-am uninstall all-redirect all-am all installdirs \
-mostlyclean-generic distclean-generic clean-generic \
-maintainer-clean-generic clean mostlyclean distclean maintainer-clean
+.PHONY: mostlyclean-libLTLIBRARIES distclean-libLTLIBRARIES \
+clean-libLTLIBRARIES maintainer-clean-libLTLIBRARIES \
+uninstall-libLTLIBRARIES install-libLTLIBRARIES mostlyclean-compile \
+distclean-compile clean-compile maintainer-clean-compile \
+mostlyclean-libtool distclean-libtool clean-libtool \
+maintainer-clean-libtool uninstall-libicalvcalincludeHEADERS \
+install-libicalvcalincludeHEADERS tags mostlyclean-tags distclean-tags \
+clean-tags maintainer-clean-tags distdir info-am info dvi-am dvi check \
+check-am installcheck-am installcheck install-exec-am install-exec \
+install-data-am install-data install-am install uninstall-am uninstall \
+all-redirect all-am all installdirs mostlyclean-generic \
+distclean-generic clean-generic maintainer-clean-generic clean \
+mostlyclean distclean maintainer-clean
# Tell versions [3.59,3.63) of GNU make to not export all variables.
diff --git a/libical/src/libicalvcal/icalvcal.c b/libical/src/libicalvcal/icalvcal.c
index d21dd4acc6..9ae00a7d90 100644
--- a/libical/src/libicalvcal/icalvcal.c
+++ b/libical/src/libicalvcal/icalvcal.c
@@ -20,6 +20,23 @@
The original code is icalvcal.c
+
+
+ The icalvcal_convert routine calls icalvcal_traverse_objects to do
+ its work.s his routine steps through through all of the properties
+ and components of a VObject. For each name of a property or a
+ component, icalvcal_traverse_objects looks up the name in
+ conversion_table[]. This table indicates wether the name is of a
+ component or a property, lists a routine to handle conversion, and
+ has extra data for the conversion.
+
+ The conversion routine will create new iCal components or properties
+ and add them to the iCal component structure.
+
+ The most common conversion routine is dc_prop. This routine converts
+ properties for which the text representation of the vCal component
+ is identical the iCal representation.
+
======================================================================*/
#include "icalvcal.h"
@@ -43,7 +60,7 @@ struct conversion_table_struct {
struct conversion_table_struct conversion_table[];
void* dc_prop(int icaltype, VObject *object);
-static void traverse_objects(VObject *object,icalcomponent* last_comp,
+static void icalvcal_traverse_objects(VObject *object,icalcomponent* last_comp,
icalproperty* last_prop)
{
VObjectIterator iterator;
@@ -66,6 +83,8 @@ static void traverse_objects(VObject *object,icalcomponent* last_comp,
}
}
+ /* Did not find the object. It may be an X-property, or an unknown
+ property */
if (conversion_table[i].vcalname == 0){
/* Handle X properties */
@@ -158,10 +177,10 @@ static void traverse_objects(VObject *object,icalcomponent* last_comp,
should use it as the 'last_comp' */
if(subc!=0){
- traverse_objects(eachProp,subc,last_prop);
+ icalvcal_traverse_objects(eachProp,subc,last_prop);
} else {
- traverse_objects(eachProp,last_comp,last_prop);
+ icalvcal_traverse_objects(eachProp,last_comp,last_prop);
}
}
}
@@ -180,7 +199,7 @@ icalcomponent* icalvcal_convert(VObject *object){
}
- traverse_objects(object,container,0);
+ icalvcal_traverse_objects(object,container,0);
/* HACK. I am using the extra 'container' component because I am
lazy. I know there is a way to get rid of it, but I did not care
diff --git a/libical/src/libicalvcal/vcc.c b/libical/src/libicalvcal/vcc.c
index 313e5d6d80..5c34395b83 100644
--- a/libical/src/libicalvcal/vcc.c
+++ b/libical/src/libicalvcal/vcc.c
@@ -1,7 +1,6 @@
/* A Bison parser, made from vcc.y
- by GNU Bison version 1.27
- */
+ by GNU Bison version 1.28 */
#define YYBISON 1 /* Identify Bison output. */
@@ -166,7 +165,7 @@ extern "C" {
#endif
extern void Parse_Debug(const char *s);
- extern void yyerror(char *s);
+ static void yyerror(char *s);
#if __CPLUSPLUS__
};
@@ -188,7 +187,6 @@ enum LexMode {
/**** Private Forward Declarations ****/
static int pushVObject(const char *prop);
static VObject* popVObject();
-static char* lexDataFromBase64();
static void lexPopMode(int top);
static int lexWithinMode(enum LexMode mode);
static void lexPushMode(enum LexMode mode);
@@ -198,7 +196,7 @@ static void enterValues(const char *value);
static void mime_error_(char *s);
-#line 179 "vcc.y"
+#line 178 "vcc.y"
typedef union {
char *str;
VObject *vobj;
@@ -278,11 +276,11 @@ static const short yyrhs[] = { 22,
#if YYDEBUG != 0
static const short yyrline[] = { 0,
- 207, 210, 213, 213, 217, 218, 221, 227, 232, 238,
- 244, 245, 248, 252, 258, 261, 266, 266, 272, 273,
- 276, 279, 283, 290, 293, 294, 294, 298, 299, 302,
- 306, 308, 311, 314, 315, 318, 320, 321, 324, 331,
- 336, 342, 348, 355, 360, 366
+ 206, 209, 212, 212, 216, 217, 220, 226, 231, 237,
+ 243, 244, 247, 251, 257, 260, 265, 265, 271, 272,
+ 275, 278, 282, 289, 292, 293, 293, 297, 298, 301,
+ 305, 307, 310, 313, 314, 317, 319, 320, 323, 330,
+ 335, 341, 347, 354, 359, 365
};
#endif
@@ -370,7 +368,7 @@ static const short yycheck[] = { 7,
};
/* -*-C-*- Note some compilers choke on comments on `#line' lines. */
#line 3 "/usr/lib/bison.simple"
-/* This file comes from bison-1.27. */
+/* This file comes from bison-1.28. */
/* Skeleton output parser for bison,
Copyright (C) 1984, 1989, 1990 Free Software Foundation, Inc.
@@ -583,7 +581,7 @@ __yy_memcpy (char *to, char *from, unsigned int count)
#endif
#endif
-#line 216 "/usr/lib/bison.simple"
+#line 217 "/usr/lib/bison.simple"
/* The user can define YYPARSE_PARAM as the name of an argument to be passed
into yyparse. The argument should have type void *.
@@ -912,49 +910,49 @@ yyreduce:
switch (yyn) {
case 2:
-#line 211 "vcc.y"
+#line 210 "vcc.y"
{ addList(&vObjList, yyvsp[0].vobj); curObj = 0; ;
break;}
case 4:
-#line 214 "vcc.y"
+#line 213 "vcc.y"
{ addList(&vObjList, yyvsp[0].vobj); curObj = 0; ;
break;}
case 7:
-#line 223 "vcc.y"
+#line 222 "vcc.y"
{
lexPushMode(L_VCARD);
if (!pushVObject(VCCardProp)) YYERROR;
;
break;}
case 8:
-#line 228 "vcc.y"
+#line 227 "vcc.y"
{
lexPopMode(0);
yyval.vobj = popVObject();
;
break;}
case 9:
-#line 233 "vcc.y"
+#line 232 "vcc.y"
{
lexPushMode(L_VCARD);
if (!pushVObject(VCCardProp)) YYERROR;
;
break;}
case 10:
-#line 238 "vcc.y"
+#line 237 "vcc.y"
{
lexPopMode(0);
yyval.vobj = popVObject();
;
break;}
case 13:
-#line 249 "vcc.y"
+#line 248 "vcc.y"
{
lexPushMode(L_VALUES);
;
break;}
case 14:
-#line 253 "vcc.y"
+#line 252 "vcc.y"
{
if (lexWithinMode(L_BASE64) || lexWithinMode(L_QUOTED_PRINTABLE))
lexPopMode(0);
@@ -962,109 +960,109 @@ case 14:
;
break;}
case 16:
-#line 262 "vcc.y"
+#line 261 "vcc.y"
{
enterProps(yyvsp[0].str);
;
break;}
case 18:
-#line 267 "vcc.y"
+#line 266 "vcc.y"
{
enterProps(yyvsp[0].str);
;
break;}
case 22:
-#line 280 "vcc.y"
+#line 279 "vcc.y"
{
enterAttr(yyvsp[0].str,0);
;
break;}
case 23:
-#line 284 "vcc.y"
+#line 283 "vcc.y"
{
enterAttr(yyvsp[-2].str,yyvsp[0].str);
;
break;}
case 25:
-#line 293 "vcc.y"
+#line 292 "vcc.y"
{ enterValues(yyvsp[-1].str); ;
break;}
case 27:
-#line 295 "vcc.y"
+#line 294 "vcc.y"
{ enterValues(yyvsp[0].str); ;
break;}
case 29:
-#line 299 "vcc.y"
+#line 298 "vcc.y"
{ yyval.str = 0; ;
break;}
case 30:
-#line 304 "vcc.y"
+#line 303 "vcc.y"
{ if (!pushVObject(VCCalProp)) YYERROR; ;
break;}
case 31:
-#line 307 "vcc.y"
+#line 306 "vcc.y"
{ yyval.vobj = popVObject(); ;
break;}
case 32:
-#line 309 "vcc.y"
+#line 308 "vcc.y"
{ if (!pushVObject(VCCalProp)) YYERROR; ;
break;}
case 33:
-#line 311 "vcc.y"
+#line 310 "vcc.y"
{ yyval.vobj = popVObject(); ;
break;}
case 39:
-#line 326 "vcc.y"
+#line 325 "vcc.y"
{
lexPushMode(L_VEVENT);
if (!pushVObject(VCEventProp)) YYERROR;
;
break;}
case 40:
-#line 332 "vcc.y"
+#line 331 "vcc.y"
{
lexPopMode(0);
popVObject();
;
break;}
case 41:
-#line 337 "vcc.y"
+#line 336 "vcc.y"
{
lexPushMode(L_VEVENT);
if (!pushVObject(VCEventProp)) YYERROR;
;
break;}
case 42:
-#line 342 "vcc.y"
+#line 341 "vcc.y"
{
lexPopMode(0);
popVObject();
;
break;}
case 43:
-#line 350 "vcc.y"
+#line 349 "vcc.y"
{
lexPushMode(L_VTODO);
if (!pushVObject(VCTodoProp)) YYERROR;
;
break;}
case 44:
-#line 356 "vcc.y"
+#line 355 "vcc.y"
{
lexPopMode(0);
popVObject();
;
break;}
case 45:
-#line 361 "vcc.y"
+#line 360 "vcc.y"
{
lexPushMode(L_VTODO);
if (!pushVObject(VCTodoProp)) YYERROR;
;
break;}
case 46:
-#line 366 "vcc.y"
+#line 365 "vcc.y"
{
lexPopMode(0);
popVObject();
@@ -1072,7 +1070,7 @@ case 46:
break;}
}
/* the action file gets copied in in place of this dollarsign */
-#line 542 "/usr/lib/bison.simple"
+#line 543 "/usr/lib/bison.simple"
yyvsp -= yylen;
yyssp -= yylen;
@@ -1292,9 +1290,8 @@ yyerrhandle:
}
return 1;
}
-#line 372 "vcc.y"
+#line 371 "vcc.y"
-/*/////////////////////////////////////////////////////////////////////////*/
static int pushVObject(const char *prop)
{
VObject *newObj;
@@ -1314,7 +1311,6 @@ static int pushVObject(const char *prop)
}
-/*/////////////////////////////////////////////////////////////////////////*/
/* This pops the recently built vCard off the stack and returns it. */
static VObject* popVObject()
{
@@ -1555,22 +1551,6 @@ static char* lexGetWord() {
return lexStr();
}
-static void lexPushLookahead(char *s, int len) {
- int putptr;
- if (len == 0) len = strlen(s);
- putptr = (int)lexBuf.getPtr - len;
- /* this function assumes that length of word to push back
- / is not greater than MAX_LEX_LOOKAHEAD.
- */
- if (putptr < 0) putptr += MAX_LEX_LOOKAHEAD;
- lexBuf.getPtr = putptr;
- while (*s) {
- lexBuf.buf[putptr] = *s++;
- putptr = (putptr + 1) % MAX_LEX_LOOKAHEAD;
- }
- lexBuf.len += len;
- }
-
static void lexPushLookaheadc(int c) {
int putptr;
/* can't putback EOF, because it never leaves lookahead buffer */
@@ -1649,7 +1629,6 @@ static void handleMoreRFC822LineBreak(int c) {
}
static char* lexGet1Value() {
- int size = 0;
int c;
lexSkipWhite();
c = lexLookahead();
@@ -1680,18 +1659,6 @@ static char* lexGet1Value() {
}
#endif
-static char* lexGetStrUntil(char *termset) {
- int size = 0;
- int c = lexLookahead();
- lexClearToken();
- while (c != EOF && !strchr(termset,c)) {
- lexAppendc(c);
- lexSkipLookahead();
- c = lexLookahead();
- }
- lexAppendc(0);
- return c==EOF?0:lexStr();
- }
static int match_begin_name(int end) {
char *n = lexLookaheadWord();
@@ -1737,7 +1704,6 @@ static void finiLex() {
}
-/*/////////////////////////////////////////////////////////////////////////*/
/* This parses and converts the base64 format for binary encoding into
* a decoded buffer (allocated with new). See RFC 1521.
*/
@@ -1866,7 +1832,6 @@ static int match_begin_end_name(int end) {
static char* lexGetQuotedPrintable()
{
char cur;
- unsigned long len = 0;
lexClearToken();
do {
@@ -1921,8 +1886,7 @@ EndString:
return lexStr();
} /* LexQuotedPrintable */
-static int yylex() {
- int token = 0;
+int yylex() {
int lexmode = LEXMODE();
if (lexmode == L_VALUES) {
@@ -2055,7 +2019,6 @@ static VObject* Parse_MIMEHelper()
return vObjList;
}
-/*/////////////////////////////////////////////////////////////////////////*/
DLLEXPORT(VObject*) Parse_MIME(const char *input, unsigned long len)
{
initLex(input, len, 0);
@@ -2110,12 +2073,6 @@ DLLEXPORT(VObject*) Parse_MIME_FromFileName(char *fname)
#endif
-/*/////////////////////////////////////////////////////////////////////////*/
-static void YYDebug(const char *s)
-{
-/* Parse_Debug(s); */
-}
-
static MimeErrorHandler mimeErrorHandler;
diff --git a/libical/src/libicalvcal/vcc.y b/libical/src/libicalvcal/vcc.y
index fa314efeb5..70feefab57 100644
--- a/libical/src/libicalvcal/vcc.y
+++ b/libical/src/libicalvcal/vcc.y
@@ -139,7 +139,7 @@ extern "C" {
#endif
extern void Parse_Debug(const char *s);
- extern void yyerror(char *s);
+ static void yyerror(char *s);
#if __CPLUSPLUS__
};
@@ -161,7 +161,6 @@ enum LexMode {
/**** Private Forward Declarations ****/
static int pushVObject(const char *prop);
static VObject* popVObject();
-static char* lexDataFromBase64();
static void lexPopMode(int top);
static int lexWithinMode(enum LexMode mode);
static void lexPushMode(enum LexMode mode);
@@ -370,7 +369,6 @@ todoitem:
;
%%
-/*/////////////////////////////////////////////////////////////////////////*/
static int pushVObject(const char *prop)
{
VObject *newObj;
@@ -390,7 +388,6 @@ static int pushVObject(const char *prop)
}
-/*/////////////////////////////////////////////////////////////////////////*/
/* This pops the recently built vCard off the stack and returns it. */
static VObject* popVObject()
{
@@ -631,22 +628,6 @@ static char* lexGetWord() {
return lexStr();
}
-static void lexPushLookahead(char *s, int len) {
- int putptr;
- if (len == 0) len = strlen(s);
- putptr = (int)lexBuf.getPtr - len;
- /* this function assumes that length of word to push back
- / is not greater than MAX_LEX_LOOKAHEAD.
- */
- if (putptr < 0) putptr += MAX_LEX_LOOKAHEAD;
- lexBuf.getPtr = putptr;
- while (*s) {
- lexBuf.buf[putptr] = *s++;
- putptr = (putptr + 1) % MAX_LEX_LOOKAHEAD;
- }
- lexBuf.len += len;
- }
-
static void lexPushLookaheadc(int c) {
int putptr;
/* can't putback EOF, because it never leaves lookahead buffer */
@@ -725,7 +706,6 @@ static void handleMoreRFC822LineBreak(int c) {
}
static char* lexGet1Value() {
- int size = 0;
int c;
lexSkipWhite();
c = lexLookahead();
@@ -756,18 +736,6 @@ static char* lexGet1Value() {
}
#endif
-static char* lexGetStrUntil(char *termset) {
- int size = 0;
- int c = lexLookahead();
- lexClearToken();
- while (c != EOF && !strchr(termset,c)) {
- lexAppendc(c);
- lexSkipLookahead();
- c = lexLookahead();
- }
- lexAppendc(0);
- return c==EOF?0:lexStr();
- }
static int match_begin_name(int end) {
char *n = lexLookaheadWord();
@@ -813,7 +781,6 @@ static void finiLex() {
}
-/*/////////////////////////////////////////////////////////////////////////*/
/* This parses and converts the base64 format for binary encoding into
* a decoded buffer (allocated with new). See RFC 1521.
*/
@@ -942,7 +909,6 @@ static int match_begin_end_name(int end) {
static char* lexGetQuotedPrintable()
{
char cur;
- unsigned long len = 0;
lexClearToken();
do {
@@ -997,8 +963,7 @@ EndString:
return lexStr();
} /* LexQuotedPrintable */
-static int yylex() {
- int token = 0;
+int yylex() {
int lexmode = LEXMODE();
if (lexmode == L_VALUES) {
@@ -1131,7 +1096,6 @@ static VObject* Parse_MIMEHelper()
return vObjList;
}
-/*/////////////////////////////////////////////////////////////////////////*/
DLLEXPORT(VObject*) Parse_MIME(const char *input, unsigned long len)
{
initLex(input, len, 0);
@@ -1186,12 +1150,6 @@ DLLEXPORT(VObject*) Parse_MIME_FromFileName(char *fname)
#endif
-/*/////////////////////////////////////////////////////////////////////////*/
-static void YYDebug(const char *s)
-{
-/* Parse_Debug(s); */
-}
-
static MimeErrorHandler mimeErrorHandler;
diff --git a/libical/src/test/Makefile.am b/libical/src/test/Makefile.am
index 41deb599ca..a2ebea7610 100644
--- a/libical/src/test/Makefile.am
+++ b/libical/src/test/Makefile.am
@@ -1,16 +1,25 @@
-noinst_PROGRAMS = copycluster regression parser findobj storage stow testvcal recur testmime
+noinst_PROGRAMS = copycluster regression parser storage stow recur testmime testvcal process testclassify
-LDADD = ../libical/libical.a ../libicalss/libicalss.a ../libicalvcal/libicalvcal.a
-INCLUDES = -I . -I../libical -I../libicalss -I../libicalvcal
-LIBS =
+LDADD = ../libicalss/libicalss.la ../libicalvcal/libicalvcal.la ../libical/libical.la
+
+INCLUDES = \
+ -I . \
+ -I../libicalvcal \
+ -I $(srcdir)/../libicalvcal \
+ -I $(srcdir) \
+ -I../libical \
+ -I $(srcdir)/../libical \
+ -I../libicalss \
+ -I $(srcdir)/../libicalss
-findobj_SOURCES = findobj.c
copycluster_SOURCES = copycluster.c
regression_SOURCES = regression.c
parser_SOURCES = icaltestparser.c
storage_SOURCES = storage.c
stow_SOURCES = stow.c
-testvcal_SOURCES =testvcal.c
+testvcal_SOURCES = testvcal.c
recur_SOURCES = recur.c
-test_mime = testmime.c \ No newline at end of file
+testmime_SOURCES = testmime.c
+process_SOURCES = process.c
+testclassify_SOURCES = testclassify.c
diff --git a/libical/src/test/copycluster.c b/libical/src/test/copycluster.c
index 11bd94c62d..11e648d861 100644
--- a/libical/src/test/copycluster.c
+++ b/libical/src/test/copycluster.c
@@ -27,6 +27,7 @@
#include <stdio.h> /* for printf */
#include "ical.h"
+#include "icalss.h"
#include "icalfileset.h"
#include <errno.h>
#include <string.h> /* For strerror */
@@ -72,11 +73,9 @@ int main(int c, char *argv[]){
}
- for (itr = icalfileset_get_first_component(clusterin,
- ICAL_ANY_COMPONENT);
+ for (itr = icalset_get_first_component(clusterin);
itr != 0;
- itr = icalfileset_get_next_component(clusterin,
- ICAL_ANY_COMPONENT)){
+ itr = icalset_get_next_component(clusterin)){
icalrestriction_check(itr);
@@ -108,6 +107,7 @@ int main(int c, char *argv[]){
icalfileset_free(clusterout);
}
- return 0;
+ return 0;
}
+
diff --git a/libical/src/test/recur.c b/libical/src/test/recur.c
index 4d3188f9c2..2967ee7977 100644
--- a/libical/src/test/recur.c
+++ b/libical/src/test/recur.c
@@ -52,11 +52,9 @@ int main(int argc, char *argv[])
cin = icalfileset_new(argv[1]);
assert(cin != 0);
- for (itr = icalfileset_get_first_component(cin,
- ICAL_ANY_COMPONENT);
+ for (itr = icalfileset_get_first_component(cin);
itr != 0;
- itr = icalfileset_get_next_component(cin,
- ICAL_ANY_COMPONENT)){
+ itr = icalfileset_get_next_component(cin)){
desc = icalcomponent_get_first_property(itr,ICAL_DESCRIPTION_PROPERTY);
assert(desc !=0);
diff --git a/libical/src/test/regression.c b/libical/src/test/regression.c
index dc6a5301f1..b14e8aa6f8 100644
--- a/libical/src/test/regression.c
+++ b/libical/src/test/regression.c
@@ -1,6 +1,6 @@
/* -*- Mode: C -*-
======================================================================
- FILE: usecases.c
+ FILE: regression.c
CREATOR: eric 03 April 1999
DESCRIPTION:
@@ -22,24 +22,20 @@
limitations under the License.
The original author is Eric Busboom
- The original code is usecases.c
+ The original code is regression.c
======================================================================*/
#include "ical.h"
+#include "icalss.h"
+
#include <assert.h>
#include <string.h> /* for strdup */
#include <stdlib.h> /* for malloc */
#include <stdio.h> /* for printf */
#include <time.h> /* for time() */
-#include "icalmemory.h"
-#include "icalerror.h"
-#include "icalrestriction.h"
-#include "icalcalendar.h"
-#include "icalgauge.h"
-#include "icaldirset.h"
-#include "icalfileset.h"
+
/* This example creates and minipulates the ical object that appears
* in rfc 2445, page 137 */
@@ -829,11 +825,9 @@ int test_store()
rtime.end = rtime.start;
rtime.end.hour++;
- for (itr = icalfileset_get_first_component(cluster,
- ICAL_ANY_COMPONENT);
+ for (itr = icalfileset_get_first_component(cluster);
itr != 0;
- itr = icalfileset_get_next_component(cluster,
- ICAL_ANY_COMPONENT)){
+ itr = icalfileset_get_next_component(cluster)){
icalcomponent *clone;
icalproperty *p;
@@ -929,11 +923,11 @@ int test_store()
#endif
- for(c = icaldirset_get_first_component(s,ICAL_ANY_COMPONENT);
+ for(c = icaldirset_get_first_component(s);
c != 0;
c = next){
- next = icaldirset_get_next_component(s,ICAL_ANY_COMPONENT);
+ next = icaldirset_get_next_component(s);
if (c != 0){
/*icaldirset_remove_component(s,c);*/
@@ -1023,34 +1017,6 @@ void test_restriction()
rtime.end = icaltime_from_timet( time(0),0,0);
rtime.end.hour++;
-
-
- /* Property restrictions */
- assert(icalrestriction_get_property_restriction(
- ICAL_METHOD_PUBLISH,
- ICAL_VEVENT_COMPONENT,
- ICAL_SEQUENCE_PROPERTY) == 5); /* ZEROORONE -> 5 */
-
- assert(icalrestriction_get_property_restriction(
- ICAL_METHOD_PUBLISH,
- ICAL_VEVENT_COMPONENT,
- ICAL_ATTACH_PROPERTY)==3); /* ZEROPLUS -> 3 */
-
- assert(icalrestriction_get_property_restriction(
- ICAL_METHOD_DECLINECOUNTER,
- ICAL_VEVENT_COMPONENT,
- ICAL_SEQUENCE_PROPERTY)==1); /* ZERO -> 1 */
-
- /* Component restrictions */
- assert(icalrestriction_get_component_restriction(
- ICAL_METHOD_PUBLISH,
- ICAL_VJOURNAL_COMPONENT,
- ICAL_X_COMPONENT) == 3); /* ZEROPLUS */
-
- assert(icalrestriction_get_component_restriction(
- ICAL_METHOD_CANCEL,
- ICAL_VJOURNAL_COMPONENT,
- ICAL_VEVENT_COMPONENT) == 1); /* ZERO */
comp =
icalcomponent_vanew(
@@ -1124,6 +1090,7 @@ void test_restriction()
}
+#if 0
void test_calendar()
{
icalcomponent *comp;
@@ -1168,6 +1135,9 @@ void test_calendar()
icalcalendar_free(calendar);
}
+#endif
+
+void test_increment(void);
void test_recur()
{
@@ -1198,6 +1168,64 @@ void test_recur()
printf("%s\n",icalvalue_as_ical_string(v));
+ test_increment();
+
+}
+
+
+enum byrule {
+ NO_CONTRACTION = -1,
+ BY_SECOND = 0,
+ BY_MINUTE = 1,
+ BY_HOUR = 2,
+ BY_DAY = 3,
+ BY_MONTH_DAY = 4,
+ BY_YEAR_DAY = 5,
+ BY_WEEK_NO = 6,
+ BY_MONTH = 7,
+ BY_SET_POS
+};
+
+struct icalrecur_iterator_impl {
+
+ struct icaltimetype dtstart;
+ struct icaltimetype last; /* last time return from _iterator_next*/
+ int occurrence_no; /* number of step made on this iterator */
+ struct icalrecurrencetype rule;
+
+ short days[366];
+ short days_index;
+
+ enum byrule byrule;
+ short by_indices[9];
+
+
+ short *by_ptrs[9]; /* Pointers into the by_* array elements of the rule */
+};
+
+void icalrecurrencetype_test()
+{
+ icalvalue *v = icalvalue_new_from_string(
+ ICAL_RECUR_VALUE,
+ "FREQ=YEARLY;UNTIL=20060101T000000;INTERVAL=2;BYDAY=SU,WE;BYSECOND=15,30; BYMONTH=1,6,11");
+
+ struct icalrecurrencetype r = icalvalue_get_recur(v);
+ struct icaltimetype t = icaltime_from_timet( time(0), 0, 0);
+ struct icaltimetype next;
+ time_t tt;
+
+ struct icalrecur_iterator_impl* itr
+ = (struct icalrecur_iterator_impl*) icalrecur_iterator_new(r,t);
+
+ do {
+
+ next = icalrecur_iterator_next(itr);
+ tt = icaltime_as_timet(next);
+
+ printf("%s",ctime(&tt ));
+
+ } while( ! icaltime_is_null_time(next));
+
}
void test_recur_expansion()
@@ -1213,6 +1241,83 @@ void test_recur_expansion()
icalrecurrencetype_test();
}
+static const char test_icalcomp_str[] =
+"BEGIN:VEVENT\r\n"
+"UID\r\n"
+" :20001121T203327-22955-2183-22933-0@guanabana.helixcode.com\r\n"
+"DTSTAMP\r\n"
+" :20001121T203327\r\n"
+"DTSTART\r\n"
+" :20001121T170000\r\n"
+"DTEND\r\n"
+" :20001121T180000\r\n"
+"SUMMARY\r\n"
+" :recur on the second Friday every month\\, forever\r\n"
+"SEQUENCE\r\n"
+" :3\r\n"
+"CLASS\r\n"
+" :PRIVATE\r\n"
+"RRULE\r\n"
+" :FREQ=MONTHLY;INTERVAL=1;BYDAY=-2WE,2FR,3SA,-2WE\n"
+"END:VEVENT\r\n";
+
+void test_recur_bug()
+{
+ icalcomponent *icalcomp;
+ char *str;
+ icalproperty *prop;
+ struct icalrecurrencetype r;
+
+ /* Print the original stuff */
+
+ puts ("The original component is:\n\n");
+ puts (test_icalcomp_str);
+
+ /* Parse the component */
+
+ icalcomp = icalparser_parse_string ((char *) test_icalcomp_str);
+
+ if (!icalcomp) {
+ fprintf (stderr, "main(): Could not parse the stuff\n");
+ exit (EXIT_FAILURE);
+ }
+
+ if (icalcomponent_isa (icalcomp) != ICAL_VEVENT_COMPONENT) {
+ fprintf (stderr, "main(): This is not the test data I want\n");
+ exit (EXIT_FAILURE);
+ }
+
+ /* Watch the property */
+
+ prop = icalcomponent_get_first_property (icalcomp, ICAL_RRULE_PROPERTY);
+ if (!prop) {
+ fprintf (stderr, "main(): This is not the test data I want\n");
+ exit (EXIT_FAILURE);
+ }
+
+ r = icalproperty_get_rrule (prop);
+ printf ("\nThe first BYDAY element is %d\n", r.by_day[0]);
+
+ printf ("Position is %d, weekday is %d\n",
+ icalrecurrencetype_day_position (r.by_day[0]),
+ (int) icalrecurrencetype_day_day_of_week (r.by_day[0]));
+
+ /* Re-stringify */
+
+ puts ("\nThe component looks like this after re-stringification:\n\n");
+
+ str = icalcomponent_as_ical_string (icalcomp);
+ if (!str) {
+ fprintf (stderr, "main(): Could not stringify the component\n");
+ exit (EXIT_FAILURE);
+ }
+
+ puts (str);
+ puts ("\n");
+
+}
+
+
void test_duration()
{
@@ -1223,6 +1328,12 @@ void test_duration()
printf("%s\n",icalvalue_as_ical_string(v));
+
+ v = icalvalue_new_from_string(ICAL_DURATION_VALUE,
+ "-PT8H30M");
+
+ printf("%s\n",icalvalue_as_ical_string(v));
+
icalvalue_free(v);
v = icalvalue_new_from_string(ICAL_PERIOD_VALUE,
"19971015T050000Z/PT8H30M");
@@ -1320,18 +1431,29 @@ void test_requeststat()
}
+char ictt_str[1024];
+char* ictt_as_string(struct icaltimetype t)
+{
+
+ sprintf(ictt_str,"%02d-%02d-%02d %02d:%02d:%02d %c",t.year,t.month,t.day,
+ t.hour,t.minute,t.second,t.is_utc?'Z':' ');
+
+ return ictt_str;
+}
void test_time()
{
- struct icaltimetype ictt;
+ struct icaltimetype ictt, icttutc, icttny,icttphoenix;
time_t tt,tt2;
icalvalue *v;
short day_of_week,start_day_of_week, day_of_year;
- tt = time(0);
+ tt = 973276230; /* Fri Nov 3 10:30:30 PST 2000 in UTC */
+
+ printf("\n Convert to and from lib c \n");
- printf("System time is: %s\n",ctime(&tt));
+ printf("System time is: %s",ctime(&tt));
ictt = icaltime_from_timet(tt,0,0);
@@ -1340,8 +1462,9 @@ void test_time()
printf("System time from libical: %s\n",icalvalue_as_ical_string(v));
tt2 = icaltime_as_timet(ictt);
- printf("Converted back to libc: %s\n",ctime(&tt2));
+ printf("Converted back to libc: %s",ctime(&tt2));
+ printf("\n Incrementing time \n");
ictt.year++;
tt2 = icaltime_as_timet(ictt);
@@ -1349,14 +1472,15 @@ void test_time()
ictt.month+=13;
tt2 = icaltime_as_timet(ictt);
- printf("Add 13 months: %s\n",ctime(&tt2));
+ printf("Add 13 months: %s",ctime(&tt2));
ictt.second+=90;
tt2 = icaltime_as_timet(ictt);
- printf("Add 90 seconds: %s\n",ctime(&tt2));
+ printf("Add 90 seconds: %s",ctime(&tt2));
ictt = icaltime_from_timet(tt,0,0);
+ printf("\n Day Of week \n");
day_of_week = icaltime_day_of_week(ictt);
start_day_of_week = icaltime_start_doy_of_week(ictt);
@@ -1365,6 +1489,30 @@ void test_time()
printf("Today is day of week %d, day of year %d\n",day_of_week,day_of_year);
printf("Week started n doy of %d\n",start_day_of_week);
+ printf("\n To and From UTC\n");
+
+ ictt = icaltime_from_timet(tt,0,1);
+ printf("As utc : %s\n", ictt_as_string(ictt));
+ ictt = icaltime_from_timet(tt,0,0);
+ printf("As local : %s\n", ictt_as_string(ictt));
+
+
+
+ printf("\n TimeZone Conversions \n");
+
+ ictt = icaltime_from_timet(tt,0,1);
+
+ icttutc = icaltime_as_utc(ictt,"America/Los_Angeles");
+
+ icttny = icaltime_as_zone(icttutc,"America/New_York");
+
+ icttphoenix = icaltime_as_zone(icttutc,"America/Phoenix");
+
+ printf("Orig : %s", ctime(&tt) );
+ printf("UTC : %s\n", ictt_as_string(icttutc));
+ printf("Los Angeles: %s\n", ictt_as_string(ictt));
+ printf("Phoenix : %s\n", ictt_as_string(icttphoenix));
+ printf("New York : %s\n", ictt_as_string(icttny));
}
@@ -1408,7 +1556,7 @@ void test_iterators()
icalproperty *p =
icalcomponent_get_first_property(this,
ICAL_VERSION_PROPERTY);
- char* s = icalproperty_get_version(p);
+ const char* s = icalproperty_get_version(p);
printf("%s ",s);
@@ -1452,7 +1600,7 @@ void test_iterators()
icalproperty *p =
icalcomponent_get_first_property(inner,ICAL_VERSION_PROPERTY);
- char* s = icalproperty_get_version(p);
+ const char* s = icalproperty_get_version(p);
printf("%s ",s);
}
@@ -1467,7 +1615,7 @@ void test_iterators()
icalcomponent *this;
icalproperty *p;
- char* s;
+ const char* s;
next = icalcomponent_get_next_component(c,ICAL_ANY_COMPONENT);
p=icalcomponent_get_first_property(inner,ICAL_VERSION_PROPERTY);
@@ -1498,7 +1646,7 @@ void test_iterators()
icalproperty *p =
icalcomponent_get_first_property(inner,ICAL_VERSION_PROPERTY);
- char* s = icalproperty_get_version(p);
+ const char* s = icalproperty_get_version(p);
printf("%s ",s);
}
@@ -1506,22 +1654,450 @@ void test_iterators()
printf("\n");
}
-int main(int argc, char *argv[])
+
+void test_icalset()
{
+ icalcomponent *c;
- printf("\n------------Test Memory---------------\n");
- test_memory();
+ icalset* f = icalset_new_file("2446.ics");
+ icalset* d = icalset_new_dir("outdir");
-exit(0);
+ assert(f!=0);
+ assert(d!=0);
+ for(c = icalset_get_first_component(f);
+ c != 0;
+ c = icalset_get_next_component(f)){
- printf("\n------------Test Iterators-----------\n");
- test_iterators();
+ icalcomponent *clone;
+
+ clone = icalcomponent_new_clone(c);
+
+ icalset_add_component(d,clone);
+
+ printf(" class %d\n",icalclassify(c,0,"user"));
+
+ }
+}
+
+void test_classify()
+{
+ icalcomponent *c,*match;
+
+ icalset* f = icalset_new_file("../../test-data/classify.ics");
+
+ assert(f!=0);
+
+ c = icalset_get_first_component(f);
+ match = icalset_get_next_component(f);
+
+ printf("Class %d\n",icalclassify(c,match,"A@example.com"));
+
+
+}
+
+void print_span(int c, struct icaltime_span span ){
+
+ printf("#%02d start: %s",c,ctime(&span.start));
+ printf(" end : %s",ctime(&span.end));
+
+}
+
+void test_span()
+{
+ time_t tm1 = 973378800; /*Sat Nov 4 23:00:00 UTC 2000,
+ Sat Nov 4 15:00:00 PST 2000 */
+ time_t tm2 = 973382400; /*Sat Nov 5 00:00:00 UTC 2000
+ Sat Nov 4 16:00:00 PST 2000 */
+ struct icaldurationtype dur;
+ struct icaltime_span span;
+ icalcomponent *c;
+
+ memset(&dur,0,sizeof(dur));
+ dur.minutes = 30;
+
+ span.start = tm1;
+ span.end = tm2;
+ print_span(0,span);
+
+ /* Specify save timezone as in commend above */
+ c =
+ icalcomponent_vanew(
+ ICAL_VEVENT_COMPONENT,
+ icalproperty_vanew_dtstart(icaltime_from_timet(tm1,0,0),
+ icalparameter_new_tzid("US/Pacific"),0),
+ icalproperty_vanew_dtend(icaltime_from_timet(tm2,0,0),
+ icalparameter_new_tzid("US/Pacific"),0),
+ 0
+ );
+
+ printf("%s\n",icalcomponent_as_ical_string(c));
+
+ span = icalcomponent_get_span(c);
+
+ print_span(1,span);
+
+ /* Use machine's local timezone. Same as above if run in US/Pacific */
+ c =
+ icalcomponent_vanew(
+ ICAL_VEVENT_COMPONENT,
+ icalproperty_vanew_dtstart(icaltime_from_timet(tm1,0,0),0),
+ icalproperty_vanew_dtend(icaltime_from_timet(tm2,0,0),0),
+ 0
+ );
+
+ span = icalcomponent_get_span(c);
+
+ print_span(2,span);
+
+ /* Specify different timezone */
+ c =
+ icalcomponent_vanew(
+ ICAL_VEVENT_COMPONENT,
+ icalproperty_vanew_dtstart(icaltime_from_timet(tm1,0,0),
+ icalparameter_new_tzid("US/Eastern"),0),
+ icalproperty_vanew_dtend(icaltime_from_timet(tm2,0,0),
+ icalparameter_new_tzid("US/Eastern"),0),
+ 0
+ );
+ span = icalcomponent_get_span(c);
+ print_span(3,span);
+
+ /* Specify different timezone for start and end*/
+ c =
+ icalcomponent_vanew(
+ ICAL_VEVENT_COMPONENT,
+ icalproperty_vanew_dtstart(icaltime_from_timet(tm1,0,0),
+ icalparameter_new_tzid("US/Eastern"),0),
+ icalproperty_vanew_dtend(icaltime_from_timet(tm2,0,0),
+ icalparameter_new_tzid("US/Pacific"),0),
+ 0
+ );
+ span = icalcomponent_get_span(c);
+ print_span(4,span);
+
+
+ /* Use Duration */
+ c =
+ icalcomponent_vanew(
+ ICAL_VEVENT_COMPONENT,
+ icalproperty_vanew_dtstart(icaltime_from_timet(tm1,0,0),
+ icalparameter_new_tzid("US/Pacific"),0),
+ icalproperty_new_duration(dur),
+
+ 0
+ );
+ span = icalcomponent_get_span(c);
+ print_span(5,span);
+
+#ifndef ICAL_ERRORS_ARE_FATAL
+ /* Both UTC and Timezone -- an error */
+ icalerror_clear_errno();
+ c =
+ icalcomponent_vanew(
+ ICAL_VEVENT_COMPONENT,
+ icalproperty_vanew_dtstart(icaltime_from_timet(tm1,0,1),
+ icalparameter_new_tzid("US/Eastern"),0),
+ icalproperty_vanew_dtend(icaltime_from_timet(tm2,0,1),
+ icalparameter_new_tzid("US/Eastern"),0),
+ 0
+ );
+
+ span = icalcomponent_get_span(c);
+ assert(icalerrno != ICAL_NO_ERROR);
+#endif /*ICAL_ERRORS_ARE_FATAL*/
+
+}
+
+icalcomponent* icalclassify_find_overlaps(icalset* set, icalcomponent* comp);
+
+void test_overlaps()
+{
+ icalcomponent *cset,*c;
+ icalset *set;
+ time_t tm1 = 973378800; /*Sat Nov 4 23:00:00 UTC 2000,
+ Sat Nov 4 15:00:00 PST 2000 */
+ time_t tm2 = 973382400; /*Sat Nov 5 00:00:00 UTC 2000
+ Sat Nov 4 16:00:00 PST 2000 */
+
+ time_t hh = 1800; /* one half hour */
+
+ set = icalset_new_file("../../test-data/overlaps.ics");
+
+ printf("-- 1 -- \n");
+ c = icalcomponent_vanew(
+ ICAL_VEVENT_COMPONENT,
+ icalproperty_vanew_dtstart(icaltime_from_timet(tm1-hh,0,1),0),
+ icalproperty_vanew_dtend(icaltime_from_timet(tm2-hh,0,1),0),
+ 0
+ );
+
+ cset = icalclassify_find_overlaps(set,c);
+
+ printf("%s\n",icalcomponent_as_ical_string(cset));
+
+ printf("-- 2 -- \n");
+ c = icalcomponent_vanew(
+ ICAL_VEVENT_COMPONENT,
+ icalproperty_vanew_dtstart(icaltime_from_timet(tm1-hh,0,1),0),
+ icalproperty_vanew_dtend(icaltime_from_timet(tm2,0,1),0),
+ 0
+ );
+
+ cset = icalclassify_find_overlaps(set,c);
+ printf("%s\n",icalcomponent_as_ical_string(cset));
+
+ printf("-- 3 -- \n");
+ c = icalcomponent_vanew(
+ ICAL_VEVENT_COMPONENT,
+ icalproperty_vanew_dtstart(icaltime_from_timet(tm1+5*hh,0,1),0),
+ icalproperty_vanew_dtend(icaltime_from_timet(tm2+5*hh,0,1),0),
+ 0
+ );
+
+ cset = icalclassify_find_overlaps(set,c);
+
+ printf("%s\n",icalcomponent_as_ical_string(cset));
+
+}
+
+void test_fblist()
+{
+ icalspanlist *sl;
+ icalset* set = icalset_new_file("../../test-data/spanlist.ics");
+ struct icalperiodtype period;
+
+ sl = icalspanlist_new(set,
+ icaltime_from_string("19970324T1200Z"),
+ icaltime_from_string("19990424T020000Z"));
+
+ printf("Restricted spanlist\n");
+ icalspanlist_dump(sl);
+
+ period= icalspanlist_next_free_time(sl,
+ icaltime_from_string("19970801T1200Z"));
+
+
+ printf("Next Free time: %s\n",icaltime_as_ctime(period.start));
+ printf(" %s\n",icaltime_as_ctime(period.end));
+
+
+ icalspanlist_free(sl);
+
+ printf("Unrestricted spanlist\n");
+
+ sl = icalspanlist_new(set,
+ icaltime_from_string("19970324T1200Z"),
+ icaltime_null_time());
+
+ printf("Restricted spanlist\n");
+
+ icalspanlist_dump(sl);
+
+ period= icalspanlist_next_free_time(sl,
+ icaltime_from_string("19970801T1200Z"));
+
+
+ printf("Next Free time: %s\n",icaltime_as_ctime(period.start));
+ printf(" %s\n",icaltime_as_ctime(period.end));
+
+
+ icalspanlist_free(sl);
+
+
+}
+
+void test_convenience(){
+
+ icalcomponent *c;
+ int duration;
+
+ c = icalcomponent_vanew(
+ ICAL_VCALENDAR_COMPONENT,
+ icalcomponent_vanew(
+ ICAL_VEVENT_COMPONENT,
+ icalproperty_new_dtstart(icaltime_from_string("19970801T1200")),
+ icalproperty_new_dtend(icaltime_from_string("19970801T1300")),
+ 0
+ ),
+ 0);
+
+ printf("** 1 DTSTART and DTEND **\n%s\n\n",
+ icalcomponent_as_ical_string(c));
+
+ duration = icaldurationtype_as_timet(icalcomponent_get_duration(c))/60;
+
+ printf("Start: %s\n",ictt_as_string(icalcomponent_get_dtstart(c)));
+ printf("End: %s\n",ictt_as_string(icalcomponent_get_dtend(c)));
+ printf("Dur: %d m\n",duration);
+
+ icalcomponent_free(c);
+
+ c = icalcomponent_vanew(
+ ICAL_VCALENDAR_COMPONENT,
+ icalcomponent_vanew(
+ ICAL_VEVENT_COMPONENT,
+ icalproperty_new_dtstart(icaltime_from_string("19970801T1200Z")),
+ icalproperty_new_duration(icaldurationtype_from_string("PT1H30M")),
+ 0
+ ),
+ 0);
+
+ printf("\n** 2 DTSTART and DURATION **\n%s\n\n",
+ icalcomponent_as_ical_string(c));
+
+ duration = icaldurationtype_as_timet(icalcomponent_get_duration(c))/60;
+
+ printf("Start: %s\n",ictt_as_string(icalcomponent_get_dtstart(c)));
+ printf("End: %s\n",ictt_as_string(icalcomponent_get_dtend(c)));
+ printf("Dur: %d m\n",duration);
+
+ icalcomponent_free(c);
+
+ c = icalcomponent_vanew(
+ ICAL_VCALENDAR_COMPONENT,
+ icalcomponent_vanew(
+ ICAL_VEVENT_COMPONENT,
+ icalproperty_new_dtstart(icaltime_from_string("19970801T1200")),
+ icalproperty_new_dtend(icaltime_from_string("19970801T1300")),
+ 0
+ ),
+ 0);
+
+ icalcomponent_set_duration(c,icaldurationtype_from_string("PT1H30M"));
+
+ printf("** 3 DTSTART and DTEND, Set DURATION **\n%s\n\n",
+ icalcomponent_as_ical_string(c));
+
+ duration = icaldurationtype_as_timet(icalcomponent_get_duration(c))/60;
+
+ printf("Start: %s\n",ictt_as_string(icalcomponent_get_dtstart(c)));
+ printf("End: %s\n",ictt_as_string(icalcomponent_get_dtend(c)));
+ printf("Dur: %d m\n",duration);
+
+ icalcomponent_free(c);
+
+ c = icalcomponent_vanew(
+ ICAL_VCALENDAR_COMPONENT,
+ icalcomponent_vanew(
+ ICAL_VEVENT_COMPONENT,
+ icalproperty_new_dtstart(icaltime_from_string("19970801T1200Z")),
+ icalproperty_new_duration(icaldurationtype_from_string("PT1H30M")),
+ 0
+ ),
+ 0);
+
+ icalcomponent_set_dtend(c,icaltime_from_string("19970801T1330Z"));
+
+ printf("\n** 4 DTSTART and DURATION, set DTEND **\n%s\n\n",
+ icalcomponent_as_ical_string(c));
+
+ duration = icaldurationtype_as_timet(icalcomponent_get_duration(c))/60;
+
+ printf("Start: %s\n",ictt_as_string(icalcomponent_get_dtstart(c)));
+ printf("End: %s\n",ictt_as_string(icalcomponent_get_dtend(c)));
+ printf("Dur: %d m\n",duration);
+
+ icalcomponent_free(c);
+
+ c = icalcomponent_vanew(
+ ICAL_VCALENDAR_COMPONENT,
+ icalcomponent_vanew(
+ ICAL_VEVENT_COMPONENT,
+ 0
+ ),
+ 0);
+
+ icalcomponent_set_dtstart(c,icaltime_from_string("19970801T1200Z"));
+ icalcomponent_set_dtend(c,icaltime_from_string("19970801T1330Z"));
+
+ printf("\n** 5 Set DTSTART and DTEND **\n%s\n\n",
+ icalcomponent_as_ical_string(c));
+
+
+ duration = icaldurationtype_as_timet(icalcomponent_get_duration(c))/60;
+
+ printf("Start: %s\n",ictt_as_string(icalcomponent_get_dtstart(c)));
+ printf("End: %s\n",ictt_as_string(icalcomponent_get_dtend(c)));
+ printf("Dur: %d m\n",duration);
+
+ icalcomponent_free(c);
+
+ c = icalcomponent_vanew(
+ ICAL_VCALENDAR_COMPONENT,
+ icalcomponent_vanew(
+ ICAL_VEVENT_COMPONENT,
+ 0
+ ),
+ 0);
+
+
+ icalcomponent_set_dtstart(c,icaltime_from_string("19970801T1200Z"));
+ icalcomponent_set_duration(c,icaldurationtype_from_string("PT1H30M"));
+
+ printf("\n** 6 Set DTSTART and DURATION **\n%s\n\n",
+ icalcomponent_as_ical_string(c));
+
+
+ duration = icaldurationtype_as_timet(icalcomponent_get_duration(c))/60;
+
+ printf("Start: %s\n",ictt_as_string(icalcomponent_get_dtstart(c)));
+ printf("End: %s\n",ictt_as_string(icalcomponent_get_dtend(c)));
+ printf("Dur: %d m\n",duration);
+
+ icalcomponent_free(c);
+
+}
+
+int main(int argc, char *argv[])
+{
+
+ printf("\n------------Test recur bug ----------\n");
+ test_recur_bug();
+
+ exit(0);
+
+ printf("\n------------Test recur---------------\n");
+ test_recur();
+
+ printf("\n------------Test FBlist------------\n");
+ test_fblist();
printf("\n------------Test time----------------\n");
test_time();
+
+ printf("\n------------Test Overlaps------------\n");
+ test_overlaps();
+
+
+ printf("\n------------Test Span----------------\n");
+ test_span();
+
+
+ printf("\n------------Test duration---------------\n");
+ test_duration();
+
+ exit(0);
+
+
+
+ printf("\n------------Test Convenience ------------\n");
+ test_convenience();
+
+
+
+ printf("\n------------Test classify ---------------\n");
+ test_classify();
+
+ printf("\n------------Test Memory---------------\n");
+ test_memory();
+
+
+ printf("\n------------Test Iterators-----------\n");
+ test_iterators();
+
printf("\n------------Test Restriction---------------\n");
test_restriction();
@@ -1531,12 +2107,6 @@ exit(0);
printf("\n------------Test strings---------------\n");
test_strings();
- printf("\n------------Test recur---------------\n");
- test_recur();
-
- printf("\n------------Test duration---------------\n");
- test_duration();
-
printf("\n------------Test Compare---------------\n");
test_compare();
@@ -1559,9 +2129,13 @@ exit(0);
create_new_component_with_va_args();
+ return 0;
+
+ printf("\n------------Test icalset ---------------\n");
+ test_icalset();
+
- return 0;
}
diff --git a/libical/src/test/storage.c b/libical/src/test/storage.c
index d53001b574..8251babefe 100644
--- a/libical/src/test/storage.c
+++ b/libical/src/test/storage.c
@@ -162,11 +162,9 @@ void test_fileset()
cout = icalfileset_new(OUTPUT_FILE);
assert(cout != 0);
- for (itr = icalfileset_get_first_component(cout,
- ICAL_ANY_COMPONENT);
+ for (itr = icalfileset_get_first_component(cout);
itr != 0;
- itr = icalfileset_get_next_component(cout,
- ICAL_ANY_COMPONENT)){
+ itr = icalfileset_get_next_component(cout)){
icalcomponent *event;
icalproperty *dtstart, *dtend;
@@ -190,11 +188,9 @@ void test_fileset()
cout = icalfileset_new(OUTPUT_FILE);
assert(cout != 0);
- for (itr = icalfileset_get_first_component(cout,
- ICAL_ANY_COMPONENT);
+ for (itr = icalfileset_get_first_component(cout);
itr != 0;
- itr = icalfileset_get_next_component(cout,
- ICAL_ANY_COMPONENT)){
+ itr = icalfileset_get_next_component(cout)){
icalfileset_remove_component(cout, itr);
@@ -209,11 +205,9 @@ void test_fileset()
assert(cout != 0);
count =0;
- for (itr = icalfileset_get_first_component(cout,
- ICAL_ANY_COMPONENT);
+ for (itr = icalfileset_get_first_component(cout);
itr != 0;
- itr = icalfileset_get_next_component(cout,
- ICAL_ANY_COMPONENT)){
+ itr = icalfileset_get_next_component(cout)){
icalcomponent *event;
icalproperty *dtstart, *dtend;
@@ -269,11 +263,9 @@ int test_dirset()
rtime.end = rtime.start;
rtime.end.hour++;
- for (itr = icalfileset_get_first_component(cluster,
- ICAL_ANY_COMPONENT);
+ for (itr = icalfileset_get_first_component(cluster);
itr != 0;
- itr = icalfileset_get_next_component(cluster,
- ICAL_ANY_COMPONENT)){
+ itr = icalfileset_get_next_component(cluster)){
icalcomponent *clone, *inner;
icalproperty *p;
@@ -370,9 +362,9 @@ int test_dirset()
#endif
- for(c = icaldirset_get_first_component(s,ICAL_ANY_COMPONENT);
+ for(c = icaldirset_get_first_component(s);
c != 0;
- c = icaldirset_get_next_component(s,ICAL_ANY_COMPONENT)){
+ c = icaldirset_get_next_component(s)){
if (c != 0){
printf("%s", icalcomponent_as_ical_string(c));;
@@ -395,6 +387,7 @@ int test_dirset()
return 0;
}
+#if 0
void test_calendar()
{
icalcomponent *comp;
@@ -439,6 +432,7 @@ void test_calendar()
icalcalendar_free(calendar);
}
+#endif
int main(int argc, char *argv[])
diff --git a/libical/src/test/stow.c b/libical/src/test/stow.c
index f742b417a5..a305d161fe 100644
--- a/libical/src/test/stow.c
+++ b/libical/src/test/stow.c
@@ -47,6 +47,9 @@ char* program_name;
#define TMPSIZE 2048
#define SENDMAIL "/usr/lib/sendmail -t"
+void usage(char *message);
+
+
enum options {
STORE_IN_FILE,
STORE_IN_DB,
@@ -113,7 +116,7 @@ enum file_type test_file(char *path)
return type;
}
-char* lowercase(char* str)
+char* lowercase(const char* str)
{
char* p = 0;
char* new = strdup(str);
@@ -152,11 +155,6 @@ char* get_local_attendee(struct options_struct *opt)
}
#endif
-void usage(char *message)
-{
- fprintf(stderr,"Usage: %s [-emdcn] [-i inputfile] [-o outputfile] [-u calid]\n",program_name);
-
-}
icalcomponent* get_first_real_component(icalcomponent *comp)
{
@@ -178,8 +176,9 @@ icalcomponent* get_first_real_component(icalcomponent *comp)
-char* make_mime(char* to, char* from, char* subject,
- char* text_message, char* method, char* ical_message)
+char* make_mime(char* to, const char* from, const char* subject,
+ const char* text_message, const char* method,
+ const char* ical_message)
{
size_t size = strlen(to)+strlen(from)+strlen(subject)+
strlen(text_message)+ strlen(ical_message)+TMPSIZE;
@@ -226,8 +225,8 @@ Content-Type: multipart/mixed; boundary=\"%s\"\n\
\n\
This is a multimedia message in MIME format\n\
\n\
---%s
-%s
+--%s\n\
+%s\n\
",
to,from,subject,content_id,boundary,boundary,
mime_part_1);
@@ -251,7 +250,7 @@ void return_failure(icalcomponent* comp, char* message,
icalcomponent *inner = get_first_real_component(comp);
icalproperty *organizer_prop = icalcomponent_get_first_property(inner,ICAL_ORGANIZER_PROPERTY);
- char *organizer = icalproperty_get_organizer(organizer_prop);
+ const char *organizer = icalproperty_get_organizer(organizer_prop);
organizer += 7;
@@ -347,7 +346,7 @@ icalcomponent* make_reply(icalcomponent *comp, icalproperty *return_status,
}
int check_attendee(icalproperty *p, struct options_struct *opt){
- char* s = icalproperty_get_attendee(p);
+ const char* s = icalproperty_get_attendee(p);
char* lower_attendee = lowercase(s);
char* local_attendee = opt->calid;
@@ -481,6 +480,21 @@ char* check_component(icalcomponent* comp, icalproperty **return_status,
}
+void usage(char *message)
+{
+ fprintf(stderr,"Usage: %s [-emdcn] [-i inputfile] [-o outputfile] [-u calid]\n",program_name);
+ fprintf(stderr,"-e\tInput data is encapsulated in a MIME Message \n\
+-m\tInput is raw iCal \n\
+-i\tSpecify input file. Otherwise, input comed from stdin\n\
+-o\tSpecify file to save incoming message to\n\
+-d\tSpecify database to send data to\n\
+-u\tSet the calid to store the data to\n\
+-n\tSend errors to stdout instead of organizer\n\
+");
+
+}
+
+
void get_options(int argc, char* argv[], struct options_struct *opt)
{
int c;
diff --git a/libical/src/test/testmime.c b/libical/src/test/testmime.c
index a912983f84..5dfc3b7d31 100644
--- a/libical/src/test/testmime.c
+++ b/libical/src/test/testmime.c
@@ -86,6 +86,7 @@ char* read_stream(char *s, size_t size, void *d)
}
+
int main(int argc, char* argv[]) {
FILE *f;
@@ -135,7 +136,7 @@ int main(int argc, char* argv[]) {
opt.stress = 1;
break;
}
- case 'b':{ /* test base64 encoding*/
+ case 'b':{ /* test base64 decoding*/
if(opt.stress+opt.normal+opt.qp != 0){
fprintf(stderr,
"%s: Use only one of n,s,b and q\n",
@@ -144,7 +145,7 @@ int main(int argc, char* argv[]) {
opt.base64 = 1;
break;
}
- case 'q':{ /* test quoted-printable encoding*/
+ case 'q':{ /* test quoted-printable decoding*/
if(opt.stress+opt.base64+opt.normal != 0){
fprintf(stderr,
"%s: Use only one of n,s,b and q\n",
diff --git a/libical/test-data/1 b/libical/test-data/1
index 6a368d9997..3670e54141 100644
--- a/libical/test-data/1
+++ b/libical/test-data/1
@@ -11,7 +11,7 @@ TZOFFSETTO:-0500
TZNAME:EST
END:STANDARD
BEGIN:DAYLIGHT
-DTSTART:19990404T020000
+DTSTAR:19990404T020000
RDATE:19990404T020000
TZOFFSETFROM:-0500
TZOFFSETTO:-0400
diff --git a/libical/test-data/2445.ics b/libical/test-data/2445.ics
index f225f26331..7cce109ec3 100644
--- a/libical/test-data/2445.ics
+++ b/libical/test-data/2445.ics
@@ -50,6 +50,7 @@ CATEGORIES:FAMILY,FINANCE
PRIORITY:1
STATUS:NEEDS-ACTION
END:VTODO
+
BEGIN:VJOURNAL
UID:19970901T130000Z-123405@host.com
DTSTAMP:19970901T1300Z
@@ -71,16 +72,20 @@ DTSTART:19971015T050000Z
DTEND:19971016T050000Z
DTSTAMP:19970901T083000Z
END:VFREEBUSY
+
BEGIN:VFREEBUSY
ORGANIZER:MAILTO:jane_doe@host1.com
ATTENDEE:MAILTO:john_public@host2.com
DTSTAMP:19970901T100000Z
+DTSTART:19971015T050000Z
+DTEND:19971016T050000Z
FREEBUSY;VALUE=PERIOD:19971015T050000Z/PT8H30M,
19971015T160000Z/PT5H30M,19971015T223000Z/PT6H30M
URL:http://host2.com/pub/busy/jpublic-01.ifb
COMMENT:This iCalendar file contains busy time information for
the next three months.
END:VFREEBUSY
+
BEGIN:VFREEBUSY
ORGANIZER:jsmith@host.com
DTSTART:19980313T141711Z
@@ -261,6 +266,7 @@ ATTACH;FMTTYPE=application/postscript:ftp://xyzCorp.com/pub/
conf/bkgrnd.ps
END:VEVENT
END:VCALENDAR
+
BEGIN:VCALENDAR
VERSION:2.0
PRODID:-//ABC Corporation//NONSGML My Product//EN
@@ -283,6 +289,7 @@ DURATION:PT1H
END:VALARM
END:VTODO
END:VCALENDAR
+
BEGIN:VCALENDAR
VERSION:2.0
PRODID:-//ABC Corporation//NONSGML My Product//EN
diff --git a/libical/test-data/2446.ics b/libical/test-data/2446.ics
index 0f816efeba..0b86aa42c1 100644
--- a/libical/test-data/2446.ics
+++ b/libical/test-data/2446.ics
@@ -230,6 +230,7 @@ UID:calsrv.example.com-873970198738777@example.com
DTSTAMP:19970614T190000Z
END:VEVENT
END:VCALENDAR
+
BEGIN:VCALENDAR
PRODID:-//ACME/DesktopCalendar//EN
METHOD:REPLY
@@ -244,6 +245,7 @@ REQUEST-STATUS:2.0;Success
DTSTAMP:19970611T190000Z
END:VEVENT
END:VCALENDAR
+
BEGIN:VCALENDAR
PRODID:-//ACME/DesktopCalendar//EN
METHOD:REQUEST
diff --git a/libical/test-data/Makefile.am b/libical/test-data/Makefile.am
index 83a434b288..c3475a9c31 100644
--- a/libical/test-data/Makefile.am
+++ b/libical/test-data/Makefile.am
@@ -15,6 +15,12 @@ recur.txt \
user-cal.vcf \
complex-mime.txt \
simple-mime.txt \
-stresstest.ics
+stresstest.ics \
+classify.ics \
+incoming.ics \
+process-incoming.ics \
+calendar.ics \
+restriction.ics \
+overlaps.ics
diff --git a/libical/test-data/Makefile.in b/libical/test-data/Makefile.in
index d6cfa13d32..f98e420141 100644
--- a/libical/test-data/Makefile.in
+++ b/libical/test-data/Makefile.in
@@ -57,17 +57,24 @@ POST_INSTALL = :
NORMAL_UNINSTALL = :
PRE_UNINSTALL = :
POST_UNINSTALL = :
+host_alias = @host_alias@
+host_triplet = @host@
AR = @AR@
+AS = @AS@
CC = @CC@
+DLLTOOL = @DLLTOOL@
LEX = @LEX@
+LIBTOOL = @LIBTOOL@
LN_S = @LN_S@
+MAINT = @MAINT@
MAKEINFO = @MAKEINFO@
+OBJDUMP = @OBJDUMP@
PACKAGE = @PACKAGE@
RANLIB = @RANLIB@
VERSION = @VERSION@
YACC = @YACC@
-EXTRA_DIST = 0 1 1.1 2 2445.ics 2446.ics 3 4 5 6 7 smallcluster.ics recur.txt user-cal.vcf complex-mime.txt simple-mime.txt stresstest.ics
+EXTRA_DIST = 0 1 1.1 2 2445.ics 2446.ics 3 4 5 6 7 smallcluster.ics recur.txt user-cal.vcf complex-mime.txt simple-mime.txt stresstest.ics classify.ics incoming.ics process-incoming.ics calendar.ics restriction.ics overlaps.ics
mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
CONFIG_HEADER = ../config.h
@@ -81,7 +88,7 @@ TAR = gtar
GZIP_ENV = --best
all: all-redirect
.SUFFIXES:
-$(srcdir)/Makefile.in: Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4)
+$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4)
cd $(top_srcdir) && $(AUTOMAKE) --gnu --include-deps test-data/Makefile
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
@@ -151,6 +158,7 @@ clean-am: clean-generic mostlyclean-am
clean: clean-am
distclean-am: distclean-generic clean-am
+ -rm -f libtool
distclean: distclean-am