Remove libical from this tree, it resides in e-d-s now.
svn path=/trunk/; revision=23417
This commit is contained in:
@ -1,4 +0,0 @@
|
||||
John Gray <gray@agora-net.com>
|
||||
Andrea Campi <a.campi@inet.it>
|
||||
|
||||
Original author May 1998-December 2001, Eric Busboom <eric@softwarestudio.org>
|
@ -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,9 +0,0 @@
|
||||
|
||||
EXTRA_DIST = \
|
||||
ChangeLog \
|
||||
README \
|
||||
TEST \
|
||||
TODO
|
||||
|
||||
SUBDIRS = design-data doc scripts test-data src examples zoneinfo
|
||||
|
522
libical/NEWS
522
libical/NEWS
@ -1,522 +0,0 @@
|
||||
Version 0.24, XX Xxx 2002 ( cvs tag libical-0-24 )
|
||||
--------------------------------------------------
|
||||
|
||||
**** Incompatibilities with previous version ****
|
||||
|
||||
CSTP client/server code has been removed from libicalss.
|
||||
Future versions will eventually contain a full CAP 6.0
|
||||
client/server implementation.
|
||||
|
||||
icalproperty_get_name() is deprecated and will change
|
||||
in a future release. Use icalproperty_get_icalproperty_name()
|
||||
instead.
|
||||
|
||||
icalcomponent_get_span() is deprecated in this release
|
||||
because it does not handle recurring events. See
|
||||
icalcomponent_foreach_recurrence() for an alternate
|
||||
interface.
|
||||
|
||||
The icalproperty_remove_parameter() call is deprecated
|
||||
because it improperly deals with extended parameters.
|
||||
See icalproperty_remove_parameter_by_kind() for a
|
||||
compatible call.
|
||||
|
||||
Code that deals with the TRANSPARENT property now
|
||||
uses enumeration values to get/set values instead of
|
||||
strings.
|
||||
|
||||
The code for dealing with icalsets was overhauled. You
|
||||
will want to use the common icalset_* routines
|
||||
directly instead of calling into the icalfileset_* or
|
||||
icaldirset_* routines.
|
||||
|
||||
A number of routines now expect to be called with
|
||||
const arguments. A number of routines now
|
||||
return pointers to const data.
|
||||
|
||||
|
||||
**** New Features ****
|
||||
|
||||
Major cleanup of the time-handling routines. New API is
|
||||
available that deals with timezones much more cleanly.
|
||||
|
||||
The regression routines in src/test are much cleaner.
|
||||
Test runs summarize which tests fail and do not
|
||||
immediately abort() like the old set of tests. A
|
||||
number of old, commented tests were resurrected.
|
||||
|
||||
C++ Interface: New libraries libical_cxx.la and libicalss_cxx.la
|
||||
are build when you configure with the --enable-cxx option.
|
||||
|
||||
Java Interface: A JNI interface to libical is build when
|
||||
you configure with the --enable-java option.
|
||||
|
||||
Most of libical is now reentrant and thread safe. The Lex/Yacc
|
||||
query parser is pre-built with flex 2.5.8 and bison 1.34. To
|
||||
rebuild these files you will need to specify the --with-devel
|
||||
option. The --enable-reentrant option also adds the -D_REENTRANT
|
||||
flag for systems that require it. The build system attempts to
|
||||
add the pthread libraries to support a thread safe memory allocator
|
||||
and thread-safe error handling.
|
||||
|
||||
A new storage mechanism for Berkeley DB 4.0 was contributed
|
||||
by Critical Path. Specify the --with-bdb4 and --with-bdb4-dir
|
||||
options to enable.
|
||||
|
||||
Embedded code comments are slowly being migrated to be
|
||||
doxygen compliant. See http://www.doxygen.org/ for
|
||||
more on this wonderful tool.
|
||||
|
||||
The code should now compile with non-gcc compilers. Certain
|
||||
parts of the autogenerated code were causing problems. The
|
||||
code base has also been ported to the windows Visual C
|
||||
environment.
|
||||
|
||||
|
||||
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
|
||||
--------------------
|
102
libical/README
102
libical/README
@ -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 and the test code in src/test.
|
||||
|
||||
|
||||
|
||||
Eric Busboom
|
||||
eric@softwarestudio.org
|
@ -1,4 +0,0 @@
|
||||
|
||||
Parser Tests
|
||||
------------
|
||||
Use iCAL keywords as first words of unquoted strings
|
@ -1,69 +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.
|
||||
|
||||
Andrea Campi <a.campi@inet.it> for miscellaneous updates and beginning
|
||||
of Doxygen documentation.
|
||||
|
||||
Paul Lindner <plindner@cp.net> for several contributions, including
|
||||
C++ binding, reentrant parser, thread safe memory allocator, and a
|
||||
lot of documentation.
|
||||
|
||||
Mark Tearle <mtearle@tearle.com> for keeping the Python bindings up
|
||||
to date.
|
39
libical/TODO
39
libical/TODO
@ -1,39 +0,0 @@
|
||||
|
||||
TODOs for libical
|
||||
-----------------
|
||||
|
||||
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,61 +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
|
||||
}
|
||||
|
||||
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
|
||||
|
||||
aclocal $ACLOCAL_FLAGS
|
||||
|
||||
# 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,307 +0,0 @@
|
||||
dnl Process this file with autoconf to produce a configure script.
|
||||
AC_INIT(src)
|
||||
AC_CANONICAL_SYSTEM
|
||||
|
||||
AM_INIT_AUTOMAKE(libical,0.24)
|
||||
AM_CONFIG_HEADER(config.h)
|
||||
|
||||
dnl Set the aux dir to .. (the toplevel evolution directory) so ylwrap
|
||||
dnl is found in the correct directory for automake >= 1.5
|
||||
AC_CONFIG_AUX_DIR(..)
|
||||
|
||||
dnl Subst in evolution's private directories
|
||||
AC_SUBST(privlibdir)
|
||||
AC_SUBST(privincludedir)
|
||||
AC_SUBST(privdatadir)
|
||||
|
||||
dnl Initialize maintainer mode
|
||||
AM_MAINTAINER_MODE
|
||||
|
||||
dnl Checks for programs.
|
||||
AC_PROG_YACC
|
||||
AC_PROG_CC
|
||||
AC_PROG_CXX
|
||||
AM_PROG_LEX
|
||||
AC_PROG_LN_S
|
||||
AC_PROG_INSTALL
|
||||
|
||||
dnl Initialize libtool
|
||||
AM_DISABLE_STATIC
|
||||
AM_PROG_LIBTOOL
|
||||
|
||||
AC_SUBST(AR)
|
||||
|
||||
dnl *** bdb4 support
|
||||
|
||||
AC_MSG_CHECKING(for Berkeley DB4 support)
|
||||
AC_ARG_WITH(bdb4, [ --with-bdb4 Add support for Berkeley DB 4.0],
|
||||
[case $with_bdb4 in
|
||||
yes) AC_MSG_RESULT(yes)
|
||||
AC_MSG_RESULT( Adding Berkeley DB support)
|
||||
WITH_BDB4="yes"
|
||||
;;
|
||||
no) AC_MSG_RESULT(no)
|
||||
;;
|
||||
*) AC_MSG_RESULT(no)
|
||||
AC_MSG_RESULT(Ignoring unknown argument to --with-bdb4: $with_bdb4)
|
||||
;;
|
||||
esac],
|
||||
AC_MSG_RESULT(no))
|
||||
|
||||
if test x$WITH_BDB4 = xyes; then
|
||||
AC_ARG_WITH(bdb4_dir, [ --with-bdb4-dir=PATH Use PATH as location of BerkeleyDB 4.0],
|
||||
BDB_DIR=$withval,
|
||||
BDB_DIR=/usr/local/BerkeleyDB.4.0
|
||||
)
|
||||
|
||||
AC_MSG_CHECKING(for Berkeley DB include files)
|
||||
if test -f $BDB_DIR/include/db.h; then
|
||||
BDB_DIR_INCLUDE=$BDB_DIR/include
|
||||
AC_MSG_RESULT($BDB_DIR_INCLUDE)
|
||||
else
|
||||
if test -f $BDB_DIR/include/db4/db.h; then
|
||||
BDB_DIR_INCLUDE=$BDB_DIR/include/db4
|
||||
AC_MSG_RESULT($BDB_DIR_INCLUDE)
|
||||
else
|
||||
WITH_BDB4="no"
|
||||
AC_MSG_RESULT(not found!)
|
||||
fi
|
||||
fi
|
||||
|
||||
AC_MSG_CHECKING(for Berkeley DB libraries)
|
||||
if test -f $BDB_DIR/lib/libdb-4.0.la; then
|
||||
BDB_DIR_LIB=$BDB_DIR/lib
|
||||
BDB_LIB=libdb-4.0.la
|
||||
AC_MSG_RESULT($BDB_DIR_LIB $BDB_LIB)
|
||||
else
|
||||
if test -f $BDB_DIR/lib/libdb4.la; then
|
||||
BDB_DIR_LIB=$BDB_DIR/lib
|
||||
BDB_LIB=libdb4.la
|
||||
AC_MSG_RESULT($BDB_DIR_LIB $BDB_LIB)
|
||||
else
|
||||
WITH_BDB4="no"
|
||||
AC_MSG_RESULT(not found!)
|
||||
fi
|
||||
fi
|
||||
|
||||
AC_SUBST(BDB_DIR)
|
||||
AC_SUBST(BDB_DIR_INCLUDE)
|
||||
AC_SUBST(BDB_DIR_LIB)
|
||||
AC_SUBST(BDB_LIB)
|
||||
dnl 4.0 is required...
|
||||
BDB_VERSION="4.0"
|
||||
AC_SUBST(BDB_VERSION)
|
||||
fi
|
||||
AM_CONDITIONAL(WITH_BDB4, test x$WITH_BDB4 = xyes)
|
||||
|
||||
dnl *** Yacc/Bison support
|
||||
|
||||
if test "x$USE_MAINTAINER_MODE" == xyes; then
|
||||
DEV="yes"
|
||||
AC_MSG_RESULT([Setting up for development: -Wall, flex, bison])
|
||||
fi
|
||||
|
||||
AM_CONDITIONAL(DEV, test x$DEV = xyes)
|
||||
|
||||
AC_CHECK_PROGS(AR, ar aal, ar)
|
||||
AC_CHECK_PROGS(PERL, perl5 perl)
|
||||
|
||||
AC_MSG_CHECKING(whether to define _REENTRANT)
|
||||
AC_ARG_ENABLE(reentrant, [ --enable-reentrant define _REENTRANT to enable reentrant system calls],
|
||||
[ case "${enableval}" in
|
||||
no)
|
||||
AC_MSG_RESULT(no)
|
||||
ac_cv_reentrant=no
|
||||
;;
|
||||
*)
|
||||
AC_MSG_RESULT(yes)
|
||||
AC_DEFINE(ICAL_REENTRANT, ,[Define if we want _REENTRANT]) [CFLAGS="$CFLAGS -D_REENTRANT"]
|
||||
ac_cv_reentrant=yes
|
||||
;;
|
||||
esac ],
|
||||
AC_MSG_RESULT(no)
|
||||
)
|
||||
|
||||
dnl *** libicalcap support (experimental)
|
||||
|
||||
AC_MSG_CHECKING(for CAP/BEEP support)
|
||||
AC_ARG_WITH(libicalcap, [ --with-libicalcap Add support for CAP/BEEP support],
|
||||
[case $with_libicalcap in
|
||||
yes) AC_MSG_RESULT(yes)
|
||||
AC_MSG_RESULT( Adding CAP/BEEP support)
|
||||
WITH_CAP="yes"
|
||||
;;
|
||||
no) AC_MSG_RESULT(no)
|
||||
;;
|
||||
*) AC_MSG_RESULT(no)
|
||||
AC_MSG_RESULT(Ignoring unknown argument to --with-libicalcap: $with_libicalcap)
|
||||
;;
|
||||
esac],
|
||||
AC_MSG_RESULT(no))
|
||||
|
||||
if test x$WITH_CAP = xyes; then
|
||||
AC_MSG_CHECKING(for CAP/BEEP files)
|
||||
PKG_CHECK_MODULES(RRCAP, roadrunner >= 0.9 \
|
||||
rrtls >= 0.9 \
|
||||
rrsasl >= 0.9 \
|
||||
rrcap >= 0.9)
|
||||
|
||||
AC_SUBST(RRCAP_CFLAGS)
|
||||
AC_SUBST(RRCAP_LIBS)
|
||||
fi
|
||||
AM_CONDITIONAL(WITH_CAP, test x$WITH_CAP = xyes)
|
||||
|
||||
dnl **************************************************
|
||||
dnl test/regression.c (and maybe others) needs this defined
|
||||
dnl **************************************************
|
||||
AC_DEFINE(ICAL_ERRORS_ARE_FATAL,0,[Define to make icalerror_* calls abort instead of internally signalling an error])
|
||||
AC_DEFINE(NO_WARN_DEPRECATED,1,[Define to 1 if you DO NOT WANT to see deprecated messages])
|
||||
AC_DEFINE(NO_WARN_ICAL_MALFORMEDDATA_ERROR_HACK,1,[Define to 1 if you DO NO WANT to see the warning messages related to ICAL_MALFORMEDDATA_ERROR and parsing .ics zoneinfo files])
|
||||
|
||||
AC_DEFINE(ICAL_UNIX_NEWLINE,1,[Define to terminate lines with "\n" instead of "\r\n"])
|
||||
dnl AC_DEFINE(ICAL_NO_EMPTY_ARRAY_DECL,1,[Define to 1 if your compile does not like lines like: struct something foo[]])
|
||||
|
||||
dnl Checks for libraries.
|
||||
dnl Replace `main' with a function in -lical:
|
||||
dnl AC_CHECK_LIB(ical, main)
|
||||
|
||||
dnl Check if this system can use pthreads
|
||||
dnl HACK to support FreeBSD 4.x pthread
|
||||
|
||||
case "${host}" in
|
||||
*-*-freebsdelf4* )
|
||||
AC_MSG_RESULT(checking for pthread_create in -lpthread... -pthread (FreeBSD 4.x style))
|
||||
AC_DEFINE(HAVE_PTHREAD, ,[Define if we have pthread.])
|
||||
PTHREAD_LIBS=-pthread;;
|
||||
|
||||
*)
|
||||
AC_CHECK_LIB(pthread,pthread_create,have_pthread=yes)
|
||||
if test "x$have_pthread" = xyes; then
|
||||
AC_DEFINE(HAVE_PTHREAD, ,[Define if we have pthread.])
|
||||
PTHREAD_LIBS=-lpthread
|
||||
fi;;
|
||||
esac
|
||||
|
||||
AM_CONDITIONAL(HAVE_PTHREAD, test "$have_pthread" = "yes")
|
||||
AC_SUBST(PTHREAD_LIBS)
|
||||
|
||||
dnl Checks for header files.
|
||||
AC_HEADER_STDC
|
||||
AC_CHECK_HEADERS(assert.h ctype.h pthread.h stdint.h time.h sys/types.h unistd.h wctype.h)
|
||||
|
||||
dnl Checks for typedefs, structures, and compiler characteristics.
|
||||
AC_C_CONST
|
||||
AC_TYPE_SIZE_T
|
||||
AC_TYPE_MODE_T
|
||||
AC_CHECK_TYPE(intptr_t)
|
||||
AC_STRUCT_TM
|
||||
|
||||
dnl Checks for library functions.
|
||||
AC_CHECK_FUNCS(gmtime_r isspace iswspace strdup snprintf)
|
||||
|
||||
dnl **************************************************
|
||||
dnl * Check for C++
|
||||
dnl **************************************************
|
||||
|
||||
AC_ARG_ENABLE(cxx,
|
||||
[ --enable-cxx Enable C++ bindings],,enable_cxx="no")
|
||||
AM_CONDITIONAL(WITH_CXX_BINDINGS, test x$enable_cxx = "xyes")
|
||||
|
||||
dnl **************************************************
|
||||
dnl * Check for Java
|
||||
dnl **************************************************
|
||||
|
||||
AC_ARG_ENABLE(java,
|
||||
[ --enable-java Enable Java bindings],,enable_java="no")
|
||||
if test "x$enable_java" = "xyes"; then
|
||||
AC_PATH_PROG(JAR, jar, /usr/local/bin/jar, /usr/local/bin:$PATH)
|
||||
AC_PATH_PROG(JAVA, java, /usr/local/bin/java, /usr/local/bin:$PATH)
|
||||
AC_PATH_PROG(JAVAC, javac, /usr/local/bin/javac, /usr/local/bin:$PATH)
|
||||
AC_PATH_PROG(JAVAH, javah, /usr/local/bin/javah, /usr/local/bin:$PATH)
|
||||
AC_SUBST(JAR)
|
||||
AC_SUBST(JAVA)
|
||||
AC_SUBST(JAVAC)
|
||||
AC_SUBST(JAVAH)
|
||||
|
||||
dnl truly gross
|
||||
|
||||
case "${host}" in
|
||||
*-*-solaris*) JAVA_PLATFORM="solaris" ;;
|
||||
*-*-linux*) JAVA_PLATFORM="linux" ;;
|
||||
*-*-freebsd*) JAVA_PLATFORM="bsd" ;;
|
||||
*-*-aix*) JAVA_PLATFORM="aix" ;;
|
||||
*-sequent-*) JAVA_PLATFORM="ptx" ;;
|
||||
*-*-hpux*) JAVA_PLATFORM="hpux" ;;
|
||||
*-*-irix*) JAVA_PLATFORM="irix" ;;
|
||||
*-*-os390*) JAVA_PLATFORM="os390" ;;
|
||||
*-*-os400*) JAVA_PLATFORM="os400" ;;
|
||||
*-apple-darwin*|*-apple-rhapsody*) JAVA_PLATFORM="darwin" ;;
|
||||
*) JAVA_PLATFORM="unknown" ;;
|
||||
esac
|
||||
|
||||
AC_SUBST(JAVA_PLATFORM)
|
||||
fi
|
||||
|
||||
AM_CONDITIONAL(WITH_JAVA, test x$enable_java = "xyes")
|
||||
|
||||
dnl **************************************************
|
||||
dnl * Check for Python
|
||||
dnl **************************************************
|
||||
python_val=false
|
||||
AC_ARG_ENABLE(python,
|
||||
[ --enable-python Enable python bindings],,enable_python="no")
|
||||
|
||||
if test "x$enable_python" = "xyes"; then
|
||||
python_val=true
|
||||
else
|
||||
python_val=false
|
||||
fi
|
||||
|
||||
if test $python_val = true; then
|
||||
|
||||
AC_CHECK_PROG(python_val, python, true, false)
|
||||
AC_CHECK_PROG(python_val, swig, true, false)
|
||||
|
||||
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, test $python_val = true)
|
||||
|
||||
AC_OUTPUT([
|
||||
Makefile
|
||||
design-data/Makefile
|
||||
doc/Makefile
|
||||
examples/Makefile
|
||||
scripts/Makefile
|
||||
src/Makefile
|
||||
src/libical/Makefile
|
||||
src/libical/icalversion.h
|
||||
src/libicalcap/Makefile
|
||||
src/libicalss/Makefile
|
||||
src/libicalvcal/Makefile
|
||||
src/python/Makefile
|
||||
src/java/Makefile
|
||||
src/test/Makefile
|
||||
test-data/Makefile
|
||||
zoneinfo/Makefile
|
||||
])
|
||||
|
@ -1,6 +0,0 @@
|
||||
Makefile.in
|
||||
Makefile
|
||||
.deps
|
||||
.libs
|
||||
*.lo
|
||||
*.la
|
@ -1,6 +0,0 @@
|
||||
EXTRA_DIST =\
|
||||
properties.csv \
|
||||
parameters.csv \
|
||||
restrictions.csv \
|
||||
status.txt \
|
||||
value-types.csv
|
@ -1,22 +0,0 @@
|
||||
ANY
|
||||
VAGENDA
|
||||
VALARM
|
||||
VCALENDAR
|
||||
VCAR
|
||||
VCOMMAND
|
||||
VEVENT
|
||||
VFREEBUSY
|
||||
VJOURNAL
|
||||
VQUERY
|
||||
VSCHEDULE
|
||||
VTIMEZONE
|
||||
VTODO
|
||||
X
|
||||
XAUDIOALARM
|
||||
XDAYLIGHTSAVINGSTIME
|
||||
XDISPLAYALARM
|
||||
XEMAILALARM
|
||||
XLICINVALID
|
||||
XMIMEPART
|
||||
XPROCEDUREALARM
|
||||
XSTANDARDTIME
|
@ -1,23 +0,0 @@
|
||||
ALTREP const char*
|
||||
CN const char*
|
||||
CUTYPE icalparameter_cutype
|
||||
DELEGATED-FROM const char*
|
||||
DELEGATED-TO const char*
|
||||
DIR const char*
|
||||
ENCODING icalparameter_encoding
|
||||
FBTYPE icalparameter_fbtype
|
||||
FMTTYPE const char*
|
||||
LANGUAGE const char*
|
||||
MEMBER const char*
|
||||
PARTSTAT icalparameter_partstat
|
||||
RANGE icalparameter_range
|
||||
RELATED icalparameter_related
|
||||
RELTYPE icalparameter_reltype
|
||||
ROLE icalparameter_role
|
||||
RSVP int
|
||||
SENT-BY const char*
|
||||
TZID const char*
|
||||
VALUE icalparameter_value
|
||||
X const char*
|
||||
X-LIC-ERRORTYPE icalparameter_xlicerrortype
|
||||
X-LIC-COMPARETYPE icalparameter_xliccomparetype
|
@ -1,33 +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;VCAL-PROP-PARSE-ERROR"
|
||||
"X-LIC-COMPARETYPE","icalparameter_xliccomparetype","EQUAL;NOTEQUAL;LESS;GREATER;LESSEQUAL;GREATEREQUAL;REGEX;ISNULL;ISNOTNULL"
|
||||
"#CAP Parameters","Draft 8",
|
||||
"#this parameter should really be called ACTION, but this conflicts with the ACTION property"
|
||||
"ACTIONPARAM","icalparameter_action","ASK;ABORT"
|
||||
"ID","const char*",
|
||||
"ENABLE","icalparameter_enable","TRUE;FALSE"
|
||||
"LATENCY","const char*",
|
||||
"LOCAL","icalparameter_local","TRUE;FALSE"
|
||||
"LOCALIZE","const char*",
|
||||
"OPTIONS","const char*",
|
Can't render this file because it has a wrong number of fields in line 26.
|
@ -1,57 +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
|
||||
CMD ACTIONPARAM ID LATENCY LOCALIZE OPTIONS 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 LOCAL X
|
||||
STATUS X
|
||||
SUMMARY ALTREP LANGUAGE X
|
||||
TRANSP X
|
||||
TRIGGER ENABLE 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
|
||||
EXPAND X
|
@ -1,57 +0,0 @@
|
||||
CALSCALE TEXT
|
||||
METHOD METHOD # Non-std. RFC2445 specifies TEXT
|
||||
PRODID TEXT
|
||||
VERSION TEXT
|
||||
CATEGORIES TEXT
|
||||
CLASS TEXT
|
||||
COMMENT TEXT
|
||||
DESCRIPTION TEXT
|
||||
LOCATION TEXT
|
||||
PERCENT-COMPLETE INTEGER
|
||||
PRIORITY INTEGER
|
||||
RESOURCES TEXT
|
||||
STATUS STATUS
|
||||
SUMMARY TEXT
|
||||
COMPLETED DATE-TIME
|
||||
FREEBUSY PERIOD
|
||||
TRANSP TEXT
|
||||
TZNAME TEXT
|
||||
TZOFFSETFROM UTC-OFFSET
|
||||
TZOFFSETTO UTC-OFFSET
|
||||
TZURL URI
|
||||
TZID TEXT
|
||||
ATTENDEE CAL-ADDRESS
|
||||
CONTACT TEXT
|
||||
ORGANIZER CAL-ADDRESS
|
||||
RELATED-TO TEXT
|
||||
URL URI
|
||||
UID TEXT
|
||||
EXRULE RECUR
|
||||
RRULE RECUR
|
||||
ACTION TEXT
|
||||
REPEAT INTEGER
|
||||
CREATED DATE-TIME
|
||||
DTSTAMP DATE-TIME
|
||||
LAST-MODIFIED DATE-TIME
|
||||
SEQUENCE INTEGER
|
||||
X TEXT
|
||||
REQUEST-STATUS STRING
|
||||
ATTACH ATTACH # Non-std: URI or BINARY
|
||||
GEO GEO # Non-std: Two FLOATS
|
||||
DTEND DATE-TIME # Non-std: DATE-TIME or DATE
|
||||
DUE DATE-TIME # Non-std: DATE-TIME or DATE
|
||||
DTSTART DATE-TIME # Non-std: DATE-TIME or DATE
|
||||
RECURRENCE-ID DATE-TIME # Non-std: DATE-TIME or DATE
|
||||
EXDATE DATE-TIME # Non-std: DATE-TIME or DATE
|
||||
RDATE DATE-TIME-PERIOD # Non-std: DATE-TIME or DATE or PERIOD
|
||||
TRIGGER TRIGGER # Non-std: DURATION or DATE-TIME
|
||||
DURATION DURATION
|
||||
QUERY QUERY
|
||||
X-LIC-ERROR TEXT
|
||||
X-LIC-CLUSTERCOUNT INTEGER
|
||||
X-LIC-MIMECONTENTTYPE STRING
|
||||
X-LIC-MIMECHARSET STRING
|
||||
X-LIC-MIMEENCODING STRING
|
||||
X-LIC-MIMEOPTINFO STRING
|
||||
X-LIC-MIMECID STRING
|
||||
X-LIC-MIMEFILENAME STRING
|
@ -1,108 +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","TRANSP","TRANSP"
|
||||
"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"
|
||||
"MAXRESULTS","INTEGER","INTEGER"
|
||||
"MAXRESULTSSIZE","INTEGER","INTEGER"
|
||||
"QUERYNAME","TEXT","TEXT"
|
||||
"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"
|
||||
"#CAP Properties",,
|
||||
,"FIXME","Should be BOOLEAN"
|
||||
"ALLOW-CONFLICT","TEXT","TEXT"
|
||||
"CALID","TEXT","TEXT"
|
||||
"CALMASTER","TEXT","TEXT"
|
||||
"CARID","TEXT","TEXT"
|
||||
"CMD","CMD","CMD"
|
||||
"CSID","URI","URI"
|
||||
"DECREED","TEXT","TEXT"
|
||||
"DEFAULT-CHARSET","TEXT","TEXT"
|
||||
"DEFAULT-LOCALE","TEXT","TEXT"
|
||||
"DEFAULT-TZID","TEXT","TEXT"
|
||||
"DEFAULT-VCARS","TEXT","TEXT"
|
||||
,"FIXME","Should be UPN-FILTER"
|
||||
"DENY","TEXT","TEXT"
|
||||
,"FIXME","Should be BOOLEAN"
|
||||
"EXPAND","INTEGER","INTEGER"
|
||||
,"FIXME","Should be UPN-FILTER"
|
||||
"GRANT","TEXT","TEXT"
|
||||
"MAXDATE","DATE-TIME","DATE-TIME"
|
||||
"MINDATE","DATE-TIME","DATE-TIME"
|
||||
"NAME","TEXT","TEXT"
|
||||
"OWNER","TEXT","TEXT"
|
||||
"PERMISSION","TEXT","TEXT"
|
||||
"QUERY","QUERY","QUERY"
|
||||
"QUERYID","TEXT","TEXT"
|
||||
"RELCALID","TEXT","TEXT"
|
||||
"RESTRICTION","QUERY","QUERY"
|
||||
"SCOPE","TEXT","TEXT"
|
||||
"TARGET","CAL-ADDRESS","CAL-ADDRESS"
|
||||
"#CAP Properties","These are only allowed in VREPLY",
|
||||
"CAP-VERSION","TEXT","TEXT"
|
||||
"CAR-LEVEL","CAR-LEVEL","CAR-LEVEL"
|
||||
"COMPONENTS","TEXT","TEXT"
|
||||
"STORES-EXPANDED","TEXT","TEXT"
|
||||
"DATE-MAX","DATE-TIME","DATE-TIME"
|
||||
"DATE-MIN","DATE-TIME","DATE-TIME"
|
||||
"ITIP-VERSION","TEXT","TEXT"
|
||||
"MAX-COMPONENT-SIZE","INTEGER","INTEGER"
|
||||
"MULTIPART","TEXT","TEXT"
|
||||
"QUERY-LEVEL","QUERY-LEVEL","QUERY-LEVEL"
|
||||
"RECUR-ACCEPTED","TEXT","TEXT"
|
||||
"RECUR-EXPAND","TEXT","TEXT"
|
||||
"RECUR-LIMIT","TEXT","TEXT"
|
|
@ -1,65 +0,0 @@
|
||||
8BIT
|
||||
ACCEPTED
|
||||
ADD
|
||||
AUDIO
|
||||
BASE64
|
||||
BINARY
|
||||
BOOLEAN
|
||||
BUSY
|
||||
BUSY-TENTATIVE
|
||||
BUSY-UNAVAILABLE
|
||||
CAL-ADDRESS
|
||||
CANCEL
|
||||
CANCELLED
|
||||
CHAIR
|
||||
CHILD
|
||||
COMPLETED
|
||||
CONFIDENTIAL
|
||||
CONFIRMED
|
||||
COUNTER
|
||||
DATE
|
||||
DATE-TIME
|
||||
DECLINECOUNTER
|
||||
DECLINED
|
||||
DELEGATED
|
||||
DISPLAY
|
||||
DRAFT
|
||||
DURATION
|
||||
EMAIL
|
||||
END
|
||||
FINAL
|
||||
FLOAT
|
||||
FREE
|
||||
GREGORIAN
|
||||
GROUP
|
||||
INDIVIDUAL
|
||||
IN-PROCESS
|
||||
INTEGER
|
||||
NEEDS-ACTION
|
||||
NON-PARTICIPANT
|
||||
OPAQUE
|
||||
OPT-PARTICIPANT
|
||||
PARENT
|
||||
PERIOD
|
||||
PRIVATE
|
||||
PROCEDURE
|
||||
PUBLIC
|
||||
PUBLISH
|
||||
RECUR
|
||||
REFRESH
|
||||
REPLY
|
||||
REQ-PARTICIPANT
|
||||
REQUEST
|
||||
RESOURCE
|
||||
ROOM
|
||||
SIBLING
|
||||
START
|
||||
TENTATIVE
|
||||
TEXT
|
||||
THISANDFUTURE
|
||||
THISANDPRIOR
|
||||
TIME
|
||||
TRANSPAENT
|
||||
UNKNOWN
|
||||
UTCOFFSET
|
||||
XNAME
|
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,23 +0,0 @@
|
||||
ATTACH nogen icalattach *
|
||||
BINARY autogen const char*
|
||||
BOOLEAN autogen int
|
||||
CAL-ADDRESS autogen const char*
|
||||
DATE autogen struct icaltimetype
|
||||
DATE-TIME autogen struct icaltimetype
|
||||
DATE-TIME-DATE autogen struct icaltimetype # Non-std
|
||||
DATE-TIME-PERIOD nogen struct icaldatetimeperiodtype # Non-std
|
||||
DURATION autogen struct icaldurationtype
|
||||
FLOAT autogen float
|
||||
GEO autogen struct icalgeotype # Non-std
|
||||
INTEGER autogen int
|
||||
METHOD autogen icalproperty_method # Non-std
|
||||
PERIOD autogen struct icalperiodtype
|
||||
RECUR nogen struct icalrecurrencetype
|
||||
STRING autogen const char* # Non-std
|
||||
TEXT autogen const char*
|
||||
TIME autogen struct icaltimetype
|
||||
TRIGGER nogen struct icaltriggertype # Non-std
|
||||
URI autogen const char*
|
||||
UTC-OFFSET autogen int
|
||||
QUERY autogen const char*
|
||||
STATUS autogen icalproperty_status #Non-std
|
@ -1,19 +0,0 @@
|
||||
ATTACH icalattach *
|
||||
BINARY char*
|
||||
BOOLEAN int
|
||||
CAL-ADDRESS char*
|
||||
DATE time_t
|
||||
DATE-TIME time_t
|
||||
DATE-TIME-DATE time_t
|
||||
DATE-TIME-PERIOD struct icalperiodtype
|
||||
DURATION struct icaldurationtype
|
||||
FLOAT float
|
||||
GEO struct icalgeotype
|
||||
INTEGER int
|
||||
PERIOD struct icalperiodtype
|
||||
RECUR struct icalrecurrencetype
|
||||
TEXT char*
|
||||
TIME time_t
|
||||
TRIGGER struct icaltriggertimetype
|
||||
URI char*
|
||||
UTC-OFFSET int
|
@ -1,35 +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","(m)icalattach *","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;OPAQUE-NOCONFLICT;TRANSPARENT;TRANSPARENT-NOCONFLICT"
|
||||
"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",
|
||||
"#CAP enumeration types",,,,
|
||||
"CMD","(a)enum icalproperty_cmd","string","unitary","ABORT;CONTINUE;CREATE;DELETE;GENERATE-UID;GET-CAPABILITY;IDENTIFY;MODIFY;MOVE;REPLY;SEARCH;SET-LOCALE"
|
||||
"QUERY-LEVEL","(a)enum icalproperty_querylevel","string","unitary","CAL-QL-1;CAL-QL-NONE"
|
||||
"CAR-LEVEL","(a)enum icalproperty_carlevel","string","unitary","CAR-NONE;CAR-MIN;CAR-FULL-1"
|
Can't render this file because it has a wrong number of fields in line 28.
|
@ -1,6 +0,0 @@
|
||||
Makefile.in
|
||||
Makefile
|
||||
.deps
|
||||
.libs
|
||||
*.lo
|
||||
*.la
|
@ -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,7 +0,0 @@
|
||||
Makefile.in
|
||||
Makefile
|
||||
.deps
|
||||
.libs
|
||||
*.lo
|
||||
*.la
|
||||
doesnothing
|
@ -1,20 +0,0 @@
|
||||
|
||||
noinst_PROGRAMS = doesnothing
|
||||
|
||||
if WITH_BDB4
|
||||
doesnothing_LDADD = ../src/libical/libical-evolution.la ../src/libicalss/libicalss-evolution.la ../src/libicalvcal/libicalvcal-evolution.la @BDB_DIR_LIB@/@BDB_LIB@
|
||||
else
|
||||
doesnothing_LDADD = ../src/libical/libical-evolution.la ../src/libicalss/libicalss-evolution.la ../src/libicalvcal/libicalvcal-evolution.la
|
||||
endif
|
||||
|
||||
LIBS = @PTHREAD_LIBS@
|
||||
|
||||
INCLUDES = -I. -I$(top_srcdir)/src
|
||||
|
||||
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,318 +0,0 @@
|
||||
/* Access_component.c */
|
||||
|
||||
#include <libical/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() */
|
||||
|
||||
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 <libical/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 <libical/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 <libical/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 <libical/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,89 +0,0 @@
|
||||
/* -*- Mode: C -*-
|
||||
======================================================================
|
||||
FILE: usecases.c
|
||||
CREATOR: eric 03 April 1999
|
||||
|
||||
DESCRIPTION:
|
||||
|
||||
$Id$
|
||||
$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 <libical/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() */
|
||||
|
||||
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,6 +0,0 @@
|
||||
Makefile.in
|
||||
Makefile
|
||||
.deps
|
||||
.libs
|
||||
*.lo
|
||||
*.la
|
@ -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,332 +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 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
|
||||
my $count = 0;
|
||||
my $out;
|
||||
|
||||
foreach $enum (@{$params{'VALUE'}->{'enums'}}){
|
||||
next if $enum eq 'NO' or $enum eq 'ERROR';
|
||||
$uc = join("",map {uc(lc($_));} split(/-/,$enum));
|
||||
$out.=" {ICAL_VALUE_${uc},ICAL_${uc}_VALUE},\n";
|
||||
$count++;
|
||||
}
|
||||
|
||||
$count+=2;
|
||||
print "static struct icalparameter_value_kind_map value_kind_map[$count] = {\n";
|
||||
print $out;
|
||||
print " {ICAL_VALUE_X,ICAL_X_VALUE},\n";
|
||||
print " {ICAL_VALUE_NONE,ICAL_NO_VALUE}\n};\n\n";
|
||||
|
||||
#Create the parameter Name map
|
||||
|
||||
$out="";
|
||||
$count=0;
|
||||
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));
|
||||
|
||||
$count++;
|
||||
$out.=" {ICAL_${uc}_PARAMETER,\"$param\"},\n";
|
||||
|
||||
}
|
||||
$count+=1;
|
||||
print "static struct icalparameter_kind_map parameter_map[$count] = { \n";
|
||||
print $out;
|
||||
print " { ICAL_NO_PARAMETER, \"\"}\n};\n\n";
|
||||
|
||||
# Create the parameter value map
|
||||
$out ="";
|
||||
$count=0;
|
||||
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));
|
||||
|
||||
$count++;
|
||||
$out.=" {ICAL_${uc}_PARAMETER,ICAL_${uc}_${uce},\"$e\"},\n";
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
$count+=3;
|
||||
print "static struct icalparameter_map icalparameter_map[] = {\n";
|
||||
print "{ICAL_ANY_PARAMETER,0,\"\"},\n";
|
||||
print $out;
|
||||
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 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 (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)(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}(const 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}(const 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,258 +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){
|
||||
|
||||
|
||||
my @props = sort keys %propmap;
|
||||
my $count = scalar(@props);
|
||||
|
||||
|
||||
print "static struct icalproperty_map property_map[$count] = {\n";
|
||||
|
||||
foreach $prop (@props) {
|
||||
|
||||
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";
|
||||
|
||||
$idx = 10000;
|
||||
$count = 1;
|
||||
my $out = "";
|
||||
|
||||
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 = "";
|
||||
}
|
||||
|
||||
$out.=" {ICAL_${ucv}_PROPERTY,ICAL_${ucv}_${uce},\"$str\" }, /*$idx*/\n";
|
||||
|
||||
$idx++;
|
||||
$count++;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
$count++;
|
||||
print "static struct icalproperty_enum_map enum_map[$count] = {\n";
|
||||
print $out;
|
||||
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 DTSTART, DTEND, DUE, EXDATE and RECURRENCE-ID to take DATE values.
|
||||
if ($lc eq "dtstart" || $lc eq "dtend" || $lc eq "due" || $lc eq "exdate"
|
||||
|| $lc eq "recurrenceid") {
|
||||
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}(const 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}(const 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,232 +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
|
||||
|
||||
my $count = scalar(keys %h) + 1;
|
||||
print "static struct icalvalue_kind_map value_map[$count]={\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}(const icalvalue* value)\ {\n\
|
||||
icalerror_check_arg( (value!=0),\"value\");\
|
||||
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}(const icalvalue* value); \
|
||||
void icalvalue_set_${lc}(icalvalue* value, ${type} v);\n\n";
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
if ($opt_h){
|
||||
print "#endif /*ICALVALUE_H*/\n";
|
||||
}
|
||||
|
||||
|
||||
}
|
@ -1,39 +0,0 @@
|
||||
#!/bin/sh
|
||||
|
||||
#
|
||||
# Given a list of headers, combine them into one, excluding certain lines
|
||||
#
|
||||
OUTFILE="/dev/stdout"
|
||||
COMBINEDHEADERS=""
|
||||
EXCLUDES=""
|
||||
|
||||
while [ $# -gt 0 ]
|
||||
do
|
||||
case $1 in
|
||||
-o) OUTFILE=$2; shift;;
|
||||
-e) EXCLUDES="$EXCLUDES $2"; shift;;
|
||||
*) COMBINEDHEADERS="$COMBINEDHEADERS $1";
|
||||
esac
|
||||
shift
|
||||
done
|
||||
|
||||
echo '#ifdef __cplusplus' > $OUTFILE
|
||||
echo 'extern "C" {' >> $OUTFILE
|
||||
echo '#endif' >> $OUTFILE
|
||||
echo '/*' >> $OUTFILE
|
||||
echo " \$Id\$" >> $OUTFILE
|
||||
echo '*/' >> $OUTFILE
|
||||
cat $COMBINEDHEADERS >> file.temp1
|
||||
for exclude in $EXCLUDES
|
||||
do
|
||||
cp file.temp1 file.temp2
|
||||
egrep -v "$exclude" file.temp2 > file.temp1
|
||||
done
|
||||
cat file.temp1 >> $OUTFILE
|
||||
rm -f file.temp1
|
||||
rm -f file.temp2
|
||||
echo '#ifdef __cplusplus' >> $OUTFILE
|
||||
echo '};' >> $OUTFILE
|
||||
echo '#endif' >> $OUTFILE
|
||||
|
||||
|
@ -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>){
|
||||
|
||||
chop;
|
||||
|
||||
s/#.*$//g;
|
||||
s/\"//g;
|
||||
s/\r//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>){
|
||||
|
||||
chop;
|
||||
|
||||
s/#.*$//g;
|
||||
s/\"//g;
|
||||
s/\r//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>){
|
||||
|
||||
chop;
|
||||
|
||||
s/#.*$//g;
|
||||
s/\"//g;
|
||||
s/\r//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,6 +0,0 @@
|
||||
Makefile.in
|
||||
Makefile
|
||||
.deps
|
||||
.libs
|
||||
*.lo
|
||||
*.la
|
@ -1,19 +0,0 @@
|
||||
if WITH_PYTHON
|
||||
PYTHON_DIR = python
|
||||
else
|
||||
PYTHON_DIR =
|
||||
endif
|
||||
|
||||
if WITH_JAVA
|
||||
JAVA_DIR = java
|
||||
else
|
||||
JAVA_DIR =
|
||||
endif
|
||||
|
||||
if WITH_CAP
|
||||
LIBICALCAP_DIR = libicalcap
|
||||
else
|
||||
LIBICALCAP_DIR =
|
||||
endif
|
||||
|
||||
SUBDIRS = libical libicalss $(LIBICALCAP_DIR) libicalvcal $(PYTHON_DIR) $(JAVA_DIR) test
|
@ -1,16 +0,0 @@
|
||||
MANIFEST
|
||||
Makefile.PL
|
||||
lib/Net/ICal/Libical.pm
|
||||
netical.i
|
||||
netical_wrap.c
|
||||
netical_wrap.doc
|
||||
test-data/2446.mime
|
||||
test-data/error
|
||||
test-data/mail-examples
|
||||
test-data/no-error
|
||||
test-data/rfc2445.ics
|
||||
test-data/rfc2446.ics
|
||||
test-data/single-with-error
|
||||
test/example.pl
|
||||
test/libical.pl
|
||||
test/swig.pl
|
@ -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$
|
||||
# $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$
|
||||
# $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$
|
||||
#
|
||||
# (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$
|
||||
# $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,2 +0,0 @@
|
||||
Makefile
|
||||
Makefile.in
|
@ -1,114 +0,0 @@
|
||||
/*======================================================================
|
||||
FILE: ICalDurationType.java
|
||||
CREATOR: structConverter 01/11/02
|
||||
(C) COPYRIGHT 2002, Critical Path
|
||||
======================================================================*/
|
||||
|
||||
package net.cp.jlibical;
|
||||
|
||||
/** struct icaldurationtype */
|
||||
public class ICalDurationType
|
||||
{
|
||||
/**
|
||||
* Constructor for pre-existing native icaldurationtype.
|
||||
* @param obj c++ pointer
|
||||
*/
|
||||
ICalDurationType(long obj)
|
||||
{
|
||||
init(obj);
|
||||
}
|
||||
|
||||
/**
|
||||
* Constructor for default ICalDurationType
|
||||
*/
|
||||
public ICalDurationType()
|
||||
{
|
||||
}
|
||||
|
||||
public void setIs_neg(int lcl_arg0)
|
||||
{
|
||||
is_neg = lcl_arg0;
|
||||
}
|
||||
public int getIs_neg()
|
||||
{
|
||||
return is_neg;
|
||||
}
|
||||
|
||||
public void setDays(long lcl_arg0)
|
||||
{
|
||||
days = lcl_arg0;
|
||||
}
|
||||
public long getDays()
|
||||
{
|
||||
return days;
|
||||
}
|
||||
|
||||
public void setWeeks(long lcl_arg0)
|
||||
{
|
||||
weeks = lcl_arg0;
|
||||
}
|
||||
public long getWeeks()
|
||||
{
|
||||
return weeks;
|
||||
}
|
||||
|
||||
public void setHours(long lcl_arg0)
|
||||
{
|
||||
hours = lcl_arg0;
|
||||
}
|
||||
public long getHours()
|
||||
{
|
||||
return hours;
|
||||
}
|
||||
|
||||
public void setMinutes(long lcl_arg0)
|
||||
{
|
||||
minutes = lcl_arg0;
|
||||
}
|
||||
public long getMinutes()
|
||||
{
|
||||
return minutes;
|
||||
}
|
||||
|
||||
public void setSeconds(long lcl_arg0)
|
||||
{
|
||||
seconds = lcl_arg0;
|
||||
}
|
||||
public long getSeconds()
|
||||
{
|
||||
return seconds;
|
||||
}
|
||||
|
||||
// --------------------------------------------------------
|
||||
// Initialization
|
||||
// --------------------------------------------------------
|
||||
|
||||
/**
|
||||
* native code inits from an existing struct.
|
||||
*/
|
||||
private native void init(long aDuration);
|
||||
|
||||
/**
|
||||
* optimization: init field id cache,
|
||||
*/
|
||||
private native static void initFIDs();
|
||||
|
||||
/**
|
||||
* load the jni library for this class
|
||||
*/
|
||||
static {
|
||||
System.loadLibrary("ical_jni");
|
||||
initFIDs();
|
||||
}
|
||||
|
||||
// --------------------------------------------------------
|
||||
// Fields
|
||||
// --------------------------------------------------------
|
||||
|
||||
private int is_neg;
|
||||
private long days; // unsigned int
|
||||
private long weeks; // unsigned int
|
||||
private long hours; // unsigned int
|
||||
private long minutes; // unsigned int
|
||||
private long seconds; // unsigned int
|
||||
}
|
@ -1,259 +0,0 @@
|
||||
/*======================================================================
|
||||
FILE: ICalParameter.java
|
||||
CREATOR: gnorman 01/09/02
|
||||
(C) COPYRIGHT 2002, Critical Path
|
||||
======================================================================*/
|
||||
|
||||
package net.cp.jlibical;
|
||||
|
||||
public class ICalParameter
|
||||
{
|
||||
/** It's not typesafe, but it's simple to understand! */
|
||||
public interface ICalParameterKind
|
||||
{
|
||||
// icalparameter_kind
|
||||
int ICAL_ANY_PARAMETER = 0;
|
||||
int ICAL_ALTREP_PARAMETER = 1;
|
||||
int ICAL_CN_PARAMETER = 2;
|
||||
int ICAL_CUTYPE_PARAMETER = 3;
|
||||
int ICAL_DELEGATEDFROM_PARAMETER = 4;
|
||||
int ICAL_DELEGATEDTO_PARAMETER = 5;
|
||||
int ICAL_DIR_PARAMETER = 6;
|
||||
int ICAL_ENCODING_PARAMETER = 7;
|
||||
int ICAL_FBTYPE_PARAMETER = 8;
|
||||
int ICAL_FMTTYPE_PARAMETER = 9;
|
||||
int ICAL_LANGUAGE_PARAMETER = 10;
|
||||
int ICAL_MEMBER_PARAMETER = 11;
|
||||
int ICAL_PARTSTAT_PARAMETER = 12;
|
||||
int ICAL_RANGE_PARAMETER = 13;
|
||||
int ICAL_RELATED_PARAMETER = 14;
|
||||
int ICAL_RELTYPE_PARAMETER = 15;
|
||||
int ICAL_RIGHTREF_PARAMETER = 16;
|
||||
int ICAL_ROLE_PARAMETER = 17;
|
||||
int ICAL_RSVP_PARAMETER = 18;
|
||||
int ICAL_SENTBY_PARAMETER = 19;
|
||||
int ICAL_TZID_PARAMETER = 20;
|
||||
int ICAL_VALUE_PARAMETER = 21;
|
||||
int ICAL_WKST_PARAMETER = 22;
|
||||
int ICAL_X_PARAMETER = 23;
|
||||
int ICAL_XLICCOMPARETYPE_PARAMETER = 24;
|
||||
int ICAL_XLICERRORTYPE_PARAMETER = 25;
|
||||
int ICAL_NO_PARAMETER = 26;
|
||||
}
|
||||
|
||||
/** It's not typesafe, but it's simple to understand! */
|
||||
public interface ICalParameterEncoding
|
||||
{
|
||||
// icalparameter_encoding
|
||||
int ICAL_ENCODING_X = 20007;
|
||||
int ICAL_ENCODING_8BIT = 20008;
|
||||
int ICAL_ENCODING_BASE64 = 20009;
|
||||
int ICAL_ENCODING_NONE = 20010;
|
||||
}
|
||||
|
||||
public interface ICalParameterPartStat {
|
||||
int ICAL_PARTSTAT_X = 20017;
|
||||
int ICAL_PARTSTAT_NEEDSACTION = 20018;
|
||||
int ICAL_PARTSTAT_ACCEPTED = 20019;
|
||||
int ICAL_PARTSTAT_DECLINED = 20020;
|
||||
int ICAL_PARTSTAT_TENTATIVE = 20021;
|
||||
int ICAL_PARTSTAT_DELEGATED = 20022;
|
||||
int ICAL_PARTSTAT_COMPLETED = 20023;
|
||||
int ICAL_PARTSTAT_INPROCESS = 20024;
|
||||
int ICAL_PARTSTAT_NONE = 20025;
|
||||
}
|
||||
|
||||
public interface ICalParameterRole {
|
||||
int ICAL_ROLE_X = 20047;
|
||||
int ICAL_ROLE_CHAIR = 20048;
|
||||
int ICAL_ROLE_REQPARTICIPANT = 20049;
|
||||
int ICAL_ROLE_OPTPARTICIPANT = 20050;
|
||||
int ICAL_ROLE_NONPARTICIPANT = 20051;
|
||||
int ICAL_ROLE_NONE = 20052;
|
||||
}
|
||||
|
||||
/**
|
||||
* Constructor for ICalParameter
|
||||
* @param obj c++ pointer
|
||||
*/
|
||||
private ICalParameter(long obj)
|
||||
{
|
||||
init(obj);
|
||||
}
|
||||
|
||||
/**
|
||||
* Constructor for ICalParameter
|
||||
*/
|
||||
public ICalParameter()
|
||||
{
|
||||
init();
|
||||
}
|
||||
|
||||
/**
|
||||
* Create instance from a string of form "PARAMNAME=VALUE"
|
||||
*/
|
||||
public ICalParameter(String str)
|
||||
{
|
||||
init(str);
|
||||
}
|
||||
|
||||
/**
|
||||
* Create from just the value, the part after the "="
|
||||
*/
|
||||
public ICalParameter(/* ICalParameterKind */ int kind, String str)
|
||||
{
|
||||
init(kind,str);
|
||||
}
|
||||
|
||||
/**
|
||||
* Create empty value for specified kind
|
||||
*/
|
||||
public ICalParameter(/* ICalParameterKind */ int kind)
|
||||
{
|
||||
init(kind);
|
||||
}
|
||||
|
||||
/**
|
||||
* Return ical String representation
|
||||
*/
|
||||
public native String as_ical_string();
|
||||
|
||||
/**
|
||||
* Return true if this instance is valid
|
||||
*/
|
||||
//public native boolean is_valid();
|
||||
|
||||
/**
|
||||
* Return what kind of parameter this instance represents
|
||||
*/
|
||||
public native /* ICalParameterKind */ int isa();
|
||||
|
||||
/**
|
||||
* Return true if this is a parameter
|
||||
*/
|
||||
public native boolean isa_parameter(Object parameter);
|
||||
|
||||
/* Convert enumerations */
|
||||
//public native static String kind_to_string(/* ICalParameterKind */ int kind);
|
||||
//public native static /* ICalParameterKind */ int string_to_kind(String str);
|
||||
|
||||
/* DELEGATED-FROM */
|
||||
//public native String get_delegatedfrom();
|
||||
//public native void set_delegatedfrom(String v);
|
||||
|
||||
/* RELATED */
|
||||
//public native icalparameter_related get_related();
|
||||
//public native void set_related(icalparameter_related v);
|
||||
|
||||
/* SENT-BY */
|
||||
//public native String get_sentby();
|
||||
//public native void set_sentby(String v);
|
||||
|
||||
/* LANGUAGE */
|
||||
public native String get_language();
|
||||
public native void set_language(String v);
|
||||
|
||||
/* RELTYPE */
|
||||
//public native icalparameter_reltype get_reltype();
|
||||
//public native void set_reltype(icalparameter_reltype v);
|
||||
|
||||
/* ENCODING */
|
||||
public native /* ICalParameterEncoding */ int get_encoding();
|
||||
public native void set_encoding(/* ICalParameterEncoding */ int v);
|
||||
|
||||
/* ALTREP */
|
||||
//public native String get_altrep();
|
||||
//public native void set_altrep(String v);
|
||||
|
||||
/* FMTTYPE */
|
||||
//public native String get_fmttype();
|
||||
//public native void set_fmttype(String v);
|
||||
|
||||
/* FBTYPE */
|
||||
//public native icalparameter_fbtype get_fbtype();
|
||||
//public native void set_fbtype(icalparameter_fbtype v);
|
||||
|
||||
/* RSVP */
|
||||
//public native icalparameter_rsvp get_rsvp();
|
||||
//public native void set_rsvp(icalparameter_rsvp v);
|
||||
|
||||
/* RANGE */
|
||||
//public native icalparameter_range get_range();
|
||||
//public native void set_range(icalparameter_range v);
|
||||
|
||||
/* DELEGATED-TO */
|
||||
//public native String get_delegatedto();
|
||||
//public native void set_delegatedto(String v);
|
||||
|
||||
/* CN */
|
||||
//public native String get_cn();
|
||||
//public native void set_cn(String v);
|
||||
|
||||
/* ROLE */
|
||||
public native /* ICalParameterRole */ int get_role();
|
||||
public native void set_role(/* ICalParameterRole */ int v);
|
||||
|
||||
/* X-LIC-COMPARETYPE */
|
||||
//public native icalparameter_xliccomparetype get_xliccomparetype();
|
||||
//public native void set_xliccomparetype(icalparameter_xliccomparetype v);
|
||||
|
||||
/* PARTSTAT */
|
||||
public native /* ICalParameterPartStat */ int get_partstat();
|
||||
public native void set_partstat(/* ICalParameterPartStat */ int v);
|
||||
|
||||
/* X-LIC-ERRORTYPE */
|
||||
//public native icalparameter_xlicerrortype get_xlicerrortype();
|
||||
//public native void set_xlicerrortype(icalparameter_xlicerrortype v);
|
||||
|
||||
/* MEMBER */
|
||||
//public native String get_member();
|
||||
//public native void set_member(String v);
|
||||
|
||||
/* X */
|
||||
//public native String get_x();
|
||||
//public native void set_x(String v);
|
||||
|
||||
/* CUTYPE */
|
||||
//public native icalparameter_cutype get_cutype();
|
||||
//public native void set_cutype(icalparameter_cutype v);
|
||||
|
||||
/* TZID */
|
||||
//public native String get_tzid();
|
||||
//public native void set_tzid(String v);
|
||||
|
||||
/* VALUE */
|
||||
//public native /* ICalParameterValue */ int get_value();
|
||||
//public native void set_value(/* ICalParameterValue */ int v);
|
||||
|
||||
/* DIR */
|
||||
//public native String get_dir();
|
||||
//public native void set_dir(String v);
|
||||
|
||||
/**
|
||||
* init the native class
|
||||
*/
|
||||
private void init(long obj)
|
||||
{
|
||||
m_Obj = obj;
|
||||
}
|
||||
|
||||
private native void init();
|
||||
private native void init(String str);
|
||||
private native void init(/* ICalParameterKind */ int kind, String str);
|
||||
private native void init(/* ICalParameterKind */ int kind);
|
||||
|
||||
/**
|
||||
* load the jni library for this class
|
||||
*/
|
||||
static {
|
||||
System.loadLibrary("ical_jni");
|
||||
}
|
||||
|
||||
public static void main(String[] args)
|
||||
{
|
||||
System.out.println("*** ICalParameter main called ok.");
|
||||
}
|
||||
|
||||
/** pointer to C++ object */
|
||||
private long m_Obj = 0;
|
||||
}
|
@ -1,71 +0,0 @@
|
||||
/*======================================================================
|
||||
FILE: ICalPeriodType.java
|
||||
CREATOR: structConverter 01/11/02
|
||||
======================================================================*/
|
||||
|
||||
package net.cp.jlibical;
|
||||
|
||||
public class ICalPeriodType
|
||||
{
|
||||
public ICalPeriodType(long obj)
|
||||
{
|
||||
init(obj);
|
||||
}
|
||||
|
||||
public ICalPeriodType()
|
||||
{
|
||||
}
|
||||
|
||||
public ICalPeriodType(long aStart, long aEnd, long aDuration)
|
||||
{
|
||||
init(aStart, aEnd, aDuration);
|
||||
}
|
||||
|
||||
public void setStart(ICalTimeType lcl_arg0)
|
||||
{
|
||||
start = lcl_arg0;
|
||||
}
|
||||
public ICalTimeType getStart()
|
||||
{
|
||||
return start;
|
||||
}
|
||||
|
||||
public void setEnd(ICalTimeType lcl_arg0)
|
||||
{
|
||||
end = lcl_arg0;
|
||||
}
|
||||
public ICalTimeType getEnd()
|
||||
{
|
||||
return end;
|
||||
}
|
||||
|
||||
public void setDuration(ICalDurationType lcl_arg0)
|
||||
{
|
||||
duration = lcl_arg0;
|
||||
}
|
||||
public ICalDurationType getDuration()
|
||||
{
|
||||
return duration;
|
||||
}
|
||||
|
||||
private void init(long aStart, long aEnd, long aDuration)
|
||||
{
|
||||
start = new ICalTimeType(aStart);
|
||||
end = new ICalTimeType(aEnd);
|
||||
duration = new ICalDurationType(aDuration);
|
||||
}
|
||||
|
||||
private native void init(long obj);
|
||||
|
||||
private native static void initFIDs();
|
||||
|
||||
static {
|
||||
System.loadLibrary("ical_jni");
|
||||
initFIDs();
|
||||
}
|
||||
|
||||
private ICalTimeType start = new ICalTimeType();
|
||||
private ICalTimeType end = new ICalTimeType();
|
||||
private ICalDurationType duration = new ICalDurationType();
|
||||
}
|
||||
|
@ -1,507 +0,0 @@
|
||||
/*======================================================================
|
||||
FILE: ICalProperty.java
|
||||
CREATOR: gnorman 01/09/02
|
||||
(C) COPYRIGHT 2002, Critical Path
|
||||
======================================================================*/
|
||||
|
||||
package net.cp.jlibical;
|
||||
|
||||
public class ICalProperty
|
||||
{
|
||||
/** It's not typesafe, but it's simple to understand! */
|
||||
public interface ICalPropertyMethod
|
||||
{
|
||||
// icalproperty_method
|
||||
int ICAL_METHOD_X = 10011;
|
||||
int ICAL_METHOD_PUBLISH = 10012;
|
||||
int ICAL_METHOD_REQUEST = 10013;
|
||||
int ICAL_METHOD_REPLY = 10014;
|
||||
int ICAL_METHOD_ADD = 10015;
|
||||
int ICAL_METHOD_CANCEL = 10016;
|
||||
int ICAL_METHOD_REFRESH = 10017;
|
||||
int ICAL_METHOD_COUNTER = 10018;
|
||||
int ICAL_METHOD_DECLINECOUNTER = 10019;
|
||||
int ICAL_METHOD_CREATE = 10020;
|
||||
int ICAL_METHOD_READ = 10021;
|
||||
int ICAL_METHOD_RESPONSE = 10022;
|
||||
int ICAL_METHOD_MOVE = 10023;
|
||||
int ICAL_METHOD_MODIFY = 10024;
|
||||
int ICAL_METHOD_GENERATEUID = 10025;
|
||||
int ICAL_METHOD_DELETE = 10026;
|
||||
int ICAL_METHOD_NONE = 10027;
|
||||
}
|
||||
|
||||
/** It's not typesafe, but it's simple to understand! */
|
||||
public interface ICalPropertyAction
|
||||
{
|
||||
// icalproperty_action
|
||||
int ICAL_ACTION_X = 10000;
|
||||
int ICAL_ACTION_AUDIO = 10001;
|
||||
int ICAL_ACTION_DISPLAY = 10002;
|
||||
int ICAL_ACTION_EMAIL = 10003;
|
||||
int ICAL_ACTION_PROCEDURE = 10004;
|
||||
int ICAL_ACTION_NONE = 10005;
|
||||
}
|
||||
|
||||
/** It's not typesafe, but it's simple to understand! */
|
||||
public interface ICalPropertyKind
|
||||
{
|
||||
// icalproperty_kind
|
||||
int ICAL_ANY_PROPERTY = 0;
|
||||
int ICAL_ACTION_PROPERTY=1;
|
||||
int ICAL_ALLOWCONFLICT_PROPERTY=2;
|
||||
int ICAL_ATTACH_PROPERTY=3;
|
||||
int ICAL_ATTENDEE_PROPERTY=4;
|
||||
int ICAL_CALID_PROPERTY=5;
|
||||
int ICAL_CALMASTER_PROPERTY=6;
|
||||
int ICAL_CALSCALE_PROPERTY=7;
|
||||
int ICAL_CARID_PROPERTY=8;
|
||||
int ICAL_CATEGORIES_PROPERTY=9;
|
||||
int ICAL_CLASS_PROPERTY=10;
|
||||
int ICAL_COMMENT_PROPERTY=11;
|
||||
int ICAL_COMPLETED_PROPERTY=12;
|
||||
int ICAL_CONTACT_PROPERTY=13;
|
||||
int ICAL_CREATED_PROPERTY=14;
|
||||
int ICAL_DATEFORMAT_PROPERTY=15;
|
||||
int ICAL_DECREED_PROPERTY=16;
|
||||
int ICAL_DEFAULTCHARSET_PROPERTY=17;
|
||||
int ICAL_DEFAULTLOCALE_PROPERTY=18;
|
||||
int ICAL_DEFAULTTZID_PROPERTY=19;
|
||||
int ICAL_DESCRIPTION_PROPERTY=20;
|
||||
int ICAL_DTEND_PROPERTY=21;
|
||||
int ICAL_DTSTAMP_PROPERTY=22;
|
||||
int ICAL_DTSTART_PROPERTY=23;
|
||||
int ICAL_DUE_PROPERTY=24;
|
||||
int ICAL_DURATION_PROPERTY=25;
|
||||
int ICAL_EXDATE_PROPERTY=26;
|
||||
int ICAL_EXPAND_PROPERTY=27;
|
||||
int ICAL_EXRULE_PROPERTY=28;
|
||||
int ICAL_FREEBUSY_PROPERTY=29;
|
||||
int ICAL_GEO_PROPERTY=30;
|
||||
int ICAL_GRANT_PROPERTY=31;
|
||||
int ICAL_LASTMODIFIED_PROPERTY=32;
|
||||
int ICAL_LOCATION_PROPERTY=33;
|
||||
int ICAL_MAXRESULTS_PROPERTY=34;
|
||||
int ICAL_MAXRESULTSSIZE_PROPERTY=35;
|
||||
int ICAL_METHOD_PROPERTY=36;
|
||||
int ICAL_ORGANIZER_PROPERTY=37;
|
||||
int ICAL_OWNER_PROPERTY=38;
|
||||
int ICAL_PERCENTCOMPLETE_PROPERTY=39;
|
||||
int ICAL_PRIORITY_PROPERTY=40;
|
||||
int ICAL_PRODID_PROPERTY=41;
|
||||
int ICAL_QUERY_PROPERTY=42;
|
||||
int ICAL_QUERYNAME_PROPERTY=43;
|
||||
int ICAL_RDATE_PROPERTY=44;
|
||||
int ICAL_RECURRENCEID_PROPERTY=45;
|
||||
int ICAL_RELATEDTO_PROPERTY=46;
|
||||
int ICAL_RELCALID_PROPERTY=47;
|
||||
int ICAL_REPEAT_PROPERTY=48;
|
||||
int ICAL_REQUESTSTATUS_PROPERTY=49;
|
||||
int ICAL_RESOURCES_PROPERTY=50;
|
||||
int ICAL_RRULE_PROPERTY=51;
|
||||
int ICAL_SCOPE_PROPERTY=52;
|
||||
int ICAL_SEQUENCE_PROPERTY=53;
|
||||
int ICAL_STATUS_PROPERTY=54;
|
||||
int ICAL_SUMMARY_PROPERTY=55;
|
||||
int ICAL_TARGET_PROPERTY=56;
|
||||
int ICAL_TIMEFORMAT_PROPERTY=57;
|
||||
int ICAL_TRANSP_PROPERTY=58;
|
||||
int ICAL_TRIGGER_PROPERTY=59;
|
||||
int ICAL_TZID_PROPERTY=60;
|
||||
int ICAL_TZNAME_PROPERTY=61;
|
||||
int ICAL_TZOFFSETFROM_PROPERTY=62;
|
||||
int ICAL_TZOFFSETTO_PROPERTY=63;
|
||||
int ICAL_TZURL_PROPERTY=64;
|
||||
int ICAL_UID_PROPERTY=65;
|
||||
int ICAL_URL_PROPERTY=66;
|
||||
int ICAL_VERSION_PROPERTY=67;
|
||||
int ICAL_X_PROPERTY=68;
|
||||
int ICAL_XLICCLASS_PROPERTY=69;
|
||||
int ICAL_XLICCLUSTERCOUNT_PROPERTY=70;
|
||||
int ICAL_XLICERROR_PROPERTY=71;
|
||||
int ICAL_XLICMIMECHARSET_PROPERTY=72;
|
||||
int ICAL_XLICMIMECID_PROPERTY=73;
|
||||
int ICAL_XLICMIMECONTENTTYPE_PROPERTY=74;
|
||||
int ICAL_XLICMIMEENCODING_PROPERTY=75;
|
||||
int ICAL_XLICMIMEFILENAME_PROPERTY=76;
|
||||
int ICAL_XLICMIMEOPTINFO_PROPERTY=77;
|
||||
int ICAL_NO_PROPERTY=78;
|
||||
}
|
||||
|
||||
public interface ICalPropertyStatus
|
||||
{
|
||||
// icalproperty_status
|
||||
int ICAL_STATUS_X = 10028;
|
||||
int ICAL_STATUS_TENTATIVE = 10029;
|
||||
int ICAL_STATUS_CONFIRMED = 10030;
|
||||
int ICAL_STATUS_COMPLETED = 10031;
|
||||
int ICAL_STATUS_NEEDSACTION = 10032;
|
||||
int ICAL_STATUS_CANCELLED = 10033;
|
||||
int ICAL_STATUS_INPROCESS = 10034;
|
||||
int ICAL_STATUS_DRAFT = 10035;
|
||||
int ICAL_STATUS_FINAL = 10036;
|
||||
int ICAL_STATUS_NONE = 10037;
|
||||
}
|
||||
|
||||
/**
|
||||
* Constructor for ICalProperty
|
||||
* @param obj c++ pointer
|
||||
*/
|
||||
private ICalProperty(long obj)
|
||||
{
|
||||
init(obj);
|
||||
}
|
||||
|
||||
public ICalProperty()
|
||||
{
|
||||
init();
|
||||
}
|
||||
|
||||
public ICalProperty(String str)
|
||||
{
|
||||
init(str);
|
||||
}
|
||||
|
||||
public ICalProperty(/* ICalPropertyKind */ int kind)
|
||||
{
|
||||
init(kind);
|
||||
}
|
||||
|
||||
public native String as_ical_string();
|
||||
public native /* ICalPropertyKind */ int isa();
|
||||
public native boolean isa_property(Object property);
|
||||
|
||||
public native void add_parameter(ICalParameter parameter);
|
||||
public native void set_parameter(ICalParameter parameter);
|
||||
public native void set_parameter_from_string(String name, String val);
|
||||
public native String get_parameter_as_string(String name);
|
||||
public native void remove_parameter(/* ICalParameterKind */ int kind);
|
||||
public native int count_parameters();
|
||||
|
||||
/* Iterate through the parameters */
|
||||
public native ICalParameter get_first_parameter(/* ICalParameterKind */ int kind);
|
||||
public native ICalParameter get_next_parameter(/* ICalParameterKind */ int kind);
|
||||
|
||||
/* Access the value of the property */
|
||||
public native void set_value(ICalValue val);
|
||||
public native void set_value_from_string(String val, String kind);
|
||||
|
||||
public native ICalValue get_value();
|
||||
public native String get_value_as_string();
|
||||
|
||||
/* Return the name of the property -- the type name converted to a
|
||||
String, or the value of get_x_name if the type is X property
|
||||
*/
|
||||
public native String get_name();
|
||||
|
||||
/* Deal with X properties */
|
||||
//static void set_x_name(ICalProperty prop, String name);
|
||||
//static String get_x_name(ICalProperty prop);
|
||||
|
||||
//public native static /* ICalValueKind */ int icalparameter_value_to_value_kind(/* ICalParameterValue */ int val);
|
||||
|
||||
/* Convert kinds to String and get default value type */
|
||||
//public native static /* ICalValueKind */ int kind_to_value_kind(/* ICalPropertyKind */ int kind);
|
||||
//public native static /* ICalValueKind */ int value_kind_to_kind(/* ICalValueKind */ int kind);
|
||||
//public native static String kind_to_string(/* ICalPropertyKind */ int kind);
|
||||
//public native static /* ICalPropertyKind */ int string_to_kind(String str);
|
||||
|
||||
//public native static /* ICalPropertyMethod */ int string_to_method(String str);
|
||||
//public native static String method_to_string(/* ICalPropertyMethod */ int method);
|
||||
|
||||
//public native static String enum_to_string(int e);
|
||||
//public native static int string_to_enum(String str);
|
||||
|
||||
//public native static String status_to_string(/* ICalPropertyStatus */ int status);
|
||||
//public native static /* ICalPropertyStatus */ int string_to_status(String str);
|
||||
|
||||
//public native static int enum_belongs_to_property(/* ICalPropertyKind */ int kind, int e);
|
||||
|
||||
/* ACTION */
|
||||
public native void set_action(/* ICalPropertyAction */ int v);
|
||||
public native /* ICalPropertyAction */ int get_action();
|
||||
|
||||
/* ATTACH */
|
||||
//void set_attach(struct icalattachtype v);
|
||||
//struct icalattachtype get_attach();
|
||||
|
||||
/* ATTENDEE */
|
||||
public native void set_attendee(String val);
|
||||
public native String get_attendee();
|
||||
|
||||
/* CALSCALE */
|
||||
//public native void set_calscale(String val);
|
||||
//public native String get_calscale();
|
||||
|
||||
/* CATEGORIES */
|
||||
//public native void set_categories(String val);
|
||||
//public native String get_categories();
|
||||
|
||||
/* CLASS */
|
||||
//public native void set_class(String val);
|
||||
//public native String get_class();
|
||||
|
||||
/* COMMENT */
|
||||
public native void set_comment(String val);
|
||||
public native String get_comment();
|
||||
|
||||
/* COMPLETED */
|
||||
//void set_completed(ICalTimeType val);
|
||||
//ICalTimeType get_completed();
|
||||
|
||||
/* CONTACT */
|
||||
//public native void set_contact(String val);
|
||||
//public native String get_contact();
|
||||
|
||||
/* CREATED */
|
||||
//void set_created(ICalTimeType val);
|
||||
//ICalTimeType get_created();
|
||||
|
||||
/* DESCRIPTION */
|
||||
public native void set_description(String val);
|
||||
public native String get_description();
|
||||
|
||||
/* DTEND */
|
||||
public native void set_dtend(ICalTimeType val);
|
||||
public native ICalTimeType get_dtend();
|
||||
|
||||
/* DTSTAMP */
|
||||
public native void set_dtstamp(ICalTimeType val);
|
||||
public native ICalTimeType get_dtstamp();
|
||||
|
||||
/* DTSTART */
|
||||
public native void set_dtstart(ICalTimeType val);
|
||||
public native ICalTimeType get_dtstart();
|
||||
|
||||
/* DUE */
|
||||
public native void set_due(ICalTimeType val);
|
||||
public native ICalTimeType get_due();
|
||||
|
||||
/* DURATION */
|
||||
public native void set_duration(ICalDurationType val);
|
||||
public native ICalDurationType get_duration();
|
||||
|
||||
/* EXDATE */
|
||||
public native void set_exdate(ICalTimeType val);
|
||||
public native ICalTimeType get_exdate();
|
||||
|
||||
/* EXRULE */
|
||||
public native void set_exrule(ICalRecurrenceType val);
|
||||
public native ICalRecurrenceType get_exrule();
|
||||
|
||||
/* EXPAND */
|
||||
public void set_expand(int val) {} // @-@:p0 TMA TODO
|
||||
public int get_expand() {return 0;} // @-@:p0 TMA TODO
|
||||
|
||||
/* FREEBUSY */
|
||||
public native void set_freebusy(ICalPeriodType val);
|
||||
public native ICalPeriodType get_freebusy();
|
||||
|
||||
/* GEO */
|
||||
//void set_geo(struct icalgeotype val);
|
||||
//struct icalgeotype get_geo();
|
||||
|
||||
/* LAST-MODIFIED */
|
||||
//void set_lastmodified(ICalTimeType val);
|
||||
//ICalTimeType get_lastmodified();
|
||||
|
||||
/* LOCATION */
|
||||
public native void set_location(String val);
|
||||
public native String get_location();
|
||||
|
||||
/* MAXRESULTS */
|
||||
//public native void set_maxresults(int val);
|
||||
//public native int get_maxresults();
|
||||
|
||||
/* MAXRESULTSSIZE */
|
||||
//public native void set_maxresultsize(int val);
|
||||
//public native int get_maxresultsize();
|
||||
|
||||
/* METHOD */
|
||||
public native void set_method(/* ICalPropertyMethod */ int val);
|
||||
public native /* ICalPropertyMethod */ int get_method();
|
||||
|
||||
/* ORGANIZER */
|
||||
public native void set_organizer(String val);
|
||||
public native String get_organizer();
|
||||
|
||||
/* OWNER */
|
||||
public native void set_owner(String val);
|
||||
public native String get_owner();
|
||||
|
||||
/* PERCENT-COMPLETE */
|
||||
//void set_percentcomplete(int val);
|
||||
//int get_percentcomplete();
|
||||
|
||||
/* PRIORITY */
|
||||
//void set_priority(int val);
|
||||
//int get_priority();
|
||||
|
||||
/* PRODID */
|
||||
public native void set_prodid(String val);
|
||||
public native String get_prodid();
|
||||
|
||||
/* QUERY */
|
||||
public native void set_query(String val);
|
||||
public native String get_query();
|
||||
|
||||
/* QUERYNAME */
|
||||
public native void set_queryname(String val);
|
||||
public native String get_queryname();
|
||||
|
||||
/* RDATE */
|
||||
//void set_rdate(struct icaldatetimeperiodtype val);
|
||||
//struct icaldatetimeperiodtype get_rdate();
|
||||
|
||||
/* RECURRENCE-ID */
|
||||
public native void set_recurrenceid(ICalTimeType val);
|
||||
public native ICalTimeType get_recurrenceid();
|
||||
|
||||
/* RELATED-TO */
|
||||
//public native void set_relatedto(String val);
|
||||
//public native String get_relatedto();
|
||||
|
||||
/* RELCALID */
|
||||
public native void set_relcalid(String val);
|
||||
public native String get_relcalid();
|
||||
|
||||
/* REPEAT */
|
||||
public native void set_repeat(int val);
|
||||
public native int get_repeat();
|
||||
|
||||
/* REQUEST-STATUS */
|
||||
//public native void set_requeststatus(String val);
|
||||
//public native String get_requeststatus();
|
||||
|
||||
/* RESOURCES */
|
||||
//public native void set_resources(String val);
|
||||
//public native String get_resources();
|
||||
|
||||
/* RRULE */
|
||||
public native void set_rrule(ICalRecurrenceType val);
|
||||
public native ICalRecurrenceType get_rrule();
|
||||
|
||||
/* SCOPE */
|
||||
//public native void set_scope(String val);
|
||||
//public native String get_scope();
|
||||
|
||||
/* SEQUENCE */
|
||||
//public native void set_sequence(int val);
|
||||
//public native int get_sequence();
|
||||
|
||||
/* STATUS */
|
||||
public native void set_status(/* ICalPropertyStatus */ int val);
|
||||
public native /* ICalPropertyStatus */ int get_status();
|
||||
|
||||
/* SUMMARY */
|
||||
public native void set_summary(String val);
|
||||
public native String get_summary();
|
||||
|
||||
/* TARGET */
|
||||
public native void set_target(String val);
|
||||
public native String get_target();
|
||||
|
||||
/* TRANSP */
|
||||
//public native void set_transp(String val);
|
||||
//public native String get_transp();
|
||||
|
||||
/* TRIGGER */
|
||||
public native void set_trigger(ICalTriggerType val);
|
||||
public native ICalTriggerType get_trigger();
|
||||
|
||||
/* TZID */
|
||||
public native void set_tzid(String val);
|
||||
public native String get_tzid();
|
||||
|
||||
/* TZNAME */
|
||||
//public native void set_tzname(String val);
|
||||
//public native String get_tzname();
|
||||
|
||||
/* TZOFFSETFROM */
|
||||
//public native void set_tzoffsetfrom(int val);
|
||||
//public native int get_tzoffsetfrom();
|
||||
|
||||
|
||||
/* TZOFFSETTO */
|
||||
//public native void set_tzoffsetto(int val);
|
||||
//public native int get_tzoffsetto();
|
||||
|
||||
/* TZURL */
|
||||
//public native void set_tzurl(String val);
|
||||
//public native String get_tzurl();
|
||||
|
||||
/* UID */
|
||||
public native void set_uid(String val);
|
||||
public native String get_uid();
|
||||
|
||||
/* URL */
|
||||
//public native void set_url(String val);
|
||||
//public native String get_url();
|
||||
|
||||
/* VERSION */
|
||||
//public native void set_version(String val);
|
||||
//public native String get_version();
|
||||
|
||||
/* X */
|
||||
//void set_x(String val);
|
||||
//String get_x();
|
||||
|
||||
/* X-LIC-CLUSTERCOUNT */
|
||||
//void set_xlicclustercount(String val);
|
||||
//String get_xlicclustercount();
|
||||
|
||||
/* X-LIC-ERROR */
|
||||
//void set_xlicerror(String val);
|
||||
//String get_xlicerror();
|
||||
|
||||
/* X-LIC-MIMECHARSET */
|
||||
//void set_xlicmimecharset(String val);
|
||||
//String get_xlicmimecharset();
|
||||
|
||||
/* X-LIC-MIMECID */
|
||||
//void set_xlicmimecid(String val);
|
||||
//String get_xlicmimecid();
|
||||
|
||||
/* X-LIC-MIMECONTENTTYPE */
|
||||
//void set_xlicmimecontenttype(String val);
|
||||
//String get_xlicmimecontenttype();
|
||||
|
||||
/* X-LIC-MIMEENCODING */
|
||||
//void set_xlicmimeencoding(String val);
|
||||
//String get_xlicmimeencoding();
|
||||
|
||||
/* X-LIC-MIMEFILENAME */
|
||||
//void set_xlicmimefilename(String val);
|
||||
//String get_xlicmimefilename();
|
||||
|
||||
/* X-LIC-MIMEOPTINFO */
|
||||
//void set_xlicmimeoptinfo(String val);
|
||||
//String get_xlicmimeoptinfo();
|
||||
|
||||
/**
|
||||
* init the native class
|
||||
*/
|
||||
private void init(long obj)
|
||||
{
|
||||
m_Obj = obj;
|
||||
}
|
||||
|
||||
private native void init();
|
||||
private native void init(String str);
|
||||
private native void init(/* ICalPropertyKind */ int kind);
|
||||
|
||||
/**
|
||||
* load the jni library for this class
|
||||
*/
|
||||
static {
|
||||
System.loadLibrary("ical_jni");
|
||||
}
|
||||
|
||||
public static void main(String[] args)
|
||||
{
|
||||
System.out.println("*** ICalProperty main called ok.");
|
||||
}
|
||||
|
||||
/** pointer to C++ object */
|
||||
private long m_Obj = 0;
|
||||
}
|
@ -1,284 +0,0 @@
|
||||
/*======================================================================
|
||||
FILE: ICalRecurrenceType.java
|
||||
CREATOR: structConverter 01/11/02
|
||||
======================================================================*/
|
||||
|
||||
package net.cp.jlibical;
|
||||
|
||||
public class ICalRecurrenceType
|
||||
{
|
||||
public interface ICalRecurrenceTypeFrequency
|
||||
{
|
||||
int ICAL_SECONDLY_RECURRENCE=0;
|
||||
int ICAL_MINUTELY_RECURRENCE=1;
|
||||
int ICAL_HOURLY_RECURRENCE=2;
|
||||
int ICAL_DAILY_RECURRENCE=3;
|
||||
int ICAL_WEEKLY_RECURRENCE=4;
|
||||
int ICAL_MONTHLY_RECURRENCE=5;
|
||||
int ICAL_YEARLY_RECURRENCE=6;
|
||||
int ICAL_NO_RECURRENCE=7;
|
||||
}
|
||||
|
||||
public interface ICalRecurrenceTypeWeekday
|
||||
{
|
||||
int ICAL_NO_WEEKDAY=0;
|
||||
int ICAL_SUNDAY_WEEKDAY=1;
|
||||
int ICAL_MONDAY_WEEKDAY=2;
|
||||
int ICAL_TUESDAY_WEEKDAY=3;
|
||||
int ICAL_WEDNESDAY_WEEKDAY=4;
|
||||
int ICAL_THURSDAY_WEEKDAY=5;
|
||||
int ICAL_FRIDAY_WEEKDAY=6;
|
||||
int ICAL_SATURDAY_WEEKDAY=7;
|
||||
}
|
||||
|
||||
ICalRecurrenceType(long obj)
|
||||
{
|
||||
init(obj);
|
||||
}
|
||||
|
||||
public ICalRecurrenceType()
|
||||
{
|
||||
}
|
||||
|
||||
public void setUntil(ICalTimeType lcl_arg0)
|
||||
{
|
||||
until = lcl_arg0;
|
||||
}
|
||||
public ICalTimeType getUntil()
|
||||
{
|
||||
return until;
|
||||
}
|
||||
|
||||
public void setFreq(int lcl_arg0)
|
||||
{
|
||||
freq = lcl_arg0;
|
||||
}
|
||||
public int getFreq()
|
||||
{
|
||||
return freq;
|
||||
}
|
||||
|
||||
public void setWeek_start(int lcl_arg0)
|
||||
{
|
||||
week_start = lcl_arg0;
|
||||
}
|
||||
public int getWeek_start()
|
||||
{
|
||||
return week_start;
|
||||
}
|
||||
|
||||
public void setCount(int lcl_arg0)
|
||||
{
|
||||
count = lcl_arg0;
|
||||
}
|
||||
public int getCount()
|
||||
{
|
||||
return count;
|
||||
}
|
||||
|
||||
public void setInterval(short lcl_arg0)
|
||||
{
|
||||
interval = lcl_arg0;
|
||||
}
|
||||
public short getInterval()
|
||||
{
|
||||
return interval;
|
||||
}
|
||||
|
||||
public void setBy_second(short[] lcl_arg0)
|
||||
{
|
||||
by_second = lcl_arg0;
|
||||
}
|
||||
|
||||
public void setBy_secondIndexed(int ix,short lcl_arg0)
|
||||
{
|
||||
by_second[ix] = lcl_arg0;
|
||||
}
|
||||
public short[] getBy_second()
|
||||
{
|
||||
return by_second;
|
||||
}
|
||||
public short getBy_secondIndexed(int ix)
|
||||
{
|
||||
return by_second[ix];
|
||||
}
|
||||
|
||||
public void setBy_minute(short[] lcl_arg0)
|
||||
{
|
||||
by_minute = lcl_arg0;
|
||||
}
|
||||
|
||||
public void setBy_minuteIndexed(int ix,short lcl_arg0)
|
||||
{
|
||||
by_minute[ix] = lcl_arg0;
|
||||
}
|
||||
public short[] getBy_minute()
|
||||
{
|
||||
return by_minute;
|
||||
}
|
||||
public short getBy_minuteIndexed(int ix)
|
||||
{
|
||||
return by_minute[ix];
|
||||
}
|
||||
|
||||
public void setBy_hour(short[] lcl_arg0)
|
||||
{
|
||||
by_hour = lcl_arg0;
|
||||
}
|
||||
|
||||
public void setBy_hourIndexed(int ix,short lcl_arg0)
|
||||
{
|
||||
by_hour[ix] = lcl_arg0;
|
||||
}
|
||||
public short[] getBy_hour()
|
||||
{
|
||||
return by_hour;
|
||||
}
|
||||
public short getBy_hourIndexed(int ix)
|
||||
{
|
||||
return by_hour[ix];
|
||||
}
|
||||
|
||||
public void setBy_day(short[] lcl_arg0)
|
||||
{
|
||||
by_day = lcl_arg0;
|
||||
}
|
||||
|
||||
public void setBy_dayIndexed(int ix,short lcl_arg0)
|
||||
{
|
||||
by_day[ix] = lcl_arg0;
|
||||
}
|
||||
public short[] getBy_day()
|
||||
{
|
||||
return by_day;
|
||||
}
|
||||
public short getBy_dayIndexed(int ix)
|
||||
{
|
||||
return by_day[ix];
|
||||
}
|
||||
|
||||
public void setBy_month_day(short[] lcl_arg0)
|
||||
{
|
||||
by_month_day = lcl_arg0;
|
||||
}
|
||||
|
||||
public void setBy_month_dayIndexed(int ix,short lcl_arg0)
|
||||
{
|
||||
by_month_day[ix] = lcl_arg0;
|
||||
}
|
||||
public short[] getBy_month_day()
|
||||
{
|
||||
return by_month_day;
|
||||
}
|
||||
public short getBy_month_dayIndexed(int ix)
|
||||
{
|
||||
return by_month_day[ix];
|
||||
}
|
||||
|
||||
public void setBy_year_day(short[] lcl_arg0)
|
||||
{
|
||||
by_year_day = lcl_arg0;
|
||||
}
|
||||
|
||||
public void setBy_year_dayIndexed(int ix,short lcl_arg0)
|
||||
{
|
||||
by_year_day[ix] = lcl_arg0;
|
||||
}
|
||||
public short[] getBy_year_day()
|
||||
{
|
||||
return by_year_day;
|
||||
}
|
||||
public short getBy_year_dayIndexed(int ix)
|
||||
{
|
||||
return by_year_day[ix];
|
||||
}
|
||||
|
||||
public void setBy_week_no(short[] lcl_arg0)
|
||||
{
|
||||
by_week_no = lcl_arg0;
|
||||
}
|
||||
|
||||
public void setBy_week_noIndexed(int ix,short lcl_arg0)
|
||||
{
|
||||
by_week_no[ix] = lcl_arg0;
|
||||
}
|
||||
public short[] getBy_week_no()
|
||||
{
|
||||
return by_week_no;
|
||||
}
|
||||
public short getBy_week_noIndexed(int ix)
|
||||
{
|
||||
return by_week_no[ix];
|
||||
}
|
||||
|
||||
public void setBy_month(short[] lcl_arg0)
|
||||
{
|
||||
by_month = lcl_arg0;
|
||||
}
|
||||
|
||||
public void setBy_monthIndexed(int ix,short lcl_arg0)
|
||||
{
|
||||
by_month[ix] = lcl_arg0;
|
||||
}
|
||||
public short[] getBy_month()
|
||||
{
|
||||
return by_month;
|
||||
}
|
||||
public short getBy_monthIndexed(int ix)
|
||||
{
|
||||
return by_month[ix];
|
||||
}
|
||||
|
||||
public void setBy_set_pos(short[] lcl_arg0)
|
||||
{
|
||||
by_set_pos = lcl_arg0;
|
||||
}
|
||||
|
||||
public void setBy_set_posIndexed(int ix,short lcl_arg0)
|
||||
{
|
||||
by_set_pos[ix] = lcl_arg0;
|
||||
}
|
||||
public short[] getBy_set_pos()
|
||||
{
|
||||
return by_set_pos;
|
||||
}
|
||||
public short getBy_set_posIndexed(int ix)
|
||||
{
|
||||
return by_set_pos[ix];
|
||||
}
|
||||
|
||||
private native void init(long obj);
|
||||
|
||||
private native static void initFIDs();
|
||||
|
||||
static {
|
||||
System.loadLibrary("ical_jni");
|
||||
initFIDs();
|
||||
}
|
||||
|
||||
private /* ICalRecurrenceTypeFrequency */ int freq;
|
||||
private /* ICalRecurrenceTypeWeekday */ int week_start;
|
||||
private int count;
|
||||
private short interval;
|
||||
private short[] by_second = new short[ICAL_BY_SECOND_SIZE]; // Converted from short[61]
|
||||
private short[] by_minute = new short[ICAL_BY_MINUTE_SIZE]; // Converted from short[61]
|
||||
private short[] by_hour = new short[ICAL_BY_HOUR_SIZE]; // Converted from short[25]
|
||||
private short[] by_day = new short[ICAL_BY_DAY_SIZE]; // Converted from short[364]
|
||||
private short[] by_month_day = new short[ICAL_BY_MONTHDAY_SIZE]; // Converted from short[32]
|
||||
private short[] by_year_day = new short[ICAL_BY_YEARDAY_SIZE]; // Converted from short[367]
|
||||
private short[] by_week_no = new short[ICAL_BY_WEEKNO_SIZE]; // Converted from short[54]
|
||||
private short[] by_month = new short[ICAL_BY_MONTH_SIZE]; // Converted from short[13]
|
||||
private short[] by_set_pos = new short[ICAL_BY_SETPOS_SIZE]; // Converted from short[367]
|
||||
private ICalTimeType until = new ICalTimeType();
|
||||
|
||||
public static final int ICAL_BY_SECOND_SIZE = 61;
|
||||
public static final int ICAL_BY_MINUTE_SIZE = 61;
|
||||
public static final int ICAL_BY_HOUR_SIZE = 25;
|
||||
public static final int ICAL_BY_DAY_SIZE = 364;
|
||||
public static final int ICAL_BY_MONTHDAY_SIZE = 32;
|
||||
public static final int ICAL_BY_YEARDAY_SIZE = 367;
|
||||
public static final int ICAL_BY_WEEKNO_SIZE = 54;
|
||||
public static final int ICAL_BY_MONTH_SIZE = 13;
|
||||
public static final int ICAL_BY_SETPOS_SIZE = 367;
|
||||
}
|
||||
|
@ -1,145 +0,0 @@
|
||||
/*======================================================================
|
||||
FILE: ICalTimeType.java
|
||||
CREATOR: structConverter 01/11/02
|
||||
(C) COPYRIGHT 2002, Critical Path
|
||||
======================================================================*/
|
||||
|
||||
package net.cp.jlibical;
|
||||
|
||||
/** struct icaltimetype */
|
||||
public class ICalTimeType
|
||||
{
|
||||
/**
|
||||
* Constructor for pre-existing native icaltimetype
|
||||
* @param obj c++ pointer
|
||||
*/
|
||||
ICalTimeType(long obj)
|
||||
{
|
||||
init(obj);
|
||||
}
|
||||
|
||||
/**
|
||||
* Constructor for default ICalTimeType
|
||||
*/
|
||||
public ICalTimeType()
|
||||
{
|
||||
}
|
||||
|
||||
public void setYear(int lcl_arg0)
|
||||
{
|
||||
year = lcl_arg0;
|
||||
}
|
||||
public int getYear()
|
||||
{
|
||||
return year;
|
||||
}
|
||||
|
||||
public void setMonth(int lcl_arg0)
|
||||
{
|
||||
month = lcl_arg0;
|
||||
}
|
||||
public int getMonth()
|
||||
{
|
||||
return month;
|
||||
}
|
||||
|
||||
public void setDay(int lcl_arg0)
|
||||
{
|
||||
day = lcl_arg0;
|
||||
}
|
||||
public int getDay()
|
||||
{
|
||||
return day;
|
||||
}
|
||||
|
||||
public void setHour(int lcl_arg0)
|
||||
{
|
||||
hour = lcl_arg0;
|
||||
}
|
||||
public int getHour()
|
||||
{
|
||||
return hour;
|
||||
}
|
||||
|
||||
public void setMinute(int lcl_arg0)
|
||||
{
|
||||
minute = lcl_arg0;
|
||||
}
|
||||
public int getMinute()
|
||||
{
|
||||
return minute;
|
||||
}
|
||||
|
||||
public void setSecond(int lcl_arg0)
|
||||
{
|
||||
second = lcl_arg0;
|
||||
}
|
||||
public int getSecond()
|
||||
{
|
||||
return second;
|
||||
}
|
||||
|
||||
public void setIs_utc(boolean lcl_arg0)
|
||||
{
|
||||
is_utc = lcl_arg0 ? 1 : 0;
|
||||
}
|
||||
public boolean getIs_utc()
|
||||
{
|
||||
return is_utc == 0 ? false : true;
|
||||
}
|
||||
|
||||
public void setIs_date(boolean lcl_arg0)
|
||||
{
|
||||
is_date = lcl_arg0 ? 1 : 0;
|
||||
}
|
||||
public boolean getIs_date()
|
||||
{
|
||||
return is_date == 0 ? false : true;
|
||||
}
|
||||
|
||||
public void setZone(String lcl_arg0)
|
||||
{
|
||||
zone = lcl_arg0;
|
||||
}
|
||||
public String getZone()
|
||||
{
|
||||
return zone;
|
||||
}
|
||||
|
||||
// --------------------------------------------------------
|
||||
// Initialization
|
||||
// --------------------------------------------------------
|
||||
|
||||
/**
|
||||
* copy data from an existing struct.
|
||||
*/
|
||||
private native void init(long obj);
|
||||
|
||||
/**
|
||||
* optimization: init field id cache,
|
||||
*/
|
||||
private native static void initFIDs();
|
||||
|
||||
/**
|
||||
* load the jni library for this class
|
||||
*/
|
||||
static {
|
||||
System.loadLibrary("ical_jni");
|
||||
initFIDs();
|
||||
}
|
||||
|
||||
// --------------------------------------------------------
|
||||
// Fields
|
||||
// --------------------------------------------------------
|
||||
|
||||
private int month;
|
||||
private int day;
|
||||
private int year;
|
||||
private int hour;
|
||||
private int minute;
|
||||
private int second;
|
||||
private int is_utc;
|
||||
private int is_date;
|
||||
private String zone = new String(); // Converted from char*
|
||||
}
|
||||
|
@ -1,93 +0,0 @@
|
||||
/*======================================================================
|
||||
FILE: ICalTriggerType.java
|
||||
CREATOR: structConverter 01/11/02
|
||||
(C) COPYRIGHT 2002, Critical Path
|
||||
======================================================================*/
|
||||
|
||||
package net.cp.jlibical;
|
||||
|
||||
/** struct icaltriggertype */
|
||||
public class ICalTriggerType
|
||||
{
|
||||
/**
|
||||
* Constructor for pre-existing native icaltriggertype
|
||||
* @param obj c++ pointer
|
||||
*/
|
||||
ICalTriggerType(long obj)
|
||||
{
|
||||
init(obj);
|
||||
}
|
||||
|
||||
/**
|
||||
* Constructor for pre-existing native icaltriggertype
|
||||
* @param aTime c++ pointer
|
||||
* @param aDuration c++ pointer
|
||||
*/
|
||||
ICalTriggerType(long aTime, long aDuration)
|
||||
{
|
||||
init(aTime, aDuration);
|
||||
}
|
||||
|
||||
/**
|
||||
* Constructor for default ICalTriggerType
|
||||
*/
|
||||
public ICalTriggerType()
|
||||
{
|
||||
}
|
||||
|
||||
public void setTime(ICalTimeType lcl_arg0)
|
||||
{
|
||||
time = lcl_arg0;
|
||||
}
|
||||
public ICalTimeType getTime()
|
||||
{
|
||||
return time;
|
||||
}
|
||||
|
||||
public void setDuration(ICalDurationType lcl_arg0)
|
||||
{
|
||||
duration = lcl_arg0;
|
||||
}
|
||||
public ICalDurationType getDuration()
|
||||
{
|
||||
return duration;
|
||||
}
|
||||
|
||||
// --------------------------------------------------------
|
||||
// Initialization
|
||||
// --------------------------------------------------------
|
||||
|
||||
/**
|
||||
* init with a native object
|
||||
*/
|
||||
private void init(long aTime, long aDuration)
|
||||
{
|
||||
time = new ICalTimeType(aTime);
|
||||
duration = new ICalDurationType(aDuration);
|
||||
}
|
||||
|
||||
/**
|
||||
* copy data from an existing struct.
|
||||
*/
|
||||
private native void init(long obj);
|
||||
|
||||
/**
|
||||
* optimization: init field id cache,
|
||||
*/
|
||||
private native static void initFIDs();
|
||||
|
||||
/**
|
||||
* load the jni library for this class
|
||||
*/
|
||||
static {
|
||||
System.loadLibrary("ical_jni");
|
||||
initFIDs();
|
||||
}
|
||||
|
||||
// --------------------------------------------------------
|
||||
// Fields
|
||||
// --------------------------------------------------------
|
||||
private ICalTimeType time = new ICalTimeType();
|
||||
private ICalDurationType duration = new ICalDurationType();
|
||||
}
|
||||
|
@ -1,209 +0,0 @@
|
||||
/*======================================================================
|
||||
FILE: ICalValue.java
|
||||
CREATOR: gnorman 01/10/02
|
||||
(C) COPYRIGHT 2002, Critical Path
|
||||
======================================================================*/
|
||||
|
||||
package net.cp.jlibical;
|
||||
|
||||
public class ICalValue
|
||||
{
|
||||
/** It's not typesafe, but it's simple to understand! */
|
||||
public interface ICalValueKind
|
||||
{
|
||||
// icalvalue_kind
|
||||
int ICAL_ANY_VALUE=5000;
|
||||
int ICAL_BOOLEAN_VALUE=5001;
|
||||
int ICAL_UTCOFFSET_VALUE=5002;
|
||||
int ICAL_RECUR_VALUE=5003;
|
||||
int ICAL_METHOD_VALUE=5004;
|
||||
int ICAL_CALADDRESS_VALUE=5005;
|
||||
int ICAL_PERIOD_VALUE=5006;
|
||||
int ICAL_STATUS_VALUE=5007;
|
||||
int ICAL_BINARY_VALUE=5008;
|
||||
int ICAL_TEXT_VALUE=5009;
|
||||
int ICAL_DATETIMEDATE_VALUE=5010;
|
||||
int ICAL_DURATION_VALUE=5011;
|
||||
int ICAL_DATETIMEPERIOD_VALUE=5012;
|
||||
int ICAL_INTEGER_VALUE=5013;
|
||||
int ICAL_TIME_VALUE=5014;
|
||||
int ICAL_URI_VALUE=5015;
|
||||
int ICAL_TRIGGER_VALUE=5016;
|
||||
int ICAL_ATTACH_VALUE=5017;
|
||||
int ICAL_CLASS_VALUE=5018;
|
||||
int ICAL_FLOAT_VALUE=5019;
|
||||
int ICAL_QUERY_VALUE=5020;
|
||||
int ICAL_STRING_VALUE=5021;
|
||||
int ICAL_TRANSP_VALUE=5022;
|
||||
int ICAL_X_VALUE=5023;
|
||||
int ICAL_DATETIME_VALUE=5024;
|
||||
int ICAL_GEO_VALUE=5025;
|
||||
int ICAL_DATE_VALUE=5026;
|
||||
int ICAL_ACTION_VALUE=5027;
|
||||
int ICAL_NO_VALUE=5028;
|
||||
}
|
||||
|
||||
/**
|
||||
* Constructor for ICalValue
|
||||
* @param obj c++ pointer
|
||||
*/
|
||||
private ICalValue(long obj)
|
||||
{
|
||||
init(obj);
|
||||
}
|
||||
|
||||
public ICalValue()
|
||||
{
|
||||
init();
|
||||
}
|
||||
|
||||
public ICalValue(/* ICalValueKind */ int kind)
|
||||
{
|
||||
init(kind);
|
||||
}
|
||||
|
||||
public ICalValue(/* ICalValueKind */ int kind, String str)
|
||||
{
|
||||
init(kind,str);
|
||||
}
|
||||
|
||||
public native String as_ical_string();
|
||||
//public native boolean is_valid();
|
||||
public native /* ICalValueKind */ int isa();
|
||||
public native boolean isa_value(Object value);
|
||||
|
||||
/* Special, non autogenerated value accessors */
|
||||
//void set_recur(struct icalrecurrencetype v);
|
||||
//struct icalrecurrencetype get_recur();
|
||||
|
||||
public native void set_trigger(ICalTriggerType v);
|
||||
public native ICalTriggerType get_trigger();
|
||||
|
||||
//void set_datetimeperiod(struct icaldatetimeperiodtype v);
|
||||
//struct icaldatetimeperiodtype get_datetimeperiod();
|
||||
|
||||
//public native static /* ICalParameterXLicCompareType */ int compare(ICalValue a, ICalValue b);
|
||||
|
||||
/* Convert enumerations */
|
||||
//public native static /* ICalValueKind */ int string_to_kind(String str);
|
||||
//public native String kind_to_string(/* ICalValueKind */ int kind);
|
||||
|
||||
/* BOOLEAN */
|
||||
//public native int get_boolean();
|
||||
//public native void set_boolean(int v);
|
||||
|
||||
/* UTC-OFFSET */
|
||||
//public native int get_utcoffset();
|
||||
//public native void set_utcoffset(int v);
|
||||
|
||||
/* METHOD */
|
||||
public native /* ICalPropertyMethod */ int get_method();
|
||||
public native void set_method(/* ICalPropertyMethod */ int v);
|
||||
|
||||
/* CAL-ADDRESS */
|
||||
//public native String get_caladdress();
|
||||
//public native void set_caladdress(String v);
|
||||
|
||||
/* PERIOD */
|
||||
//struct icalperiodtype get_period();
|
||||
//void set_period(struct icalperiodtype v);
|
||||
|
||||
/* STATUS */
|
||||
//public native /* ICalPropertyStatus */ int get_status();
|
||||
//public native void set_status(/* ICalPropertyStatus */ int v);
|
||||
|
||||
/* BINARY */
|
||||
//public native String get_binary();
|
||||
//public native void set_binary(String v);
|
||||
|
||||
/* TEXT */
|
||||
public native String get_text();
|
||||
public native void set_text(String v);
|
||||
|
||||
/* DATE-TIME-DATE */
|
||||
//ICalTimeType get_datetimedate();
|
||||
//void set_datetimedate(ICalTimeType v);
|
||||
|
||||
/* DURATION */
|
||||
public native ICalDurationType get_duration();
|
||||
public native void set_duration(ICalDurationType v);
|
||||
|
||||
/* INTEGER */
|
||||
//public native int get_integer();
|
||||
//public native void set_integer(int v);
|
||||
|
||||
/* TIME */
|
||||
//ICalTimeType get_time();
|
||||
//void set_time(ICalTimeType v);
|
||||
|
||||
/* URI */
|
||||
//public native String get_uri();
|
||||
//public native void set_uri(String v);
|
||||
|
||||
/* ATTACH */
|
||||
//struct icalattachtype get_attach();
|
||||
//void set_attach(struct icalattachtype v);
|
||||
|
||||
/* CLASS */
|
||||
//public native /* ICalPropertyClass */ int get_class();
|
||||
//public native void set_class(/* ICalPropertyClass */ int v);
|
||||
|
||||
/* FLOAT */
|
||||
//public native float get_float();
|
||||
//public native void set_float(float v);
|
||||
|
||||
/* QUERY */
|
||||
public native String get_query();
|
||||
public native void set_query(String v);
|
||||
|
||||
/* STRING */
|
||||
//public native String get_string();
|
||||
//public native void set_string(String v);
|
||||
|
||||
/* TRANSP */
|
||||
//public native /* ICalPropertyTransp */ int get_transp();
|
||||
//public native void set_transp(/* ICalPropertyTransp */ int v);
|
||||
|
||||
/* DATE-TIME */
|
||||
public native ICalTimeType get_datetime();
|
||||
public native void set_datetime(ICalTimeType v);
|
||||
|
||||
/* GEO */
|
||||
//struct icalgeotype get_geo();
|
||||
//void set_geo(struct icalgeotype v);
|
||||
|
||||
/* DATE */
|
||||
//ICalTimeType get_date();
|
||||
//void set_date(ICalTimeType v);
|
||||
|
||||
/* ACTION */
|
||||
public native /* ICalPropertyAction */ int get_action();
|
||||
public native void set_action(/* ICalPropertyAction */ int v);
|
||||
|
||||
/**
|
||||
* init the native class
|
||||
*/
|
||||
private void init(long obj)
|
||||
{
|
||||
m_Obj = obj;
|
||||
}
|
||||
|
||||
private native void init();
|
||||
private native void init(/* ICalValueKind */ int kind, String str);
|
||||
private native void init(/* ICalValueKind */ int kind);
|
||||
|
||||
/**
|
||||
* load the jni library for this class
|
||||
*/
|
||||
static {
|
||||
System.loadLibrary("ical_jni");
|
||||
}
|
||||
|
||||
public static void main(String[] args)
|
||||
{
|
||||
System.out.println("*** ICalValue main called ok.");
|
||||
}
|
||||
|
||||
/** pointer to C++ object */
|
||||
private long m_Obj = 0;
|
||||
}
|
@ -1,51 +0,0 @@
|
||||
lib_LTLIBRARIES = libical_jni.la
|
||||
|
||||
INCLUDES = -I../libical -I$(JAVA_HOME)/include -I$(JAVA_HOME)/include/$(JAVA_PLATFORM)
|
||||
|
||||
libical_jni_la_LDFLAGS = -no-defined -version-info 0:0:0
|
||||
|
||||
libical_jni_la_LIBADD = \
|
||||
../libical/libical_cxx.la
|
||||
|
||||
libical_jni_la_SOURCES = \
|
||||
jlibical_consts_cxx.h \
|
||||
jlibical_utils_cxx.cpp \
|
||||
jlibical_utils_cxx.h \
|
||||
jniICalDurationType_cxx.cpp \
|
||||
jniICalDurationType_cxx.h \
|
||||
jniICalPeriodType_cxx.cpp \
|
||||
jniICalPeriodType_cxx.h \
|
||||
jniICalRecurrenceType_cxx.cpp \
|
||||
jniICalRecurrenceType_cxx.h \
|
||||
jniICalTimeType_cxx.cpp \
|
||||
jniICalTimeType_cxx.h \
|
||||
jniICalTriggerType_cxx.cpp \
|
||||
jniICalTriggerType_cxx.h \
|
||||
net_cp_jlibical_ICalParameter_cxx.cpp \
|
||||
net_cp_jlibical_ICalParameter_cxx.h \
|
||||
net_cp_jlibical_ICalProperty_cxx.cpp \
|
||||
net_cp_jlibical_ICalProperty_cxx.h \
|
||||
net_cp_jlibical_ICalValue_cxx.cpp \
|
||||
net_cp_jlibical_ICalValue_cxx.h \
|
||||
net_cp_jlibical_VComponent_cxx.cpp \
|
||||
net_cp_jlibical_VComponent_cxx.h
|
||||
|
||||
java_JAVA=\
|
||||
ICalDurationType.java ICalTriggerType.java VEvent.java\
|
||||
ICalParameter.java ICalValue.java VFreeBusy.java\
|
||||
ICalPeriodType.java VAgenda.java VQuery.java\
|
||||
ICalProperty.java VAlarm.java VToDo.java\
|
||||
ICalRecurrenceType.java VCalendar.java \
|
||||
ICalTimeType.java VComponent.java
|
||||
|
||||
data_DATA = libical.jar
|
||||
|
||||
libical.jar: classjava.stamp
|
||||
(cd $(top_builddir); $(JAR) cf src/java/libical.jar net)
|
||||
|
||||
jlibical_jniincludedir = $(includedir)
|
||||
|
||||
TESTS = testjni.sh
|
||||
|
||||
testjni.sh:
|
||||
echo "$(JAVA) -Djava.library.path=@prefix@/lib -classpath $(JAVA_HOME)/lib/classes.zip:@prefix@/lib/libical.jar net.cp.jlibical.testjni" > testjni.sh && chmod a+x testjni.sh
|
@ -1,24 +0,0 @@
|
||||
/*======================================================================
|
||||
FILE: VAgenda.java
|
||||
CREATOR: fnguyen 01/11/02
|
||||
(C) COPYRIGHT 2002, Critical Path
|
||||
======================================================================*/
|
||||
|
||||
package net.cp.jlibical;
|
||||
|
||||
public class VAgenda extends VComponent {
|
||||
public VAgenda()
|
||||
{
|
||||
super(ICalComponentKind.ICAL_VAGENDA_COMPONENT);
|
||||
}
|
||||
|
||||
public VAgenda(long obj)
|
||||
{
|
||||
super(obj);
|
||||
}
|
||||
|
||||
public VAgenda(String str)
|
||||
{
|
||||
super(str);
|
||||
}
|
||||
}
|
@ -1,24 +0,0 @@
|
||||
/*======================================================================
|
||||
FILE: VAlarm.java
|
||||
CREATOR: fnguyen 01/11/02
|
||||
(C) COPYRIGHT 2002, Critical Path
|
||||
======================================================================*/
|
||||
|
||||
package net.cp.jlibical;
|
||||
|
||||
public class VAlarm extends VComponent {
|
||||
public VAlarm()
|
||||
{
|
||||
super(ICalComponentKind.ICAL_VALARM_COMPONENT);
|
||||
}
|
||||
|
||||
public VAlarm(long obj)
|
||||
{
|
||||
super(obj);
|
||||
}
|
||||
|
||||
public VAlarm(String str)
|
||||
{
|
||||
super(str);
|
||||
}
|
||||
}
|
@ -1,24 +0,0 @@
|
||||
/*======================================================================
|
||||
FILE: VCalendar.java
|
||||
CREATOR: echoi 01/28/02
|
||||
(C) COPYRIGHT 2002, Critical Path
|
||||
======================================================================*/
|
||||
|
||||
package net.cp.jlibical;
|
||||
|
||||
public class VCalendar extends VComponent {
|
||||
public VCalendar()
|
||||
{
|
||||
super(ICalComponentKind.ICAL_VCALENDAR_COMPONENT);
|
||||
}
|
||||
|
||||
public VCalendar(long obj)
|
||||
{
|
||||
super(obj);
|
||||
}
|
||||
|
||||
public VCalendar(String str)
|
||||
{
|
||||
super(str);
|
||||
}
|
||||
}
|
@ -1,199 +0,0 @@
|
||||
/*======================================================================
|
||||
FILE: VComponent.java
|
||||
CREATOR: gnorman 01/11/02
|
||||
(C) COPYRIGHT 2002, Critical Path
|
||||
======================================================================*/
|
||||
|
||||
package net.cp.jlibical;
|
||||
|
||||
public class VComponent
|
||||
{
|
||||
/** It's not typesafe, but it's simple to understand! */
|
||||
public interface ICalComponentKind
|
||||
{
|
||||
// icalcomponent_kind
|
||||
int ICAL_NO_COMPONENT = 0;
|
||||
int ICAL_ANY_COMPONENT = 1;
|
||||
int ICAL_XROOT_COMPONENT = 2;
|
||||
int ICAL_XATTACH_COMPONENT = 3;
|
||||
int ICAL_VEVENT_COMPONENT = 4;
|
||||
int ICAL_VTODO_COMPONENT = 5;
|
||||
int ICAL_VJOURNAL_COMPONENT = 6;
|
||||
int ICAL_VCALENDAR_COMPONENT = 7;
|
||||
int ICAL_VAGENDA_COMPONENT = 8;
|
||||
int ICAL_VFREEBUSY_COMPONENT = 9;
|
||||
int ICAL_VALARM_COMPONENT = 10;
|
||||
int ICAL_XAUDIOALARM_COMPONENT = 11;
|
||||
int ICAL_XDISPLAYALARM_COMPONENT = 12;
|
||||
int ICAL_XEMAILALARM_COMPONENT = 13;
|
||||
int ICAL_XPROCEDUREALARM_COMPONENT = 14;
|
||||
int ICAL_VTIMEZONE_COMPONENT = 15;
|
||||
int ICAL_XSTANDARD_COMPONENT = 16;
|
||||
int ICAL_XDAYLIGHT_COMPONENT = 17;
|
||||
int ICAL_X_COMPONENT = 18;
|
||||
int ICAL_VSCHEDULE_COMPONENT = 19;
|
||||
int ICAL_VQUERY_COMPONENT = 20;
|
||||
int ICAL_VCOMMAND_COMPONENT = 21;
|
||||
int ICAL_XLICINVALID_COMPONENT = 22;
|
||||
int ICAL_XLICMIMEPART_COMPONENT = 23;
|
||||
int ICAL_XPREFERENCES_COMPONENT = 24;
|
||||
}
|
||||
|
||||
/**
|
||||
* Constructor for VComponent
|
||||
* @param obj c++ pointer
|
||||
*/
|
||||
protected VComponent(long obj)
|
||||
{
|
||||
init(obj);
|
||||
}
|
||||
|
||||
public VComponent()
|
||||
{
|
||||
init();
|
||||
}
|
||||
|
||||
public VComponent(/* ICalComponentKind */ int kind)
|
||||
{
|
||||
init(kind);
|
||||
}
|
||||
|
||||
public VComponent(String str)
|
||||
{
|
||||
init(str);
|
||||
}
|
||||
|
||||
public native String as_ical_string();
|
||||
//public native boolean is_valid();
|
||||
public native /* ICalComponentKind */ int isa();
|
||||
public native boolean isa_component(Object component);
|
||||
|
||||
/* Working with properties */
|
||||
public native void add_property(ICalProperty property);
|
||||
public native void remove_property(ICalProperty property);
|
||||
public native int count_properties(/* ICalPropertyKind */ int kind);
|
||||
|
||||
/* Iterate through the properties */
|
||||
public native ICalProperty get_current_property();
|
||||
public native ICalProperty get_first_property(/* ICalPropertyKind */ int kind);
|
||||
public native ICalProperty get_next_property(/* ICalPropertyKind */ int kind);
|
||||
|
||||
/* Working with components */
|
||||
|
||||
/* Return the first VEVENT, VTODO or VJOURNAL sub-component if it is one of those types */
|
||||
public native VComponent get_inner();
|
||||
|
||||
public native void add_component(VComponent child);
|
||||
public native void remove_component(VComponent child);
|
||||
public native int count_components(/* ICalComponentKind */ int kind);
|
||||
|
||||
/* Iteration Routines. There are two forms of iterators, internal and
|
||||
external. The internal ones came first, and are almost completely
|
||||
sufficient, but they fail badly when you want to construct a loop that
|
||||
removes components from the container.
|
||||
*/
|
||||
|
||||
/* Iterate through components */
|
||||
public native VComponent get_current_component();
|
||||
public native VComponent get_first_component(/* ICalComponentKind */ int kind);
|
||||
public native VComponent get_next_component(/* ICalComponentKind */ int kind);
|
||||
|
||||
/* Using external iterators */
|
||||
//public native icalcompiter begin_component(/* ICalComponentKind */ int kind);
|
||||
//public native icalcompiter end_component(/* ICalComponentKind */ int kind);
|
||||
//public native VComponent next(icalcompiter i);
|
||||
//public native VComponent prev(icalcompiter i);
|
||||
//public native VComponent current(icalcompiter i);
|
||||
|
||||
/* Working with embedded error properties */
|
||||
//public native int count_errors();
|
||||
|
||||
/* Remove all X-LIC-ERROR properties*/
|
||||
//public native void strip_errors();
|
||||
|
||||
/* Convert some X-LIC-ERROR properties into RETURN-STATUS properties*/
|
||||
//public native void convert_errors();
|
||||
|
||||
/* Kind conversion routines */
|
||||
//public native static /* ICalComponentKind */ int string_to_kind(String str);
|
||||
//public native static String kind_to_string(/* ICalComponentKind */ int kind);
|
||||
|
||||
public native ICalTimeType get_dtstart();
|
||||
public native void set_dtstart(ICalTimeType v);
|
||||
|
||||
/* For the icalcomponent routines only, dtend and duration are tied
|
||||
together. If you call the set routine for one and the other exists,
|
||||
the routine will calculate the change to the other. That is, if
|
||||
there is a DTEND and you call set_duration, the routine will modify
|
||||
DTEND to be the sum of DTSTART and the duration. If you call a get
|
||||
routine for one and the other exists, the routine will calculate
|
||||
the return value. If you call a set routine and neither exists, the
|
||||
routine will create the apcompriate comperty */
|
||||
|
||||
public native ICalTimeType get_dtend();
|
||||
public native void set_dtend(ICalTimeType v);
|
||||
|
||||
public native ICalDurationType get_duration();
|
||||
public native void set_duration(ICalDurationType v);
|
||||
|
||||
public native /* ICalPropertyMethod */ int get_method();
|
||||
public native void set_method(/* ICalPropertyMethod */ int method);
|
||||
|
||||
public native ICalTimeType get_dtstamp();
|
||||
public native void set_dtstamp(ICalTimeType v);
|
||||
|
||||
public native String get_summary();
|
||||
public native void set_summary(String v);
|
||||
|
||||
public native String get_location();
|
||||
public native void set_location(String v);
|
||||
|
||||
public native String get_description();
|
||||
public native void set_description(String v);
|
||||
|
||||
//public native String get_comment();
|
||||
//public native void set_comment(String v);
|
||||
|
||||
public native String get_uid();
|
||||
public native void set_uid(String v);
|
||||
|
||||
public native String get_relcalid();
|
||||
public native void set_relcalid(String v);
|
||||
|
||||
public native ICalTimeType get_recurrenceid();
|
||||
public native void set_recurrenceid(ICalTimeType v);
|
||||
|
||||
/* For VCOMPONENT: Return a reference to the first VEVENT, VTODO, or VJOURNAL */
|
||||
public native VComponent get_first_real_component();
|
||||
|
||||
/* For VEVENT, VTODO, VJOURNAL and VTIMEZONE: report the start and end
|
||||
times of an event in UTC */
|
||||
//public native virtual struct icaltime_span get_span();
|
||||
|
||||
/**
|
||||
* init the native class
|
||||
*/
|
||||
private void init(long obj)
|
||||
{
|
||||
m_Obj = obj;
|
||||
}
|
||||
|
||||
private native void init();
|
||||
private native void init(String str);
|
||||
private native void init(/* ICalComponentKind */ int kind);
|
||||
|
||||
/**
|
||||
* load the jni library for this class
|
||||
*/
|
||||
static {
|
||||
System.loadLibrary("ical_jni");
|
||||
}
|
||||
|
||||
public static void main(String[] args)
|
||||
{
|
||||
System.out.println("*** VComponent main called ok.");
|
||||
}
|
||||
|
||||
/** pointer to C++ object */
|
||||
private long m_Obj = 0;
|
||||
}
|
@ -1,24 +0,0 @@
|
||||
/*======================================================================
|
||||
FILE: VEvent.java
|
||||
CREATOR: fnguyen 01/11/02
|
||||
(C) COPYRIGHT 2002, Critical Path
|
||||
======================================================================*/
|
||||
|
||||
package net.cp.jlibical;
|
||||
|
||||
public class VEvent extends VComponent {
|
||||
public VEvent()
|
||||
{
|
||||
super(ICalComponentKind.ICAL_VEVENT_COMPONENT);
|
||||
}
|
||||
|
||||
public VEvent(long obj)
|
||||
{
|
||||
super(obj);
|
||||
}
|
||||
|
||||
public VEvent(String str)
|
||||
{
|
||||
super(str);
|
||||
}
|
||||
}
|
@ -1,18 +0,0 @@
|
||||
package net.cp.jlibical;
|
||||
|
||||
public class VFreeBusy extends VComponent {
|
||||
public VFreeBusy()
|
||||
{
|
||||
super(ICalComponentKind.ICAL_VFREEBUSY_COMPONENT);
|
||||
}
|
||||
|
||||
public VFreeBusy(long obj)
|
||||
{
|
||||
super(obj);
|
||||
}
|
||||
|
||||
public VFreeBusy(String str)
|
||||
{
|
||||
super(str);
|
||||
}
|
||||
}
|
@ -1,24 +0,0 @@
|
||||
/*======================================================================
|
||||
FILE: VQuery.java
|
||||
CREATOR: fnguyen 01/11/02
|
||||
(C) COPYRIGHT 2002, Critical Path
|
||||
======================================================================*/
|
||||
|
||||
package net.cp.jlibical;
|
||||
|
||||
public class VQuery extends VComponent {
|
||||
public VQuery()
|
||||
{
|
||||
super(ICalComponentKind.ICAL_VQUERY_COMPONENT);
|
||||
}
|
||||
|
||||
public VQuery(long obj)
|
||||
{
|
||||
super(obj);
|
||||
}
|
||||
|
||||
public VQuery(String str)
|
||||
{
|
||||
super(str);
|
||||
}
|
||||
}
|
@ -1,24 +0,0 @@
|
||||
/*======================================================================
|
||||
FILE: VToDo.java
|
||||
CREATOR: fnguyen 01/11/02
|
||||
(C) COPYRIGHT 2002, Critical Path
|
||||
======================================================================*/
|
||||
|
||||
package net.cp.jlibical;
|
||||
|
||||
public class VToDo extends VComponent {
|
||||
public VToDo()
|
||||
{
|
||||
super(ICalComponentKind.ICAL_VTODO_COMPONENT);
|
||||
}
|
||||
|
||||
public VToDo(long obj)
|
||||
{
|
||||
super(obj);
|
||||
}
|
||||
|
||||
public VToDo(String str)
|
||||
{
|
||||
super(str);
|
||||
}
|
||||
}
|
@ -1,42 +0,0 @@
|
||||
|
||||
/*======================================================================
|
||||
FILE: jlibical_consts_cxx/h
|
||||
CREATOR: Srinivasa Boppana/George Norman
|
||||
(C) COPYRIGHT 2002, Critical Path
|
||||
======================================================================*/
|
||||
|
||||
#ifndef JLIBICAL_CONSTS_CXX_H
|
||||
#define JLIBICAL_CONSTS_CXX_H
|
||||
|
||||
/*
|
||||
* Error code constants.
|
||||
*/
|
||||
#define JLIBICAL_OK 0 /* good return code */
|
||||
|
||||
/* system/API errors */
|
||||
#define JLIBICAL_ERR_NETWORK 100 /* general network error */
|
||||
#define JLIBICAL_ERR_SERVER_INTERNAL 101 /* internal server error (database, file system, etc.) */
|
||||
#define JLIBICAL_ERR_CLIENT_INTERNAL 102 /* internal error in client API (memory, parsing errors, etc.)*/
|
||||
#define JLIBICAL_ERR_ILLEGAL_ARGUMENT 103 /* incorrect API use */
|
||||
#define JLIBICAL_ERR_API_NOT_INITED 104 /* either the InitModule API call was called prior to use of the API or it failed to initialize correctly */
|
||||
#define JLIBICAL_ERR_HOST_INVALID 105 /* the host name specified cannot be resolved */
|
||||
|
||||
/* Java classes */
|
||||
#define JLIBICAL_CLASS_ICALVALUE "net/cp/jlibical/ICalValue"
|
||||
#define JLIBICAL_CLASS_VCOMPONENT "net/cp/jlibical/VComponent"
|
||||
#define JLIBICAL_CLASS_VALARM "net/cp/jlibical/VAlarm"
|
||||
#define JLIBICAL_CLASS_VCALENDAR "net/cp/jlibical/VCalendar"
|
||||
#define JLIBICAL_CLASS_VAGENDA "net/cp/jlibical/VAgenda"
|
||||
#define JLIBICAL_CLASS_VEVENT "net/cp/jlibical/VEvent"
|
||||
#define JLIBICAL_CLASS_VQUERY "net/cp/jlibical/VQuery"
|
||||
#define JLIBICAL_CLASS_VTODO "net/cp/jlibical/VToDo"
|
||||
#define JLIBICAL_CLASS_ICALPARAMETER "net/cp/jlibical/ICalParameter"
|
||||
#define JLIBICAL_CLASS_ICALPROPERTY "net/cp/jlibical/ICalProperty"
|
||||
|
||||
#define JLIBICAL_CLASS_ICALDURATIONTYPE "net/cp/jlibical/ICalDurationType"
|
||||
#define JLIBICAL_CLASS_ICALTIMETYPE "net/cp/jlibical/ICalTimeType"
|
||||
#define JLIBICAL_CLASS_ICALTRIGGERTYPE "net/cp/jlibical/ICalTriggerType"
|
||||
#define JLIBICAL_CLASS_ICALRECURRENCETYPE "net/cp/jlibical/ICalRecurrenceType"
|
||||
#define JLIBICAL_CLASS_ICALPERIODTYPE "net/cp/jlibical/ICalPeriodType"
|
||||
|
||||
#endif /* JLIBICAL_CONSTS_CXX_H */
|
@ -1,458 +0,0 @@
|
||||
/* -*- Mode: C -*- */
|
||||
/*======================================================================
|
||||
FILE: jlibical_utils_cxx.cpp
|
||||
CREATOR: Srinivasa Boppana/George Norman
|
||||
(C) COPYRIGHT 2002, Critical Path
|
||||
======================================================================*/
|
||||
|
||||
#ifndef JLIBICAL_UTILS_CXX_H
|
||||
#include "jlibical_utils_cxx.h"
|
||||
#endif
|
||||
|
||||
#ifndef JLIBICAL_CONSTS_CXX_H
|
||||
#include "jlibical_consts_cxx.h"
|
||||
#endif
|
||||
|
||||
#ifndef ICALPARAMETER_CXX_H
|
||||
#include "icalparameter_cxx.h"
|
||||
#endif
|
||||
|
||||
#ifndef VCOMPONENT_CXX_H
|
||||
#include "vcomponent.h"
|
||||
#endif
|
||||
|
||||
#ifndef ICALPROPERTY_CXX_H
|
||||
#include "icalproperty_cxx.h"
|
||||
#endif
|
||||
|
||||
#ifndef ICALVALUE_CXX_H
|
||||
#include "icalvalue_cxx.h"
|
||||
#endif
|
||||
|
||||
#ifndef _jni_ICalTimeType_H
|
||||
#include "jniICalTimeType_cxx.h"
|
||||
#endif
|
||||
|
||||
#ifndef _jni_ICalTriggerType_H
|
||||
#include "jniICalTriggerType_cxx.h"
|
||||
#endif
|
||||
|
||||
#ifndef _jni_ICalDurationType_H
|
||||
#include "jniICalDurationType_cxx.h"
|
||||
#endif
|
||||
|
||||
#ifndef _jni_ICalRecurrenceType_H
|
||||
#include "jniICalRecurrenceType_cxx.h"
|
||||
#endif
|
||||
|
||||
#ifndef _jni_ICalPeriodType_H
|
||||
#include "jniICalPeriodType_cxx.h"
|
||||
#endif
|
||||
|
||||
//-------------------------------------------------------
|
||||
// Returns a pointer to the subject (a c++ object) for the given surrogate (a java object)
|
||||
//-------------------------------------------------------
|
||||
void* getCObjectPtr(JNIEnv *env, jobject surrogate)
|
||||
{
|
||||
void* result = 0;
|
||||
jclass jcls = env->GetObjectClass(surrogate);
|
||||
jfieldID fid = env->GetFieldID(jcls,"m_Obj","J");
|
||||
|
||||
if (fid == NULL)
|
||||
{
|
||||
// this should never happen.
|
||||
throwException( env, JLIBICAL_ERR_CLIENT_INTERNAL );
|
||||
return(NULL);
|
||||
}
|
||||
|
||||
result = (void*)env->GetLongField(surrogate,fid);
|
||||
if (result == NULL)
|
||||
{
|
||||
// the proxy object (java) has no subject (c++ object)
|
||||
throwException( env, JLIBICAL_ERR_CLIENT_INTERNAL );
|
||||
return(NULL);
|
||||
}
|
||||
|
||||
return(result);
|
||||
}
|
||||
|
||||
//-------------------------------------------------------
|
||||
// Set the subject (a c++ object) for the given surrogate (a java object).
|
||||
// Throws exception if the m_Obj field can not be found.
|
||||
//-------------------------------------------------------
|
||||
void setCObjectPtr(JNIEnv *env, jobject surrogate, void* subject)
|
||||
{
|
||||
jclass jcls = env->GetObjectClass(surrogate);
|
||||
jfieldID fid = env->GetFieldID(jcls,"m_Obj","J");
|
||||
|
||||
if (fid == NULL)
|
||||
{
|
||||
throwException( env, JLIBICAL_ERR_CLIENT_INTERNAL );
|
||||
return;
|
||||
}
|
||||
|
||||
env->SetLongField(surrogate,fid,(long)subject);
|
||||
}
|
||||
|
||||
//-------------------------------------------------------
|
||||
// Return the pointer to the subject (as an VComponent*) from the given surrogate.
|
||||
// If the subject is not an VComponent type, or if the subject is NULL, then return NULL.
|
||||
//-------------------------------------------------------
|
||||
VComponent* getSubjectAsVComponent(JNIEnv *env, jobject surrogateComponent, int exceptionType)
|
||||
{
|
||||
VComponent* result = (VComponent*)(getCObjectPtr(env,surrogateComponent));
|
||||
|
||||
if (result == NULL)
|
||||
{
|
||||
throwException(env, exceptionType );
|
||||
}
|
||||
|
||||
return(result);
|
||||
}
|
||||
|
||||
//-------------------------------------------------------
|
||||
// Return the pointer to the subject (as an ICalProperty*) from the given surrogate.
|
||||
// If the subject is not an ICalProperty type, or if the subject is NULL, then return NULL.
|
||||
//-------------------------------------------------------
|
||||
ICalProperty* getSubjectAsICalProperty(JNIEnv *env, jobject surrogateProperty, int exceptionType)
|
||||
{
|
||||
ICalProperty* result = (ICalProperty*)(getCObjectPtr(env,surrogateProperty));
|
||||
|
||||
if (result == NULL)
|
||||
{
|
||||
throwException(env, exceptionType );
|
||||
}
|
||||
|
||||
return(result);
|
||||
}
|
||||
|
||||
//-------------------------------------------------------
|
||||
// Return the pointer to the subject (as an ICalValue*) from the given surrogate.
|
||||
// If the subject is not an ICalValue type, or if the subject is NULL, then return NULL.
|
||||
//-------------------------------------------------------
|
||||
ICalValue* getSubjectAsICalValue(JNIEnv *env, jobject surrogateValue, int exceptionType)
|
||||
{
|
||||
ICalValue* result = (ICalValue*)(getCObjectPtr(env,surrogateValue));
|
||||
|
||||
if (result == NULL)
|
||||
{
|
||||
throwException( env, exceptionType );
|
||||
}
|
||||
|
||||
return(result);
|
||||
}
|
||||
|
||||
//-------------------------------------------------------
|
||||
// Return the pointer to the subject (as an ICalParameter*) from the given surrogate.
|
||||
// If the subject is not an ICalParameter type, or if the subject is NULL, then return NULL.
|
||||
//-------------------------------------------------------
|
||||
ICalParameter* getSubjectAsICalParameter(JNIEnv *env, jobject surrogateParameter, int exceptionType)
|
||||
{
|
||||
ICalParameter* result = (ICalParameter*)(getCObjectPtr(env,surrogateParameter));
|
||||
|
||||
if (result == NULL)
|
||||
{
|
||||
throwException( env, exceptionType );
|
||||
}
|
||||
|
||||
return(result);
|
||||
}
|
||||
|
||||
//-------------------------------------------------------
|
||||
// Copy the data from the src (a java ICalTimeType object)
|
||||
// to the dest (a c struct icaltimetype*).
|
||||
// Returns true if success. False if exception is thrown:
|
||||
// - the src java object is not an ICalTimeType type
|
||||
// - the dest c struct is null.
|
||||
//-------------------------------------------------------
|
||||
bool copyObjToicaltimetype(JNIEnv *env, jobject src, icaltimetype* dest)
|
||||
{
|
||||
bool result = false;
|
||||
|
||||
if (dest != NULL && env->IsInstanceOf(src,env->FindClass(JLIBICAL_CLASS_ICALTIMETYPE)))
|
||||
{
|
||||
jni_GetAll_from_ICalTimeType(dest, env, src);
|
||||
result = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
throwException( env, JLIBICAL_ERR_ILLEGAL_ARGUMENT );
|
||||
}
|
||||
|
||||
return(result);
|
||||
}
|
||||
|
||||
//-------------------------------------------------------
|
||||
// Copy the data from the src (a java ICalTriggerType object)
|
||||
// to the dest (a c struct icaltriggertype*).
|
||||
// Returns true if success. False if exception is thrown:
|
||||
// - the src java object is not an ICalTriggerType type
|
||||
// - the dest c struct is null.
|
||||
//-------------------------------------------------------
|
||||
bool copyObjToicaltriggertype(JNIEnv *env, jobject src, icaltriggertype* dest)
|
||||
{
|
||||
bool result = false;
|
||||
|
||||
if (dest != NULL && env->IsInstanceOf(src,env->FindClass(JLIBICAL_CLASS_ICALTRIGGERTYPE)))
|
||||
{
|
||||
jni_GetAll_from_ICalTriggerType(dest, env, src);
|
||||
result = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
throwException( env, JLIBICAL_ERR_ILLEGAL_ARGUMENT );
|
||||
}
|
||||
|
||||
return(result);
|
||||
}
|
||||
|
||||
//-------------------------------------------------------
|
||||
// Copy the data from the src (a java ICalDurationType object)
|
||||
// to the dest (a c struct icaldurationtype*).
|
||||
// Returns true if success. False if exception is thrown:
|
||||
// - the src java object is not an ICalDurationType type
|
||||
// - the dest c struct is null.
|
||||
//-------------------------------------------------------
|
||||
bool copyObjToicaldurationtype(JNIEnv *env, jobject src, icaldurationtype* dest)
|
||||
{
|
||||
bool result = false;
|
||||
|
||||
if (dest != NULL && env->IsInstanceOf(src,env->FindClass(JLIBICAL_CLASS_ICALDURATIONTYPE)))
|
||||
{
|
||||
jni_GetAll_from_ICalDurationType(dest, env, src);
|
||||
result = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
throwException( env, JLIBICAL_ERR_ILLEGAL_ARGUMENT );
|
||||
}
|
||||
|
||||
return(result);
|
||||
}
|
||||
|
||||
//-------------------------------------------------------
|
||||
// Copy the data from the src (a java ICalRecurrenceType object)
|
||||
// to the dest (a c struct icalrecurrencetype*).
|
||||
// Returns true if success. False if exception is thrown:
|
||||
// - the src java object is not an ICalRecurrenceType type
|
||||
// - the dest c struct is null.
|
||||
//-------------------------------------------------------
|
||||
bool copyObjToicalrecurrencetype(JNIEnv *env, jobject src, icalrecurrencetype* dest)
|
||||
{
|
||||
bool result = false;
|
||||
|
||||
if (dest != NULL && env->IsInstanceOf(src,env->FindClass(JLIBICAL_CLASS_ICALRECURRENCETYPE)))
|
||||
{
|
||||
jni_GetAll_from_ICalRecurrenceType(dest, env, src);
|
||||
result = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
throwException( env, JLIBICAL_ERR_ILLEGAL_ARGUMENT );
|
||||
}
|
||||
|
||||
return(result);
|
||||
}
|
||||
|
||||
//-------------------------------------------------------
|
||||
// Copy the data from the src (a java ICalPeriodType object)
|
||||
// to the dest (a c struct icalperiodtype*).
|
||||
// Returns true if success. False if exception is thrown:
|
||||
// - the src java object is not an ICalPeriodType type
|
||||
// - the dest c struct is null.
|
||||
//-------------------------------------------------------
|
||||
bool copyObjToicalperiodtype(JNIEnv *env, jobject src, icalperiodtype* dest)
|
||||
{
|
||||
bool result = false;
|
||||
|
||||
if (dest != NULL && env->IsInstanceOf(src,env->FindClass(JLIBICAL_CLASS_ICALPERIODTYPE)))
|
||||
{
|
||||
jni_GetAll_from_ICalPeriodType(dest, env, src);
|
||||
result = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
throwException( env, JLIBICAL_ERR_ILLEGAL_ARGUMENT );
|
||||
}
|
||||
|
||||
return(result);
|
||||
}
|
||||
|
||||
//-------------------------------------------------------
|
||||
// Create a new VComponent surrogate for given subject.
|
||||
// If subject is NULL, then returns NULL (will not create a
|
||||
// surrogate to a NULL subject);
|
||||
//-------------------------------------------------------
|
||||
jobject createNewVComponentSurrogate(JNIEnv *env, VComponent* subject)
|
||||
{
|
||||
char* classname = JLIBICAL_CLASS_VCOMPONENT;
|
||||
if (dynamic_cast<VAlarm*>(subject))
|
||||
classname = JLIBICAL_CLASS_VALARM;
|
||||
else if (dynamic_cast<VCalendar*>(subject))
|
||||
classname = JLIBICAL_CLASS_VCALENDAR;
|
||||
else if (dynamic_cast<VEvent*>(subject))
|
||||
classname = JLIBICAL_CLASS_VEVENT;
|
||||
else if (dynamic_cast<VQuery*>(subject))
|
||||
classname = JLIBICAL_CLASS_VQUERY;
|
||||
else if (dynamic_cast<VToDo*>(subject))
|
||||
classname = JLIBICAL_CLASS_VTODO;
|
||||
else if (dynamic_cast<VAgenda*>(subject))
|
||||
classname = JLIBICAL_CLASS_VAGENDA;
|
||||
|
||||
return(doCreateNewSurrogate(env,env->FindClass(classname),(jlong)subject));
|
||||
}
|
||||
|
||||
//-------------------------------------------------------
|
||||
// Create a new ICalProperty surrogate for given subject.
|
||||
// If subject is NULL, then returns NULL (will not create a
|
||||
// surrogate to a NULL subject);
|
||||
//-------------------------------------------------------
|
||||
jobject createNewICalPropertySurrogate(JNIEnv *env, ICalProperty* subject)
|
||||
{
|
||||
return(doCreateNewSurrogate(env,env->FindClass(JLIBICAL_CLASS_ICALPROPERTY),(jlong)subject));
|
||||
}
|
||||
|
||||
//-------------------------------------------------------
|
||||
// Create a new ICalValue surrogate for given subject.
|
||||
// If subject is NULL, then returns NULL (will not create a
|
||||
// surrogate to a NULL subject);
|
||||
//-------------------------------------------------------
|
||||
jobject createNewICalValueSurrogate(JNIEnv *env, ICalValue* subject)
|
||||
{
|
||||
return(doCreateNewSurrogate(env,env->FindClass(JLIBICAL_CLASS_ICALVALUE),(jlong)subject));
|
||||
}
|
||||
|
||||
//-------------------------------------------------------
|
||||
// Create a new ICalParameter surrogate for given subject.
|
||||
// If subject is NULL, then returns NULL (will not create a
|
||||
// surrogate to a NULL subject);
|
||||
//-------------------------------------------------------
|
||||
jobject createNewICalParameterSurrogate(JNIEnv *env, ICalParameter* subject)
|
||||
{
|
||||
return(doCreateNewSurrogate(env,env->FindClass(JLIBICAL_CLASS_ICALPARAMETER),(jlong)subject));
|
||||
}
|
||||
|
||||
//-------------------------------------------------------
|
||||
// Create a new ICalTimeType object from the given source struct.
|
||||
// A copy is made, .
|
||||
// If source is NULL, then returns NULL (will not create an
|
||||
// object to a NULL source);
|
||||
//-------------------------------------------------------
|
||||
jobject createNewICalTimeType(JNIEnv *env, icaltimetype* source)
|
||||
{
|
||||
return(doCreateNewSurrogate(env,env->FindClass(JLIBICAL_CLASS_ICALTIMETYPE),(jlong)source));
|
||||
}
|
||||
|
||||
//-------------------------------------------------------
|
||||
// Create a new ICalTriggerType object from the given source struct.
|
||||
// A copy is made, .
|
||||
// If source is NULL, then returns NULL (will not create an
|
||||
// object to a NULL source);
|
||||
//-------------------------------------------------------
|
||||
jobject createNewICalTriggerType(JNIEnv *env, icaltriggertype* source)
|
||||
{
|
||||
return(doCreateNewSurrogate(env,env->FindClass(JLIBICAL_CLASS_ICALTRIGGERTYPE),(jlong)source));
|
||||
}
|
||||
|
||||
//-------------------------------------------------------
|
||||
// Create a new ICalDurationType object from the given source struct.
|
||||
// A copy is made, .
|
||||
// If source is NULL, then returns NULL (will not create an
|
||||
// object to a NULL source);
|
||||
//-------------------------------------------------------
|
||||
jobject createNewICalDurationType(JNIEnv *env, icaldurationtype* source)
|
||||
{
|
||||
return(doCreateNewSurrogate(env,env->FindClass(JLIBICAL_CLASS_ICALDURATIONTYPE),(jlong)source));
|
||||
}
|
||||
|
||||
//-------------------------------------------------------
|
||||
// Create a new ICalRecurrenceType object from the given source struct.
|
||||
// A copy is made, .
|
||||
// If source is NULL, then returns NULL (will not create an
|
||||
// object to a NULL source);
|
||||
//-------------------------------------------------------
|
||||
jobject createNewICalRecurrenceType(JNIEnv *env, icalrecurrencetype* source)
|
||||
{
|
||||
return(doCreateNewSurrogate(env,env->FindClass(JLIBICAL_CLASS_ICALRECURRENCETYPE),(jlong)source));
|
||||
}
|
||||
|
||||
//-------------------------------------------------------
|
||||
// Create a new ICalPeriodType object from the given source struct.
|
||||
// A copy is made, .
|
||||
// If source is NULL, then returns NULL (will not create an
|
||||
// object to a NULL source);
|
||||
//-------------------------------------------------------
|
||||
jobject createNewICalPeriodType(JNIEnv *env, icalperiodtype* source)
|
||||
{
|
||||
return(doCreateNewSurrogate(env,env->FindClass(JLIBICAL_CLASS_ICALPERIODTYPE),(jlong)source));
|
||||
}
|
||||
|
||||
//-------------------------------------------------------
|
||||
// Creat a new surrogate of the given type for the given subject.
|
||||
//-------------------------------------------------------
|
||||
jobject doCreateNewSurrogate(JNIEnv *env, jclass surrogateClass, jlong subject)
|
||||
{
|
||||
jobject result = NULL;
|
||||
|
||||
if (subject != NULL)
|
||||
{
|
||||
jmethodID jconstructorID = env->GetMethodID(surrogateClass, "<init>", "(J)V");
|
||||
|
||||
result = env->NewObject(surrogateClass, jconstructorID, subject);
|
||||
}
|
||||
|
||||
return(result);
|
||||
}
|
||||
|
||||
|
||||
//-------------------------------------------------------
|
||||
// For the given cpErr, create a new Exception and send it to env.
|
||||
// Note: Throw does not throw anything. It only sets the state.
|
||||
// The JVM will check this and throw an exception later.
|
||||
//-------------------------------------------------------
|
||||
void throwException(JNIEnv *env, int cpErr)
|
||||
{
|
||||
jclass jexceptionClass;
|
||||
jthrowable jexceptionObj;
|
||||
jmethodID jconstructorID;
|
||||
const char* exClassName;
|
||||
|
||||
if (env->ExceptionOccurred())
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
switch ( cpErr )
|
||||
{
|
||||
case JLIBICAL_ERR_NETWORK:
|
||||
exClassName = "net.cp.jlibical/JLCNetworkException";
|
||||
break;
|
||||
|
||||
case JLIBICAL_ERR_SERVER_INTERNAL:
|
||||
exClassName = "net.cp.jlibical/JLCServerInternalException";
|
||||
break;
|
||||
|
||||
case JLIBICAL_ERR_CLIENT_INTERNAL:
|
||||
exClassName = "net.cp.jlibical/JLCClientInternalException";
|
||||
break;
|
||||
|
||||
case JLIBICAL_ERR_ILLEGAL_ARGUMENT:
|
||||
exClassName = "net.cp.jlibical/JLCIllegalArgumentException";
|
||||
break;
|
||||
|
||||
case JLIBICAL_ERR_API_NOT_INITED:
|
||||
exClassName = "net.cp.jlibical/JLCNotInitedException";
|
||||
break;
|
||||
|
||||
case JLIBICAL_ERR_HOST_INVALID:
|
||||
exClassName = "net.cp.jlibical/JLCHostInvalidException";
|
||||
break;
|
||||
|
||||
default:
|
||||
exClassName = "net.cp.jlibical/JLCClientInternalException";
|
||||
printf("*** JLIBICAL JNI throwException: unknown error code: %d\n", cpErr );
|
||||
break;
|
||||
}
|
||||
|
||||
env->ThrowNew(env->FindClass(exClassName),"");
|
||||
}
|
@ -1,59 +0,0 @@
|
||||
|
||||
/*======================================================================
|
||||
FILE: jlibical_utils_cxx.h
|
||||
CREATOR: Srinivasa Boppana/George Norman
|
||||
(C) COPYRIGHT 2002, Critical Path
|
||||
======================================================================*/
|
||||
|
||||
#ifndef TEST_CXX_H
|
||||
#define TEST_CXX_H
|
||||
|
||||
#ifndef JNI_H
|
||||
#include <jni.h>
|
||||
#endif
|
||||
|
||||
class VComponent;
|
||||
class ICalProperty;
|
||||
class ICalValue;
|
||||
class ICalParameter;
|
||||
struct icaltimetype;
|
||||
struct icaltriggertype;
|
||||
struct icaldurationtype;
|
||||
struct icalrecurrencetype;
|
||||
struct icalperiodtype;
|
||||
|
||||
// get & set
|
||||
void* getCObjectPtr(JNIEnv *env, jobject anObj);
|
||||
void setCObjectPtr(JNIEnv *env, jobject anObj, void* val);
|
||||
|
||||
// type-safe getters
|
||||
VComponent* getSubjectAsVComponent(JNIEnv *env, jobject surrogateComponent, int exceptionType);
|
||||
ICalProperty* getSubjectAsICalProperty(JNIEnv *env, jobject surrogateProperty, int exceptionType);
|
||||
ICalValue* getSubjectAsICalValue(JNIEnv *env, jobject surrogateValue, int exceptionType);
|
||||
ICalParameter* getSubjectAsICalParameter(JNIEnv *env, jobject surrogateParameter, int exceptionType);
|
||||
|
||||
bool copyObjToicaltimetype(JNIEnv *env, jobject src, icaltimetype* dest);
|
||||
bool copyObjToicaltriggertype(JNIEnv *env, jobject src, icaltriggertype* dest);
|
||||
bool copyObjToicaldurationtype(JNIEnv *env, jobject src, icaldurationtype* dest);
|
||||
bool copyObjToicalrecurrencetype(JNIEnv *env, jobject src, icalrecurrencetype* dest);
|
||||
bool copyObjToicalperiodtype(JNIEnv *env, jobject src, icalperiodtype* dest);
|
||||
|
||||
// exception handling
|
||||
void throwException( JNIEnv *env, int cpErr );
|
||||
|
||||
// create objects
|
||||
jobject createNewVComponentSurrogate(JNIEnv *env, VComponent* subject);
|
||||
jobject createNewICalPropertySurrogate(JNIEnv *env, ICalProperty* subject);
|
||||
jobject createNewICalValueSurrogate(JNIEnv *env, ICalValue* subject);
|
||||
jobject createNewICalParameterSurrogate(JNIEnv *env, ICalParameter* subject);
|
||||
|
||||
jobject createNewICalTimeType(JNIEnv *env, icaltimetype* source);
|
||||
jobject createNewICalTriggerType(JNIEnv *env, icaltriggertype* source);
|
||||
jobject createNewICalDurationType(JNIEnv *env, icaldurationtype* source);
|
||||
jobject createNewICalRecurrenceType(JNIEnv *env, icalrecurrencetype* source);
|
||||
jobject createNewICalPeriodType(JNIEnv *env, icalperiodtype* source);
|
||||
|
||||
jobject doCreateNewSurrogate(JNIEnv *env, jclass surrogateClass, jlong subject);
|
||||
|
||||
|
||||
#endif /*TEST_CXX_H*/
|
@ -1,130 +0,0 @@
|
||||
/* -*- Mode: C -*- */
|
||||
/*======================================================================
|
||||
FILE: jniICalDurationType_cxx.cpp
|
||||
CREATOR: structConverter
|
||||
(C) COPYRIGHT 2002, Critical Path
|
||||
======================================================================*/
|
||||
|
||||
#include <jni.h>
|
||||
|
||||
#include "jniICalDurationType_cxx.h"
|
||||
|
||||
static jfieldID ICalDurationType_Is_neg_FID;
|
||||
static jfieldID ICalDurationType_Days_FID;
|
||||
static jfieldID ICalDurationType_Weeks_FID;
|
||||
static jfieldID ICalDurationType_Hours_FID;
|
||||
static jfieldID ICalDurationType_Minutes_FID;
|
||||
static jfieldID ICalDurationType_Seconds_FID;
|
||||
|
||||
|
||||
void initICalDurationTypeFieldIDs(JNIEnv* env, jclass clazz)
|
||||
{
|
||||
ICalDurationType_Is_neg_FID = env->GetFieldID(clazz, "is_neg", "I");
|
||||
ICalDurationType_Days_FID = env->GetFieldID(clazz, "days", "J");
|
||||
ICalDurationType_Weeks_FID = env->GetFieldID(clazz, "weeks", "J");
|
||||
ICalDurationType_Hours_FID = env->GetFieldID(clazz, "hours", "J");
|
||||
ICalDurationType_Minutes_FID = env->GetFieldID(clazz, "minutes", "J");
|
||||
ICalDurationType_Seconds_FID = env->GetFieldID(clazz, "seconds", "J");
|
||||
}
|
||||
|
||||
void jni_SetIs_neg_in_ICalDurationType(struct ICalDurationType* __ICalDurationType_, JNIEnv *env, jobject thisICalDurationType)
|
||||
{
|
||||
env->SetIntField(thisICalDurationType, ICalDurationType_Is_neg_FID, (jint) __ICalDurationType_->is_neg);
|
||||
}
|
||||
|
||||
void jni_GetIs_neg_from_ICalDurationType(struct ICalDurationType* __ICalDurationType_, JNIEnv *env, jobject thisICalDurationType)
|
||||
{
|
||||
__ICalDurationType_->is_neg = env->GetIntField(thisICalDurationType, ICalDurationType_Is_neg_FID);
|
||||
}
|
||||
|
||||
void jni_SetDays_in_ICalDurationType(struct ICalDurationType* __ICalDurationType_, JNIEnv *env, jobject thisICalDurationType)
|
||||
{
|
||||
env->SetLongField(thisICalDurationType, ICalDurationType_Days_FID, (jlong) __ICalDurationType_->days);
|
||||
}
|
||||
|
||||
void jni_GetDays_from_ICalDurationType(struct ICalDurationType* __ICalDurationType_, JNIEnv *env, jobject thisICalDurationType)
|
||||
{
|
||||
__ICalDurationType_->days = env->GetLongField(thisICalDurationType, ICalDurationType_Days_FID);
|
||||
}
|
||||
|
||||
void jni_SetWeeks_in_ICalDurationType(struct ICalDurationType* __ICalDurationType_, JNIEnv *env, jobject thisICalDurationType)
|
||||
{
|
||||
env->SetLongField(thisICalDurationType, ICalDurationType_Weeks_FID, (jlong) __ICalDurationType_->weeks);
|
||||
}
|
||||
|
||||
void jni_GetWeeks_from_ICalDurationType(struct ICalDurationType* __ICalDurationType_, JNIEnv *env, jobject thisICalDurationType)
|
||||
{
|
||||
__ICalDurationType_->weeks = env->GetLongField(thisICalDurationType, ICalDurationType_Weeks_FID);
|
||||
}
|
||||
|
||||
void jni_SetHours_in_ICalDurationType(struct ICalDurationType* __ICalDurationType_, JNIEnv *env, jobject thisICalDurationType)
|
||||
{
|
||||
env->SetLongField(thisICalDurationType, ICalDurationType_Hours_FID, (jlong) __ICalDurationType_->hours);
|
||||
}
|
||||
|
||||
void jni_GetHours_from_ICalDurationType(struct ICalDurationType* __ICalDurationType_, JNIEnv *env, jobject thisICalDurationType)
|
||||
{
|
||||
__ICalDurationType_->hours = env->GetLongField(thisICalDurationType, ICalDurationType_Hours_FID);
|
||||
}
|
||||
|
||||
void jni_SetMinutes_in_ICalDurationType(struct ICalDurationType* __ICalDurationType_, JNIEnv *env, jobject thisICalDurationType)
|
||||
{
|
||||
env->SetLongField(thisICalDurationType, ICalDurationType_Minutes_FID, (jlong) __ICalDurationType_->minutes);
|
||||
}
|
||||
|
||||
void jni_GetMinutes_from_ICalDurationType(struct ICalDurationType* __ICalDurationType_, JNIEnv *env, jobject thisICalDurationType)
|
||||
{
|
||||
__ICalDurationType_->minutes = env->GetLongField(thisICalDurationType, ICalDurationType_Minutes_FID);
|
||||
}
|
||||
|
||||
void jni_SetSeconds_in_ICalDurationType(struct ICalDurationType* __ICalDurationType_, JNIEnv *env, jobject thisICalDurationType)
|
||||
{
|
||||
env->SetLongField(thisICalDurationType, ICalDurationType_Seconds_FID, (jlong) __ICalDurationType_->seconds);
|
||||
}
|
||||
|
||||
void jni_GetSeconds_from_ICalDurationType(struct ICalDurationType* __ICalDurationType_, JNIEnv *env, jobject thisICalDurationType)
|
||||
{
|
||||
__ICalDurationType_->seconds = env->GetLongField(thisICalDurationType, ICalDurationType_Seconds_FID);
|
||||
}
|
||||
|
||||
// copy all fields from the c struct (ICalDurationType) to the java object (thisICalDurationType).
|
||||
void jni_SetAll_in_ICalDurationType(struct ICalDurationType* __ICalDurationType_, JNIEnv* env, jobject thisICalDurationType)
|
||||
{
|
||||
jni_SetIs_neg_in_ICalDurationType(__ICalDurationType_, env, thisICalDurationType);
|
||||
jni_SetDays_in_ICalDurationType(__ICalDurationType_, env, thisICalDurationType);
|
||||
jni_SetWeeks_in_ICalDurationType(__ICalDurationType_, env, thisICalDurationType);
|
||||
jni_SetHours_in_ICalDurationType(__ICalDurationType_, env, thisICalDurationType);
|
||||
jni_SetMinutes_in_ICalDurationType(__ICalDurationType_, env, thisICalDurationType);
|
||||
jni_SetSeconds_in_ICalDurationType(__ICalDurationType_, env, thisICalDurationType);
|
||||
}
|
||||
|
||||
// copy all fields from the java object (thisICalDurationType) to the c struct (__ICalDurationType_).
|
||||
void jni_GetAll_from_ICalDurationType(struct ICalDurationType* __ICalDurationType_, JNIEnv* env, jobject thisICalDurationType)
|
||||
{
|
||||
jni_GetIs_neg_from_ICalDurationType(__ICalDurationType_, env, thisICalDurationType);
|
||||
jni_GetDays_from_ICalDurationType(__ICalDurationType_, env, thisICalDurationType);
|
||||
jni_GetWeeks_from_ICalDurationType(__ICalDurationType_, env, thisICalDurationType);
|
||||
jni_GetHours_from_ICalDurationType(__ICalDurationType_, env, thisICalDurationType);
|
||||
jni_GetMinutes_from_ICalDurationType(__ICalDurationType_, env, thisICalDurationType);
|
||||
jni_GetSeconds_from_ICalDurationType(__ICalDurationType_, env, thisICalDurationType);
|
||||
}
|
||||
/*
|
||||
* Class: net_cp_jlibical_ICalDurationType
|
||||
* Method: init
|
||||
* Signature: (J)V
|
||||
*/
|
||||
JNIEXPORT void JNICALL Java_net_cp_jlibical_ICalDurationType_init__J
|
||||
(JNIEnv *env, jobject thisICalDurationType, jlong data)
|
||||
{
|
||||
// copy all fields from the c struct (data) to the java object (thisICalDurationType).
|
||||
jni_SetAll_in_ICalDurationType((ICalDurationType*)data,env,thisICalDurationType);
|
||||
}
|
||||
|
||||
/*
|
||||
* Class: net_cp_jlibical_ICalDurationType
|
||||
* Method: initFIDs
|
||||
* Signature: ()V
|
||||
*/
|
||||
JNIEXPORT void JNICALL Java_net_cp_jlibical_ICalDurationType_initFIDs(JNIEnv *env, jclass clazz) {
|
||||
initICalDurationTypeFieldIDs(env, clazz);
|
||||
}
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user