mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-02-25 20:01:50 +00:00
remove other-licenses/libical. bug 311246, r=dmose, bsmedberg
This commit is contained in:
parent
01f23158ed
commit
f5579a8d39
@ -1,3 +0,0 @@
|
||||
John Gray <gray@agora-net.com>
|
||||
|
||||
Original author May 1998-December 2001, Eric Busboom <eric@softwarestudio.org>
|
@ -1,561 +0,0 @@
|
||||
2001-12-12 Eric Busboom <eric@softwarestudio.org>
|
||||
|
||||
* icalrecur.c implemented recurrence rule for "FREQ=YEARLY",
|
||||
with no BY rules.
|
||||
|
||||
2001-12-11 Eric Busboom <eric@softwarestudio.org>
|
||||
|
||||
* icalrecur.c Fixed bug in next_month for MONTHLY rules that have
|
||||
only BYDAY rules. The code would miss valid dates that fell on the
|
||||
first of the month. created new routine is_day_in_byday()
|
||||
|
||||
* icaltime.c Fixed icaltime_from_day_of_year to correctly handle
|
||||
negative and over-range day-of-years
|
||||
|
||||
* icaltime.c collected all instances of leap year code into
|
||||
icaltime_is_leap_year
|
||||
|
||||
* icaltime.c icaltime_day_of_year. Changed an assert into code
|
||||
that advances the year when the day of year is lager than the
|
||||
number of days in the given year
|
||||
|
||||
* icalerrno.c,h Added the function version
|
||||
icalerror_set_errno. Only the define verson existed.
|
||||
|
||||
* icaltime.c Moved all of the getenv/putenv operations into icaltimegm()
|
||||
|
||||
2001-06-29 Eric Busboom <eric@softwarestudio.org>
|
||||
|
||||
* icalderivedproperties.h,c Changed the signature if the CLASS
|
||||
property from TEXT to CLASS. ( enum icalproperty_class)
|
||||
|
||||
2001-06-22 Eric Busboom <eric@softwarestudio.org>
|
||||
|
||||
* icaltypes.c Fixed bug in icaltriggertype_new_from_string htat
|
||||
caused it to fail.
|
||||
|
||||
2001-04-12 Eric Busboom <eric@softwarestudio.org>
|
||||
|
||||
* icalvalue.c Added quoting to apostrophies ("'") in text
|
||||
values. This is not required by the spec, but it is necessary in
|
||||
icallangbind_property_eval_string, since ' is special in both perl
|
||||
and python.
|
||||
|
||||
2001-04-10 Eric Busboom <eric@softwarestudio.org>
|
||||
|
||||
* icalvalue.c Added routine icalvalue_reset_kind. This routine is
|
||||
now called by all autogenerated icalvalue_set_*
|
||||
routines. icalvalue_reset_kind() will change the kind of the value
|
||||
based on the data in the value. Currently, it will set a value to
|
||||
either DATETIME or DATE based on the is_date flag of icaltimetype.
|
||||
|
||||
2001-04-09 Eric Busboom <eric@softwarestudio.org>
|
||||
|
||||
* icalproperty.h Converted REQUEST-STATUS to use the struct
|
||||
icalreqstat structure instead of a string
|
||||
|
||||
2001-04-01 Eric Busboom <eric@softwarestudio.org>
|
||||
|
||||
* icalcomponent.h Changed meaning of
|
||||
icalcomponent_new_from_string. It used to create a new component
|
||||
given the text name of the component type to create. Now it calls
|
||||
icalparser_parse_string to create a new component from the
|
||||
complete iCalendar text representation of the component.
|
||||
|
||||
2001-03-31 Eric Busboom <eric@softwarestudio.org>
|
||||
|
||||
* icalvalue Changed ACTION properties to take an ACTION value
|
||||
instead of TEXT. The ACTION value is enumerated.
|
||||
|
||||
2001-03-26 Eric Busboom <eric@softwarestudio.org>
|
||||
|
||||
* icalparameter.h icalparameter_rsvp_* routines now take, return
|
||||
ICAL_RSVP_TRUE and ICAL_RSVP_FALSE, not 0 and 1
|
||||
|
||||
2001-03-25 Eric Busboom <eric@softwarestudio.org>
|
||||
|
||||
* icalrecur.c Many changes to get YEARLY rules working and fix
|
||||
other errors. Recurrences are stil broken, but more types of rue
|
||||
now work.
|
||||
|
||||
2001-03-16 Eric Busboom <eric@softwarestudio.org>
|
||||
|
||||
* icalparameter.c Changed icalparameter_new_from_string() to
|
||||
icalparameter_new_from_value_string(). Created new
|
||||
icalparameter_new_from_string() that takes strings of
|
||||
form"PARAMNAME=PARAMVALUE"
|
||||
|
||||
* *_XNAME changes all _XNAME enumerations to _X
|
||||
|
||||
* derived props, values, parameters. Seperated out derived
|
||||
proeprties, parameters and values into their own files. This makes
|
||||
it easier to auto generate all of the enumerations for values,
|
||||
parameters and proeprties.
|
||||
|
||||
* icalenum.h Major changes to icalenum. Movel all of the
|
||||
icalenum_* values to other modules, and changed the names. Look
|
||||
for #defines in icalenum.h tying the old name to the new
|
||||
name. Also moved all of the enumerations into other files.
|
||||
|
||||
|
||||
|
||||
2001-02-26 Eric Busboom <eric@softwarestudio.org>
|
||||
|
||||
* src/libical/icalproperty.c Added
|
||||
icalproperty_set_parameter_from_string and
|
||||
icalproperty_set_value_from_string to aid in binding to Python
|
||||
|
||||
2001-02-15 Eric Busboom <eric@softwarestudio.org>
|
||||
|
||||
* design-data/prop-to-value.txt Made a new CSV file,
|
||||
properties.cvs That collects property-to-value and default value
|
||||
information
|
||||
|
||||
* src/libical/icalproperty.{c,h}.in Moved auto generated code into
|
||||
icalderivedproperty.{c,h} and created icalderivedproperty.{c,h}.in
|
||||
|
||||
|
||||
|
||||
2001-02-14 JP Rosevear <jpr@ximian.com>
|
||||
|
||||
* src/libical/Makefile.am: Sigh, automake is dumber than i thought
|
||||
|
||||
2001-02-12 JP Rosevear <jpr@ximian.com>
|
||||
|
||||
* src/test/Makefile.am: link with the static versions
|
||||
|
||||
* src/python/Makefile.am: use include dir discovered in configure checks
|
||||
|
||||
* src/python/.cvsignore: shush
|
||||
|
||||
* src/libical/icalrestriction.c: remove autogenerated file
|
||||
|
||||
* src/libical/Makefile.am: the generated files are now disted so
|
||||
look for them in the source dir rather than the build dir
|
||||
|
||||
* src/Makefile.am: Only build the python dir if all the configure
|
||||
stuff checked out
|
||||
|
||||
* configure.in: Remove shared library disabling and add a python
|
||||
check and allow for the python bindings to not be built
|
||||
|
||||
2001-02-11 Eric Busboom <eric@softwarestudio.org>
|
||||
|
||||
* src/python/Makefile.am Tweaked makefile to use automake more,
|
||||
but it stil isn't quie right.
|
||||
|
||||
2001-02-09 JP Rosevear <jpr@ximian.com>
|
||||
|
||||
* Shush cvs
|
||||
|
||||
2001-02-09 JP Rosevear <jpr@ximian.com>
|
||||
|
||||
* src/libical/Makefile.am: Slightly over zealous during the merge
|
||||
|
||||
2001-02-09 JP Rosevear <jpr@ximian.com>
|
||||
|
||||
* src/libical/Makefile.am: Correct typo
|
||||
|
||||
* Removal of more auto generated files
|
||||
|
||||
2001-02-09 JP Rosevear <jpr@ximian.com>
|
||||
|
||||
* Removal of various auto generated files
|
||||
|
||||
2001-02-09 JP Rosevear <jpr@ximian.com>
|
||||
|
||||
* src/libical/icalparameter.c.in (icalparameter_new_from_string):
|
||||
its NEEDS-ACTION rather than NEEDSACTION
|
||||
(icalparameter_as_ical_string): ditto
|
||||
|
||||
2001-02-09 Eric Busboom <eric@softwarestudio.org>
|
||||
|
||||
* python Added src/python directory. Inserted SWIG wrapper files,
|
||||
and a simple interface to Component, Time, Duration, Period and
|
||||
Store.
|
||||
|
||||
* icallangbind.c More experimental work
|
||||
|
||||
* icalduration.{c,h}, icalperiod.{c,h} Broke out period and
|
||||
duration types into their own files
|
||||
|
||||
2001-02-06 Christopher James Lahey <clahey@ximian.com>
|
||||
|
||||
* src/libical/icallangbind.c: Added a missing #include here.
|
||||
|
||||
* src/libical/icalrecur.c (icalrecur_add_bydayrules): Copy the
|
||||
passed in const vals since we change it.
|
||||
|
||||
2001-02-06 Eric Busboom <eric@softwarestudio.org>
|
||||
|
||||
* icaltime.c Changed icaltime_from_day_of_year to run mktime in
|
||||
the UTC timezone. This fixed a bug where it would return one day
|
||||
eariler for some timezones.
|
||||
|
||||
2001-02-05 Ettore Perazzoli <ettore@ximian.com>
|
||||
|
||||
* src/libical/Makefile.am (COMBINEDHEADERS): `icalvalue.h',
|
||||
`icalparameter.h', `icalproperty.h' and `icalrestriction.h' are
|
||||
created in the builddir so they shouldn't be prefixed with
|
||||
`$(top_builddir)/src/libical'.
|
||||
|
||||
2001-01-26 Eric Busboom <eric@softwarestudio.org>
|
||||
|
||||
* icalproperty.c.in Improved icalproperty_as_ical_string() to
|
||||
eliminate the possibility of having a VALUE parameter that does
|
||||
not match the actual kind of value.
|
||||
|
||||
* icalvalue.c.in made icalvalue_*_trigger() and
|
||||
icalvalue_*_datetimeperiod non-autogenerated. These routines were
|
||||
for combined value type -- non standard values that can have more
|
||||
than on standard value type. These non-standard types now delegate
|
||||
to stadard types.
|
||||
|
||||
2001-01-24 Eric Busboom <eric@softwarestudio.org>
|
||||
|
||||
* icalfileset.c fixed icalfileset_read-from_file so it will handle
|
||||
lines longer than 80 char properly.
|
||||
|
||||
2001-01-23 JP Rosevear <jpr@ximian.com>
|
||||
|
||||
* configure.in: Don't AC_INIT on an autogenerated file that does not
|
||||
exist beforehand
|
||||
|
||||
2001-01-23 Eric Busboom <eric@softwarestudio.org>
|
||||
|
||||
* icltime.c Removed all of the _local_ routines and simplified
|
||||
icaltime_utc_offset and icaltime_as_timet
|
||||
|
||||
* regression.c Added tests for triggers and improvements to icaltime.c
|
||||
|
||||
* icaltypes.c Addedd icaltriggertype_from_string and changed
|
||||
icaltriggertype to be a struct
|
||||
|
||||
2001-01-22 Eric Busboom <eric@softwarestudio.org>
|
||||
|
||||
* icaltime.c implemented icaldurationtype_from_string to parse the
|
||||
string it self, rather than use lex/yacc
|
||||
|
||||
2001-01-15 Eric Busboom <eric@softwarestudio.org>
|
||||
|
||||
* icalfileset.c Many improvements. File locking now works, and so
|
||||
does searching with icalfileset_select()
|
||||
|
||||
2001-01-08 Eric Busboom <eric@softwarestudio.org>
|
||||
|
||||
* Makefile.am Remove spaces after -I in several
|
||||
Makefile.am routines.
|
||||
|
||||
* icalset.c removed return statements from some void functions.
|
||||
|
||||
* icalparameter.c.in Added break to default: case that had no
|
||||
body. Compilers on Solaris and Tru64 UNIX complained.
|
||||
|
||||
2001-01-02 Eric Busboom <eric@softwarestudio.org>
|
||||
|
||||
* icaltime.c Changed icaldurationtype_from_time and _as_timet to
|
||||
_from_int and _as_int. This is a change interface that may break
|
||||
some code.
|
||||
|
||||
* icalgauge.c icalgaugeimpl.h, icalgauge.h., Rewrote gauge code to
|
||||
use pvl-lists directly, instead of trying to reuse icalcomponent.
|
||||
|
||||
2000-12-13 Ettore Perazzoli <ettore@helixcode.com>
|
||||
|
||||
* src/libicalvcal/Makefile.am (INCLUDES): Add
|
||||
`$(top_builddir)/src/libical' to the include directory list.
|
||||
|
||||
* src/libical/Makefile.am (icalparameter.h): Use `$(srcdir)'.
|
||||
(icalparameter.c): Likewise.
|
||||
(icalproperty.h): Likewise.
|
||||
(icalproperty.c): Likewise.
|
||||
(icalvalue.h): Likewise.
|
||||
(icalvalue.c): Likewise.
|
||||
(icalrestriction.c): Likewise.
|
||||
(COMBINEDHEADERS): `icalvalue.h', `icalparameter.h' and
|
||||
`icalproperty.h' are in builddir, not srcdir, so fix the list to
|
||||
use `$(top_builddir)' instead of `$(top_srcdir)'.
|
||||
(all): Removed.
|
||||
(BUILT_SOURCES): Move `ical.h' here instead.
|
||||
(ical.h): Don't depend on `(BUILT_SOURCES)'; this a built source
|
||||
itself.
|
||||
|
||||
2000-12-12 Eric Busboom <eric@softwarestudio.org>
|
||||
|
||||
* icalparser.c Addedd support for x-parameters.
|
||||
|
||||
* icalenum.c Fixed icalenum_parameter_type_to_string and
|
||||
icalenum_property_type_to_string to property identify X- parameers
|
||||
and properties.
|
||||
|
||||
* icalparameter.c Fixed icalparameter_as_ical_string to property
|
||||
write out X-Parameters.
|
||||
|
||||
|
||||
2000-12-11 Eric Busboom <eric@softwarestudio.org>
|
||||
|
||||
* icalcstp.c added empty bodies to prep_* routines so that shared
|
||||
libraries would build.
|
||||
|
||||
2000-12-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-12-06 Eric Busboom <eric@softwarestudio.org>
|
||||
|
||||
* icaltime.c added icaltime_as_local to convert a UTC time to a
|
||||
local time
|
||||
|
||||
* icaltime.h icaltime.c Removed is_utc argument from
|
||||
icaltime_from_timet
|
||||
|
||||
|
||||
2000-11-29 Eric Busboom <eric@softwarestudio.org>
|
||||
|
||||
* icalrecur.c More testing and bug fixes. Many more of the rules
|
||||
in recur.txt work correctly.
|
||||
|
||||
2000-11-28 Eric Busboom <eric@softwarestudio.org>
|
||||
|
||||
* icalrecur.c Several changes to extract icalrecur.c from
|
||||
libical. I'd like to make it into a reference impl for recurrence
|
||||
rules. CHanges include moving all of the recurrence type and
|
||||
recurrence enums from icalenum and icaltypes into icalrecur, and
|
||||
adding code to parse recurrence rule strings.
|
||||
|
||||
* icaltime.c Changed icaltime_from_string to parse the string
|
||||
directly. Now icaltime.c has no dependency on icalvalue.c
|
||||
|
||||
2000-11-21 Eric Busboom <eric@softwarestudio.org>
|
||||
|
||||
* icalrecur.c Fixed a bug in the increment_* routines that made
|
||||
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
|
||||
|
||||
* sspm.c Core of the mime processor. Now handles quoted-printable
|
||||
and base64 encodings
|
||||
|
||||
* icalmime.h New file that parses mime data and returns an
|
||||
icalcomponent that includes all of the parts.
|
||||
|
||||
|
||||
2000-07-26 Eric Busboom <eric@softwarestudio.org>
|
||||
|
||||
* icaldirset.h misc bug fixes to get deleting components to work
|
||||
|
||||
* icalcomponent.h Eliminated internal use of _get_first_component
|
||||
and _get_next_component, since these will reset the interal
|
||||
iterators.
|
||||
|
||||
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 Busboom <eric@softwarestudio.org>
|
||||
|
||||
* icalset This is a new "superclass" for icalstore, icalcluster,
|
||||
and others. It merges the interfaces of the old icalstore and
|
||||
icalcluster
|
||||
|
||||
* icalstore.{c,h} CHanged name to icaldirset
|
||||
|
||||
* icalcluster.{c,h} Changed name to icalfileset
|
||||
|
||||
|
||||
2000-06-12 Eric Busboom <eric@softwarestudio.org>
|
||||
|
||||
* icalstow.c misc improvements and bug fixes to make it useful.
|
||||
|
||||
2000-06-09 Eric Busboom <eric@softwarestudio.org>
|
||||
|
||||
* icalrecur.c More extensive code changes for recurrence rule.
|
||||
|
||||
* icalyacc.y Added support for integers in by day lists
|
||||
|
||||
2000-06-01 Eric Busboom <eric@softwarestudio.org>
|
||||
|
||||
* icalrecur.c moved recur code into new files
|
||||
|
||||
2000-05-30 Eric Busboom <eric@softwarestudio.org>
|
||||
|
||||
* icaltypes.c Extensive work on code to expand recurences
|
||||
|
||||
* icaltypes.h Changed signature icaltimetype_from_timet to include
|
||||
is_utc flag.
|
||||
|
||||
|
||||
2000-03-17 Eric Busboom <eric@softwarestudio.org>
|
||||
|
||||
* icalstore.c Vastly improved icalstore_test.
|
||||
|
||||
2000-03-16 Eric Busboom <eric@softwarestudio.org>
|
||||
|
||||
* icalcluster.c Added compile flag (ICAL_SAFESAVES) to switch how
|
||||
icalcluster saves files during commits. When the flag is define,
|
||||
it will write the data to a temorar file and rename the file to
|
||||
the target file.
|
||||
|
||||
* storage.c Added seterate test suite for sotage components
|
||||
|
||||
* icalparser.c Created parser object, implemented line-oriented
|
||||
parsering, and made message oriented parsing work in terms f line
|
||||
oriented parsing.
|
||||
|
||||
* icalparser.c Fixed icalparser_get_line to remove \r in input.
|
||||
|
||||
|
@ -1,24 +0,0 @@
|
||||
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 ) and on UnixWare, but I
|
||||
don't know about any other systems.
|
||||
|
||||
The library is configured with automake. From the root directory, run
|
||||
|
||||
./configure
|
||||
|
||||
To build all of the Makefiles for your system. If you will be installing the library, you may want to use the --prefix flag to set the directory where the library and header files will be installed.
|
||||
|
||||
./configure --prefix=/proj/local/
|
||||
|
||||
If configure runs fine, run "make" to build the library and
|
||||
"make install" to install it.
|
||||
|
||||
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,
|
||||
parameters and values, and print the components back out as strings.
|
||||
|
@ -1,33 +0,0 @@
|
||||
Libical is distributed under both the LGPL and the MPL. The MPL
|
||||
notice, reproduced below, covers the use of either of the licenses.
|
||||
|
||||
----------------------------------------------------------------------
|
||||
|
||||
The contents of this file are subject to the Mozilla Public License
|
||||
Version 1.1 (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 Code is libical.
|
||||
|
||||
The Initial Developer of the Original Code is Eric Busboom
|
||||
|
||||
All Rights Reserved.
|
||||
|
||||
Contributor(s): See individual source files.
|
||||
|
||||
Alternatively, the contents of this file may be used under the terms
|
||||
of the LGPL license, in which case the provisions of LGPL License are
|
||||
applicable instead of those above. If you wish to allow use of your
|
||||
version of this file only under the terms of the LGPL License and not
|
||||
to allow others to use your version of this file under the MPL,
|
||||
indicate your decision by deleting the provisions above and replace
|
||||
them with the notice and other provisions required by the LGPL
|
||||
License. If you do not delete the provisions above, a recipient may
|
||||
use your version of this file under either the MPL or the LGPL
|
||||
License."
|
@ -1,31 +0,0 @@
|
||||
#
|
||||
# The contents of this file are subject to the Netscape Public
|
||||
# License Version 1.1 (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/NPL/
|
||||
#
|
||||
# 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 Code is mozilla.org code.
|
||||
#
|
||||
# The Initial Developer of the Original Code is Netscape
|
||||
# Communications Corporation. Portions created by Netscape are
|
||||
# Copyright (C) 1998 Netscape Communications Corporation. All
|
||||
# Rights Reserved.
|
||||
#
|
||||
# Contributor(s):
|
||||
|
||||
DEPTH=../../
|
||||
|
||||
topsrcdir = $(DEPTH)
|
||||
srcdir = .
|
||||
VPATH = .
|
||||
|
||||
include $(DEPTH)/config/autoconf.mk
|
||||
|
||||
DIRS = src
|
||||
|
||||
include $(topsrcdir)/config/rules.mk
|
@ -1,12 +0,0 @@
|
||||
|
||||
EXTRA_DIST = \
|
||||
ChangeLog \
|
||||
README \
|
||||
TEST \
|
||||
TODO
|
||||
|
||||
SUBDIRS = design-data doc scripts test-data src examples zoneinfo
|
||||
|
||||
# Disabled examples until it builds
|
||||
#SUBDIRS = design-data doc scripts test-data src examples
|
||||
|
@ -1,31 +0,0 @@
|
||||
#
|
||||
# The contents of this file are subject to the Netscape Public
|
||||
# License Version 1.1 (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/NPL/
|
||||
#
|
||||
# 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 Code is mozilla.org code.
|
||||
#
|
||||
# The Initial Developer of the Original Code is Netscape
|
||||
# Communications Corporation. Portions created by Netscape are
|
||||
# Copyright (C) 1998 Netscape Communications Corporation. All
|
||||
# Rights Reserved.
|
||||
#
|
||||
# Contributor(s):
|
||||
|
||||
DEPTH=../../
|
||||
|
||||
topsrcdir = @top_srcdir@
|
||||
srcdir = @srcdir@
|
||||
VPATH = @srcdir@
|
||||
|
||||
include $(DEPTH)/config/autoconf.mk
|
||||
|
||||
#DIRS = src
|
||||
|
||||
include $(topsrcdir)/config/rules.mk
|
@ -1,447 +0,0 @@
|
||||
Version 0.23, 26 Mar 01 ( cvs tag libical-0-23 )
|
||||
------------------------------------------------
|
||||
|
||||
**** Incompatibilities with previous versions ****
|
||||
|
||||
icalparameter_new_rsvp
|
||||
icalparameter_get_rsvp
|
||||
icalparameter_set_rsvp
|
||||
|
||||
These routines now take and return ICAL_RSVP_TRUE and
|
||||
ICAL_RSVP_FALSE instead of 0 and 1
|
||||
|
||||
icalenum_*_to_*
|
||||
|
||||
These routines have been moved to icalproperty, icalparameter
|
||||
or icalvalue
|
||||
|
||||
|
||||
|
||||
Python interface: An alpha level python interface is available in
|
||||
src/python.
|
||||
|
||||
Perl interface: A pre-alpha level interface is available in
|
||||
src/Net-ICal-Libical
|
||||
|
||||
Code Autogeneration: Converted all of the important files in
|
||||
design-data/ to .csv files and improved the code that is generated
|
||||
from them. Now all of the enumerations for property, parameters and
|
||||
values are generated from thes files, as are the string
|
||||
representations for the enumerations. You can add a new property or
|
||||
parameter to the system simply by adding a line to the appropriate
|
||||
file in design-data/
|
||||
|
||||
Recurrences: Improved the recurrence code by fixing bugs in MONTHLY
|
||||
recurrences and completely re-implementing expand_year_days() for
|
||||
YEARLY recurrences. Hubert V's aided in testing.
|
||||
|
||||
Build system: JP Rosevear made several improvements to the build
|
||||
system. Now checking out the code from cvs should give to a complete
|
||||
but minimal distribution, without any of the autognerated files.
|
||||
|
||||
Interface changes: Nearly all of the icalenum routines for converting
|
||||
between strings and enumerations have been moved out of icalenum into
|
||||
icalproperty, icalparameter and icalvalue. This means that their names
|
||||
have changed, although #defines have been added to icalenum.h to map
|
||||
back to the old names.
|
||||
|
||||
Added src/libical/icllangbind.c that has some functions to make it
|
||||
easier to bind libical to other languages.
|
||||
|
||||
|
||||
Version 0.22, 15 Jan 01 ( cvs tag libical-0-22)
|
||||
----------------------------------------------
|
||||
|
||||
Many improvements to the time routines in icaltime.c. I think that
|
||||
they actually make sense now. Note that there is an interface change
|
||||
with icaltime_from_timet() -- I removed the is_utc parameter, since
|
||||
all timet values are in UTC. Use icaltime_from_int() if you really
|
||||
want the old interface
|
||||
|
||||
Major improvements to icalfileset. icalfileset_select now works and so
|
||||
does file locking.
|
||||
|
||||
Minor revision to the documentation, but it does include a new section
|
||||
on file storage ( icalfileset ) and time ( icaltime.c)
|
||||
|
||||
Lots of bug fixes and small patches.
|
||||
|
||||
I improved the regression test in src/test/regression.c. It now have
|
||||
command line switches to select specific tests ( undocumentated, of
|
||||
course ) and more of the tests include asserts, so you can just run it
|
||||
without looking at the output. If the test runs without crashing, it
|
||||
is mostly OK.
|
||||
|
||||
|
||||
|
||||
Version 0.21, 20 Nov 00 ( cvs tag libical-0-21)
|
||||
----------------------------------------------
|
||||
|
||||
* 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)
|
||||
-----------------------------------------------
|
||||
|
||||
Created a MIME parser in icalmime.c. This will take any complex MIME
|
||||
encapsulated message and return an icalcomponent with the same
|
||||
structure. Each MIME part is represented by a component of type
|
||||
X-LIC-MIMEPART.
|
||||
|
||||
Added MIME partsing to stow.c
|
||||
|
||||
Added external iterators to icalcomponent. See test_iterators() in
|
||||
test/regression.c
|
||||
|
||||
Refactored icalcluster and icalstore into icalset, icalfileset and
|
||||
icaldirset, which have a pseudo inheritance relationship between them.
|
||||
|
||||
Fixed more memory leaks.
|
||||
|
||||
Version 0.18a 10 June 00 ( cvs tag libical-0-18a )
|
||||
-----------------------------------------------
|
||||
|
||||
Did the final tweaks to stow.c, a program to recieve and store iMIP
|
||||
messages.
|
||||
|
||||
|
||||
Version 0.18 10 June 00 ( cvs tag libical-0-18 )
|
||||
-----------------------------------------------
|
||||
|
||||
Added libicalvcal, which includes the Versit code for parsing vCal
|
||||
files and a routine (icalvcal_convert() ) that converts a vCal object
|
||||
to an iCal object. The test program is src/test/testvcal.
|
||||
|
||||
Added marginally functional recurrence code. The curent code does not
|
||||
handle all of the examples in rfc2445 ( which are extracted in
|
||||
test-data/recur.txt ) but it can do all of the obvious cases. See the
|
||||
test program in src/test/recur.c for an example. In particular, the
|
||||
code cannot handle the integer values in BYDAY, nor negative integers
|
||||
in BYMONTH or BYMONTHDAY. It also cannot handle BYSETPOS.
|
||||
|
||||
Moved some code to the examples directory and improved the comments.
|
||||
|
||||
Did a little more work on the documentation in the doc directory. The
|
||||
documentation is in LyX source, but there is a text version in
|
||||
UsingLibical.txt
|
||||
|
||||
|
||||
Version 0.17 15 May 00 (cvs tag libical-0-17 )
|
||||
---------------------------------------------
|
||||
|
||||
Fixed two bugs that added extraneous '/' to test values
|
||||
|
||||
Fixed type in internal string for the COUNTER method
|
||||
|
||||
Eliminated a memory leak in icalparser.c
|
||||
|
||||
|
||||
Version 0.16a 29 April 00
|
||||
----------------------------------------------
|
||||
|
||||
Fixed bug in icalvalue_new_from_string that caused METHOD value to
|
||||
choke on non standard input.
|
||||
|
||||
Fixed a memory leak in icalparser_add_line -- failed to free 'line'
|
||||
|
||||
|
||||
Version 0.16 5 April 00 ( cvs tag libical-0-16)
|
||||
----------------------------------------------
|
||||
|
||||
Now using automake.
|
||||
|
||||
Substantial changes to the parser. New interfaces let you parser
|
||||
multiple components from a single stream by feading the parser object
|
||||
one line at a time.
|
||||
|
||||
Added a STRING value type. this type is like TEXT, but does not
|
||||
backslash magic characters. It is used in PRODID and REQUEST-STATUS,
|
||||
where the '/' and ';' are literal.
|
||||
|
||||
Added several convience functions for REQUEST-STATUS to icalenums.c
|
||||
|
||||
Addedd a routine to icalcomponent to convert X-LIC errors to
|
||||
REQUEST-STATUS return values.
|
||||
|
||||
Version 0.15a 5 Mar 00 (cvs tag libical-0-15a)
|
||||
---------------------
|
||||
|
||||
Experimented with CVS
|
||||
|
||||
Fixed icalvalue_set_text to convert escaped characters into the proper
|
||||
values.
|
||||
|
||||
Other minor code tweaks.
|
||||
|
||||
|
||||
Version 0.15 7 Feb 00
|
||||
---------------------
|
||||
|
||||
Split the storage classess ( icalstore, icalcluster, icalcalendar )
|
||||
into a seperate library, libicalss
|
||||
|
||||
Implemented restriction checking in file icalrestrictions.c. The
|
||||
checking is not complete, but can handle the bulk of the restrictions
|
||||
described in RFC 2446.
|
||||
|
||||
Created a new value type, METHOD. Changed METHOD property to use the
|
||||
new value. The METHOD value uses an enumeration.
|
||||
|
||||
|
||||
Version 0.14b
|
||||
-------------
|
||||
|
||||
Implemented parsing of RECUR values, although it does not handle BYDAY
|
||||
specs with numbers.
|
||||
|
||||
Fixed error in icalparser_next_line that mangled lines longer than the
|
||||
temp buffer (1024 chars.) The temp buffer is now 80 chars, and it can
|
||||
handle (apparently) arbitrary length lines
|
||||
|
||||
Fixed severe brokenness in a value, but I forgot which one.
|
||||
|
||||
Cleaned cruft out of the distribution, so the tarfile is smaller.
|
||||
|
||||
|
||||
Version 0.14a 14 Jan 00
|
||||
-----------------------
|
||||
|
||||
Fixed bug in ROLE parameter -- missing '-' in the text of allowed values
|
||||
|
||||
Fixed bug in X-parameters
|
||||
|
||||
Version 0.14 11 Jan 00
|
||||
----------------------
|
||||
|
||||
Fixed wrong value type for TRIGGER property
|
||||
|
||||
Added Calendar object. Calendar is an aggregate of two stores and two
|
||||
clusters, and can store all of the inforamation associated with a
|
||||
calendar.
|
||||
|
||||
icalcomponent_add_property and icalcomponent_add_component will
|
||||
complain if you try to add a component or property that is already
|
||||
part of an other component. The *_free routines wil complain if you try
|
||||
to free a linked component or property.
|
||||
|
||||
More improvements to error handling.
|
||||
|
||||
Parser is much more robust.
|
||||
|
||||
Minor memory enhancements.
|
||||
|
||||
Regression test runs without memory leaks.
|
||||
|
||||
Version 0.13d 21Dec99
|
||||
---------------------
|
||||
|
||||
Seperated perl interface and library
|
||||
|
||||
Added autoconf support
|
||||
|
||||
Scripts that generate derived properties, values and parameters now
|
||||
change source and header files inline.
|
||||
|
||||
Changed icalstore to cluster all components with DTSTART in a month
|
||||
into a single file. This should reduce number of file accesses by a
|
||||
factor of 60.
|
||||
|
||||
Ran code through Purify and fixed memory leaks.
|
||||
|
||||
|
||||
Version 0.13 16Nov99
|
||||
---------------------
|
||||
|
||||
Yet more bug fixes! Yeah!
|
||||
|
||||
Added better error handling. The Parser inserts X-LIC-*ERROR
|
||||
properties to warn of parsing errors.
|
||||
|
||||
The imip source/sink programs in /src/imip is demonstrably functional.
|
||||
|
||||
Version 0.12b 17Oct99
|
||||
---------------------
|
||||
|
||||
More bug fixes, particularily in parse from string routines
|
||||
|
||||
ICal::Store is mostly functional
|
||||
|
||||
This is version is a checkpoint, not a release.
|
||||
|
||||
Version 0.12a 10Oct99
|
||||
---------------------
|
||||
|
||||
Expanded perl interface:
|
||||
Added 1/2 of Store module
|
||||
Fixed bugs
|
||||
Implemeted get_{first,next}_property
|
||||
|
||||
Extended C interface
|
||||
Made get_{first,next}_property work properly
|
||||
Fixed bugs
|
||||
|
||||
|
||||
This is version is a checkpoint, not a release.
|
||||
|
||||
Version 0.12 27Aug99
|
||||
--------------------
|
||||
|
||||
Added a rudimentatry perl interface
|
||||
|
||||
This is version is a checkpoint, not a release.
|
||||
|
||||
|
||||
Version 0.11 11Aug99
|
||||
--------------------
|
||||
|
||||
Eliminated most use of flex/bison -- all parsing, except for the
|
||||
values, is done in C.
|
||||
|
||||
Cleaned up memory leaks. Purify claims that I got them all.
|
||||
|
||||
Moved all derived component/prop/param/value code ( in .inc / .h
|
||||
files) into main files ( icalcomponent.{c,h}, icalproperty.{c,h}, etc/
|
||||
)
|
||||
|
||||
Implemented *_clone routines.
|
||||
|
||||
Fixed a lot of bugs.
|
||||
|
||||
Implemented more value types. Still unimplemeneted are BINARY and RECUR
|
||||
|
||||
Included MacOS/Code Warior files from Graham Davison
|
||||
|
||||
|
||||
Version 0.10 8Jul99
|
||||
-------------------
|
||||
|
||||
Eliminated shift/reduce and reduce/reduce conflicts in the parser.
|
||||
This version is almost feature complete -- it has the basic structure
|
||||
for all of the library's functionality, and it will only require
|
||||
implementing procedure shells and fixing bugs. I think that all of the
|
||||
hard work is done...
|
||||
|
||||
Version 0.09a,b 3,7 Jul99
|
||||
-------------------------
|
||||
|
||||
Various improvements to the parser, added some functionality. The parser code
|
||||
is mostly complete, and should be fully functional, except for a horde of
|
||||
bugs. Also added support for X-Properties.
|
||||
|
||||
Version 0.09 25Jun99
|
||||
--------------------
|
||||
|
||||
Added a parser in files src/comp/icalitip.{y,l} The lexer is mostly
|
||||
functional, but the parser is not.
|
||||
|
||||
|
||||
Version 0.08 2Jun99
|
||||
--------------------
|
||||
|
||||
All files now have MPL licensing
|
||||
|
||||
Implement enough of the code to perform some rudimentary testing
|
||||
|
||||
|
||||
Version 0.07 14May99
|
||||
--------------------
|
||||
|
||||
Remove all interfaces that construct object from a string
|
||||
|
||||
Moved most code back into comp directory
|
||||
|
||||
Implemented C files for most headers -- usecases.c now links.
|
||||
|
||||
Many improvements to generation scripts.
|
||||
|
||||
|
||||
|
||||
Version 0.06 25Apr99
|
||||
--------------------
|
||||
|
||||
Expanded distribution to include:
|
||||
Directory structure that can accomodate future expansion
|
||||
Several levels of Makefiles
|
||||
This CHANGES file
|
||||
|
||||
Added headers for irip and parse modules
|
||||
|
||||
Added several files with design information
|
||||
|
||||
Added scripts that I had used to generate much of the ical header code.
|
||||
|
||||
Split C headers from CC headers
|
||||
|
||||
Added data for iTIP and iCAL component restrictions in restrictions.csv
|
||||
|
||||
Version 0.05 11Apr99
|
||||
----------------------
|
||||
|
||||
Changes to ical headers
|
||||
|
||||
Added derived Property classes.
|
||||
|
||||
Improved the interface to the derived property and parameter classes
|
||||
|
||||
Added derived component classes.
|
||||
|
||||
Created usecases.c and ccusecases.cc to demonstrate use
|
||||
|
||||
C++ interface compile
|
||||
|
||||
|
||||
Version 0.04 5Apr99
|
||||
-------------------
|
||||
|
||||
Version 0.02 30Mar99
|
||||
--------------------
|
@ -1,102 +0,0 @@
|
||||
|
||||
LIBICAL -- An implementation of basic iCAL protocols
|
||||
|
||||
The code and datafiles in this distribution are licensed under the
|
||||
Mozilla Public License. See http://www.mozilla.org/NPL/MPL-1.0.html
|
||||
for a copy of the license. Alternately, you may use libical under the
|
||||
terms of the GNU Library General Public License. See
|
||||
http://www.fsf.org/copyleft/lesser.html for a copy of the LGPL.
|
||||
|
||||
This dual license ensures that the library can be incorporated into
|
||||
both proprietary code and GPL'd programs, and will benefit from
|
||||
improvements made by programmers in both realms. I will only accept
|
||||
changes into my version of the library if they are similarly
|
||||
dual-licensed.
|
||||
|
||||
Portions of this distribution are (C) Copyright 1996 Apple Computer,
|
||||
Inc., AT&T Corp., International Business Machines Corporation and
|
||||
Siemens Rolm Communications Inc. See src/libicalvcal/README.TXT for
|
||||
details.
|
||||
|
||||
Portions of this distribution are Copyright (c) 1997 Theo de
|
||||
Raadt. See the header for src/libical/vsnprintf.c for the full
|
||||
copyright statement.
|
||||
|
||||
This code is under active development. If you would like to contribute
|
||||
to the project, you can contact me, Eric Busboom, at
|
||||
eric@softwarestudio.org. The project has a webpage at
|
||||
|
||||
http://softwarestudio.org/libical/index.html
|
||||
|
||||
and a mailing list that you can join by sending the following mail:
|
||||
|
||||
------------
|
||||
To: minimalist@softwarestudio.org
|
||||
Subject: subscribe libical
|
||||
------------
|
||||
|
||||
|
||||
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 ) and on UnixWare, but I
|
||||
don't know about any other systems.
|
||||
|
||||
The library is configured with automake. IF YOU ARE BUILDING THE
|
||||
SOURCE FROM A TARBALL, From the root directory, run
|
||||
|
||||
./configure
|
||||
|
||||
To build all of the Makefiles for your system. If you will be
|
||||
installing the library, you may want to use the --prefix flag to set
|
||||
the directory where the library and header files will be installed.
|
||||
|
||||
./configure --prefix=/proj/local/
|
||||
|
||||
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
|
||||
|
||||
|
||||
IF YOU ARE BUILDING FROM CVS, there will be no configure file until
|
||||
you create one with autogen.sh. YOu can pass configure parameters to
|
||||
autogen.sh on the command line.
|
||||
|
||||
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,
|
||||
parameters and values, and print the components back out as strings.
|
||||
|
||||
|
||||
Notes for Libical Developers
|
||||
-------------------
|
||||
|
||||
If you don't want to use gcc as the compiler, and you got the sources
|
||||
from CVS, you should set the CC variable to the path to the compiler
|
||||
and run "automake --include-deps" to keep automake from using
|
||||
gcc-specific automatic dependancy tracking.
|
||||
|
||||
> CC=/pkg/SUNWspro/bin/cc; export CC
|
||||
> automake --include-deps
|
||||
> ./configure --prefix=/proj/local/
|
||||
> make
|
||||
|
||||
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.
|
||||
|
||||
|
||||
|
||||
Eric Busboom
|
||||
eric@softwarestudio.org
|
@ -1,4 +0,0 @@
|
||||
|
||||
Parser Tests
|
||||
------------
|
||||
Use iCAL keywords as first words of unquoted strings
|
@ -1,60 +0,0 @@
|
||||
Thanks to:
|
||||
|
||||
Allan Clark <allanc@atlas.platypus.bc.ca> for testing libical against
|
||||
UnixWare.
|
||||
|
||||
Graham Davison <g.m.davison@computer.org> for MacOS support and
|
||||
miscelaneous code bits
|
||||
|
||||
Seth Alves <alves@hungry.com> for the first cut at the Makefile.am
|
||||
files and various utility functions.
|
||||
|
||||
Russ Steinthal <rms39@columbia.edu> for several utility functions and
|
||||
comments.
|
||||
|
||||
Ola Lundqvist <olalu526@student.liu.se> for the vCal test data file.
|
||||
|
||||
Colin DuPlantis <colin@cp.net> for new functions in icalparser.c
|
||||
|
||||
Holger Schmidt <hschmidt@chronolabs.de> for all of icalcstp.c, The
|
||||
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
|
||||
|
||||
Tom Leitner <tom@radar.tu-graz.ac.at> For several bug fixes in
|
||||
compiling on Tru64 UNIX.
|
||||
|
||||
Patrick Lewis <plewis@inetarena.com> for several bug reports and
|
||||
substantial ( co-authorship) contributions to the Python bindings
|
||||
|
||||
Larry W. Virden <lvirden@cas.org> for several bug reports in compiling
|
||||
on Solaris.
|
||||
|
||||
Bryan Bartone <bsb@mesasys.com> for code changes based on porting
|
||||
libical to Windows.
|
||||
|
||||
Hubert V <hubertv@bigfoot.com> for checking and analyzing the output
|
||||
of the recurrence rule system.
|
||||
|
||||
Jonathan Yue <jonathan.yue@cp.net> for icalproperty_get_name()
|
||||
|
||||
Jeff Mace <jhm18@psu.edu> for finding bugs in gauges.
|
||||
|
||||
John Gray <gray@agora-net.com> for routing memory leaks, porting to
|
||||
WIN32, and taking over leadership of the project.
|
||||
|
@ -1,39 +0,0 @@
|
||||
|
||||
TODOs for libical-0.16
|
||||
---------------------
|
||||
|
||||
libical treats properties with multiple values incorrecty -- it always
|
||||
seperates multiple values into multiple properties. This is not
|
||||
acceptable for CATEGORIES and RESOURCES.
|
||||
|
||||
Some TEXT valued properties, like METHOD, have a limited set of valid
|
||||
values. The code should check that the values of these properites are
|
||||
valid. ( Although METHOD now uses enums, and is not really TEXT valued )
|
||||
|
||||
Finish implementing values
|
||||
ATTACH/BINARY
|
||||
content_type
|
||||
language
|
||||
|
||||
Check for buffer overflow on external input.
|
||||
|
||||
Error Handling
|
||||
|
||||
Dates and times: the parser will accept many illegal date time
|
||||
values
|
||||
|
||||
RECUR values ignore integers in BYDAY clauses, ie 'FREQ=MONTHLY;BYDAY=-1SU'
|
||||
|
||||
Restrictions code does not catch lack of DTEND or DURATION
|
||||
|
||||
For some value types, if there illegal characters in the value ( like
|
||||
4.56 in an integer value), the parser will output the characters to
|
||||
stdout.
|
||||
|
||||
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.
|
@ -1,27 +0,0 @@
|
||||
/* 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 your libc defines a "timezone" variable */
|
||||
#undef HAVE_TIMEZONE
|
||||
|
||||
/* Define if your libc defines a struct tm containing a "tm_gmtoff" member */
|
||||
#undef HAVE_TM_GMTOFF
|
||||
|
||||
/* Define to 1 if your compile does not like lines like: struct
|
||||
something foo[]*/
|
||||
#undef ICAL_NO_EMPTY_ARRAY_DECL
|
||||
|
||||
/* Define to 1 if you DO NOT WANT to see deprecated messages */
|
||||
#undef NO_WARN_DEPRECATED
|
||||
|
||||
/* Define to 1 if you DO NO WANT to see the warning messages
|
||||
related to ICAL_MALFORMEDDATA_ERROR and parsing .ics zoneinfo files */
|
||||
#undef NO_WARN_ICAL_MALFORMEDDATA_ERROR_HACK
|
@ -1,89 +0,0 @@
|
||||
#!/bin/sh
|
||||
# Run this to generate all the initial makefiles, etc.
|
||||
|
||||
srcdir=`dirname $0`
|
||||
test -z "$srcdir" && srcdir=.
|
||||
|
||||
ORIGDIR=`pwd`
|
||||
cd $srcdir
|
||||
PROJECT=libical
|
||||
TEST_TYPE=-d
|
||||
FILE=src
|
||||
|
||||
DIE=0
|
||||
|
||||
(autoconf --version) < /dev/null > /dev/null 2>&1 || {
|
||||
echo
|
||||
echo "You must have autoconf installed to compile $PROJECT."
|
||||
echo "Download the appropriate package for your distribution,"
|
||||
echo "or get the source tarball at ftp://ftp.gnu.org/pub/gnu/"
|
||||
DIE=1
|
||||
}
|
||||
|
||||
(automake --version) < /dev/null > /dev/null 2>&1 || {
|
||||
echo
|
||||
echo "You must have automake installed to compile $PROJECT."
|
||||
echo "Get ftp://ftp.cygnus.com/pub/home/tromey/automake-1.2d.tar.gz"
|
||||
echo "(or a newer version if it is available)"
|
||||
DIE=1
|
||||
}
|
||||
|
||||
(libtoolize --version) < /dev/null > /dev/null 2>&1 || {
|
||||
echo
|
||||
echo "You must have libtool installed to compile $PROJECT."
|
||||
echo "Get ftp://ftp.gnu.org/pub/gnu/libtool/libtool-1.4.2.tar.gz"
|
||||
echo "(or a newer version if it is available)"
|
||||
DIE=1
|
||||
}
|
||||
|
||||
if test "$DIE" -eq 1; then
|
||||
exit 1
|
||||
fi
|
||||
|
||||
test $TEST_TYPE $FILE || {
|
||||
echo "You must run this script in the top-level $PROJECT directory"
|
||||
exit 1
|
||||
}
|
||||
|
||||
if test -z "$*"; then
|
||||
echo "I am going to run ./configure with no arguments - if you wish "
|
||||
echo "to pass any to it, please specify them on the $0 command line."
|
||||
fi
|
||||
|
||||
case $CC in
|
||||
*xlc | *xlc\ * | *lcc | *lcc\ *) am_opt=--include-deps;;
|
||||
esac
|
||||
|
||||
if test -z "$ACLOCAL_FLAGS"; then
|
||||
|
||||
acdir=`aclocal --print-ac-dir`
|
||||
m4list="glib.m4"
|
||||
|
||||
for file in $m4list
|
||||
do
|
||||
if [ ! -f "$acdir/$file" ]; then
|
||||
echo "WARNING: aclocal's directory is $acdir, but..."
|
||||
echo " no file $acdir/$file"
|
||||
echo " You may see fatal macro warnings below."
|
||||
echo " If these files are installed in /some/dir, set the ACLOCAL_FLAGS "
|
||||
echo " environment variable to \"-I /some/dir\", or install"
|
||||
echo " $acdir/$file."
|
||||
echo ""
|
||||
fi
|
||||
done
|
||||
fi
|
||||
|
||||
aclocal $ACLOCAL_FLAGS
|
||||
libtoolize
|
||||
|
||||
# optionally feature autoheader
|
||||
(autoheader --version) < /dev/null > /dev/null 2>&1 && autoheader
|
||||
|
||||
automake -a $am_opt
|
||||
autoconf
|
||||
cd $ORIGDIR
|
||||
|
||||
$srcdir/configure "$@"
|
||||
|
||||
echo
|
||||
echo "Now type 'make' to compile $PROJECT."
|
@ -1,54 +0,0 @@
|
||||
/* config.h. Generated automatically by configure. */
|
||||
/* config.h.in. Generated automatically from configure.in by autoheader. */
|
||||
|
||||
/* Define to empty if the keyword does not work. */
|
||||
/* #undef const */
|
||||
|
||||
/* Define to `unsigned' if <sys/types.h> doesn't define. */
|
||||
/* #undef size_t */
|
||||
|
||||
/* Define if you have the ANSI C header files. */
|
||||
#define STDC_HEADERS 1
|
||||
|
||||
/* Define if your <sys/time.h> declares struct tm. */
|
||||
/* #undef TM_IN_SYS_TIME */
|
||||
|
||||
/* Define if lex declares yytext as a char * by default, not a char[]. */
|
||||
#define YYTEXT_POINTER 1
|
||||
|
||||
/* 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 */
|
||||
#define ICAL_SAFESAVES 1
|
||||
|
||||
/* Define to terminate lines with "\n" instead of "\r\n" */
|
||||
/* #undef ICAL_UNIX_NEWLINE */
|
||||
|
||||
/* Define to 1 if you DO NOT WANT to see deprecated messages */
|
||||
#define NO_WARN_DEPRECATED 1
|
||||
|
||||
/* Define to 1 if you DO NO WANT to see the warning messages
|
||||
related to ICAL_MALFORMEDDATA_ERROR and parsing .ics zoneinfo files */
|
||||
#define NO_WARN_ICAL_MALFORMEDDATA_ERROR_HACK 1
|
||||
|
||||
/* Define if you have the strdup function. */
|
||||
#define HAVE_STRDUP 1
|
||||
|
||||
/* Define if you have the <assert.h> header file. */
|
||||
#define HAVE_ASSERT_H 1
|
||||
|
||||
/* Define if you have the <sys/types.h> header file. */
|
||||
#define HAVE_SYS_TYPES_H 1
|
||||
|
||||
/* Define if you have the <time.h> header file. */
|
||||
#define HAVE_TIME_H 1
|
||||
|
||||
/* Name of package */
|
||||
#define PACKAGE "libical"
|
||||
|
||||
/* Version number of package */
|
||||
#define VERSION "0.23a"
|
||||
|
@ -1,111 +0,0 @@
|
||||
dnl Process this file with autoconf to produce a configure script.
|
||||
AC_INIT(src)
|
||||
AM_INIT_AUTOMAKE(libical,0.23a)
|
||||
AM_CONFIG_HEADER(config.h)
|
||||
|
||||
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_INSTALL
|
||||
|
||||
dnl Initialize libtool
|
||||
AM_PROG_LIBTOOL
|
||||
|
||||
AC_SUBST(AR)
|
||||
|
||||
AC_CHECK_PROGS(AR, ar aal, ar)
|
||||
AC_CHECK_PROGS(PERL, perl5 perl)
|
||||
|
||||
dnl **************************************************
|
||||
dnl test/regression.c (and maybe others) needs this defined
|
||||
dnl **************************************************
|
||||
AC_DEFINE(ICAL_ERRORS_ARE_FATAL,1)
|
||||
AC_DEFINE(NO_WARN_DEPRECATED,1)
|
||||
AC_DEFINE(NO_WARN_ICAL_MALFORMEDDATA_ERROR_HACK,1)
|
||||
|
||||
AC_DEFINE(ICAL_SAFESAVES,1)
|
||||
AC_DEFINE(ICAL_UNIX_NEWLINE,1)
|
||||
dnl AC_DEFINE(ICAL_NO_EMPTY_ARRAY_DECL)
|
||||
|
||||
dnl Checks for libraries.
|
||||
dnl Replace `main' with a function in -lical:
|
||||
dnl AC_CHECK_LIB(ical, main)
|
||||
|
||||
dnl Checks for header files.
|
||||
AC_HEADER_STDC
|
||||
AC_CHECK_HEADERS(time.h sys/types.h assert.h wctype.h)
|
||||
|
||||
dnl Checks for typedefs, structures, and compiler characteristics.
|
||||
AC_C_CONST
|
||||
AC_TYPE_SIZE_T
|
||||
AC_STRUCT_TM
|
||||
|
||||
dnl Checks for library functions.
|
||||
AC_CHECK_FUNCS(strdup)
|
||||
|
||||
dnl **************************************************
|
||||
dnl * Check for Python
|
||||
dnl **************************************************
|
||||
python_val=false
|
||||
AC_ARG_ENABLE(python-bindings,
|
||||
[ --enable-python-bindings=[yes/no] Enable python bindings],,enable_python_bindings=yes)
|
||||
if test "x$enable_python_bindings" = "xyes"; then
|
||||
python_val=true
|
||||
else
|
||||
python_val=false
|
||||
fi
|
||||
|
||||
if $python_val; then
|
||||
AC_CHECK_PROG(python_val, python, true, false)
|
||||
fi
|
||||
if $python_val; then
|
||||
AC_CHECK_PROG(python_val, swig, true, false)
|
||||
fi
|
||||
|
||||
if $python_val; then
|
||||
PY_PREFIX=`python -c 'import sys ; print sys.prefix'`
|
||||
PY_EXEC_PREFIX=`python -c 'import sys ; print sys.exec_prefix'`
|
||||
changequote(<<, >>)dnl
|
||||
PY_VERSION=`python -c 'import sys ; print sys.version[0:3]'`
|
||||
changequote([, ])dnl
|
||||
if test -f $PY_PREFIX/include/python$PY_VERSION/Python.h; then
|
||||
PY_LIBS="python$PY_VERSION"
|
||||
PY_LIB_LOC="-L$PY_EXEC_PREFIX/lib/python$PY_VERSION/config"
|
||||
PY_CFLAGS="-I$PY_PREFIX/include/python$PY_VERSION"
|
||||
PY_MAKEFILE="$PY_EXEC_PREFIX/lib/python$PY_VERSION/config/Makefile"
|
||||
PY_LOCALMODLIBS=`sed -n -e 's/^LOCALMODLIBS=\(.*\)/\1/p' $PY_MAKEFILE`
|
||||
PY_BASEMODLIBS=`sed -n -e 's/^BASEMODLIBS=\(.*\)/\1/p' $PY_MAKEFILE`
|
||||
PY_OTHER_LIBS=`sed -n -e 's/^LIBS=\(.*\)/\1/p' $PY_MAKEFILE`
|
||||
PY_EXTRA_LIBS="$PY_LOCALMODLIBS $PY_BASEMODLIBS $PY_OTHER_LIBS"
|
||||
AC_SUBST(PY_LIBS)
|
||||
AC_SUBST(PY_LIB_LOC)
|
||||
AC_SUBST(PY_CFLAGS)
|
||||
AC_SUBST(PY_EXTRA_LIBS)
|
||||
else
|
||||
python_val=false
|
||||
fi
|
||||
fi
|
||||
AM_CONDITIONAL(WITH_PYTHON, $python_val)
|
||||
|
||||
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/python/Makefile
|
||||
src/test/Makefile
|
||||
test-data/Makefile
|
||||
zoneinfo/Makefile
|
||||
])
|
||||
|
@ -1,6 +0,0 @@
|
||||
EXTRA_DIST =\
|
||||
properties.csv \
|
||||
parameters.csv \
|
||||
restrictions.csv \
|
||||
status.txt \
|
||||
value-types.csv
|
@ -1,22 +0,0 @@
|
||||
VCALENDAR
|
||||
VEVENT
|
||||
VTODO
|
||||
VJOURNAL
|
||||
VFREEBUSY
|
||||
VTIMEZONE
|
||||
XSTANDARDTIME
|
||||
XDAYLIGHTSAVINGSTIME
|
||||
VALARM
|
||||
XAUDIOALARM
|
||||
XDISPLAYALARM
|
||||
XEMAILALARM
|
||||
XPROCEDUREALARM
|
||||
X
|
||||
VSCHEDULE
|
||||
VQUERY
|
||||
VCAR
|
||||
VCOMMAND
|
||||
XLICINVALID
|
||||
XMIMEPART
|
||||
ANY
|
||||
|
@ -1,24 +0,0 @@
|
||||
"#Name ","C Type","Enumeration Values"
|
||||
"ALTREP","const char*",
|
||||
"CN","const char*",
|
||||
"CUTYPE","icalparameter_cutype","INDIVIDUAL;GROUP;RESOURCE;ROOM;UNKNOWN"
|
||||
"DELEGATED-FROM","const char*",
|
||||
"DELEGATED-TO","const char*",
|
||||
"DIR","const char*",
|
||||
"ENCODING","icalparameter_encoding","8BIT;BASE64"
|
||||
"FBTYPE","icalparameter_fbtype","FREE;BUSY;BUSYUNAVAILABLE;BUSYTENTATIVE"
|
||||
"FMTTYPE","const char*",
|
||||
"LANGUAGE","const char*",
|
||||
"MEMBER","const char*",
|
||||
"PARTSTAT","icalparameter_partstat","NEEDS-ACTION;ACCEPTED;DECLINED;TENTATIVE;DELEGATED;COMPLETED;INPROCESS"
|
||||
"RANGE","icalparameter_range","THISANDPRIOR;THISANDFUTURE"
|
||||
"RELATED","icalparameter_related","START;END"
|
||||
"RELTYPE","icalparameter_reltype","PARENT;CHILD;SIBLING"
|
||||
"ROLE","icalparameter_role","CHAIR;REQ-PARTICIPANT;OPT-PARTICIPANT;NON-PARTICIPANT"
|
||||
"RSVP","icalparameter_rsvp","TRUE;FALSE"
|
||||
"SENT-BY","const char*",
|
||||
"TZID","const char*",
|
||||
"VALUE","icalparameter_value","BINARY;BOOLEAN;DATE;DURATION;FLOAT;INTEGER;PERIOD;RECUR;TEXT;URI;ERROR;DATE-TIME;UTC-OFFSET;CAL-ADDRESS"
|
||||
"X","const char*",
|
||||
"X-LIC-ERRORTYPE","icalparameter_xlicerrortype","COMPONENT-PARSE-ERROR;PROPERTY-PARSE-ERROR;PARAMETER-NAME-PARSE-ERROR;PARAMETER-VALUE-PARSE-ERROR;VALUE-PARSE-ERROR;INVALID-ITIP;UNKNOWN-VCAL-PROP-ERROR;MIME-PARSE-ERROR"
|
||||
"X-LIC-COMPARETYPE","icalparameter_xliccomparetype","EQUAL;NOTEQUAL;LESS;GREATER;LESSEQUAL;GREATEREQUAL;REGEX"
|
|
@ -1,55 +0,0 @@
|
||||
ACTION VALUE X
|
||||
ATTACH FMTTYPE ENCODING VALUE X
|
||||
ATTENDEE CN CUTYPE DELEGATED-FROM DELEGATED-TO DIR LANGUAGE MEMBER PARTSTAT ROLE RSVP SENT-BY X
|
||||
CALSCALE X
|
||||
CATEGORIES LANGUAGE X
|
||||
CLASS X
|
||||
COMMENT ALTREP LANGUAGE X
|
||||
COMPLETED X
|
||||
CONTACT ALTREP LANGUAGE X
|
||||
CREATED X
|
||||
DESCRIPTION ALTREP LANGUAGE X
|
||||
DTEND VALUE TZID X
|
||||
DTSTAMP X
|
||||
DTSTART VALUE TZID X
|
||||
DUE VALUE TZID X
|
||||
DURATION X
|
||||
EXDATE VALUE TZID X
|
||||
EXRULE X
|
||||
FREEBUSY FBTYPE X
|
||||
GEO X
|
||||
LAST-MODIFIED X
|
||||
LOCATION ALTREP LANGUAGE X
|
||||
METHOD X
|
||||
ORGANIZER CN DIR LANGUAGE SENT-BY X
|
||||
PERCENT-COMPLETE X
|
||||
PRIORITY X
|
||||
PRODID X
|
||||
RDATE VALUE TZID X
|
||||
RECURRENCE-ID VALUE RANGE TZID X
|
||||
RELATED-TO RELTYPE X
|
||||
REPEAT X
|
||||
REQUEST-STATUS LANGUAGE X
|
||||
RESOURCES ALTREP LANGUAGE X
|
||||
RRULE X
|
||||
SEQUENCE X
|
||||
STATUS X
|
||||
SUMMARY ALTREP LANGUAGE X
|
||||
TRANSP X
|
||||
TRIGGER VALUE RELATED X
|
||||
TZID X
|
||||
TZNAME LANGUAGE X
|
||||
TZOFFSETFROM X
|
||||
TZOFFSETTO X
|
||||
TZURL X
|
||||
UID X
|
||||
URL X
|
||||
VERSION X
|
||||
XPROP LANGUAGE X
|
||||
X-LIC-ERROR XLICEERRORTYPE X
|
||||
SCOPE X
|
||||
MAXRESULTS X
|
||||
MAXRESULTSSIZE X
|
||||
QUERY X
|
||||
QUERYNAME X
|
||||
TARGET X
|
@ -1,67 +0,0 @@
|
||||
,,
|
||||
"#Property Name","libical Value type","iCalendar default value"
|
||||
"ACTION","ACTION","ACTION"
|
||||
"ATTACH","ATTACH","URI"
|
||||
"ATTENDEE","CAL-ADDRESS","CAL-ADDRESS"
|
||||
"CALSCALE","TEXT","TEXT"
|
||||
"CATEGORIES","TEXT","TEXT"
|
||||
"CLASS","CLASS","CLASS"
|
||||
"COMMENT","TEXT","TEXT"
|
||||
"COMPLETED","DATE-TIME","DATE-TIME"
|
||||
"CONTACT","TEXT","TEXT"
|
||||
"CREATED","DATE-TIME","DATE-TIME"
|
||||
"DESCRIPTION","TEXT","TEXT"
|
||||
"DTEND","DATE-TIME","DATE-TIME"
|
||||
"DTSTAMP","DATE-TIME","DATE-TIME"
|
||||
"DTSTART","DATE-TIME","DATE-TIME"
|
||||
"DUE","DATE-TIME","DATE-TIME"
|
||||
"DURATION","DURATION","DURATION"
|
||||
"EXDATE","DATE-TIME","DATE-TIME"
|
||||
"EXRULE","RECUR","RECUR"
|
||||
"FREEBUSY","PERIOD","PERIOD"
|
||||
"GEO","GEO","GEO"
|
||||
"LAST-MODIFIED","DATE-TIME","DATE-TIME"
|
||||
"LOCATION","TEXT","TEXT"
|
||||
"METHOD","METHOD","METHOD"
|
||||
"ORGANIZER","CAL-ADDRESS","CAL-ADDRESS"
|
||||
"PERCENT-COMPLETE","INTEGER","INTEGER"
|
||||
"PRIORITY","INTEGER","INTEGER"
|
||||
"PRODID","TEXT","TEXT"
|
||||
"RDATE","DATE-TIME-PERIOD","DATE-TIME"
|
||||
"RECURRENCE-ID","DATE-TIME","DATE-TIME"
|
||||
"RELATED-TO","TEXT","TEXT"
|
||||
"REPEAT","INTEGER","INTEGER"
|
||||
"REQUEST-STATUS","REQUEST-STATUS","REQUEST-STATUS"
|
||||
"RESOURCES","TEXT","TEXT"
|
||||
"RRULE","RECUR","RECUR"
|
||||
"SEQUENCE","INTEGER","INTEGER"
|
||||
"STATUS","STATUS","STATUS"
|
||||
"SUMMARY","TEXT","TEXT"
|
||||
"TRANSP","TEXT","TEXT"
|
||||
"TRIGGER","TRIGGER","DURATION"
|
||||
"TZID","TEXT","TEXT"
|
||||
"TZNAME","TEXT","TEXT"
|
||||
"TZOFFSETFROM","UTC-OFFSET","UTC-OFFSET"
|
||||
"TZOFFSETTO","UTC-OFFSET","UTC-OFFSET"
|
||||
"TZURL","URI","URI"
|
||||
"UID","TEXT","TEXT"
|
||||
"URL","URI","URI"
|
||||
"VERSION","TEXT","TEXT"
|
||||
"X","X","X"
|
||||
"SCOPE","TEXT","TEXT"
|
||||
"MAXRESULTS","INTEGER","INTEGER"
|
||||
"MAXRESULTSSIZE","INTEGER","INTEGER"
|
||||
"QUERY","QUERY","QUERY"
|
||||
"QUERYNAME","TEXT","TEXT"
|
||||
"TARGET","CAL-ADDRESS","CAL-ADDRESS"
|
||||
"X-LIC-ERROR","TEXT","TEXT"
|
||||
"X-LIC-CLUSTERCOUNT","STRING","STRING"
|
||||
"X-LIC-MIMECONTENTTYPE","STRING","STRING"
|
||||
"X-LIC-MIMECHARSET","STRING","STRING"
|
||||
"X-LIC-MIMEENCODING","STRING","STRING"
|
||||
"X-LIC-MIMEOPTINFO","STRING","STRING"
|
||||
"X-LIC-MIMECID","STRING","STRING"
|
||||
"X-LIC-MIMEFILENAME","STRING","STRING"
|
||||
"X-LIC-CLASS","X-LIC-CLASS","X-LIC-CLASS"
|
||||
"ANY","NO","NO"
|
||||
"NO","NO","NO"
|
|
File diff suppressed because it is too large
Load Diff
@ -1,56 +0,0 @@
|
||||
2.0 STATOK Operation was successfully performed.
|
||||
2.0.1 STARTSENDATA Start ICAL input; end with <CRLF>.<CRLF>
|
||||
2.0.11 OKDATAFOLLOWS The request was processed successfully. Reply data follows on the next line and terminates with <CRLF>.<CRLF>
|
||||
2.0.2 REPLYPENDING A timeout has occurred. The server is still working on the reply. Use CONTINUE to continue waiting for the reply or ABORT to terminate the command.
|
||||
2.0.3 ABORTED The command currently underway was successsfully aborted.
|
||||
2.0.4 WILLATTEMPT The specified Calendar is not here but an attempt will be made to deliver the request or reply to the Calendar anyway.
|
||||
2.0.5 TRUSTEDWILLQUEUE The request or reply will be queued and delivered to the target calendar when its iRIP server contacts this server and issues the SWITCH command.
|
||||
2.0.6 WILLATTEMPT The specified Calendar is not here but an attempt will be made to deliver the request or reply to the Calendar anyway.
|
||||
2.0.7 QUEUED The message has been queued for delivery.
|
||||
2.0.8 QUEUEEMPTY There are no more queued messages.
|
||||
2.1 FALLBACK Success. Fallback taken on one or more property values.
|
||||
2.2 NOCOMMANDINPROGRESS An ABORT or CONTINUE was received when no command was in progress
|
||||
2.2 IGPROP Success. Invalid property ignored.
|
||||
2.3 IGPARAM Success. invalid property parameter ignored.
|
||||
2.4 IGXPROP Success. Unknown non-standard property ignored.
|
||||
2.5 IGXPARAM Success. Unknown non standard property value ignored.
|
||||
2.6 IGCOMP Success. Invalid calendar component ignored.
|
||||
2.7 FORWARD Success. Request forwarded to Calendar User.
|
||||
2.8 ONEEVENT Success. Repeating event ignored. Scheduled as a single component.
|
||||
2.9 TRUNC Success. Truncated end date time to date boundary.
|
||||
2.10 ONETODO Success. Repeating VTODO ignored. Scheduled as a single VTODO.
|
||||
2.11 TRUNCRRULE Success. Unbounded RRULE clipped at some finite number of instances
|
||||
3.0 INVPROPNAME Invalid property name.
|
||||
3.1 INVPROPVAL Invalid property value.
|
||||
3.2 INVPARAM Invalid property parameter.
|
||||
3.3 INVPARAMVAL Invalid property parameter value.
|
||||
3.4 INVCOMP Invalid calendar component sequence.
|
||||
3.5 INVTIME Invalid date or time.
|
||||
3.6 INVRULE Invalid rule.
|
||||
3.7 INVCU Invalid Calendar User.
|
||||
3.8 NOAUTH No authority.
|
||||
3.9 BADVERSION Unsupported version.
|
||||
3.10 TOOBIG Request entity too large.
|
||||
3.11 MISSREQCOMP Required component or property missing.
|
||||
3.12 UNKCOMP Unknown component or property found.
|
||||
3.13 BADCOMP Unsupported component or property found
|
||||
3.14 NOCAP Unsupported capability.
|
||||
4.0 BUSY Event conflict. Date/time is busy.
|
||||
5.0 MAYBE Request MAY supported.
|
||||
5.1 UNAVAIL Service unavailable.
|
||||
5.2 NOSERVICE Invalid calendar service.
|
||||
5.3 NOSCHED No scheduling support for user.
|
||||
6.1 AUTHENTICATEFAILURE Unsupported authentication mechanism, credentials rejected
|
||||
6.2 AUTHENTICATIONABORTED Sender aborted authentication, authentication exchange cancelled
|
||||
8.0 GENERALFAILURE A failure has occurred in the Receiver that prevents the operation from succeeding.
|
||||
8.1 SERVERTOOBUSY The iRIP Receiver is too busy.
|
||||
8.2 ICALOBJECTTOOBIG Object has exceeded the server's size limit.
|
||||
8.3 DATETOOLARGE A DATETIME value was too far in the future to be represented on this Calendar.
|
||||
8.4 DATETOOSMALL A DATETIME value was too far in the past to be represented on this Calendar.
|
||||
9.0 INVALIDIRIPCOMMAND An unrecongnized command was received.
|
||||
9.1 UNEXPECTEDCOMMAND The command is not allowed for the server's current state.
|
||||
10.1 REFERRAL Accompanied by an alternate address.
|
||||
10.2 SERVERSHUTDOWN The server is shutting down.
|
||||
10.3 SERVERSTOPPING FLOOD 2
|
||||
10.4 EXCEEDEDQUOTAS The operation would cause a resource to exceed the allocated quota
|
||||
10.5 QUEUEDTOOLONG The ITIP message has been queued too long. Delivery has been aborted.
|
@ -1,31 +0,0 @@
|
||||
"#Name","C type& gen flag","Python","Component Values","Enum Values"
|
||||
"BINARY","(a)const char*","file","unitary",
|
||||
"BOOLEAN","(a)int","integer","unitary",
|
||||
"CAL-ADDRESS","(a)const char*","string","unitary",
|
||||
"DATE","(a)struct icaltimetype","Time","unitary",
|
||||
"DATE-TIME","(a)struct icaltimetype","Time","unitary",
|
||||
"DURATION","(a)struct icaldurationtype","Duration","unitary",
|
||||
"FLOAT","(a)float","float","unitary",
|
||||
"INTEGER","(a)int","integer","unitary",
|
||||
"PERIOD","(a)struct icalperiodtype","Period","unitary",
|
||||
"RECUR","(m)struct icalrecurrencetype","RecurrenceSet","unitary",
|
||||
"TEXT","(a)const char*","string","unitary",
|
||||
"URI","(a)const char*","string","unitary",
|
||||
"UTC-OFFSET","(a)int","integer","unitary",
|
||||
"QUERY","(a)const char*","string","unitary",
|
||||
"#Non-standard multi-valued types",,,,
|
||||
"ATTACH","(a)struct icalattachtype","none","URI;BINARY",
|
||||
"DATE-TIME-PERIOD","(m)struct icaldatetimeperiodtype","none","DATE-TIME;PERIOD",
|
||||
"TRIGGER","(m)struct icaltriggertype","string","DURATION;DATE-TIME",
|
||||
"#Non-standard property enumeration types",,,,
|
||||
"METHOD","(a)enum icalproperty_method","string","unitary","PUBLISH;REQUEST;REPLY;ADD;CANCEL;REFRESH;COUNTER;DECLINECOUNTER;CREATE;READ;RESPONSE;MOVE;MODIFY;GENERATEUID;DELETE"
|
||||
"X-LIC-CLASS","(a)enum icalproperty_xlicclass","string","unitary","PUBLISH-NEW;PUBLISH-UPDATE;PUBLISH-FREEBUSY;REQUEST-NEW;REQUEST-UPDATE;REQUEST-RESCHEDULE;REQUEST-DELEGATE;REQUEST-NEW-ORGANIZER;REQUEST-FORWARD;REQUEST-STATUS;REQUEST-FREEBUSY;REPLY-ACCEPT;REPLY-DECLINE;REPLY-DELEGATE;REPLY-CRASHER-ACCEPT;REPLY-CRASHER-DECLINE;ADD-INSTANCE;CANCEL-EVENT;CANCEL-INSTANCE;CANCEL-ALL;REFRESH;COUNTER;DECLINECOUNTER;MALFORMED;OBSOLETE;MISSEQUENCED;UNKNOWN"
|
||||
"ACTION","(a)enum icalproperty_action","string","unitary","AUDIO;DISPLAY;EMAIL;PROCEDURE"
|
||||
"STATUS","(a)enum icalproperty_status","string","unitary","TENTATIVE;CONFIRMED;COMPLETED;NEEDS-ACTION;CANCELLED;IN-PROCESS;DRAFT;FINAL"
|
||||
"TRANSP","(a)enum icalproperty_transp","string","unitary","OPAQUE;TRANSPARENT"
|
||||
"CLASS","(a)enum icalproperty_class","string","unitary","PUBLIC;PRIVATE;CONFIDENTIAL"
|
||||
"#Other non-standard",,,,
|
||||
"REQUEST-STATUS","(a)struct icalreqstattype","string","unitary"
|
||||
"GEO","(a)struct icalgeotype","tuple","unitary",
|
||||
"STRING","(a)const char*","string","unitary",
|
||||
"X","(m)const char*","string","unitary",
|
Can't render this file because it has a wrong number of fields in line 28.
|
@ -1,23 +0,0 @@
|
||||
|
||||
How to add or change Components, Properties, Values or Parameters
|
||||
|
||||
|
||||
Adding or modifying values
|
||||
---------------------------
|
||||
|
||||
You may have to modify these files or data structures
|
||||
|
||||
file design-data/value-c-types.txt
|
||||
file design-data/prop-to-val.txt
|
||||
table parameter_map[] in icalenums.c
|
||||
enum icalvalue_kind in icalenum.h
|
||||
table value_map[] in icalenums.c
|
||||
enum icalparameter_value in icalenum.h
|
||||
table propval_map[] in icalenums.c
|
||||
function icalvalue_as_ical_string() in icalvalue.c
|
||||
function icalvalue_new_from_string_with_error() in icalvalue.c
|
||||
|
||||
When you are done, if you changed any files in the design-data
|
||||
directory, regnerate derived datatypes in src/libical with "make
|
||||
derived" or "make icalvalue"
|
||||
|
@ -1 +0,0 @@
|
||||
EXTRA_DIST = UsingLibical.lyx UsingLibical.ps UsingLibical.txt
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@ -1,14 +0,0 @@
|
||||
|
||||
noinst_PROGRAMS = doesnothing
|
||||
|
||||
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
|
||||
|
@ -1,60 +0,0 @@
|
||||
|
||||
|
||||
Usecases
|
||||
---------
|
||||
|
||||
1) iMIP based CUA uses a local, file-based store
|
||||
|
||||
2) CAP based CUA uses one or more remote CAP servers
|
||||
|
||||
3) CAP based CUA uses a local cache that synchronizes with one or more
|
||||
CAP servers.
|
||||
|
||||
4) CUA imports and exports from a file
|
||||
|
||||
Scenarios.
|
||||
---------
|
||||
|
||||
1 Open a connection to a store.
|
||||
|
||||
2 Create a new calendar for which user Bob can read and user Alice can
|
||||
read an write.
|
||||
|
||||
3 Create several new calendars
|
||||
|
||||
4 Delete a calendar
|
||||
|
||||
5 Change the calid of a calendar
|
||||
|
||||
6 Delete all calendars belonging to user bob
|
||||
|
||||
7 Get three new UIDs from the store
|
||||
|
||||
8 Store a new VEVENT in the store.
|
||||
|
||||
9 Find all components for which the LOCATION is "West Conference Room"
|
||||
and change them to "East Conference Room"
|
||||
|
||||
10 Find the component with UID X and add a GEO property to it.
|
||||
|
||||
11 Delete all VEVENTS which have a METHOD that is not CREATED
|
||||
|
||||
12 Retrieve all VEVENTS which have a METHOD that is not CREATED
|
||||
|
||||
13 Retrieve the capabilities of the store
|
||||
|
||||
14 Retrieve/Modify/Add/Delete properties of a store
|
||||
|
||||
15 Retrieve/Modify/Add/Delete VCARs of a store
|
||||
|
||||
16 Retrieve/Modify/Add/Delete VTIMEZONEs of a store
|
||||
|
||||
17 Retrieve/Modify/Add/Delete properties of a calendar
|
||||
|
||||
18 Retrieve/Modify/Add/Delete VCARs of a calendar
|
||||
|
||||
19 Retrieve/Modify/Add/Delete VTIMEZONEs of a calendar
|
||||
|
||||
20 Translate a CALID into one or more UPNs
|
||||
|
||||
21 Expand a group UPN into all of the members of the group
|
@ -1,319 +0,0 @@
|
||||
/* Access_component.c */
|
||||
|
||||
#include "ical.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"
|
||||
|
||||
void do_something(icalcomponent *c);
|
||||
|
||||
/* Creating iCal Components
|
||||
|
||||
There are two ways to create new component in libical. You can
|
||||
build the component from primitive parts, or you can create it
|
||||
from a string.
|
||||
|
||||
There are two variations of the API for building the component from
|
||||
primitive parts. In the first variation, you add each parameter and
|
||||
value to a property, and then add each property to a
|
||||
component. This results in a long series of function calls. This
|
||||
style is show in create_new_component()
|
||||
|
||||
The second variation uses vargs lists to nest many primitive part
|
||||
constructors, resulting in a compact, neatly formated way to create
|
||||
components. This style is shown in create_new_component_with_va_args()
|
||||
|
||||
|
||||
|
||||
*/
|
||||
|
||||
icalcomponent* create_new_component()
|
||||
{
|
||||
|
||||
/* variable definitions */
|
||||
icalcomponent* calendar;
|
||||
icalcomponent* event;
|
||||
struct icaltimetype atime = icaltime_from_timet( time(0),0);
|
||||
struct icalperiodtype rtime;
|
||||
icalproperty* property;
|
||||
|
||||
/* Define a time type that will use as data later. */
|
||||
rtime.start = icaltime_from_timet( time(0),0);
|
||||
rtime.end = icaltime_from_timet( time(0),0);
|
||||
rtime.end.hour++;
|
||||
|
||||
/* Create calendar and add properties */
|
||||
|
||||
calendar = icalcomponent_new(ICAL_VCALENDAR_COMPONENT);
|
||||
|
||||
/* Nearly every libical function call has the same general
|
||||
form. The first part of the name defines the 'class' for the
|
||||
function, and the first argument will be a pointer to a struct
|
||||
of that class. So, icalcomponent_ functions will all take
|
||||
icalcomponent* as their first argument. */
|
||||
|
||||
/* The next call creates a new proeprty and immediately adds it to the
|
||||
'calendar' component. */
|
||||
|
||||
icalcomponent_add_property(
|
||||
calendar,
|
||||
icalproperty_new_version("2.0")
|
||||
);
|
||||
|
||||
|
||||
/* Here is the short version of the memory rules:
|
||||
|
||||
If the routine name has "new" in it:
|
||||
Caller owns the returned memory.
|
||||
If you pass in a string, the routine takes the memory.
|
||||
|
||||
If the routine name has "add" in it:
|
||||
The routine takes control of the component, property,
|
||||
parameter or value memory.
|
||||
|
||||
If the routine returns a string ( "get" and "as_ical_string" )
|
||||
The library owns the returned memory.
|
||||
|
||||
There are more rules, so refer to the documentation for more
|
||||
details.
|
||||
|
||||
*/
|
||||
|
||||
icalcomponent_add_property(
|
||||
calendar,
|
||||
icalproperty_new_prodid("-//RDU Software//NONSGML HandCal//EN")
|
||||
);
|
||||
|
||||
/* Add an event */
|
||||
|
||||
event = icalcomponent_new(ICAL_VEVENT_COMPONENT);
|
||||
|
||||
icalcomponent_add_property(
|
||||
event,
|
||||
icalproperty_new_dtstamp(atime)
|
||||
);
|
||||
|
||||
/* In the previous call, atime is a struct, and it is passed in by value.
|
||||
This is how all compound types of values are handled. */
|
||||
|
||||
icalcomponent_add_property(
|
||||
event,
|
||||
icalproperty_new_uid("guid-1.host1.com")
|
||||
);
|
||||
|
||||
/* add a property that has parameters */
|
||||
property = icalproperty_new_organizer("mailto:mrbig@host.com");
|
||||
|
||||
icalproperty_add_parameter(
|
||||
property,
|
||||
icalparameter_new_role(ICAL_ROLE_CHAIR)
|
||||
);
|
||||
|
||||
icalcomponent_add_property(event,property);
|
||||
|
||||
/* In this style of component creation, you need to use an extra
|
||||
call to add parameters to properties, but the form of this
|
||||
operation is the same as adding a property to a component */
|
||||
|
||||
/* add another property that has parameters */
|
||||
property = icalproperty_new_attendee("mailto:employee-A@host.com");
|
||||
|
||||
icalproperty_add_parameter(
|
||||
property,
|
||||
icalparameter_new_role(ICAL_ROLE_REQPARTICIPANT)
|
||||
);
|
||||
|
||||
icalproperty_add_parameter(
|
||||
property,
|
||||
icalparameter_new_rsvp(1)
|
||||
);
|
||||
|
||||
icalproperty_add_parameter(
|
||||
property,
|
||||
icalparameter_new_cutype(ICAL_CUTYPE_GROUP)
|
||||
);
|
||||
|
||||
icalcomponent_add_property(event,property);
|
||||
|
||||
|
||||
/* more properties */
|
||||
|
||||
icalcomponent_add_property(
|
||||
event,
|
||||
icalproperty_new_description("Project XYZ Review Meeting")
|
||||
);
|
||||
|
||||
icalcomponent_add_property(
|
||||
event,
|
||||
icalproperty_new_categories("MEETING")
|
||||
);
|
||||
|
||||
icalcomponent_add_property(
|
||||
event,
|
||||
icalproperty_new_class(ICAL_CLASS_PUBLIC)
|
||||
);
|
||||
|
||||
icalcomponent_add_property(
|
||||
event,
|
||||
icalproperty_new_created(atime)
|
||||
);
|
||||
|
||||
icalcomponent_add_property(
|
||||
event,
|
||||
icalproperty_new_summary("XYZ Project Review")
|
||||
);
|
||||
|
||||
property = icalproperty_new_dtstart(atime);
|
||||
|
||||
icalproperty_add_parameter(
|
||||
property,
|
||||
icalparameter_new_tzid("US-Eastern")
|
||||
);
|
||||
|
||||
icalcomponent_add_property(event,property);
|
||||
|
||||
|
||||
property = icalproperty_new_dtend(atime);
|
||||
|
||||
icalproperty_add_parameter(
|
||||
property,
|
||||
icalparameter_new_tzid("US-Eastern")
|
||||
);
|
||||
|
||||
icalcomponent_add_property(event,property);
|
||||
|
||||
icalcomponent_add_property(
|
||||
event,
|
||||
icalproperty_new_location("1CP Conference Room 4350")
|
||||
);
|
||||
|
||||
icalcomponent_add_component(calendar,event);
|
||||
|
||||
return calendar;
|
||||
}
|
||||
|
||||
|
||||
/* Now, create the same component as in the previous routine, but use
|
||||
the constructor style. */
|
||||
|
||||
icalcomponent* create_new_component_with_va_args()
|
||||
{
|
||||
|
||||
/* This is a similar set up to the last routine */
|
||||
icalcomponent* calendar;
|
||||
struct icaltimetype atime = icaltime_from_timet( time(0),0);
|
||||
struct icalperiodtype rtime;
|
||||
|
||||
rtime.start = icaltime_from_timet( time(0),0);
|
||||
rtime.end = icaltime_from_timet( time(0),0);
|
||||
rtime.end.hour++;
|
||||
|
||||
/* Some of these routines are the same as those in the previous
|
||||
routine, but we've also added several 'vanew' routines. These
|
||||
'vanew' routines take a list of properties, parameters or
|
||||
values and add each of them to the parent property or
|
||||
component. */
|
||||
|
||||
calendar =
|
||||
icalcomponent_vanew(
|
||||
ICAL_VCALENDAR_COMPONENT,
|
||||
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("guid-1.host1.com"),
|
||||
icalproperty_vanew_organizer(
|
||||
"mailto:mrbig@host.com",
|
||||
icalparameter_new_role(ICAL_ROLE_CHAIR),
|
||||
0
|
||||
),
|
||||
icalproperty_vanew_attendee(
|
||||
"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("Project XYZ Review Meeting"),
|
||||
|
||||
icalproperty_new_categories("MEETING"),
|
||||
icalproperty_new_class(ICAL_CLASS_PUBLIC),
|
||||
icalproperty_new_created(atime),
|
||||
icalproperty_new_summary("XYZ Project Review"),
|
||||
icalproperty_vanew_dtstart(
|
||||
atime,
|
||||
icalparameter_new_tzid("US-Eastern"),
|
||||
0
|
||||
),
|
||||
icalproperty_vanew_dtend(
|
||||
atime,
|
||||
icalparameter_new_tzid("US-Eastern"),
|
||||
0
|
||||
),
|
||||
icalproperty_new_location("1CP Conference Room 4350"),
|
||||
0
|
||||
),
|
||||
0
|
||||
);
|
||||
|
||||
|
||||
/* Note that properties with no parameters can use the regular
|
||||
'new' constructor, while those with parameters use the 'vanew'
|
||||
constructor. And, be sure that the last argument in the 'vanew'
|
||||
call is a zero. Without, your program will probably crash. */
|
||||
|
||||
return calendar;
|
||||
}
|
||||
|
||||
|
||||
void find_sub_components(icalcomponent* comp)
|
||||
{
|
||||
icalcomponent *c;
|
||||
|
||||
/* The second parameter to icalcomponent_get_first_component
|
||||
indicates the type of component to search for. This will
|
||||
iterate through all sub-components */
|
||||
for(c = icalcomponent_get_first_component(comp,ICAL_ANY_COMPONENT);
|
||||
c != 0;
|
||||
c = icalcomponent_get_next_component(comp,ICAL_ANY_COMPONENT)){
|
||||
|
||||
do_something(c);
|
||||
}
|
||||
|
||||
/* This will iterate only though VEVENT sub-components */
|
||||
|
||||
for(c = icalcomponent_get_first_component(comp,ICAL_VEVENT_COMPONENT);
|
||||
c != 0;
|
||||
c = icalcomponent_get_next_component(comp,ICAL_VEVENT_COMPONENT)){
|
||||
|
||||
do_something(c);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/* Ical components only have one internal iterator, so removing the
|
||||
object that the iterator points to can cause problems. Here is the
|
||||
right way to remove components */
|
||||
|
||||
void remove_vevent_sub_components(icalcomponent* comp){
|
||||
|
||||
icalcomponent *c, *next;
|
||||
|
||||
for( c = icalcomponent_get_first_component(comp,ICAL_VEVENT_COMPONENT);
|
||||
c != 0;
|
||||
c = next)
|
||||
{
|
||||
next = icalcomponent_get_next_component(comp,ICAL_VEVENT_COMPONENT);
|
||||
|
||||
icalcomponent_remove_component(comp,c);
|
||||
|
||||
do_something(c);
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -1,144 +0,0 @@
|
||||
/* 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
|
||||
that this routine assumes that the component that we pass in is a
|
||||
VEVENT. */
|
||||
|
||||
void get_required_attendees(icalcomponent* event)
|
||||
{
|
||||
icalproperty* p;
|
||||
icalparameter* parameter;
|
||||
|
||||
assert(event != 0);
|
||||
assert(icalcomponent_isa(event) == ICAL_VEVENT_COMPONENT);
|
||||
|
||||
/* This loop iterates over all of the ATTENDEE properties in the
|
||||
event */
|
||||
|
||||
/* The iteration routines save their state in the event
|
||||
struct, so the are not thread safe unless you lock the whole
|
||||
component. */
|
||||
|
||||
for(
|
||||
p = icalcomponent_get_first_property(event,ICAL_ATTENDEE_PROPERTY);
|
||||
p != 0;
|
||||
p = icalcomponent_get_next_property(event,ICAL_ATTENDEE_PROPERTY)
|
||||
) {
|
||||
|
||||
/* Get the first ROLE parameter in the property. There should
|
||||
only be one, so we won't bother to iterate over them. But,
|
||||
you can iterate over parameters just like with properties */
|
||||
|
||||
parameter = icalproperty_get_first_parameter(p,ICAL_ROLE_PARAMETER);
|
||||
|
||||
/* If the parameter indicates the participant is required, get
|
||||
the attendees name and stick a copy of it into the output
|
||||
array */
|
||||
|
||||
if ( icalparameter_get_role(parameter) == ICAL_ROLE_REQPARTICIPANT)
|
||||
{
|
||||
/* Remember, the caller does not own this string, so you
|
||||
should strdup it if you want to change it. */
|
||||
const char *attendee = icalproperty_get_attendee(p);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/* Here is a similar example. If an attendee has a PARTSTAT of
|
||||
NEEDSACTION or has no PARTSTAT parameter, change it to
|
||||
TENTATIVE. */
|
||||
|
||||
void update_attendees(icalcomponent* event)
|
||||
{
|
||||
icalproperty* p;
|
||||
icalparameter* parameter;
|
||||
|
||||
assert(event != 0);
|
||||
assert(icalcomponent_isa(event) == ICAL_VEVENT_COMPONENT);
|
||||
|
||||
for(
|
||||
p = icalcomponent_get_first_property(event,ICAL_ATTENDEE_PROPERTY);
|
||||
p != 0;
|
||||
p = icalcomponent_get_next_property(event,ICAL_ATTENDEE_PROPERTY)
|
||||
) {
|
||||
|
||||
parameter = icalproperty_get_first_parameter(p,ICAL_PARTSTAT_PARAMETER);
|
||||
|
||||
if (parameter == 0) {
|
||||
|
||||
/* There was no PARTSTAT parameter, so add one. */
|
||||
icalproperty_add_parameter(
|
||||
p,
|
||||
icalparameter_new_partstat(ICAL_PARTSTAT_TENTATIVE)
|
||||
);
|
||||
|
||||
} else if (icalparameter_get_partstat(parameter) == ICAL_PARTSTAT_NEEDSACTION) {
|
||||
/* Remove the NEEDSACTION parameter and replace it with
|
||||
TENTATIVE */
|
||||
|
||||
icalproperty_remove_parameter(p,ICAL_PARTSTAT_PARAMETER);
|
||||
|
||||
/* Don't forget to free it */
|
||||
icalparameter_free(parameter);
|
||||
|
||||
/* Add a new one */
|
||||
icalproperty_add_parameter(
|
||||
p,
|
||||
icalparameter_new_partstat(ICAL_PARTSTAT_TENTATIVE)
|
||||
);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
/* Here are some examples of manipulating properties */
|
||||
|
||||
void test_properties()
|
||||
{
|
||||
icalproperty *prop;
|
||||
icalparameter *param;
|
||||
icalvalue *value;
|
||||
|
||||
icalproperty *clone;
|
||||
|
||||
/* Create a new property */
|
||||
prop = icalproperty_vanew_comment(
|
||||
"Another Comment",
|
||||
icalparameter_new_cn("A Common Name 1"),
|
||||
icalparameter_new_cn("A Common Name 2"),
|
||||
icalparameter_new_cn("A Common Name 3"),
|
||||
icalparameter_new_cn("A Common Name 4"),
|
||||
0);
|
||||
|
||||
/* Iterate through all of the parameters in the property */
|
||||
for(param = icalproperty_get_first_parameter(prop,ICAL_ANY_PARAMETER);
|
||||
param != 0;
|
||||
param = icalproperty_get_next_parameter(prop,ICAL_ANY_PARAMETER)) {
|
||||
|
||||
printf("Prop parameter: %s\n",icalparameter_get_cn(param));
|
||||
}
|
||||
|
||||
/* Get a string representation of the property's value */
|
||||
printf("Prop value: %s\n",icalproperty_get_comment(prop));
|
||||
|
||||
/* Spit out the property in its RFC 2445 representation */
|
||||
printf("As iCAL string:\n %s\n",icalproperty_as_ical_string(prop));
|
||||
|
||||
/* Make a copy of the property. Caller owns the memory */
|
||||
clone = icalproperty_new_clone(prop);
|
||||
|
||||
/* Get a reference to the value within the clone property */
|
||||
value = icalproperty_get_value(clone);
|
||||
|
||||
printf("Value: %s",icalvalue_as_ical_string(value));
|
||||
|
||||
/* Free the original and the clone */
|
||||
icalproperty_free(clone);
|
||||
icalproperty_free(prop);
|
||||
|
||||
}
|
@ -1,210 +0,0 @@
|
||||
|
||||
|
||||
void acess_cap(void) {
|
||||
|
||||
/* Note, all routines that are prefixed with "caller_" are
|
||||
implemented by the caller of libical */
|
||||
|
||||
/* 1 Open a connection to a store. */
|
||||
|
||||
/* The caller is responsible for getting a socket to the server
|
||||
and negotiating the first stages of the CAP exchange. These can
|
||||
be fairly complex and varied for different operating systems,
|
||||
local vs remote usage, and for different authentication
|
||||
schemes, so the API does not try to simplify them. */
|
||||
|
||||
int sock = caller_create_socket_to_server();
|
||||
icalcstp *cstp = icalcstp_new(0,sock,sock);
|
||||
|
||||
caller_authenticate(cstp);
|
||||
|
||||
icalcsdb *csdb = icalcsdb_new(cstp);
|
||||
|
||||
/* 2 Create a new calendar for which user Bill can read and user Mary can
|
||||
read and write. See CAP draft 7.2.1.1.1. for the text of this example*/
|
||||
|
||||
/* This case requires setting up a TARGET, multiple OWNERs and
|
||||
multiple VCARs, so it creates a component and uses CSTP that
|
||||
than the CSDB interface.
|
||||
|
||||
icalcomponent *create = icalcaputil_new_create();
|
||||
|
||||
icalcomponent_add_property(create,
|
||||
icalproperty_new_target(
|
||||
strdup("cap://cal.example.com/relcal8")
|
||||
));
|
||||
|
||||
icalcomponent *cal =
|
||||
icalcomponent_vanew_vcalendar(
|
||||
icalproperty_new_relcalid(strdup("relcalid")),
|
||||
icalproperty_new_name(strdup("Bill & Mary's cal")),
|
||||
icalproperty_new_owner(strdup("bill")),
|
||||
icalproperty_new_owner(strdup("mary")),
|
||||
icalproperty_new_calmaster(strdup("mailto:bill@example.com")),
|
||||
icalcomponent_vanew_vcar(
|
||||
icalproperty_new_grant(strdup("UPN=bill;ACTION=*;OBJECT=*")),
|
||||
icalproperty_new_grant(strdup("UPN=bill;ACTION=*;OBJECT=*"))
|
||||
0)
|
||||
0);
|
||||
|
||||
error = icalcomponent_add_component(create,cal);
|
||||
|
||||
/* Send the data */
|
||||
error = icalcstp_senddata(cstp,10,create);
|
||||
|
||||
|
||||
/* Get the response */
|
||||
icalcstp_response response = icalcstp_get_first_response(cstp);
|
||||
|
||||
/* Do something with the response*/
|
||||
|
||||
if(icalenum_reqstat_major(response.code) != 2){
|
||||
/* do something with the error */
|
||||
}
|
||||
|
||||
icalcomponent_free(create);
|
||||
|
||||
|
||||
/* 3 Create several new calendars */
|
||||
|
||||
/* Same as #2, but insert more TARGET properties and read more responses*/
|
||||
|
||||
/* 4 Delete a calendar */
|
||||
|
||||
error = icalcsdb_delete(csdb,"uid12345-example.com");
|
||||
|
||||
/* 5 Change the calid of a calendar */
|
||||
|
||||
erorr = icalcsdb_move(csdb,"uid12345-old-example.com",
|
||||
"uid12345-new-example.com");
|
||||
|
||||
|
||||
/* 6 Delete all calendars belonging to user bob */
|
||||
|
||||
icalproperty *p;
|
||||
/* First expand bob's UPN into a set of CALIDs */
|
||||
icalcomponent *calids = icalcsdb_expand_upn("bob@example.com");
|
||||
|
||||
/* Then, create a message to delete all of them */
|
||||
icalcomponent *delete = icalcaputil_new_create();
|
||||
|
||||
|
||||
for(p = icalcomponent_get_first_property(calids,ICAL_CALID_PROPERTY);
|
||||
p != 0;
|
||||
p = icalcomponent_get_next_property(calids,ICAL_CALID_PROPERTY)){
|
||||
|
||||
char* = icalproperty_get_calid(p);
|
||||
|
||||
icalcomponent_add_target(delete,p);
|
||||
|
||||
}
|
||||
|
||||
/* Send the message */
|
||||
|
||||
error = icalcstp_senddata(cstp,10,delete);
|
||||
|
||||
/* Finally, read the responses */
|
||||
|
||||
for(response = icalcstp_get_first_response(cstp);
|
||||
response.code != ICAL_UNKNOWN_STATUS;
|
||||
response = icalcstp_get_next_response(cstp)){
|
||||
|
||||
if(icalenum_reqstat_major(response.code) != 2){
|
||||
/* do something with the error */
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/* 7 Get three new UIDs from the store */
|
||||
|
||||
/* libical owns the returned memory. Copy before using */
|
||||
char* uid1 = icalcsdb_generateuid(csdb);
|
||||
char* uid2 = icalcsdb_generateuid(csdb);
|
||||
char* uid3 = icalcsdb_generateuid(csdb);
|
||||
|
||||
/* 8 Store a new VEVENT in the store. */
|
||||
|
||||
/* Very similar to case #2 */
|
||||
|
||||
/* 9 Find all components for which the LOCATION is "West Conference
|
||||
Room" and change them to "East Conference Room" */
|
||||
|
||||
icalcomponent *modify = icalcaputil_new_modify();
|
||||
|
||||
icalcaputil_modify_add_old_prop(modify,
|
||||
icalproperty_new_location(
|
||||
strdup("West Conference Room")));
|
||||
|
||||
icalcaputil_modify_add_new_prop(modify,
|
||||
icalproperty_new_location(
|
||||
strdup("East Conference Room")));
|
||||
|
||||
icalcaputil_add_target(modify,"relcal2");
|
||||
|
||||
/* Send the component */
|
||||
error = icalcstp_senddata(cstp,10,delete);
|
||||
|
||||
/* Get the response */
|
||||
icalcstp_response response = icalcstp_get_first_response(cstp);
|
||||
|
||||
/* Do something with the response*/
|
||||
|
||||
if(icalenum_reqstat_major(response.code) != 2){
|
||||
/* do something with the error */
|
||||
}
|
||||
|
||||
icalcomponent_free(modify);
|
||||
|
||||
/* 10 Find the component with UID X and add a GEO property to it. */
|
||||
|
||||
|
||||
icalcomponent *modify = icalcaputil_new_modify();
|
||||
|
||||
icalcaputil_modify_add_query(modify,
|
||||
"SELECT UID FROM VEVENT WHERE UID = 'X'");
|
||||
|
||||
icalcaputil_modify_add_new_prop(modify,
|
||||
icalproperty_new_geo(
|
||||
strdup("-117;32")));
|
||||
|
||||
icalcaputil_add_target(modify,"relcal2");
|
||||
|
||||
/* Send the component */
|
||||
error = icalcstp_senddata(cstp,10,delete);
|
||||
|
||||
/* Get the response */
|
||||
icalcstp_response response = icalcstp_get_first_response(cstp);
|
||||
|
||||
/* Do something with the response*/
|
||||
|
||||
if(icalenum_reqstat_major(response.code) != 2){
|
||||
/* do something with the error */
|
||||
}
|
||||
|
||||
icalcomponent_free(modify);
|
||||
|
||||
|
||||
/* 11 Delete all VEVENTS which have a METHOD that is not CREATED */
|
||||
|
||||
|
||||
/* 12 Retrieve all VEVENTS which have a METHOD that is not CREATED */
|
||||
|
||||
/* Nearly the same at #11 */
|
||||
|
||||
/* 13 Retrieve the capabilities of the store */
|
||||
|
||||
/* 14 Retrieve/Modify/Add/Delete properties of a store */
|
||||
|
||||
/* 15 Retrieve/Modify/Add/Delete VCARs of a store */
|
||||
|
||||
/* 16 Retrieve/Modify/Add/Delete VTIMEZONEs of a store */
|
||||
|
||||
/* 17 Retrieve/Modify/Add/Delete properties of a calendar */
|
||||
|
||||
/* 18 Retrieve/Modify/Add/Delete VCARs of a calendar */
|
||||
|
||||
/* 19 Retrieve/Modify/Add/Delete VTIMEZONEs of a calendar */
|
||||
|
||||
/* 20 Translate a CALID into one or more UPNs */
|
||||
|
||||
/* 21 Expand a group UPN into all of the members of the group */
|
@ -1,4 +0,0 @@
|
||||
s/icalcluster/icalfileset/g;
|
||||
s/ICALCLUSTER/ICALFILESET/g;
|
||||
s/icalstore/icaldirset/g;
|
||||
s/ICALSTORE/ICALDIRSET/g;
|
@ -1,70 +0,0 @@
|
||||
/* errors.c */
|
||||
|
||||
#include "ical.h"
|
||||
#include <stdio.h>
|
||||
|
||||
void program_errors()
|
||||
{
|
||||
/*Most routines will set icalerrno on errors. This is an
|
||||
enumeration defined in icalerror.h */
|
||||
|
||||
icalcomponent *c;
|
||||
|
||||
icalerror_clear_errno();
|
||||
|
||||
c = icalcomponent_new(ICAL_VEVENT_COMPONENT);
|
||||
|
||||
if (icalerrno != ICAL_NO_ERROR){
|
||||
|
||||
fprintf(stderr,"Horrible libical error: %s\n",
|
||||
icalerror_strerror(icalerrno));
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
void component_errors(icalcomponent *comp)
|
||||
{
|
||||
int errors;
|
||||
icalproperty *p;
|
||||
|
||||
/* presume that we just got this component from the parser */
|
||||
|
||||
errors = icalcomponent_count_errors(comp);
|
||||
|
||||
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,
|
||||
as icalcomponent_count_errors() does. */
|
||||
|
||||
for(p = icalcomponent_get_first_property(comp,ICAL_XLICERROR_PROPERTY);
|
||||
p != 0;
|
||||
p = icalcomponent_get_next_property(comp,ICAL_XLICERROR_PROPERTY))
|
||||
{
|
||||
|
||||
printf("-- The error is %s:\n",icalproperty_get_xlicerror(p));
|
||||
}
|
||||
|
||||
|
||||
|
||||
/* Check the component for iTIP compilance, and add more
|
||||
X-LIC-ERROR properties if it is non-compilant. */
|
||||
icalrestriction_check(comp);
|
||||
|
||||
|
||||
/* Count the new errors. */
|
||||
if(errors != icalcomponent_count_errors(comp)){
|
||||
printf(" -- The component also has iTIP restriction errors \n");
|
||||
}
|
||||
|
||||
/* Since there are iTIP restriction errors, it may be impossible
|
||||
to process this component as an iTIP request. In this case, the
|
||||
X-LIC-ERROR proeprties should be expressed as REQUEST-STATUS
|
||||
properties in the reply. This following routine makes this
|
||||
conversion */
|
||||
|
||||
|
||||
icalcomponent_convert_errors(comp);
|
||||
|
||||
}
|
@ -1,12 +0,0 @@
|
||||
/* This is just to make the code in the example directory link properly. */
|
||||
#include "ical.h"
|
||||
|
||||
int main()
|
||||
{
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
||||
void do_something(icalcomponent* comp){
|
||||
}
|
@ -1,68 +0,0 @@
|
||||
/* parse_text.c
|
||||
|
||||
*/
|
||||
#include <stdio.h>
|
||||
#include <errno.h>
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#include "ical.h"
|
||||
|
||||
#include <stdlib.h>
|
||||
|
||||
/* The icalparser_get_line routine will create a single *content* line
|
||||
out of one or more input lines. The content line is all of the
|
||||
properties and values for a single property, and it can span several
|
||||
input lines. So, icalparser_get_line will need to be able to get more
|
||||
data on its own. Read_string is a routine that does this. You can
|
||||
write your own version of read stream to get data from other types of
|
||||
files, sockets, etc. */
|
||||
|
||||
char* read_stream(char *s, size_t size, void *d)
|
||||
{
|
||||
char *c = fgets(s,size, (FILE*)d);
|
||||
|
||||
return c;
|
||||
|
||||
}
|
||||
|
||||
void parse_text(int argc, char* argv[])
|
||||
{
|
||||
|
||||
char* line;
|
||||
FILE* stream;
|
||||
icalcomponent *c;
|
||||
|
||||
/* Create a new parser object */
|
||||
icalparser *parser = icalparser_new();
|
||||
|
||||
stream = fopen(argv[1],"r");
|
||||
|
||||
assert(stream != 0);
|
||||
|
||||
/* Tell the parser what input routie it should use. */
|
||||
icalparser_set_gen_data(parser,stream);
|
||||
|
||||
do{
|
||||
|
||||
/* Get a single content line by making one or more calls to
|
||||
read_stream()*/
|
||||
line = icalparser_get_line(parser,read_stream);
|
||||
|
||||
/* Now, add that line into the parser object. If that line
|
||||
completes a component, c will be non-zero */
|
||||
c = icalparser_add_line(parser,line);
|
||||
|
||||
|
||||
if (c != 0){
|
||||
printf("%s",icalcomponent_as_ical_string(c));
|
||||
|
||||
printf("\n---------------\n");
|
||||
|
||||
icalcomponent_free(c);
|
||||
}
|
||||
|
||||
} while ( line != 0);
|
||||
|
||||
|
||||
icalparser_free(parser);
|
||||
}
|
@ -1,90 +0,0 @@
|
||||
/* -*- Mode: C -*-
|
||||
======================================================================
|
||||
FILE: usecases.c
|
||||
CREATOR: eric 03 April 1999
|
||||
|
||||
DESCRIPTION:
|
||||
|
||||
$Id: usecases.c,v 1.1 2001/12/21 19:03:54 mikep%oeone.com Exp $
|
||||
$Locker: $
|
||||
|
||||
(C) COPYRIGHT 1999 Eric Busboom
|
||||
http://www.softwarestudio.org
|
||||
|
||||
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 usecases.c
|
||||
|
||||
|
||||
======================================================================*/
|
||||
|
||||
#include "ical.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"
|
||||
|
||||
char str[] = "BEGIN:VCALENDAR\
|
||||
PRODID:\"-//RDU Software//NONSGML HandCal//EN\"\
|
||||
VERSION:2.0\
|
||||
BEGIN:VEVENT\
|
||||
DTSTAMP:19980309T231000Z\
|
||||
UID:guid-1.host1.com\
|
||||
ORGANIZER;ROLE=CHAIR:MAILTO:mrbig@host.com\
|
||||
ATTENDEE;RSVP=TRUE;ROLE=REQ-PARTICIPANT;CUTYPE=GROUP:MAILTO:employee-A@host.com\
|
||||
DESCRIPTION:Project XYZ Review Meeting\
|
||||
CATEGORIES:MEETING\
|
||||
CREATED:19980309T130000Z\
|
||||
SUMMARY:XYZ Project Review\
|
||||
DTSTART;TZID=US-Eastern:19980312T083000\
|
||||
DTEND;TZID=US-Eastern:19980312T093000\
|
||||
END:VEVENT\
|
||||
END:VCALENDAR";
|
||||
|
||||
|
||||
|
||||
|
||||
/* Here are some ways to work with values. */
|
||||
void test_values()
|
||||
{
|
||||
icalvalue *v;
|
||||
icalvalue *copy;
|
||||
|
||||
v = icalvalue_new_caladdress("cap://value/1");
|
||||
printf("caladdress 1: %s\n",icalvalue_get_caladdress(v));
|
||||
|
||||
icalvalue_set_caladdress(v,"cap://value/2");
|
||||
printf("caladdress 2: %s\n",icalvalue_get_caladdress(v));
|
||||
printf("String: %s\n",icalvalue_as_ical_string(v));
|
||||
|
||||
copy = icalvalue_new_clone(v);
|
||||
printf("Clone: %s\n",icalvalue_as_ical_string(v));
|
||||
icalvalue_free(v);
|
||||
icalvalue_free(copy);
|
||||
|
||||
|
||||
}
|
||||
|
||||
void test_parameters()
|
||||
{
|
||||
icalparameter *p;
|
||||
|
||||
p = icalparameter_new_cn("A Common Name");
|
||||
|
||||
printf("Common Name: %s\n",icalparameter_get_cn(p));
|
||||
|
||||
printf("As String: %s\n",icalparameter_as_ical_string(p));
|
||||
}
|
||||
|
||||
|
@ -1,25 +0,0 @@
|
||||
#
|
||||
# The contents of this file are subject to the Netscape Public
|
||||
# License Version 1.1 (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/NPL/
|
||||
#
|
||||
# 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 Code is mozilla.org code.
|
||||
#
|
||||
# The Initial Developer of the Original Code is Netscape
|
||||
# Communications Corporation. Portions created by Netscape are
|
||||
# Copyright (C) 1998 Netscape Communications Corporation. All
|
||||
# Rights Reserved.
|
||||
#
|
||||
# Contributor(s):
|
||||
|
||||
DEPTH=..\..
|
||||
|
||||
DIRS = src
|
||||
|
||||
!include $(DEPTH)\config\rules.mak
|
@ -1,9 +0,0 @@
|
||||
EXTRA_DIST = \
|
||||
mkderivedcomponents.pl \
|
||||
mkderivedparameters.pl \
|
||||
mkderivedproperties.pl \
|
||||
mkderivedvalues.pl \
|
||||
mkparameterrestrictions.pl \
|
||||
mkrestrictionrecords.pl \
|
||||
mkrestrictiontable.pl \
|
||||
readvaluesfile.pl
|
@ -1,170 +0,0 @@
|
||||
#!/usr/bin/env perl
|
||||
|
||||
use Getopt::Std;
|
||||
getopts('chspi:');
|
||||
|
||||
|
||||
# ARG 0 is components.txt
|
||||
open(PV,"$ARGV[0]") || die "Can't open components file $ARGV[0]:$!";
|
||||
|
||||
my @components;
|
||||
|
||||
while (<PV>){
|
||||
|
||||
s/#.*//;
|
||||
|
||||
chop;
|
||||
|
||||
push(@components,$_);
|
||||
|
||||
}
|
||||
|
||||
close PV;
|
||||
|
||||
# Write the file inline by copying everything before a demarcation
|
||||
# line, and putting the generated data after the demarcation
|
||||
|
||||
if ($opt_i) {
|
||||
|
||||
open(IN,$opt_i) || die "Can't open input file \"$opt_i\"";
|
||||
|
||||
while(<IN>){
|
||||
|
||||
if (/Do not edit/){
|
||||
last;
|
||||
}
|
||||
|
||||
print;
|
||||
|
||||
}
|
||||
|
||||
if($opt_i){
|
||||
print "# Everything below this line is machine generated. Do not edit. \n";
|
||||
} else {
|
||||
print "/* Everything below this line is machine generated. Do not edit. */\n";
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
if ($opt_c or $opt_h and !$opt_i){
|
||||
|
||||
print <<EOM;
|
||||
/* -*- Mode: C -*-
|
||||
======================================================================
|
||||
FILE: icalderivedproperties.{c,h}
|
||||
CREATOR: eric 09 May 1999
|
||||
|
||||
\044Id:\044
|
||||
|
||||
(C) COPYRIGHT 1999 Eric Busboom
|
||||
http://www.softwarestudio.org
|
||||
|
||||
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 FILE IS MACHINE GENERATED DO NOT EDIT
|
||||
*/
|
||||
|
||||
#include <stdarg.h> /* for va_arg functions */
|
||||
|
||||
EOM
|
||||
|
||||
}
|
||||
|
||||
if ($opt_p and !$opt_i){
|
||||
|
||||
print <<EOM;
|
||||
|
||||
EOM
|
||||
|
||||
}
|
||||
|
||||
|
||||
foreach $comp (@components) {
|
||||
|
||||
next if !$comp;
|
||||
|
||||
my $ucf = join("",map {ucfirst(lc($_));} split(/-/,$comp));
|
||||
my $lc = lc($ucf);
|
||||
my $uc = uc($lc);
|
||||
|
||||
if($opt_c) { # Make C source
|
||||
print<<EOM;
|
||||
|
||||
/* $comp */
|
||||
|
||||
icalcomponent* icalcomponent_new_${lc}()
|
||||
{
|
||||
return (icalcomponent*)icalcomponent_new_impl(ICAL_${uc}_COMPONENT);
|
||||
}
|
||||
|
||||
icalcomponent* icalcomponent_vanew_${lc}(...)
|
||||
{
|
||||
va_list args;
|
||||
struct icalcomponent_impl *impl = icalcomponent_new_impl(ICAL_${uc}_component);
|
||||
|
||||
va_start(args,v);
|
||||
icalcomponent_add_properties(impl, args);
|
||||
va_end(args);
|
||||
|
||||
return (icalcomponent*)impl;
|
||||
}
|
||||
|
||||
EOM
|
||||
|
||||
|
||||
} elsif ($opt_h) { # Make a C header
|
||||
print<<EOM;
|
||||
|
||||
/* $comp */
|
||||
icalcomponent* icalcomponent_new_${lc}();
|
||||
icalcomponent* icalcomponent_vanew_${lc}(...);
|
||||
EOM
|
||||
|
||||
} elsif ($opt_s) { # Make something for a switch statement
|
||||
|
||||
print <<EOM;
|
||||
case ICAL_${uc}_PROPERTY:
|
||||
EOM
|
||||
|
||||
} elsif ($opt_p) { # make perl source
|
||||
|
||||
print <<EOM;
|
||||
|
||||
# $comp
|
||||
package Net::ICal::Component::${ucf};
|
||||
\@ISA=qw(Net::ICal::Component);
|
||||
|
||||
sub new
|
||||
{
|
||||
my \$package = shift;
|
||||
my \$c = Net::ICal::icalcomponent_new(\$Net::ICal::ICAL_${uc}_COMPONENT);
|
||||
|
||||
my \$self = Net::ICal::Component::new_from_ref(\$c);
|
||||
Net::ICal::Component::_add_elements(\$self,\\\@_);
|
||||
|
||||
# Self is blessed in new_from_ref
|
||||
|
||||
return \$self;
|
||||
|
||||
}
|
||||
EOM
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
@ -1,324 +0,0 @@
|
||||
#!/usr/bin/env perl
|
||||
|
||||
require "readvaluesfile.pl";
|
||||
|
||||
use Getopt::Std;
|
||||
getopts('chspi:');
|
||||
|
||||
%no_xname = (RELATED=>1,RANGE=>1,RSVP=>1,XLICERRORTYPE=>1,XLICCOMPARETYPE=>1);
|
||||
|
||||
%params = read_parameters_file($ARGV[0]);
|
||||
|
||||
|
||||
# Write the file inline by copying everything before a demarcation
|
||||
# line, and putting the generated data after the demarcation
|
||||
|
||||
if ($opt_i) {
|
||||
|
||||
open(IN,$opt_i) || die "Can't open input file $opt_i";
|
||||
|
||||
while(<IN>){
|
||||
if (/<insert_code_here>/){
|
||||
insert_code();
|
||||
} else {
|
||||
print;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
if($opt_p){
|
||||
print "# Everything below this line is machine generated. Do not edit. \n";
|
||||
} else {
|
||||
print "/* Everything below this line is machine generated. Do not edit. */\n";
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
sub insert_code
|
||||
{
|
||||
|
||||
# Write parameter string map
|
||||
if ($opt_c){
|
||||
}
|
||||
|
||||
# Write parameter enumerations and datatypes
|
||||
|
||||
if($opt_h){
|
||||
print "typedef enum icalparameter_kind {\n ICAL_ANY_PARAMETER = 0,\n";
|
||||
foreach $param (sort keys %params) {
|
||||
|
||||
next if !$param;
|
||||
|
||||
next if $param eq 'NO' or $param eq 'ANY';
|
||||
|
||||
my $uc = join("",map {uc($_);} split(/-/,$param));
|
||||
|
||||
my @enums = @{$params{$param}->{'enums'}};
|
||||
|
||||
print " ICAL_${uc}_PARAMETER, \n";
|
||||
|
||||
}
|
||||
print " ICAL_NO_PARAMETER\n} icalparameter_kind;\n\n";
|
||||
|
||||
# Now create enumerations for parameter values
|
||||
$idx = 20000;
|
||||
|
||||
print "#define ICALPARAMETER_FIRST_ENUM $idx\n\n";
|
||||
|
||||
foreach $param (sort keys %params) {
|
||||
|
||||
next if !$param;
|
||||
|
||||
next if $param eq 'NO' or $prop eq 'ANY';
|
||||
|
||||
my $type = $params{$param}->{"C"};
|
||||
my $ucv = join("",map {uc(lc($_));} split(/-/,$param));
|
||||
my @enums = @{$params{$param}->{'enums'}};
|
||||
|
||||
if(@enums){
|
||||
|
||||
print "typedef enum $type {\n";
|
||||
my $first = 1;
|
||||
|
||||
unshift(@enums,"X");
|
||||
|
||||
push(@enums,"NONE");
|
||||
|
||||
foreach $e (@enums) {
|
||||
if (!$first){
|
||||
print ",\n";
|
||||
} else {
|
||||
$first = 0;
|
||||
}
|
||||
|
||||
my $uce = join("",map {uc(lc($_));} split(/-/,$e));
|
||||
|
||||
print " ICAL_${ucv}_${uce} = $idx";
|
||||
|
||||
$idx++;
|
||||
}
|
||||
$c_type =~ s/enum //;
|
||||
|
||||
print "\n} $type;\n\n";
|
||||
}
|
||||
}
|
||||
|
||||
print "#define ICALPARAMETER_LAST_ENUM $idx\n\n";
|
||||
|
||||
}
|
||||
|
||||
if ($opt_c){
|
||||
|
||||
# Create the icalparameter_value to icalvalue_kind conversion table
|
||||
print "struct icalparameter_value_kind_map value_kind_map[] = {\n";
|
||||
|
||||
foreach $enum (@{$params{'VALUE'}->{'enums'}}){
|
||||
next if $enum eq 'NO' or $enum eq 'ERROR';
|
||||
$uc = join("",map {uc(lc($_));} split(/-/,$enum));
|
||||
print " {ICAL_VALUE_${uc},ICAL_${uc}_VALUE},\n";
|
||||
}
|
||||
|
||||
print " {ICAL_VALUE_X,ICAL_X_VALUE},\n";
|
||||
print " {ICAL_VALUE_NONE,ICAL_NO_VALUE}\n};\n\n";
|
||||
|
||||
#Create the parameter Name map
|
||||
print "static struct icalparameter_kind_map parameter_map[] = { \n";
|
||||
|
||||
foreach $param (sort keys %params) {
|
||||
|
||||
next if !$param;
|
||||
|
||||
next if $param eq 'NO' or $prop eq 'ANY';
|
||||
|
||||
my $lc = join("",map {lc($_);} split(/-/,$param));
|
||||
my $uc = join("",map {uc(lc($_));} split(/-/,$param));
|
||||
|
||||
|
||||
print " {ICAL_${uc}_PARAMETER,\"$param\"},\n";
|
||||
|
||||
}
|
||||
|
||||
print " { ICAL_NO_PARAMETER, \"\"}\n};\n\n";
|
||||
|
||||
# Create the parameter value map
|
||||
|
||||
print "static struct icalparameter_map icalparameter_map[] = {\n";
|
||||
print "{ICAL_ANY_PARAMETER,0,\"\"},\n";
|
||||
|
||||
foreach $param (sort keys %params) {
|
||||
|
||||
next if !$param;
|
||||
|
||||
next if $param eq 'NO' or $prop eq 'ANY';
|
||||
|
||||
my $type = $params{$param}->{"C"};
|
||||
my $uc = join("",map {uc(lc($_));} split(/-/,$param));
|
||||
my @enums = @{$params{$param}->{'enums'}};
|
||||
|
||||
if(@enums){
|
||||
|
||||
foreach $e (@enums){
|
||||
my $uce = join("",map {uc(lc($_));} split(/-/,$e));
|
||||
|
||||
print " {ICAL_${uc}_PARAMETER,ICAL_${uc}_${uce},\"$e\"},\n";
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
print " {ICAL_NO_PARAMETER,0,\"\"}};\n\n";
|
||||
|
||||
}
|
||||
|
||||
foreach $param (keys %params){
|
||||
|
||||
my $type = $params{$param}->{'C'};
|
||||
|
||||
my $ucf = join("",map {ucfirst(lc($_));} split(/-/,$param));
|
||||
|
||||
my $lc = lc($ucf);
|
||||
my $uc = uc($lc);
|
||||
|
||||
my $charorenum;
|
||||
my $set_code;
|
||||
my $pointer_check;
|
||||
my $pointer_check_v;
|
||||
my $xrange;
|
||||
|
||||
if ($type=~/char/ ) {
|
||||
|
||||
$charorenum = " icalerror_check_arg_rz( (param!=0), \"param\");\n return ($type)((struct icalparameter_impl*)param)->string;";
|
||||
|
||||
$set_code = "((struct icalparameter_impl*)param)->string = icalmemory_strdup(v);";
|
||||
|
||||
$pointer_check = "icalerror_check_arg_rz( (v!=0),\"v\");";
|
||||
$pointer_check_v = "icalerror_check_arg_rv( (v!=0),\"v\");";
|
||||
|
||||
} else {
|
||||
|
||||
$xrange =" if ( ((struct icalparameter_impl*)param)->string != 0){\n return ICAL_${uc}_X;\n }\n" if !exists $no_xname{$uc};
|
||||
|
||||
$charorenum= "icalerror_check_arg( (param!=0), \"param\");\n$xrange\nreturn ($type)((struct icalparameter_impl*)param)->data;";
|
||||
|
||||
$pointer_check = "icalerror_check_arg_rz(v >= ICAL_${uc}_X,\"v\");\n icalerror_check_arg_rz(v < ICAL_${uc}_NONE,\"v\");";
|
||||
|
||||
$pointer_check_v = "icalerror_check_arg_rv(v >= ICAL_${uc}_X,\"v\");\n icalerror_check_arg_rv(v < ICAL_${uc}_NONE,\"v\");";
|
||||
|
||||
$set_code = "((struct icalparameter_impl*)param)->data = (int)v;";
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
if ($opt_c) {
|
||||
|
||||
print <<EOM;
|
||||
/* $param */
|
||||
icalparameter* icalparameter_new_${lc}($type v)
|
||||
{
|
||||
struct icalparameter_impl *impl;
|
||||
icalerror_clear_errno();
|
||||
$pointer_check
|
||||
impl = icalparameter_new_impl(ICAL_${uc}_PARAMETER);
|
||||
if (impl == 0) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
icalparameter_set_${lc}((icalparameter*) impl,v);
|
||||
if (icalerrno != ICAL_NO_ERROR) {
|
||||
icalparameter_free((icalparameter*) impl);
|
||||
return 0;
|
||||
}
|
||||
|
||||
return (icalparameter*) impl;
|
||||
}
|
||||
|
||||
${type} icalparameter_get_${lc}(icalparameter* param)
|
||||
{
|
||||
icalerror_clear_errno();
|
||||
$charorenum
|
||||
}
|
||||
|
||||
void icalparameter_set_${lc}(icalparameter* param, ${type} v)
|
||||
{
|
||||
$pointer_check_v
|
||||
icalerror_check_arg_rv( (param!=0), "param");
|
||||
icalerror_clear_errno();
|
||||
|
||||
$set_code
|
||||
}
|
||||
|
||||
EOM
|
||||
|
||||
} elsif( $opt_h) {
|
||||
|
||||
print <<EOM;
|
||||
/* $param */
|
||||
icalparameter* icalparameter_new_${lc}($type v);
|
||||
${type} icalparameter_get_${lc}(icalparameter* value);
|
||||
void icalparameter_set_${lc}(icalparameter* value, ${type} v);
|
||||
|
||||
EOM
|
||||
|
||||
}
|
||||
|
||||
if ($opt_p) {
|
||||
|
||||
print <<EOM;
|
||||
|
||||
# $param
|
||||
|
||||
package Net::ICal::Parameter::${ucf};
|
||||
\@ISA=qw(Net::ICal::Parameter);
|
||||
|
||||
sub new
|
||||
{
|
||||
my \$self = [];
|
||||
my \$package = shift;
|
||||
my \$value = shift;
|
||||
|
||||
bless \$self, \$package;
|
||||
|
||||
my \$p;
|
||||
|
||||
if (\$value) {
|
||||
\$p = Net::ICal::icalparameter_new_from_string(\$Net::ICal::ICAL_${uc}_PARAMETER,\$value);
|
||||
} else {
|
||||
\$p = Net::ICal::icalparameter_new(\$Net::ICal::ICAL_${uc}_PARAMETER);
|
||||
}
|
||||
|
||||
\$self->[0] = \$p;
|
||||
|
||||
return \$self;
|
||||
}
|
||||
|
||||
sub get
|
||||
{
|
||||
my \$self = shift;
|
||||
my \$impl = \$self->_impl();
|
||||
|
||||
return Net::ICal::icalparameter_as_ical_string(\$impl);
|
||||
|
||||
}
|
||||
|
||||
sub set
|
||||
{
|
||||
# This is hard to implement, so I've punted for now.
|
||||
die "Set is not implemented";
|
||||
}
|
||||
|
||||
EOM
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
if ($opt_h){
|
||||
|
||||
print <<EOM;
|
||||
#endif /*ICALPARAMETER_H*/
|
||||
|
||||
EOM
|
||||
}
|
||||
|
||||
}
|
@ -1,247 +0,0 @@
|
||||
#!/usr/bin/env perl
|
||||
|
||||
require "readvaluesfile.pl";
|
||||
|
||||
use Getopt::Std;
|
||||
getopts('chspmi:');
|
||||
|
||||
# ARG 0 is properties.csv
|
||||
%propmap = read_properties_file($ARGV[0]);
|
||||
|
||||
# ARG 1 is value-types.txt
|
||||
%valuemap = read_values_file($ARGV[1]);
|
||||
|
||||
|
||||
$include_vanew = 1;
|
||||
|
||||
# Write the file inline by copying everything before a demarcation
|
||||
# line, and putting the generated data after the demarcation
|
||||
|
||||
if ($opt_i) {
|
||||
|
||||
open(IN,$opt_i) || die "Can't open input file $opt_i";
|
||||
|
||||
while(<IN>){
|
||||
|
||||
if (/<insert_code_here>/){
|
||||
insert_code();
|
||||
} else {
|
||||
print;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
sub fudge_data {
|
||||
my $prop = shift;
|
||||
|
||||
my $value = $propmap{$prop}->{'lic_value'};
|
||||
|
||||
if (!$value){
|
||||
die "Can't find value for property \"$prop\"\n";
|
||||
}
|
||||
my $ucf = join("",map {ucfirst(lc($_));} split(/-/,$prop));
|
||||
my $lc = lc($ucf);
|
||||
my $uc = uc($lc);
|
||||
|
||||
my $ucfvalue = join("",map {ucfirst(lc($_));} split(/-/,$value));
|
||||
my $lcvalue = lc($ucfvalue);
|
||||
my $ucvalue = uc($lcvalue);
|
||||
|
||||
my $type = $valuemap{$value}->{C}->[1];
|
||||
|
||||
return ($uc,$lc,$lcvalue,$ucvalue,$type);
|
||||
|
||||
}
|
||||
|
||||
sub insert_code {
|
||||
|
||||
# Create the property map data
|
||||
if($opt_c){
|
||||
|
||||
print "static struct icalproperty_map property_map[] = {\n";
|
||||
|
||||
foreach $prop (sort keys %propmap) {
|
||||
|
||||
next if !$prop;
|
||||
|
||||
next if $prop eq 'NO';
|
||||
|
||||
my ($uc,$lc,$lcvalue,$ucvalue,$type) = fudge_data($prop);
|
||||
|
||||
print "{ICAL_${uc}_PROPERTY,\"$prop\",ICAL_${ucvalue}_VALUE},\n";
|
||||
|
||||
}
|
||||
|
||||
$prop = "NO";
|
||||
|
||||
my ($uc,$lc,$lcvalue,$ucvalue,$type) = fudge_data($prop);
|
||||
|
||||
print "{ICAL_${uc}_PROPERTY,\"\",ICAL_NO_VALUE}};\n\n";
|
||||
|
||||
|
||||
print "static struct icalproperty_enum_map enum_map[] = {\n";
|
||||
|
||||
$idx = 10000;
|
||||
|
||||
foreach $value (sort keys %valuemap) {
|
||||
|
||||
next if !$value;
|
||||
next if $value eq 'NO' or $prop eq 'ANY';
|
||||
|
||||
my $ucv = join("",map {uc(lc($_));} split(/-/,$value));
|
||||
my @enums = @{$valuemap{$value}->{'enums'}};
|
||||
|
||||
if(@enums){
|
||||
|
||||
my ($c_autogen,$c_type) = @{$valuemap{$value}->{'C'}};
|
||||
|
||||
unshift(@enums,"X");
|
||||
push(@enums,"NONE");
|
||||
|
||||
foreach $e (@enums) {
|
||||
|
||||
my $uce = join("",map {uc(lc($_));} split(/-/,$e));
|
||||
|
||||
if($e ne "X" and $e ne "NONE"){
|
||||
$str = $e;
|
||||
} else {
|
||||
$str = "";
|
||||
}
|
||||
|
||||
print " {ICAL_${ucv}_PROPERTY,ICAL_${ucv}_${uce},\"$str\" }, /*$idx*/\n";
|
||||
|
||||
$idx++;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
print " {ICAL_NO_PROPERTY,0,\"\"}\n};\n\n";
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
if($opt_h){
|
||||
|
||||
# Create the property enumerations list
|
||||
print "typedef enum icalproperty_kind {\n ICAL_ANY_PROPERTY = 0,\n";
|
||||
foreach $prop (sort keys %propmap) {
|
||||
|
||||
next if !$prop;
|
||||
|
||||
next if $prop eq 'NO' or $prop eq 'ANY';
|
||||
|
||||
my ($uc,$lc,$lcvalue,$ucvalue,$type) = fudge_data($prop);
|
||||
|
||||
print " ICAL_${uc}_PROPERTY, \n";
|
||||
|
||||
}
|
||||
print " ICAL_NO_PROPERTY\n} icalproperty_kind;\n\n";
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
foreach $prop (sort keys %propmap) {
|
||||
|
||||
next if !$prop;
|
||||
|
||||
next if $prop eq 'NO' or $prop eq 'ANY';
|
||||
|
||||
my ($uc,$lc,$lcvalue,$ucvalue,$type) = fudge_data($prop);
|
||||
|
||||
|
||||
my $pointer_check;
|
||||
if ($type =~ /\*/){
|
||||
$pointer_check = "icalerror_check_arg_rz( (v!=0),\"v\");\n" if $type =~ /\*/;
|
||||
} elsif ( $type eq "void" ){
|
||||
$pointer_check = "icalerror_check_arg_rv( (v!=0),\"v\");\n" if $type =~ /\*/;
|
||||
|
||||
}
|
||||
|
||||
my $set_pointer_check = "icalerror_check_arg_rv( (v!=0),\"v\");\n" if $type =~ /\*/;
|
||||
|
||||
if($opt_c) { # Generate C source
|
||||
|
||||
if ($include_vanew) {
|
||||
print<<EOM;
|
||||
icalproperty* icalproperty_vanew_${lc}($type v, ...){
|
||||
va_list args;
|
||||
struct icalproperty_impl *impl = icalproperty_new_impl(ICAL_${uc}_PROPERTY); $pointer_check
|
||||
icalproperty_set_${lc}((icalproperty*)impl,v);
|
||||
va_start(args,v);
|
||||
icalproperty_add_parameters(impl, args);
|
||||
va_end(args);
|
||||
return (icalproperty*)impl;
|
||||
}
|
||||
EOM
|
||||
}
|
||||
print<<EOM;
|
||||
|
||||
/* $prop */
|
||||
icalproperty* icalproperty_new_${lc}($type v) {
|
||||
struct icalproperty_impl *impl = icalproperty_new_impl(ICAL_${uc}_PROPERTY); $pointer_check
|
||||
icalproperty_set_${lc}((icalproperty*)impl,v);
|
||||
return (icalproperty*)impl;
|
||||
}
|
||||
|
||||
EOM
|
||||
# Allow EXDATEs to take DATE values easily.
|
||||
if ($lc eq "exdate") {
|
||||
print<<EOM;
|
||||
void icalproperty_set_${lc}(icalproperty* prop, $type v){
|
||||
icalvalue *value;
|
||||
$set_pointer_check
|
||||
icalerror_check_arg_rv( (prop!=0),"prop");
|
||||
if (v.is_date)
|
||||
value = icalvalue_new_date(v);
|
||||
else
|
||||
value = icalvalue_new_datetime(v);
|
||||
icalproperty_set_value(prop,value);
|
||||
}
|
||||
EOM
|
||||
} else {
|
||||
|
||||
print<<EOM;
|
||||
void icalproperty_set_${lc}(icalproperty* prop, $type v){
|
||||
$set_pointer_check
|
||||
icalerror_check_arg_rv( (prop!=0),"prop");
|
||||
icalproperty_set_value(prop,icalvalue_new_${lcvalue}(v));
|
||||
}
|
||||
EOM
|
||||
}
|
||||
print<<EOM;
|
||||
$type icalproperty_get_${lc}(icalproperty* prop){
|
||||
icalerror_check_arg( (prop!=0),"prop");
|
||||
return icalvalue_get_${lcvalue}(icalproperty_get_value(prop));
|
||||
}
|
||||
EOM
|
||||
} elsif ($opt_h) { # Generate C Header file
|
||||
|
||||
|
||||
print "\
|
||||
/* $prop */\
|
||||
icalproperty* icalproperty_new_${lc}($type v);\
|
||||
void icalproperty_set_${lc}(icalproperty* prop, $type v);\
|
||||
$type icalproperty_get_${lc}(icalproperty* prop);";
|
||||
|
||||
|
||||
if ($include_vanew){
|
||||
print "icalproperty* icalproperty_vanew_${lc}($type v, ...);\n";
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
} # This brace terminates the main loop
|
||||
|
||||
|
||||
|
||||
if ($opt_h){
|
||||
|
||||
print "\n\n#endif /*ICALPROPERTY_H*/\n"
|
||||
}
|
||||
|
||||
}
|
@ -1,235 +0,0 @@
|
||||
#!/usr/bin/perl
|
||||
|
||||
use lib '.';
|
||||
|
||||
require 'readvaluesfile.pl';
|
||||
|
||||
use Getopt::Std;
|
||||
getopts('chi:');
|
||||
|
||||
#Options
|
||||
# c -> generate c code file
|
||||
# h-> generate header file
|
||||
|
||||
# Open with value-types.txt
|
||||
|
||||
my %h = read_values_file($ARGV[0]);
|
||||
|
||||
|
||||
# Write the file inline by copying everything before a demarcation
|
||||
# line, and putting the generated data after the demarcation
|
||||
|
||||
if ($opt_i) {
|
||||
|
||||
open(IN,$opt_i) || die "Can't open input file $opt_i";
|
||||
|
||||
while(<IN>){
|
||||
if (/<insert_code_here>/){
|
||||
insert_code();
|
||||
} else {
|
||||
print;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
sub insert_code
|
||||
{
|
||||
# Map type names to the value in the icalvalue_impl data union */
|
||||
|
||||
%union_map = (
|
||||
BOOLEAN => 'int',
|
||||
CALADDRESS=>'string',
|
||||
DATE=>'time',
|
||||
DATETIME=>'time',
|
||||
DATETIMEDATE=>'time',
|
||||
DATETIMEPERIOD=>'period',
|
||||
DURATION=>'duration',
|
||||
INTEGER=>'int',
|
||||
TEXT=>'string',
|
||||
URI=>'string',
|
||||
UTCOFFSET=>'int',
|
||||
QUERY=>'string',
|
||||
BINARY=>'string',
|
||||
X=>'string'
|
||||
);
|
||||
|
||||
|
||||
if($opt_h){
|
||||
|
||||
# First print out the value enumerations
|
||||
$idx = 5000;
|
||||
print "typedef enum icalvalue_kind {\n";
|
||||
print " ICAL_ANY_VALUE=$idx,\n";
|
||||
|
||||
foreach $value (keys %h) {
|
||||
|
||||
$idx++;
|
||||
my $ucv = join("",map {uc(lc($_));} split(/-/,$value));
|
||||
|
||||
next if $value eq "NO";
|
||||
|
||||
print " ICAL_${ucv}_VALUE=$idx,\n";
|
||||
}
|
||||
|
||||
$idx++;
|
||||
print " ICAL_NO_VALUE=$idx\n} icalvalue_kind ;\n\n";
|
||||
|
||||
# Now create enumerations for property values
|
||||
$idx = 10000;
|
||||
|
||||
print "#define ICALPROPERTY_FIRST_ENUM $idx\n\n";
|
||||
|
||||
foreach $value (sort keys %h) {
|
||||
|
||||
next if !$value;
|
||||
|
||||
next if $value eq 'NO' or $prop eq 'ANY';
|
||||
|
||||
my $ucv = join("",map {uc(lc($_));} split(/-/,$value));
|
||||
my @enums = @{$h{$value}->{'enums'}};
|
||||
|
||||
if(@enums){
|
||||
|
||||
my ($c_autogen,$c_type) = @{$h{$value}->{'C'}};
|
||||
print "typedef $c_type {\n";
|
||||
my $first = 1;
|
||||
|
||||
unshift(@enums,"X");
|
||||
|
||||
push(@enums,"NONE");
|
||||
|
||||
foreach $e (@enums) {
|
||||
if (!$first){
|
||||
print ",\n";
|
||||
} else {
|
||||
$first = 0;
|
||||
}
|
||||
|
||||
my $uce = join("",map {uc(lc($_));} split(/-/,$e));
|
||||
|
||||
print " ICAL_${ucv}_${uce} = $idx";
|
||||
|
||||
$idx++;
|
||||
}
|
||||
|
||||
$c_type =~ s/enum //;
|
||||
|
||||
print "\n} $c_type;\n\n";
|
||||
}
|
||||
}
|
||||
|
||||
print "#define ICALPROPERTY_LAST_ENUM $idx\n\n";
|
||||
|
||||
}
|
||||
|
||||
|
||||
if($opt_c){
|
||||
|
||||
# print out the value to string map
|
||||
|
||||
print "static struct icalvalue_kind_map value_map[]={\n";
|
||||
|
||||
foreach $value (keys %h) {
|
||||
|
||||
$idx++;
|
||||
my $ucv = join("",map {uc(lc($_));} split(/-/,$value));
|
||||
|
||||
next if $value eq "NO";
|
||||
|
||||
print " {ICAL_${ucv}_VALUE,\"$value\"},\n";
|
||||
}
|
||||
|
||||
|
||||
print " {ICAL_NO_VALUE,\"\"}\n};";
|
||||
|
||||
}
|
||||
|
||||
|
||||
foreach $value (keys %h) {
|
||||
|
||||
my $autogen = $h{$value}->{C}->[0];
|
||||
my $type = $h{$value}->{C}->[1];
|
||||
|
||||
my $ucf = join("",map {ucfirst(lc($_));} split(/-/,$value));
|
||||
|
||||
my $lc = lc($ucf);
|
||||
my $uc = uc($lc);
|
||||
|
||||
my $pointer_check = "icalerror_check_arg_rz( (v!=0),\"v\");\n" if $type =~ /\*/;
|
||||
my $pointer_check_rv = "icalerror_check_arg_rv( (v!=0),\"v\");\n" if $type =~ /\*/;
|
||||
|
||||
my $assign;
|
||||
|
||||
if ($type =~ /char/){
|
||||
$assign = "icalmemory_strdup(v);\n\n if (impl->data.v_string == 0){\n errno = ENOMEM;\n }\n";
|
||||
} else {
|
||||
$assign = "v;";
|
||||
}
|
||||
|
||||
my $union_data;
|
||||
|
||||
if(@{$h{$value}->{'enums'}}){
|
||||
$union_data = 'enum';
|
||||
|
||||
} elsif (exists $union_map{$uc} ){
|
||||
$union_data=$union_map{$uc};
|
||||
} else {
|
||||
$union_data = $lc;
|
||||
}
|
||||
|
||||
if ($opt_c && $autogen) {
|
||||
|
||||
print "\n\n\
|
||||
icalvalue* icalvalue_new_${lc} ($type v){\
|
||||
struct icalvalue_impl* impl = icalvalue_new_impl(ICAL_${uc}_VALUE);\
|
||||
$pointer_check\
|
||||
icalvalue_set_${lc}((icalvalue*)impl,v);\
|
||||
return (icalvalue*)impl;\
|
||||
}\
|
||||
void icalvalue_set_${lc}(icalvalue* value, $type v) {\
|
||||
struct icalvalue_impl* impl; \
|
||||
icalerror_check_arg_rv( (value!=0),\"value\");\
|
||||
$pointer_check_rv\
|
||||
icalerror_check_value_type(value, ICAL_${uc}_VALUE);\
|
||||
impl = (struct icalvalue_impl*)value;\n";
|
||||
|
||||
if( $union_data eq 'string') {
|
||||
|
||||
print " if(impl->data.v_${union_data}!=0) {free((void*)impl->data.v_${union_data});}\n";
|
||||
}
|
||||
|
||||
|
||||
print "\n\
|
||||
impl->data.v_$union_data = $assign \n\
|
||||
icalvalue_reset_kind(impl);\n}\n";
|
||||
|
||||
print "$type icalvalue_get_${lc}(icalvalue* value) {\n";
|
||||
if( $type =~ /^(int|const char\s?[*])$/) {
|
||||
print " icalerror_check_arg_rz( (value!=0),\"value\");\n";
|
||||
} else {
|
||||
print " icalerror_check_arg( (value!=0),\"value\");\n";
|
||||
}
|
||||
print " icalerror_check_value_type(value, ICAL_${uc}_VALUE);\
|
||||
return ((struct icalvalue_impl*)value)->data.v_${union_data};\n}\n";
|
||||
|
||||
|
||||
} elsif($opt_h && $autogen) {
|
||||
|
||||
print "\n /* $value */ \
|
||||
icalvalue* icalvalue_new_${lc}($type v); \
|
||||
$type icalvalue_get_${lc}(icalvalue* value); \
|
||||
void icalvalue_set_${lc}(icalvalue* value, ${type} v);\n\n";
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
if ($opt_h){
|
||||
print "#endif /*ICALVALUE_H*/\n";
|
||||
}
|
||||
|
||||
|
||||
}
|
@ -1,99 +0,0 @@
|
||||
#!/usr/local/bin/perl
|
||||
|
||||
$pr = 1;
|
||||
$ignore = 0;
|
||||
|
||||
|
||||
print<<EOM;
|
||||
/* -*- Mode: C -*-*/
|
||||
/*======================================================================
|
||||
FILE: ical.i
|
||||
|
||||
(C) COPYRIGHT 1999 Eric Busboom
|
||||
http://www.softwarestudio.org
|
||||
|
||||
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
|
||||
|
||||
Contributions from:
|
||||
Graham Davison (g.m.davison\@computer.org)
|
||||
|
||||
======================================================================*/
|
||||
|
||||
%module Net__ICal
|
||||
|
||||
%{
|
||||
#include "ical.h"
|
||||
|
||||
#include <sys/types.h> /* for size_t */
|
||||
#include <time.h>
|
||||
|
||||
%}
|
||||
|
||||
EOM
|
||||
|
||||
foreach $f (@ARGV)
|
||||
{
|
||||
@f = split(/\//,$f);
|
||||
$fn = pop(@f);
|
||||
|
||||
$fn=~/pvl/ && next;
|
||||
$fn=~/sspm/ && next;
|
||||
$fn=~/cstp/ && next;
|
||||
$fn=~/csdb/ && next;
|
||||
$fn=~/vcal/ && next;
|
||||
$fn=~/yacc/ && next;
|
||||
$fn=~/lex/ && next;
|
||||
|
||||
print "\n/**********************************************************************\n";
|
||||
|
||||
print "\t$fn\n";
|
||||
print "**********************************************************************/\n\n";
|
||||
|
||||
|
||||
open F, $f;
|
||||
|
||||
while(<F>){
|
||||
|
||||
s/^#.*//;
|
||||
|
||||
s/\/\*.*\*\///;
|
||||
|
||||
/^\/\// && next;
|
||||
|
||||
next if /^$/;
|
||||
|
||||
if(/\/\*/){ $pr = 0;}
|
||||
|
||||
/icalparser_parse\(/ and $ignore = 1;
|
||||
/vanew/ and $ignore = 1;
|
||||
/_stub/ and $ignore = 1;
|
||||
/_response/ and $ignore = 1;
|
||||
/line_gen_func/ and $ignore = 1;
|
||||
/extern/ and $ignore = 1;
|
||||
/sspm/ and $ignore = 1;
|
||||
/icalrecur/ and $ignore = 1;
|
||||
|
||||
if ($pr == 1 && $ignore == 0){
|
||||
print ;
|
||||
}
|
||||
|
||||
|
||||
if(/\*\//){ $pr = 1;}
|
||||
|
||||
if (/\;/){ $ignore = 0; }
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
@ -1,85 +0,0 @@
|
||||
#!/usr/bin/perl
|
||||
|
||||
# Version: 1.0
|
||||
# Script last updated: 30May1999 GMD
|
||||
# Change log:
|
||||
# <none>
|
||||
|
||||
|
||||
# usually open params-in-prop.txt
|
||||
open(F,"$ARGV[0]") || die "Can't open restriction file $ARGV[0]:$!";
|
||||
|
||||
print <<EOM;
|
||||
/*
|
||||
======================================================================
|
||||
File: parameterrestrictions.c
|
||||
|
||||
(C) COPYRIGHT 1999 Graham Davison
|
||||
mailto:g.m.davison\@computer.org
|
||||
|
||||
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 FILE IS MACHINE GENERATED DO NOT EDIT
|
||||
*/
|
||||
|
||||
|
||||
int icalrestriction_is_parameter_allowed(icalproperty_kind prop,icalparameter_kind param)
|
||||
{
|
||||
switch (prop)
|
||||
{
|
||||
EOM
|
||||
|
||||
while(<F>)
|
||||
{
|
||||
chop;
|
||||
|
||||
# split line by whitespace
|
||||
my @v = split(/\s+/,$_);
|
||||
# property is first item on line
|
||||
my $prop = shift @v;
|
||||
my $prop_name = $prop;
|
||||
if (substr($prop,0,1) eq "X") { $prop = "X"; }
|
||||
$prop = join("",split(/-/,$prop));
|
||||
|
||||
print <<EOM;
|
||||
|
||||
/* ${prop_name} */
|
||||
case ICAL_${prop}_PROPERTY:
|
||||
switch (param)
|
||||
{
|
||||
EOM
|
||||
|
||||
foreach $param (@v)
|
||||
{
|
||||
$param = join("",split(/-/,$param));
|
||||
print "\t\t\t\tcase ICAL_${param}_PARAMETER:\n";
|
||||
}
|
||||
|
||||
print <<EOM;
|
||||
return 1;
|
||||
default:
|
||||
return 0;
|
||||
}
|
||||
|
||||
EOM
|
||||
|
||||
}
|
||||
|
||||
print <<EOM;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
EOM
|
@ -1,109 +0,0 @@
|
||||
#!/usr/bin/env perl
|
||||
|
||||
# Version: 1.0
|
||||
# Script last updated: 30May1999 GMD
|
||||
# Change log:
|
||||
# <none>
|
||||
|
||||
# usually open restrictions.csv
|
||||
open(F,"$ARGV[0]") || die "Can't open restriction file $ARGV[0]:$!";
|
||||
|
||||
print <<EOM;
|
||||
/*
|
||||
======================================================================
|
||||
File: restrictionrecords.c
|
||||
|
||||
(C) COPYRIGHT 1999 Graham Davison
|
||||
mailto:g.m.davison\@computer.org
|
||||
|
||||
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 FILE IS MACHINE GENERATED DO NOT EDIT
|
||||
*/
|
||||
|
||||
|
||||
typedef struct icalrestriction_record {
|
||||
icalproperty_method method;
|
||||
icalcomponent_kind component;
|
||||
icalproperty_kind property;
|
||||
icalcomponent_kind subcomponent;
|
||||
icalrestriction_kind restriction;
|
||||
} icalrestriction_record;
|
||||
|
||||
|
||||
icalrestriction_record icalrestriction_records[] =
|
||||
{
|
||||
EOM
|
||||
|
||||
my $last_method = "";
|
||||
my $last_component = "";
|
||||
my $last_property = "";
|
||||
my $need_header = 0;
|
||||
|
||||
while(<F>)
|
||||
{
|
||||
chop;
|
||||
|
||||
# split line at commas
|
||||
my ($method,$component,$property,$subcomponent,$restriction)=split(/\,/,$_);
|
||||
|
||||
#
|
||||
#put in code to generate comments here!
|
||||
#
|
||||
if ($method ne $last_method)
|
||||
{
|
||||
$need_header = 1;
|
||||
$last_method = $method;
|
||||
}
|
||||
if ($component ne $last_component)
|
||||
{
|
||||
$need_header = 1;
|
||||
$last_component = $component;
|
||||
}
|
||||
|
||||
if ($need_header)
|
||||
{
|
||||
print "\n\t/* METHOD: ${method}, COMPONENT: ${component} */\n";
|
||||
$need_header = 0;
|
||||
}
|
||||
|
||||
foreach $item ($component,$property,$subcomponent,$restriction)
|
||||
{
|
||||
# handle special cases.
|
||||
if ($item eq "NONE")
|
||||
{ $item = "NO"; }
|
||||
else { if (substr($item,0,1) eq "X")
|
||||
{ $item = "X"; }}
|
||||
|
||||
# strip out dashes
|
||||
$item = join("",split(/-/,$item));
|
||||
}
|
||||
# strip leading V from component names
|
||||
$component =~ s/^(V?)(\w+?)((SAVINGS)?)((TIME)?)$/$2/;
|
||||
$subcomponent =~ s/^V(\w+)/$1/;
|
||||
|
||||
print "\t\{ICAL_METHOD_${method},ICAL_${component}_COMPONENT,";
|
||||
print "ICAL_${property}_PROPERTY,ICAL_${subcomponent}_COMPONENT,";
|
||||
print "ICAL_RESTRICTION_${restriction}\},\n";
|
||||
|
||||
}
|
||||
|
||||
print <<EOM;
|
||||
|
||||
/* END */
|
||||
{ICAL_METHOD_NONE,ICAL_NO_COMPONENT,ICAL_NO_PROPERTY,ICAL_NO_COMPONENT,ICAL_RESTRICTION_NONE}
|
||||
};
|
||||
EOM
|
@ -1,98 +0,0 @@
|
||||
#!/usr/bin/env perl
|
||||
|
||||
use Getopt::Std;
|
||||
getopts('i:');
|
||||
|
||||
# the argument should be the path to the restriction datafile, usually
|
||||
# design-data/restrictions.csv
|
||||
open(F,"$ARGV[0]") || die "Can't open restriction data file $ARGV[0]:$!";
|
||||
|
||||
# Write the file inline by copying everything before a demarcation
|
||||
# line, and putting the generated data after the demarcation
|
||||
|
||||
if ($opt_i) {
|
||||
|
||||
open(IN,$opt_i) || die "Can't open input file $opt_i";
|
||||
|
||||
while(<IN>){
|
||||
|
||||
if (/Do not edit/){
|
||||
last;
|
||||
}
|
||||
|
||||
print;
|
||||
|
||||
}
|
||||
|
||||
print "/* Everything below this line is machine generated. Do not edit. */\n";
|
||||
|
||||
|
||||
close IN;
|
||||
}
|
||||
|
||||
# First build the property restriction table
|
||||
print "icalrestriction_property_record icalrestriction_property_records[] = {\n";
|
||||
|
||||
while(<F>)
|
||||
{
|
||||
|
||||
chop;
|
||||
|
||||
s/\#.*$//;
|
||||
|
||||
my($method,$targetcomp,$prop,$subcomp,$restr,$sub) = split(/,/,$_);
|
||||
|
||||
next if !$method;
|
||||
|
||||
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 the terminating line
|
||||
print " {ICAL_METHOD_NONE,ICAL_NO_COMPONENT,ICAL_NO_PROPERTY,ICAL_RESTRICTION_NONE}\n";
|
||||
|
||||
print "};\n";
|
||||
|
||||
print "icalrestriction_component_record icalrestriction_component_records[] = {\n";
|
||||
|
||||
|
||||
# Go back through the entire file and build the component restriction table
|
||||
close(F);
|
||||
open(F,"$ARGV[0]") || die "Can't open restriction data file $ARGV[0]:$!";
|
||||
|
||||
while(<F>)
|
||||
{
|
||||
|
||||
chop;
|
||||
|
||||
s/\#.*$//;
|
||||
|
||||
my($method,$targetcomp,$prop,$subcomp,$restr,$sub) = split(/,/,$_);
|
||||
|
||||
next if !$method;
|
||||
|
||||
if(!$sub) {
|
||||
$sub = "0";
|
||||
} else {
|
||||
$sub = "icalrestriction_".$sub;
|
||||
}
|
||||
|
||||
|
||||
if($subcomp ne "NONE"){
|
||||
print(" \{ICAL_METHOD_${method},ICAL_${targetcomp}_COMPONENT,ICAL_${subcomp}_COMPONENT,ICAL_RESTRICTION_${restr},$sub\},\n");
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
# print the terminating line
|
||||
print " {ICAL_METHOD_NONE,ICAL_NO_COMPONENT,ICAL_NO_COMPONENT,ICAL_RESTRICTION_NONE}\n";
|
||||
print "};\n";
|
@ -1,133 +0,0 @@
|
||||
|
||||
|
||||
sub read_values_file {
|
||||
|
||||
my $path = shift;
|
||||
my %h;
|
||||
|
||||
open(F,$path) || die "Can't open values file $path";
|
||||
|
||||
while(<F>){
|
||||
|
||||
chomp;
|
||||
chop if($^O eq 'cygwin'); # cygwin perl doesn't chomp dos newlines properly so use chomp
|
||||
|
||||
s/#.*$//g;
|
||||
s/\"//g;
|
||||
|
||||
next if ! $_;
|
||||
|
||||
@column = split(/,/,$_);
|
||||
|
||||
my $value_name = $column[0];
|
||||
|
||||
my $c_type_str = $column[1];
|
||||
my $c_autogen = ($c_type_str =~ /\(a\)/);
|
||||
|
||||
my $c_type = $c_type_str;
|
||||
$c_type =~ s/\(.\)//;
|
||||
|
||||
my $python_type = $column[2];
|
||||
my $components = $column[3];
|
||||
my $enum_values = $column[4];
|
||||
|
||||
my @components;
|
||||
if($components ne "unitary"){
|
||||
@components = split(/;/,$components);
|
||||
} else {
|
||||
@components = ();
|
||||
}
|
||||
|
||||
my @enums;
|
||||
if($enum_values) {
|
||||
@enums = split(/;/,$enum_values);
|
||||
|
||||
} else {
|
||||
@enums = ();
|
||||
}
|
||||
|
||||
$h{$value_name} = { C => [$c_autogen,$c_type],
|
||||
perl => $perl_type,
|
||||
python => $python_type,
|
||||
components=>[@components],
|
||||
enums=>[@enums]
|
||||
};
|
||||
}
|
||||
|
||||
return %h;
|
||||
}
|
||||
|
||||
sub read_properties_file {
|
||||
|
||||
my $path = shift;
|
||||
my %h;
|
||||
|
||||
open(F,$path) || die "Can't open properties file $path";
|
||||
|
||||
while(<F>){
|
||||
|
||||
chomp;
|
||||
chop if($^O eq 'cygwin'); # cygwin perl doesn't chomp dos newlines properly so use chomp
|
||||
|
||||
s/#.*$//g;
|
||||
s/\"//g;
|
||||
|
||||
next if ! $_;
|
||||
|
||||
@column = split(/,/,$_);
|
||||
|
||||
my $property_name = $column[0];
|
||||
|
||||
my $lic_value = $column[1];
|
||||
my $default_value = $column[2];
|
||||
|
||||
$h{$property_name} = { lic_value => $lic_value,
|
||||
default_value => $default_value
|
||||
};
|
||||
}
|
||||
|
||||
return %h;
|
||||
}
|
||||
|
||||
sub read_parameters_file {
|
||||
|
||||
my $path = shift;
|
||||
my %h;
|
||||
|
||||
open(F,$path) || die "Can't open parameters file $path";
|
||||
|
||||
while(<F>){
|
||||
|
||||
chomp;
|
||||
chop if($^O eq 'cygwin'); # cygwin perl doesn't chomp dos newlines properly so use chomp
|
||||
|
||||
s/#.*$//g;
|
||||
s/\"//g;
|
||||
|
||||
next if ! $_;
|
||||
|
||||
@column = split(/\,/,$_);
|
||||
|
||||
my $parameter_name = $column[0];
|
||||
|
||||
my $data_type = $column[1];
|
||||
my $enum_string = $column[2];
|
||||
|
||||
my @enums;
|
||||
if($enum_string){
|
||||
@enums = split(/;/,$enum_string);
|
||||
}
|
||||
|
||||
$h{$parameter_name} = { C => $data_type,
|
||||
enums => [@enums]
|
||||
};
|
||||
}
|
||||
|
||||
close(F);
|
||||
|
||||
return %h;
|
||||
}
|
||||
|
||||
|
||||
|
||||
1;
|
@ -1,8 +0,0 @@
|
||||
if WITH_PYTHON
|
||||
PYTHON_DIR = python
|
||||
else
|
||||
PYTHON_DIR =
|
||||
endif
|
||||
|
||||
# SUBDIRS = libical libicalss libicalvcal # $(PYTHON_DIR) test test-ss
|
||||
SUBDIRS = libical libicalss libicalvcal $(PYTHON_DIR) test
|
@ -1,33 +0,0 @@
|
||||
#
|
||||
# The contents of this file are subject to the Netscape Public
|
||||
# License Version 1.1 (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/NPL/
|
||||
#
|
||||
# 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 Code is mozilla.org code.
|
||||
#
|
||||
# The Initial Developer of the Original Code is Netscape
|
||||
# Communications Corporation. Portions created by Netscape are
|
||||
# Copyright (C) 1998 Netscape Communications Corporation. All
|
||||
# Rights Reserved.
|
||||
#
|
||||
# Contributor(s):
|
||||
|
||||
DEPTH=../../..
|
||||
|
||||
topsrcdir = @top_srcdir@
|
||||
srcdir = @srcdir@
|
||||
VPATH = @srcdir@
|
||||
|
||||
include $(DEPTH)/config/autoconf.mk
|
||||
|
||||
DIRS = libical \
|
||||
libicalss \
|
||||
$(NULL)
|
||||
|
||||
include $(topsrcdir)/config/rules.mk
|
@ -1,42 +0,0 @@
|
||||
#!/usr/bin/perl
|
||||
# -*- Mode: perl -*-
|
||||
|
||||
use ExtUtils::MakeMaker;
|
||||
WriteMakefile(
|
||||
'MAKEFILE'=> 'Makefile',
|
||||
'VERSION_FROM' => 'lib/Net/ICal/Libical.pm',
|
||||
'NAME' => 'Net::ICal::Libical',
|
||||
'INC' => '-I../libical -I ../libicalss',
|
||||
'LIBS' => ['-L../libical/.libs -L../libicalss/.libs -lical -licalss -lm'],
|
||||
'OBJECT' => 'netical_wrap.o', # Object files
|
||||
dist => {
|
||||
COMPRESS =>'gzip',
|
||||
SUFFIX =>'gz'
|
||||
},
|
||||
|
||||
);
|
||||
|
||||
sub MY::top_targets
|
||||
{
|
||||
my $self = shift;
|
||||
|
||||
my $old = $self->MM::top_targets;
|
||||
|
||||
return "all:: netical_wrap.o\n$old";
|
||||
|
||||
}
|
||||
|
||||
sub MY::postamble
|
||||
{
|
||||
|
||||
return <<EOM;
|
||||
|
||||
netical_wrap.c: netical.i
|
||||
swig -perl5 -package Net::ICal::Libical netical.i
|
||||
|
||||
wrap:
|
||||
swig -perl5 -package Net::ICal::Libical netical.i
|
||||
|
||||
|
||||
EOM
|
||||
}
|
@ -1,7 +0,0 @@
|
||||
|
||||
Net::ICal::Libical: A perl binding to libical.
|
||||
|
||||
This code is PRE-ALPHA. Some of the test routines work, but the code
|
||||
is not really useful. It is looking for an author, so if you'd like to
|
||||
have this binding working, please volunteer to work on it. Contact
|
||||
Eric Busboom, eric@softwarestudio.org
|
@ -1,386 +0,0 @@
|
||||
#!/usr/bin/perl
|
||||
# -*- Mode: perl -*-
|
||||
#======================================================================
|
||||
# FILE: Libical.pm
|
||||
# CREATOR: eric
|
||||
#
|
||||
# DESCRIPTION:
|
||||
#
|
||||
#
|
||||
# $Id: Libical.pm,v 1.1 2001/12/21 19:21:16 mikep%oeone.com Exp $
|
||||
# $Locker: $
|
||||
#
|
||||
# (C) COPYRIGHT 2000, Eric Busboom, http://www.softwarestudio.org
|
||||
#
|
||||
# This package is free software and is provided "as is" without express
|
||||
# or implied warranty. It may be used, redistributed and/or modified
|
||||
# under the same terms as perl itself. ( Either the Artistic License or the
|
||||
# GPL. )
|
||||
#
|
||||
#======================================================================
|
||||
|
||||
# This part of this file was automatically generated by SWIG
|
||||
|
||||
require Net::ICal::Libical::Component;
|
||||
require Net::ICal::Libical::Property;
|
||||
require Net::ICal::Libical::Time;
|
||||
require Net::ICal::Libical::Duration;
|
||||
|
||||
package Net::ICal::Libical;
|
||||
require Exporter;
|
||||
require DynaLoader;
|
||||
@ISA = qw(Exporter DynaLoader);
|
||||
package Net::ICal::Libical;
|
||||
bootstrap Net::ICal::Libical;
|
||||
var_Net__ICal__Libical_init();
|
||||
@EXPORT = qw( );
|
||||
|
||||
$VERSION = "0.01";
|
||||
|
||||
1;
|
||||
|
||||
|
||||
|
||||
|
||||
sub validate_component {
|
||||
my $comp_str = shift;
|
||||
|
||||
|
||||
my $c = Net::ICal::Libical::icalparser_parse_string($comp_str);
|
||||
my $out;
|
||||
|
||||
die "Failed to parse component" if !$c;
|
||||
|
||||
my $r = Net::ICal::Libical::icalrestriction_check($c);
|
||||
|
||||
$out = Net::ICal::Libical::icalcomponent_as_ical_string($c);
|
||||
|
||||
Net::ICal::Libical::icalcomponent_free($c);
|
||||
|
||||
return $out;
|
||||
|
||||
}
|
||||
|
||||
|
||||
sub generate_occurrences {
|
||||
my $rule = shift;
|
||||
my $start = shift;
|
||||
my $count = shift;
|
||||
|
||||
my @out;
|
||||
|
||||
my $array = Net::ICal::Libical::icallangbind_new_array(25);
|
||||
|
||||
Net::ICal::Libical::icalrecur_expand_recurrence($rule,$start,
|
||||
$count,$array);
|
||||
|
||||
for($i = 0; $i<$count; $i++){
|
||||
my $t = Net::ICal::Libical::icallangbind_access_array($array,$i);
|
||||
if($t != 0) {
|
||||
push(@out,$t);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Net::ICal::Libical::icallangbind_free_array($array);
|
||||
|
||||
return @out;
|
||||
}
|
||||
|
||||
|
||||
# The remaining code is just the interface declarations for a complete
|
||||
# perl binding to libical. Currently, it is looking for an author....
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
1;
|
||||
|
||||
__END__
|
||||
|
||||
#""" Represent iCalendar DATE, TIME and DATE-TIME ""
|
||||
|
||||
package Net::ICal::Libical::Time;
|
||||
@ISA = (Property);
|
||||
|
||||
sub new {}
|
||||
|
||||
#"""Updates value and value_type based on the (internal) self.tt."""
|
||||
sub _update_value { }
|
||||
|
||||
# " Return true if this is a valid time "
|
||||
sub valid { }
|
||||
|
||||
# """ Return or set time in seconds past POSIX epoch"""
|
||||
sub utc_seconds {}
|
||||
|
||||
# """ Return or set boolean indicating if time is in UTC """
|
||||
sub is_utc {}
|
||||
|
||||
# Get/Set booll indicating is time is a date
|
||||
sub is_date(self,v=None):
|
||||
|
||||
#"" Return or set the timezone string for this time """
|
||||
sub timezone {}
|
||||
|
||||
#"" Get or set the seconds component of this time """
|
||||
sub second {}
|
||||
sub minute {}
|
||||
sub hour {}
|
||||
sub day {}
|
||||
sub month {}
|
||||
sub year {}
|
||||
|
||||
# How dow you over load +,- in perl?
|
||||
|
||||
# Add duration to time = time
|
||||
sub __add__{}
|
||||
|
||||
# Subtract time from time = duration
|
||||
# Subtract duration from time = time
|
||||
sub __sub__(self,o):
|
||||
|
||||
|
||||
package Net::ICal::Libical::Duration(Property):
|
||||
@ISA = (Property);
|
||||
|
||||
sub new {}
|
||||
sub _update_value {}
|
||||
#"Return true if this is a valid duration"
|
||||
sub valid {}
|
||||
# """Return or set duration in seconds"""
|
||||
sub seconds {}
|
||||
|
||||
|
||||
#"""Represent a span of time"""
|
||||
|
||||
package Net::ICal::Libical::Period;
|
||||
@ISA = (Property);
|
||||
|
||||
sub new{}
|
||||
|
||||
sub _end_is_duration {}
|
||||
sub _end_is_time {}
|
||||
sub _update_value {}
|
||||
|
||||
#"Return true if this is a valid period"
|
||||
sub valid {}
|
||||
|
||||
#Return or set start time of the period. The start time may be
|
||||
#expressed as an RFC2445 format string or an instance of Time.
|
||||
#The return value is an instance of Time
|
||||
sub start {}
|
||||
|
||||
#Return or set end time of the period. The end time may be
|
||||
#expressed as an RFC2445 format string or an instance of Time.
|
||||
#The return value is an instance of Time.
|
||||
|
||||
#If the Period has a duration set, but not an end time, this
|
||||
#method will caluculate the end time from the duration.
|
||||
sub end {}
|
||||
|
||||
#Return or set the duration of the period. The duration may be
|
||||
#expressed as an RFC2445 format string or an instance of Duration.
|
||||
#The return value is an instance of Duration.
|
||||
#If the period has an end time set, but not a duration, this
|
||||
#method will calculate the duration from the end time.
|
||||
sub duration{}
|
||||
|
||||
# Get set the timezone for the period. Basically returns self->dict{TZID}
|
||||
sub timezone(self,v=None):
|
||||
|
||||
|
||||
# Represents the value and all parameters of an attendee
|
||||
package Net::ICal::Libical::Attendee(Property):
|
||||
@ISA = (Property);
|
||||
|
||||
sub new{}
|
||||
|
||||
# Methods for accessing enumerated parameters
|
||||
sub cn {}
|
||||
sub cutype {}
|
||||
sub dir {}
|
||||
sub delegated_from {}
|
||||
sub delegated_to {}
|
||||
sub language {}
|
||||
sub member {}
|
||||
sub partstat {}
|
||||
sub role {}
|
||||
sub rsvp {}
|
||||
sub sent_by {}
|
||||
|
||||
|
||||
package Net::ICal::Libical::Organizer;
|
||||
@ISA = (Property)
|
||||
# Methods for accessing enumerated parameters
|
||||
sub cn{}
|
||||
sub dir{}
|
||||
sub language {}
|
||||
sub sent_by {}
|
||||
|
||||
package Net::ICal::Libical::Recurrence_Id;
|
||||
@ISA= (Property)
|
||||
|
||||
package Net::ICal::Libical::Attach;
|
||||
@ISA= (Property)
|
||||
|
||||
package Net::ICal::Libical::Event;
|
||||
@ISA= (Component)
|
||||
|
||||
sub component_type {}
|
||||
|
||||
#"Returns a copy of the object."
|
||||
sub clone {}
|
||||
|
||||
#Sets or returns the value of the DTEND property.
|
||||
#Usage:
|
||||
#dtend(time_obj) # Set the value using a Time object
|
||||
#dtend('19970101T123000Z') # Set the value as an iCalendar string
|
||||
#dtend(982362522) # Set the value using seconds (time_t)
|
||||
#dtend() # Return a Time
|
||||
#
|
||||
#If the dtend value is being set and duration() has a value, the
|
||||
#duration property will be removed.
|
||||
sub dtend{}
|
||||
|
||||
#Sets or returns the value of the duration property.
|
||||
#Usage:
|
||||
#duration(dur_obj) # Set the value using a Duration object
|
||||
#duration("P3DT12H") # Set value as an iCalendar string
|
||||
#duration(3600) # Set duration using seconds
|
||||
#duration() # Return a duration
|
||||
#
|
||||
#If the duration value is being set and dtend() has a value, the dtend
|
||||
#property will be removed.
|
||||
sub duration{}
|
||||
|
||||
#Sets attendees or returns a list of Attendee objects.
|
||||
sub attendees {}
|
||||
|
||||
#Sets or gets the value of the ORGANIZER property.
|
||||
#Usage:
|
||||
#organizer(orgObj) # Set value using an organizer object
|
||||
#organizer('MAILTO:jd@not.com') # Set value using a CAL-ADDRESS string
|
||||
#organizer() # Return a CAL-ADDRESS string
|
||||
sub organizer{}
|
||||
|
||||
#"Sets or gets the SUMMARY value of the Event."
|
||||
sub summary{}
|
||||
|
||||
#Sets or gets the UID of the Event.
|
||||
sub uid{}
|
||||
|
||||
#Sets or gets the value for the RECURRENCE-ID property.
|
||||
#Usage:
|
||||
#Recurrence_id(recIdObj) # Set using a Recurrence_Id object
|
||||
#Recurrence_id("19700801T133000") # Set using an iCalendar string
|
||||
#Recurrence_id(8349873494) # Set using seconds from epoch
|
||||
#Recurrence_id() # Return a Time
|
||||
sub recurrence_id{}
|
||||
|
||||
#Sets or gets the SEQUENCE value of the Event.
|
||||
#Usage:
|
||||
#sequence(1) # Set the value using an integer
|
||||
#sequence('2') # Set the value using a string containing an integer
|
||||
#sequence() # Return an integer
|
||||
sub sequence{}
|
||||
|
||||
#Sets or returns the value of the LAST-MODIFIED property.
|
||||
#Usage:
|
||||
#lastmodified(time_obj) # Set the value using a Time object
|
||||
#lastmodified('19970101T123000Z')# Set using an iCalendar string
|
||||
#lastmodified(982362522) # Set using seconds
|
||||
#lastmodified() # Return a Time
|
||||
sub lastmodified{}
|
||||
|
||||
|
||||
|
||||
#Sets or returns the value of the CREATED property.
|
||||
#Usage:
|
||||
#created(time_obj) # Set the value using a Time object
|
||||
#created('19970101T123000Z') # Set using an iCalendar string
|
||||
#created(982362522) # Set using seconds
|
||||
#created() # Return a Time
|
||||
sub created {}
|
||||
|
||||
|
||||
sub related_to{}
|
||||
sub comment{}
|
||||
|
||||
"Sets or returns the value of the DESCRIPTION property."
|
||||
|
||||
sub description {}
|
||||
|
||||
#Sets categories or returns a list of Attendee objects.
|
||||
sub categories {}
|
||||
|
||||
sub attach{}
|
||||
|
||||
#Represents a set of event occurrences. This
|
||||
#package controls a component's RRULE, EXRULE, RDATE and EXDATE
|
||||
#properties and can produce from them a set of occurrences.
|
||||
package Net::ICal::Libical::RecurrenceSet:
|
||||
|
||||
|
||||
#Include a date or rule to the set.
|
||||
#Use date= or pass in a
|
||||
#Time instance to include a date. Included dates will add an
|
||||
#RDATE property or will remove an EXDATE property of the same
|
||||
#date.
|
||||
#Use rule= or pass in a string to include a rule. Included
|
||||
#rules with either add a RRULE property or remove an EXRULE
|
||||
#property.
|
||||
|
||||
sub include{}
|
||||
|
||||
#Exclude date or rule to the set.
|
||||
#Use date= or pass in a Time instance to exclude a
|
||||
#date. Excluded dates will add an EXDATE property or will remove
|
||||
#an RDATE property of the same date.
|
||||
#Use rule= or pass in a string to exclude a rule. Excluded
|
||||
#rules with either add an EXRULE property or remove an RRULE
|
||||
#property.
|
||||
sub exclude{}
|
||||
|
||||
#Return 'count' occurrences as a tuple of Time instances.
|
||||
sub occurrences{}
|
||||
|
||||
package Net::ICal::Libical::Store;
|
||||
sub new{}
|
||||
sub path{}
|
||||
sub mark{}
|
||||
sub commit{}
|
||||
sub addComponent{}
|
||||
sub removeComponent{}
|
||||
sub countComponents{}
|
||||
sub select{}
|
||||
sub clearSelect{}
|
||||
sub fetch{}
|
||||
sub fetchMatchK{}
|
||||
sub modify{}
|
||||
sub currentComponent{}
|
||||
sub firstComponent{}
|
||||
sub nextComponent{}
|
||||
|
||||
|
||||
package Net::ICal::Libical::FileStore;
|
||||
@ISA = (Store)
|
||||
sub new{}
|
||||
sub path{}
|
||||
sub mark{}
|
||||
sub commit{}
|
||||
sub addComponent{}
|
||||
sub removeComponent{}
|
||||
sub countComponents{}
|
||||
sub select{}
|
||||
sub clearSelect{}
|
||||
sub fetch{}
|
||||
sub fetchMatchK{}
|
||||
sub modify{}
|
||||
sub currentComponent{}
|
||||
sub firstComponent{}
|
||||
sub nextComponent{}
|
||||
|
||||
|
||||
1;
|
@ -1,175 +0,0 @@
|
||||
#!/usr/bin/perl
|
||||
# -*- Mode: perl -*-
|
||||
#======================================================================
|
||||
# FILE: Component.pm
|
||||
# CREATOR: eric 1 Mar 01
|
||||
#
|
||||
# DESCRIPTION:
|
||||
#
|
||||
#
|
||||
# $Id: Component.pm,v 1.1 2001/12/21 19:21:18 mikep%oeone.com Exp $
|
||||
# $Locker: $
|
||||
#
|
||||
# (C) COPYRIGHT 2000, Eric Busboom, eric@softwarestudio.org
|
||||
#
|
||||
# This package is free software and is provided "as is" without express
|
||||
# or implied warranty. It may be used, redistributed and/or modified
|
||||
# under the same terms as perl itself. ( Either the Artistic License or the
|
||||
# GPL. )
|
||||
#
|
||||
#
|
||||
#======================================================================
|
||||
|
||||
|
||||
|
||||
package Net::ICal::Libical::Component;
|
||||
use Net::ICal::Libical;
|
||||
|
||||
use strict;
|
||||
|
||||
sub new{
|
||||
my $class = shift;
|
||||
my $ical_str = shift; # Ical data in string form
|
||||
my $self = {};
|
||||
|
||||
$self->{'comp_p'} = Net::ICal::Libical::icalparser_parse_string($ical_str);
|
||||
|
||||
die "Can't parse string into component" if !$self->{'comp_p'};
|
||||
|
||||
bless $self, $class;
|
||||
}
|
||||
|
||||
sub new_from_ref {
|
||||
my $class = shift;
|
||||
my $r = shift;
|
||||
my $self = {};
|
||||
|
||||
$self->{'comp_p'} = $r;
|
||||
|
||||
bless $self, $class;
|
||||
}
|
||||
|
||||
# Destroy must call icalcomponent_free() if icalcomponent_get_parent()
|
||||
# returns NULL
|
||||
sub DESTROY {
|
||||
my $self = shift;
|
||||
|
||||
my $c = $self->{'comp_p'};
|
||||
|
||||
if($c && !Net::ICal::Libical::icalcomponent_get_parent($c)){
|
||||
Net::ICal::Libical::icalcomponent_free($c);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
# Return an array of all properties of the given type
|
||||
sub properties{
|
||||
|
||||
my $self = shift;
|
||||
my $prop_name = shift;
|
||||
|
||||
my @props;
|
||||
|
||||
if(!$prop_name){
|
||||
$prop_name = 'ANY';
|
||||
}
|
||||
|
||||
# To loop over properties
|
||||
# $comp_p = $self->{'comp_p'}
|
||||
# $p = icallangbind_get_first_property($comp_p,$prop_name)
|
||||
# $p = icallangbind_get_next_property($comp_p,$prop_name)
|
||||
|
||||
my $c = $self->{'comp_p'};
|
||||
my $p;
|
||||
|
||||
for($p = Net::ICal::Libical::icallangbind_get_first_property($c,$prop_name);
|
||||
$p;
|
||||
$p = Net::ICal::Libical::icallangbind_get_next_property($c,$prop_name)){
|
||||
|
||||
my $d_string = Net::ICal::Libical::icallangbind_property_eval_string($p,"=>");
|
||||
my %dict = %{eval($d_string)};
|
||||
|
||||
$dict{'ref'} = $p;
|
||||
|
||||
# Now, look at $dict{'value_type'} or $dict{'name'} to construct a
|
||||
# derived class of Property. I'll do this later.
|
||||
|
||||
my $prop;
|
||||
|
||||
if($dict{'value_type'} eq 'DATE' or $dict{'value_type'} eq 'DATE-TIME'){
|
||||
$prop = new Net::ICal::Libical::Time(\%dict);
|
||||
} elsif($dict{'value_type'} eq 'DURATION' ) {
|
||||
$prop = new Net::ICal::Libical::Duration(\%dict);
|
||||
} else {
|
||||
$prop = new Net::ICal::Libical::Property(\%dict);
|
||||
}
|
||||
|
||||
push(@props,$prop);
|
||||
|
||||
}
|
||||
|
||||
|
||||
return @props;
|
||||
|
||||
}
|
||||
|
||||
|
||||
sub add_property {
|
||||
|
||||
# if there is a 'ref' key in the prop's dict, then it is owned by
|
||||
# an icalcomponent, so dont add it again. But, you may check that
|
||||
# it is owned by this component with:
|
||||
# icalproperty_get_parent(p->{'ref'}') != $self->{'comp_p'}
|
||||
|
||||
# If there is no 'ref' key, then create one with $p->{'ref'} =
|
||||
# icalproperty_new_from_string($p->as_ical_string)
|
||||
|
||||
}
|
||||
|
||||
sub remove_property {
|
||||
|
||||
# If $p->{'ref'} is set, then remove the property with
|
||||
# icalcomponent_remove_property() }
|
||||
}
|
||||
|
||||
# Return an array of all components of the given type
|
||||
sub components {
|
||||
|
||||
my $self = shift;
|
||||
my $comp_name = shift;
|
||||
|
||||
my @comps;
|
||||
|
||||
if(!$comp_name){
|
||||
$comp_name = 'ANY';
|
||||
}
|
||||
|
||||
my $c = $self->{'comp_p'};
|
||||
my $p;
|
||||
|
||||
for($p = Net::ICal::Libical::icallangbind_get_first_component($c,$comp_name);
|
||||
$p;
|
||||
$p = Net::ICal::Libical::icallangbind_get_next_component($c,$comp_name)){
|
||||
|
||||
push(@comps, Net::ICal::Libical::Component->new_from_ref($p));
|
||||
|
||||
}
|
||||
|
||||
return @comps;
|
||||
|
||||
}
|
||||
|
||||
|
||||
sub add_component {}
|
||||
|
||||
sub remove_component {}
|
||||
|
||||
sub as_ical_string {
|
||||
my $self = shift;
|
||||
|
||||
return Net::ICal::Libical::icalcomponent_as_ical_string($self->{'comp_p'})
|
||||
}
|
||||
|
||||
|
||||
|
||||
1;
|
@ -1,160 +0,0 @@
|
||||
#=============================================================================
|
||||
#
|
||||
# This package is free software and is provided "as is" without express
|
||||
# or implied warranty. It may be used, redistributed and/or modified
|
||||
# under the same terms as perl itself. (Either the Artistic License or
|
||||
# the GPL.)
|
||||
#
|
||||
#=============================================================================
|
||||
|
||||
=head1 NAME
|
||||
|
||||
Net::ICal::Duration -- represent a length of time
|
||||
|
||||
=head1 SYNOPSIS
|
||||
|
||||
use Net::ICal;
|
||||
$d = Net::ICal::Duration->new("P3DT6H15M10S");
|
||||
$d = Net::ICal::Duration->new(3600); # 1 hour in seconds
|
||||
|
||||
=head1 DESCRIPTION
|
||||
|
||||
I<Duration> Represents a length of time, such a 3 days, 30 seconds or
|
||||
7 weeks. You would use this for representing an abstract block of
|
||||
time; "I want to have a 1-hour meeting sometime." If you want a
|
||||
calendar- and timezone-specific block of time, see Net::ICal::Period.
|
||||
|
||||
=cut
|
||||
|
||||
#=============================================================================
|
||||
|
||||
package Net::ICal::Libical::Duration;
|
||||
use Net::ICal::Libical::Property;
|
||||
use strict;
|
||||
use Carp;
|
||||
@Net::ICal::Libical::Duration::ISA = qw ( Net::ICal::Libical::Property );
|
||||
|
||||
=head1 METHODS
|
||||
|
||||
=head2 new
|
||||
|
||||
Create a new I<Duration> from:
|
||||
|
||||
=over 4
|
||||
|
||||
=item * A string in RFC2445 duration format
|
||||
|
||||
=item * An integer representing a number of seconds
|
||||
|
||||
=cut
|
||||
|
||||
sub new {
|
||||
my $package = shift;
|
||||
my $arg = shift;
|
||||
my $self;
|
||||
|
||||
if (ref($arg) == 'HASH'){
|
||||
# Construct from dictionary
|
||||
$self = Net::ICal::Libical::Property::new($package,$arg);
|
||||
my $val=Net::ICal::Libical::icalproperty_get_value_as_string($self->{'ref'});
|
||||
$self->{'dur'} = Net::ICal::Libical::icaldurationtype_from_string($val);
|
||||
|
||||
return $self;
|
||||
|
||||
} elsif ($arg =~ /^[-+]?\d+$/){
|
||||
# Seconds
|
||||
$self = Net::ICal::Libical::Property::new($package,'DURATION');
|
||||
$self->{'dur'} = Net::ICal::Libical::icaldurationtype_new_from_int($arg);
|
||||
} elsif ($arg) {
|
||||
# iCalendar string
|
||||
$self = Net::ICal::Libical::Property::new($package,'DURATION');
|
||||
$self->{'dur'} = Net::ICal::Libical::icaldurationtype_new_from_string($arg);
|
||||
} else {
|
||||
die;
|
||||
}
|
||||
|
||||
$self->_update_value();
|
||||
return $self;
|
||||
|
||||
}
|
||||
|
||||
sub _update_value {
|
||||
my $self = shift;
|
||||
|
||||
die "Can't find internal icalduration reference" if !$self->{'dur'};
|
||||
|
||||
$self->value(Net::ICal::Libical::icaldurationtype_as_ical_string($self->{'dur'}));
|
||||
|
||||
}
|
||||
=head2 clone()
|
||||
|
||||
Return a new copy of the duration.
|
||||
|
||||
=cut
|
||||
|
||||
sub clone {
|
||||
die "Not Implemented";
|
||||
|
||||
}
|
||||
|
||||
|
||||
=head2 is_valid()
|
||||
|
||||
Determine if this is a valid duration (given criteria TBD).
|
||||
|
||||
=cut
|
||||
|
||||
sub is_valid {
|
||||
|
||||
die "Not Implemented;"
|
||||
|
||||
}
|
||||
|
||||
=head2 seconds()
|
||||
|
||||
Set or Get the length of the duration as seconds.
|
||||
|
||||
=cut
|
||||
|
||||
sub seconds {
|
||||
my $self = shift;
|
||||
my $seconds = shift;
|
||||
|
||||
if($seconds){
|
||||
$self->{'dur'} =
|
||||
Net::ICal::Libical::icaldurationtype_from_int($seconds);
|
||||
$self->_update_value();
|
||||
}
|
||||
|
||||
return Net::ICal::Libical::icaldurationtype_as_int($self->{'dur'});
|
||||
|
||||
}
|
||||
|
||||
=head2 add($duration)
|
||||
|
||||
Return a new duration that is the sum of this and $duration. Does not
|
||||
modify this object.
|
||||
|
||||
=cut
|
||||
|
||||
sub add {
|
||||
my ($self, $duration) = @_;
|
||||
|
||||
return new Duration($self->seconds() + $duration->seconds());
|
||||
}
|
||||
|
||||
|
||||
=head2 subtract($duration)
|
||||
|
||||
Return a new duration that is the difference between this and
|
||||
$duration. Does not modify this object.
|
||||
|
||||
=cut
|
||||
|
||||
sub subtract {
|
||||
my ($self, $duration) = @_;
|
||||
|
||||
return new Duration($self->seconds() - $duration->seconds());
|
||||
}
|
||||
|
||||
1;
|
@ -1,359 +0,0 @@
|
||||
#!/usr/bin/perl -w
|
||||
# -*- Mode: perl -*-
|
||||
#======================================================================
|
||||
#
|
||||
# This package is free software and is provided "as is" without express
|
||||
# or implied warranty. It may be used, redistributed and/or modified
|
||||
# under the same terms as perl itself. ( Either the Artistic License or the
|
||||
# GPL. )
|
||||
#
|
||||
# $Id: Period.pm,v 1.1 2001/12/21 19:21:20 mikep%oeone.com Exp $
|
||||
#
|
||||
# (C) COPYRIGHT 2000, Eric Busboom, http://www.softwarestudio.org
|
||||
#
|
||||
# $Log
|
||||
#======================================================================
|
||||
|
||||
|
||||
=pod
|
||||
=head1 NAME
|
||||
|
||||
Net::ICal::Period -- represent a period of time
|
||||
|
||||
=head1 SYNOPSIS
|
||||
|
||||
use Net::ICal;
|
||||
$p = new Net::ICal::Period("19970101T120000","19970101T123000");
|
||||
$p = new Net::ICal::Period("19970101T120000","PT3W2D40S");
|
||||
$p = new Net::ICal::Period(time(),3600);
|
||||
$p = new Net::ICal::Period(
|
||||
new Net::ICal::Time("19970101T120000",
|
||||
"America/Los_Angeles"),
|
||||
new Net::ICal::Duration("2h"));
|
||||
|
||||
=head1 DESCRIPTION
|
||||
|
||||
Use this to make an object representing a block of time on a
|
||||
real schedule. You can either say, "This event starts at 12
|
||||
and ends at 2" or "This event starts at 12 and lasts 2 hours."
|
||||
|
||||
These two ways of specifying events can be treated differently
|
||||
in schedules. If you say, "The meeting is from 12 to 2, but I
|
||||
have to leave at 2," you are implying that the start date and
|
||||
end date are fixed. If you say, "I have a 2-hour drive to
|
||||
Chicago, and I need to leave at 4," you are saying that it will
|
||||
take 2 hours no matter when you leave, and that moving the start
|
||||
time will slide the end time correspondingly.
|
||||
|
||||
=head1 BASIC METHODS
|
||||
|
||||
=cut
|
||||
|
||||
|
||||
#=========================================================================
|
||||
|
||||
package Net::ICal::Period;
|
||||
use strict;
|
||||
use Net::ICal::Time;
|
||||
use Net::ICal::Duration;
|
||||
|
||||
use UNIVERSAL qw(isa);
|
||||
|
||||
#-------------------------------------------------------------------------
|
||||
|
||||
=pod
|
||||
=head2 new($time, $time|$duration)
|
||||
|
||||
Creates a new period object given to parameters: The first must be a
|
||||
I<Time> object or valid argument to Net::ICal::Time::new.
|
||||
|
||||
The second can be either:
|
||||
|
||||
=pod
|
||||
|
||||
=over 4
|
||||
|
||||
=item * a I<Time> object
|
||||
|
||||
=item * a valid argument to Net::ICal::Time::new.
|
||||
|
||||
=item * a I<Duration> object
|
||||
|
||||
=item * a valid argument to Net::ICal::Duration::new.
|
||||
|
||||
=back
|
||||
|
||||
Either give a start time and an end time, or a start time and a duration.
|
||||
|
||||
=cut
|
||||
|
||||
sub new{
|
||||
my $package = shift;
|
||||
my $arg1 = shift;
|
||||
my $arg2 = shift;
|
||||
my $self = {};
|
||||
|
||||
# Is the string in RFC2445 Format?
|
||||
if(!$arg2 and $arg1 =~ /\//){
|
||||
my $tmp = $arg1;
|
||||
($arg1,$arg2) = split(/\//,$tmp);
|
||||
}
|
||||
|
||||
|
||||
if( ref($arg1) eq 'Net::ICal::Time'){
|
||||
$self->{START} = $arg1->clone();
|
||||
} else {
|
||||
$self->{START} = new Net::ICal::Time($arg1);
|
||||
}
|
||||
|
||||
|
||||
if(isa($arg2,'Net::ICal::Time')){
|
||||
$self->{END} = $arg2->clone();
|
||||
} elsif (isa($arg2,'Net::ICal::Duration')) {
|
||||
$self->{DURATION} = $arg2->clone();
|
||||
} elsif ($arg2 =~ /^P/) {
|
||||
$self->{DURATION} = new Net::ICal::Duration($arg2);
|
||||
} else {
|
||||
# Hope that it is a time string
|
||||
$self->{END} = new Net::ICal::Time($arg2);
|
||||
}
|
||||
|
||||
return bless($self,$package);
|
||||
}
|
||||
|
||||
#--------------------------------------------------------------------------
|
||||
=pod
|
||||
=head2 clone()
|
||||
|
||||
Create a copy of this component
|
||||
|
||||
=cut
|
||||
# XXX implement this
|
||||
sub clone {
|
||||
return "Not implemented";
|
||||
}
|
||||
|
||||
#----------------------------------------------------------------------------
|
||||
=pod
|
||||
=head2 is_valid()
|
||||
|
||||
Return true if:
|
||||
There is an end time and:
|
||||
Both start and end times have no timezone ( Floating time) or
|
||||
Both start and end time have (possibly different) timezones or
|
||||
Both start and end times are in UTC and
|
||||
The end time is after the start time.
|
||||
|
||||
There is a duration and the duration is positive
|
||||
|
||||
=cut
|
||||
|
||||
# XXX implement this
|
||||
|
||||
sub is_valid {
|
||||
return "Not implemented";
|
||||
}
|
||||
|
||||
#---------------------------------------------------------------------------
|
||||
=pod
|
||||
=head2 start([$time])
|
||||
|
||||
Accessor for the start time of the event as a I<Time> object.
|
||||
Can also take a valid time string or an integer (number of
|
||||
seconds since the epoch) as a parameter. If a second parameter
|
||||
is given, it'll set this Duration's start time.
|
||||
|
||||
=cut
|
||||
|
||||
sub start{
|
||||
my $self = shift;
|
||||
my $t = shift;
|
||||
|
||||
if($t){
|
||||
if(isa($t,'Net::ICal::Time')){
|
||||
$self->{START} = $t->clone();
|
||||
} else {
|
||||
$self->{START} = new Net::ICal::Time($t);
|
||||
}
|
||||
}
|
||||
|
||||
return $self->{START};
|
||||
}
|
||||
|
||||
#-----------------------------------------------------------------
|
||||
=pod
|
||||
=head2 end([$time])
|
||||
|
||||
Accessor for the end time. Takes a I<Time> object, a valid time string,
|
||||
or an integer and returns a time object. This routine is coupled to
|
||||
the I<duration> accessor. See I<duration> below for more imformation.
|
||||
|
||||
=cut
|
||||
|
||||
sub end{
|
||||
|
||||
my $self = shift;
|
||||
my $t = shift;
|
||||
my $end;
|
||||
|
||||
if($t){
|
||||
if(isa($t,'Net::ICal::Time')){
|
||||
$end = $t->clone();
|
||||
} else {
|
||||
$end = new Net::ICal::Time($t);
|
||||
}
|
||||
|
||||
# If duration exists, use the time to compute a new duration
|
||||
if ($self->{DURATION}){
|
||||
$self->{DURATION} = $end->subtract($self->{START});
|
||||
} else {
|
||||
$self->{END} = $end;
|
||||
}
|
||||
}
|
||||
|
||||
# Return end time, possibly computing it from DURATION
|
||||
if($self->{DURATION}){
|
||||
return $self->{START}->add($self->{DURATION});
|
||||
} else {
|
||||
return $self->{END};
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
#----------------------------------------------------------------------
|
||||
=pod
|
||||
=head2 duration([$duration])
|
||||
|
||||
Accessor for the duration of the event. Takes a I<duration> object and
|
||||
returns a I<Duration> object.
|
||||
|
||||
Since the end time and the duration both specify the end time, the
|
||||
object will store one and access to the other will be computed. So,
|
||||
|
||||
if you create:
|
||||
|
||||
$p = new Net::ICal::Period("19970101T120000","19970101T123000")
|
||||
|
||||
And then execute:
|
||||
|
||||
$p->duration(45*60);
|
||||
|
||||
The period object will adjust the end time to be 45 minutes after
|
||||
the start time. It will not replace the end time with a
|
||||
duration. This is required so that a CUA can take an incoming
|
||||
component from a server, modify it, and send it back out in the same
|
||||
basic form.
|
||||
|
||||
=cut
|
||||
|
||||
sub duration{
|
||||
my $self = shift;
|
||||
my $d = shift;
|
||||
my $dur;
|
||||
|
||||
if($d){
|
||||
if(isa($d,'Net::ICal::Duration')){
|
||||
$dur = $d->clone();
|
||||
} else {
|
||||
$dur = new Net::ICal::Duration($d);
|
||||
}
|
||||
|
||||
# If end exists, use the duration to compute a new end
|
||||
# otherwise, set the duration.
|
||||
if ($self->{END}){
|
||||
$self->{END} = $self->{START}->add($dur);
|
||||
} else {
|
||||
$self->{DURATION} = $dur;
|
||||
}
|
||||
}
|
||||
|
||||
# Return duration, possibly computing it from END
|
||||
if($self->{END}){
|
||||
return $self->{END}->subtract($self->{START});
|
||||
} else {
|
||||
return $self->{DURATION};
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
#------------------------------------------------------------------------
|
||||
=pod
|
||||
|
||||
=head2 as_ical()
|
||||
|
||||
Return a string that holds the RFC2445 text form of this duration
|
||||
|
||||
=cut
|
||||
sub as_ical {
|
||||
my $self = shift;
|
||||
my $out;
|
||||
|
||||
$out = $self->{START}->as_ical() ."/";
|
||||
|
||||
if($self->{DURATION}){
|
||||
$out .= $self->{DURATION}->as_ical()
|
||||
} else {
|
||||
$out .= $self->{END}->as_ical()
|
||||
}
|
||||
|
||||
return $out;
|
||||
|
||||
}
|
||||
|
||||
|
||||
#------------------------------------------------------------------------
|
||||
=pod
|
||||
|
||||
=head2 test()
|
||||
|
||||
A set of developers' tests to make sure the module's working properly.
|
||||
|
||||
=cut
|
||||
|
||||
# Run this with a one-liner:
|
||||
# perl -e "use lib('/home/srl/dev/rk/reefknot/base/'); use Net::ICal::Period; Net::ICal::Period::test();"
|
||||
# adjusted for your environment.
|
||||
sub test {
|
||||
|
||||
print("--------- Test Net::ICal::Period --------------\n");
|
||||
|
||||
|
||||
my $p = new Net::ICal::Period("19970101T180000Z/19970102T070000Z");
|
||||
print $p->as_ical()."\n";
|
||||
die if $p->as_ical() ne "19970101T180000Z/19970102T070000Z";
|
||||
|
||||
$p = new Net::ICal::Period("19970101T180000Z/PT5H30M");
|
||||
print $p->as_ical()."\n";
|
||||
die if $p->as_ical() ne "19970101T180000Z/PT5H30M";
|
||||
|
||||
$p->duration("PT5H30M10S");
|
||||
print $p->as_ical()."\n";
|
||||
die if $p->as_ical() ne "19970101T180000Z/PT5H30M10S" ;
|
||||
|
||||
$p->duration(new Net::ICal::Duration("P10DT30M5S"));
|
||||
print $p->as_ical()."\n";
|
||||
die if $p->as_ical() ne "19970101T180000Z/P10DT30M5S" ;
|
||||
|
||||
$p->end("19970101T183000Z");
|
||||
print $p->as_ical()."\n";
|
||||
die if $p->as_ical() ne "19970101T180000Z/PT30M" ;
|
||||
|
||||
$p = new Net::ICal::Period("19970101T180000Z/19970102T070000Z");
|
||||
|
||||
$p->end("19970101T183000Z");
|
||||
print $p->as_ical()."\n";
|
||||
die if $p->as_ical() ne "19970101T180000Z/19970101T183000Z" ;
|
||||
|
||||
$p->duration("P1DT1H10M");
|
||||
print $p->as_ical()."\n";
|
||||
die if $p->as_ical() ne "19970101T180000Z/19970102T191000Z" ;
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
1;
|
||||
|
||||
|
||||
__END__
|
||||
|
@ -1,173 +0,0 @@
|
||||
#!/usr/bin/perl
|
||||
# -*- Mode: perl -*-
|
||||
#======================================================================
|
||||
# FILE: Property.pm
|
||||
# CREATOR: eric 1 Mar 01
|
||||
#
|
||||
# DESCRIPTION:
|
||||
#
|
||||
#
|
||||
# $Id: Property.pm,v 1.1 2001/12/21 19:21:20 mikep%oeone.com Exp $
|
||||
# $Locker: $
|
||||
#
|
||||
# (C) COPYRIGHT 2000, Eric Busboom, eric@softwarestudio.org
|
||||
#
|
||||
# This package is free software and is provided "as is" without express
|
||||
# or implied warranty. It may be used, redistributed and/or modified
|
||||
# under the same terms as perl itself. ( Either the Artistic License or the
|
||||
# GPL. )
|
||||
#
|
||||
#
|
||||
#======================================================================
|
||||
|
||||
use Net::ICal::Libical::Property;
|
||||
|
||||
|
||||
package Net::ICal::Libical::Property;
|
||||
use strict;
|
||||
|
||||
|
||||
sub new {
|
||||
|
||||
my $class = shift;
|
||||
my $arg = shift;
|
||||
my $self = {};
|
||||
my $kind;
|
||||
|
||||
if(ref($arg) == 'HASH'){
|
||||
|
||||
$self->{'ref'} = $arg->{'ref'};
|
||||
|
||||
} else {
|
||||
$kind = Net::ICal::Libical::icalproperty_string_to_kind($arg);
|
||||
$self->{'ref'} = Net::ICal::Libical::icalproperty_new($kind);
|
||||
}
|
||||
|
||||
die "Did not get icalproperty ref in Net::ICal::Libical::Property::new " if !$self->{'ref'};
|
||||
|
||||
bless $self, $class;
|
||||
}
|
||||
|
||||
|
||||
sub DESTROY {
|
||||
my $self = shift;
|
||||
|
||||
my $r = $self->{'ref'};
|
||||
|
||||
if($r && !Net::ICal::Libical::icalproperty_get_parent($r)){
|
||||
Net::ICal::Libical::icalproperty_free($self->{'ref'});
|
||||
}
|
||||
}
|
||||
|
||||
sub name {
|
||||
my $self = shift;
|
||||
my $str;
|
||||
|
||||
die if !$self->{'ref'};
|
||||
|
||||
$str = Net::ICal::Libical::icalproperty_as_ical_string($self->{'ref'});
|
||||
|
||||
$str =~ /^([A-Z\-]+)\n/;
|
||||
|
||||
return $1;
|
||||
|
||||
}
|
||||
|
||||
#Get/Set the internal reference to the libical icalproperty """
|
||||
sub prop_ref {
|
||||
my $self = shift;
|
||||
my $p_r = shift;
|
||||
|
||||
if($p_r){
|
||||
$self->{'ref'} = $p_r;
|
||||
}
|
||||
|
||||
return $self->{'ref'};
|
||||
|
||||
}
|
||||
|
||||
|
||||
#Get/set the RFC2445 representation of the value. Dict value 'value'
|
||||
sub value {
|
||||
my $self = shift;
|
||||
my $v = shift;
|
||||
my $kind = shift;
|
||||
|
||||
my $vt;
|
||||
if($v){
|
||||
|
||||
if ($kind) {
|
||||
$self->{'VALUE'} = $kind;
|
||||
$vt = $kind;
|
||||
}
|
||||
elsif ($self->{'VALUE'}) {
|
||||
$vt = $self->{'VALUE'};
|
||||
}
|
||||
else {
|
||||
$vt = 'NO'; # Use the kind of the existing value
|
||||
}
|
||||
|
||||
|
||||
Net::ICal::Libical::icalproperty_set_value_from_string($self->{'ref'},$v,$vt);
|
||||
|
||||
}
|
||||
|
||||
return Net::ICal::Libical::icalproperty_get_value_as_string($self->{'ref'});
|
||||
|
||||
}
|
||||
|
||||
|
||||
# Get a named parameter
|
||||
sub get_parameter{
|
||||
my $self = shift;
|
||||
my $key = shift;
|
||||
|
||||
die "get_parameter: missing parameter name" if !$key;
|
||||
|
||||
$key = uc($key);
|
||||
my $ref = $self->{'ref'};
|
||||
|
||||
my $str = Net::ICal::Libical::icalproperty_get_parameter_as_string($ref,$key);
|
||||
|
||||
if($str eq 'NULL') {
|
||||
return undef;
|
||||
}
|
||||
|
||||
return $str
|
||||
|
||||
}
|
||||
|
||||
|
||||
# Set the value of the named parameter
|
||||
sub set_parameter{
|
||||
my $self = shift;
|
||||
my $key = shift;
|
||||
my $value = shift;
|
||||
|
||||
die "set_parameter: missing parameter name" if !$key;
|
||||
die "set_parameter: missing parameter value" if !$value;
|
||||
|
||||
$key = uc($key);
|
||||
my $ref = $self->{'ref'};
|
||||
|
||||
my $str = Net::ICal::Libical::icalproperty_set_parameter_from_string($ref,$key,$value);
|
||||
|
||||
|
||||
return $self->get_parameter($self);
|
||||
|
||||
}
|
||||
|
||||
|
||||
sub as_ical_string {
|
||||
my $self = shift;
|
||||
my $str = Net::ICal::Libical::icalproperty_as_ical_string($self->{'ref'});
|
||||
|
||||
$str =~ s/\r//g;
|
||||
$str =~ s/\n\s?//g;
|
||||
|
||||
return $str;
|
||||
}
|
||||
|
||||
|
||||
|
||||
1;
|
@ -1,468 +0,0 @@
|
||||
#!/usr/bin/perl -w
|
||||
# -*- Mode: perl -*-
|
||||
#======================================================================
|
||||
#
|
||||
# This package is free software and is provided "as is" without express
|
||||
# or implied warranty. It may be used, redistributed and/or modified
|
||||
# under the same terms as perl itself. ( Either the Artistic License or the
|
||||
# GPL. )
|
||||
#
|
||||
#
|
||||
#======================================================================
|
||||
|
||||
|
||||
|
||||
=pod
|
||||
|
||||
=head1 NAME
|
||||
|
||||
Net::ICal::Time -- represent a time and date
|
||||
|
||||
=head1 SYNOPSIS
|
||||
|
||||
$t = new Net::ICal::Time("19970101T120000Z");
|
||||
$t = new Net::ICal::Time("19970101T120000","America/Los_Angeles");
|
||||
$t = new Net::ICal::Time(time(),"America/Los_Angeles");
|
||||
|
||||
$t2 = $t->add(Net::Ical::Duration("1D"));
|
||||
|
||||
$duration = $t->subtract(Net::ICal::Time("19970101T110000Z"))
|
||||
|
||||
# Add 5 minutes
|
||||
$t->min($t->min()+5);
|
||||
|
||||
# Add 5 minutes
|
||||
$t->sec($t->sec()+300);
|
||||
|
||||
# Compare
|
||||
if($t->compare($t2) > 0) {}
|
||||
|
||||
=head1 DESCRIPTION
|
||||
|
||||
I<Time> represents a time, but can also hold the time zone for the
|
||||
time and indicate if the time should be treated as a date. The time
|
||||
can be constructed from a variey of formats.
|
||||
|
||||
=head1 METHODS
|
||||
|
||||
=cut
|
||||
|
||||
package Net::ICal::Libical::Time;
|
||||
use Net::ICal::Libical::Duration;
|
||||
use Net::ICal::Libical::Property;
|
||||
use Time::Local;
|
||||
use POSIX;
|
||||
use Carp qw(confess cluck);
|
||||
use strict;
|
||||
use UNIVERSAL qw(isa);
|
||||
|
||||
@Net::ICal::Libical::Time::ISA = qw(Net::ICal::Libical::Property);
|
||||
|
||||
=pod
|
||||
|
||||
=head2 new
|
||||
|
||||
Creates a new time object given one of:
|
||||
|
||||
=over 4
|
||||
|
||||
=item * ISO format string
|
||||
|
||||
=item * Some other format string, maybe whatever a Date module understands
|
||||
|
||||
=item * Integer representing seconds past the POSIX epoch
|
||||
|
||||
=back
|
||||
|
||||
The optional second argument is the timezone in Olsen place name format,
|
||||
which looks like "America/Los_Angeles"; it can be used to get the standard
|
||||
offset from UTC, the dates the location goes to and from Daylight Savings
|
||||
Time, and the magnitude of the Daylight Savings time offset.
|
||||
|
||||
=cut
|
||||
|
||||
sub new{
|
||||
my $package = shift;
|
||||
my $arg = shift;
|
||||
|
||||
my $self;
|
||||
|
||||
if (ref($arg) == 'HASH'){
|
||||
# Construct from dictionary
|
||||
$self = Net::ICal::Libical::Property::new($package,$arg);
|
||||
my $val=Net::ICal::Libical::icalproperty_get_value_as_string($self->{'ref'});
|
||||
$self->{'tt'} = Net::ICal::Libical::icaltime_from_string($val);
|
||||
|
||||
return $self;
|
||||
|
||||
} else {
|
||||
|
||||
if ($#_ = 1){
|
||||
# iCalendar string
|
||||
$self = Net::ICal::Libical::Property::new($package,'DTSTART');
|
||||
$self->{'tt'} = Net::ICal::Libical::icaltime_new_from_string($arg);
|
||||
} else {
|
||||
# Broken out time
|
||||
die;
|
||||
}
|
||||
|
||||
$self->_update_value();
|
||||
return $self;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
sub _update_value {
|
||||
my $self = shift;
|
||||
|
||||
if(!$self->{'tt'}){
|
||||
die "Can't find reference to icaltimetype";
|
||||
}
|
||||
|
||||
$self->value(Net::ICal::Libical::icaltime_as_ical_string($self->{'tt'}));
|
||||
|
||||
}
|
||||
|
||||
=pod
|
||||
|
||||
=head2 clone()
|
||||
|
||||
Create a new copy of this time.
|
||||
|
||||
=cut
|
||||
|
||||
# clone a Time object.
|
||||
sub clone {
|
||||
my $self = shift;
|
||||
|
||||
bless( {%$self},ref($self));
|
||||
|
||||
$self->{'ref'} = Net::ICal::Libical::icalproperty_new_clone($self->{'ref'});
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
=pod
|
||||
|
||||
=head2 is_valid()
|
||||
|
||||
TBD
|
||||
|
||||
=cut
|
||||
|
||||
sub is_valid{
|
||||
my $self = shift;
|
||||
|
||||
return Net::ICal::Libical::icaltime_is_null_time($self->{'tt'});
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
=pod
|
||||
|
||||
=head2 is_date([true|false])
|
||||
|
||||
Accessor to the is_date flag. If true, the flag indicates that the
|
||||
hour, minute and second fields are set to zero and not used in
|
||||
comparisons.
|
||||
|
||||
=cut
|
||||
|
||||
|
||||
sub is_date {
|
||||
my $self = shift;
|
||||
if(@_){
|
||||
|
||||
# Convert to true or false
|
||||
Net::ICal::Libical::icaltimetype_is_date_set($self->{'tt'},
|
||||
!(!($_[0])));
|
||||
}
|
||||
|
||||
return Net::ICal::Libical::icaltimetype_is_date_get($self->{'tt'});
|
||||
|
||||
}
|
||||
|
||||
|
||||
=pod
|
||||
|
||||
=head2 is_utc([true|false])
|
||||
|
||||
Is_utc indicates if the time should be interpreted in the UTC timezone.
|
||||
|
||||
=cut
|
||||
|
||||
sub is_utc {
|
||||
my $self = shift;
|
||||
if(@_){
|
||||
|
||||
# Convert to true or false
|
||||
Net::ICal::Libical::icaltimetype_is_utc_set($self->{'tt'},
|
||||
!(!($_[0])));
|
||||
}
|
||||
|
||||
return Net::ICal::Libical::icaltimetype_is_utc_get($self->{'tt'});
|
||||
|
||||
}
|
||||
=pod
|
||||
|
||||
=head2 timezone
|
||||
|
||||
Accessor to the timezone. Takes & Returns an Olsen place name
|
||||
("America/Los_Angeles", etc. ) , an Abbreviation, 'UTC', or 'float' if
|
||||
no zone was specified.
|
||||
|
||||
=cut
|
||||
|
||||
sub timezone {
|
||||
my $self = shift;
|
||||
my $tz = shift;
|
||||
|
||||
if($tz){
|
||||
$self->set_parameter('TZID',$tz);
|
||||
}
|
||||
|
||||
return $self->get_parameter('TZID');
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
=pod
|
||||
|
||||
=head2 normalize()
|
||||
|
||||
Adjust any out-of range values so that they are in-range. For
|
||||
instance, 12:65:00 would become 13:05:00.
|
||||
|
||||
=cut
|
||||
|
||||
sub normalize{
|
||||
my $self = shift;
|
||||
|
||||
$self->{'tt'} = Net::ICal::Libical::icaltime_normalize($self->{'tt'});
|
||||
$self->value(Net::ICal::Libical::icaltime_as_ical_string($self->{'tt'}));
|
||||
|
||||
}
|
||||
|
||||
|
||||
=pod
|
||||
|
||||
=head2 hour([$hour])
|
||||
|
||||
Accessor to the hour. Out of range values are normalized.
|
||||
|
||||
=cut
|
||||
|
||||
=pod
|
||||
=head2 minute([$min])
|
||||
|
||||
Accessor to the minute. Out of range values are normalized.
|
||||
|
||||
=cut
|
||||
|
||||
=pod
|
||||
=head2 second([$dsecond])
|
||||
|
||||
Accessor to the second. Out of range values are normalized. For
|
||||
instance, setting the second to -1 will decrement the minute and set
|
||||
the second to 59, while setting the second to 3600 will increment the
|
||||
hour.
|
||||
|
||||
=cut
|
||||
|
||||
=pod
|
||||
|
||||
=head2 year([$year])
|
||||
|
||||
Accessor to the year. Out of range values are normalized.
|
||||
|
||||
=cut
|
||||
|
||||
=pod
|
||||
|
||||
=head2 month([$month])
|
||||
|
||||
Accessor to the month. Out of range values are normalized.
|
||||
|
||||
=cut
|
||||
|
||||
|
||||
=pod
|
||||
|
||||
=head2 day([$day])
|
||||
|
||||
Accessor to the month day. Out of range values are normalized.
|
||||
|
||||
=cut
|
||||
|
||||
sub _do_accessor {
|
||||
no strict;
|
||||
my $self = shift;
|
||||
my $type = shift;
|
||||
my $value = shift;
|
||||
|
||||
$type = lc($type);
|
||||
|
||||
if($value){
|
||||
my $set = "Net::ICal::Libical::icaltimetype_${type}_set";
|
||||
|
||||
&$set($self->{'tt'},$value);
|
||||
$self->normalize();
|
||||
$self->_update_value();
|
||||
|
||||
}
|
||||
|
||||
my $get = "Net::ICal::Libical::icaltimetype_${type}_get";
|
||||
|
||||
return &$get($self->{'tt'});
|
||||
}
|
||||
|
||||
|
||||
sub second {my $s = shift; my $v = shift; return $s->_do_accessor('SECOND',$v);}
|
||||
sub minute {my $s = shift; my $v = shift;return $s->_do_accessor('MINUTE',$v);}
|
||||
sub hour {my $s = shift; my $v = shift; return $s->_do_accessor('HOUR',$v);}
|
||||
sub day {my $s = shift; my $v = shift; return $s->_do_accessor('DAY',$v);}
|
||||
sub month {my $s = shift; my $v = shift; return $s->_do_accessor('MONTH',$v);}
|
||||
sub year {my $s = shift; my $v = shift; return $s->_do_accessor('YEAR',$v);}
|
||||
|
||||
|
||||
=pod
|
||||
|
||||
=head2 add($duration)
|
||||
|
||||
Takes a I<Duration> and returns a I<Time> that is the sum of the time
|
||||
and the duration. Does not modify this time.
|
||||
|
||||
=cut
|
||||
sub add {
|
||||
my $self = shift;
|
||||
my $dur = shift;
|
||||
|
||||
cluck "Net::ICal::Time::add argument 1 requires a Net::ICal::Duration" if !isa($dur,'Net::ICal::Duration');
|
||||
|
||||
my $c = $self->clone();
|
||||
|
||||
$c->second($dur->as_int());
|
||||
|
||||
$c->normalize();
|
||||
|
||||
return $c;
|
||||
|
||||
}
|
||||
|
||||
=pod
|
||||
|
||||
=head2 subtract($time)
|
||||
|
||||
Subtract out a time of type I<Time> and return a I<Duration>. Does not
|
||||
modify this time.
|
||||
|
||||
=cut
|
||||
sub subtract {
|
||||
my $self = shift;
|
||||
my $t = shift;
|
||||
|
||||
cluck "Net::ICal::Time::subtract argrument 1 requires a Net::ICal::Time" if !isa($t,'Net::ICal::Time');
|
||||
|
||||
my $tint1 = $self->as_int();
|
||||
my $tint2 = $t->as_int();
|
||||
|
||||
return new Net::ICal::Duration($tint1 - $tint2);
|
||||
|
||||
}
|
||||
|
||||
=pod
|
||||
|
||||
=head2 move_to_zone($zone);
|
||||
|
||||
Change the time to what it would be in the named timezone.
|
||||
The zone can be an Olsen placename or "UTC".
|
||||
|
||||
=cut
|
||||
|
||||
# XXX this needs implementing.
|
||||
sub move_to_zone {
|
||||
confess "Not Implemented\n";
|
||||
}
|
||||
|
||||
|
||||
|
||||
=pod
|
||||
|
||||
=head2 as_int()
|
||||
|
||||
Convert the time to an integer that represents seconds past the POSIX
|
||||
epoch
|
||||
|
||||
=cut
|
||||
sub as_int {
|
||||
my $self = shift;
|
||||
|
||||
return Net::ICal::Libical::icaltime_as_timet($self->{'tt'});
|
||||
}
|
||||
|
||||
=pod
|
||||
|
||||
=head2 as_localtime()
|
||||
|
||||
Convert to list format, as per localtime()
|
||||
|
||||
=cut
|
||||
sub as_localtime {
|
||||
my $self = shift;
|
||||
|
||||
return localtime($self->as_int());
|
||||
|
||||
}
|
||||
|
||||
=pod
|
||||
|
||||
=head2 as_gmtime()
|
||||
|
||||
Convert to list format, as per gmtime()
|
||||
|
||||
=cut
|
||||
sub as_gmtime {
|
||||
my $self = shift;
|
||||
|
||||
return gmtime($self->as_int());
|
||||
|
||||
}
|
||||
|
||||
=pod
|
||||
|
||||
=head2 compare($time)
|
||||
|
||||
Compare a time to this one and return -1 if the argument is earlier
|
||||
than this one, 1 if it is later, and 0 if it is the same. The routine
|
||||
does the comparision after converting the time to UTC. It converts
|
||||
floating times using the system notion of the timezone.
|
||||
|
||||
=cut
|
||||
sub compare {
|
||||
my $self = shift;
|
||||
my $a = $self->as_int();
|
||||
|
||||
my $arg = shift;
|
||||
|
||||
if(!isa($arg,'Net::ICal::Time')){
|
||||
$arg = new Net::ICal::Time($arg);
|
||||
}
|
||||
|
||||
my $b = $arg->as_int();
|
||||
|
||||
if($a < $b){
|
||||
return -1;
|
||||
} elsif ($a > $b) {
|
||||
return 1;
|
||||
} else {
|
||||
return 0;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
1;
|
||||
|
@ -1,317 +0,0 @@
|
||||
/* -*- Mode: C -*-*/
|
||||
/*======================================================================
|
||||
FILE: ical.i
|
||||
|
||||
(C) COPYRIGHT 1999 Eric Busboom
|
||||
http://www.softwarestudio.org
|
||||
|
||||
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
|
||||
|
||||
Contributions from:
|
||||
Graham Davison (g.m.davison@computer.org)
|
||||
|
||||
======================================================================*/
|
||||
|
||||
%module Net__ICal__Libical
|
||||
|
||||
%{
|
||||
#include "ical.h"
|
||||
|
||||
#include <sys/types.h> /* for size_t */
|
||||
#include <time.h>
|
||||
|
||||
%}
|
||||
|
||||
|
||||
|
||||
typedef void icalcomponent;
|
||||
typedef void icalproperty;
|
||||
|
||||
icalcomponent* icalparser_parse_string(char* str);
|
||||
|
||||
|
||||
icalcomponent* icalcomponent_new(icalcomponent_kind kind);
|
||||
icalcomponent* icalcomponent_new_clone(icalcomponent* component);
|
||||
icalcomponent* icalcomponent_new_from_string(char* str);
|
||||
|
||||
char* icalcomponent_as_ical_string(icalcomponent* component);
|
||||
|
||||
void icalcomponent_free(icalcomponent* component);
|
||||
int icalcomponent_count_errors(icalcomponent* component);
|
||||
void icalcomponent_strip_errors(icalcomponent* component);
|
||||
void icalcomponent_convert_errors(icalcomponent* component);
|
||||
|
||||
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);
|
||||
|
||||
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);
|
||||
|
||||
void icalcomponent_add_property(icalcomponent* component,
|
||||
icalproperty* property);
|
||||
|
||||
void icalcomponent_remove_property(icalcomponent* component,
|
||||
icalproperty* property);
|
||||
|
||||
|
||||
icalcomponent* icalcomponent_get_parent(icalcomponent* component);
|
||||
|
||||
icalcomponent_kind icalcomponent_isa(icalcomponent* component);
|
||||
|
||||
int icalrestriction_check(icalcomponent* comp);
|
||||
|
||||
|
||||
/* actually returns icalproperty_kind */
|
||||
int icalproperty_string_to_kind(const char* string);
|
||||
|
||||
/* actually takes icalproperty_kind */
|
||||
icalproperty* icalproperty_new(int kind);
|
||||
|
||||
icalproperty* icalproperty_new_from_string(char* str);
|
||||
|
||||
char* icalproperty_as_ical_string(icalproperty *prop);
|
||||
|
||||
void icalproperty_set_parameter_from_string(icalproperty* prop,
|
||||
const char* name, const char* value);
|
||||
void icalproperty_set_value_from_string(icalproperty* prop,const char* value, const char * kind);
|
||||
|
||||
const char* icalproperty_get_value_as_string(icalproperty* prop);
|
||||
const char* icalproperty_get_parameter_as_string(icalproperty* prop,
|
||||
const char* name);
|
||||
|
||||
|
||||
icalcomponent* icalproperty_get_parent(icalproperty* property);
|
||||
|
||||
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_UNKNOWN_ERROR /* Used for problems in input to icalerror_strerror()*/
|
||||
|
||||
} icalerrorenum;
|
||||
|
||||
/* Make an individual error fatal or non-fatal. */
|
||||
typedef enum icalererorstate {
|
||||
ICAL_ERROR_FATAL, /* Not fata */
|
||||
ICAL_ERROR_NONFATAL, /* Fatal */
|
||||
ICAL_ERROR_DEFAULT, /* Use the value of icalerror_errors_are_fatal*/
|
||||
ICAL_ERROR_UNKNOWN /* Asked state for an unknown error type */
|
||||
} icalerrorstate ;
|
||||
|
||||
void icalerror_set_error_state( icalerrorenum error, icalerrorstate);
|
||||
icalerrorstate icalerror_get_error_state( icalerrorenum error);
|
||||
|
||||
|
||||
const char* icalenum_property_kind_to_string(icalproperty_kind kind);
|
||||
icalproperty_kind icalenum_string_to_property_kind(const char* string);
|
||||
|
||||
const char* icalenum_value_kind_to_string(icalvalue_kind kind);
|
||||
/*icalvalue_kind icalenum_value_kind_by_prop(icalproperty_kind kind);*/
|
||||
|
||||
const char* icalenum_parameter_kind_to_string(icalparameter_kind kind);
|
||||
icalparameter_kind icalenum_string_to_parameter_kind(const char* string);
|
||||
|
||||
const char* icalenum_component_kind_to_string(icalcomponent_kind kind);
|
||||
icalcomponent_kind icalenum_string_to_component_kind(const char* string);
|
||||
|
||||
icalvalue_kind icalenum_property_kind_to_value_kind(icalproperty_kind kind);
|
||||
|
||||
|
||||
int* icallangbind_new_array(int size);
|
||||
void icallangbind_free_array(int* array);
|
||||
int icallangbind_access_array(int* array, int index);
|
||||
int icalrecur_expand_recurrence(char* rule, int start,
|
||||
int count, int* array);
|
||||
|
||||
|
||||
/* Iterate through properties and components using strings for the kind */
|
||||
icalproperty* icallangbind_get_first_property(icalcomponent *c,
|
||||
const char* prop);
|
||||
|
||||
icalproperty* icallangbind_get_next_property(icalcomponent *c,
|
||||
const char* prop);
|
||||
|
||||
icalcomponent* icallangbind_get_first_component(icalcomponent *c,
|
||||
const char* comp);
|
||||
|
||||
icalcomponent* icallangbind_get_next_component(icalcomponent *c,
|
||||
const char* comp);
|
||||
|
||||
|
||||
/* Return a string that can be evaluated in perl or python to
|
||||
generated a hash that holds the property's name, value and
|
||||
parameters. Sep is the hash seperation string, "=>" for perl and
|
||||
":" for python */
|
||||
const char* icallangbind_property_eval_string(icalproperty* prop, char* sep);
|
||||
|
||||
/***********************************************************************
|
||||
Time routines
|
||||
***********************************************************************/
|
||||
|
||||
|
||||
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. */
|
||||
|
||||
const char* zone; /*Ptr to Olsen placename. Libical does not own mem*/
|
||||
};
|
||||
|
||||
|
||||
/* Convert seconds past UNIX epoch to a timetype*/
|
||||
struct icaltimetype icaltime_from_timet(int v, int is_date);
|
||||
|
||||
/* Return the time as seconds past the UNIX epoch */
|
||||
/* Normally, this returns a time_t, but SWIG tries to turn that type
|
||||
into a pointer */
|
||||
int icaltime_as_timet(struct icaltimetype);
|
||||
|
||||
/* Return a string represention of the time, in RFC2445 format. The
|
||||
string is owned by libical */
|
||||
char* icaltime_as_ical_string(struct icaltimetype tt);
|
||||
|
||||
/* create a time from an ISO format string */
|
||||
struct icaltimetype icaltime_from_string(const char* str);
|
||||
|
||||
/* Routines for handling timezones */
|
||||
/* Return the offset of the named zone as seconds. tt is a time
|
||||
indicating the date for which you want the offset */
|
||||
int icaltime_utc_offset(struct icaltimetype tt, const char* tzid);
|
||||
|
||||
/* convert tt, of timezone tzid, into a utc time. Does nothing if the
|
||||
time is already UTC. */
|
||||
struct icaltimetype icaltime_as_utc(struct icaltimetype tt,
|
||||
const char* tzid);
|
||||
|
||||
/* convert tt, a time in UTC, into a time in timezone tzid */
|
||||
struct icaltimetype icaltime_as_zone(struct icaltimetype tt,
|
||||
const char* tzid);
|
||||
|
||||
/* Return a null time, which indicates no time has been set. This time represent the beginning of the epoch */
|
||||
struct icaltimetype icaltime_null_time(void);
|
||||
|
||||
/* Return true of the time is null. */
|
||||
int icaltime_is_null_time(struct icaltimetype t);
|
||||
|
||||
/* Returns false if the time is clearly invalid, but is not null. This
|
||||
is usually the result of creating a new time type buy not clearing
|
||||
it, or setting one of the flags to an illegal value. */
|
||||
int icaltime_is_valid_time(struct icaltimetype t);
|
||||
|
||||
/* Reset all of the time components to be in their normal ranges. For
|
||||
instance, given a time with minutes=70, the minutes will be reduces
|
||||
to 10, and the hour incremented. This allows the caller to do
|
||||
arithmetic on times without worrying about overflow or
|
||||
underflow. */
|
||||
struct icaltimetype icaltime_normalize(struct icaltimetype t);
|
||||
|
||||
/* Return the day of the year of the given time */
|
||||
short icaltime_day_of_year(struct icaltimetype t);
|
||||
|
||||
/* Create a new time, given a day of year and a year. */
|
||||
struct icaltimetype icaltime_from_day_of_year(short doy, short year);
|
||||
|
||||
/* Return the day of the week of the given time. Sunday is 0 */
|
||||
short icaltime_day_of_week(struct icaltimetype t);
|
||||
|
||||
/* Return the day of the year for the Sunday of the week that the
|
||||
given time is within. */
|
||||
short icaltime_start_doy_of_week(struct icaltimetype t);
|
||||
|
||||
/* Return a string with the time represented in the same format as ctime(). THe string is owned by libical */
|
||||
char* icaltime_as_ctime(struct icaltimetype);
|
||||
|
||||
/* Return the week number for the week the given time is within */
|
||||
short icaltime_week_number(struct icaltimetype t);
|
||||
|
||||
/* Return -1, 0, or 1 to indicate that a<b, a==b or a>b */
|
||||
int icaltime_compare(struct icaltimetype a,struct icaltimetype b);
|
||||
|
||||
/* like icaltime_compare, but only use the date parts. */
|
||||
int icaltime_compare_date_only(struct icaltimetype a, struct icaltimetype b);
|
||||
|
||||
/* Return the number of days in the given month */
|
||||
short icaltime_days_in_month(short month,short year);
|
||||
|
||||
|
||||
/***********************************************************************
|
||||
Duration Routines
|
||||
***********************************************************************/
|
||||
|
||||
|
||||
struct icaldurationtype
|
||||
{
|
||||
int is_neg;
|
||||
unsigned int days;
|
||||
unsigned int weeks;
|
||||
unsigned int hours;
|
||||
unsigned int minutes;
|
||||
unsigned int seconds;
|
||||
};
|
||||
|
||||
struct icaldurationtype icaldurationtype_from_int(int t);
|
||||
struct icaldurationtype icaldurationtype_from_string(const char*);
|
||||
int icaldurationtype_as_int(struct icaldurationtype duration);
|
||||
char* icaldurationtype_as_ical_string(struct icaldurationtype d);
|
||||
struct icaldurationtype icaldurationtype_null_duration();
|
||||
int icaldurationtype_is_null_duration(struct icaldurationtype d);
|
||||
|
||||
struct icaltimetype icaltime_add(struct icaltimetype t,
|
||||
struct icaldurationtype d);
|
||||
|
||||
struct icaldurationtype icaltime_subtract(struct icaltimetype t1,
|
||||
struct icaltimetype t2);
|
||||
|
||||
|
||||
/***********************************************************************
|
||||
Period Routines
|
||||
***********************************************************************/
|
||||
|
||||
|
||||
struct icalperiodtype
|
||||
{
|
||||
struct icaltimetype start;
|
||||
struct icaltimetype end;
|
||||
struct icaldurationtype duration;
|
||||
};
|
||||
|
||||
struct icalperiodtype icalperiodtype_from_string (const char* str);
|
||||
|
||||
const char* icalperiodtype_as_ical_string(struct icalperiodtype p);
|
||||
struct icalperiodtype icalperiodtype_null_period();
|
||||
int icalperiodtype_is_null_period(struct icalperiodtype p);
|
||||
int icalperiodtype_is_valid_period(struct icalperiodtype p);
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -1,393 +0,0 @@
|
||||
netical_wrap.c
|
||||
|
||||
[ Module : Net__ICal__Libical, Package : Net::ICal::Libical ]
|
||||
|
||||
|
||||
icalparser_parse_string(str);
|
||||
[ returns icalcomponent * ]
|
||||
|
||||
icalcomponent_new(kind);
|
||||
[ returns icalcomponent * ]
|
||||
|
||||
icalcomponent_new_clone(component);
|
||||
[ returns icalcomponent * ]
|
||||
|
||||
icalcomponent_new_from_string(str);
|
||||
[ returns icalcomponent * ]
|
||||
|
||||
icalcomponent_as_ical_string(component);
|
||||
[ returns char * ]
|
||||
|
||||
icalcomponent_free(component);
|
||||
[ returns void ]
|
||||
|
||||
icalcomponent_count_errors(component);
|
||||
[ returns int ]
|
||||
|
||||
icalcomponent_strip_errors(component);
|
||||
[ returns void ]
|
||||
|
||||
icalcomponent_convert_errors(component);
|
||||
[ returns void ]
|
||||
|
||||
icalcomponent_get_current_property(component);
|
||||
[ returns icalproperty * ]
|
||||
|
||||
icalcomponent_get_first_property(component,kind);
|
||||
[ returns icalproperty * ]
|
||||
|
||||
icalcomponent_get_next_property(component,kind);
|
||||
[ returns icalproperty * ]
|
||||
|
||||
icalcomponent_get_current_component(component);
|
||||
[ returns icalcomponent * ]
|
||||
|
||||
icalcomponent_get_first_component(component,kind);
|
||||
[ returns icalcomponent * ]
|
||||
|
||||
icalcomponent_get_next_component(component,kind);
|
||||
[ returns icalcomponent * ]
|
||||
|
||||
icalcomponent_add_property(component,property);
|
||||
[ returns void ]
|
||||
|
||||
icalcomponent_remove_property(component,property);
|
||||
[ returns void ]
|
||||
|
||||
icalcomponent_get_parent(component);
|
||||
[ returns icalcomponent * ]
|
||||
|
||||
icalcomponent_isa(component);
|
||||
[ returns icalcomponent_kind ]
|
||||
|
||||
icalrestriction_check(comp);
|
||||
[ returns int ]
|
||||
|
||||
icalproperty_string_to_kind(string);
|
||||
[ returns int ]
|
||||
|
||||
icalproperty_new(kind);
|
||||
[ returns icalproperty * ]
|
||||
|
||||
icalproperty_new_from_string(str);
|
||||
[ returns icalproperty * ]
|
||||
|
||||
icalproperty_as_ical_string(prop);
|
||||
[ returns char * ]
|
||||
|
||||
icalproperty_set_parameter_from_string(prop,name,value);
|
||||
[ returns void ]
|
||||
|
||||
icalproperty_set_value_from_string(prop,value,kind);
|
||||
[ returns void ]
|
||||
|
||||
icalproperty_get_value_as_string(prop);
|
||||
[ returns char * ]
|
||||
|
||||
icalproperty_get_parameter_as_string(prop,name);
|
||||
[ returns char * ]
|
||||
|
||||
icalproperty_get_parent(property);
|
||||
[ returns icalcomponent * ]
|
||||
|
||||
$ICAL_BADARG_ERROR = ICAL_BADARG_ERROR
|
||||
[ Constant: int ]
|
||||
|
||||
$ICAL_NEWFAILED_ERROR = ICAL_NEWFAILED_ERROR
|
||||
[ Constant: int ]
|
||||
|
||||
$ICAL_MALFORMEDDATA_ERROR = ICAL_MALFORMEDDATA_ERROR
|
||||
[ Constant: int ]
|
||||
|
||||
$ICAL_PARSE_ERROR = ICAL_PARSE_ERROR
|
||||
[ Constant: int ]
|
||||
|
||||
$ICAL_INTERNAL_ERROR = ICAL_INTERNAL_ERROR
|
||||
[ Constant: int ]
|
||||
Like assert --internal consist. prob
|
||||
|
||||
$ICAL_FILE_ERROR = ICAL_FILE_ERROR
|
||||
[ Constant: int ]
|
||||
|
||||
$ICAL_ALLOCATION_ERROR = ICAL_ALLOCATION_ERROR
|
||||
[ Constant: int ]
|
||||
|
||||
$ICAL_USAGE_ERROR = ICAL_USAGE_ERROR
|
||||
[ Constant: int ]
|
||||
|
||||
$ICAL_NO_ERROR = ICAL_NO_ERROR
|
||||
[ Constant: int ]
|
||||
Used for problems in input to icalerror_strerror()
|
||||
|
||||
$ICAL_UNKNOWN_ERROR = ICAL_UNKNOWN_ERROR
|
||||
[ Constant: int ]
|
||||
|
||||
$ICAL_ERROR_FATAL = ICAL_ERROR_FATAL
|
||||
[ Constant: int ]
|
||||
Not fata
|
||||
|
||||
$ICAL_ERROR_NONFATAL = ICAL_ERROR_NONFATAL
|
||||
[ Constant: int ]
|
||||
Fatal
|
||||
|
||||
$ICAL_ERROR_DEFAULT = ICAL_ERROR_DEFAULT
|
||||
[ Constant: int ]
|
||||
Use the value of icalerror_errors_are_fatal Asked state for an unknown
|
||||
error type
|
||||
|
||||
$ICAL_ERROR_UNKNOWN = ICAL_ERROR_UNKNOWN
|
||||
[ Constant: int ]
|
||||
|
||||
icalerror_set_error_state(error,icalerrorstate );
|
||||
[ returns void ]
|
||||
|
||||
icalerror_get_error_state(error);
|
||||
[ returns icalerrorstate ]
|
||||
|
||||
icalenum_property_kind_to_string(kind);
|
||||
[ returns char * ]
|
||||
|
||||
icalenum_string_to_property_kind(string);
|
||||
[ returns icalproperty_kind ]
|
||||
|
||||
icalenum_value_kind_to_string(kind);
|
||||
[ returns char * ]
|
||||
icalvalue_kind icalenum_value_kind_by_prop(icalproperty_kind kind);
|
||||
|
||||
|
||||
icalenum_parameter_kind_to_string(kind);
|
||||
[ returns char * ]
|
||||
|
||||
icalenum_string_to_parameter_kind(string);
|
||||
[ returns icalparameter_kind ]
|
||||
|
||||
icalenum_component_kind_to_string(kind);
|
||||
[ returns char * ]
|
||||
|
||||
icalenum_string_to_component_kind(string);
|
||||
[ returns icalcomponent_kind ]
|
||||
|
||||
icalenum_property_kind_to_value_kind(kind);
|
||||
[ returns icalvalue_kind ]
|
||||
|
||||
icallangbind_new_array(size);
|
||||
[ returns int * ]
|
||||
|
||||
icallangbind_free_array(array);
|
||||
[ returns void ]
|
||||
|
||||
icallangbind_access_array(array,index);
|
||||
[ returns int ]
|
||||
|
||||
icalrecur_expand_recurrence(rule,start,count,array);
|
||||
[ returns int ]
|
||||
|
||||
icallangbind_get_first_property(c,prop);
|
||||
[ returns icalproperty * ]
|
||||
|
||||
icallangbind_get_next_property(c,prop);
|
||||
[ returns icalproperty * ]
|
||||
|
||||
icallangbind_get_first_component(c,comp);
|
||||
[ returns icalcomponent * ]
|
||||
|
||||
icallangbind_get_next_component(c,comp);
|
||||
[ returns icalcomponent * ]
|
||||
|
||||
icallangbind_property_eval_string(prop,sep);
|
||||
[ returns char * ]
|
||||
|
||||
1. class icaltimetype
|
||||
======================
|
||||
[ created from struct icaltimetype ]
|
||||
|
||||
|
||||
icaltimetype_year_set(struct icaltimetype *,int );
|
||||
icaltimetype_year_get(struct icaltimetype *);
|
||||
[ Member data: returns int ]
|
||||
|
||||
icaltimetype_month_set(struct icaltimetype *,int );
|
||||
icaltimetype_month_get(struct icaltimetype *);
|
||||
[ Member data: returns int ]
|
||||
|
||||
icaltimetype_day_set(struct icaltimetype *,int );
|
||||
icaltimetype_day_get(struct icaltimetype *);
|
||||
[ Member data: returns int ]
|
||||
|
||||
icaltimetype_hour_set(struct icaltimetype *,int );
|
||||
icaltimetype_hour_get(struct icaltimetype *);
|
||||
[ Member data: returns int ]
|
||||
|
||||
icaltimetype_minute_set(struct icaltimetype *,int );
|
||||
icaltimetype_minute_get(struct icaltimetype *);
|
||||
[ Member data: returns int ]
|
||||
|
||||
icaltimetype_second_set(struct icaltimetype *,int );
|
||||
icaltimetype_second_get(struct icaltimetype *);
|
||||
[ Member data: returns int ]
|
||||
|
||||
icaltimetype_is_utc_set(struct icaltimetype *,int );
|
||||
icaltimetype_is_utc_get(struct icaltimetype *);
|
||||
[ Member data: returns int ]
|
||||
1-> time is in UTC timezone
|
||||
|
||||
icaltimetype_is_date_set(struct icaltimetype *,int );
|
||||
icaltimetype_is_date_get(struct icaltimetype *);
|
||||
[ Member data: returns int ]
|
||||
1 -> interpret this as date.
|
||||
|
||||
$icaltimetype_zone = icaltimetype::zone
|
||||
[ Constant: char * ]
|
||||
Ptr to Olsen placename. Libical does not own mem
|
||||
|
||||
----------
|
||||
|
||||
icaltime_from_timet(v,is_date);
|
||||
[ returns struct icaltimetype ]
|
||||
|
||||
icaltime_as_timet(struct icaltimetype *);
|
||||
[ returns int ]
|
||||
|
||||
icaltime_as_ical_string(tt);
|
||||
[ returns char * ]
|
||||
|
||||
icaltime_from_string(str);
|
||||
[ returns struct icaltimetype ]
|
||||
|
||||
icaltime_utc_offset(tt,tzid);
|
||||
[ returns int ]
|
||||
|
||||
icaltime_as_utc(tt,tzid);
|
||||
[ returns struct icaltimetype ]
|
||||
|
||||
icaltime_as_zone(tt,tzid);
|
||||
[ returns struct icaltimetype ]
|
||||
|
||||
icaltime_null_time();
|
||||
[ returns struct icaltimetype ]
|
||||
|
||||
icaltime_is_null_time(t);
|
||||
[ returns int ]
|
||||
|
||||
icaltime_is_valid_time(t);
|
||||
[ returns int ]
|
||||
|
||||
icaltime_normalize(t);
|
||||
[ returns struct icaltimetype ]
|
||||
|
||||
icaltime_day_of_year(t);
|
||||
[ returns short ]
|
||||
|
||||
icaltime_from_day_of_year(doy,year);
|
||||
[ returns struct icaltimetype ]
|
||||
|
||||
icaltime_day_of_week(t);
|
||||
[ returns short ]
|
||||
|
||||
icaltime_start_doy_of_week(t);
|
||||
[ returns short ]
|
||||
|
||||
icaltime_as_ctime(struct icaltimetype *);
|
||||
[ returns char * ]
|
||||
|
||||
icaltime_week_number(t);
|
||||
[ returns short ]
|
||||
|
||||
icaltime_compare(a,b);
|
||||
[ returns int ]
|
||||
|
||||
icaltime_compare_date_only(a,b);
|
||||
[ returns int ]
|
||||
|
||||
icaltime_days_in_month(month,year);
|
||||
[ returns short ]
|
||||
|
||||
2. class icaldurationtype
|
||||
==========================
|
||||
[ created from struct icaldurationtype ]
|
||||
|
||||
|
||||
icaldurationtype_is_neg_set(struct icaldurationtype *,int );
|
||||
icaldurationtype_is_neg_get(struct icaldurationtype *);
|
||||
[ Member data: returns int ]
|
||||
|
||||
icaldurationtype_days_set(struct icaldurationtype *,unsigned int );
|
||||
icaldurationtype_days_get(struct icaldurationtype *);
|
||||
[ Member data: returns unsigned int ]
|
||||
|
||||
icaldurationtype_weeks_set(struct icaldurationtype *,unsigned int );
|
||||
icaldurationtype_weeks_get(struct icaldurationtype *);
|
||||
[ Member data: returns unsigned int ]
|
||||
|
||||
icaldurationtype_hours_set(struct icaldurationtype *,unsigned int );
|
||||
icaldurationtype_hours_get(struct icaldurationtype *);
|
||||
[ Member data: returns unsigned int ]
|
||||
|
||||
icaldurationtype_minutes_set(struct icaldurationtype *,unsigned int );
|
||||
icaldurationtype_minutes_get(struct icaldurationtype *);
|
||||
[ Member data: returns unsigned int ]
|
||||
|
||||
icaldurationtype_seconds_set(struct icaldurationtype *,unsigned int );
|
||||
icaldurationtype_seconds_get(struct icaldurationtype *);
|
||||
[ Member data: returns unsigned int ]
|
||||
|
||||
----------
|
||||
|
||||
icaldurationtype_from_int(t);
|
||||
[ returns struct icaldurationtype ]
|
||||
|
||||
icaldurationtype_from_string(char *);
|
||||
[ returns struct icaldurationtype ]
|
||||
|
||||
icaldurationtype_as_int(duration);
|
||||
[ returns int ]
|
||||
|
||||
icaldurationtype_as_ical_string(d);
|
||||
[ returns char * ]
|
||||
|
||||
icaldurationtype_null_duration();
|
||||
[ returns struct icaldurationtype ]
|
||||
|
||||
icaldurationtype_is_null_duration(d);
|
||||
[ returns int ]
|
||||
|
||||
icaltime_add(t,d);
|
||||
[ returns struct icaltimetype ]
|
||||
|
||||
icaltime_subtract(t1,t2);
|
||||
[ returns struct icaldurationtype ]
|
||||
|
||||
3. class icalperiodtype
|
||||
========================
|
||||
[ created from struct icalperiodtype ]
|
||||
|
||||
|
||||
icalperiodtype_start_set(struct icalperiodtype *,struct icaltimetype *);
|
||||
icalperiodtype_start_get(struct icalperiodtype *);
|
||||
[ Member data: returns struct icaltimetype * ]
|
||||
|
||||
icalperiodtype_end_set(struct icalperiodtype *,struct icaltimetype *);
|
||||
icalperiodtype_end_get(struct icalperiodtype *);
|
||||
[ Member data: returns struct icaltimetype * ]
|
||||
|
||||
icalperiodtype_duration_set(struct icalperiodtype *,struct icaldurationtype *);
|
||||
icalperiodtype_duration_get(struct icalperiodtype *);
|
||||
[ Member data: returns struct icaldurationtype * ]
|
||||
|
||||
----------
|
||||
|
||||
icalperiodtype_from_string(str);
|
||||
[ returns struct icalperiodtype ]
|
||||
|
||||
icalperiodtype_as_ical_string(p);
|
||||
[ returns char * ]
|
||||
|
||||
icalperiodtype_null_period();
|
||||
[ returns struct icalperiodtype ]
|
||||
|
||||
icalperiodtype_is_null_period(p);
|
||||
[ returns int ]
|
||||
|
||||
icalperiodtype_is_valid_period(p);
|
||||
[ returns int ]
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -1,58 +0,0 @@
|
||||
From foo6@example.com Sun Jan 16 17:34:23 2000
|
||||
From: foo6@example.com
|
||||
MIME-Version: 1.0
|
||||
To: alice@agony
|
||||
Subject: REQUEST - Phone Conference
|
||||
Content-Type:multipart/related;boundary="--FEE3790DC7E35189CA67CE2C"
|
||||
|
||||
----FEE3790DC7E35189CA67CE2C
|
||||
Content-Type: multipart/alternative;boundary="--00FEE3790DC7E35189CA67CE2C00"
|
||||
|
||||
----00FEE3790DC7E35189CA67CE2C00
|
||||
Content-Type: text/plain; charset=us-ascii
|
||||
Content-Transfer-Encoding: 7bit
|
||||
|
||||
When: 7/1/1997 10:00PM PDT- 7/1/97 10:30 PM PDT
|
||||
Where:
|
||||
Organizer: foo1@example.com
|
||||
Summary: Let's discuss the attached document
|
||||
|
||||
----00FEE3790DC7E35189CA67CE2C00
|
||||
Content-Type:text/calendar; method=REQUEST; charset=US-ASCII;Component=vevent
|
||||
Content-Transfer-Encoding: 7bit
|
||||
Content-Disposition: attachment; filename="event.vcs"
|
||||
|
||||
BEGIN:VCALENDAR
|
||||
PRODID:-//ACME/DesktopCalendar//EN
|
||||
METHOD:REQUEST
|
||||
VERSION:2.0
|
||||
BEGIN:VEVENT
|
||||
ORGANIZER:foo1@example.com
|
||||
ATTENDEE;ROLE=CHAIR;PARTSTAT=ACCEPTED:foo1@example.com
|
||||
ATTENDEE;RSVP=TRUE;CUTYPE=INDIVIDUAL:mailto:foo2@example.com
|
||||
ATTENDEE;RSVP=TRUE;CUTYPE=INDIVIDUAL:mailto:foo3@example.com
|
||||
DTSTAMP:19970611T190000Z
|
||||
DTSTART:19970621T170000Z
|
||||
DTEND:199706211T173000Z
|
||||
SUMMARY:Let's discuss the attached document
|
||||
UID:calsvr.example.com-873970198738777-8aa
|
||||
ATTACH:cid:calsvr.example.com-12345aaa
|
||||
SEQUENCE:0
|
||||
STATUS:CONFIRMED
|
||||
END:VEVENT
|
||||
END:VCALENDAR
|
||||
|
||||
----00FEE3790DC7E35189CA67CE2C00--
|
||||
|
||||
----FEE3790DC7E35189CA67CE2C
|
||||
Content-Type: application/msword; name="FieldReport.doc"
|
||||
Content-Transfer-Encoding: base64
|
||||
Content-Disposition: inline; filename="FieldReport.doc"
|
||||
Content-ID: <calsvr.example.com-12345aaa>
|
||||
|
||||
|
||||
R0lGODdhTAQZAJEAAFVVVd3d3e4AAP///ywAAAAATAQZAAAC/5yPOSLhD6OctNqLs94XqAG
|
||||
4kiW5omm6sq27gvH8kzX9o1y+s73/g8MCofEovGITCoxKMbyCR16cNSq9YrNarfcrvdriIH
|
||||
5LL5jE6rxc3G+v2cguf0uv2Oz+v38L7/DxgoOKjURnjIIbe3yNjo+AgZWYVIWWl5iZnJY6J.
|
||||
|
||||
----FEE3790DC7E35189CA67CE2C--
|
@ -1,262 +0,0 @@
|
||||
From foo1@example.com Sun Jan 16 17:34:23 2000
|
||||
From: foo1@example.com
|
||||
To: alice@agony
|
||||
Subject: Phone Conference
|
||||
Mime-Version: 1.0
|
||||
Content-Type:text/calendar; method=REQUEST; charset=US-ASCII
|
||||
Content-Transfer-Encoding: 7bit
|
||||
|
||||
BEGIN:VCALENDAR
|
||||
PRODID:-//ACME/DesktopCalendar//EN
|
||||
METHOD:REQUEST
|
||||
VERSION:2.0
|
||||
BEGIN:VEVENT
|
||||
ORGANIZER:mailto:sman@netscape.com
|
||||
ATTENDEE;ROLE=CHAIR;PARTSTAT=ACCEPTED:mailto:sman@netscape.com
|
||||
ATTENDEE;RSVP=TRUE:mailto:stevesil@microsoft.com
|
||||
DTSTAMP:19970611T190000Z
|
||||
DTSTART:19970701T210000Z
|
||||
DTEND:19970701T230000Z
|
||||
SUMMARY:Phone Conference
|
||||
DESCRIPTION:Please review the attached document.
|
||||
UID:calsvr.example.com-873970198738777
|
||||
ATTACH:ftp://ftp.bar.com/pub/docs/foo.doc
|
||||
STATUS:CONFIRMED
|
||||
END:VEVENT
|
||||
END:VCALENDAR
|
||||
|
||||
From foo2@example.com Sun Jan 16 17:34:23 2000
|
||||
From: foo2@example.com
|
||||
To: alice@agony
|
||||
Subject: Phone Conference
|
||||
Mime-Version: 1.0
|
||||
Content-Type: multipart/alternative;boundary="01BD3665.3AF0D360"
|
||||
|
||||
--01BD3665.3AF0D360
|
||||
Content-Type: text/plain;charset=us-ascii
|
||||
Content-Transfer-Encoding: 7bit
|
||||
|
||||
This is an alternative representation of a TEXT/CALENDAR MIME Object
|
||||
When: 7/1/1997 10:00AM PDT - 7/1/97 10:30AM PDT
|
||||
Where:
|
||||
Organizer: foo1@example.com
|
||||
Summary: Phone Conference
|
||||
|
||||
--01BD3665.3AF0D360
|
||||
Content-Type:text/calendar; method=REQUEST; charset=US-ASCII
|
||||
Content-Transfer-Encoding: 7bit
|
||||
|
||||
BEGIN:VCALENDAR
|
||||
PRODID:-//ACME/DesktopCalendar//EN
|
||||
METHOD:REQUEST
|
||||
VERSION:2.0
|
||||
BEGIN:VEVENT
|
||||
ORGANIZER:mailto:foo1@example.com
|
||||
ATTENDEE;ROLE=CHAIR;PARTSTAT=ACCEPTED:mailto:foo1@example.com
|
||||
ATTENDEE;RSVP=TRUE;CUTYPE=INDIVIDUAL:mailto:foo2@example.com
|
||||
DTSTAMP:19970611T190000Z
|
||||
DTSTART:19970701T170000Z
|
||||
DTEND:19970701T173000Z
|
||||
SUMMARY:Phone Conference
|
||||
UID:calsvr.example.com-8739701987387771
|
||||
SEQUENCE:0
|
||||
STATUS:CONFIRMED
|
||||
END:VEVENT
|
||||
END:VCALENDAR
|
||||
|
||||
--01BD3665.3AF0D360--
|
||||
|
||||
From foo3@example.com Sun Jan 16 17:34:23 2000
|
||||
From: foo3@example.com
|
||||
To: alice@agony
|
||||
Subject: Phone Conference
|
||||
Mime-Version: 1.0
|
||||
Content-Type: multipart/related; boundary="boundary-example-1";type=text/calendar
|
||||
|
||||
--boundary-example-1
|
||||
Content-Type:text/calendar; method=REQUEST; charset=US-ASCII
|
||||
Content-Transfer-Encoding: 7bit
|
||||
Content-Disposition: attachment; filename="event.vcs"
|
||||
|
||||
BEGIN:VCALENDAR
|
||||
PRODID:-//ACME/DesktopCalendar//EN
|
||||
METHOD:REQUEST
|
||||
VERSION:2.0
|
||||
BEGIN:VEVENT
|
||||
ORGANIZER:mailto:foo1@example.com
|
||||
ATTENDEE;ROLE=CHAIR;PARTSTAT=ACCEPTED:mailto:foo1@example.com
|
||||
ATTENDEE;RSVP=TRUE;CUTYPE=INDIVIDUAL:mailto:foo2@example.com
|
||||
DTSTAMP:19970611T190000Z
|
||||
DTSTART:19970701T180000Z
|
||||
DTEND:19970701T183000Z
|
||||
SUMMARY:Phone Conference
|
||||
UID:calsvr.example.com-8739701987387771
|
||||
ATTACH:cid:123456789@example.com
|
||||
SEQUENCE:0
|
||||
STATUS:CONFIRMED
|
||||
END:VEVENT
|
||||
END:VCALENDAR
|
||||
|
||||
--boundary-example-1
|
||||
Content-Type: application/msword; name="FieldReport.doc"
|
||||
Content-Transfer-Encoding: base64
|
||||
Content-Disposition: inline; filename="FieldReport.doc"
|
||||
Content-ID: <123456789@example.com>
|
||||
|
||||
0M8R4KGxGuEAAAAAAAAAAAAAAAAAAAAAPgADAP7/CQAGAAAAAAAAAAABAAAARAAAAAAA
|
||||
AAAAEAAAQAAAAAEAAAD+////AAAAAEUAAAD/////////////////////////////////
|
||||
|
||||
--boundary-example-1--
|
||||
|
||||
From foo4@example.com Sun Jan 16 17:34:23 2000
|
||||
From: foo4@example.com
|
||||
To: alice@agony
|
||||
Subject: Summer Company Holidays
|
||||
Mime-Version: 1.0
|
||||
Content-Type:text/calendar; method=PUBLISH; charset=US-ASCII
|
||||
Content-Transfer-Encoding: 7bit
|
||||
Content-Disposition: attachment; filename="event.vcs"
|
||||
|
||||
BEGIN:VCALENDAR
|
||||
PRODID:-//ACME/DESKTOPCALENDAR//EN
|
||||
METHOD:PUBLISH
|
||||
VERSION:2.0
|
||||
BEGIN:VEVENT
|
||||
ORGANIZER:MAILTO:FOO1@EXAMPLE.COM
|
||||
DTSTAMP:19970611T150000Z
|
||||
DTSTART:19970701T150000Z
|
||||
DTEND:19970701T230000Z
|
||||
SUMMARY:Company Picnic
|
||||
DESCRIPTION:Food and drink will be provided
|
||||
UID:CALSVR.EXAMPLE.COM-873970198738777-1
|
||||
SEQUENCE:0
|
||||
STATUS:CONFIRMED
|
||||
END:VEVENT
|
||||
BEGIN:VEVENT
|
||||
ORGANIZER:MAILTO:FOO1@EXAMPLE.COM
|
||||
DTSTAMP:19970611T190000Z
|
||||
DTSTART:19970715T150000Z
|
||||
DTEND:19970715T230000Z
|
||||
SUMMARY:Company Bowling Tournament
|
||||
DESCRIPTION:We have 10 lanes reserved
|
||||
UID:CALSVR.EXAMPLE.COM-873970198738777-2
|
||||
SEQUENCE:0
|
||||
STATUS:CONFIRMED
|
||||
END:VEVENT
|
||||
END:VCALENDAR
|
||||
|
||||
From foo5@example.com Sun Jan 16 17:34:23 2000
|
||||
From: foo5@example.com
|
||||
To: alice@agony
|
||||
Subject: Phone Conference
|
||||
Mime-Version: 1.0
|
||||
Content-Type:multipart/mixed;boundary="--FEE3790DC7E35189CA67CE2C"
|
||||
|
||||
This is a multi-part message in MIME format.
|
||||
|
||||
----FEE3790DC7E35189CA67CE2C
|
||||
Content-Type:text/calendar; method=REQUEST; charset=US-ASCII
|
||||
Content-Transfer-Encoding: 7bit
|
||||
Content-Disposition: attachment; filename="event1.vcs"
|
||||
|
||||
BEGIN:VCALENDAR
|
||||
PRODID:-//ACME/DesktopCalendar//EN
|
||||
METHOD:REQUEST
|
||||
VERSION:2.0
|
||||
BEGIN:VEVENT
|
||||
ORGANIZER:mailto:foo1@example.com
|
||||
ATTENDEE;ROLE=CHAIR;PARTSTAT=ACCEPTED:mailto:foo1@example.com
|
||||
ATTENDEE;RSVP=TRUE;CUTYPE=INDIVIDUAL:mailto:foo2@example.com
|
||||
DTSTAMP:19970611T190000Z
|
||||
DTSTART:19970701T210000Z
|
||||
DTEND:19970701T230000Z
|
||||
SUMMARY:Phone Conference
|
||||
DESCRIPTION:Discuss what happened at the last meeting
|
||||
UID:calsvr.example.com-8739701987387772
|
||||
SEQUENCE:0
|
||||
STATUS:CONFIRMED
|
||||
END:VEVENT
|
||||
END:VCALENDAR
|
||||
|
||||
----FEE3790DC7E35189CA67CE2C
|
||||
Content-Type:text/calendar; method=REQUEST; charset=US-ASCII
|
||||
Content-Transfer-Encoding:7bit
|
||||
Content-Disposition: attachment; filename="todo1.vcs"
|
||||
|
||||
BEGIN:VCALENDAR
|
||||
PRODID:-//ACME/DesktopCalendar//EN
|
||||
METHOD:REQUEST
|
||||
VERSION:2.0
|
||||
BEGIN:VTODO
|
||||
DUE:19970701T090000
|
||||
ORGANIZER:mailto:foo1@example.com
|
||||
ATTENDEE;ROLE=CHAIR;PARTSTAT=ACCEPTED:mailto:foo1@example.com
|
||||
ATTENDEE;RSVP=TRUE:mailto:foo2@example.com
|
||||
SUMMARY:Phone Conference
|
||||
DESCRIPTION:Discuss a new location for the company picnic
|
||||
UID:calsvr.example.com-td-8739701987387773
|
||||
SEQUENCE:0
|
||||
STATUS:NEEDS ACTION
|
||||
END:VEVENT
|
||||
END:VCALENDAR
|
||||
|
||||
----FEE3790DC7E35189CA67CE2C--
|
||||
|
||||
From foo6@example.com Sun Jan 16 17:34:23 2000
|
||||
From: foo6@example.com
|
||||
MIME-Version: 1.0
|
||||
To: alice@agony
|
||||
Subject: REQUEST - Phone Conference
|
||||
Content-Type:multipart/related;boundary="--FEE3790DC7E35189CA67CE2C"
|
||||
|
||||
----FEE3790DC7E35189CA67CE2C
|
||||
Content-Type: multipart/alternative;boundary="--00FEE3790DC7E35189CA67CE2C00"
|
||||
|
||||
----00FEE3790DC7E35189CA67CE2C00
|
||||
Content-Type: text/plain; charset=us-ascii
|
||||
Content-Transfer-Encoding: 7bit
|
||||
|
||||
When: 7/1/1997 10:00PM PDT- 7/1/97 10:30 PM PDT
|
||||
Where:
|
||||
Organizer: foo1@example.com
|
||||
Summary: Let's discuss the attached document
|
||||
|
||||
----00FEE3790DC7E35189CA67CE2C00
|
||||
Content-Type:text/calendar; method=REQUEST; charset=US-ASCII;Component=vevent
|
||||
Content-Transfer-Encoding: 7bit
|
||||
Content-Disposition: attachment; filename="event.vcs"
|
||||
|
||||
BEGIN:VCALENDAR
|
||||
PRODID:-//ACME/DesktopCalendar//EN
|
||||
METHOD:REQUEST
|
||||
VERSION:2.0
|
||||
BEGIN:VEVENT
|
||||
ORGANIZER:foo1@example.com
|
||||
ATTENDEE;ROLE=CHAIR;PARTSTAT=ACCEPTED:foo1@example.com
|
||||
ATTENDEE;RSVP=TRUE;CUTYPE=INDIVIDUAL:mailto:foo2@example.com
|
||||
ATTENDEE;RSVP=TRUE;CUTYPE=INDIVIDUAL:mailto:foo3@example.com
|
||||
DTSTAMP:19970611T190000Z
|
||||
DTSTART:19970621T170000Z
|
||||
DTEND:199706211T173000Z
|
||||
SUMMARY:Let's discuss the attached document
|
||||
UID:calsvr.example.com-873970198738777-8aa
|
||||
ATTACH:cid:calsvr.example.com-12345aaa
|
||||
SEQUENCE:0
|
||||
STATUS:CONFIRMED
|
||||
END:VEVENT
|
||||
END:VCALENDAR
|
||||
|
||||
----00FEE3790DC7E35189CA67CE2C00--
|
||||
|
||||
----FEE3790DC7E35189CA67CE2C
|
||||
Content-Type: application/msword; name="FieldReport.doc"
|
||||
Content-Transfer-Encoding: base64
|
||||
Content-Disposition: inline; filename="FieldReport.doc"
|
||||
Content-ID: <calsvr.example.com-12345aaa>
|
||||
|
||||
|
||||
R0lGODdhTAQZAJEAAFVVVd3d3e4AAP///ywAAAAATAQZAAAC/5yPOSLhD6OctNqLs94XqAG
|
||||
4kiW5omm6sq27gvH8kzX9o1y+s73/g8MCofEovGITCoxKMbyCR16cNSq9YrNarfcrvdriIH
|
||||
5LL5jE6rxc3G+v2cguf0uv2Oz+v38L7/DxgoOKjURnjIIbe3yNjo+AgZWYVIWWl5iZnJY6J.
|
||||
|
||||
----FEE3790DC7E35189CA67CE2C--
|
@ -1,26 +0,0 @@
|
||||
From foo1@example.com Sun Jan 16 17:34:23 2000
|
||||
From: foo1@example.com
|
||||
To: alice@agony
|
||||
Subject: Phone Conference
|
||||
Mime-Version: 1.0
|
||||
Content-Type:text/calendar; method=REQUEST; charset=US-ASCII
|
||||
Content-Transfer-Encoding: 7bit
|
||||
|
||||
BEGIN:VCALENDAR
|
||||
PRODID:-//ACME/DesktopCalendar//EN
|
||||
METHOD:REQUEST
|
||||
VERSION:2.0
|
||||
BEGIN:VEVENT
|
||||
ORGANIZER:mailto:sman@netscape.com
|
||||
ATTENDEE;ROLE=CHAIR;PARTSTAT=ACCEPTED:mailto:sman@netscape.com
|
||||
ATTENDEE;RSVP=TRUE:mailto:stevesil@microsoft.com
|
||||
DTSTAMP:19970611T190000Z
|
||||
DTSTART:19970701T210000Z
|
||||
DTEND:19970701T230000Z
|
||||
SUMMARY:Phone Conference
|
||||
DESCRIPTION:Please review the attached document.
|
||||
UID:calsvr.example.com-873970198738777
|
||||
ATTACH:ftp://ftp.bar.com/pub/docs/foo.doc
|
||||
STATUS:CONFIRMED
|
||||
END:VEVENT
|
||||
END:VCALENDAR
|
@ -1,321 +0,0 @@
|
||||
BEGIN:VCALENDAR
|
||||
VERSION:2.0
|
||||
PRODID:-//hacksw/handcal//NONSGML v1.0//EN
|
||||
BEGIN:VEVENT
|
||||
DTSTART:19970714T170000Z
|
||||
DTEND:19970715T035959Z
|
||||
SUMMARY:Bastille Day Party
|
||||
END:VEVENT
|
||||
END:VCALENDAR
|
||||
|
||||
BEGIN:VEVENT
|
||||
UID:19970901T130000Z-123401@host.com
|
||||
DTSTAMP:19970901T1300Z
|
||||
DTSTART:19970903T163000Z
|
||||
DTEND:19970903T190000Z
|
||||
SUMMARY:Annual Employee Review
|
||||
CLASS:PRIVATE
|
||||
CATEGORIES:BUSINESS,HUMAN RESOURCES
|
||||
END:VEVENT
|
||||
|
||||
BEGIN:VEVENT
|
||||
UID:19970901T130000Z-123402@host.com
|
||||
DTSTAMP:19970901T1300Z
|
||||
DTSTART:19970401T163000Z
|
||||
DTEND:19970402T010000Z
|
||||
SUMMARY:Laurel is in sensitivity awareness class.
|
||||
CLASS:PUBLIC
|
||||
CATEGORIES:BUSINESS,HUMAN RESOURCES
|
||||
TRANSP:TRANSPARENT
|
||||
END:VEVENT
|
||||
|
||||
BEGIN:VEVENT
|
||||
UID:19970901T130000Z-123403@host.com
|
||||
DTSTAMP:19970901T1300Z
|
||||
DTSTART:19971102
|
||||
SUMMARY:Our Blissful Anniversary
|
||||
CLASS:CONFIDENTIAL
|
||||
CATEGORIES:ANNIVERSARY,PERSONAL,SPECIAL OCCASION
|
||||
RRULE:FREQ=YEARLY
|
||||
END:VEVENT
|
||||
|
||||
BEGIN:VTODO
|
||||
UID:19970901T130000Z-123404@host.com
|
||||
DTSTAMP:19970901T1300Z
|
||||
DTSTART:19970415T133000Z
|
||||
DUE:19970416T045959Z
|
||||
SUMMARY:1996 Income Tax Preparation
|
||||
CLASS:CONFIDENTIAL
|
||||
CATEGORIES:FAMILY,FINANCE
|
||||
PRIORITY:1
|
||||
STATUS:NEEDS-ACTION
|
||||
END:VTODO
|
||||
BEGIN:VJOURNAL
|
||||
UID:19970901T130000Z-123405@host.com
|
||||
DTSTAMP:19970901T1300Z
|
||||
DTSTART;VALUE=DATE:19970317
|
||||
SUMMARY:Staff meeting minutes
|
||||
DESCRIPTION:1. Staff meeting: Participants include Joe\, Lisa
|
||||
and Bob. Aurora project plans were reviewed. There is currently
|
||||
no budget reserves for this project. Lisa will escalate to
|
||||
management. Next meeting on Tuesday.\n
|
||||
2. Telephone Conference: ABC Corp. sales representative called
|
||||
to discuss new printer. Promised to get us a demo by Friday.\n
|
||||
3. Henry Miller (Handsoff Insurance): Car was totaled by tree.
|
||||
Is looking into a loaner car. 654-2323 (tel).
|
||||
END:VJOURNAL
|
||||
BEGIN:VFREEBUSY
|
||||
ORGANIZER:MAILTO:jane_doe@host1.com
|
||||
ATTENDEE:MAILTO:john_public@host2.com
|
||||
DTSTART:19971015T050000Z
|
||||
DTEND:19971016T050000Z
|
||||
DTSTAMP:19970901T083000Z
|
||||
END:VFREEBUSY
|
||||
BEGIN:VFREEBUSY
|
||||
ORGANIZER:MAILTO:jane_doe@host1.com
|
||||
ATTENDEE:MAILTO:john_public@host2.com
|
||||
DTSTAMP:19970901T100000Z
|
||||
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
|
||||
DTEND:19980410T141711Z
|
||||
FREEBUSY:19980314T233000Z/19980315T003000Z
|
||||
FREEBUSY:19980316T153000Z/19980316T163000Z
|
||||
FREEBUSY:19980318T030000Z/19980318T040000Z
|
||||
URL:http://www.host.com/calendar/busytime/jsmith.ifb
|
||||
END:VFREEBUSY
|
||||
BEGIN:VTIMEZONE
|
||||
TZID:US-Eastern
|
||||
LAST-MODIFIED:19870101T000000Z
|
||||
BEGIN:STANDARD
|
||||
DTSTART:19971026T020000
|
||||
RDATE:19971026T020000
|
||||
TZOFFSETFROM:-0400
|
||||
TZOFFSETTO:-0500
|
||||
TZNAME:EST
|
||||
END:STANDARD
|
||||
BEGIN:DAYLIGHT
|
||||
DTSTART:19971026T020000
|
||||
RDATE:19970406T020000
|
||||
TZOFFSETFROM:-0500
|
||||
TZOFFSETTO:-0400
|
||||
TZNAME:EDT
|
||||
END:DAYLIGHT
|
||||
END:VTIMEZONE
|
||||
BEGIN:VTIMEZONE
|
||||
TZID:US-Eastern
|
||||
LAST-MODIFIED:19870101T000000Z
|
||||
TZURL:http://zones.stds_r_us.net/tz/US-Eastern
|
||||
BEGIN:STANDARD
|
||||
DTSTART:19671029T020000
|
||||
RRULE:FREQ=YEARLY;BYDAY=-1SU;BYMONTH=10
|
||||
TZOFFSETFROM:-0400
|
||||
TZOFFSETTO:-0500
|
||||
TZNAME:EST
|
||||
END:STANDARD
|
||||
BEGIN:DAYLIGHT
|
||||
DTSTART:19870405T020000
|
||||
RRULE:FREQ=YEARLY;BYDAY=1SU;BYMONTH=4
|
||||
TZOFFSETFROM:-0500
|
||||
TZOFFSETTO:-0400
|
||||
TZNAME:EDT
|
||||
END:DAYLIGHT
|
||||
END:VTIMEZONE
|
||||
BEGIN:VTIMEZONE
|
||||
TZID:US--Fictitious-Eastern
|
||||
LAST-MODIFIED:19870101T000000Z
|
||||
BEGIN:STANDARD
|
||||
DTSTART:19671029T020000
|
||||
RRULE:FREQ=YEARLY;BYDAY=-1SU;BYMONTH=10
|
||||
TZOFFSETFROM:-0400
|
||||
TZOFFSETTO:-0500
|
||||
TZNAME:EST
|
||||
END:STANDARD
|
||||
BEGIN:DAYLIGHT
|
||||
DTSTART:19870405T020000
|
||||
RRULE:FREQ=YEARLY;BYDAY=1SU;BYMONTH=4;UNTIL=19980404T070000Z
|
||||
TZOFFSETFROM:-0500
|
||||
TZOFFSETTO:-0400
|
||||
TZNAME:EDT
|
||||
END:DAYLIGHT
|
||||
END:VTIMEZONE
|
||||
BEGIN:VTIMEZONE
|
||||
TZID:US--Fictitious-Eastern
|
||||
LAST-MODIFIED:19870101T000000Z
|
||||
BEGIN:STANDARD
|
||||
DTSTART:19671029T020000
|
||||
RRULE:FREQ=YEARLY;BYDAY=-1SU;BYMONTH=10
|
||||
TZOFFSETFROM:-0400
|
||||
TZOFFSETTO:-0500
|
||||
TZNAME:EST
|
||||
END:STANDARD
|
||||
BEGIN:DAYLIGHT
|
||||
DTSTART:19870405T020000
|
||||
RRULE:FREQ=YEARLY;BYDAY=1SU;BYMONTH=4;UNTIL=19980404T070000Z
|
||||
TZOFFSETFROM:-0500
|
||||
TZOFFSETTO:-0400
|
||||
TZNAME:EDT
|
||||
END:DAYLIGHT
|
||||
BEGIN:DAYLIGHT
|
||||
DTSTART:19990424T020000
|
||||
RRULE:FREQ=YEARLY;BYDAY=-1SU;BYMONTH=4
|
||||
TZOFFSETFROM:-0500
|
||||
TZOFFSETTO:-0400
|
||||
TZNAME:EDT
|
||||
END:DAYLIGHT
|
||||
END:VTIMEZONE
|
||||
BEGIN:VALARM
|
||||
TRIGGER;VALUE=DATE-TIME:19970317T133000Z
|
||||
REPEAT:4
|
||||
DURATION:PT15M
|
||||
ACTION:AUDIO
|
||||
ATTACH;FMTTYPE=audio/basic:ftp://host.com/pub/sounds/bell-01.aud
|
||||
END:VALARM
|
||||
BEGIN:VALARM
|
||||
TRIGGER:-PT30M
|
||||
REPEAT:2
|
||||
DURATION:PT15M
|
||||
ACTION:DISPLAY
|
||||
DESCRIPTION:Breakfast meeting with executive\n
|
||||
team at 8:30 AM EST.
|
||||
END:VALARM
|
||||
BEGIN:VALARM
|
||||
TRIGGER:-P2D
|
||||
ACTION:EMAIL
|
||||
ATTENDEE:MAILTO:john_doe@host.com
|
||||
SUMMARY:*** REMINDER: SEND AGENDA FOR WEEKLY STAFF MEETING ***
|
||||
DESCRIPTION:A draft agenda needs to be sent out to the attendees
|
||||
to the weekly managers meeting (MGR-LIST). Attached is a
|
||||
pointer the document template for the agenda file.
|
||||
ATTACH;FMTTYPE=application/binary:http://host.com/templates/agen
|
||||
da.doc
|
||||
END:VALARM
|
||||
BEGIN:VALARM
|
||||
TRIGGER;VALUE=DATE-TIME:19980101T050000Z
|
||||
REPEAT:23
|
||||
DURATION:PT1H
|
||||
ACTION:PROCEDURE
|
||||
ATTACH;FMTTYPE=application/binary:ftp://host.com/novo-
|
||||
procs/felizano.exe
|
||||
END:VALARM
|
||||
BEGIN:VCALENDAR
|
||||
PRODID:-//RDU Software//NONSGML HandCal//EN
|
||||
VERSION:2.0
|
||||
BEGIN:VTIMEZONE
|
||||
TZID:US-Eastern
|
||||
BEGIN:STANDARD
|
||||
DTSTART:19981025T020000
|
||||
RDATE:19981025T020000
|
||||
TZOFFSETFROM:-0400
|
||||
TZOFFSETTO:-0500
|
||||
TZNAME:EST
|
||||
END:STANDARD
|
||||
BEGIN:DAYLIGHT
|
||||
DTSTART:19990404T020000
|
||||
RDATE:19990404T020000
|
||||
TZOFFSETFROM:-0500
|
||||
TZOFFSETTO:-0400
|
||||
TZNAME:EDT
|
||||
END:DAYLIGHT
|
||||
END:VTIMEZONE
|
||||
BEGIN:VEVENT
|
||||
DTSTAMP:19980309T231000Z
|
||||
UID:guid-1.host1.com
|
||||
ORGANIZER;ROLE=CHAIR:MAILTO:mrbig@host.com
|
||||
ATTENDEE;RSVP=TRUE;ROLE=REQ-PARTICIPANT;CUTYPE=GROUP:
|
||||
MAILTO:employee-A@host.com
|
||||
DESCRIPTION:Project XYZ Review Meeting
|
||||
CATEGORIES:MEETING
|
||||
CLASS:PUBLIC
|
||||
CREATED:19980309T130000Z
|
||||
SUMMARY:XYZ Project Review
|
||||
DTSTART;TZID=US-Eastern:19980312T083000
|
||||
DTEND;TZID=US-Eastern:19980312T093000
|
||||
LOCATION:1CP Conference Room 4350
|
||||
END:VEVENT
|
||||
END:VCALENDAR
|
||||
BEGIN:VCALENDAR
|
||||
METHOD:PUBLISH
|
||||
VERSION:2.0
|
||||
PRODID:-//ABC Corporation//NONSGML My Product//EN
|
||||
BEGIN:VEVENT
|
||||
DTSTAMP:19970324T1200Z
|
||||
SEQUENCE:0
|
||||
UID:uid3@host1.com
|
||||
ORGANIZER:MAILTO:jdoe@host1.com
|
||||
DTSTART:19970324T123000Z
|
||||
DTEND:19970324T210000Z
|
||||
CATEGORIES:MEETING,PROJECT
|
||||
CLASS:PUBLIC
|
||||
SUMMARY:Calendaring Interoperability Planning Meeting
|
||||
DESCRIPTION:Discuss how we can test c&s interoperability\n
|
||||
using iCalendar and other IETF standards.
|
||||
LOCATION:LDB Lobby
|
||||
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
|
||||
BEGIN:VTODO
|
||||
DTSTAMP:19980130T134500Z
|
||||
SEQUENCE:2
|
||||
UID:uid4@host1.com
|
||||
ORGANIZER:MAILTO:unclesam@us.gov
|
||||
ATTENDEE;PARTSTAT=ACCEPTED:MAILTO:jqpublic@host.com
|
||||
DUE:19980415T235959
|
||||
STATUS:NEEDS-ACTION
|
||||
SUMMARY:Submit Income Taxes
|
||||
BEGIN:VALARM
|
||||
ACTION:AUDIO
|
||||
TRIGGER:19980403T120000
|
||||
ATTACH;FMTTYPE=audio/basic:http://host.com/pub/audio-
|
||||
files/ssbanner.aud
|
||||
REPEAT:4
|
||||
DURATION:PT1H
|
||||
END:VALARM
|
||||
END:VTODO
|
||||
END:VCALENDAR
|
||||
BEGIN:VCALENDAR
|
||||
VERSION:2.0
|
||||
PRODID:-//ABC Corporation//NONSGML My Product//EN
|
||||
BEGIN:VJOURNAL
|
||||
DTSTAMP:19970324T120000Z
|
||||
UID:uid5@host1.com
|
||||
ORGANIZER:MAILTO:jsmith@host.com
|
||||
STATUS:DRAFT
|
||||
CLASS:PUBLIC
|
||||
CATEGORIES:Project Report, XYZ, Weekly Meeting
|
||||
DESCRIPTION:Project xyz Review Meeting Minutes\n
|
||||
Agenda\n1. Review of project version 1.0 requirements.\n2.
|
||||
Definition
|
||||
of project processes.\n3. Review of project schedule.\n
|
||||
Participants: John Smith\, Jane Doe\, Jim Dandy\n-It was
|
||||
decided that the requirements need to be signed off by
|
||||
product marketing.\n-Project processes were accepted.\n
|
||||
-Project schedule needs to account for scheduled holidays
|
||||
and employee vacation time. Check with HR for specific
|
||||
dates.\n-New schedule will be distributed by Friday.\n-
|
||||
Next weeks meeting is cancelled. No meeting until 3/23.
|
||||
END:VJOURNAL
|
||||
END:VCALENDAR
|
||||
BEGIN:VCALENDAR
|
||||
VERSION:2.0
|
||||
PRODID:-//RDU Software//NONSGML HandCal//EN
|
||||
BEGIN:VFREEBUSY
|
||||
ORGANIZER:MAILTO:jsmith@host.com
|
||||
DTSTART:19980313T141711Z
|
||||
DTEND:19980410T141711Z
|
||||
FREEBUSY:19980314T233000Z/19980315T003000Z
|
||||
FREEBUSY:19980316T153000Z/19980316T163000Z
|
||||
FREEBUSY:19980318T030000Z/19980318T040000Z
|
||||
URL:http://www.host.com/calendar/busytime/jsmith.ifb
|
||||
END:VFREEBUSY
|
||||
END:VCALENDAR
|
File diff suppressed because it is too large
Load Diff
@ -1,39 +0,0 @@
|
||||
BEGIN:VCALENDAR
|
||||
PRODID:"-//RDU Software//NONSGML HandCal//EN"
|
||||
VERSION:2.0
|
||||
BEGIN:VTIMEZONE
|
||||
TZID:US-Eastern
|
||||
BEGIN:STANDARD
|
||||
DTSTART:19981025T020000
|
||||
RDATE:19981025T020000
|
||||
TZOFFSETFROM:-0400
|
||||
TZOFFSETTO:-0500
|
||||
TZNAME:EST
|
||||
END:STANDARD
|
||||
BEGIN:DAYLIGHT
|
||||
DTSTART:19990404T020000
|
||||
RDATE:19990404T020000
|
||||
TZOFFSETFROM:-0500
|
||||
TZOFFSETTO:-0400
|
||||
TZNAME:EDT
|
||||
END:DAYLIGHT
|
||||
END:VTIMEZONE
|
||||
BEGIN:VEVENT
|
||||
DTSTAMP:19980309T231000Z
|
||||
UID:guid-1.host1.com
|
||||
ORGANIZER;ROLE=CHAIR:MAILTO:mrbig@host.com
|
||||
ATTENDEE;RSVP=TRUE;ROLE=REQ-PARTICIPANT;CUTYPE=GROUP:MAILTO:employee-A@host.com
|
||||
ATTENDEE;RSVP=TRUE;ROLE=REQ-PARTICIPANT;CUTYPE=GROUP:mailto:Employee-B@HOST.com
|
||||
ATTENDEE;RSVP=TRUE;ROLE=REQ-PARTICIPANT;CUTYPE=GROUP:MailTo:Eric@Agony.Qualcomm.com
|
||||
DESCRIPTION:Project XYZ Review Meeting
|
||||
CATEGORIES:MEETING
|
||||
CLASS:PUBLIC
|
||||
CREATED:19980309T130000Z
|
||||
SUMMARY:XYZ Project Review
|
||||
DTSTAR;TZID=US-Eastern:19980312T083000
|
||||
DTEND;TZID=US-Eastern:19980312T093000
|
||||
LOCATION:1CP Conference
|
||||
Room 4350
|
||||
END:VEVENT
|
||||
END:VCALENDAR
|
||||
|
@ -1,106 +0,0 @@
|
||||
#!/usr/bin/perl
|
||||
|
||||
use lib "../blib/lib";
|
||||
use lib "../blib/arch";
|
||||
use lib "../";
|
||||
|
||||
use Time::Local;
|
||||
|
||||
use Net::ICal::Libical;
|
||||
|
||||
use POSIX;
|
||||
|
||||
|
||||
my $comp_str=<<EOM;
|
||||
BEGIN:VCALENDAR
|
||||
METHOD
|
||||
:PUBLISH
|
||||
PRODID
|
||||
:-//ACME/DesktopCalendar//EN
|
||||
VERSION
|
||||
:2.0
|
||||
BEGIN:VEVENT
|
||||
ORGANIZER
|
||||
:mailto:a\@example.com
|
||||
ATTENDEE
|
||||
;RSVP=TRUE
|
||||
;ROLE=REQ-PARTICIPANT
|
||||
;CUTYPE=GROUP
|
||||
:MAILTO:employee-A\@host.com
|
||||
DTSTART
|
||||
:19970701T200000Z
|
||||
DURATION
|
||||
:P3DT4H50M36S
|
||||
DTSTAMP
|
||||
:19970611T190000Z
|
||||
SUMMARY
|
||||
:ST. PAUL SAINTS -VS- DULUTH-SUPERIOR DUKES
|
||||
UID
|
||||
:0981234-1234234-23\@example.com
|
||||
END:VEVENT
|
||||
END:VCALENDAR
|
||||
EOM
|
||||
|
||||
my $c;
|
||||
|
||||
$c = new Net::ICal::Libical::Component($comp_str);
|
||||
|
||||
my @props = $c->properties();
|
||||
|
||||
my $p;
|
||||
foreach $p (@props) {
|
||||
print $p->name()." ".$p->value()."\n";
|
||||
|
||||
}
|
||||
|
||||
$inner = ($c->components())[0];
|
||||
|
||||
print "\n";
|
||||
|
||||
print " -------- Attendee \n";
|
||||
|
||||
$p = ($inner->properties('ATTENDEE'))[0];
|
||||
|
||||
print $p->as_ical_string(),"\n";
|
||||
|
||||
print $p->get_parameter('ROLE'),"\n";
|
||||
|
||||
die if $p->get_parameter('ROLE') ne 'REQ-PARTICIPANT';
|
||||
|
||||
$p->set_parameter('ROLE','INDIVIDUAL');
|
||||
|
||||
print $p->as_ical_string(),"\n";
|
||||
|
||||
print " -------- DTSTART \n";
|
||||
|
||||
$p = ($inner->properties('DTSTART'))[0];
|
||||
|
||||
print $p->as_ical_string()."\n";
|
||||
print $p->as_ical_string()."\n";
|
||||
|
||||
print "hour: ". $p->hour()." \n";
|
||||
|
||||
$p->hour($p->hour() - 10);
|
||||
|
||||
print $p->hour(),"\n";
|
||||
|
||||
$p->timezone('America/Los_Angeles');
|
||||
|
||||
print $p->as_ical_string()."\n";
|
||||
|
||||
|
||||
print "----------- DURATION \n";
|
||||
|
||||
$p = ($inner->properties('DURATION'))[0];
|
||||
|
||||
print $p->as_ical_string()."\n";
|
||||
|
||||
print $p->seconds(),"\n";
|
||||
|
||||
$p->seconds(3630);
|
||||
|
||||
print $p->as_ical_string()."\n";
|
||||
print $p->seconds(),"\n";
|
||||
|
||||
|
||||
|
@ -1,94 +0,0 @@
|
||||
#!/usr/bin/perl
|
||||
|
||||
use lib "../blib/lib";
|
||||
use lib "../blib/arch";
|
||||
use lib "../";
|
||||
|
||||
use Time::Local;
|
||||
|
||||
use Net::ICal::Libical;
|
||||
|
||||
use POSIX;
|
||||
|
||||
|
||||
my $comp_str=<<EOM;
|
||||
BEGIN:VCALENDAR
|
||||
METHOD:PUBLISH
|
||||
VERSION:2.0
|
||||
PRODID:-//ACME/DesktopCalendar//EN
|
||||
BEGIN:VEVENT
|
||||
ORGANIZER:mailto:a\@example.com
|
||||
DTSTAMP:19970612T190000Z
|
||||
DTSTART:19970701T210000Z
|
||||
DTEND:19970701T230000Z
|
||||
SEQUENCE:1
|
||||
UID:0981234-1234234-23\@example.com
|
||||
SUMMARY:ST. PAUL SAINTS -VS- DULUTH-SUPERIOR DUKES
|
||||
END:VEVENT
|
||||
END:VCALENDAR
|
||||
EOM
|
||||
|
||||
my $comp_str_error=<<EOM;
|
||||
BEGIN:VCALENDAR
|
||||
METHOD:REQUEST
|
||||
VERSION:2.0
|
||||
PRODID:-//ACME/DesktopCalendar//EN
|
||||
BEGIN:VEVENT
|
||||
ORGANIZER:mailto:a\@example.com
|
||||
DTSTAMP:19970612T190000Z
|
||||
DTSTART:19970701T210000Z
|
||||
DTEND:19970701T230000Z
|
||||
SEQENCE:1
|
||||
UID:0981234-1234234-23\@example.com
|
||||
SUMMARY:ST. PAUL SAINTS -VS- DULUTH-SUPERIOR DUKES
|
||||
END:VEVENT
|
||||
END:VCALENDAR
|
||||
EOM
|
||||
|
||||
print "-- Good Component --\n";
|
||||
print Net::ICal::Libical::validate_component($comp_str);
|
||||
|
||||
print "-- BadComponent --\n";
|
||||
print Net::ICal::Libical::validate_component($comp_str_error);
|
||||
|
||||
|
||||
print "-- Generate Occurrences --\n";
|
||||
$rule = "FREQ=MONTHLY;UNTIL=19971224T000000Z;INTERVAL=1;BYDAY=TU,2FR,3SA";
|
||||
$limit = 25;
|
||||
$start = timelocal(0,0,9,5,8,1997); # 19970905T090000Z
|
||||
|
||||
@occur = Net::ICal::Libical::generate_occurrences($rule,$start,$limit);
|
||||
|
||||
print $rule."\n";
|
||||
|
||||
foreach $i (@occur){
|
||||
|
||||
my ($sec,$min,$hour,$mday,$mon,$year,$wday,$yday,$isdst) = gmtime($i);
|
||||
|
||||
printf("%s %s %2d %02d:%02d:%02d %d\n",
|
||||
(Sun,Mon,Tue,Wed,Thur,Fri,Sat)[$wday],
|
||||
(Jan,Feb,Mar,Apr,May,Jun,Jul,Aug,Sep,Oct,Nov,Dec)[$mon],
|
||||
$mday,
|
||||
$hour,$min,$sec,
|
||||
$year);
|
||||
|
||||
}
|
||||
|
||||
print "-- Interpret iCal data --\n";
|
||||
|
||||
|
||||
my $comp_str=<<EOM;
|
||||
BEGIN:VEVENT
|
||||
ORGANIZER:mailto:a\@example.com
|
||||
DTSTAMP:19970612T190000Z
|
||||
DTSTART:19970701T210000Z
|
||||
DTEND:19970701T230000Z
|
||||
SEQUENCE:1
|
||||
UID:0981234-1234234-23\@example.com
|
||||
SUMMARY:ST. PAUL SAINTS -VS- DULUTH-SUPERIOR DUKES
|
||||
END:VEVENT
|
||||
|
||||
EOM
|
||||
|
||||
|
||||
|
@ -1,29 +0,0 @@
|
||||
#!/usr/bin/perl
|
||||
|
||||
use lib "../blib/lib";
|
||||
use lib "../blib/arch";
|
||||
use lib "../";
|
||||
|
||||
use Net::ICal::Libical;
|
||||
|
||||
|
||||
my $comp_str=<<EOM;
|
||||
BEGIN:VCALENDAR
|
||||
METHOD:PUBLISH
|
||||
VERSION:2.0
|
||||
PRODID:-//ACME/DesktopCalendar//EN
|
||||
BEGIN:VEVENT
|
||||
ORGANIZER:mailto:a\@example.com
|
||||
DTSTAMP:19970612T190000Z
|
||||
DTSTART:19970701T210000Z
|
||||
DTEND:19970701T230000Z
|
||||
SEQUENCE:1
|
||||
UID:0981234-1234234-23\@example.com
|
||||
SUMMARY:ST. PAUL SAINTS -VS- DULUTH-SUPERIOR DUKES
|
||||
END:VEVENT
|
||||
END:VCALENDAR
|
||||
EOM
|
||||
|
||||
$c = Net::ICal::Libical::icalparser_parse_string($comp_str);
|
||||
|
||||
print Net::ICal::Libical::icalcomponent_as_ical_string($c)."\n";
|
@ -1,83 +0,0 @@
|
||||
/*======================================================================
|
||||
FILE: lcamessage.cc
|
||||
|
||||
DESCRIPTION:
|
||||
|
||||
======================================================================*/
|
||||
|
||||
#include "lcamessage.h"
|
||||
|
||||
|
||||
|
||||
/* METHOD: LCAMessage::LCAMessage */
|
||||
|
||||
LCAMessage::LCAMessage (const LCAMessage &lcamessage)
|
||||
{
|
||||
}
|
||||
|
||||
/* METHOD: LCAMessage::LCAMessage */
|
||||
|
||||
LCAMessage::LCAMessage ()
|
||||
{
|
||||
}
|
||||
|
||||
/* METHOD: LCAMessage::~LCAMessage */
|
||||
|
||||
LCAMessage::~LCAMessage ()
|
||||
{
|
||||
}
|
||||
|
||||
/* METHOD: LCAMessage::operator== */
|
||||
|
||||
int
|
||||
LCAMessage::operator== (const LCAMessage &lcamessage) const
|
||||
{
|
||||
}
|
||||
|
||||
/* METHOD: LCAMessage::operator!= */
|
||||
|
||||
int
|
||||
LCAMessage::operator!= (const LCAMessage &lcamessage) const
|
||||
{
|
||||
}
|
||||
|
||||
/* METHOD: LCAMessage::FindMatch */
|
||||
|
||||
int
|
||||
LCAMessage::FindMatch (icalset *set) const
|
||||
{
|
||||
if(set == 0)
|
||||
{
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/* METHOD: LCAMessage::Event */
|
||||
|
||||
LCAEvent&
|
||||
LCAMessage::Event () const
|
||||
{
|
||||
}
|
||||
|
||||
/* METHOD: LCAMessage::Match */
|
||||
|
||||
LCAEvent&
|
||||
LCAMessage::Match () const
|
||||
{
|
||||
}
|
||||
|
||||
/* METHOD: LCAMessage::Sender */
|
||||
|
||||
const string&
|
||||
LCAMessage::Sender () const
|
||||
{
|
||||
}
|
||||
|
||||
/* METHOD: LCAMessage::Recipient */
|
||||
|
||||
const string&
|
||||
LCAMessage::Recipient () const
|
||||
{
|
||||
}
|
||||
|
||||
|
@ -1,83 +0,0 @@
|
||||
Usecases for some common operations with the Libical Calendar Api
|
||||
(LCA)
|
||||
|
||||
Note that the calendar object, of class LCACalendar, is constructed
|
||||
with a link to an LCAStore object. LCAStore is a generalize storage
|
||||
for components, such as a flat file, a database, or a CAP server. When
|
||||
an LCAMessage is stored in a calendar, LCAMessage::FindMatch() will
|
||||
search for a component that matches the message ( same UID,
|
||||
RECURRENCE-ID, etc ) in the calendars store.
|
||||
|
||||
( Note: After working with these usecases for a while, I think that
|
||||
there should be an object or class to encapsulate most of these
|
||||
operations, like LCAProcessor. It would handle removing messages and
|
||||
events from lists, finding matches, etc. The caller would subclass
|
||||
from it to add on to its functionality. )
|
||||
|
||||
-- Process incoming request message for a new event.
|
||||
|
||||
1) Outside code(Caller) recieves an iTIP message, and identifies
|
||||
sender and UPN of recipient.
|
||||
|
||||
2) Caller creates LCAMessage: LCAMessage()
|
||||
|
||||
3) Caller locates appropriate calendar for UPN
|
||||
|
||||
4) Caller inserts message: calendar.MessageSet().insert(message);
|
||||
|
||||
5) Caller requests message to locate match. Caller supplies storage
|
||||
set: message.FindMatch(set). Match wil return 0, because there is no
|
||||
match for a new event.
|
||||
|
||||
6) Caller determines type of message: enum LCAMessage::Type type =
|
||||
message.Type(). Type is NEW_EVENT
|
||||
|
||||
The caller should then update the display of all active messages to
|
||||
the user, by iterating through calendar.MessageSet() ( it is a
|
||||
multiset) When the user selects a request message to process:
|
||||
|
||||
7) Caller displays event to user.
|
||||
|
||||
7a) If user approves, Caller books event: calendar.BookEvent(message).
|
||||
This removes the message from the message set, changes the method to
|
||||
CREATED, and puts it into the event set. Then caller makes a reply
|
||||
with LCAMessage& reply = message.MakeAcceptReply(). Caller sends reply
|
||||
to organizer.
|
||||
|
||||
7b) If user rejects meeting proposal, Caller makes rejection reply
|
||||
with reply = message.MakeDeclineReply() and adds user's comments with
|
||||
reply.Event().Comment() = "comment"; Caller sends the event to the
|
||||
organizer.
|
||||
|
||||
-- Process incoming reply message
|
||||
|
||||
Steps 1-6 as above. The type of message is ACCEPT_REPLY
|
||||
|
||||
7) Caller gets sender of reply with string sender = message.Sender();
|
||||
|
||||
8) Caller looks up sender of message as an attendee of the original
|
||||
proposal: itr = message.Match().AttendeeSet().find(sender)
|
||||
|
||||
9) Caller changes the PARTSTAT of the sender: itr->Status() = ACCEPTED.
|
||||
|
||||
10) Caller displays sender's acceptance of meeting
|
||||
|
||||
11) Caller removes the message from the calendar's message queue.
|
||||
|
||||
|
||||
-- Process incoming cancel message
|
||||
|
||||
Steps 1-6 as above. The type of message is CANCEL.
|
||||
|
||||
7) Caller locates matched event with message.FindMatch()
|
||||
|
||||
8) Caller removes matched event and message from the calendar.
|
||||
|
||||
-- Generate new request message
|
||||
|
||||
|
||||
-- Generate new reply message
|
||||
|
||||
-- Get all events on a given day
|
||||
|
||||
-- Get all alarms for next 30 minutes
|
@ -1,95 +0,0 @@
|
||||
Microsoft Developer Studio Workspace File, Format Version 6.00
|
||||
# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE!
|
||||
|
||||
###############################################################################
|
||||
|
||||
Project: "libical"=.\libical\libical.dsp - Package Owner=<4>
|
||||
|
||||
Package=<5>
|
||||
{{{
|
||||
}}}
|
||||
|
||||
Package=<4>
|
||||
{{{
|
||||
}}}
|
||||
|
||||
###############################################################################
|
||||
|
||||
Project: "libicalss"=.\libicalss\libicalss.dsp - Package Owner=<4>
|
||||
|
||||
Package=<5>
|
||||
{{{
|
||||
}}}
|
||||
|
||||
Package=<4>
|
||||
{{{
|
||||
}}}
|
||||
|
||||
###############################################################################
|
||||
|
||||
Project: "libicalvcal"=.\libicalvcal\libicalvcal.dsp - Package Owner=<4>
|
||||
|
||||
Package=<5>
|
||||
{{{
|
||||
}}}
|
||||
|
||||
Package=<4>
|
||||
{{{
|
||||
}}}
|
||||
|
||||
###############################################################################
|
||||
|
||||
Project: "recur"=.\test\recur.dsp - Package Owner=<4>
|
||||
|
||||
Package=<5>
|
||||
{{{
|
||||
}}}
|
||||
|
||||
Package=<4>
|
||||
{{{
|
||||
Begin Project Dependency
|
||||
Project_Dep_Name libical
|
||||
End Project Dependency
|
||||
Begin Project Dependency
|
||||
Project_Dep_Name libicalss
|
||||
End Project Dependency
|
||||
Begin Project Dependency
|
||||
Project_Dep_Name libicalvcal
|
||||
End Project Dependency
|
||||
}}}
|
||||
|
||||
###############################################################################
|
||||
|
||||
Project: "regression"=.\test\regression.dsp - Package Owner=<4>
|
||||
|
||||
Package=<5>
|
||||
{{{
|
||||
}}}
|
||||
|
||||
Package=<4>
|
||||
{{{
|
||||
Begin Project Dependency
|
||||
Project_Dep_Name libical
|
||||
End Project Dependency
|
||||
Begin Project Dependency
|
||||
Project_Dep_Name libicalss
|
||||
End Project Dependency
|
||||
Begin Project Dependency
|
||||
Project_Dep_Name libicalvcal
|
||||
End Project Dependency
|
||||
}}}
|
||||
|
||||
###############################################################################
|
||||
|
||||
Global:
|
||||
|
||||
Package=<5>
|
||||
{{{
|
||||
}}}
|
||||
|
||||
Package=<3>
|
||||
{{{
|
||||
}}}
|
||||
|
||||
###############################################################################
|
||||
|
@ -1,8 +0,0 @@
|
||||
ical.h
|
||||
icalderivedparameter.c
|
||||
icalderivedparameter.h
|
||||
icalderivedproperty.c
|
||||
icalderivedproperty.h
|
||||
icalderivedvalue.c
|
||||
icalderivedvalue.h
|
||||
icalrestriction.c
|
@ -1,244 +0,0 @@
|
||||
#======================================================================
|
||||
# FILE: Makefile.am
|
||||
# CREATOR: eric
|
||||
#
|
||||
# $Id: Makefile.am,v 1.4 2002/09/06 18:34:31 mostafah%oeone.com Exp $
|
||||
#
|
||||
#
|
||||
# (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/
|
||||
#
|
||||
#
|
||||
#
|
||||
#======================================================================
|
||||
|
||||
|
||||
DESIGNDATA = $(top_srcdir)/design-data
|
||||
ICALSCRIPTS = $(top_srcdir)/scripts
|
||||
|
||||
lib_LTLIBRARIES = libical.la
|
||||
|
||||
noinst_LTLIBRARIES = libical-static.la
|
||||
libical_static_la_SOURCES = $(libical_la_SOURCES)
|
||||
libical_static_la_LDFLAGS = --all-static
|
||||
|
||||
YFLAGS = -d -v -t -pical_yy
|
||||
LFLAGS = -Pical_yy
|
||||
LEX_OUTPUT_ROOT = lex.ical_yy
|
||||
|
||||
CPPFLAGS = -DPACKAGE_DATA_DIR=\""$(datadir)/$(PACKAGE)"\"
|
||||
|
||||
# CFLAGS = -g
|
||||
|
||||
all: ical.h
|
||||
|
||||
INCLUDES = \
|
||||
-I/usr/include/objc \
|
||||
-I$(top_builddir) \
|
||||
-I$(top_srcdir)/src \
|
||||
-I$(top_builddir)/src \
|
||||
-I$(srcdir)
|
||||
|
||||
libical_la_LDFLAGS = -version-info 0:0:0
|
||||
|
||||
libical_la_SOURCES = \
|
||||
$(BUILT_SOURCES) \
|
||||
icalarray.c \
|
||||
icalarray.h \
|
||||
icalattendee.h \
|
||||
icalattendee.c \
|
||||
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 \
|
||||
icalparameterimpl.h \
|
||||
icalparser.c \
|
||||
icalparser.h \
|
||||
icalproperty.c \
|
||||
icalproperty.h \
|
||||
icalrecur.c \
|
||||
icalrecur.h \
|
||||
icalrestriction.h \
|
||||
icaltime.c \
|
||||
icaltime.h \
|
||||
icaltimezone.c \
|
||||
icaltimezone.h \
|
||||
icalduration.h \
|
||||
icalduration.c \
|
||||
icalperiod.h \
|
||||
icalperiod.c \
|
||||
icaltypes.c \
|
||||
icaltypes.h \
|
||||
icalvalue.c \
|
||||
icalvalue.h \
|
||||
icalvalueimpl.h \
|
||||
icalyacc.h \
|
||||
icalyacc.y \
|
||||
pvl.c \
|
||||
pvl.h \
|
||||
sspm.c \
|
||||
sspm.h \
|
||||
vsnprintf.c \
|
||||
icallangbind.h \
|
||||
icallangbind.c \
|
||||
caldate.c \
|
||||
astime.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)/config.h \
|
||||
$(top_builddir)/src/libical/icalversion.h \
|
||||
$(top_srcdir)/src/libical/icaltime.h \
|
||||
$(top_srcdir)/src/libical/icalduration.h \
|
||||
$(top_srcdir)/src/libical/icalperiod.h \
|
||||
$(top_srcdir)/src/libical/icalenums.h \
|
||||
$(top_srcdir)/src/libical/icaltypes.h \
|
||||
$(top_srcdir)/src/libical/icalrecur.h \
|
||||
icalderivedvalue.h \
|
||||
icalderivedparameter.h \
|
||||
$(top_srcdir)/src/libical/icalvalue.h \
|
||||
$(top_srcdir)/src/libical/icalparameter.h \
|
||||
icalderivedproperty.h \
|
||||
$(top_srcdir)/src/libical/icalproperty.h \
|
||||
$(top_srcdir)/src/libical/icalattendee.h \
|
||||
$(top_srcdir)/src/libical/pvl.h \
|
||||
$(top_srcdir)/src/libical/icalarray.h \
|
||||
$(top_srcdir)/src/libical/icalcomponent.h \
|
||||
$(top_srcdir)/src/libical/icaltimezone.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 \
|
||||
$(top_srcdir)/src/libical/icallangbind.h
|
||||
|
||||
BUILT_COMBINEDHEADERS = \
|
||||
icalderivedparameter.h \
|
||||
icalderivedproperty.h \
|
||||
icalderivedvalue.h
|
||||
|
||||
BUILT_SOURCES = \
|
||||
$(BUILT_COMBINEDHEADERS)\
|
||||
icalderivedparameter.c \
|
||||
icalderivedproperty.c \
|
||||
icalrestriction.c \
|
||||
icalderivedvalue.c
|
||||
|
||||
ical.h: $(COMBINEDHEADERS)
|
||||
cat $(COMBINEDHEADERS) \
|
||||
| egrep -v "#include.*\"ical" \
|
||||
| egrep -v "#include.*\"config" \
|
||||
| egrep -v "#include.*\"pvl\.h\"" > ical.h
|
||||
|
||||
icallexer.c : icalyacc.h
|
||||
|
||||
|
||||
# parameters
|
||||
|
||||
PARAMETERDEPS = \
|
||||
$(ICALSCRIPTS)/mkderivedparameters.pl \
|
||||
$(DESIGNDATA)/parameters.csv \
|
||||
icalderivedparameter.c.in \
|
||||
icalderivedparameter.h.in
|
||||
|
||||
icalderivedparameter.h: $(PARAMETERDEPS)
|
||||
$(PERL) -I $(ICALSCRIPTS) $(ICALSCRIPTS)/mkderivedparameters.pl -i $(srcdir)/icalderivedparameter.h.in -h $(DESIGNDATA)/parameters.csv > icalderivedparameter.h
|
||||
|
||||
icalderivedparameter.c: $(PARAMETERDEPS) $(BUILT_COMBINEDHEADERS)
|
||||
$(PERL) -I $(ICALSCRIPTS) $(ICALSCRIPTS)/mkderivedparameters.pl -i $(srcdir)/icalderivedparameter.c.in -c $(DESIGNDATA)/parameters.csv > icalderivedparameter.c
|
||||
|
||||
# properties
|
||||
|
||||
PROPERTYDEPS = \
|
||||
$(ICALSCRIPTS)/mkderivedproperties.pl \
|
||||
$(DESIGNDATA)/properties.csv \
|
||||
$(DESIGNDATA)/value-types.csv \
|
||||
icalderivedproperty.c.in \
|
||||
icalderivedproperty.h.in
|
||||
|
||||
|
||||
icalderivedproperty.h: $(PROPERTYDEPS)
|
||||
$(PERL) -I$(ICALSCRIPTS) $(ICALSCRIPTS)/mkderivedproperties.pl \
|
||||
-i $(srcdir)/icalderivedproperty.h.in -h $(DESIGNDATA)/properties.csv\
|
||||
${DESIGNDATA}/value-types.csv > icalderivedproperty.h
|
||||
|
||||
icalderivedproperty.c: $(PROPERTYDEPS) $(BUILT_COMBINEDHEADERS)
|
||||
$(PERL) -I$(ICALSCRIPTS) $(ICALSCRIPTS)/mkderivedproperties.pl \
|
||||
-i $(srcdir)/icalderivedproperty.c.in -c $(DESIGNDATA)/properties.csv \
|
||||
${DESIGNDATA}/value-types.csv > icalderivedproperty.c
|
||||
|
||||
# restrictions
|
||||
|
||||
RESTRICTIONDEPS = \
|
||||
$(ICALSCRIPTS)/mkrestrictiontable.pl \
|
||||
$(DESIGNDATA)/restrictions.csv \
|
||||
icalrestriction.c.in
|
||||
|
||||
icalrestriction.c: $(RESTRICTIONDEPS)
|
||||
$(PERL) $(ICALSCRIPTS)/mkrestrictiontable.pl -i $(srcdir)/icalrestriction.c.in \
|
||||
$(DESIGNDATA)/restrictions.csv > icalrestriction.c
|
||||
|
||||
# values
|
||||
|
||||
VALUEDEPS = \
|
||||
$(ICALSCRIPTS)/mkderivedvalues.pl \
|
||||
$(DESIGNDATA)/value-types.csv \
|
||||
icalderivedvalue.c.in \
|
||||
icalderivedvalue.h.in
|
||||
|
||||
icalderivedvalue.h: $(VALUEDEPS)
|
||||
$(PERL) -I$(ICALSCRIPTS) $(ICALSCRIPTS)/mkderivedvalues.pl \
|
||||
-i $(srcdir)/icalderivedvalue.h.in -h $(DESIGNDATA)/value-types.csv > icalderivedvalue.h
|
||||
|
||||
icalderivedvalue.c: $(VALUEDEPS) $(BUILT_COMBINEDHEADERS)
|
||||
$(PERL) -I$(ICALSCRIPTS) $(ICALSCRIPTS)/mkderivedvalues.pl \
|
||||
-i $(srcdir)/icalderivedvalue.c.in -c $(DESIGNDATA)/value-types.csv > icalderivedvalue.c
|
||||
|
||||
|
||||
|
||||
# housekeeping
|
||||
CONFIG_CLEAN_FILES = y.output
|
||||
|
||||
CLEANFILES += $(BUILT_SOURCES) $(BUILT_COMBINEDHEADERS)
|
||||
|
||||
dist-hook:
|
||||
cd $(distdir); rm -f $(BUILT_SOURCES)
|
||||
cd $(distdir); rm -f ical.h icalversion.h icalyacc.c icalyacc.h icallexer.c
|
||||
|
||||
EXTRA_DIST = \
|
||||
icalderivedparameter.c.in \
|
||||
icalderivedparameter.h.in \
|
||||
icalderivedproperty.c.in \
|
||||
icalderivedproperty.h.in \
|
||||
icalrestriction.c.in \
|
||||
icalderivedvalue.c.in \
|
||||
icalderivedvalue.h.in \
|
||||
icalversion.h.in \
|
||||
icallexer.c \
|
||||
icalyacc.c
|
||||
|
@ -1,185 +0,0 @@
|
||||
#
|
||||
# The contents of this file are subject to the Netscape Public
|
||||
# License Version 1.1 (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/NPL/
|
||||
#
|
||||
# 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 Code is mozilla.org code.
|
||||
#
|
||||
# The Initial Developer of the Original Code is Netscape
|
||||
# Communications Corporation. Portions created by Netscape are
|
||||
# Copyright (C) 1998 Netscape Communications Corporation. All
|
||||
# Rights Reserved.
|
||||
#
|
||||
# Contributor(s):
|
||||
#
|
||||
|
||||
DEPTH= ../../../..
|
||||
|
||||
topsrcdir = @top_srcdir@
|
||||
srcdir = @srcdir@
|
||||
VPATH = @srcdir@
|
||||
|
||||
include $(DEPTH)/config/autoconf.mk
|
||||
include $(srcdir)/objs.mk
|
||||
|
||||
MODULE = ical
|
||||
LIBRARY_NAME=mozical
|
||||
|
||||
ifeq ($(OS_ARCH),WINNT)
|
||||
MAPFILE = $(LIBRARY_NAME).map
|
||||
DEFFILE = $(srcdir)/ical.def
|
||||
endif
|
||||
|
||||
CSRCS = $(ICAL_SRC_LCSRCS)
|
||||
|
||||
ifeq (,$(filter -DHAVE_SNPRINTF=1,$(ACDEFINES)))
|
||||
CSRCS += vsnprintf.c
|
||||
endif
|
||||
|
||||
EXPORTS = $(ICAL_SRC_LEXPORTS)
|
||||
FORCE_STATIC_LIB=1
|
||||
GARBAGE += ical.h $(BUILT_COMBINEDHEADERS) $(BUILT_SOURCES)
|
||||
ifeq ($(OS_ARCH),WINNT)
|
||||
GARBAGE += $(LIBRARY_NAME).ilk
|
||||
endif
|
||||
LOCAL_INCLUDES = -I. -I$(srcdir)
|
||||
|
||||
DESIGNDATA = $(srcdir)/../../design-data
|
||||
ICALSCRIPTS = $(srcdir)/../../scripts
|
||||
|
||||
#//------------------------------------------------------------------------
|
||||
#//
|
||||
#// Generate files that are automatically generated (*.h.in and *.c.in)
|
||||
#//
|
||||
#//------------------------------------------------------------------------
|
||||
# ORDERING OF HEADERS IS SIGNIFICANT. Don't change this ordering. It
|
||||
# is required to make the combined header ical.h properly
|
||||
COMBINEDHEADERS = \
|
||||
../../config.h \
|
||||
icalversion.h \
|
||||
icaltime.h \
|
||||
icalduration.h \
|
||||
icalperiod.h \
|
||||
icalenums.h \
|
||||
icaltypes.h \
|
||||
icalrecur.h \
|
||||
icalderivedvalue.h \
|
||||
icalderivedparameter.h \
|
||||
icalvalue.h \
|
||||
icalparameter.h \
|
||||
icalderivedproperty.h \
|
||||
icalproperty.h \
|
||||
icalattendee.h \
|
||||
pvl.h \
|
||||
icalarray.h \
|
||||
icalcomponent.h \
|
||||
icaltimezone.h \
|
||||
icalparser.h \
|
||||
icalmemory.h \
|
||||
icalerror.h \
|
||||
icalrestriction.h \
|
||||
sspm.h \
|
||||
icalmime.h \
|
||||
icallangbind.h
|
||||
|
||||
BUILT_COMBINEDHEADERS = \
|
||||
icalderivedparameter.h \
|
||||
icalderivedproperty.h \
|
||||
icalderivedvalue.h
|
||||
|
||||
BUILT_SOURCES = \
|
||||
$(BUILT_COMBINEDHEADERS)\
|
||||
icalderivedparameter.c \
|
||||
icalderivedproperty.c \
|
||||
icalrestriction.c \
|
||||
icalderivedvalue.c
|
||||
|
||||
#//------------------------------------------------------------------------
|
||||
#//
|
||||
#// Include the common makefile rules
|
||||
#//
|
||||
#//------------------------------------------------------------------------
|
||||
|
||||
SRCS_IN_OBJDIR = 1
|
||||
|
||||
include $(topsrcdir)/config/rules.mk
|
||||
|
||||
exports:: $(BUILT_SOURCES)
|
||||
|
||||
ical.h: $(COMBINEDHEADERS) Makefile
|
||||
cat $(filter-out Makefile,$^) \
|
||||
| egrep -v "#include.*ical" \
|
||||
| egrep -v "#include.*config" \
|
||||
| egrep -v "#include.*pvl.h" > ical.h
|
||||
|
||||
# parameters
|
||||
|
||||
PARAMETERDEPS = \
|
||||
$(ICALSCRIPTS)/mkderivedparameters.pl \
|
||||
$(DESIGNDATA)/parameters.csv \
|
||||
$(srcdir)/icalderivedparameter.c.in \
|
||||
$(srcdir)/icalderivedparameter.h.in
|
||||
|
||||
icalderivedparameter.h: $(PARAMETERDEPS) Makefile
|
||||
$(PERL) -I$(ICALSCRIPTS) $(ICALSCRIPTS)/mkderivedparameters.pl -i $(srcdir)/icalderivedparameter.h.in -h $(DESIGNDATA)/parameters.csv > icalderivedparameter.h
|
||||
|
||||
icalderivedparameter.c: $(PARAMETERDEPS) $(BUILT_COMBINEDHEADERS) Makefile
|
||||
$(PERL) -I$(ICALSCRIPTS) $(ICALSCRIPTS)/mkderivedparameters.pl -i $(srcdir)/icalderivedparameter.c.in -c $(DESIGNDATA)/parameters.csv > icalderivedparameter.c
|
||||
|
||||
# values
|
||||
|
||||
VALUEDEPS = \
|
||||
$(ICALSCRIPTS)/mkderivedvalues.pl \
|
||||
$(DESIGNDATA)/value-types.csv \
|
||||
$(srcdir)/icalderivedvalue.c.in \
|
||||
$(srcdir)/icalderivedvalue.h.in
|
||||
|
||||
icalderivedvalue.h: $(VALUEDEPS) Makefile
|
||||
$(PERL) -I$(ICALSCRIPTS) $(ICALSCRIPTS)/mkderivedvalues.pl \
|
||||
-i $(srcdir)/icalderivedvalue.h.in -h $(DESIGNDATA)/value-types.csv > icalderivedvalue.h
|
||||
|
||||
icalderivedvalue.c: $(VALUEDEPS) $(BUILT_COMBINEDHEADERS) Makefile
|
||||
$(PERL) -I$(ICALSCRIPTS) $(ICALSCRIPTS)/mkderivedvalues.pl \
|
||||
-i $(srcdir)/icalderivedvalue.c.in -c $(DESIGNDATA)/value-types.csv > icalderivedvalue.c
|
||||
|
||||
# properties
|
||||
|
||||
PROPERTYDEPS = \
|
||||
$(ICALSCRIPTS)/mkderivedproperties.pl \
|
||||
$(DESIGNDATA)/properties.csv \
|
||||
$(DESIGNDATA)/value-types.csv \
|
||||
$(srcdir)/icalderivedproperty.c.in \
|
||||
$(srcdir)/icalderivedproperty.h.in
|
||||
|
||||
icalderivedproperty.h: $(PROPERTYDEPS) Makefile
|
||||
$(PERL) -I$(ICALSCRIPTS) $(ICALSCRIPTS)/mkderivedproperties.pl \
|
||||
-i $(srcdir)/icalderivedproperty.h.in -h $(DESIGNDATA)/properties.csv \
|
||||
$(DESIGNDATA)/value-types.csv > icalderivedproperty.h
|
||||
|
||||
|
||||
icalderivedproperty.c: $(PROPERTYDEPS) $(BUILT_COMBINEDHEADERS) Makefile
|
||||
$(PERL) -I$(ICALSCRIPTS) $(ICALSCRIPTS)/mkderivedproperties.pl \
|
||||
-i $(srcdir)/icalderivedproperty.c.in -c $(DESIGNDATA)/properties.csv \
|
||||
$(DESIGNDATA)/value-types.csv > icalderivedproperty.c
|
||||
|
||||
# restrictions
|
||||
|
||||
RESTRICTIONDEPS = \
|
||||
$(ICALSCRIPTS)/mkrestrictiontable.pl \
|
||||
$(DESIGNDATA)/restrictions.csv \
|
||||
$(srcdir)/icalrestriction.c.in
|
||||
|
||||
icalrestriction.c: $(RESTRICTIONDEPS) Makefile
|
||||
$(PERL) $(ICALSCRIPTS)/mkrestrictiontable.pl -i $(srcdir)/icalrestriction.c.in \
|
||||
$(DESIGNDATA)/restrictions.csv > icalrestriction.c
|
||||
|
||||
ifneq (,$(filter BeOS Darwin OpenVMS NetBSD FreeBSD,$(OS_ARCH)))
|
||||
DEFINES += -D__USE_BSD=1
|
||||
endif
|
||||
|
@ -1,63 +0,0 @@
|
||||
/*
|
||||
* Copyright (c) 1986-2000, Hiram Clawson
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or
|
||||
* without modification, are permitted provided that the following
|
||||
* conditions are met:
|
||||
*
|
||||
* Redistributions of source code must retain the above
|
||||
* copyright notice, this list of conditions and the
|
||||
* following disclaimer.
|
||||
*
|
||||
* Redistributions in binary form must reproduce the
|
||||
* above copyright notice, this list of conditions and
|
||||
* the following disclaimer in the documentation and/or
|
||||
* other materials provided with the distribution.
|
||||
*
|
||||
* Neither name of The Museum of Hiram nor the names of
|
||||
* its contributors may be used to endorse or promote products
|
||||
* derived from this software without specific prior
|
||||
* written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND
|
||||
* CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
|
||||
* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||
* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
|
||||
* IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
|
||||
* INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
||||
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
|
||||
* STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
|
||||
* IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
|
||||
* THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
/*
|
||||
* astime.h: contains definitions of structures used for time
|
||||
* calculations.
|
||||
*
|
||||
*/
|
||||
#ifndef _astime_h_
|
||||
#define _astime_h_
|
||||
|
||||
typedef struct ut_instant {
|
||||
double j_date; /* julian decimal date, 0 = 01 Jan 4713 BC 12 HR UT */
|
||||
long year; /* year, valid range [-4,713, +2,147,483,647] */
|
||||
int month; /* [1-12] */
|
||||
int day; /* [1-31] */
|
||||
int i_hour; /* [0-23] */
|
||||
int i_minute; /* [0-59] */
|
||||
int i_second; /* [0-59] */
|
||||
double d_hour; /* [0.0-23.9999] includes minute and second */
|
||||
double d_minute; /* [0.0-59.9999] includes second */
|
||||
double d_second; /* [0.0-59.9999] */
|
||||
int weekday; /* [0-6] */
|
||||
int day_of_year; /* [1-366] */
|
||||
} UTinstant, * UTinstantPtr;
|
||||
|
||||
/* Functions in caldate.c */
|
||||
long caldat( UTinstantPtr ); /* converts julian date to year,mo,da */
|
||||
double juldat( UTinstantPtr ); /* returns julian day from year,mo,da */
|
||||
|
||||
#endif /* _astime_h_ */
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@ -1,307 +0,0 @@
|
||||
/* -*- Mode: C -*- */
|
||||
/*======================================================================
|
||||
FILE: icalparam.h
|
||||
CREATOR: eric 20 March 1999
|
||||
|
||||
|
||||
$Id: icalderivedparameter.h,v 1.1 2001/12/21 19:21:40 mikep%oeone.com Exp $
|
||||
$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 ICALDERIVEDPARAMETER_H
|
||||
#define ICALDERIVEDPARAMETER_H
|
||||
|
||||
|
||||
typedef void icalparameter;
|
||||
|
||||
const char* icalparameter_enum_to_string(int e);
|
||||
int icalparameter_string_to_enum(const char* str);
|
||||
|
||||
/* Everything below this line is machine generated. Do not edit. */
|
||||
typedef enum icalparameter_kind {
|
||||
ICAL_ANY_PARAMETER = 0,
|
||||
ICAL_ALTREP_PARAMETER,
|
||||
ICAL_CN_PARAMETER,
|
||||
ICAL_CUTYPE_PARAMETER,
|
||||
ICAL_DELEGATEDFROM_PARAMETER,
|
||||
ICAL_DELEGATEDTO_PARAMETER,
|
||||
ICAL_DIR_PARAMETER,
|
||||
ICAL_ENCODING_PARAMETER,
|
||||
ICAL_FBTYPE_PARAMETER,
|
||||
ICAL_FMTTYPE_PARAMETER,
|
||||
ICAL_LANGUAGE_PARAMETER,
|
||||
ICAL_MEMBER_PARAMETER,
|
||||
ICAL_PARTSTAT_PARAMETER,
|
||||
ICAL_RANGE_PARAMETER,
|
||||
ICAL_RELATED_PARAMETER,
|
||||
ICAL_RELTYPE_PARAMETER,
|
||||
ICAL_ROLE_PARAMETER,
|
||||
ICAL_RSVP_PARAMETER,
|
||||
ICAL_SENTBY_PARAMETER,
|
||||
ICAL_TZID_PARAMETER,
|
||||
ICAL_VALUE_PARAMETER,
|
||||
ICAL_X_PARAMETER,
|
||||
ICAL_XLICCOMPARETYPE_PARAMETER,
|
||||
ICAL_XLICERRORTYPE_PARAMETER,
|
||||
ICAL_NO_PARAMETER
|
||||
} icalparameter_kind;
|
||||
|
||||
#define ICALPARAMETER_FIRST_ENUM 20000
|
||||
|
||||
typedef enum icalparameter_cutype {
|
||||
ICAL_CUTYPE_X = 20000,
|
||||
ICAL_CUTYPE_INDIVIDUAL = 20001,
|
||||
ICAL_CUTYPE_GROUP = 20002,
|
||||
ICAL_CUTYPE_RESOURCE = 20003,
|
||||
ICAL_CUTYPE_ROOM = 20004,
|
||||
ICAL_CUTYPE_UNKNOWN = 20005,
|
||||
ICAL_CUTYPE_NONE = 20006
|
||||
} icalparameter_cutype;
|
||||
|
||||
typedef enum icalparameter_encoding {
|
||||
ICAL_ENCODING_X = 20007,
|
||||
ICAL_ENCODING_8BIT = 20008,
|
||||
ICAL_ENCODING_BASE64 = 20009,
|
||||
ICAL_ENCODING_NONE = 20010
|
||||
} icalparameter_encoding;
|
||||
|
||||
typedef enum icalparameter_fbtype {
|
||||
ICAL_FBTYPE_X = 20011,
|
||||
ICAL_FBTYPE_FREE = 20012,
|
||||
ICAL_FBTYPE_BUSY = 20013,
|
||||
ICAL_FBTYPE_BUSYUNAVAILABLE = 20014,
|
||||
ICAL_FBTYPE_BUSYTENTATIVE = 20015,
|
||||
ICAL_FBTYPE_NONE = 20016
|
||||
} icalparameter_fbtype;
|
||||
|
||||
typedef enum icalparameter_partstat {
|
||||
ICAL_PARTSTAT_X = 20017,
|
||||
ICAL_PARTSTAT_NEEDSACTION = 20018,
|
||||
ICAL_PARTSTAT_ACCEPTED = 20019,
|
||||
ICAL_PARTSTAT_DECLINED = 20020,
|
||||
ICAL_PARTSTAT_TENTATIVE = 20021,
|
||||
ICAL_PARTSTAT_DELEGATED = 20022,
|
||||
ICAL_PARTSTAT_COMPLETED = 20023,
|
||||
ICAL_PARTSTAT_INPROCESS = 20024,
|
||||
ICAL_PARTSTAT_NONE = 20025
|
||||
} icalparameter_partstat;
|
||||
|
||||
typedef enum icalparameter_range {
|
||||
ICAL_RANGE_X = 20026,
|
||||
ICAL_RANGE_THISANDPRIOR = 20027,
|
||||
ICAL_RANGE_THISANDFUTURE = 20028,
|
||||
ICAL_RANGE_NONE = 20029
|
||||
} icalparameter_range;
|
||||
|
||||
typedef enum icalparameter_related {
|
||||
ICAL_RELATED_X = 20030,
|
||||
ICAL_RELATED_START = 20031,
|
||||
ICAL_RELATED_END = 20032,
|
||||
ICAL_RELATED_NONE = 20033
|
||||
} icalparameter_related;
|
||||
|
||||
typedef enum icalparameter_reltype {
|
||||
ICAL_RELTYPE_X = 20034,
|
||||
ICAL_RELTYPE_PARENT = 20035,
|
||||
ICAL_RELTYPE_CHILD = 20036,
|
||||
ICAL_RELTYPE_SIBLING = 20037,
|
||||
ICAL_RELTYPE_NONE = 20038
|
||||
} icalparameter_reltype;
|
||||
|
||||
typedef enum icalparameter_role {
|
||||
ICAL_ROLE_X = 20039,
|
||||
ICAL_ROLE_CHAIR = 20040,
|
||||
ICAL_ROLE_REQPARTICIPANT = 20041,
|
||||
ICAL_ROLE_OPTPARTICIPANT = 20042,
|
||||
ICAL_ROLE_NONPARTICIPANT = 20043,
|
||||
ICAL_ROLE_NONE = 20044
|
||||
} icalparameter_role;
|
||||
|
||||
typedef enum icalparameter_rsvp {
|
||||
ICAL_RSVP_X = 20045,
|
||||
ICAL_RSVP_TRUE = 20046,
|
||||
ICAL_RSVP_FALSE = 20047,
|
||||
ICAL_RSVP_NONE = 20048
|
||||
} icalparameter_rsvp;
|
||||
|
||||
typedef enum icalparameter_value {
|
||||
ICAL_VALUE_X = 20049,
|
||||
ICAL_VALUE_BINARY = 20050,
|
||||
ICAL_VALUE_BOOLEAN = 20051,
|
||||
ICAL_VALUE_DATE = 20052,
|
||||
ICAL_VALUE_DURATION = 20053,
|
||||
ICAL_VALUE_FLOAT = 20054,
|
||||
ICAL_VALUE_INTEGER = 20055,
|
||||
ICAL_VALUE_PERIOD = 20056,
|
||||
ICAL_VALUE_RECUR = 20057,
|
||||
ICAL_VALUE_TEXT = 20058,
|
||||
ICAL_VALUE_URI = 20059,
|
||||
ICAL_VALUE_ERROR = 20060,
|
||||
ICAL_VALUE_DATETIME = 20061,
|
||||
ICAL_VALUE_UTCOFFSET = 20062,
|
||||
ICAL_VALUE_CALADDRESS = 20063,
|
||||
ICAL_VALUE_NONE = 20064
|
||||
} icalparameter_value;
|
||||
|
||||
typedef enum icalparameter_xliccomparetype {
|
||||
ICAL_XLICCOMPARETYPE_X = 20065,
|
||||
ICAL_XLICCOMPARETYPE_EQUAL = 20066,
|
||||
ICAL_XLICCOMPARETYPE_NOTEQUAL = 20067,
|
||||
ICAL_XLICCOMPARETYPE_LESS = 20068,
|
||||
ICAL_XLICCOMPARETYPE_GREATER = 20069,
|
||||
ICAL_XLICCOMPARETYPE_LESSEQUAL = 20070,
|
||||
ICAL_XLICCOMPARETYPE_GREATEREQUAL = 20071,
|
||||
ICAL_XLICCOMPARETYPE_REGEX = 20072,
|
||||
ICAL_XLICCOMPARETYPE_NONE = 20073
|
||||
} icalparameter_xliccomparetype;
|
||||
|
||||
typedef enum icalparameter_xlicerrortype {
|
||||
ICAL_XLICERRORTYPE_X = 20074,
|
||||
ICAL_XLICERRORTYPE_COMPONENTPARSEERROR = 20075,
|
||||
ICAL_XLICERRORTYPE_PROPERTYPARSEERROR = 20076,
|
||||
ICAL_XLICERRORTYPE_PARAMETERNAMEPARSEERROR = 20077,
|
||||
ICAL_XLICERRORTYPE_PARAMETERVALUEPARSEERROR = 20078,
|
||||
ICAL_XLICERRORTYPE_VALUEPARSEERROR = 20079,
|
||||
ICAL_XLICERRORTYPE_INVALIDITIP = 20080,
|
||||
ICAL_XLICERRORTYPE_UNKNOWNVCALPROPERROR = 20081,
|
||||
ICAL_XLICERRORTYPE_MIMEPARSEERROR = 20082,
|
||||
ICAL_XLICERRORTYPE_NONE = 20083
|
||||
} icalparameter_xlicerrortype;
|
||||
|
||||
#define ICALPARAMETER_LAST_ENUM 20084
|
||||
|
||||
/* 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);
|
||||
|
||||
/* RELATED */
|
||||
icalparameter* icalparameter_new_related(icalparameter_related v);
|
||||
icalparameter_related icalparameter_get_related(icalparameter* value);
|
||||
void icalparameter_set_related(icalparameter* value, icalparameter_related 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);
|
||||
|
||||
/* LANGUAGE */
|
||||
icalparameter* icalparameter_new_language(const char* v);
|
||||
const char* icalparameter_get_language(icalparameter* value);
|
||||
void icalparameter_set_language(icalparameter* value, const char* 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);
|
||||
|
||||
/* ENCODING */
|
||||
icalparameter* icalparameter_new_encoding(icalparameter_encoding v);
|
||||
icalparameter_encoding icalparameter_get_encoding(icalparameter* value);
|
||||
void icalparameter_set_encoding(icalparameter* value, icalparameter_encoding v);
|
||||
|
||||
/* ALTREP */
|
||||
icalparameter* icalparameter_new_altrep(const char* v);
|
||||
const char* icalparameter_get_altrep(icalparameter* value);
|
||||
void icalparameter_set_altrep(icalparameter* value, const char* 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);
|
||||
|
||||
/* FBTYPE */
|
||||
icalparameter* icalparameter_new_fbtype(icalparameter_fbtype v);
|
||||
icalparameter_fbtype icalparameter_get_fbtype(icalparameter* value);
|
||||
void icalparameter_set_fbtype(icalparameter* value, icalparameter_fbtype v);
|
||||
|
||||
/* RSVP */
|
||||
icalparameter* icalparameter_new_rsvp(icalparameter_rsvp v);
|
||||
icalparameter_rsvp icalparameter_get_rsvp(icalparameter* value);
|
||||
void icalparameter_set_rsvp(icalparameter* value, icalparameter_rsvp 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);
|
||||
|
||||
/* 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);
|
||||
|
||||
/* CN */
|
||||
icalparameter* icalparameter_new_cn(const char* v);
|
||||
const char* icalparameter_get_cn(icalparameter* value);
|
||||
void icalparameter_set_cn(icalparameter* value, const char* 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);
|
||||
|
||||
/* 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);
|
||||
|
||||
/* PARTSTAT */
|
||||
icalparameter* icalparameter_new_partstat(icalparameter_partstat v);
|
||||
icalparameter_partstat icalparameter_get_partstat(icalparameter* value);
|
||||
void icalparameter_set_partstat(icalparameter* value, icalparameter_partstat 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);
|
||||
|
||||
/* MEMBER */
|
||||
icalparameter* icalparameter_new_member(const char* v);
|
||||
const char* icalparameter_get_member(icalparameter* value);
|
||||
void icalparameter_set_member(icalparameter* value, const char* 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);
|
||||
|
||||
/* CUTYPE */
|
||||
icalparameter* icalparameter_new_cutype(icalparameter_cutype v);
|
||||
icalparameter_cutype icalparameter_get_cutype(icalparameter* value);
|
||||
void icalparameter_set_cutype(icalparameter* value, icalparameter_cutype 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);
|
||||
|
||||
/* DIR */
|
||||
icalparameter* icalparameter_new_dir(const char* v);
|
||||
const char* icalparameter_get_dir(icalparameter* value);
|
||||
void icalparameter_set_dir(icalparameter* value, const char* v);
|
||||
|
||||
#endif /*ICALPARAMETER_H*/
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -1,409 +0,0 @@
|
||||
/* -*- Mode: C -*-
|
||||
======================================================================
|
||||
FILE: icalderivedproperties.{c,h}
|
||||
CREATOR: eric 09 May 1999
|
||||
|
||||
$Id: icalderivedproperty.h,v 1.1 2001/12/21 19:21:41 mikep%oeone.com Exp $
|
||||
|
||||
(C) COPYRIGHT 2000, Eric Busboom, http://www.softwarestudio.org
|
||||
======================================================================*/
|
||||
|
||||
|
||||
#ifndef ICALDERIVEDPROPERTY_H
|
||||
#define ICALDERIVEDPROPERTY_H
|
||||
|
||||
#include <time.h>
|
||||
#include "icalparameter.h"
|
||||
#include "icalderivedvalue.h"
|
||||
#include "icalrecur.h"
|
||||
|
||||
typedef void icalproperty;
|
||||
|
||||
|
||||
/* Everything below this line is machine generated. Do not edit. */
|
||||
typedef enum icalproperty_kind {
|
||||
ICAL_ANY_PROPERTY = 0,
|
||||
ICAL_ACTION_PROPERTY,
|
||||
ICAL_ATTACH_PROPERTY,
|
||||
ICAL_ATTENDEE_PROPERTY,
|
||||
ICAL_CALSCALE_PROPERTY,
|
||||
ICAL_CATEGORIES_PROPERTY,
|
||||
ICAL_CLASS_PROPERTY,
|
||||
ICAL_COMMENT_PROPERTY,
|
||||
ICAL_COMPLETED_PROPERTY,
|
||||
ICAL_CONTACT_PROPERTY,
|
||||
ICAL_CREATED_PROPERTY,
|
||||
ICAL_DESCRIPTION_PROPERTY,
|
||||
ICAL_DTEND_PROPERTY,
|
||||
ICAL_DTSTAMP_PROPERTY,
|
||||
ICAL_DTSTART_PROPERTY,
|
||||
ICAL_DUE_PROPERTY,
|
||||
ICAL_DURATION_PROPERTY,
|
||||
ICAL_EXDATE_PROPERTY,
|
||||
ICAL_EXRULE_PROPERTY,
|
||||
ICAL_FREEBUSY_PROPERTY,
|
||||
ICAL_GEO_PROPERTY,
|
||||
ICAL_LASTMODIFIED_PROPERTY,
|
||||
ICAL_LOCATION_PROPERTY,
|
||||
ICAL_MAXRESULTS_PROPERTY,
|
||||
ICAL_MAXRESULTSSIZE_PROPERTY,
|
||||
ICAL_METHOD_PROPERTY,
|
||||
ICAL_ORGANIZER_PROPERTY,
|
||||
ICAL_PERCENTCOMPLETE_PROPERTY,
|
||||
ICAL_PRIORITY_PROPERTY,
|
||||
ICAL_PRODID_PROPERTY,
|
||||
ICAL_QUERY_PROPERTY,
|
||||
ICAL_QUERYNAME_PROPERTY,
|
||||
ICAL_RDATE_PROPERTY,
|
||||
ICAL_RECURRENCEID_PROPERTY,
|
||||
ICAL_RELATEDTO_PROPERTY,
|
||||
ICAL_REPEAT_PROPERTY,
|
||||
ICAL_REQUESTSTATUS_PROPERTY,
|
||||
ICAL_RESOURCES_PROPERTY,
|
||||
ICAL_RRULE_PROPERTY,
|
||||
ICAL_SCOPE_PROPERTY,
|
||||
ICAL_SEQUENCE_PROPERTY,
|
||||
ICAL_STATUS_PROPERTY,
|
||||
ICAL_SUMMARY_PROPERTY,
|
||||
ICAL_TARGET_PROPERTY,
|
||||
ICAL_TRANSP_PROPERTY,
|
||||
ICAL_TRIGGER_PROPERTY,
|
||||
ICAL_TZID_PROPERTY,
|
||||
ICAL_TZNAME_PROPERTY,
|
||||
ICAL_TZOFFSETFROM_PROPERTY,
|
||||
ICAL_TZOFFSETTO_PROPERTY,
|
||||
ICAL_TZURL_PROPERTY,
|
||||
ICAL_UID_PROPERTY,
|
||||
ICAL_URL_PROPERTY,
|
||||
ICAL_VERSION_PROPERTY,
|
||||
ICAL_X_PROPERTY,
|
||||
ICAL_XLICCLASS_PROPERTY,
|
||||
ICAL_XLICCLUSTERCOUNT_PROPERTY,
|
||||
ICAL_XLICERROR_PROPERTY,
|
||||
ICAL_XLICMIMECHARSET_PROPERTY,
|
||||
ICAL_XLICMIMECID_PROPERTY,
|
||||
ICAL_XLICMIMECONTENTTYPE_PROPERTY,
|
||||
ICAL_XLICMIMEENCODING_PROPERTY,
|
||||
ICAL_XLICMIMEFILENAME_PROPERTY,
|
||||
ICAL_XLICMIMEOPTINFO_PROPERTY,
|
||||
ICAL_NO_PROPERTY
|
||||
} icalproperty_kind;
|
||||
|
||||
|
||||
/* ACTION */
|
||||
icalproperty* icalproperty_new_action(enum icalproperty_action v);
|
||||
void icalproperty_set_action(icalproperty* prop, enum icalproperty_action v);
|
||||
enum icalproperty_action icalproperty_get_action(icalproperty* prop);icalproperty* icalproperty_vanew_action(enum icalproperty_action v, ...);
|
||||
|
||||
/* ATTACH */
|
||||
icalproperty* icalproperty_new_attach(struct icalattachtype v);
|
||||
void icalproperty_set_attach(icalproperty* prop, struct icalattachtype v);
|
||||
struct icalattachtype icalproperty_get_attach(icalproperty* prop);icalproperty* icalproperty_vanew_attach(struct icalattachtype v, ...);
|
||||
|
||||
/* ATTENDEE */
|
||||
icalproperty* icalproperty_new_attendee(const char* v);
|
||||
void icalproperty_set_attendee(icalproperty* prop, const char* v);
|
||||
const char* icalproperty_get_attendee(icalproperty* prop);icalproperty* icalproperty_vanew_attendee(const char* v, ...);
|
||||
|
||||
/* CALSCALE */
|
||||
icalproperty* icalproperty_new_calscale(const char* v);
|
||||
void icalproperty_set_calscale(icalproperty* prop, const char* v);
|
||||
const char* icalproperty_get_calscale(icalproperty* prop);icalproperty* icalproperty_vanew_calscale(const char* v, ...);
|
||||
|
||||
/* CATEGORIES */
|
||||
icalproperty* icalproperty_new_categories(const char* v);
|
||||
void icalproperty_set_categories(icalproperty* prop, const char* v);
|
||||
const char* icalproperty_get_categories(icalproperty* prop);icalproperty* icalproperty_vanew_categories(const char* v, ...);
|
||||
|
||||
/* CLASS */
|
||||
icalproperty* icalproperty_new_class(enum icalproperty_class v);
|
||||
void icalproperty_set_class(icalproperty* prop, enum icalproperty_class v);
|
||||
enum icalproperty_class icalproperty_get_class(icalproperty* prop);icalproperty* icalproperty_vanew_class(enum icalproperty_class v, ...);
|
||||
|
||||
/* COMMENT */
|
||||
icalproperty* icalproperty_new_comment(const char* v);
|
||||
void icalproperty_set_comment(icalproperty* prop, const char* v);
|
||||
const char* icalproperty_get_comment(icalproperty* prop);icalproperty* icalproperty_vanew_comment(const char* v, ...);
|
||||
|
||||
/* COMPLETED */
|
||||
icalproperty* icalproperty_new_completed(struct icaltimetype v);
|
||||
void icalproperty_set_completed(icalproperty* prop, struct icaltimetype v);
|
||||
struct icaltimetype icalproperty_get_completed(icalproperty* prop);icalproperty* icalproperty_vanew_completed(struct icaltimetype v, ...);
|
||||
|
||||
/* CONTACT */
|
||||
icalproperty* icalproperty_new_contact(const char* v);
|
||||
void icalproperty_set_contact(icalproperty* prop, const char* v);
|
||||
const char* icalproperty_get_contact(icalproperty* prop);icalproperty* icalproperty_vanew_contact(const char* v, ...);
|
||||
|
||||
/* CREATED */
|
||||
icalproperty* icalproperty_new_created(struct icaltimetype v);
|
||||
void icalproperty_set_created(icalproperty* prop, struct icaltimetype v);
|
||||
struct icaltimetype icalproperty_get_created(icalproperty* prop);icalproperty* icalproperty_vanew_created(struct icaltimetype v, ...);
|
||||
|
||||
/* DESCRIPTION */
|
||||
icalproperty* icalproperty_new_description(const char* v);
|
||||
void icalproperty_set_description(icalproperty* prop, const char* v);
|
||||
const char* icalproperty_get_description(icalproperty* prop);icalproperty* icalproperty_vanew_description(const char* v, ...);
|
||||
|
||||
/* DTEND */
|
||||
icalproperty* icalproperty_new_dtend(struct icaltimetype v);
|
||||
void icalproperty_set_dtend(icalproperty* prop, struct icaltimetype v);
|
||||
struct icaltimetype icalproperty_get_dtend(icalproperty* prop);icalproperty* icalproperty_vanew_dtend(struct icaltimetype v, ...);
|
||||
|
||||
/* DTSTAMP */
|
||||
icalproperty* icalproperty_new_dtstamp(struct icaltimetype v);
|
||||
void icalproperty_set_dtstamp(icalproperty* prop, struct icaltimetype v);
|
||||
struct icaltimetype icalproperty_get_dtstamp(icalproperty* prop);icalproperty* icalproperty_vanew_dtstamp(struct icaltimetype v, ...);
|
||||
|
||||
/* DTSTART */
|
||||
icalproperty* icalproperty_new_dtstart(struct icaltimetype v);
|
||||
void icalproperty_set_dtstart(icalproperty* prop, struct icaltimetype v);
|
||||
struct icaltimetype icalproperty_get_dtstart(icalproperty* prop);icalproperty* icalproperty_vanew_dtstart(struct icaltimetype v, ...);
|
||||
|
||||
/* DUE */
|
||||
icalproperty* icalproperty_new_due(struct icaltimetype v);
|
||||
void icalproperty_set_due(icalproperty* prop, struct icaltimetype v);
|
||||
struct icaltimetype icalproperty_get_due(icalproperty* prop);icalproperty* icalproperty_vanew_due(struct icaltimetype v, ...);
|
||||
|
||||
/* DURATION */
|
||||
icalproperty* icalproperty_new_duration(struct icaldurationtype v);
|
||||
void icalproperty_set_duration(icalproperty* prop, struct icaldurationtype v);
|
||||
struct icaldurationtype icalproperty_get_duration(icalproperty* prop);icalproperty* icalproperty_vanew_duration(struct icaldurationtype v, ...);
|
||||
|
||||
/* EXDATE */
|
||||
icalproperty* icalproperty_new_exdate(struct icaltimetype v);
|
||||
void icalproperty_set_exdate(icalproperty* prop, struct icaltimetype v);
|
||||
struct icaltimetype icalproperty_get_exdate(icalproperty* prop);icalproperty* icalproperty_vanew_exdate(struct icaltimetype v, ...);
|
||||
|
||||
/* EXRULE */
|
||||
icalproperty* icalproperty_new_exrule(struct icalrecurrencetype v);
|
||||
void icalproperty_set_exrule(icalproperty* prop, struct icalrecurrencetype v);
|
||||
struct icalrecurrencetype icalproperty_get_exrule(icalproperty* prop);icalproperty* icalproperty_vanew_exrule(struct icalrecurrencetype v, ...);
|
||||
|
||||
/* FREEBUSY */
|
||||
icalproperty* icalproperty_new_freebusy(struct icalperiodtype v);
|
||||
void icalproperty_set_freebusy(icalproperty* prop, struct icalperiodtype v);
|
||||
struct icalperiodtype icalproperty_get_freebusy(icalproperty* prop);icalproperty* icalproperty_vanew_freebusy(struct icalperiodtype v, ...);
|
||||
|
||||
/* GEO */
|
||||
icalproperty* icalproperty_new_geo(struct icalgeotype v);
|
||||
void icalproperty_set_geo(icalproperty* prop, struct icalgeotype v);
|
||||
struct icalgeotype icalproperty_get_geo(icalproperty* prop);icalproperty* icalproperty_vanew_geo(struct icalgeotype v, ...);
|
||||
|
||||
/* LAST-MODIFIED */
|
||||
icalproperty* icalproperty_new_lastmodified(struct icaltimetype v);
|
||||
void icalproperty_set_lastmodified(icalproperty* prop, struct icaltimetype v);
|
||||
struct icaltimetype icalproperty_get_lastmodified(icalproperty* prop);icalproperty* icalproperty_vanew_lastmodified(struct icaltimetype v, ...);
|
||||
|
||||
/* LOCATION */
|
||||
icalproperty* icalproperty_new_location(const char* v);
|
||||
void icalproperty_set_location(icalproperty* prop, const char* v);
|
||||
const char* icalproperty_get_location(icalproperty* prop);icalproperty* icalproperty_vanew_location(const char* v, ...);
|
||||
|
||||
/* MAXRESULTS */
|
||||
icalproperty* icalproperty_new_maxresults(int v);
|
||||
void icalproperty_set_maxresults(icalproperty* prop, int v);
|
||||
int icalproperty_get_maxresults(icalproperty* prop);icalproperty* icalproperty_vanew_maxresults(int v, ...);
|
||||
|
||||
/* MAXRESULTSSIZE */
|
||||
icalproperty* icalproperty_new_maxresultssize(int v);
|
||||
void icalproperty_set_maxresultssize(icalproperty* prop, int v);
|
||||
int icalproperty_get_maxresultssize(icalproperty* prop);icalproperty* icalproperty_vanew_maxresultssize(int v, ...);
|
||||
|
||||
/* METHOD */
|
||||
icalproperty* icalproperty_new_method(enum icalproperty_method v);
|
||||
void icalproperty_set_method(icalproperty* prop, enum icalproperty_method v);
|
||||
enum icalproperty_method icalproperty_get_method(icalproperty* prop);icalproperty* icalproperty_vanew_method(enum icalproperty_method v, ...);
|
||||
|
||||
/* ORGANIZER */
|
||||
icalproperty* icalproperty_new_organizer(const char* v);
|
||||
void icalproperty_set_organizer(icalproperty* prop, const char* v);
|
||||
const char* icalproperty_get_organizer(icalproperty* prop);icalproperty* icalproperty_vanew_organizer(const char* v, ...);
|
||||
|
||||
/* PERCENT-COMPLETE */
|
||||
icalproperty* icalproperty_new_percentcomplete(int v);
|
||||
void icalproperty_set_percentcomplete(icalproperty* prop, int v);
|
||||
int icalproperty_get_percentcomplete(icalproperty* prop);icalproperty* icalproperty_vanew_percentcomplete(int v, ...);
|
||||
|
||||
/* PRIORITY */
|
||||
icalproperty* icalproperty_new_priority(int v);
|
||||
void icalproperty_set_priority(icalproperty* prop, int v);
|
||||
int icalproperty_get_priority(icalproperty* prop);icalproperty* icalproperty_vanew_priority(int v, ...);
|
||||
|
||||
/* PRODID */
|
||||
icalproperty* icalproperty_new_prodid(const char* v);
|
||||
void icalproperty_set_prodid(icalproperty* prop, const char* v);
|
||||
const char* icalproperty_get_prodid(icalproperty* prop);icalproperty* icalproperty_vanew_prodid(const char* v, ...);
|
||||
|
||||
/* QUERY */
|
||||
icalproperty* icalproperty_new_query(const char* v);
|
||||
void icalproperty_set_query(icalproperty* prop, const char* v);
|
||||
const char* icalproperty_get_query(icalproperty* prop);icalproperty* icalproperty_vanew_query(const char* v, ...);
|
||||
|
||||
/* QUERYNAME */
|
||||
icalproperty* icalproperty_new_queryname(const char* v);
|
||||
void icalproperty_set_queryname(icalproperty* prop, const char* v);
|
||||
const char* icalproperty_get_queryname(icalproperty* prop);icalproperty* icalproperty_vanew_queryname(const char* v, ...);
|
||||
|
||||
/* RDATE */
|
||||
icalproperty* icalproperty_new_rdate(struct icaldatetimeperiodtype v);
|
||||
void icalproperty_set_rdate(icalproperty* prop, struct icaldatetimeperiodtype v);
|
||||
struct icaldatetimeperiodtype icalproperty_get_rdate(icalproperty* prop);icalproperty* icalproperty_vanew_rdate(struct icaldatetimeperiodtype v, ...);
|
||||
|
||||
/* RECURRENCE-ID */
|
||||
icalproperty* icalproperty_new_recurrenceid(struct icaltimetype v);
|
||||
void icalproperty_set_recurrenceid(icalproperty* prop, struct icaltimetype v);
|
||||
struct icaltimetype icalproperty_get_recurrenceid(icalproperty* prop);icalproperty* icalproperty_vanew_recurrenceid(struct icaltimetype v, ...);
|
||||
|
||||
/* RELATED-TO */
|
||||
icalproperty* icalproperty_new_relatedto(const char* v);
|
||||
void icalproperty_set_relatedto(icalproperty* prop, const char* v);
|
||||
const char* icalproperty_get_relatedto(icalproperty* prop);icalproperty* icalproperty_vanew_relatedto(const char* v, ...);
|
||||
|
||||
/* REPEAT */
|
||||
icalproperty* icalproperty_new_repeat(int v);
|
||||
void icalproperty_set_repeat(icalproperty* prop, int v);
|
||||
int icalproperty_get_repeat(icalproperty* prop);icalproperty* icalproperty_vanew_repeat(int v, ...);
|
||||
|
||||
/* REQUEST-STATUS */
|
||||
icalproperty* icalproperty_new_requeststatus(struct icalreqstattype v);
|
||||
void icalproperty_set_requeststatus(icalproperty* prop, struct icalreqstattype v);
|
||||
struct icalreqstattype icalproperty_get_requeststatus(icalproperty* prop);icalproperty* icalproperty_vanew_requeststatus(struct icalreqstattype v, ...);
|
||||
|
||||
/* RESOURCES */
|
||||
icalproperty* icalproperty_new_resources(const char* v);
|
||||
void icalproperty_set_resources(icalproperty* prop, const char* v);
|
||||
const char* icalproperty_get_resources(icalproperty* prop);icalproperty* icalproperty_vanew_resources(const char* v, ...);
|
||||
|
||||
/* RRULE */
|
||||
icalproperty* icalproperty_new_rrule(struct icalrecurrencetype v);
|
||||
void icalproperty_set_rrule(icalproperty* prop, struct icalrecurrencetype v);
|
||||
struct icalrecurrencetype icalproperty_get_rrule(icalproperty* prop);icalproperty* icalproperty_vanew_rrule(struct icalrecurrencetype v, ...);
|
||||
|
||||
/* SCOPE */
|
||||
icalproperty* icalproperty_new_scope(const char* v);
|
||||
void icalproperty_set_scope(icalproperty* prop, const char* v);
|
||||
const char* icalproperty_get_scope(icalproperty* prop);icalproperty* icalproperty_vanew_scope(const char* v, ...);
|
||||
|
||||
/* SEQUENCE */
|
||||
icalproperty* icalproperty_new_sequence(int v);
|
||||
void icalproperty_set_sequence(icalproperty* prop, int v);
|
||||
int icalproperty_get_sequence(icalproperty* prop);icalproperty* icalproperty_vanew_sequence(int v, ...);
|
||||
|
||||
/* STATUS */
|
||||
icalproperty* icalproperty_new_status(enum icalproperty_status v);
|
||||
void icalproperty_set_status(icalproperty* prop, enum icalproperty_status v);
|
||||
enum icalproperty_status icalproperty_get_status(icalproperty* prop);icalproperty* icalproperty_vanew_status(enum icalproperty_status v, ...);
|
||||
|
||||
/* SUMMARY */
|
||||
icalproperty* icalproperty_new_summary(const char* v);
|
||||
void icalproperty_set_summary(icalproperty* prop, const char* v);
|
||||
const char* icalproperty_get_summary(icalproperty* prop);icalproperty* icalproperty_vanew_summary(const char* v, ...);
|
||||
|
||||
/* TARGET */
|
||||
icalproperty* icalproperty_new_target(const char* v);
|
||||
void icalproperty_set_target(icalproperty* prop, const char* v);
|
||||
const char* icalproperty_get_target(icalproperty* prop);icalproperty* icalproperty_vanew_target(const char* v, ...);
|
||||
|
||||
/* TRANSP */
|
||||
icalproperty* icalproperty_new_transp(const char* v);
|
||||
void icalproperty_set_transp(icalproperty* prop, const char* v);
|
||||
const char* icalproperty_get_transp(icalproperty* prop);icalproperty* icalproperty_vanew_transp(const char* v, ...);
|
||||
|
||||
/* TRIGGER */
|
||||
icalproperty* icalproperty_new_trigger(struct icaltriggertype v);
|
||||
void icalproperty_set_trigger(icalproperty* prop, struct icaltriggertype v);
|
||||
struct icaltriggertype icalproperty_get_trigger(icalproperty* prop);icalproperty* icalproperty_vanew_trigger(struct icaltriggertype v, ...);
|
||||
|
||||
/* TZID */
|
||||
icalproperty* icalproperty_new_tzid(const char* v);
|
||||
void icalproperty_set_tzid(icalproperty* prop, const char* v);
|
||||
const char* icalproperty_get_tzid(icalproperty* prop);icalproperty* icalproperty_vanew_tzid(const char* v, ...);
|
||||
|
||||
/* TZNAME */
|
||||
icalproperty* icalproperty_new_tzname(const char* v);
|
||||
void icalproperty_set_tzname(icalproperty* prop, const char* v);
|
||||
const char* icalproperty_get_tzname(icalproperty* prop);icalproperty* icalproperty_vanew_tzname(const char* v, ...);
|
||||
|
||||
/* TZOFFSETFROM */
|
||||
icalproperty* icalproperty_new_tzoffsetfrom(int v);
|
||||
void icalproperty_set_tzoffsetfrom(icalproperty* prop, int v);
|
||||
int icalproperty_get_tzoffsetfrom(icalproperty* prop);icalproperty* icalproperty_vanew_tzoffsetfrom(int v, ...);
|
||||
|
||||
/* TZOFFSETTO */
|
||||
icalproperty* icalproperty_new_tzoffsetto(int v);
|
||||
void icalproperty_set_tzoffsetto(icalproperty* prop, int v);
|
||||
int icalproperty_get_tzoffsetto(icalproperty* prop);icalproperty* icalproperty_vanew_tzoffsetto(int v, ...);
|
||||
|
||||
/* TZURL */
|
||||
icalproperty* icalproperty_new_tzurl(const char* v);
|
||||
void icalproperty_set_tzurl(icalproperty* prop, const char* v);
|
||||
const char* icalproperty_get_tzurl(icalproperty* prop);icalproperty* icalproperty_vanew_tzurl(const char* v, ...);
|
||||
|
||||
/* UID */
|
||||
icalproperty* icalproperty_new_uid(const char* v);
|
||||
void icalproperty_set_uid(icalproperty* prop, const char* v);
|
||||
const char* icalproperty_get_uid(icalproperty* prop);icalproperty* icalproperty_vanew_uid(const char* v, ...);
|
||||
|
||||
/* URL */
|
||||
icalproperty* icalproperty_new_url(const char* v);
|
||||
void icalproperty_set_url(icalproperty* prop, const char* v);
|
||||
const char* icalproperty_get_url(icalproperty* prop);icalproperty* icalproperty_vanew_url(const char* v, ...);
|
||||
|
||||
/* VERSION */
|
||||
icalproperty* icalproperty_new_version(const char* v);
|
||||
void icalproperty_set_version(icalproperty* prop, const char* v);
|
||||
const char* icalproperty_get_version(icalproperty* prop);icalproperty* icalproperty_vanew_version(const char* v, ...);
|
||||
|
||||
/* X */
|
||||
icalproperty* icalproperty_new_x(const char* v);
|
||||
void icalproperty_set_x(icalproperty* prop, const char* v);
|
||||
const char* icalproperty_get_x(icalproperty* prop);icalproperty* icalproperty_vanew_x(const char* v, ...);
|
||||
|
||||
/* X-LIC-CLASS */
|
||||
icalproperty* icalproperty_new_xlicclass(enum icalproperty_xlicclass v);
|
||||
void icalproperty_set_xlicclass(icalproperty* prop, enum icalproperty_xlicclass v);
|
||||
enum icalproperty_xlicclass icalproperty_get_xlicclass(icalproperty* prop);icalproperty* icalproperty_vanew_xlicclass(enum icalproperty_xlicclass v, ...);
|
||||
|
||||
/* X-LIC-CLUSTERCOUNT */
|
||||
icalproperty* icalproperty_new_xlicclustercount(const char* v);
|
||||
void icalproperty_set_xlicclustercount(icalproperty* prop, const char* v);
|
||||
const char* icalproperty_get_xlicclustercount(icalproperty* prop);icalproperty* icalproperty_vanew_xlicclustercount(const char* v, ...);
|
||||
|
||||
/* X-LIC-ERROR */
|
||||
icalproperty* icalproperty_new_xlicerror(const char* v);
|
||||
void icalproperty_set_xlicerror(icalproperty* prop, const char* v);
|
||||
const char* icalproperty_get_xlicerror(icalproperty* prop);icalproperty* icalproperty_vanew_xlicerror(const char* v, ...);
|
||||
|
||||
/* X-LIC-MIMECHARSET */
|
||||
icalproperty* icalproperty_new_xlicmimecharset(const char* v);
|
||||
void icalproperty_set_xlicmimecharset(icalproperty* prop, const char* v);
|
||||
const char* icalproperty_get_xlicmimecharset(icalproperty* prop);icalproperty* icalproperty_vanew_xlicmimecharset(const char* v, ...);
|
||||
|
||||
/* X-LIC-MIMECID */
|
||||
icalproperty* icalproperty_new_xlicmimecid(const char* v);
|
||||
void icalproperty_set_xlicmimecid(icalproperty* prop, const char* v);
|
||||
const char* icalproperty_get_xlicmimecid(icalproperty* prop);icalproperty* icalproperty_vanew_xlicmimecid(const char* v, ...);
|
||||
|
||||
/* X-LIC-MIMECONTENTTYPE */
|
||||
icalproperty* icalproperty_new_xlicmimecontenttype(const char* v);
|
||||
void icalproperty_set_xlicmimecontenttype(icalproperty* prop, const char* v);
|
||||
const char* icalproperty_get_xlicmimecontenttype(icalproperty* prop);icalproperty* icalproperty_vanew_xlicmimecontenttype(const char* v, ...);
|
||||
|
||||
/* X-LIC-MIMEENCODING */
|
||||
icalproperty* icalproperty_new_xlicmimeencoding(const char* v);
|
||||
void icalproperty_set_xlicmimeencoding(icalproperty* prop, const char* v);
|
||||
const char* icalproperty_get_xlicmimeencoding(icalproperty* prop);icalproperty* icalproperty_vanew_xlicmimeencoding(const char* v, ...);
|
||||
|
||||
/* X-LIC-MIMEFILENAME */
|
||||
icalproperty* icalproperty_new_xlicmimefilename(const char* v);
|
||||
void icalproperty_set_xlicmimefilename(icalproperty* prop, const char* v);
|
||||
const char* icalproperty_get_xlicmimefilename(icalproperty* prop);icalproperty* icalproperty_vanew_xlicmimefilename(const char* v, ...);
|
||||
|
||||
/* X-LIC-MIMEOPTINFO */
|
||||
icalproperty* icalproperty_new_xlicmimeoptinfo(const char* v);
|
||||
void icalproperty_set_xlicmimeoptinfo(icalproperty* prop, const char* v);
|
||||
const char* icalproperty_get_xlicmimeoptinfo(icalproperty* prop);icalproperty* icalproperty_vanew_xlicmimeoptinfo(const char* v, ...);
|
||||
|
||||
|
||||
#endif /*ICALPROPERTY_H*/
|
@ -1,997 +0,0 @@
|
||||
/* -*- Mode: C -*- */
|
||||
/*======================================================================
|
||||
FILE: icalvalue.c
|
||||
CREATOR: eric 02 May 1999
|
||||
|
||||
$Id: icalderivedvalue.c,v 1.1 2001/12/21 19:21:42 mikep%oeone.com Exp $
|
||||
|
||||
|
||||
(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.c
|
||||
|
||||
Contributions from:
|
||||
Graham Davison (g.m.davison@computer.org)
|
||||
|
||||
|
||||
======================================================================*/
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include <config.h>
|
||||
#endif
|
||||
|
||||
#include "icalerror.h"
|
||||
#include "icalmemory.h"
|
||||
#include "icalparser.h"
|
||||
#include "icalenums.h"
|
||||
|
||||
#include "icalvalueimpl.h"
|
||||
|
||||
#include <stdlib.h> /* for malloc */
|
||||
#include <stdio.h> /* for sprintf */
|
||||
#include <string.h> /* For memset, others */
|
||||
#include <stddef.h> /* For offsetof() macro */
|
||||
#include <errno.h>
|
||||
#include <time.h> /* for mktime */
|
||||
#include <stdlib.h> /* for atoi and atof */
|
||||
#include <limits.h> /* for SHRT_MAX */
|
||||
|
||||
|
||||
|
||||
#define TMP_BUF_SIZE 1024
|
||||
|
||||
struct icalvalue_impl* icalvalue_new_impl(icalvalue_kind kind);
|
||||
|
||||
/* This map associates each of the value types with its string
|
||||
representation */
|
||||
struct icalvalue_kind_map {
|
||||
icalvalue_kind kind;
|
||||
char name[20];
|
||||
};
|
||||
|
||||
extern struct icalvalue_kind_map value_map[];
|
||||
|
||||
const char* icalvalue_kind_to_string(icalvalue_kind kind)
|
||||
{
|
||||
int i;
|
||||
|
||||
for (i=0; value_map[i].kind != ICAL_NO_VALUE; i++) {
|
||||
if (value_map[i].kind == kind) {
|
||||
return value_map[i].name;
|
||||
}
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
icalvalue_kind icalvalue_string_to_kind(const char* str)
|
||||
{
|
||||
int i;
|
||||
|
||||
for (i=0; value_map[i].kind != ICAL_NO_VALUE; i++) {
|
||||
if (strcmp(value_map[i].name,str) == 0) {
|
||||
return value_map[i].kind;
|
||||
}
|
||||
}
|
||||
|
||||
return value_map[i].kind;
|
||||
|
||||
}
|
||||
|
||||
icalvalue* icalvalue_new_x (const char* v){
|
||||
struct icalvalue_impl* impl = icalvalue_new_impl(ICAL_X_VALUE);
|
||||
icalerror_check_arg_rz( (v!=0),"v");
|
||||
|
||||
icalvalue_set_x((icalvalue*)impl,v);
|
||||
return (icalvalue*)impl;
|
||||
}
|
||||
void icalvalue_set_x(icalvalue* value, const char* v) {
|
||||
struct icalvalue_impl* impl;
|
||||
icalerror_check_arg_rv( (value!=0),"value");
|
||||
icalerror_check_arg_rv( (v!=0),"v");
|
||||
|
||||
impl = (struct icalvalue_impl*)value;
|
||||
if(impl->x_value!=0) {free((void*)impl->x_value);}
|
||||
|
||||
impl->x_value = icalmemory_strdup(v);
|
||||
|
||||
if (impl->x_value == 0){
|
||||
errno = ENOMEM;
|
||||
}
|
||||
|
||||
}
|
||||
const char* icalvalue_get_x(icalvalue* value) {
|
||||
|
||||
icalerror_check_arg( (value!=0),"value");
|
||||
icalerror_check_value_type(value, ICAL_X_VALUE);
|
||||
return ((struct icalvalue_impl*)value)->x_value;
|
||||
}
|
||||
|
||||
/* Recur is a special case, so it is not auto generated. */
|
||||
icalvalue*
|
||||
icalvalue_new_recur (struct icalrecurrencetype v)
|
||||
{
|
||||
struct icalvalue_impl* impl = icalvalue_new_impl(ICAL_RECUR_VALUE);
|
||||
|
||||
icalvalue_set_recur((icalvalue*)impl,v);
|
||||
|
||||
return (icalvalue*)impl;
|
||||
}
|
||||
|
||||
void
|
||||
icalvalue_set_recur(icalvalue* value, struct icalrecurrencetype v)
|
||||
{
|
||||
struct icalvalue_impl* impl;
|
||||
|
||||
icalerror_check_arg_rv( (value!=0),"value");
|
||||
icalerror_check_value_type(value, ICAL_RECUR_VALUE);
|
||||
|
||||
impl = (struct icalvalue_impl*)value;
|
||||
|
||||
if (impl->data.v_recur != 0){
|
||||
free(impl->data.v_recur);
|
||||
impl->data.v_recur = 0;
|
||||
}
|
||||
|
||||
impl->data.v_recur = malloc(sizeof(struct icalrecurrencetype));
|
||||
|
||||
if (impl->data.v_recur == 0){
|
||||
icalerror_set_errno(ICAL_NEWFAILED_ERROR);
|
||||
return;
|
||||
} else {
|
||||
memcpy(impl->data.v_recur, &v, sizeof(struct icalrecurrencetype));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
struct icalrecurrencetype
|
||||
icalvalue_get_recur(icalvalue* value)
|
||||
{
|
||||
icalerror_check_arg( (value!=0),"value");
|
||||
icalerror_check_value_type(value, ICAL_RECUR_VALUE);
|
||||
|
||||
return *(((struct icalvalue_impl*)value)->data.v_recur);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
icalvalue*
|
||||
icalvalue_new_trigger (struct icaltriggertype v)
|
||||
{
|
||||
struct icalvalue_impl* impl = icalvalue_new_impl(ICAL_TRIGGER_VALUE);
|
||||
|
||||
icalvalue_set_trigger((icalvalue*)impl,v);
|
||||
|
||||
return (icalvalue*)impl;
|
||||
}
|
||||
|
||||
void
|
||||
icalvalue_set_trigger(icalvalue* value, struct icaltriggertype v)
|
||||
{
|
||||
struct icalvalue_impl* impl;
|
||||
|
||||
icalerror_check_arg_rv( (value!=0),"value");
|
||||
|
||||
impl = (struct icalvalue_impl*)value;
|
||||
|
||||
if(!icaltime_is_null_time(v.time)){
|
||||
icalvalue_set_datetime((icalvalue*)impl,v.time);
|
||||
impl->kind = ICAL_DATETIME_VALUE;
|
||||
} else {
|
||||
icalvalue_set_duration((icalvalue*)impl,v.duration);
|
||||
impl->kind = ICAL_DURATION_VALUE;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
struct icaltriggertype
|
||||
icalvalue_get_trigger(icalvalue* value)
|
||||
{
|
||||
struct icalvalue_impl *impl = (struct icalvalue_impl*)value;
|
||||
struct icaltriggertype tr;
|
||||
|
||||
icalerror_check_arg( (value!=0),"value");
|
||||
icalerror_check_arg( (value!=0),"value");
|
||||
|
||||
if(impl->kind == ICAL_DATETIME_VALUE){
|
||||
tr.duration = icaldurationtype_from_int(0);
|
||||
tr.time = impl->data.v_time;
|
||||
} else if(impl->kind == ICAL_DURATION_VALUE){
|
||||
tr.time = icaltime_null_time();
|
||||
tr.duration = impl->data.v_duration;
|
||||
} else {
|
||||
tr.duration = icaldurationtype_from_int(0);
|
||||
tr.time = icaltime_null_time();
|
||||
icalerror_set_errno(ICAL_BADARG_ERROR);
|
||||
}
|
||||
|
||||
return tr;
|
||||
}
|
||||
|
||||
/* DATE-TIME-PERIOD is a special case, and is not auto generated */
|
||||
|
||||
icalvalue*
|
||||
icalvalue_new_datetimeperiod (struct icaldatetimeperiodtype v)
|
||||
{
|
||||
struct icalvalue_impl* impl = icalvalue_new_impl(ICAL_DATETIMEPERIOD_VALUE);
|
||||
|
||||
icalvalue_set_datetimeperiod((icalvalue*)impl,v);
|
||||
|
||||
return (icalvalue*)impl;
|
||||
}
|
||||
|
||||
void
|
||||
icalvalue_set_datetimeperiod(icalvalue* value, struct icaldatetimeperiodtype v)
|
||||
{
|
||||
struct icalvalue_impl* impl = (struct icalvalue_impl*)value;
|
||||
|
||||
icalerror_check_arg_rv( (value!=0),"value");
|
||||
|
||||
icalerror_check_value_type(value, ICAL_DATETIMEPERIOD_VALUE);
|
||||
|
||||
if(!icaltime_is_null_time(v.time)){
|
||||
if(!icaltime_is_valid_time(v.time)){
|
||||
icalerror_set_errno(ICAL_BADARG_ERROR);
|
||||
return;
|
||||
}
|
||||
impl->kind = ICAL_DATETIME_VALUE;
|
||||
icalvalue_set_datetime(impl,v.time);
|
||||
} else if (!icalperiodtype_is_null_period(v.period)) {
|
||||
if(!icalperiodtype_is_valid_period(v.period)){
|
||||
icalerror_set_errno(ICAL_BADARG_ERROR);
|
||||
return;
|
||||
}
|
||||
impl->kind = ICAL_PERIOD_VALUE;
|
||||
icalvalue_set_period(impl,v.period);
|
||||
} else {
|
||||
icalerror_set_errno(ICAL_BADARG_ERROR);
|
||||
}
|
||||
}
|
||||
|
||||
struct icaldatetimeperiodtype
|
||||
icalvalue_get_datetimeperiod(icalvalue* value)
|
||||
{
|
||||
struct icaldatetimeperiodtype dtp;
|
||||
|
||||
struct icalvalue_impl* impl = (struct icalvalue_impl*)value;
|
||||
icalerror_check_arg( (value!=0),"value");
|
||||
icalerror_check_value_type(value, ICAL_DATETIMEPERIOD_VALUE);
|
||||
|
||||
if(impl->kind == ICAL_DATETIME_VALUE){
|
||||
dtp.period = icalperiodtype_null_period();
|
||||
dtp.time = impl->data.v_time;
|
||||
} else if(impl->kind == ICAL_PERIOD_VALUE) {
|
||||
dtp.period = impl->data.v_period;
|
||||
dtp.time = icaltime_null_time();
|
||||
} else {
|
||||
dtp.period = icalperiodtype_null_period();
|
||||
dtp.time = icaltime_null_time();
|
||||
icalerror_set_errno(ICAL_BADARG_ERROR);
|
||||
}
|
||||
|
||||
return dtp;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/* The remaining interfaces are 'new', 'set' and 'get' for each of the value
|
||||
types */
|
||||
|
||||
|
||||
/* Everything below this line is machine generated. Do not edit. */
|
||||
static struct icalvalue_kind_map value_map[]={
|
||||
{ICAL_BOOLEAN_VALUE,"BOOLEAN"},
|
||||
{ICAL_UTCOFFSET_VALUE,"UTC-OFFSET"},
|
||||
{ICAL_XLICCLASS_VALUE,"X-LIC-CLASS"},
|
||||
{ICAL_RECUR_VALUE,"RECUR"},
|
||||
{ICAL_METHOD_VALUE,"METHOD"},
|
||||
{ICAL_CALADDRESS_VALUE,"CAL-ADDRESS"},
|
||||
{ICAL_PERIOD_VALUE,"PERIOD"},
|
||||
{ICAL_STATUS_VALUE,"STATUS"},
|
||||
{ICAL_BINARY_VALUE,"BINARY"},
|
||||
{ICAL_TEXT_VALUE,"TEXT"},
|
||||
{ICAL_DURATION_VALUE,"DURATION"},
|
||||
{ICAL_DATETIMEPERIOD_VALUE,"DATE-TIME-PERIOD"},
|
||||
{ICAL_INTEGER_VALUE,"INTEGER"},
|
||||
{ICAL_URI_VALUE,"URI"},
|
||||
{ICAL_TRIGGER_VALUE,"TRIGGER"},
|
||||
{ICAL_ATTACH_VALUE,"ATTACH"},
|
||||
{ICAL_CLASS_VALUE,"CLASS"},
|
||||
{ICAL_FLOAT_VALUE,"FLOAT"},
|
||||
{ICAL_QUERY_VALUE,"QUERY"},
|
||||
{ICAL_STRING_VALUE,"STRING"},
|
||||
{ICAL_TRANSP_VALUE,"TRANSP"},
|
||||
{ICAL_X_VALUE,"X"},
|
||||
{ICAL_DATETIME_VALUE,"DATE-TIME"},
|
||||
{ICAL_REQUESTSTATUS_VALUE,"REQUEST-STATUS"},
|
||||
{ICAL_GEO_VALUE,"GEO"},
|
||||
{ICAL_DATE_VALUE,"DATE"},
|
||||
{ICAL_ACTION_VALUE,"ACTION"},
|
||||
{ICAL_NO_VALUE,""}
|
||||
};
|
||||
|
||||
|
||||
icalvalue* icalvalue_new_boolean (int v){
|
||||
struct icalvalue_impl* impl = icalvalue_new_impl(ICAL_BOOLEAN_VALUE);
|
||||
|
||||
icalvalue_set_boolean((icalvalue*)impl,v);
|
||||
return (icalvalue*)impl;
|
||||
}
|
||||
void icalvalue_set_boolean(icalvalue* value, int v) {
|
||||
struct icalvalue_impl* impl;
|
||||
icalerror_check_arg_rv( (value!=0),"value");
|
||||
|
||||
icalerror_check_value_type(value, ICAL_BOOLEAN_VALUE);
|
||||
impl = (struct icalvalue_impl*)value;
|
||||
|
||||
|
||||
impl->data.v_int = v;
|
||||
|
||||
icalvalue_reset_kind(impl);
|
||||
}
|
||||
int icalvalue_get_boolean(icalvalue* value) {
|
||||
|
||||
icalerror_check_arg( (value!=0),"value");
|
||||
icalerror_check_value_type(value, ICAL_BOOLEAN_VALUE);
|
||||
return ((struct icalvalue_impl*)value)->data.v_int;
|
||||
}
|
||||
|
||||
|
||||
|
||||
icalvalue* icalvalue_new_utcoffset (int v){
|
||||
struct icalvalue_impl* impl = icalvalue_new_impl(ICAL_UTCOFFSET_VALUE);
|
||||
|
||||
icalvalue_set_utcoffset((icalvalue*)impl,v);
|
||||
return (icalvalue*)impl;
|
||||
}
|
||||
void icalvalue_set_utcoffset(icalvalue* value, int v) {
|
||||
struct icalvalue_impl* impl;
|
||||
icalerror_check_arg_rv( (value!=0),"value");
|
||||
|
||||
icalerror_check_value_type(value, ICAL_UTCOFFSET_VALUE);
|
||||
impl = (struct icalvalue_impl*)value;
|
||||
|
||||
|
||||
impl->data.v_int = v;
|
||||
|
||||
icalvalue_reset_kind(impl);
|
||||
}
|
||||
int icalvalue_get_utcoffset(icalvalue* value) {
|
||||
|
||||
icalerror_check_arg( (value!=0),"value");
|
||||
icalerror_check_value_type(value, ICAL_UTCOFFSET_VALUE);
|
||||
return ((struct icalvalue_impl*)value)->data.v_int;
|
||||
}
|
||||
|
||||
|
||||
|
||||
icalvalue* icalvalue_new_xlicclass (enum icalproperty_xlicclass v){
|
||||
struct icalvalue_impl* impl = icalvalue_new_impl(ICAL_XLICCLASS_VALUE);
|
||||
|
||||
icalvalue_set_xlicclass((icalvalue*)impl,v);
|
||||
return (icalvalue*)impl;
|
||||
}
|
||||
void icalvalue_set_xlicclass(icalvalue* value, enum icalproperty_xlicclass v) {
|
||||
struct icalvalue_impl* impl;
|
||||
icalerror_check_arg_rv( (value!=0),"value");
|
||||
|
||||
icalerror_check_value_type(value, ICAL_XLICCLASS_VALUE);
|
||||
impl = (struct icalvalue_impl*)value;
|
||||
|
||||
|
||||
impl->data.v_enum = v;
|
||||
|
||||
icalvalue_reset_kind(impl);
|
||||
}
|
||||
enum icalproperty_xlicclass icalvalue_get_xlicclass(icalvalue* value) {
|
||||
|
||||
icalerror_check_arg( (value!=0),"value");
|
||||
icalerror_check_value_type(value, ICAL_XLICCLASS_VALUE);
|
||||
return ((struct icalvalue_impl*)value)->data.v_enum;
|
||||
}
|
||||
|
||||
|
||||
|
||||
icalvalue* icalvalue_new_method (enum icalproperty_method v){
|
||||
struct icalvalue_impl* impl = icalvalue_new_impl(ICAL_METHOD_VALUE);
|
||||
|
||||
icalvalue_set_method((icalvalue*)impl,v);
|
||||
return (icalvalue*)impl;
|
||||
}
|
||||
void icalvalue_set_method(icalvalue* value, enum icalproperty_method v) {
|
||||
struct icalvalue_impl* impl;
|
||||
icalerror_check_arg_rv( (value!=0),"value");
|
||||
|
||||
icalerror_check_value_type(value, ICAL_METHOD_VALUE);
|
||||
impl = (struct icalvalue_impl*)value;
|
||||
|
||||
|
||||
impl->data.v_enum = v;
|
||||
|
||||
icalvalue_reset_kind(impl);
|
||||
}
|
||||
enum icalproperty_method icalvalue_get_method(icalvalue* value) {
|
||||
|
||||
icalerror_check_arg( (value!=0),"value");
|
||||
icalerror_check_value_type(value, ICAL_METHOD_VALUE);
|
||||
return ((struct icalvalue_impl*)value)->data.v_enum;
|
||||
}
|
||||
|
||||
|
||||
|
||||
icalvalue* icalvalue_new_caladdress (const char* v){
|
||||
struct icalvalue_impl* impl = icalvalue_new_impl(ICAL_CALADDRESS_VALUE);
|
||||
icalerror_check_arg_rz( (v!=0),"v");
|
||||
|
||||
icalvalue_set_caladdress((icalvalue*)impl,v);
|
||||
return (icalvalue*)impl;
|
||||
}
|
||||
void icalvalue_set_caladdress(icalvalue* value, const char* v) {
|
||||
struct icalvalue_impl* impl;
|
||||
icalerror_check_arg_rv( (value!=0),"value");
|
||||
icalerror_check_arg_rv( (v!=0),"v");
|
||||
|
||||
icalerror_check_value_type(value, ICAL_CALADDRESS_VALUE);
|
||||
impl = (struct icalvalue_impl*)value;
|
||||
if(impl->data.v_string!=0) {free((void*)impl->data.v_string);}
|
||||
|
||||
|
||||
impl->data.v_string = icalmemory_strdup(v);
|
||||
|
||||
if (impl->data.v_string == 0){
|
||||
errno = ENOMEM;
|
||||
}
|
||||
|
||||
|
||||
icalvalue_reset_kind(impl);
|
||||
}
|
||||
const char* icalvalue_get_caladdress(icalvalue* value) {
|
||||
|
||||
icalerror_check_arg( (value!=0),"value");
|
||||
icalerror_check_value_type(value, ICAL_CALADDRESS_VALUE);
|
||||
return ((struct icalvalue_impl*)value)->data.v_string;
|
||||
}
|
||||
|
||||
|
||||
|
||||
icalvalue* icalvalue_new_period (struct icalperiodtype v){
|
||||
struct icalvalue_impl* impl = icalvalue_new_impl(ICAL_PERIOD_VALUE);
|
||||
|
||||
icalvalue_set_period((icalvalue*)impl,v);
|
||||
return (icalvalue*)impl;
|
||||
}
|
||||
void icalvalue_set_period(icalvalue* value, struct icalperiodtype v) {
|
||||
struct icalvalue_impl* impl;
|
||||
icalerror_check_arg_rv( (value!=0),"value");
|
||||
|
||||
icalerror_check_value_type(value, ICAL_PERIOD_VALUE);
|
||||
impl = (struct icalvalue_impl*)value;
|
||||
|
||||
|
||||
impl->data.v_period = v;
|
||||
|
||||
icalvalue_reset_kind(impl);
|
||||
}
|
||||
struct icalperiodtype icalvalue_get_period(icalvalue* value) {
|
||||
|
||||
icalerror_check_arg( (value!=0),"value");
|
||||
icalerror_check_value_type(value, ICAL_PERIOD_VALUE);
|
||||
return ((struct icalvalue_impl*)value)->data.v_period;
|
||||
}
|
||||
|
||||
|
||||
|
||||
icalvalue* icalvalue_new_status (enum 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, enum 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_enum = v;
|
||||
|
||||
icalvalue_reset_kind(impl);
|
||||
}
|
||||
enum 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_enum;
|
||||
}
|
||||
|
||||
|
||||
|
||||
icalvalue* icalvalue_new_binary (const char* v){
|
||||
struct icalvalue_impl* impl = icalvalue_new_impl(ICAL_BINARY_VALUE);
|
||||
icalerror_check_arg_rz( (v!=0),"v");
|
||||
|
||||
icalvalue_set_binary((icalvalue*)impl,v);
|
||||
return (icalvalue*)impl;
|
||||
}
|
||||
void icalvalue_set_binary(icalvalue* value, const char* v) {
|
||||
struct icalvalue_impl* impl;
|
||||
icalerror_check_arg_rv( (value!=0),"value");
|
||||
icalerror_check_arg_rv( (v!=0),"v");
|
||||
|
||||
icalerror_check_value_type(value, ICAL_BINARY_VALUE);
|
||||
impl = (struct icalvalue_impl*)value;
|
||||
if(impl->data.v_string!=0) {free((void*)impl->data.v_string);}
|
||||
|
||||
|
||||
impl->data.v_string = icalmemory_strdup(v);
|
||||
|
||||
if (impl->data.v_string == 0){
|
||||
errno = ENOMEM;
|
||||
}
|
||||
|
||||
|
||||
icalvalue_reset_kind(impl);
|
||||
}
|
||||
const char* icalvalue_get_binary(icalvalue* value) {
|
||||
|
||||
icalerror_check_arg( (value!=0),"value");
|
||||
icalerror_check_value_type(value, ICAL_BINARY_VALUE);
|
||||
return ((struct icalvalue_impl*)value)->data.v_string;
|
||||
}
|
||||
|
||||
|
||||
|
||||
icalvalue* icalvalue_new_text (const char* v){
|
||||
struct icalvalue_impl* impl = icalvalue_new_impl(ICAL_TEXT_VALUE);
|
||||
icalerror_check_arg_rz( (v!=0),"v");
|
||||
|
||||
icalvalue_set_text((icalvalue*)impl,v);
|
||||
return (icalvalue*)impl;
|
||||
}
|
||||
void icalvalue_set_text(icalvalue* value, const char* v) {
|
||||
struct icalvalue_impl* impl;
|
||||
icalerror_check_arg_rv( (value!=0),"value");
|
||||
icalerror_check_arg_rv( (v!=0),"v");
|
||||
|
||||
icalerror_check_value_type(value, ICAL_TEXT_VALUE);
|
||||
impl = (struct icalvalue_impl*)value;
|
||||
if(impl->data.v_string!=0) {free((void*)impl->data.v_string);}
|
||||
|
||||
|
||||
impl->data.v_string = icalmemory_strdup(v);
|
||||
|
||||
if (impl->data.v_string == 0){
|
||||
errno = ENOMEM;
|
||||
}
|
||||
|
||||
|
||||
icalvalue_reset_kind(impl);
|
||||
}
|
||||
const char* icalvalue_get_text(icalvalue* value) {
|
||||
|
||||
icalerror_check_arg( (value!=0),"value");
|
||||
icalerror_check_value_type(value, ICAL_TEXT_VALUE);
|
||||
return ((struct icalvalue_impl*)value)->data.v_string;
|
||||
}
|
||||
|
||||
|
||||
|
||||
icalvalue* icalvalue_new_duration (struct icaldurationtype v){
|
||||
struct icalvalue_impl* impl = icalvalue_new_impl(ICAL_DURATION_VALUE);
|
||||
|
||||
icalvalue_set_duration((icalvalue*)impl,v);
|
||||
return (icalvalue*)impl;
|
||||
}
|
||||
void icalvalue_set_duration(icalvalue* value, struct icaldurationtype v) {
|
||||
struct icalvalue_impl* impl;
|
||||
icalerror_check_arg_rv( (value!=0),"value");
|
||||
|
||||
icalerror_check_value_type(value, ICAL_DURATION_VALUE);
|
||||
impl = (struct icalvalue_impl*)value;
|
||||
|
||||
|
||||
impl->data.v_duration = v;
|
||||
|
||||
icalvalue_reset_kind(impl);
|
||||
}
|
||||
struct icaldurationtype icalvalue_get_duration(icalvalue* value) {
|
||||
|
||||
icalerror_check_arg( (value!=0),"value");
|
||||
icalerror_check_value_type(value, ICAL_DURATION_VALUE);
|
||||
return ((struct icalvalue_impl*)value)->data.v_duration;
|
||||
}
|
||||
|
||||
|
||||
|
||||
icalvalue* icalvalue_new_integer (int v){
|
||||
struct icalvalue_impl* impl = icalvalue_new_impl(ICAL_INTEGER_VALUE);
|
||||
|
||||
icalvalue_set_integer((icalvalue*)impl,v);
|
||||
return (icalvalue*)impl;
|
||||
}
|
||||
void icalvalue_set_integer(icalvalue* value, int v) {
|
||||
struct icalvalue_impl* impl;
|
||||
icalerror_check_arg_rv( (value!=0),"value");
|
||||
|
||||
icalerror_check_value_type(value, ICAL_INTEGER_VALUE);
|
||||
impl = (struct icalvalue_impl*)value;
|
||||
|
||||
|
||||
impl->data.v_int = v;
|
||||
|
||||
icalvalue_reset_kind(impl);
|
||||
}
|
||||
int icalvalue_get_integer(icalvalue* value) {
|
||||
|
||||
icalerror_check_arg( (value!=0),"value");
|
||||
icalerror_check_value_type(value, ICAL_INTEGER_VALUE);
|
||||
return ((struct icalvalue_impl*)value)->data.v_int;
|
||||
}
|
||||
|
||||
|
||||
|
||||
icalvalue* icalvalue_new_uri (const char* v){
|
||||
struct icalvalue_impl* impl = icalvalue_new_impl(ICAL_URI_VALUE);
|
||||
icalerror_check_arg_rz( (v!=0),"v");
|
||||
|
||||
icalvalue_set_uri((icalvalue*)impl,v);
|
||||
return (icalvalue*)impl;
|
||||
}
|
||||
void icalvalue_set_uri(icalvalue* value, const char* v) {
|
||||
struct icalvalue_impl* impl;
|
||||
icalerror_check_arg_rv( (value!=0),"value");
|
||||
icalerror_check_arg_rv( (v!=0),"v");
|
||||
|
||||
icalerror_check_value_type(value, ICAL_URI_VALUE);
|
||||
impl = (struct icalvalue_impl*)value;
|
||||
if(impl->data.v_string!=0) {free((void*)impl->data.v_string);}
|
||||
|
||||
|
||||
impl->data.v_string = icalmemory_strdup(v);
|
||||
|
||||
if (impl->data.v_string == 0){
|
||||
errno = ENOMEM;
|
||||
}
|
||||
|
||||
|
||||
icalvalue_reset_kind(impl);
|
||||
}
|
||||
const char* icalvalue_get_uri(icalvalue* value) {
|
||||
|
||||
icalerror_check_arg( (value!=0),"value");
|
||||
icalerror_check_value_type(value, ICAL_URI_VALUE);
|
||||
return ((struct icalvalue_impl*)value)->data.v_string;
|
||||
}
|
||||
|
||||
|
||||
|
||||
icalvalue* icalvalue_new_attach (struct icalattachtype v){
|
||||
struct icalvalue_impl* impl = icalvalue_new_impl(ICAL_ATTACH_VALUE);
|
||||
|
||||
icalvalue_set_attach((icalvalue*)impl,v);
|
||||
return (icalvalue*)impl;
|
||||
}
|
||||
void icalvalue_set_attach(icalvalue* value, struct icalattachtype v) {
|
||||
struct icalvalue_impl* impl;
|
||||
icalerror_check_arg_rv( (value!=0),"value");
|
||||
|
||||
icalerror_check_value_type(value, ICAL_ATTACH_VALUE);
|
||||
impl = (struct icalvalue_impl*)value;
|
||||
|
||||
|
||||
impl->data.v_attach = v;
|
||||
|
||||
icalvalue_reset_kind(impl);
|
||||
}
|
||||
struct icalattachtype icalvalue_get_attach(icalvalue* value) {
|
||||
|
||||
icalerror_check_arg( (value!=0),"value");
|
||||
icalerror_check_value_type(value, ICAL_ATTACH_VALUE);
|
||||
return ((struct icalvalue_impl*)value)->data.v_attach;
|
||||
}
|
||||
|
||||
|
||||
|
||||
icalvalue* icalvalue_new_class (enum icalproperty_class v){
|
||||
struct icalvalue_impl* impl = icalvalue_new_impl(ICAL_CLASS_VALUE);
|
||||
|
||||
icalvalue_set_class((icalvalue*)impl,v);
|
||||
return (icalvalue*)impl;
|
||||
}
|
||||
void icalvalue_set_class(icalvalue* value, enum icalproperty_class v) {
|
||||
struct icalvalue_impl* impl;
|
||||
icalerror_check_arg_rv( (value!=0),"value");
|
||||
|
||||
icalerror_check_value_type(value, ICAL_CLASS_VALUE);
|
||||
impl = (struct icalvalue_impl*)value;
|
||||
|
||||
|
||||
impl->data.v_enum = v;
|
||||
|
||||
icalvalue_reset_kind(impl);
|
||||
}
|
||||
enum icalproperty_class icalvalue_get_class(icalvalue* value) {
|
||||
|
||||
icalerror_check_arg( (value!=0),"value");
|
||||
icalerror_check_value_type(value, ICAL_CLASS_VALUE);
|
||||
return ((struct icalvalue_impl*)value)->data.v_enum;
|
||||
}
|
||||
|
||||
|
||||
|
||||
icalvalue* icalvalue_new_float (float v){
|
||||
struct icalvalue_impl* impl = icalvalue_new_impl(ICAL_FLOAT_VALUE);
|
||||
|
||||
icalvalue_set_float((icalvalue*)impl,v);
|
||||
return (icalvalue*)impl;
|
||||
}
|
||||
void icalvalue_set_float(icalvalue* value, float v) {
|
||||
struct icalvalue_impl* impl;
|
||||
icalerror_check_arg_rv( (value!=0),"value");
|
||||
|
||||
icalerror_check_value_type(value, ICAL_FLOAT_VALUE);
|
||||
impl = (struct icalvalue_impl*)value;
|
||||
|
||||
|
||||
impl->data.v_float = v;
|
||||
|
||||
icalvalue_reset_kind(impl);
|
||||
}
|
||||
float icalvalue_get_float(icalvalue* value) {
|
||||
|
||||
icalerror_check_arg( (value!=0),"value");
|
||||
icalerror_check_value_type(value, ICAL_FLOAT_VALUE);
|
||||
return ((struct icalvalue_impl*)value)->data.v_float;
|
||||
}
|
||||
|
||||
|
||||
|
||||
icalvalue* icalvalue_new_query (const char* v){
|
||||
struct icalvalue_impl* impl = icalvalue_new_impl(ICAL_QUERY_VALUE);
|
||||
icalerror_check_arg_rz( (v!=0),"v");
|
||||
|
||||
icalvalue_set_query((icalvalue*)impl,v);
|
||||
return (icalvalue*)impl;
|
||||
}
|
||||
void icalvalue_set_query(icalvalue* value, const char* v) {
|
||||
struct icalvalue_impl* impl;
|
||||
icalerror_check_arg_rv( (value!=0),"value");
|
||||
icalerror_check_arg_rv( (v!=0),"v");
|
||||
|
||||
icalerror_check_value_type(value, ICAL_QUERY_VALUE);
|
||||
impl = (struct icalvalue_impl*)value;
|
||||
if(impl->data.v_string!=0) {free((void*)impl->data.v_string);}
|
||||
|
||||
|
||||
impl->data.v_string = icalmemory_strdup(v);
|
||||
|
||||
if (impl->data.v_string == 0){
|
||||
errno = ENOMEM;
|
||||
}
|
||||
|
||||
|
||||
icalvalue_reset_kind(impl);
|
||||
}
|
||||
const char* icalvalue_get_query(icalvalue* value) {
|
||||
|
||||
icalerror_check_arg( (value!=0),"value");
|
||||
icalerror_check_value_type(value, ICAL_QUERY_VALUE);
|
||||
return ((struct icalvalue_impl*)value)->data.v_string;
|
||||
}
|
||||
|
||||
|
||||
|
||||
icalvalue* icalvalue_new_string (const char* v){
|
||||
struct icalvalue_impl* impl = icalvalue_new_impl(ICAL_STRING_VALUE);
|
||||
icalerror_check_arg_rz( (v!=0),"v");
|
||||
|
||||
icalvalue_set_string((icalvalue*)impl,v);
|
||||
return (icalvalue*)impl;
|
||||
}
|
||||
void icalvalue_set_string(icalvalue* value, const char* v) {
|
||||
struct icalvalue_impl* impl;
|
||||
icalerror_check_arg_rv( (value!=0),"value");
|
||||
icalerror_check_arg_rv( (v!=0),"v");
|
||||
|
||||
icalerror_check_value_type(value, ICAL_STRING_VALUE);
|
||||
impl = (struct icalvalue_impl*)value;
|
||||
if(impl->data.v_string!=0) {free((void*)impl->data.v_string);}
|
||||
|
||||
|
||||
impl->data.v_string = icalmemory_strdup(v);
|
||||
|
||||
if (impl->data.v_string == 0){
|
||||
errno = ENOMEM;
|
||||
}
|
||||
|
||||
|
||||
icalvalue_reset_kind(impl);
|
||||
}
|
||||
const char* icalvalue_get_string(icalvalue* value) {
|
||||
|
||||
icalerror_check_arg( (value!=0),"value");
|
||||
icalerror_check_value_type(value, ICAL_STRING_VALUE);
|
||||
return ((struct icalvalue_impl*)value)->data.v_string;
|
||||
}
|
||||
|
||||
|
||||
|
||||
icalvalue* icalvalue_new_transp (enum icalproperty_transp v){
|
||||
struct icalvalue_impl* impl = icalvalue_new_impl(ICAL_TRANSP_VALUE);
|
||||
|
||||
icalvalue_set_transp((icalvalue*)impl,v);
|
||||
return (icalvalue*)impl;
|
||||
}
|
||||
void icalvalue_set_transp(icalvalue* value, enum icalproperty_transp v) {
|
||||
struct icalvalue_impl* impl;
|
||||
icalerror_check_arg_rv( (value!=0),"value");
|
||||
|
||||
icalerror_check_value_type(value, ICAL_TRANSP_VALUE);
|
||||
impl = (struct icalvalue_impl*)value;
|
||||
|
||||
|
||||
impl->data.v_enum = v;
|
||||
|
||||
icalvalue_reset_kind(impl);
|
||||
}
|
||||
enum icalproperty_transp icalvalue_get_transp(icalvalue* value) {
|
||||
|
||||
icalerror_check_arg( (value!=0),"value");
|
||||
icalerror_check_value_type(value, ICAL_TRANSP_VALUE);
|
||||
return ((struct icalvalue_impl*)value)->data.v_enum;
|
||||
}
|
||||
|
||||
|
||||
|
||||
icalvalue* icalvalue_new_datetime (struct icaltimetype v){
|
||||
struct icalvalue_impl* impl = icalvalue_new_impl(ICAL_DATETIME_VALUE);
|
||||
|
||||
icalvalue_set_datetime((icalvalue*)impl,v);
|
||||
return (icalvalue*)impl;
|
||||
}
|
||||
void icalvalue_set_datetime(icalvalue* value, struct icaltimetype v) {
|
||||
struct icalvalue_impl* impl;
|
||||
icalerror_check_arg_rv( (value!=0),"value");
|
||||
|
||||
icalerror_check_value_type(value, ICAL_DATETIME_VALUE);
|
||||
impl = (struct icalvalue_impl*)value;
|
||||
|
||||
|
||||
impl->data.v_time = v;
|
||||
|
||||
icalvalue_reset_kind(impl);
|
||||
}
|
||||
struct icaltimetype icalvalue_get_datetime(icalvalue* value) {
|
||||
|
||||
icalerror_check_arg( (value!=0),"value");
|
||||
icalerror_check_value_type(value, ICAL_DATETIME_VALUE);
|
||||
return ((struct icalvalue_impl*)value)->data.v_time;
|
||||
}
|
||||
|
||||
|
||||
|
||||
icalvalue* icalvalue_new_requeststatus (struct icalreqstattype v){
|
||||
struct icalvalue_impl* impl = icalvalue_new_impl(ICAL_REQUESTSTATUS_VALUE);
|
||||
|
||||
icalvalue_set_requeststatus((icalvalue*)impl,v);
|
||||
return (icalvalue*)impl;
|
||||
}
|
||||
void icalvalue_set_requeststatus(icalvalue* value, struct icalreqstattype v) {
|
||||
struct icalvalue_impl* impl;
|
||||
icalerror_check_arg_rv( (value!=0),"value");
|
||||
|
||||
icalerror_check_value_type(value, ICAL_REQUESTSTATUS_VALUE);
|
||||
impl = (struct icalvalue_impl*)value;
|
||||
|
||||
|
||||
impl->data.v_requeststatus = v;
|
||||
|
||||
icalvalue_reset_kind(impl);
|
||||
}
|
||||
struct icalreqstattype icalvalue_get_requeststatus(icalvalue* value) {
|
||||
|
||||
icalerror_check_arg( (value!=0),"value");
|
||||
icalerror_check_value_type(value, ICAL_REQUESTSTATUS_VALUE);
|
||||
return ((struct icalvalue_impl*)value)->data.v_requeststatus;
|
||||
}
|
||||
|
||||
|
||||
|
||||
icalvalue* icalvalue_new_geo (struct icalgeotype v){
|
||||
struct icalvalue_impl* impl = icalvalue_new_impl(ICAL_GEO_VALUE);
|
||||
|
||||
icalvalue_set_geo((icalvalue*)impl,v);
|
||||
return (icalvalue*)impl;
|
||||
}
|
||||
void icalvalue_set_geo(icalvalue* value, struct icalgeotype v) {
|
||||
struct icalvalue_impl* impl;
|
||||
icalerror_check_arg_rv( (value!=0),"value");
|
||||
|
||||
icalerror_check_value_type(value, ICAL_GEO_VALUE);
|
||||
impl = (struct icalvalue_impl*)value;
|
||||
|
||||
|
||||
impl->data.v_geo = v;
|
||||
|
||||
icalvalue_reset_kind(impl);
|
||||
}
|
||||
struct icalgeotype icalvalue_get_geo(icalvalue* value) {
|
||||
|
||||
icalerror_check_arg( (value!=0),"value");
|
||||
icalerror_check_value_type(value, ICAL_GEO_VALUE);
|
||||
return ((struct icalvalue_impl*)value)->data.v_geo;
|
||||
}
|
||||
|
||||
|
||||
|
||||
icalvalue* icalvalue_new_date (struct icaltimetype v){
|
||||
struct icalvalue_impl* impl = icalvalue_new_impl(ICAL_DATE_VALUE);
|
||||
|
||||
icalvalue_set_date((icalvalue*)impl,v);
|
||||
return (icalvalue*)impl;
|
||||
}
|
||||
void icalvalue_set_date(icalvalue* value, struct icaltimetype v) {
|
||||
struct icalvalue_impl* impl;
|
||||
icalerror_check_arg_rv( (value!=0),"value");
|
||||
|
||||
icalerror_check_value_type(value, ICAL_DATE_VALUE);
|
||||
impl = (struct icalvalue_impl*)value;
|
||||
|
||||
|
||||
impl->data.v_time = v;
|
||||
|
||||
icalvalue_reset_kind(impl);
|
||||
}
|
||||
struct icaltimetype icalvalue_get_date(icalvalue* value) {
|
||||
|
||||
icalerror_check_arg( (value!=0),"value");
|
||||
icalerror_check_value_type(value, ICAL_DATE_VALUE);
|
||||
return ((struct icalvalue_impl*)value)->data.v_time;
|
||||
}
|
||||
|
||||
|
||||
|
||||
icalvalue* icalvalue_new_action (enum icalproperty_action v){
|
||||
struct icalvalue_impl* impl = icalvalue_new_impl(ICAL_ACTION_VALUE);
|
||||
|
||||
icalvalue_set_action((icalvalue*)impl,v);
|
||||
return (icalvalue*)impl;
|
||||
}
|
||||
void icalvalue_set_action(icalvalue* value, enum icalproperty_action v) {
|
||||
struct icalvalue_impl* impl;
|
||||
icalerror_check_arg_rv( (value!=0),"value");
|
||||
|
||||
icalerror_check_value_type(value, ICAL_ACTION_VALUE);
|
||||
impl = (struct icalvalue_impl*)value;
|
||||
|
||||
|
||||
impl->data.v_enum = v;
|
||||
|
||||
icalvalue_reset_kind(impl);
|
||||
}
|
||||
enum icalproperty_action icalvalue_get_action(icalvalue* value) {
|
||||
|
||||
icalerror_check_arg( (value!=0),"value");
|
||||
icalerror_check_value_type(value, ICAL_ACTION_VALUE);
|
||||
return ((struct icalvalue_impl*)value)->data.v_enum;
|
||||
}
|
@ -1,324 +0,0 @@
|
||||
/* -*- Mode: C -*- */
|
||||
/*======================================================================
|
||||
FILE: icalvalue.h
|
||||
CREATOR: eric 20 March 1999
|
||||
|
||||
|
||||
$Id: icalderivedvalue.h,v 1.1 2001/12/21 19:21:43 mikep%oeone.com Exp $
|
||||
$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 ICALDERIVEDVALUE_H
|
||||
#define ICALDERIVEDVALUE_H
|
||||
|
||||
#include "icaltypes.h"
|
||||
#include "icalrecur.h"
|
||||
#include "icaltime.h"
|
||||
#include "icalduration.h"
|
||||
#include "icalperiod.h"
|
||||
|
||||
typedef void icalvalue;
|
||||
|
||||
|
||||
|
||||
void icalvalue_set_x(icalvalue* value, const char* v);
|
||||
icalvalue* icalvalue_new_x(const char* v);
|
||||
const char* icalvalue_get_x(icalvalue* value);
|
||||
|
||||
icalvalue* icalvalue_new_recur (struct icalrecurrencetype v);
|
||||
void icalvalue_set_recur(icalvalue* value, struct icalrecurrencetype v);
|
||||
struct icalrecurrencetype icalvalue_get_recur(icalvalue* value);
|
||||
|
||||
icalvalue* icalvalue_new_trigger (struct icaltriggertype v);
|
||||
void icalvalue_set_trigger(icalvalue* value, struct icaltriggertype v);
|
||||
struct icaltriggertype icalvalue_get_trigger(icalvalue* value);
|
||||
|
||||
icalvalue* icalvalue_new_datetimeperiod (struct icaldatetimeperiodtype v);
|
||||
void icalvalue_set_datetimeperiod(icalvalue* value, struct icaldatetimeperiodtype v);
|
||||
struct icaldatetimeperiodtype icalvalue_get_datetimeperiod(icalvalue* value);
|
||||
|
||||
void icalvalue_reset_kind(icalvalue* value);
|
||||
|
||||
/* Everything below this line is machine generated. Do not edit. */
|
||||
typedef enum icalvalue_kind {
|
||||
ICAL_ANY_VALUE=5000,
|
||||
ICAL_BOOLEAN_VALUE=5001,
|
||||
ICAL_UTCOFFSET_VALUE=5002,
|
||||
ICAL_XLICCLASS_VALUE=5003,
|
||||
ICAL_RECUR_VALUE=5004,
|
||||
ICAL_METHOD_VALUE=5005,
|
||||
ICAL_CALADDRESS_VALUE=5006,
|
||||
ICAL_PERIOD_VALUE=5007,
|
||||
ICAL_STATUS_VALUE=5008,
|
||||
ICAL_BINARY_VALUE=5009,
|
||||
ICAL_TEXT_VALUE=5010,
|
||||
ICAL_DURATION_VALUE=5011,
|
||||
ICAL_DATETIMEPERIOD_VALUE=5012,
|
||||
ICAL_INTEGER_VALUE=5013,
|
||||
ICAL_URI_VALUE=5014,
|
||||
ICAL_TRIGGER_VALUE=5015,
|
||||
ICAL_ATTACH_VALUE=5016,
|
||||
ICAL_CLASS_VALUE=5017,
|
||||
ICAL_FLOAT_VALUE=5018,
|
||||
ICAL_QUERY_VALUE=5019,
|
||||
ICAL_STRING_VALUE=5020,
|
||||
ICAL_TRANSP_VALUE=5021,
|
||||
ICAL_X_VALUE=5022,
|
||||
ICAL_DATETIME_VALUE=5023,
|
||||
ICAL_REQUESTSTATUS_VALUE=5024,
|
||||
ICAL_GEO_VALUE=5025,
|
||||
ICAL_DATE_VALUE=5026,
|
||||
ICAL_ACTION_VALUE=5027,
|
||||
ICAL_NO_VALUE=5028
|
||||
} icalvalue_kind ;
|
||||
|
||||
#define ICALPROPERTY_FIRST_ENUM 10000
|
||||
|
||||
typedef enum icalproperty_action {
|
||||
ICAL_ACTION_X = 10000,
|
||||
ICAL_ACTION_AUDIO = 10001,
|
||||
ICAL_ACTION_DISPLAY = 10002,
|
||||
ICAL_ACTION_EMAIL = 10003,
|
||||
ICAL_ACTION_PROCEDURE = 10004,
|
||||
ICAL_ACTION_NONE = 10005
|
||||
} icalproperty_action;
|
||||
|
||||
typedef enum icalproperty_class {
|
||||
ICAL_CLASS_X = 10006,
|
||||
ICAL_CLASS_PUBLIC = 10007,
|
||||
ICAL_CLASS_PRIVATE = 10008,
|
||||
ICAL_CLASS_CONFIDENTIAL = 10009,
|
||||
ICAL_CLASS_NONE = 10010
|
||||
} icalproperty_class;
|
||||
|
||||
typedef enum icalproperty_method {
|
||||
ICAL_METHOD_X = 10011,
|
||||
ICAL_METHOD_PUBLISH = 10012,
|
||||
ICAL_METHOD_REQUEST = 10013,
|
||||
ICAL_METHOD_REPLY = 10014,
|
||||
ICAL_METHOD_ADD = 10015,
|
||||
ICAL_METHOD_CANCEL = 10016,
|
||||
ICAL_METHOD_REFRESH = 10017,
|
||||
ICAL_METHOD_COUNTER = 10018,
|
||||
ICAL_METHOD_DECLINECOUNTER = 10019,
|
||||
ICAL_METHOD_CREATE = 10020,
|
||||
ICAL_METHOD_READ = 10021,
|
||||
ICAL_METHOD_RESPONSE = 10022,
|
||||
ICAL_METHOD_MOVE = 10023,
|
||||
ICAL_METHOD_MODIFY = 10024,
|
||||
ICAL_METHOD_GENERATEUID = 10025,
|
||||
ICAL_METHOD_DELETE = 10026,
|
||||
ICAL_METHOD_NONE = 10027
|
||||
} icalproperty_method;
|
||||
|
||||
typedef enum icalproperty_status {
|
||||
ICAL_STATUS_X = 10028,
|
||||
ICAL_STATUS_TENTATIVE = 10029,
|
||||
ICAL_STATUS_CONFIRMED = 10030,
|
||||
ICAL_STATUS_COMPLETED = 10031,
|
||||
ICAL_STATUS_NEEDSACTION = 10032,
|
||||
ICAL_STATUS_CANCELLED = 10033,
|
||||
ICAL_STATUS_INPROCESS = 10034,
|
||||
ICAL_STATUS_DRAFT = 10035,
|
||||
ICAL_STATUS_FINAL = 10036,
|
||||
ICAL_STATUS_NONE = 10037
|
||||
} icalproperty_status;
|
||||
|
||||
typedef enum icalproperty_transp {
|
||||
ICAL_TRANSP_X = 10038,
|
||||
ICAL_TRANSP_OPAQUE = 10039,
|
||||
ICAL_TRANSP_TRANSPARENT = 10040,
|
||||
ICAL_TRANSP_NONE = 10041
|
||||
} icalproperty_transp;
|
||||
|
||||
typedef enum icalproperty_xlicclass {
|
||||
ICAL_XLICCLASS_X = 10042,
|
||||
ICAL_XLICCLASS_PUBLISHNEW = 10043,
|
||||
ICAL_XLICCLASS_PUBLISHUPDATE = 10044,
|
||||
ICAL_XLICCLASS_PUBLISHFREEBUSY = 10045,
|
||||
ICAL_XLICCLASS_REQUESTNEW = 10046,
|
||||
ICAL_XLICCLASS_REQUESTUPDATE = 10047,
|
||||
ICAL_XLICCLASS_REQUESTRESCHEDULE = 10048,
|
||||
ICAL_XLICCLASS_REQUESTDELEGATE = 10049,
|
||||
ICAL_XLICCLASS_REQUESTNEWORGANIZER = 10050,
|
||||
ICAL_XLICCLASS_REQUESTFORWARD = 10051,
|
||||
ICAL_XLICCLASS_REQUESTSTATUS = 10052,
|
||||
ICAL_XLICCLASS_REQUESTFREEBUSY = 10053,
|
||||
ICAL_XLICCLASS_REPLYACCEPT = 10054,
|
||||
ICAL_XLICCLASS_REPLYDECLINE = 10055,
|
||||
ICAL_XLICCLASS_REPLYDELEGATE = 10056,
|
||||
ICAL_XLICCLASS_REPLYCRASHERACCEPT = 10057,
|
||||
ICAL_XLICCLASS_REPLYCRASHERDECLINE = 10058,
|
||||
ICAL_XLICCLASS_ADDINSTANCE = 10059,
|
||||
ICAL_XLICCLASS_CANCELEVENT = 10060,
|
||||
ICAL_XLICCLASS_CANCELINSTANCE = 10061,
|
||||
ICAL_XLICCLASS_CANCELALL = 10062,
|
||||
ICAL_XLICCLASS_REFRESH = 10063,
|
||||
ICAL_XLICCLASS_COUNTER = 10064,
|
||||
ICAL_XLICCLASS_DECLINECOUNTER = 10065,
|
||||
ICAL_XLICCLASS_MALFORMED = 10066,
|
||||
ICAL_XLICCLASS_OBSOLETE = 10067,
|
||||
ICAL_XLICCLASS_MISSEQUENCED = 10068,
|
||||
ICAL_XLICCLASS_UNKNOWN = 10069,
|
||||
ICAL_XLICCLASS_NONE = 10070
|
||||
} icalproperty_xlicclass;
|
||||
|
||||
#define ICALPROPERTY_LAST_ENUM 10071
|
||||
|
||||
|
||||
/* BOOLEAN */
|
||||
icalvalue* icalvalue_new_boolean(int v);
|
||||
int icalvalue_get_boolean(icalvalue* value);
|
||||
void icalvalue_set_boolean(icalvalue* value, int v);
|
||||
|
||||
|
||||
/* UTC-OFFSET */
|
||||
icalvalue* icalvalue_new_utcoffset(int v);
|
||||
int icalvalue_get_utcoffset(icalvalue* value);
|
||||
void icalvalue_set_utcoffset(icalvalue* value, int v);
|
||||
|
||||
|
||||
/* X-LIC-CLASS */
|
||||
icalvalue* icalvalue_new_xlicclass(enum icalproperty_xlicclass v);
|
||||
enum icalproperty_xlicclass icalvalue_get_xlicclass(icalvalue* value);
|
||||
void icalvalue_set_xlicclass(icalvalue* value, enum icalproperty_xlicclass v);
|
||||
|
||||
|
||||
/* METHOD */
|
||||
icalvalue* icalvalue_new_method(enum icalproperty_method v);
|
||||
enum icalproperty_method icalvalue_get_method(icalvalue* value);
|
||||
void icalvalue_set_method(icalvalue* value, enum icalproperty_method 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);
|
||||
|
||||
|
||||
/* PERIOD */
|
||||
icalvalue* icalvalue_new_period(struct icalperiodtype v);
|
||||
struct icalperiodtype icalvalue_get_period(icalvalue* value);
|
||||
void icalvalue_set_period(icalvalue* value, struct icalperiodtype v);
|
||||
|
||||
|
||||
/* STATUS */
|
||||
icalvalue* icalvalue_new_status(enum icalproperty_status v);
|
||||
enum icalproperty_status icalvalue_get_status(icalvalue* value);
|
||||
void icalvalue_set_status(icalvalue* value, enum icalproperty_status 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);
|
||||
|
||||
|
||||
/* TEXT */
|
||||
icalvalue* icalvalue_new_text(const char* v);
|
||||
const char* icalvalue_get_text(icalvalue* value);
|
||||
void icalvalue_set_text(icalvalue* value, const char* 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);
|
||||
|
||||
|
||||
/* INTEGER */
|
||||
icalvalue* icalvalue_new_integer(int v);
|
||||
int icalvalue_get_integer(icalvalue* value);
|
||||
void icalvalue_set_integer(icalvalue* value, int 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);
|
||||
|
||||
|
||||
/* ATTACH */
|
||||
icalvalue* icalvalue_new_attach(struct icalattachtype v);
|
||||
struct icalattachtype icalvalue_get_attach(icalvalue* value);
|
||||
void icalvalue_set_attach(icalvalue* value, struct icalattachtype v);
|
||||
|
||||
|
||||
/* CLASS */
|
||||
icalvalue* icalvalue_new_class(enum icalproperty_class v);
|
||||
enum icalproperty_class icalvalue_get_class(icalvalue* value);
|
||||
void icalvalue_set_class(icalvalue* value, enum icalproperty_class v);
|
||||
|
||||
|
||||
/* FLOAT */
|
||||
icalvalue* icalvalue_new_float(float v);
|
||||
float icalvalue_get_float(icalvalue* value);
|
||||
void icalvalue_set_float(icalvalue* value, float 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);
|
||||
|
||||
|
||||
/* STRING */
|
||||
icalvalue* icalvalue_new_string(const char* v);
|
||||
const char* icalvalue_get_string(icalvalue* value);
|
||||
void icalvalue_set_string(icalvalue* value, const char* v);
|
||||
|
||||
|
||||
/* TRANSP */
|
||||
icalvalue* icalvalue_new_transp(enum icalproperty_transp v);
|
||||
enum icalproperty_transp icalvalue_get_transp(icalvalue* value);
|
||||
void icalvalue_set_transp(icalvalue* value, enum icalproperty_transp 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);
|
||||
|
||||
|
||||
/* REQUEST-STATUS */
|
||||
icalvalue* icalvalue_new_requeststatus(struct icalreqstattype v);
|
||||
struct icalreqstattype icalvalue_get_requeststatus(icalvalue* value);
|
||||
void icalvalue_set_requeststatus(icalvalue* value, struct icalreqstattype v);
|
||||
|
||||
|
||||
/* GEO */
|
||||
icalvalue* icalvalue_new_geo(struct icalgeotype v);
|
||||
struct icalgeotype icalvalue_get_geo(icalvalue* value);
|
||||
void icalvalue_set_geo(icalvalue* value, struct icalgeotype 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);
|
||||
|
||||
|
||||
/* ACTION */
|
||||
icalvalue* icalvalue_new_action(enum icalproperty_action v);
|
||||
enum icalproperty_action icalvalue_get_action(icalvalue* value);
|
||||
void icalvalue_set_action(icalvalue* value, enum icalproperty_action v);
|
||||
|
||||
#endif /*ICALVALUE_H*/
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@ -1,7 +0,0 @@
|
||||
#ifndef ICAL_VERSION_H
|
||||
#define ICAL_VERSION_H
|
||||
|
||||
#define ICAL_PACKAGE "libical"
|
||||
#define ICAL_VERSION "0.23a"
|
||||
|
||||
#endif
|
File diff suppressed because it is too large
Load Diff
@ -1,137 +0,0 @@
|
||||
typedef union {
|
||||
float v_float;
|
||||
int v_int;
|
||||
char* v_string;
|
||||
} YYSTYPE;
|
||||
#define DIGITS 257
|
||||
#define INTNUMBER 258
|
||||
#define FLOATNUMBER 259
|
||||
#define STRING 260
|
||||
#define EOL 261
|
||||
#define EQUALS 262
|
||||
#define CHARACTER 263
|
||||
#define COLON 264
|
||||
#define COMMA 265
|
||||
#define SEMICOLON 266
|
||||
#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 ical_yylval;
|
@ -1,175 +0,0 @@
|
||||
/*
|
||||
* Copyright (c) 1986-2000, Hiram Clawson
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or
|
||||
* without modification, are permitted provided that the following
|
||||
* conditions are met:
|
||||
*
|
||||
* Redistributions of source code must retain the above
|
||||
* copyright notice, this list of conditions and the
|
||||
* following disclaimer.
|
||||
*
|
||||
* Redistributions in binary form must reproduce the
|
||||
* above copyright notice, this list of conditions and
|
||||
* the following disclaimer in the documentation and/or
|
||||
* other materials provided with the distribution.
|
||||
*
|
||||
* Neither name of The Museum of Hiram nor the names of
|
||||
* its contributors may be used to endorse or promote products
|
||||
* derived from this software without specific prior
|
||||
* written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND
|
||||
* CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
|
||||
* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||
* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
|
||||
* IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
|
||||
* INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
||||
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
|
||||
* STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
|
||||
* IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
|
||||
* THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
/*
|
||||
* caldat computes the day of the week, the day of the year
|
||||
* the gregorian (or julian) calendar date and the universal
|
||||
* time from the julian decimal date.
|
||||
* for astronomical purposes, The Gregorian calendar reform occurred
|
||||
* on 15 Oct. 1582. This is 05 Oct 1582 by the julian calendar.
|
||||
|
||||
* Input: a ut_instant structure pointer, where the j_date element
|
||||
* has been set. ( = 0 for 01 Jan 4713 B.C. 12 HR UT )
|
||||
*
|
||||
* output: will set all the other elements of the structure.
|
||||
* As a convienence, the function will also return the year.
|
||||
*
|
||||
* Reference: Astronomial formulae for calculators, meeus, p 23
|
||||
* from fortran program by F. Espenak - April 1982 Page 277,
|
||||
* 50 Year canon of solar eclipses: 1986-2035
|
||||
*
|
||||
*/
|
||||
|
||||
#include "astime.h" /* time structures */
|
||||
|
||||
long caldat( date )
|
||||
struct ut_instant * date;
|
||||
{
|
||||
double frac;
|
||||
long jd;
|
||||
long ka;
|
||||
long kb;
|
||||
long kc;
|
||||
long kd;
|
||||
long ke;
|
||||
long ialp;
|
||||
|
||||
jd = (long) (date->j_date + 0.5); /* integer julian date */
|
||||
frac = date->j_date + 0.5 - (double) jd + 1.0e-10; /* day fraction */
|
||||
ka = (long) jd;
|
||||
if ( jd >= 2299161L )
|
||||
{
|
||||
ialp = ( (double) jd - 1867216.25 ) / ( 36524.25 );
|
||||
ka = jd + 1L + ialp - ( ialp >> 2 );
|
||||
}
|
||||
kb = ka + 1524L;
|
||||
kc = ( (double) kb - 122.1 ) / 365.25;
|
||||
kd = (double) kc * 365.25;
|
||||
ke = (double) ( kb - kd ) / 30.6001;
|
||||
date->day = kb - kd - ((long) ( (double) ke * 30.6001 ));
|
||||
if ( ke > 13L )
|
||||
date->month = ke - 13L;
|
||||
else
|
||||
date->month = ke - 1L;
|
||||
if ( (date->month == 2) && (date->day > 28) )
|
||||
date->day = 29;
|
||||
if ( (date->month == 2) && (date->day == 29) && (ke == 3L) )
|
||||
date->year = kc - 4716L;
|
||||
else if ( date->month > 2 )
|
||||
date->year = kc - 4716L;
|
||||
else
|
||||
date->year = kc - 4715L;
|
||||
date->i_hour = date->d_hour = frac * 24.0; /* hour */
|
||||
date->i_minute = date->d_minute =
|
||||
( date->d_hour - (double) date->i_hour ) * 60.0; /* minute */
|
||||
date->i_second = date->d_second =
|
||||
( date->d_minute - (double) date->i_minute ) * 60.0;/* second */
|
||||
date->weekday = (jd + 1L) % 7L; /* day of week */
|
||||
if ( date->year == ((date->year >> 2) << 2) )
|
||||
date->day_of_year =
|
||||
( ( 275 * date->month ) / 9)
|
||||
- ((date->month + 9) / 12)
|
||||
+ date->day - 30;
|
||||
else
|
||||
date->day_of_year =
|
||||
( ( 275 * date->month ) / 9)
|
||||
- (((date->month + 9) / 12) << 1)
|
||||
+ date->day - 30;
|
||||
return( date->year );
|
||||
} /* end of long caldat( date ) */
|
||||
|
||||
/*
|
||||
* juldat computes the julian decimal date (j_date) from
|
||||
* the gregorian (or Julian) calendar date.
|
||||
* for astronomical purposes, The Gregorian calendar reform occurred
|
||||
* on 15 Oct. 1582. This is 05 Oct 1582 by the julian calendar.
|
||||
* Input: a ut_instant structure pointer where Day, Month, Year and
|
||||
* i_hour, i_minute, d_second have been set for the date
|
||||
* in question.
|
||||
*
|
||||
* Output: the j_date and weekday elements of the structure will be set.
|
||||
* Also, the return value of the function will be the j_date too.
|
||||
*
|
||||
* Reference: Astronomial formulae for calculators, meeus, p 23
|
||||
* from fortran program by F. Espenak - April 1982 Page 276,
|
||||
* 50 Year canon of solar eclipses: 1986-2035
|
||||
*/
|
||||
|
||||
double juldat( date )
|
||||
struct ut_instant * date;
|
||||
{
|
||||
double frac, gyr;
|
||||
long iy0, im0;
|
||||
long ia, ib;
|
||||
long jd;
|
||||
|
||||
/* decimal day fraction */
|
||||
frac = (( double)date->i_hour/ 24.0)
|
||||
+ ((double) date->i_minute / 1440.0)
|
||||
+ (date->d_second / 86400.0);
|
||||
/* convert date to format YYYY.MMDDdd */
|
||||
gyr = (double) date->year
|
||||
+ (0.01 * (double) date->month)
|
||||
+ (0.0001 * (double) date->day)
|
||||
+ (0.0001 * frac) + 1.0e-9;
|
||||
/* conversion factors */
|
||||
if ( date->month <= 2 )
|
||||
{
|
||||
iy0 = date->year - 1L;
|
||||
im0 = date->month + 12;
|
||||
}
|
||||
else
|
||||
{
|
||||
iy0 = date->year;
|
||||
im0 = date->month;
|
||||
}
|
||||
ia = iy0 / 100L;
|
||||
ib = 2L - ia + (ia >> 2);
|
||||
/* calculate julian date */
|
||||
if ( date->year < 0L )
|
||||
jd = (long) ((365.25 * (double) iy0) - 0.75)
|
||||
+ (long) (30.6001 * (im0 + 1L) )
|
||||
+ (long) date->day + 1720994L;
|
||||
else
|
||||
jd = (long) (365.25 * (double) iy0)
|
||||
+ (long) (30.6001 * (double) (im0 + 1L))
|
||||
+ (long) date->day + 1720994L;
|
||||
if ( gyr >= 1582.1015 ) /* on or after 15 October 1582 */
|
||||
jd += ib;
|
||||
date->j_date = (double) jd + frac + 0.5;
|
||||
jd = (long) (date->j_date + 0.5);
|
||||
date->weekday = (jd + 1L) % 7L;
|
||||
return( date->j_date );
|
||||
} /* end of double juldat( date ) */
|
@ -1,172 +0,0 @@
|
||||
LIBRARY "mozical"
|
||||
|
||||
DESCRIPTION '"""ical library"""'
|
||||
|
||||
EXETYPE NT
|
||||
|
||||
SUBSYSTEM WINDOWS
|
||||
|
||||
STUB 'WINSTUB.EXE'
|
||||
|
||||
VERSION 1.13
|
||||
|
||||
CODE EXECUTE READ
|
||||
|
||||
DATA READ WRITE
|
||||
|
||||
HEAPSIZE 1048576,4096
|
||||
|
||||
EXPORTS
|
||||
icalcomponent_get_first_property @1
|
||||
icalmemory_strdup @2
|
||||
icalcomponent_free @3
|
||||
icalcomponent_count_components @4
|
||||
icalcomponent_add_component @5
|
||||
icalcomponent_new_clone @6
|
||||
icalcomponent_new @7
|
||||
icalerrno @8
|
||||
icalcomponent_get_span @9
|
||||
icalerror_clear_errno @10
|
||||
icalproperty_get_attendee @11
|
||||
icalcomponent_get_next_property @12
|
||||
icalcomponent_get_first_real_component @13
|
||||
icalparameter_get_partstat @14
|
||||
icalproperty_get_first_parameter @15
|
||||
icalproperty_get_dtstamp @16
|
||||
icalproperty_get_recurrenceid @17
|
||||
icalproperty_get_uid @18
|
||||
icalproperty_get_sequence @19
|
||||
icalproperty_get_organizer @20
|
||||
icalcomponent_isa @21
|
||||
icalproperty_get_method @22
|
||||
icalproperty_as_ical_string @23
|
||||
icalerror_set_errno @24
|
||||
icaltime_compare @25
|
||||
icalreqstattype_from_string @26
|
||||
icalparser_free @27
|
||||
icalmemory_add_tmp_buffer @28
|
||||
icalerror_stop_here @29
|
||||
pvl_push @30
|
||||
pvl_pop @31
|
||||
pvl_newlist @32
|
||||
pvl_free @33
|
||||
pvl_data @34
|
||||
pvl_next @35
|
||||
icalcomponent_add_property @36
|
||||
icalproperty_new_uid @37
|
||||
icalvalue_get_datetime @38
|
||||
icalcomponent_get_next_component @39
|
||||
icalcomponent_get_first_component @40
|
||||
icalcompiter_deref @41
|
||||
icalcompiter_next @42
|
||||
icalcomponent_begin_component @43
|
||||
icalproperty_get_value @44
|
||||
icalcomponent_vanew @45
|
||||
icalproperty_vanew_uid @46
|
||||
icalparameter_new_xliccomparetype @47
|
||||
icalcomponent_is_valid @48
|
||||
pvl_head @49
|
||||
icalparser_parse @50
|
||||
icalparser_set_gen_data @51
|
||||
icalparser_new @52
|
||||
icalcomponent_as_ical_string @53
|
||||
icalcomponent_remove_component @54
|
||||
icalvalue_as_ical_string @55
|
||||
icalcomponent_get_current_component @56
|
||||
input_buffer_p @57
|
||||
input_buffer @58
|
||||
icalvalue_compare @59
|
||||
icalproperty_isa @60
|
||||
icalparameter_get_xliccomparetype @61
|
||||
icalvalue_free @62
|
||||
icalvalue_new_from_string @63
|
||||
icalproperty_kind_to_value_kind @64
|
||||
icalproperty_kind_to_string @65
|
||||
icalcomponent_kind_to_string @66
|
||||
icalproperty_new_clone @67
|
||||
icalproperty_new_prodid @68
|
||||
icalproperty_new_version @69
|
||||
icalproperty_new_comment @70
|
||||
icalcomponent_set_dtstamp @71
|
||||
icalproperty_new_dtstamp @72
|
||||
icaltime_from_timet @73
|
||||
icalproperty_set_parameter @74
|
||||
icalparameter_new_partstat @75
|
||||
icalcomponent_set_method @76
|
||||
icalparameter_new_delegatedto @77
|
||||
icalproperty_vanew_attendee @78
|
||||
icalparameter_new_delegatedfrom @79
|
||||
icalproperty_new_requeststatus @80
|
||||
pvl_tail @81
|
||||
pvl_insert_ordered @82
|
||||
icaltime_is_null_time @83
|
||||
icalcomponent_get_inner @84
|
||||
icalproperty_new_method @85
|
||||
icaltime_as_timet @86
|
||||
icaltime_null_time @87
|
||||
icalmemory_tmp_copy @88
|
||||
icalparser_flex_input @89
|
||||
icalparser_clear_flex_input @90
|
||||
icalproperty_string_to_kind @91
|
||||
icalcomponent_string_to_kind @92
|
||||
icalproperty_set_summary @93
|
||||
icalcomponent_new_vtodo @94
|
||||
icalproperty_new_percentcomplete @95
|
||||
icalproperty_new_due @96
|
||||
icalproperty_new_completed @97
|
||||
icalproperty_get_percentcomplete @98
|
||||
icalproperty_get_due @99
|
||||
icalproperty_get_completed @100
|
||||
icalcomponent_new_vcalendar @101
|
||||
icalcomponent_new_vevent @102
|
||||
icalproperty_new_summary @103
|
||||
icalproperty_new_description @104
|
||||
icalproperty_new_location @105
|
||||
icalproperty_new_categories @106
|
||||
icalproperty_new_url @107
|
||||
icalproperty_new_priority @108
|
||||
icalproperty_new_status @109
|
||||
icalproperty_new_class @110
|
||||
icalproperty_new_x @111
|
||||
icalproperty_set_x_name @112
|
||||
icalcomponent_new_valarm @113
|
||||
icalproperty_new_trigger @114
|
||||
icalparameter_new_member @115
|
||||
icalproperty_add_parameter @116
|
||||
icaltime_as_ical_string @117
|
||||
icalrecurrencetype_clear @118
|
||||
icalproperty_new_rrule @119
|
||||
icaltime_day_of_week @120
|
||||
icalproperty_new_exdate @121
|
||||
icalproperty_new_dtstart @122
|
||||
icalproperty_new_dtend @123
|
||||
icalproperty_new_contact @124
|
||||
icalproperty_get_status @125
|
||||
icalproperty_get_summary @126
|
||||
icalproperty_get_description @127
|
||||
icalproperty_get_location @128
|
||||
icalproperty_get_categories @129
|
||||
icaltime_adjust @130
|
||||
icalrecur_iterator_free @131
|
||||
icaltime_normalize @132
|
||||
icalrecur_iterator_next @133
|
||||
icalrecur_iterator_new @134
|
||||
icalproperty_get_rrule @135
|
||||
icalparser_parse_string @136
|
||||
icalproperty_get_contact @137
|
||||
icalproperty_get_exdate @138
|
||||
icalrecurrencetype_day_position @139
|
||||
icaltime_from_string @140
|
||||
icalproperty_get_x_name @141
|
||||
icalproperty_get_dtstart @142
|
||||
icalproperty_get_value_as_string @143
|
||||
icalparameter_get_member @144
|
||||
icalproperty_get_class @145
|
||||
icalproperty_get_priority @146
|
||||
icalproperty_get_url @147
|
||||
icaldurationtype_null_duration @148
|
||||
icaltime_add @149
|
||||
icaltime_subtract @150
|
||||
icalproperty_get_dtend @151
|
||||
icaldurationtype_is_null_duration @152
|
||||
icalproperty_get_duration @153
|
@ -1,153 +0,0 @@
|
||||
/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 4 -*-
|
||||
======================================================================
|
||||
FILE: icalarray.c
|
||||
CREATOR: Damon Chaplin 07 March 2001
|
||||
|
||||
$Id: icalarray.c,v 1.2 2002/04/18 18:47:25 mostafah%oeone.com Exp $
|
||||
$Locker: $
|
||||
|
||||
(C) COPYRIGHT 2001, Ximian, Inc.
|
||||
|
||||
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/
|
||||
|
||||
|
||||
======================================================================*/
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include "config.h"
|
||||
#endif
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
|
||||
#include "icalarray.h"
|
||||
#include "icalerror.h"
|
||||
|
||||
|
||||
static void icalarray_expand (icalarray *array,
|
||||
int space_needed);
|
||||
|
||||
|
||||
icalarray*
|
||||
icalarray_new (int element_size,
|
||||
int increment_size)
|
||||
{
|
||||
icalarray *array;
|
||||
|
||||
array = (icalarray*) malloc (sizeof (icalarray));
|
||||
if (!array) {
|
||||
icalerror_set_errno(ICAL_NEWFAILED_ERROR);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
array->element_size = element_size;
|
||||
array->increment_size = increment_size;
|
||||
array->num_elements = 0;
|
||||
array->space_allocated = 0;
|
||||
array->data = NULL;
|
||||
|
||||
return array;
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
icalarray_free (icalarray *array)
|
||||
{
|
||||
if (array->data)
|
||||
free (array->data);
|
||||
free (array);
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
icalarray_append (icalarray *array,
|
||||
void *element)
|
||||
{
|
||||
if (array->num_elements >= array->space_allocated)
|
||||
icalarray_expand (array, 1);
|
||||
|
||||
memcpy ((char *)(array->data) + ( array->num_elements * array->element_size ), element,
|
||||
array->element_size);
|
||||
array->num_elements++;
|
||||
}
|
||||
|
||||
|
||||
void*
|
||||
icalarray_element_at (icalarray *array,
|
||||
int position)
|
||||
{
|
||||
assert (position >= 0);
|
||||
assert (position < array->num_elements);
|
||||
|
||||
return (char *)(array->data) + (position * array->element_size);
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
icalarray_remove_element_at (icalarray *array,
|
||||
int position)
|
||||
{
|
||||
void *dest;
|
||||
int elements_to_move;
|
||||
|
||||
assert (position >= 0);
|
||||
assert (position < array->num_elements);
|
||||
|
||||
dest = (char *)array->data + (position * array->element_size);
|
||||
elements_to_move = array->num_elements - position - 1;
|
||||
|
||||
if (elements_to_move > 0)
|
||||
memmove (dest, (char *)dest + array->element_size,
|
||||
elements_to_move * array->element_size);
|
||||
|
||||
array->num_elements--;
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
icalarray_sort (icalarray *array,
|
||||
int (*compare) (const void *,
|
||||
const void *))
|
||||
{
|
||||
qsort (array->data, array->num_elements, array->element_size, compare);
|
||||
}
|
||||
|
||||
|
||||
static void
|
||||
icalarray_expand (icalarray *array,
|
||||
int space_needed)
|
||||
{
|
||||
int new_space_allocated;
|
||||
void *new_data;
|
||||
|
||||
new_space_allocated = array->space_allocated + array->increment_size;
|
||||
|
||||
if (space_needed > array->increment_size)
|
||||
new_space_allocated += space_needed;
|
||||
|
||||
/*
|
||||
new_data = realloc (array->data,
|
||||
new_space_allocated * array->element_size);
|
||||
*/
|
||||
new_data = malloc(new_space_allocated * array->element_size);
|
||||
memcpy(new_data,array->data,array->element_size*array->space_allocated);
|
||||
free(array->data);
|
||||
|
||||
if (new_data) {
|
||||
array->data = new_data;
|
||||
array->space_allocated = new_space_allocated;
|
||||
} else {
|
||||
icalerror_set_errno(ICAL_ALLOCATION_ERROR);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1,61 +0,0 @@
|
||||
/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 4 -*- */
|
||||
/*======================================================================
|
||||
FILE: icalarray.h
|
||||
CREATOR: Damon Chaplin 07 March 2001
|
||||
|
||||
|
||||
$Id: icalarray.h,v 1.1 2001/12/21 19:04:01 mikep%oeone.com Exp $
|
||||
$Locker: $
|
||||
|
||||
(C) COPYRIGHT 2001, Ximian, Inc.
|
||||
|
||||
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 ICALARRAY_H
|
||||
#define ICALARRAY_H
|
||||
|
||||
/* An array of arbitrarily-sized elements which grows dynamically as elements
|
||||
are added. */
|
||||
|
||||
|
||||
typedef struct _icalarray icalarray;
|
||||
struct _icalarray {
|
||||
int element_size;
|
||||
int increment_size;
|
||||
int num_elements;
|
||||
int space_allocated;
|
||||
void *data;
|
||||
};
|
||||
|
||||
|
||||
|
||||
icalarray *icalarray_new (int element_size,
|
||||
int increment_size);
|
||||
void icalarray_free (icalarray *array);
|
||||
|
||||
void icalarray_append (icalarray *array,
|
||||
void *element);
|
||||
void icalarray_remove_element_at (icalarray *array,
|
||||
int position);
|
||||
|
||||
void *icalarray_element_at (icalarray *array,
|
||||
int position);
|
||||
|
||||
void icalarray_sort (icalarray *array,
|
||||
int (*compare) (const void *, const void *));
|
||||
|
||||
|
||||
#endif /* ICALARRAY_H */
|
@ -1,30 +0,0 @@
|
||||
/* -*- Mode: C -*-
|
||||
======================================================================
|
||||
FILE: icalattendee.c
|
||||
CREATOR: eric 08 Mar 01
|
||||
|
||||
$Id: icalattendee.c,v 1.2 2001/12/21 18:56:13 mikep%oeone.com Exp $
|
||||
$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 icaltypes.c
|
||||
|
||||
======================================================================*/
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include "config.h"
|
||||
#endif
|
||||
|
||||
#include "icalattendee.h"
|
@ -1,68 +0,0 @@
|
||||
/* -*- Mode: C -*- */
|
||||
/*======================================================================
|
||||
FILE: icalattendee.h
|
||||
CREATOR: eric 8 Mar 01
|
||||
|
||||
|
||||
(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 icaltypes.h
|
||||
|
||||
======================================================================*/
|
||||
|
||||
#ifndef ICALATTENDEE_H
|
||||
#define ICALATTENDEE_H
|
||||
|
||||
#include <time.h>
|
||||
#include "icalenums.h"
|
||||
#include "icaltime.h"
|
||||
#include "icalduration.h"
|
||||
#include "icalperiod.h"
|
||||
#include "icalderivedparameter.h"
|
||||
#include "icalderivedvalue.h"
|
||||
|
||||
struct icalorganizertype {
|
||||
const char* value;
|
||||
const char* common_name;
|
||||
const char* dir;
|
||||
const char* sentby;
|
||||
const char* language;
|
||||
|
||||
};
|
||||
|
||||
/* Create a copy of the given organizer. Libical will not own the
|
||||
memory for the strings in the copy; the call must free them */
|
||||
struct icalorganizertype icalorganizertype_new_clone(struct icalorganizertype a);
|
||||
|
||||
|
||||
struct icalattendeetype {
|
||||
const char* cuid; /* Cal user id, contents of the property value */
|
||||
/*icalparameter_cutype cutype;*/
|
||||
const char* member;
|
||||
/*icalparameter_role role;*/
|
||||
int rsvp;
|
||||
const char* delto;
|
||||
const char* delfrom;
|
||||
const char* sentby;
|
||||
const char* cn;
|
||||
const char* dir;
|
||||
const char* language;
|
||||
};
|
||||
|
||||
/* Create a copy of the given attendee. Libical will not own the
|
||||
memory for the strings in the copy; the call must free them */
|
||||
struct icalattendeetype icalattendeetype_new_clone(struct icalattendeetype a);
|
||||
|
||||
|
||||
#endif /* !ICALATTENDEE_H */
|
File diff suppressed because it is too large
Load Diff
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user