summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAllen Winter <allen.winter@kdab.com>2021-11-28 12:56:10 -0500
committerAllen Winter <allen.winter@kdab.com>2021-11-28 12:56:10 -0500
commit26568d1998e2d26345c0b73759cf27da150e1e9d (patch)
tree8b2f8e5f1afc15a52c1e54ed4c0642b3655258bc
parent8644f0fb781daa66de4186ead5ebfe4fba581ac9 (diff)
downloadlibical-git-26568d1998e2d26345c0b73759cf27da150e1e9d.tar.gz
lots of spelling fixes found by codespell
-rw-r--r--THANKS4
-rw-r--r--TODO4
-rw-r--r--cmake/Toolchain-iOS.cmake4
-rw-r--r--debian/changelog2
-rw-r--r--design-data/parameters.csv2
-rw-r--r--design-data/status.txt2
-rw-r--r--doc/CMakeLists.txt2
-rw-r--r--doc/UsingLibical.md24
-rw-r--r--examples/access_components.c4
-rw-r--r--examples/errors.c2
-rw-r--r--src/Net-ICal-Libical/lib/Net/ICal/Libical.pm2
-rw-r--r--src/Net-ICal-Libical/lib/Net/ICal/Libical/Time.pm4
-rw-r--r--src/Net-ICal-Libical/netical.i2
-rwxr-xr-xsrc/Net-ICal-Libical/test/libical.pl2
-rw-r--r--src/java/jlibical_utils_cxx.cpp2
-rw-r--r--src/java/testjni.java2
-rw-r--r--src/libical-glib/api/i-cal-array.xml2
-rw-r--r--src/libical-glib/api/i-cal-parameter.xml2
-rw-r--r--src/libical-glib/api/i-cal-recur.xml6
-rw-r--r--src/libical-glib/i-cal-object.c.in2
-rw-r--r--src/libical/caldate.c2
-rw-r--r--src/libical/icalarray.h2
-rw-r--r--src/libical/icalduration.h2
-rw-r--r--src/libical/icalparser.c8
-rw-r--r--src/libical/icalperiod.h2
-rw-r--r--src/libical/icaltime.h6
-rw-r--r--src/libical/icaltimezone.c2
-rw-r--r--src/libical/icaltimezone.h2
-rw-r--r--src/libical/icalvalue.h2
-rw-r--r--src/libical/icptrholder_cxx.h4
-rw-r--r--src/libical/pvl.c4
-rw-r--r--src/libical/pvl.h2
-rw-r--r--src/libical/sspm.c2
-rw-r--r--src/libical/vcomponent_cxx.cpp2
-rw-r--r--src/libicalss/icalbdbset.c2
-rw-r--r--src/libicalss/icalbdbset_cxx.h2
-rw-r--r--src/libicalss/icaldirset.h4
-rw-r--r--src/libicalss/icalfileset.c2
-rw-r--r--src/libicalss/icalgauge.h2
-rw-r--r--src/libicalss/icalset.h2
-rw-r--r--src/libicalss/icalspanlist.c2
-rw-r--r--src/libicalvcal/README.TXT1902
-rw-r--r--src/libicalvcal/icalvcal.c2
-rw-r--r--src/libicalvcal/vcc.c4
-rw-r--r--src/libicalvcal/vcc.y4
-rw-r--r--src/python/ChangeLog44
-rw-r--r--src/python/Collection.py2
-rw-r--r--src/python/Gauge.py2
-rw-r--r--src/python/LibicalWrap_icaltime.i2
-rw-r--r--src/python/Period.py2
-rw-r--r--src/python/python-binding.txt4
-rw-r--r--src/python/test.py4
-rw-r--r--src/test/regression-classify.c2
53 files changed, 1054 insertions, 1054 deletions
diff --git a/THANKS b/THANKS
index d795eeca..7d9a58e3 100644
--- a/THANKS
+++ b/THANKS
@@ -4,7 +4,7 @@ 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
+miscellaneous code bits
Seth Alves <alves@hungry.com> for the first cut at the Makefile.am
files and various utility functions.
@@ -27,7 +27,7 @@ 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.
+miscellaneous patches and adjustments to the build system.
Cornelius Schumacher <schumacher@kde.org> for many insightful
suggestions and a few patches.
diff --git a/TODO b/TODO
index e781d1a8..ea35d734 100644
--- a/TODO
+++ b/TODO
@@ -4,7 +4,7 @@ TODOs for libical
fix Coverity Scan issues
libical treats properties with multiple values incorrecty -- it always
-seperates multiple values into multiple properties. This is not
+separates 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
@@ -31,7 +31,7 @@ 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
+Check all uses of strcpy and sprintf for buffer overflows
Make the mime parsing code in sspm grow the list of parts as needed,
rather than having a hard limit.
diff --git a/cmake/Toolchain-iOS.cmake b/cmake/Toolchain-iOS.cmake
index 3fe4c3db..5bef083b 100644
--- a/cmake/Toolchain-iOS.cmake
+++ b/cmake/Toolchain-iOS.cmake
@@ -47,7 +47,7 @@ set (CMAKE_C_OSX_CURRENT_VERSION_FLAG "-current_version ")
set (CMAKE_CXX_OSX_COMPATIBILITY_VERSION_FLAG "${CMAKE_C_OSX_COMPATIBILITY_VERSION_FLAG}")
set (CMAKE_CXX_OSX_CURRENT_VERSION_FLAG "${CMAKE_C_OSX_CURRENT_VERSION_FLAG}")
-# Hidden visibilty is required for cxx on iOS
+# Hidden visibility is required for cxx on iOS
set (CMAKE_C_FLAGS "")
set (CMAKE_CXX_FLAGS "-headerpad_max_install_names -fvisibility=hidden -fvisibility-inlines-hidden")
@@ -98,7 +98,7 @@ if (NOT DEFINED CMAKE_IOS_SDK_ROOT)
list (REVERSE _CMAKE_IOS_SDKS)
list (GET _CMAKE_IOS_SDKS 0 CMAKE_IOS_SDK_ROOT)
else (_CMAKE_IOS_SDKS)
- message (FATAL_ERROR "No iOS SDK's found in default seach path ${CMAKE_IOS_DEVELOPER_ROOT}. Manually set CMAKE_IOS_SDK_ROOT or install the iOS SDK.")
+ message (FATAL_ERROR "No iOS SDK's found in default search path ${CMAKE_IOS_DEVELOPER_ROOT}. Manually set CMAKE_IOS_SDK_ROOT or install the iOS SDK.")
endif (_CMAKE_IOS_SDKS)
message (STATUS "Toolchain using default iOS SDK: ${CMAKE_IOS_SDK_ROOT}")
endif (NOT DEFINED CMAKE_IOS_SDK_ROOT)
diff --git a/debian/changelog b/debian/changelog
index aeae6c09..00523e02 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -15,7 +15,7 @@ libical (0.30-1) unstable; urgency=low
[ Wilfried Goesgens ]
* remove CDBS
* merge into upstream libical
- * merge in several patches roaming arround
+ * merge in several patches roaming around
-- Wilfried Goesgens <w.goesgens@outgesourced.org> Wed, 30 Nov 2007 12:19:06 +0100
diff --git a/design-data/parameters.csv b/design-data/parameters.csv
index cfa82c78..21696b8c 100644
--- a/design-data/parameters.csv
+++ b/design-data/parameters.csv
@@ -38,7 +38,7 @@
"LOCALIZE","17","const char*",
"OPTIONS","19","const char*",
"NO","32",,
-"#In practice any unknown paramater that is not an xparam is treated as an ianaparam"
+"#In practice any unknown parameter that is not an xparam is treated as an ianaparam"
"IANA","33","const char*",
"ANY","0",,
"#VPOLL Parameters","draft-york-vpoll","PUBLIC-COMMENT and RESPONSE are deprecated"
diff --git a/design-data/status.txt b/design-data/status.txt
index 9e7bbf83..9c290e00 100644
--- a/design-data/status.txt
+++ b/design-data/status.txt
@@ -2,7 +2,7 @@
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.3 ABORTED The command currently underway was successfully 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.
diff --git a/doc/CMakeLists.txt b/doc/CMakeLists.txt
index 8f15bd0e..5a33a4d3 100644
--- a/doc/CMakeLists.txt
+++ b/doc/CMakeLists.txt
@@ -15,7 +15,7 @@ set_package_properties(Doxygen PROPERTIES
TYPE OPTIONAL
DESCRIPTION "API Documentation system"
URL "http://www.doxygen.org"
- PURPOSE "Needed to build the API documention."
+ PURPOSE "Needed to build the API documentation."
)
if(DOXYGEN_FOUND)
file(GLOB _dox_deps *.dox *.html)
diff --git a/doc/UsingLibical.md b/doc/UsingLibical.md
index b25c74d9..04b22306 100644
--- a/doc/UsingLibical.md
+++ b/doc/UsingLibical.md
@@ -168,7 +168,7 @@ errors and component usage errors.
#### 3.2.4 Memory Management
Since many of libicals interfaces return strings, the library has its
-own memory management system to elimiate the need to free every string
+own memory management system to eliminate the need to free every string
returned from the library.
#### 3.2.5 Storage classes
@@ -395,7 +395,7 @@ icalparser_set_gen_data(
These routines will construct a parser object to which you can add
lines of input and retrieve any components that the parser creates
-from the input. These routines work by specifing an adaptor routine
+from the input. These routines work by specifying an adaptor routine
to get string data from a source. For example:
```c
@@ -562,7 +562,7 @@ for(c = icalcomponent_get_first_component(comp, ICAL_ANY_COMPONENT);
}
```
-This code bit wil iterate through all of the subcomponents in `comp`
+This code bit will iterate through all of the subcomponents in `comp`
but you can select a specific type of component by changing `ICAL_ANY_COMPONENT`
to another component type.
@@ -859,7 +859,7 @@ hold the broken-out
time values. The `is_utc` field distinguishes between times in UTC and
a local time zone. The `is_date` field indicates if the time should
be interpreted only as a date. If it is a date, the hour, minute and
-second fields are assumed to be zero, regardless of their actual vaules.
+second fields are assumed to be zero, regardless of their actual values.
#### 5.3.2 Creating time structures
@@ -884,8 +884,8 @@ struct icaltimetype tt = icaltime_from_string("19970101T103000");
`icaltime_from_timet_with_zone()` takes a `time_t` value, representing seconds past
the POSIX epoch, a flag to indicate if the time is a date, and a time zone.
Dates have an identical structure to a time, but the time portion (hours,
-minuts and seconds) is always 00:00:00. Dates act differently in
-sorting and comparision, and they have a different string representation
+minutes and seconds) is always 00:00:00. Dates act differently in
+sorting and comparison, and they have a different string representation
in [RFC5545][].
#### 5.3.3 Time manipulating routines
@@ -1009,11 +1009,11 @@ struct icaltimetype icaltime_as_local(
The libical distribution includes a separate library, libicalss, that
allows you to store iCal component data to disk in a variety of ways.
-The file storage routines are organized in an inheritance heirarchy
+The file storage routines are organized in an inheritance hierarchy
that is rooted in icalset, with the derived class icalfileset and
icaldirset. Icalfileset stores components to a file, while icaldirset
stores components to multiple files, one per month based on DTSTAMP.
-Other storages classess, for storage to a heap or a mysql database
+Other storages classes, for storage to a heap or a mysql database
for example, could be added in the future.
All of the icalset derived classes have the same interface:
@@ -1113,11 +1113,11 @@ open an existing file for reading and writing, or create a new file
if it does not exist. `icalfileset_new_open()` takes the same arguments
as the open() system routine and behaves in the same way.
-The icalset and icalfilset objects are somewhat interchangable -- you
+The icalset and icalfilset objects are somewhat interchangeable -- you
can use an `icalfileset*` as an argument to any of the icalset routines.
The following examples will all use icalfileset routines; using the
-other icalset derived classess will be similar.
+other icalset derived classes will be similar.
#### 5.4.2 Adding, Finding and Removing Components
@@ -1130,7 +1130,7 @@ icalerrorenum icalfileset_add_component(
```
The fileset keeps an inmemory copy of the components, and this set
-must be written back to the file ocassionally. There are two routines
+must be written back to the file occasionally. There are two routines
to manage this:
```c
@@ -1325,7 +1325,7 @@ RFC5545.
There are a few routines to manipulate error properties:
[ The following data is supposed to be in a table. It looks OK in LyX,
-but does not format propertly in output. ]
+but does not format properly in output. ]
+-------------------------------------+---------------------------------------------------------+
| Routine | Purpose |
diff --git a/examples/access_components.c b/examples/access_components.c
index 4548d70f..c0e3985f 100644
--- a/examples/access_components.c
+++ b/examples/access_components.c
@@ -17,7 +17,7 @@ void do_something(icalcomponent *c);
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
+ constructors, resulting in a compact, neatly formatted way to create
components. This style is shown in create_new_component_with_va_args()
@@ -49,7 +49,7 @@ icalcomponent* create_new_component()
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
+ /* The next call creates a new property and immediately adds it to the
'calendar' component. */
icalcomponent_add_property(
diff --git a/examples/errors.c b/examples/errors.c
index 8ffdc1d3..f50c4c9d 100644
--- a/examples/errors.c
+++ b/examples/errors.c
@@ -57,7 +57,7 @@ void component_errors(icalcomponent *comp)
/* 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
+ X-LIC-ERROR properties should be expressed as REQUEST-STATUS
properties in the reply. This following routine makes this
conversion */
diff --git a/src/Net-ICal-Libical/lib/Net/ICal/Libical.pm b/src/Net-ICal-Libical/lib/Net/ICal/Libical.pm
index 61970c29..070d58be 100644
--- a/src/Net-ICal-Libical/lib/Net/ICal/Libical.pm
+++ b/src/Net-ICal-Libical/lib/Net/ICal/Libical.pm
@@ -175,7 +175,7 @@ sub start {}
#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.
+#method will calculate the end time from the duration.
sub end {}
#Return or set the duration of the period. The duration may be
diff --git a/src/Net-ICal-Libical/lib/Net/ICal/Libical/Time.pm b/src/Net-ICal-Libical/lib/Net/ICal/Libical/Time.pm
index f0af7e42..7302764d 100644
--- a/src/Net-ICal-Libical/lib/Net/ICal/Libical/Time.pm
+++ b/src/Net-ICal-Libical/lib/Net/ICal/Libical/Time.pm
@@ -46,7 +46,7 @@ Net::ICal::Time -- represent a time and date
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.
+can be constructed from a variety of formats.
=head1 METHODS
@@ -443,7 +443,7 @@ sub as_gmtime {
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
+does the comparison after converting the time to UTC. It converts
floating times using the system notion of the timezone.
=cut
diff --git a/src/Net-ICal-Libical/netical.i b/src/Net-ICal-Libical/netical.i
index e0dad14b..ab06efbd 100644
--- a/src/Net-ICal-Libical/netical.i
+++ b/src/Net-ICal-Libical/netical.i
@@ -163,7 +163,7 @@ icalcomponent* icallangbind_get_next_component(icalcomponent *c,
/* Returns 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
+ parameters. Sep is the hash separation string, "=>" for perl and
":" for python */
const char* icallangbind_property_eval_string(icalproperty* prop, const char* sep);
diff --git a/src/Net-ICal-Libical/test/libical.pl b/src/Net-ICal-Libical/test/libical.pl
index 702258db..7c1e48dd 100755
--- a/src/Net-ICal-Libical/test/libical.pl
+++ b/src/Net-ICal-Libical/test/libical.pl
@@ -52,7 +52,7 @@ ORGANIZER:mailto:a\@example.com
DTSTAMP:19970612T190000Z
DTSTART:19970701T210000Z
DTEND:19970701T230000Z
-SEQENCE:1
+SEQUENCE:1
UID:0981234-1234234-23\@example.com
SUMMARY:ST. PAUL SAINTS -VS- DULUTH-SUPERIOR DUKES
END:VEVENT
diff --git a/src/java/jlibical_utils_cxx.cpp b/src/java/jlibical_utils_cxx.cpp
index 0a3ee35a..d89ee862 100644
--- a/src/java/jlibical_utils_cxx.cpp
+++ b/src/java/jlibical_utils_cxx.cpp
@@ -399,7 +399,7 @@ jobject createNewICalPeriodType(JNIEnv *env, icalperiodtype* source)
}
//-------------------------------------------------------
-// Creat a new surrogate of the given type for the given subject.
+// Create a new surrogate of the given type for the given subject.
//-------------------------------------------------------
jobject doCreateNewSurrogate(JNIEnv *env, jclass surrogateClass, jlong subject)
{
diff --git a/src/java/testjni.java b/src/java/testjni.java
index d90c327b..bb6a6aee 100644
--- a/src/java/testjni.java
+++ b/src/java/testjni.java
@@ -330,7 +330,7 @@ public class testjni
// AFTER the event or task start or due date, which is useless.
duration.setIs_neg(1);
- // 2. Create a ICalTriggerType oject and set the duration on it.
+ // 2. Create a ICalTriggerType object and set the duration on it.
ICalTriggerType trigger = new ICalTriggerType();
trigger.setDuration(duration);
System.out.println("set trigger to duration object");
diff --git a/src/libical-glib/api/i-cal-array.xml b/src/libical-glib/api/i-cal-array.xml
index 70e678c0..bd7641da 100644
--- a/src/libical-glib/api/i-cal-array.xml
+++ b/src/libical-glib/api/i-cal-array.xml
@@ -59,7 +59,7 @@
</method>
<method name="i_cal_array_sort" corresponds="CUSTOM" annotation="skip" kind="others" since="1.0">
<parameter type="ICalArray *" name="array" comment="The #ICalArray to be sorted"/>
- <parameter type="gint (*compare)" name="(const void *, const void *)" annotation="scope call" comment="FULL: @compare: (scope call): The comapre function"/>
+ <parameter type="gint (*compare)" name="(const void *, const void *)" annotation="scope call" comment="FULL: @compare: (scope call): The compare function"/>
<comment xml:space="preserve">Does not work right now. Sorts the @array using the sort function @compare.</comment>
<custom> g_return_if_fail (I_CAL_IS_ARRAY (array));
g_return_if_fail (array != NULL);
diff --git a/src/libical-glib/api/i-cal-parameter.xml b/src/libical-glib/api/i-cal-parameter.xml
index 1595d5eb..7b1b4a84 100644
--- a/src/libical-glib/api/i-cal-parameter.xml
+++ b/src/libical-glib/api/i-cal-parameter.xml
@@ -36,7 +36,7 @@
<comment xml:space="preserve">Creates a new #ICalParameter from just the value, the part after the "="</comment>
</method>
<method name="i_cal_parameter_free" corresponds="icalparameter_free" annotation="skip" kind="destructor" since="1.0">
- <parameter type="ICalParameter *" name="parameter" annotation="in" comment="The #ICalParameter to be freeed"/>
+ <parameter type="ICalParameter *" name="parameter" annotation="in" comment="The #ICalParameter to be freed"/>
<comment xml:space="preserve">Frees the native part of the ICalParameter.</comment>
</method>
<method name="i_cal_parameter_as_ical_string" corresponds="icalparameter_as_ical_string_r" kind="others" since="1.0">
diff --git a/src/libical-glib/api/i-cal-recur.xml b/src/libical-glib/api/i-cal-recur.xml
index 0edf25bc..870ea61b 100644
--- a/src/libical-glib/api/i-cal-recur.xml
+++ b/src/libical-glib/api/i-cal-recur.xml
@@ -42,7 +42,7 @@
<comment xml:space="preserve">Converts a string representation to an enum representation for the weekday.</comment>
</method>
<method name="i_cal_recurrence_weekday_to_string" corresponds="icalrecur_weekday_to_string" since="2.0">
- <parameter type="ICalRecurrenceWeekday" name="kind" comment="The freqeuncy enum"/>
+ <parameter type="ICalRecurrenceWeekday" name="kind" comment="The frequency enum"/>
<returns type="const gchar *" comment="The string representation of weekday"/>
<comment xml:space="preserve">Converts a enum representation to a string representation for the weekday.</comment>
</method>
@@ -52,7 +52,7 @@
<comment xml:space="preserve">Converts a string representation to an enum representation for the frequency.</comment>
</method>
<method name="i_cal_recurrence_frequency_to_string" corresponds="icalrecur_freq_to_string" since="2.0">
- <parameter type="ICalRecurrenceFrequency" name="kind" comment="The freqeuncy enum"/>
+ <parameter type="ICalRecurrenceFrequency" name="kind" comment="The frequency enum"/>
<returns type="const gchar *" comment="The string representation of frequency"/>
<comment xml:space="preserve">Converts a enum representation to a string representation for the frequency.</comment>
</method>
@@ -62,7 +62,7 @@
<comment xml:space="preserve">Converts a string representation to an enum representation for the skip.</comment>
</method>
<method name="i_cal_recurrence_skip_to_string" corresponds="icalrecur_skip_to_string" since="2.0">
- <parameter type="ICalRecurrenceSkip" name="kind" comment="The freqeuncy enum"/>
+ <parameter type="ICalRecurrenceSkip" name="kind" comment="The frequency enum"/>
<returns type="const gchar *" comment="The string representation of skip"/>
<comment xml:space="preserve">Converts a enum representation to a string representation for the skip.</comment>
</method>
diff --git a/src/libical-glib/i-cal-object.c.in b/src/libical-glib/i-cal-object.c.in
index e5186106..686c7bcd 100644
--- a/src/libical-glib/i-cal-object.c.in
+++ b/src/libical-glib/i-cal-object.c.in
@@ -524,7 +524,7 @@ void i_cal_object_set_native_destroy_func(ICalObject *iobject, GDestroyNotify na
* @iobject: an #ICalObject
*
* Obtains whether the native libical structure is a global shared memory,
- * thus should not be destroyed. This can be set only during contruction time.
+ * thus should not be destroyed. This can be set only during construction time.
*
* Returns: Whether the native libical structure is a global shared memory.
*
diff --git a/src/libical/caldate.c b/src/libical/caldate.c
index 38891a35..dc4aaae6 100644
--- a/src/libical/caldate.c
+++ b/src/libical/caldate.c
@@ -47,7 +47,7 @@
* has been set. ( = 0 for 01 Jan 4713 B.C. 12 HR UT )
*
* Output: will set all the other elements of the structure.
- * As a convienence, the function will also return the year.
+ * As a convenience, the function will also return the year.
*
* Reference: Astronomial formulae for calculators, meeus, p 23
* from fortran program by F. Espenak - April 1982 Page 277,
diff --git a/src/libical/icalarray.h b/src/libical/icalarray.h
index a945be60..2fc9fb26 100644
--- a/src/libical/icalarray.h
+++ b/src/libical/icalarray.h
@@ -173,7 +173,7 @@ LIBICAL_ICAL_EXPORT void icalarray_append(icalarray *array, const void *element)
*
* @par Error handling
* If @a array is `NULL`, using this function results in undefined behaviour.
- * If the array is empty, using this functino results in undefined behaviour.
+ * If the array is empty, using this function results in undefined behaviour.
* If the @a position is non-existent, it removes the last element.
*
* ### Usage
diff --git a/src/libical/icalduration.h b/src/libical/icalduration.h
index 5618de01..228dab7c 100644
--- a/src/libical/icalduration.h
+++ b/src/libical/icalduration.h
@@ -69,7 +69,7 @@ LIBICAL_ICAL_EXPORT struct icaldurationtype icaldurationtype_from_int(int t);
*
* @par Error handling
* When given bad input, it sets ::icalerrno to ::ICAL_MALFORMEDDATA_ERROR and
- * returnes icaldurationtype_bad_duration().
+ * returns icaldurationtype_bad_duration().
*
* ### Usage
* ```c
diff --git a/src/libical/icalparser.c b/src/libical/icalparser.c
index 3bc3d5f6..c2735b66 100644
--- a/src/libical/icalparser.c
+++ b/src/libical/icalparser.c
@@ -392,7 +392,7 @@ static char *parser_get_next_value(char *line, char **end, icalvalue_kind kind)
next = parser_get_next_char(',', p, 1);
- /* Unforunately, RFC2445 allowed that for the RECUR value, COMMA
+ /* Unfortunately, RFC2445 allowed that for the RECUR value, COMMA
could both separate digits in a list, and it could separate
multiple recurrence specifications. This is not a friendly
part of the spec and was deprecated in RFC5545. The following
@@ -901,7 +901,7 @@ icalcomponent *icalparser_add_line(icalparser *parser, char *line)
if (name_heap == 0) {
/* 'tail' defined above */
- insert_error(tail, str, "Cant parse parameter name",
+ insert_error(tail, str, "Can't parse parameter name",
ICAL_XLICERRORTYPE_PARAMETERNAMEPARSEERROR);
tail = 0;
break;
@@ -1012,7 +1012,7 @@ icalcomponent *icalparser_add_line(icalparser *parser, char *line)
/* Change for mozilla */
/* have the option of being flexible towards unsupported parameters */
#if ICAL_ERRORS_ARE_FATAL == 1
- insert_error(tail, str, "Cant parse parameter name",
+ insert_error(tail, str, "Can't parse parameter name",
ICAL_XLICERRORTYPE_PARAMETERNAMEPARSEERROR);
tail = 0;
parser->state = ICALPARSER_ERROR;
@@ -1054,7 +1054,7 @@ icalcomponent *icalparser_add_line(icalparser *parser, char *line)
if (param == 0) {
/* 'tail' defined above */
- insert_error(tail, str, "Cant parse parameter value",
+ insert_error(tail, str, "Can't parse parameter value",
ICAL_XLICERRORTYPE_PARAMETERVALUEPARSEERROR);
tail = 0;
diff --git a/src/libical/icalperiod.h b/src/libical/icalperiod.h
index 6d2e72c0..fb8e3140 100644
--- a/src/libical/icalperiod.h
+++ b/src/libical/icalperiod.h
@@ -50,7 +50,7 @@ struct icalperiodtype
/**
* @brief Constructs a new ::icalperiodtype from @a str
* @param str The string from which to construct a time period
- * @return An ::icalperiodtype representing the peroid @a str
+ * @return An ::icalperiodtype representing the period @a str
* @sa icaltime_from_string(), icaldurationtype_from_string()
*
* @par Error handling
diff --git a/src/libical/icaltime.h b/src/libical/icaltime.h
index d672f2c4..1e28492b 100644
--- a/src/libical/icaltime.h
+++ b/src/libical/icaltime.h
@@ -85,7 +85,7 @@
#include <time.h>
/* An opaque struct representing a timezone. We declare this here to avoid
- a circular dependancy. */
+ a circular dependency. */
#if !defined(ICALTIMEZONE_DEFINED)
#define ICALTIMEZONE_DEFINED
typedef struct _icaltimezone icaltimezone;
@@ -173,7 +173,7 @@ LIBICAL_ICAL_EXPORT struct icaltimetype icaltime_from_timet_with_zone(const time
const int is_date,
const icaltimezone *zone);
-/** @brief Contructor.
+/** @brief Constructor.
*
* Creates a time from an ISO format string.
*
@@ -184,7 +184,7 @@ LIBICAL_ICAL_EXPORT struct icaltimetype icaltime_from_timet_with_zone(const time
*/
LIBICAL_ICAL_EXPORT struct icaltimetype icaltime_from_string(const char *str);
-/** @brief Contructor.
+/** @brief Constructor.
*
* Creates a new time, given a day of year and a year.
*
diff --git a/src/libical/icaltimezone.c b/src/libical/icaltimezone.c
index 1826d2d0..e57c08d2 100644
--- a/src/libical/icaltimezone.c
+++ b/src/libical/icaltimezone.c
@@ -1595,7 +1595,7 @@ static int fetch_lat_long_from_string(const char *str,
size_t len;
char *sptr, *lat, *lon, *loc, *temp;
- /* We need to parse the latitude/longitude co-ordinates and location fields */
+ /* We need to parse the latitude/longitude coordinates and location fields */
sptr = (char *)str;
while ((*sptr != '\t') && (*sptr != '\0')) {
sptr++;
diff --git a/src/libical/icaltimezone.h b/src/libical/icaltimezone.h
index 241e5b42..90951ac4 100644
--- a/src/libical/icaltimezone.h
+++ b/src/libical/icaltimezone.h
@@ -31,7 +31,7 @@
#if !defined(ICALTIMEZONE_DEFINED)
#define ICALTIMEZONE_DEFINED
/** @brief An opaque struct representing a timezone.
- * We declare this here to avoid a circular dependancy.
+ * We declare this here to avoid a circular dependency.
*/
typedef struct _icaltimezone icaltimezone;
#endif
diff --git a/src/libical/icalvalue.h b/src/libical/icalvalue.h
index 69dce8f1..b3f899ba 100644
--- a/src/libical/icalvalue.h
+++ b/src/libical/icalvalue.h
@@ -73,7 +73,7 @@ LIBICAL_ICAL_EXPORT const char *icalvalue_kind_to_string(const icalvalue_kind ki
/** Check validity of a specific icalvalue_kind **/
LIBICAL_ICAL_EXPORT int icalvalue_kind_is_valid(const icalvalue_kind kind);
-/** Encode a character string in ical format, esacpe certain characters, etc. */
+/** Encode a character string in ical format, escape certain characters, etc. */
LIBICAL_ICAL_EXPORT int icalvalue_encode_ical_string(const char *szText,
char *szEncText, int MaxBufferLen);
diff --git a/src/libical/icptrholder_cxx.h b/src/libical/icptrholder_cxx.h
index 23805bcd..bd63fe5a 100644
--- a/src/libical/icptrholder_cxx.h
+++ b/src/libical/icptrholder_cxx.h
@@ -5,13 +5,13 @@
* VComponent::get_..._component, VComponent::get_..._property,
* ICalProperty::get_..._value.
*
- * @remarks VComponent::get... functions returns a C++ oject that wraps the
+ * @remarks VComponent::get... functions returns a C++ object that wraps the
* libical implementation. It is important to note that the wrapped
* implementation still belongs to the original component. To stop memory leak,
* caller must delete the pointer. However, the destructor will call the
* appropriate free function. eg. ~VComponent calls icalcomponent_free(imp).
*
- * As stated previously, imp stil belongs to the original component. To avoid
+ * As stated previously, imp still belongs to the original component. To avoid
* freeing the wrapped "imp", caller must set the "imp" to null before deleting
* the pointer.
*
diff --git a/src/libical/pvl.c b/src/libical/pvl.c
index c2147cdb..4f66c920 100644
--- a/src/libical/pvl.c
+++ b/src/libical/pvl.c
@@ -55,7 +55,7 @@ static int pvl_list_count = 0;
/**
struct pvl_list_t
- The list structure. This is the hanlde for the entire list
+ The list structure. This is the handle for the entire list
This type is also private. Use pvl_list instead
@@ -392,7 +392,7 @@ void *pvl_remove(pvl_list L, pvl_elem E)
/**
* @brief Return a pointer to data that satisfies a function.
*
- * This routine will interate through the entire list and call the
+ * This routine will iterate through the entire list and call the
* find function for each item. It will break and return a pointer to the
* data that causes the find function to return 1.
*
diff --git a/src/libical/pvl.h b/src/libical/pvl.h
index 02ff1fa0..50feef16 100644
--- a/src/libical/pvl.h
+++ b/src/libical/pvl.h
@@ -75,7 +75,7 @@ LIBICAL_ICAL_EXPORT void pvl_clear(pvl_list); /* Remove all elements, de-alloc
LIBICAL_ICAL_EXPORT int pvl_count(pvl_list);
-/* Navagate the list */
+/* Navigate the list */
LIBICAL_ICAL_EXPORT pvl_elem pvl_next(pvl_elem e);
LIBICAL_ICAL_EXPORT pvl_elem pvl_prior(pvl_elem e);
diff --git a/src/libical/sspm.c b/src/libical/sspm.c
index 4875e438..72ebf3be 100644
--- a/src/libical/sspm.c
+++ b/src/libical/sspm.c
@@ -813,7 +813,7 @@ static void sspm_make_part(struct mime_impl *impl,
}
/* add a end-of-string after the data, just in case binary
- data from decode64 gets passed to a tring handling
+ data from decode64 gets passed to a string handling
routine in add_line */
data[*size + 1] = '\0';
diff --git a/src/libical/vcomponent_cxx.cpp b/src/libical/vcomponent_cxx.cpp
index 23c90b5c..bdf2a78d 100644
--- a/src/libical/vcomponent_cxx.cpp
+++ b/src/libical/vcomponent_cxx.cpp
@@ -586,7 +586,7 @@ bool VComponent::remove(VComponent &fromVC, bool ignoreValue)
// recursively go down the components
c->remove(*comp, ignoreValue);
// if all properties are removed and there is no sub-components, then
- // remove this compoent
+ // remove this component
if ((c->count_properties(ICAL_ANY_PROPERTY) == 0) &&
(c->count_components(ICAL_ANY_COMPONENT) == 0)) {
this->remove_component(c);
diff --git a/src/libicalss/icalbdbset.c b/src/libicalss/icalbdbset.c
index f06b38e7..81c6e21f 100644
--- a/src/libicalss/icalbdbset.c
+++ b/src/libicalss/icalbdbset.c
@@ -1271,7 +1271,7 @@ icalsetiter icalbdbset_begin_component(icalset *set, icalcomponent_kind kind,
/* if there is a gauge, the first matched component is returned */
while (comp != 0) {
- /* check if it is a recurring component and with guage expand, if so
+ /* check if it is a recurring component and with gauge expand, if so
* we need to add recurrence-id property to the given component */
rrule = icalcomponent_get_first_property(comp, ICAL_RRULE_PROPERTY);
g = icalgauge_get_expand(gauge);
diff --git a/src/libicalss/icalbdbset_cxx.h b/src/libicalss/icalbdbset_cxx.h
index fd69c2c3..976d0d2f 100644
--- a/src/libicalss/icalbdbset_cxx.h
+++ b/src/libicalss/icalbdbset_cxx.h
@@ -58,7 +58,7 @@ namespace LibICal
VComponent *fetch_match(icalcomponent *c);
int has_uid(std::string &uid);
- // Iterate through components. If a guage has been defined, these
+ // Iterate through components. If a gauge has been defined, these
// will skip over components that do not pass the gauge
VComponent *get_current_component();
VComponent *get_first_component();
diff --git a/src/libicalss/icaldirset.h b/src/libicalss/icaldirset.h
index ca7f0f24..d3c3e35e 100644
--- a/src/libicalss/icaldirset.h
+++ b/src/libicalss/icaldirset.h
@@ -33,9 +33,9 @@
The primary interfaces are icaldirset__get_first_component and
icaldirset_get_next_component. These routine iterate through all of
the components in the store, subject to the current gauge. A gauge
- is an icalcomponent that is tested against other componets for a
+ is an icalcomponent that is tested against other components for a
match. If a gauge has been set with icaldirset_select,
- icaldirset_first and icaldirset_next will only return componentes
+ icaldirset_first and icaldirset_next will only return components
that match the gauge.
The Store generated UIDs for all objects that are stored if they do
diff --git a/src/libicalss/icalfileset.c b/src/libicalss/icalfileset.c
index 65f7a8b4..57e787c5 100644
--- a/src/libicalss/icalfileset.c
+++ b/src/libicalss/icalfileset.c
@@ -787,7 +787,7 @@ icalsetiter icalfileset_begin_component(icalset *set, icalcomponent_kind kind, i
while (comp != 0) {
- /* check if it is a recurring component and with guage expand, if so
+ /* check if it is a recurring component and with gauge expand, if so
we need to add recurrence-id property to the given component */
rrule = icalcomponent_get_first_property(comp, ICAL_RRULE_PROPERTY);
g = icalgauge_get_expand(gauge);
diff --git a/src/libicalss/icalgauge.h b/src/libicalss/icalgauge.h
index 3de1f92c..be6c7440 100644
--- a/src/libicalss/icalgauge.h
+++ b/src/libicalss/icalgauge.h
@@ -50,7 +50,7 @@ LIBICAL_ICALSS_EXPORT void icalgauge_dump(icalgauge *gauge);
/** @brief Returns true if comp matches the gauge.
*
* The component must be in
- * cannonical form -- a VCALENDAR with one VEVENT, VTODO or VJOURNAL
+ * canonical form -- a VCALENDAR with one VEVENT, VTODO or VJOURNAL
* sub component
*/
LIBICAL_ICALSS_EXPORT int icalgauge_compare(icalgauge *g, icalcomponent *comp);
diff --git a/src/libicalss/icalset.h b/src/libicalss/icalset.h
index 07875273..23e677d8 100644
--- a/src/libicalss/icalset.h
+++ b/src/libicalss/icalset.h
@@ -147,7 +147,7 @@ LIBICAL_ICALSS_EXPORT icalcomponent *icalset_fetch_match(icalset *set, icalcompo
LIBICAL_ICALSS_EXPORT icalerrorenum icalset_modify(icalset *set,
icalcomponent *oldc, icalcomponent *newc);
-/** Iterates through the components. If a guage has been defined, these
+/** Iterates through the components. If a gauge has been defined, these
will skip over components that do not pass the gauge */
LIBICAL_ICALSS_EXPORT icalcomponent *icalset_get_current_component(icalset *set);
diff --git a/src/libicalss/icalspanlist.c b/src/libicalss/icalspanlist.c
index 2ea91cf8..b74047ff 100644
--- a/src/libicalss/icalspanlist.c
+++ b/src/libicalss/icalspanlist.c
@@ -304,7 +304,7 @@ int *icalspanlist_as_freebusy_matrix(icalspanlist *sl, int delta_t)
sl_start = icaltime_as_timet_with_zone(sl->start, icaltimezone_get_utc_timezone());
sl_end = icaltime_as_timet_with_zone(sl->end, icaltimezone_get_utc_timezone());
- /* insure that the time period falls on a time boundary divisable
+ /* insure that the time period falls on a time boundary divisible
by delta_t */
sl_start /= delta_t;
diff --git a/src/libicalvcal/README.TXT b/src/libicalvcal/README.TXT
index aeaa18fc..e2148a2c 100644
--- a/src/libicalvcal/README.TXT
+++ b/src/libicalvcal/README.TXT
@@ -1,951 +1,951 @@
-NOTE: If you used the earlier APIs released by Versit
-then you will want to look at the document "migrate.doc"
-included with this package. It contains a discussion of
-the differences between the old API and this one.
-
-----------------------------------------------------------------
-
-The vCard/vCalendar C interface is implemented in the set
-of files as follows:
-
-vcc.y, yacc source, and vcc.c, the yacc output you will use
-implements the core parser
-
-vobject.c implements an API that insulates the caller from
-the parser and changes in the vCard/vCalendar BNF
-
-port.h defines compilation environment dependent stuff
-
-vcc.h and vobject.h are header files for their .c counterparts
-
-vcaltmp.h and vcaltmp.c implement vCalendar "macro" functions
-which you may find useful.
-
-test.c is a standalone test driver that exercises some of
-the features of the APIs provided. Invoke test.exe on a
-VCARD/VCALENDAR input text file and you will see the pretty
-print output of the internal representation (this pretty print
-output should give you a good idea of how the internal
-representation looks like -- there is one such output in the
-following too). Also, a file with the .out suffix is generated
-to show that the internal representation can be written back
-in the original text format.
-
------------------------------------------------------------------
-
-
- VObject for VCard/VCalendar
-
-Table of Contents
-=================
-1. VObject
-2. Internal Representations of VCard/VCalendar
-3. Iterating Through VObject's Properties or Values
-4. Pretty Printing a VObject Tree
-5. Building A VObject Representation of A VCard/VCalendar
-6. Converting A VObject Representation Into Its Textual Representation
-7. Miscellaneous Notes On VObject APIs usages
-8. Brief descriptions of each APIs
-9. Additional Programming Notes.
-
-This document is mainly about the VObject and its APIs. The main
-use of a VObject is to represent a VCard or a VCalendar inside
-a program. However, its use is not limited to aforemention as it
-can represent an arbitrary information that makes up of a tree or
-forest of properties/values.
-
-1. VObject
- =======
-A VObject can have a name (id) and a list of associated properties and
-a value. Each property is itself a VObject.
-
-2. Internal Representations of VCard/VCalendar
- ===========================================
-A list of VCard or a VCalendar is represented by a list of VObjects.
-The name (id) of the VObjects in the list is either VCCardProp or
-VCCalProp. Each of these VObjects can have a list of properties.
-Since a property is represented as a VObject, each of these properties
-can have a name, a list of properties, and a value.
-
-For example, the input file "vobject.vcf":
-
-BEGIN:VCARD
-N:Alden;Roland
-FN:Roland H. Alden
-ORG:AT&T;Versit Project Office
-TITLE:Consultant
-EMAIL;WORK;PREF;INTERNET:sf!rincon!ralden@alden.attmail.com
-EMAIL;INTERNET:ralden@sfgate.com
-EMAIL;MCIMail:242-2200
-LABEL;DOM;POSTAL;PARCEL;HOME;WORK;QUOTED-PRINTABLE:Roland H. Alden=0A=
-Suite 2208=0A=
-One Pine Street=0A=
-San Francisco, CA 94111
-LABEL;POSTAL;PARCEL;HOME;WORK;QUOTED-PRINTABLE:Roland H. Alden=0A=
-Suite 2208=0A=
-One Pine Street=0A=
-San Francisco, CA 94111=0A=
-U.S.A.
-TEL;WORK;PREF;MSG:+1 415 296 9106
-TEL;WORK;FAX:+1 415 296 9016
-TEL;MSG;CELL:+1 415 608 5981
-ADR:;Suite 2208;One Pine Street;San Francisco;CA;94111;U.S.A.
-SOUND:ROW-LAND H ALL-DIN
-LOGO;GIF;BASE64:
- R0lGODdhpgBOAMQAAP///+/v797e3s7Ozr29va2trZycnIyMjHt7e2NjY1JSUkJC
- QjExMSEhIRAQEO///87v9973/73n95zW71K13jGl1nvG50Kt3iGc1gCMzq3e94zO
- 7xCU1nO952O15wAAACwAAAAApgBOAAAF/yAgjmRpnmiqrmzrvnAsz3Rt33iu73zv
- /8CgcEj8QTaeywWTyWCUno2kSK0KI5tLc8vtNi+WiHVMlj0mFK96nalsxOW4fPSw
- cNj4tQc+7xcjGh4WExJTJYUTFkp3eU0eEH6RkpOUlTARhRoWm5ydFpCWoS0QEqAu
- ARKaHRcVjV0borEoFl0cSre4Sq67FA+yvwAeTU8XHZ7HmxS6u2wVfMCVpAE3pJoW
- ylrMptDcOqSF4OHg3eQ5pInInb7lcc86mNbLzBXsZbRfUOn6ucyNHvVWJHCpQFDf
- MWwEEzLqx2YCQCqF3OnItClJNmYcJD7cSAKTuI/gtnEcOQKkyVIk6/+ds5CkFcMM
- 61LiENikwi1jBnNyuvUSjwWZOS5uIZarqNFcNl32XMMB6I06GgoJ+bZp1ZKeDl8E
- +MC1K1cBIhZ4HUu2LAsCZdOWRQDt20lxIlccSHsgrNq7Xc/ixcsWmNu34WKyYJCW
- gQjCe9XqTZy2L4pv04gg2sSKSc8OLgTcBSuWsdkVaD2TdXyiQxebFyjo1Gnx6tJm
- LuaqrdtZtNfFtruSNmF5IKujwIsmJbjwtRqNJhrcNVw79wcRAgogmE4ArIjQzj/s
- JvHAGCFDQR4UqigPK4sBe62XwO51OwADiMcqUG+iOdcFAL+hW20BfAoEexlwAnu6
- mZDAXQ1EVh//WfhxJB5gIbHgwFgOTOiVAgOuVQKAfKFg3weGwSBYFZMp4hpDGKyA
- 3lgJKECWgiMQyBVpW+0V4oJjNfhCNkR1IgWEb21QlRK9GdfFCgeOZYBsXgm4noYj
- GEBhAQHYh0J8XenoQnFGdrkUciJY6FUAK15ogozakcBhliKsyZWHDMZQ0wWC/Aim
- DB6h01KRr/lXQgFxAqDcWDACgCZpUnrVQJtjwTnWjS6MWAYqqfDnSaEkJOlVXQBo
- 2pWTMUJ53WgAuPncCR9q6VQMAYjZlXWJmknCoSUM2p4BC+SaKwG88hoZlvfFMM4f
- hQh5TXkv+RklWYtC91mopJIAKFkJlDAW/wF25ShnLbeo5gmQ+1FGkJdrKCuCi2OR
- BuwHBcwqKgABrMtVAgpem61XkLbAJ7n8uiIpvGVhO4KpH1QLbbpqLheZvQCkGoNL
- thSzSTg2UGVBBzbtaxwKsYrmgLvRAlCmWgwMAADD66rKAgR3XlGspcdkZYK8ibU7
- asgEl+XAyB8I7PCqMWiWncGGimpfAgO4ypXSPpOVLwsRCDJxRD2AoyeRRv5kApO5
- fXwzwvfOKLKtaTWtbQxccmGLTZy8xYlVSvXbhbk0M2YzrYfJJ0K8m+V9NgxpyC04
- UycI/aiuiH9Y8NftDUwWp1Wm5UABnAUKwwRsPFGBt4Oc9PZvGvNLwf8JOZt8Arpe
- eY23yDovwIDiBX74NAsPVLDJj3Hh4JEExsKcjrlKf9DsCVx3ZfLqAKBuG1s/A90C
- z2KjYHjjyPOdG1spz6BBUr+BcUxUb1nDCTa/VZD2Uv+YkLPAKJC9dNEh7628WgqI
- ybzlaA+ufxMa6bxC6ciLUQLcx5UGIAAsAkDA6wQkOxrcY39yo4cQMNWCAPTKV1R4
- wPkgaBxzOc8FtMiF1NoGoXBRJjgoPApmPsjCFlbMdzCM4TFy50IXxI2DPcHAv2rY
- gghsEIeu8CAPW6ABIPYEFkOsAeaMyIz0JfGJUExBBGRIRX0IMYovWCIT1eBELNpA
- i1vcgta8iANPCIQOghzQABl30J0tXqBla4wjFLFQxZzAUY42CIAd5OYBCuKxB2c4
- I0b28EcrQKADgmSKB9RYyDhA4BqCxIBqrtjIMTwoFeCjYSU3KZMQAAA7
-
-BEGIN:VCALENDAR
-DCREATED:19960523T100522
-PRODID:-//Alden Roland/Hand Crafted In North Carolina//NONSGML Made By Hand//EN
-VERSION:0.3
-BEGIN:VEVENT
-START:19960523T120000
-END:19960523T130000
-SUBTYPE:PHONE CALL
-SUMMARY:VERSIT PDI PR Teleconference/Interview
-DESCRIPTION:VERSIT PDI PR Teleconference/Interview With Tom Streeter and Alden Roland
-END:VEVENT
-BEGIN:VEVENT
-START:19960523T113000
-END:19960523T115500
-SUBTYPE:LUNCH
-SUMMARY:Eat in the cafeteria today
-END:VEVENT
-END:VCALENDAR
-
-END:VCARD
-
-
-will conceptually be represented as
- vcard
- VCNameProp
- VCFamilyNameProp=Alden
- VCGivenNameProp=Roland
- VCFullNameProp=Roland H.Alden
- ....
-
-note that
- EMAIL;WORK;PREF;INTERNET:sf!rincon!ralden@alden.attmail.com
-will be represented as:
- VCEmailAddress=sf!rincon!ralden@alden.attmail.com
- VCWork
- VCPreferred
- VCInternet
-where the lower level properties are properties of the property
-VCEmailAddress.
-
-Groupings are flattened out in the VObject representation such
-that:
- a.b:blah
- a.c:blahblah
-are represented as:
- b=blah
- VCGrouping=a
- c=blahblah
- VCGrouping=a
-i.e. one can read the above as:
- the property "b" has value "blah" and property "VCGrouping"
- with the value "a".
- the property "c" has value "blahblah" and property "VCGrouping"
- with the value "a".
-likewise, multi-level groupings are flatten similarly. e.g.
- a.b.c:blah
- a.b.e:blahblah
--->
- c=blah
- VCGrouping=b
- VCGrouping=a
- e=blahblah
- VCGrouping=b
- VCGrouping=a
-which read:
- the property "c" has value "blah" and property "VCGrouping"
- with the value "b" which has property "VCGrouping"
- with value "a".
- the property "e" has value "blahblah" and property "VCGrouping"
- with the value "b" which has property "VCGrouping"
- with value "a".
-
-3. Iterating Through VObject's Properties or Values
- ================================================
-The following is a skeletal form of iterating through
-all properties of a vobject, o:
-
- // assume the object of interest, o, is of type VObject
- VObjectIterator i;
- initPropIterator(&i,o);
- while (moreIteration(&i)) {
- VObject *each = nextVObject(&i);
- // ... do something with "each" property
- }
-
-Use the API vObjectName() to access a VObject's name.
-Use the API vObjectValueType() to determine if a VObject has
- a value. For VCard/VCalendar application, you
- should not need this function as practically
- all values are either of type VCVT_USTRINGZ or
- VCVT_RAW (i.e set by setVObjectUStringZValue and
- setVObjectAnyValue APIs respectively), and the
- value returned by calls to vObjectUStringZValue
- and vObjectAnyValue are 0 if a VObject has no
- value. (There is a minor exception where VObject with
- VCDataSizeProp has value that is set by
- setVObjectLongValue).
-Use the APIs vObject???Value() to access a VObject's value.
- where ??? is the expected type.
-Use the APIs setvObject???Value() to set or modify a VObject's value.
- where ??? is the expected type.
-Use the API isAPropertyOf() to query if a name match the name of
- a property of a VObject. Since isAPropertyOf() return
- the matching property, we can use that to retrieve
- a property and subsequently the value of the property.
-
-4. Pretty Printing a VObject Tree
- ==============================
-VObject tree can be pretty printed with the printVObject() function.
-The output of pretty printing a VObject representation of the input
-test file "vobject.vcf" is shown below. Note that the indentation
-indicates the tree hirerarchy where the immediate children nodes
-of a parent node is all at the same indentation level and the
-immediate children nodes are the immediate properties of the
-associated parent nodes. In the following, {N,FN,ORG,TITLE,...}
-are immediate properties of VCARD. {F and G} are properties of N
-with value {"Alden" and "Roland"} respectively; FN has no property
-but has the value "Roland H. Alden"; EMAIL has value and
-the properties WORK, PREF, and INTERNET.
-
-
-VCARD
- N
- F="Alden"
- G="Roland"
- FN="Roland H. Alden"
- ORG
- ORGNAME="AT&T"
- OUN="Versit Project Office"
- TITLE="Consultant"
- EMAIL="sf!rincon!ralden@alden.attmail.com"
- WORK
- PREF
- INTERNET
- EMAIL="ralden@sfgate.com"
- INTERNET
- EMAIL="242-2200"
- MCIMail
- LABEL="Roland H. Alden
- Suite 2208
- One Pine Street
- San Francisco, CA 94111"
- DOM
- POSTAL
- PARCEL
- HOME
- WORK
- QP
- LABEL="Roland H. Alden
- Suite 2208
- One Pine Street
- San Francisco, CA 94111
- U.S.A."
- POSTAL
- PARCEL
- HOME
- WORK
- QP
- TEL="+1 415 296 9106"
- WORK
- PREF
- MSG
- TEL="+1 415 296 9016"
- WORK
- FAX
- TEL="+1 415 608 5981"
- MSG
- CELL
- ADR
- EXT ADD="Suite 2208"
- STREET="One Pine Street"
- L="San Francisco"
- R="CA"
- PC="94111"
- C="U.S.A."
- SOUND="ROW-LAND H ALL-DIN"
- LOGO=[raw data]
- GIF
- BASE64
- DataSize=1482
-VCALENDAR
- DCREATED="19960523T100522"
- PRODID="-//Alden Roland/Hand Crafted In North Carolina//NONSGML Made By Hand//EN"
- VERSION="0.3"
- VEVENT
- START="19960523T120000"
- END="19960523T130000"
- SUBTYPE="PHONE CALL"
- SUMMARY="VERSIT PDI PR Teleconference/Interview"
- DESCRIPTION="VERSIT PDI PR Teleconference/Interview With Tom Streeter and Alden Roland"
- VEVENT
- START="19960523T113000"
- END="19960523T115500"
- SUBTYPE="LUNCH"
- SUMMARY="Eat in the cafeteria today"
-
-5. Building A VObject Representation of A VCard/VCalendar
- ======================================================
-The parser in vcc.y converts an input file with one or more
-VCard/VCalendar that is in their textual representation
-into their corresponding VObject representation.
-
-VObject representation of a VCard/VCalendar can also be built
-directly with calls to the VObject building APIs. e.g.
-
- VObject *prop;
- VObject *vcard = newVObject(VCCardProp);
- prop = addProp(vcard,VCNameProp);
- addPropValue(prop,VCFamilyNameProp,"Alden");
- addPropValue(prop,VCGivenNameProp,"Roland");
- addPropValue(vcard,VCFullNameProp,"Roland H. Alden");
- ....
-
-6. Converting A VObject Representation Into Its Textual Representation
- ===================================================================
-The VObject representation can be converted back to its textual
-representation via the call to writeVObject() or writeMemVObject()
-API. e.g.
- a. to write to a file:
- // assume vcard is of type VObject
- FILE *fp = fopen("alden.vcf","w");
- writeVObject(fp,vcard);
- a. to write to memory, and let the API allocate the required memory.
- char* clipboard = writeVObject(0,0,vcard);
- ... do something to clipboard
- free(clipboard);
- b. to write to a user allocated buffer:
- char clipboard[16384];
- int len = 16384;
- char *buf = writeVObject(clipboard,&len,vcard);
- ... buf will be equal to clipboard if the write
- is successful otherwise 0.
-
-In the case of writing to memory, the memory buffer can be either
-allocated by the API or the user. If the user allocate the
-memory for the buffer, then the length of the buffer needs to be
-communicated to the API via a variable. The variable passed as
-the length argument will be overwritten with the actual size
-of the text output. A 0 return value from writeMemVObject()
-indicates an error which could be caused by overflowing the
-size of the buffer or lack of heap memory.
-
-7. Miscellaneous Notes On VObject APIs usages
- ==========================================
-a. vcc.h -- contains basic interfaces to the parser:
- VObject* Parse_MIME(const char *input, unsigned long len);
- VObject* Parse_MIME_FromFile(FILE *file);
- -- both of this return a null-terminated list of
- VObject that is either a VCARD or VCALENDAR.
- To iterate through this list, do
- VObject *t, *v;
- v = Parse_Mime_FromFile(fp);
- while (v) {
- // ... do something to v.
- t = v;
- v = nextVObjectInList(v);
- cleanVObject(t);
- }
- note that call to cleanVObject will release
- resource used to represent the VObject.
-
-b. vobject.h -- contains basic interfaces to the VObject APIs.
- see the header for more details.
- The structure of VObject is purposely (hiddened) not exposed
- to the user. Every access has to be done via
- the APIs. This way, if we need to change the
- structure or implementation, the client need not
- recompile as long as the interfaces remain the
- same.
-
-c. values of a property is determined by the property definition
- itself. The vobject APIs does not attempt to enforce
- any of such definition. It is the consumer responsibility
- to know what value is expected from a property. e.g
- most properties have unicode string value, so to access
- the value of these type of properties, you will use
- the vObjectUStringZValue() to read the value and
- setVObjectUStringZValue() to set or modify the value.
- Refer to the VCard and VCalendar specifications for
- the definition of each property.
-
-d. properties name (id) are case incensitive.
-
-8. Brief descriptions of each APIs
- ===============================
- * the predefined properties' names (id) are listed under vobject.h
- each is of the form VC*Prop. e.g.
- #define VC7bitProp "7BIT"
- #define VCAAlarmProp "AALARM"
- ....
-
- * consumer of a VObject can only define pointers to VObject.
-
- * a variable of type VObjectIterator, say "i", can be used to iterate
- through a VObject's properties, say "o". The APIs related to
- VObjectIterator are:
- void initPropIterator(VObjectIterator *i, VObject *o);
- -- e.g. usage
- initPropIterator(&i,o);
- int moreIteration(VObjectIterator *i);
- -- e.g. usage
- while (moreIteration(&i)) { ... }
- VObject* nextVObject(VObjectIterator *i);
- -- e.g. usage
- while (moreIteration(&i)) {
- VObject *each = nextVObject(&i);
- }
-
- * VObject can be chained together to form a list. e.g. of such
- use is in the parser where the return value of the parser is
- a link list of VObject. A link list of VObject can be
- built by:
- void addList(VObject **o, VObject *p);
- and iterated by
- VObject* nextVObjectInList(VObject *o);
- -- next VObjectInList return 0 if the list
- is exhausted.
-
- * the following APIs are mainly used to construct a VObject tree:
- VObject* newVObject(const char *id);
- -- used extensively internally by VObject APIs but when
- used externally, its use is mainly limited to the
- construction of top level object (e.g. an object
- with VCCardProp or VCCalendarProp id).
-
- void deleteVObject(VObject *p);
- -- to deallocate single VObject, for most user, use
- cleanVObject(VObject *o) instead for freeing all
- resources associated with the VObject.
-
- char* dupStr(const char *s, unsigned int size);
- -- duplicate a string s. If size is 0, the string is
- assume to be a null-terminated.
-
- void deleteStr(const char *p);
- -- used to deallocate a string allocated by dupStr();
-
- void setVObjectName(VObject *o, const char* id);
- -- set the id of VObject o. This function is not
- normally used by the user. The setting of id
- is normally done as part of other APIs (e.g.
- addProp()).
-
- void setVObjectStringZValue(VObject *o, const char *s);
- -- set a string value of a VObject.
-
- void setVObjectUStringZValue(VObject *o, const wchar_t *s);
- -- set a Unicode string value of a VObject.
-
- void setVObjectIntegerValue(VObject *o, unsigned int i);
- -- set an integer value of a VObject.
-
- void setVObjectLongValue(VObject *o, unsigned long l);
- -- set an long integer value of a VObject.
-
- void setVObjectAnyValue(VObject *o, void *t);
- -- set any value of a VObject. The value type is
- unspecified.
-
- VObject* setValueWithSize(VObject *prop, void *val, unsigned int size);
- -- set a raw data (stream of bytes) value of a VObject
- whose size is size. The internal VObject representation
- is
- this object = val
- VCDataSizeProp=size
- i.e. the value val will be attached to the VObject prop
- and a property of VCDataSize whose value is size
- is also added to the object.
-
- void setVObjectVObjectValue(VObject *o, VObject *p);
- -- set a VObject as the value of another VObject.
-
- const char* vObjectName(VObject *o);
- -- retrieve the VObject's Name (i.e. id).
-
- const char* vObjectStringZValue(VObject *o);
- -- retrieve the VObject's value interpreted as
- null-terminated string.
-
- const wchar_t* vObjectUStringZValue(VObject *o);
- -- retrieve the VObject's value interpreted as
- null-terminated unicode string.
-
- unsigned int vObjectIntegerValue(VObject *o);
- -- retrieve the VObject's value interpreted as
- integer.
-
- unsigned long vObjectLongValue(VObject *o);
- -- retrieve the VObject's value interpreted as
- long integer.
-
- void* vObjectAnyValue(VObject *o);
- -- retrieve the VObject's value interpreted as
- any value.
-
- VObject* vObjectVObjectValue(VObject *o);
- -- retrieve the VObject's value interpreted as
- a VObject.
-
- VObject* addVObjectProp(VObject *o, VObject *p);
- -- add a VObject p as a property of VObject o.
- (not normally used externally for building a
- VObject).
-
- VObject* addProp(VObject *o, const char *id);
- -- add a property whose name is id to VObject o.
-
- VObject* addPropValue(VObject *o, const char *id, const char *v);
- -- add a property whose name is id and whose value
- is a null-terminated string to VObject o.
-
- VObject* addPropSizedValue(VObject *o, const char *id,
- const char *v, unsigned int size);
- -- add a property whose name is id and whose value
- is a stream of bytes of size size, to VObject o.
-
- VObject* addGroup(VObject *o, const char *g);
- -- add a group g to VObject o.
- e.g. if g is a.b.c, you will have
- o
- c
- VCGroupingProp=b
- VCGroupingProp=a
- and the object c is returned.
-
- VObject* isAPropertyOf(VObject *o, const char *id);
- -- query if a property by the name id is in o and
- return the VObject that represent that property.
-
- void printVObject(VObject *o);
- -- pretty print VObject o to stdout (for debugging use).
-
- void writeVObject(FILE *fp, VObject *o);
- -- convert VObject o to its textual representation and
- write it to file.
-
- char* writeMemVObject(char *s, int *len, VObject *o);
- -- convert VObject o to its textual representation and
- write it to memory. If s is 0, then memory required
- to hold the textual representation will be allocated
- by this API. If a variable len is passed, len will
- be overwriten with the byte size of the textual
- representation. If s is non-zero, then s has to
- be a user allocated buffer whose size has be passed
- in len as a variable. Memory allocated by the API
- has to be freed with call to free. The return value
- of this API is either the user supplied buffer,
- the memory allocated by the API, or 0 (in case of
- failure).
-
- void cleanStrTbl();
- -- this function has to be called when all
- VObject has been destroyed.
-
- void cleanVObject(VObject *o);
- -- release all resources used by VObject o.
-
- wchar_t* fakeUnicode(const char *ps, int *bytes);
- -- convert char* to wchar_t*.
-
- extern int uStrLen(const wchar_t *u);
- -- length of unicode u.
-
- char *fakeCString(const wchar_t *u);
- -- convert wchar_t to CString (blindly assumes that
- this could be done).
-
-9. Additional Programming Notes
- ============================
-In the following notes, please refers to the listing
-of Example.vcf and its VObject Representation
-(shown at the end of this section).
-
-* Handling the Return Value of the VCard/VCalendar Parser
- The example input text file contains two root VObjects
- (a VCalendar and a VCard). The output of the VCard/VCalendar
- parser is a null-terminated list of VObjects. For this
- particular input file, the list will have two VObjects.
- The following shows a template for iterating through the
- output of the Parser:
-
- VObject *t, *v;
- v = Parse_Mime_fromFileName("example.vcf");
- while (v) {
- // currently, v will either be a VCard or a VCalendar
- // do whatever your application need to do to
- // v here ...
- t = v;
- v = nextVObjectInList(v);
- cleanVObject(t);
- }
-
-* Iterating Through a VCard/VCalendar VObject
- From the VObject APIs point of view, a VCard VObject
- is the same as a VCalendar VObject. However, the application
- needs to know what are in a VCard or a VCalendar.
- For example, A VCalendar VObject can have VCDCreatedProp,
- a VCGEOLocationProp, etc, and one or more VCEventProp and
- or VCTodoProp. The VCEventProp and VCTodoProp can have
- many properties of their own, which in turn could have
- more properties (e.g. VCDAlarmProp can be a VCEventProp
- VObject's property, and VCRunTimeProp can be a
- VCDAlarmProp VObject's property. Because a VObject tree
- can be arbitrarily complex, in general, to process all
- properties and values of a VObject tree, a recursive walk
- is desirable. An example recursive VObject tree walk
- can be found in the vobject.c source lines for printVObject*
- and writeVObject* APIs. Depending on what the application need
- to do with a VCard or a VCalendar, a recursive walk
- of the VObject tree may or may not be desirable. An example
- template of a non-recursive walk is shown below:
-
- void processVCardVCalendar(char *inputFile)
- {
- VObject *t, *v;
- v = Parse_Mime_fromFileName(inputFile);
- while (v) {
- char *n = vObjectName(v);
- if (strcmp(n,VCCardProp) == 0) {
- do_VCard(v);
- }
- else if (strcmp(n,VCCalendarProp) == 0) {
- do_VCalendar(v);
- }
- else {
- // don't know how to handle anything else!
- }
- t = v;
- v = nextVObjectInList(v);
- cleanVObject(t);
- }
- }
-
- void do_VCard(VObject *vcard)
- {
- VObjectIterator t;
- initPropIterator(&t,vcard);
- while (moreIteration(&t)) {
- VObject *eachProp = nextVObject(&t);
- // The primarly purpose of this example is to
- // show how to iterate through a VCard VObject,
- // it is not meant to be efficient at all.
- char *n = vObjectName(eachProp);
- if (strcmp(n,VCNameProp)==0) {
- do_name(eachProp);
- }
- else if (strcmp(n,VCEmailProp)==0) {
- do_email(eachProp);
- }
- else if (strcmp(n,VCLabelProp)==0) {
- do_label(eachProp);
- }
- else if ....
- }
- }
-
- void do_VCalendar(VObject *vcal)
- {
- VObjectIterator t;
- initPropIterator(&t,vcard);
- while (moreIteration(&t)) {
- VObject *eachProp = nextVObject(&t);
- // The primarly purpose of this example is to
- // show how to iterate through a VCalendar VObject,
- // it is not meant to be efficient at all.
- char *n = vObjectName(eachProp);
- if (strcmp(n,VCDCreatedProp)==0) {
- do_DCreated(eachProp);
- }
- else if (strcmp(n,VCVersionProp)==0) {
- do_Version(eachProp);
- }
- else if (strcmp(n,VCTodoProp)==0) {
- do_Todo(eachProp);
- }
- else if (strcmp(n,VCEventProp)==0) {
- do_Event(eachProp);
- }
- else if ....
- }
- }
-
- void do_Todo(VObject *vtodo) { ... }
-
- void do_Event(VObject *vevent) { ... }
-
- ...
-
-* Property's Values and Properties
- The VObject APIs do not attempt to check for the
- correctness of the values of a property. Nor do they
- will prevent the user from attaching a non-VCard/VCalendar
- standard property to a VCard/VCalendar property. Take
- the example of line [11] of the example, "O.K" is not
- a valid value of VCStatusProp. It is up to the application
- to accept or reject the value of a property.
-
-* Output of printVObject
- PrintVObject pretty prints a VObject tree in human
- readable form. See the listing at the end of the file
- for an example output of printVObject on the example
- input file "Example.vcf".
-
- Note that binary data are not shown in the output of
- printVObject. Instead, a note is made ([raw data]) to
- indicate that there exists such a binary data.
-
-* Note on Binary Data
- When the value of a property is a binary data, it is only
- useful to know the size of the binary data.
-
- In the case of the VCard/VCalendar parser, it chooses
- to represent the size information as a separate property
- called VCDataSizeProp whose value is the size of the binary
- data. The APIs sequence to construct the VObject subtree
- of line [44] of Example.vcf is
-
- // VObject *vcard;
- VObject *p1 = addProp(vcard,VCLogoProp);
- (void) addProp(p1,VCGIFProp);
- (void) addProp(p1,VCBASE64Prop);
- VObject *p2 = addProp(p1,VCDataSizeProp);
- (void) setVObjectLongValue(p2,1482);
- setVObjectAnyValue(vcard,...pointer to binary data);
-
- Note the presence of VCBase64Prop will cause the
- writeVObject API to output the binary data as BASE64 text.
- For VCard/VCalendar application, having the VCBase64Prop
- property is practically always necessary for property with
- binary data as its value.
-
-* Note on Quoted-Printable String
- String value with embedded newline are written out as
- quoted-prinatable string. It is therefore important
- to mark a property with a string value that has
- one or more embedded newlines, with the VCQutedPrintableProp
- property. e.g.
-
- // VObject *root;
- char *msg="To be\nor\nnot to be";
- VObject *p = addPropValue(root,VCDescriptionProp,msg);
- // the following is how you mark a property with
- // a property. In this case, the marker is
- // VCQuotedPrintableProp
- addProp(p,VCQuotedPrintableProp);
-
-* Note on Unicode
- Although, the current parser takes ASCII text file only,
- string values are all stored as Unicode in the VObject tree.
- For now, when using the VObject APIs to construct a
- VObject tree, one should always convert ASCII string value
- to a Unicode string value:
-
- // VObject *root;
- VObject *p = addProp(root,VCSomeProp);
- setVObjectUStringZValue(p,fakeUnicode(someASCIIStringZvalue));
-
- An API is provided to simplify the above process:
-
- addPropValue(root,VCSomeProp,someASCIIStringZValue);
-
- Note that someASCIISTringZValue is automatically converted to
- Unicode by addPropValue API, where as, the former code
- sequence do an explicit call to fakeUnicode.
-
- To read back the value, one should use the vObjectUStringZValue
- API not vObjectStringZValue API. The value returned by the
- vObjectUStringZValue API is a Unicode string. If the application
- do not know how to handle Unicode string, it can use the
- fakeCString API to convert it back to ASCII string (as long
- as the conversion is meaningful).
-
- Note that fakeCString return a heap allocated memory. It is
- important to call deleteStr on fakeCString return value if
- it is not longer required (or there will be memory leak).
-
- NOTE: Unfortunately, at the point when this document is written,
- there is still no consensus on how Unicode is to be handled
- in the textual representation of VCard/VCalendar. So, there
- is no version of writeVObject and the parser to output and
- input Unicode textual representation of VCard/VCalendar.
-
-
-Example.vcf
------------
-line
-number Input Text (example.vcf)
------- ----------
-1 BEGIN:VCALENDAR
-2 DCREATED:19961102T100522
-3 GEO:0,0
-4 VERSION:1.0
-5 BEGIN:VEVENT
-6 DTSTART:19961103T000000
-7 DTEND:20000101T000000
-8 DESCRIPTION;QUOTED-PRINTABLE:To be =0A=
-9 or =0A=
-10 not to be
-11 STATUS:O.K.
-12 X-ACTION:No action required
-13 DALARM:19961103T114500;5;3;Enjoy
-14 MALARM:19970101T120000;;;johny@nowhere.com;Call Mom.
-15 END:VEVENT
-16
-17 BEGIN:VTODO
-18 DUE:19960614T0173000
-19 DESCRIPTION:Relex.
-20 END:VTODO
-21
-22 END:VCALENDAR
-23
-24 BEGIN:VCARD
-25 N:Alden;Roland
-26 FN:Roland H. Alden
-27 ORG:AT&T;Versit Project Office
-28 TITLE:Consultant
-29 EMAIL;WORK;PREF;INTERNET:ralden@ralden.com
-30 LABEL;DOM;POSTAL;PARCEL;HOME;WORK;QUOTED-PRINTABLE:Roland H. Alden=0A=
-31 Suite 2208=0A=
-32 One Pine Street=0A=
-33 San Francisco, CA 94111
-34 LABEL;POSTAL;PARCEL;HOME;WORK;QUOTED-PRINTABLE:Roland H. Alden=0A=
-35 Suite 2208=0A=
-36 One Pine Street=0A=
-37 San Francisco, CA 94111=0A=
-38 U.S.A.
-39 TEL;WORK;PREF;MSG:+1 415 296 9106
-40 TEL;WORK;FAX:+1 415 296 9016
-41 TEL;MSG;CELL:+1 415 608 5981
-42 ADR:;Suite 2208;One Pine Street;San Francisco;CA;94111;U.S.A.
-43 SOUND:ROW-LAND H ALL-DIN
-44 LOGO;GIF;BASE64:
-45 R0lGODdhpgBOAMQAAP///+/v797e3s7Ozr29va2trZycnIyMjHt7e2NjY1JSUkJC
- ... 30 lines of BASE64 data not shown here.
-76 END:VCARD
-
-
-VObject Representation of Example.vcf:
--------------------------------------
-line
-in
-text
-file VObject Tree as Printed by printVObject API
----- -------------------------------------------
-1 VCALENDAR
-2 DCREATED="19961102T100522"
-3 GEO="0,0"
-4 VERSION="1.0"
-5 VEVENT
-6 DTSTART="19961103T000000"
-7 DTEND="20000101T000000"
-8 DESCRIPTION="To be
-9 or
-10 not to be"
-8 QUOTED-PRINTABLE
-11 STATUS="O.K."
-12 X-ACTION="No action required"
-13 DALARM
-13 RUNTIME="19961103T114500"
-13 SNOOZETIME="5"
-13 REPEATCOUNT="3"
-13 DISPLAYSTRING="Enjoy"
-14 MALARM
-14 RUNTIME="19970101T120000"
-14 EMAIL="johny@nowhere.com"
-14 NOTE="Call Mom"
-17 VTODO
-18 DUE="19960614T0173000"
-19 DESCRIPTION="Relex."
-24 VCARD
-25 N
-25 F="Alden"
-25 G="Roland"
-26 FN="Roland H. Alden"
-27 ORG
-27 ORGNAME="AT&T"
-27 OUN="Versit Project Office"
-28 TITLE="Consultant"
-29 EMAIL="ralden@alden.com"
-29 WORK
-29 PREF
-29 INTERNET
-30 LABEL="Roland H. Alden
-31 Suite 2208
-32 One Pine Street
-33 San Francisco, CA 94111"
-30 DOM
-30 POSTAL
-30 PARCEL
-30 HOME
-30 WORK
-30 QUOTED-PRINTABLE
-34 LABEL="Roland H. Alden
-35 Suite 2208
-36 One Pine Street
-37 San Francisco, CA 94111
-38 U.S.A."
-34 POSTAL
-34 PARCEL
-34 HOME
-34 WORK
-34 QUOTED-PRINTABLE
-39 TEL="+1 415 296 9106"
-39 WORK
-39 PREF
-39 MSG
-40 TEL="+1 415 296 9016"
-40 WORK
-40 FAX
-41 TEL="+1 415 608 5981"
-41 MSG
-41 CELL
-42 ADR
-42 EXT ADD="Suite 2208"
-42 STREET="One Pine Street"
-42 L="San Francisco"
-42 R="CA"
-42 PC="94111"
-42 C="U.S.A."
-43 SOUND="ROW-LAND H ALL-DIN"
-44 LOGO=[raw data]
-44 GIF
-44 BASE64
-44 DATASIZE=1482
-
+NOTE: If you used the earlier APIs released by Versit
+then you will want to look at the document "migrate.doc"
+included with this package. It contains a discussion of
+the differences between the old API and this one.
+
+----------------------------------------------------------------
+
+The vCard/vCalendar C interface is implemented in the set
+of files as follows:
+
+vcc.y, yacc source, and vcc.c, the yacc output you will use
+implements the core parser
+
+vobject.c implements an API that insulates the caller from
+the parser and changes in the vCard/vCalendar BNF
+
+port.h defines compilation environment dependent stuff
+
+vcc.h and vobject.h are header files for their .c counterparts
+
+vcaltmp.h and vcaltmp.c implement vCalendar "macro" functions
+which you may find useful.
+
+test.c is a standalone test driver that exercises some of
+the features of the APIs provided. Invoke test.exe on a
+VCARD/VCALENDAR input text file and you will see the pretty
+print output of the internal representation (this pretty print
+output should give you a good idea of how the internal
+representation looks like -- there is one such output in the
+following too). Also, a file with the .out suffix is generated
+to show that the internal representation can be written back
+in the original text format.
+
+-----------------------------------------------------------------
+
+
+ VObject for VCard/VCalendar
+
+Table of Contents
+=================
+1. VObject
+2. Internal Representations of VCard/VCalendar
+3. Iterating Through VObject's Properties or Values
+4. Pretty Printing a VObject Tree
+5. Building A VObject Representation of A VCard/VCalendar
+6. Converting A VObject Representation Into Its Textual Representation
+7. Miscellaneous Notes On VObject APIs usages
+8. Brief descriptions of each APIs
+9. Additional Programming Notes.
+
+This document is mainly about the VObject and its APIs. The main
+use of a VObject is to represent a VCard or a VCalendar inside
+a program. However, its use is not limited to aforemention as it
+can represent an arbitrary information that makes up of a tree or
+forest of properties/values.
+
+1. VObject
+ =======
+A VObject can have a name (id) and a list of associated properties and
+a value. Each property is itself a VObject.
+
+2. Internal Representations of VCard/VCalendar
+ ===========================================
+A list of VCard or a VCalendar is represented by a list of VObjects.
+The name (id) of the VObjects in the list is either VCCardProp or
+VCCalProp. Each of these VObjects can have a list of properties.
+Since a property is represented as a VObject, each of these properties
+can have a name, a list of properties, and a value.
+
+For example, the input file "vobject.vcf":
+
+BEGIN:VCARD
+N:Alden;Roland
+FN:Roland H. Alden
+ORG:AT&T;Versit Project Office
+TITLE:Consultant
+EMAIL;WORK;PREF;INTERNET:sf!rincon!ralden@alden.attmail.com
+EMAIL;INTERNET:ralden@sfgate.com
+EMAIL;MCIMail:242-2200
+LABEL;DOM;POSTAL;PARCEL;HOME;WORK;QUOTED-PRINTABLE:Roland H. Alden=0A=
+Suite 2208=0A=
+One Pine Street=0A=
+San Francisco, CA 94111
+LABEL;POSTAL;PARCEL;HOME;WORK;QUOTED-PRINTABLE:Roland H. Alden=0A=
+Suite 2208=0A=
+One Pine Street=0A=
+San Francisco, CA 94111=0A=
+U.S.A.
+TEL;WORK;PREF;MSG:+1 415 296 9106
+TEL;WORK;FAX:+1 415 296 9016
+TEL;MSG;CELL:+1 415 608 5981
+ADR:;Suite 2208;One Pine Street;San Francisco;CA;94111;U.S.A.
+SOUND:ROW-LAND H ALL-DIN
+LOGO;GIF;BASE64:
+ R0lGODdhpgBOAMQAAP///+/v797e3s7Ozr29va2trZycnIyMjHt7e2NjY1JSUkJC
+ QjExMSEhIRAQEO///87v9973/73n95zW71K13jGl1nvG50Kt3iGc1gCMzq3e94zO
+ 7xCU1nO952O15wAAACwAAAAApgBOAAAF/yAgjmRpnmiqrmzrvnAsz3Rt33iu73zv
+ /8CgcEj8QTaeywWTyWCUno2kSK0KI5tLc8vtNi+WiHVMlj0mFK96nalsxOW4fPSw
+ cNj4tQc+7xcjGh4WExJTJYUTFkp3eU0eEH6RkpOUlTARhRoWm5ydFpCWoS0QEqAu
+ ARKaHRcVjV0borEoFl0cSre4Sq67FA+yvwAeTU8XHZ7HmxS6u2wVfMCVpAE3pJoW
+ ylrMptDcOqSF4OHg3eQ5pInInb7lcc86mNbLzBXsZbRfUOn6ucyNHvVWJHCpQFDf
+ MWwEEzLqx2YCQCqF3OnItClJNmYcJD7cSAKTuI/gtnEcOQKkyVIk6/+ds5CkFcMM
+ 61LiENikwi1jBnNyuvUSjwWZOS5uIZarqNFcNl32XMMB6I06GgoJ+bZp1ZKeDl8E
+ +MC1K1cBIhZ4HUu2LAsCZdOWRQDt20lxIlccSHsgrNq7Xc/ixcsWmNu34WKyYJCW
+ gQjCe9XqTZy2L4pv04gg2sSKSc8OLgTcBSuWsdkVaD2TdXyiQxebFyjo1Gnx6tJm
+ LuaqrdtZtNfFtruSNmF5IKujwIsmJbjwtRqNJhrcNVw79wcRAgogmE4ArIjQzj/s
+ JvHAGCFDQR4UqigPK4sBe62XwO51OwADiMcqUG+iOdcFAL+hW20BfAoEexlwAnu6
+ mZDAXQ1EVh//WfhxJB5gIbHgwFgOTOiVAgOuVQKAfKFg3weGwSBYFZMp4hpDGKyA
+ 3lgJKECWgiMQyBVpW+0V4oJjNfhCNkR1IgWEb21QlRK9GdfFCgeOZYBsXgm4noYj
+ GEBhAQHYh0J8XenoQnFGdrkUciJY6FUAK15ogozakcBhliKsyZWHDMZQ0wWC/Aim
+ DB6h01KRr/lXQgFxAqDcWDACgCZpUnrVQJtjwTnWjS6MWAYqqfDnSaEkJOlVXQBo
+ 2pWTMUJ53WgAuPncCR9q6VQMAYjZlXWJmknCoSUM2p4BC+SaKwG88hoZlvfFMM4f
+ hQh5TXkv+RklWYtC91mopJIAKFkJlDAW/wF25ShnLbeo5gmQ+1FGkJdrKCuCi2OR
+ BuwHBcwqKgABrMtVAgpem61XkLbAJ7n8uiIpvGVhO4KpH1QLbbpqLheZvQCkGoNL
+ thSzSTg2UGVBBzbtaxwKsYrmgLvRAlCmWgwMAADD66rKAgR3XlGspcdkZYK8ibU7
+ asgEl+XAyB8I7PCqMWiWncGGimpfAgO4ypXSPpOVLwsRCDJxRD2AoyeRRv5kApO5
+ fXwzwvfOKLKtaTWtbQxccmGLTZy8xYlVSvXbhbk0M2YzrYfJJ0K8m+V9NgxpyC04
+ UycI/aiuiH9Y8NftDUwWp1Wm5UABnAUKwwRsPFGBt4Oc9PZvGvNLwf8JOZt8Arpe
+ eY23yDovwIDiBX74NAsPVLDJj3Hh4JEExsKcjrlKf9DsCVx3ZfLqAKBuG1s/A90C
+ z2KjYHjjyPOdG1spz6BBUr+BcUxUb1nDCTa/VZD2Uv+YkLPAKJC9dNEh7628WgqI
+ ybzlaA+ufxMa6bxC6ciLUQLcx5UGIAAsAkDA6wQkOxrcY39yo4cQMNWCAPTKV1R4
+ wPkgaBxzOc8FtMiF1NoGoXBRJjgoPApmPsjCFlbMdzCM4TFy50IXxI2DPcHAv2rY
+ gghsEIeu8CAPW6ABIPYEFkOsAeaMyIz0JfGJUExBBGRIRX0IMYovWCIT1eBELNpA
+ i1vcgta8iANPCIQOghzQABl30J0tXqBla4wjFLFQxZzAUY42CIAd5OYBCuKxB2c4
+ I0b28EcrQKADgmSKB9RYyDhA4BqCxIBqrtjIMTwoFeCjYSU3KZMQAAA7
+
+BEGIN:VCALENDAR
+DCREATED:19960523T100522
+PRODID:-//Alden Roland/Hand Crafted In North Carolina//NONSGML Made By Hand//EN
+VERSION:0.3
+BEGIN:VEVENT
+START:19960523T120000
+END:19960523T130000
+SUBTYPE:PHONE CALL
+SUMMARY:VERSIT PDI PR Teleconference/Interview
+DESCRIPTION:VERSIT PDI PR Teleconference/Interview With Tom Streeter and Alden Roland
+END:VEVENT
+BEGIN:VEVENT
+START:19960523T113000
+END:19960523T115500
+SUBTYPE:LUNCH
+SUMMARY:Eat in the cafeteria today
+END:VEVENT
+END:VCALENDAR
+
+END:VCARD
+
+
+will conceptually be represented as
+ vcard
+ VCNameProp
+ VCFamilyNameProp=Alden
+ VCGivenNameProp=Roland
+ VCFullNameProp=Roland H.Alden
+ ....
+
+note that
+ EMAIL;WORK;PREF;INTERNET:sf!rincon!ralden@alden.attmail.com
+will be represented as:
+ VCEmailAddress=sf!rincon!ralden@alden.attmail.com
+ VCWork
+ VCPreferred
+ VCInternet
+where the lower level properties are properties of the property
+VCEmailAddress.
+
+Groupings are flattened out in the VObject representation such
+that:
+ a.b:blah
+ a.c:blahblah
+are represented as:
+ b=blah
+ VCGrouping=a
+ c=blahblah
+ VCGrouping=a
+i.e. one can read the above as:
+ the property "b" has value "blah" and property "VCGrouping"
+ with the value "a".
+ the property "c" has value "blahblah" and property "VCGrouping"
+ with the value "a".
+likewise, multi-level groupings are flatten similarly. e.g.
+ a.b.c:blah
+ a.b.e:blahblah
+-->
+ c=blah
+ VCGrouping=b
+ VCGrouping=a
+ e=blahblah
+ VCGrouping=b
+ VCGrouping=a
+which read:
+ the property "c" has value "blah" and property "VCGrouping"
+ with the value "b" which has property "VCGrouping"
+ with value "a".
+ the property "e" has value "blahblah" and property "VCGrouping"
+ with the value "b" which has property "VCGrouping"
+ with value "a".
+
+3. Iterating Through VObject's Properties or Values
+ ================================================
+The following is a skeletal form of iterating through
+all properties of a vobject, o:
+
+ // assume the object of interest, o, is of type VObject
+ VObjectIterator i;
+ initPropIterator(&i,o);
+ while (moreIteration(&i)) {
+ VObject *each = nextVObject(&i);
+ // ... do something with "each" property
+ }
+
+Use the API vObjectName() to access a VObject's name.
+Use the API vObjectValueType() to determine if a VObject has
+ a value. For VCard/VCalendar application, you
+ should not need this function as practically
+ all values are either of type VCVT_USTRINGZ or
+ VCVT_RAW (i.e set by setVObjectUStringZValue and
+ setVObjectAnyValue APIs respectively), and the
+ value returned by calls to vObjectUStringZValue
+ and vObjectAnyValue are 0 if a VObject has no
+ value. (There is a minor exception where VObject with
+ VCDataSizeProp has value that is set by
+ setVObjectLongValue).
+Use the APIs vObject???Value() to access a VObject's value.
+ where ??? is the expected type.
+Use the APIs setvObject???Value() to set or modify a VObject's value.
+ where ??? is the expected type.
+Use the API isAPropertyOf() to query if a name match the name of
+ a property of a VObject. Since isAPropertyOf() return
+ the matching property, we can use that to retrieve
+ a property and subsequently the value of the property.
+
+4. Pretty Printing a VObject Tree
+ ==============================
+VObject tree can be pretty printed with the printVObject() function.
+The output of pretty printing a VObject representation of the input
+test file "vobject.vcf" is shown below. Note that the indentation
+indicates the tree hirerarchy where the immediate children nodes
+of a parent node is all at the same indentation level and the
+immediate children nodes are the immediate properties of the
+associated parent nodes. In the following, {N,FN,ORG,TITLE,...}
+are immediate properties of VCARD. {F and G} are properties of N
+with value {"Alden" and "Roland"} respectively; FN has no property
+but has the value "Roland H. Alden"; EMAIL has value and
+the properties WORK, PREF, and INTERNET.
+
+
+VCARD
+ N
+ F="Alden"
+ G="Roland"
+ FN="Roland H. Alden"
+ ORG
+ ORGNAME="AT&T"
+ OUN="Versit Project Office"
+ TITLE="Consultant"
+ EMAIL="sf!rincon!ralden@alden.attmail.com"
+ WORK
+ PREF
+ INTERNET
+ EMAIL="ralden@sfgate.com"
+ INTERNET
+ EMAIL="242-2200"
+ MCIMail
+ LABEL="Roland H. Alden
+ Suite 2208
+ One Pine Street
+ San Francisco, CA 94111"
+ DOM
+ POSTAL
+ PARCEL
+ HOME
+ WORK
+ QP
+ LABEL="Roland H. Alden
+ Suite 2208
+ One Pine Street
+ San Francisco, CA 94111
+ U.S.A."
+ POSTAL
+ PARCEL
+ HOME
+ WORK
+ QP
+ TEL="+1 415 296 9106"
+ WORK
+ PREF
+ MSG
+ TEL="+1 415 296 9016"
+ WORK
+ FAX
+ TEL="+1 415 608 5981"
+ MSG
+ CELL
+ ADR
+ EXT ADD="Suite 2208"
+ STREET="One Pine Street"
+ L="San Francisco"
+ R="CA"
+ PC="94111"
+ C="U.S.A."
+ SOUND="ROW-LAND H ALL-DIN"
+ LOGO=[raw data]
+ GIF
+ BASE64
+ DataSize=1482
+VCALENDAR
+ DCREATED="19960523T100522"
+ PRODID="-//Alden Roland/Hand Crafted In North Carolina//NONSGML Made By Hand//EN"
+ VERSION="0.3"
+ VEVENT
+ START="19960523T120000"
+ END="19960523T130000"
+ SUBTYPE="PHONE CALL"
+ SUMMARY="VERSIT PDI PR Teleconference/Interview"
+ DESCRIPTION="VERSIT PDI PR Teleconference/Interview With Tom Streeter and Alden Roland"
+ VEVENT
+ START="19960523T113000"
+ END="19960523T115500"
+ SUBTYPE="LUNCH"
+ SUMMARY="Eat in the cafeteria today"
+
+5. Building A VObject Representation of A VCard/VCalendar
+ ======================================================
+The parser in vcc.y converts an input file with one or more
+VCard/VCalendar that is in their textual representation
+into their corresponding VObject representation.
+
+VObject representation of a VCard/VCalendar can also be built
+directly with calls to the VObject building APIs. e.g.
+
+ VObject *prop;
+ VObject *vcard = newVObject(VCCardProp);
+ prop = addProp(vcard,VCNameProp);
+ addPropValue(prop,VCFamilyNameProp,"Alden");
+ addPropValue(prop,VCGivenNameProp,"Roland");
+ addPropValue(vcard,VCFullNameProp,"Roland H. Alden");
+ ....
+
+6. Converting A VObject Representation Into Its Textual Representation
+ ===================================================================
+The VObject representation can be converted back to its textual
+representation via the call to writeVObject() or writeMemVObject()
+API. e.g.
+ a. to write to a file:
+ // assume vcard is of type VObject
+ FILE *fp = fopen("alden.vcf","w");
+ writeVObject(fp,vcard);
+ a. to write to memory, and let the API allocate the required memory.
+ char* clipboard = writeVObject(0,0,vcard);
+ ... do something to clipboard
+ free(clipboard);
+ b. to write to a user allocated buffer:
+ char clipboard[16384];
+ int len = 16384;
+ char *buf = writeVObject(clipboard,&len,vcard);
+ ... buf will be equal to clipboard if the write
+ is successful otherwise 0.
+
+In the case of writing to memory, the memory buffer can be either
+allocated by the API or the user. If the user allocate the
+memory for the buffer, then the length of the buffer needs to be
+communicated to the API via a variable. The variable passed as
+the length argument will be overwritten with the actual size
+of the text output. A 0 return value from writeMemVObject()
+indicates an error which could be caused by overflowing the
+size of the buffer or lack of heap memory.
+
+7. Miscellaneous Notes On VObject APIs usages
+ ==========================================
+a. vcc.h -- contains basic interfaces to the parser:
+ VObject* Parse_MIME(const char *input, unsigned long len);
+ VObject* Parse_MIME_FromFile(FILE *file);
+ -- both of this return a null-terminated list of
+ VObject that is either a VCARD or VCALENDAR.
+ To iterate through this list, do
+ VObject *t, *v;
+ v = Parse_Mime_FromFile(fp);
+ while (v) {
+ // ... do something to v.
+ t = v;
+ v = nextVObjectInList(v);
+ cleanVObject(t);
+ }
+ note that call to cleanVObject will release
+ resource used to represent the VObject.
+
+b. vobject.h -- contains basic interfaces to the VObject APIs.
+ see the header for more details.
+ The structure of VObject is purposely (hiddened) not exposed
+ to the user. Every access has to be done via
+ the APIs. This way, if we need to change the
+ structure or implementation, the client need not
+ recompile as long as the interfaces remain the
+ same.
+
+c. values of a property is determined by the property definition
+ itself. The vobject APIs does not attempt to enforce
+ any of such definition. It is the consumer responsibility
+ to know what value is expected from a property. e.g
+ most properties have unicode string value, so to access
+ the value of these type of properties, you will use
+ the vObjectUStringZValue() to read the value and
+ setVObjectUStringZValue() to set or modify the value.
+ Refer to the VCard and VCalendar specifications for
+ the definition of each property.
+
+d. properties name (id) are case incensitive.
+
+8. Brief descriptions of each APIs
+ ===============================
+ * the predefined properties' names (id) are listed under vobject.h
+ each is of the form VC*Prop. e.g.
+ #define VC7bitProp "7BIT"
+ #define VCAAlarmProp "AALARM"
+ ....
+
+ * consumer of a VObject can only define pointers to VObject.
+
+ * a variable of type VObjectIterator, say "i", can be used to iterate
+ through a VObject's properties, say "o". The APIs related to
+ VObjectIterator are:
+ void initPropIterator(VObjectIterator *i, VObject *o);
+ -- e.g. usage
+ initPropIterator(&i,o);
+ int moreIteration(VObjectIterator *i);
+ -- e.g. usage
+ while (moreIteration(&i)) { ... }
+ VObject* nextVObject(VObjectIterator *i);
+ -- e.g. usage
+ while (moreIteration(&i)) {
+ VObject *each = nextVObject(&i);
+ }
+
+ * VObject can be chained together to form a list. e.g. of such
+ use is in the parser where the return value of the parser is
+ a link list of VObject. A link list of VObject can be
+ built by:
+ void addList(VObject **o, VObject *p);
+ and iterated by
+ VObject* nextVObjectInList(VObject *o);
+ -- next VObjectInList return 0 if the list
+ is exhausted.
+
+ * the following APIs are mainly used to construct a VObject tree:
+ VObject* newVObject(const char *id);
+ -- used extensively internally by VObject APIs but when
+ used externally, its use is mainly limited to the
+ construction of top level object (e.g. an object
+ with VCCardProp or VCCalendarProp id).
+
+ void deleteVObject(VObject *p);
+ -- to deallocate single VObject, for most user, use
+ cleanVObject(VObject *o) instead for freeing all
+ resources associated with the VObject.
+
+ char* dupStr(const char *s, unsigned int size);
+ -- duplicate a string s. If size is 0, the string is
+ assume to be a null-terminated.
+
+ void deleteStr(const char *p);
+ -- used to deallocate a string allocated by dupStr();
+
+ void setVObjectName(VObject *o, const char* id);
+ -- set the id of VObject o. This function is not
+ normally used by the user. The setting of id
+ is normally done as part of other APIs (e.g.
+ addProp()).
+
+ void setVObjectStringZValue(VObject *o, const char *s);
+ -- set a string value of a VObject.
+
+ void setVObjectUStringZValue(VObject *o, const wchar_t *s);
+ -- set a Unicode string value of a VObject.
+
+ void setVObjectIntegerValue(VObject *o, unsigned int i);
+ -- set an integer value of a VObject.
+
+ void setVObjectLongValue(VObject *o, unsigned long l);
+ -- set an long integer value of a VObject.
+
+ void setVObjectAnyValue(VObject *o, void *t);
+ -- set any value of a VObject. The value type is
+ unspecified.
+
+ VObject* setValueWithSize(VObject *prop, void *val, unsigned int size);
+ -- set a raw data (stream of bytes) value of a VObject
+ whose size is size. The internal VObject representation
+ is
+ this object = val
+ VCDataSizeProp=size
+ i.e. the value val will be attached to the VObject prop
+ and a property of VCDataSize whose value is size
+ is also added to the object.
+
+ void setVObjectVObjectValue(VObject *o, VObject *p);
+ -- set a VObject as the value of another VObject.
+
+ const char* vObjectName(VObject *o);
+ -- retrieve the VObject's Name (i.e. id).
+
+ const char* vObjectStringZValue(VObject *o);
+ -- retrieve the VObject's value interpreted as
+ null-terminated string.
+
+ const wchar_t* vObjectUStringZValue(VObject *o);
+ -- retrieve the VObject's value interpreted as
+ null-terminated unicode string.
+
+ unsigned int vObjectIntegerValue(VObject *o);
+ -- retrieve the VObject's value interpreted as
+ integer.
+
+ unsigned long vObjectLongValue(VObject *o);
+ -- retrieve the VObject's value interpreted as
+ long integer.
+
+ void* vObjectAnyValue(VObject *o);
+ -- retrieve the VObject's value interpreted as
+ any value.
+
+ VObject* vObjectVObjectValue(VObject *o);
+ -- retrieve the VObject's value interpreted as
+ a VObject.
+
+ VObject* addVObjectProp(VObject *o, VObject *p);
+ -- add a VObject p as a property of VObject o.
+ (not normally used externally for building a
+ VObject).
+
+ VObject* addProp(VObject *o, const char *id);
+ -- add a property whose name is id to VObject o.
+
+ VObject* addPropValue(VObject *o, const char *id, const char *v);
+ -- add a property whose name is id and whose value
+ is a null-terminated string to VObject o.
+
+ VObject* addPropSizedValue(VObject *o, const char *id,
+ const char *v, unsigned int size);
+ -- add a property whose name is id and whose value
+ is a stream of bytes of size size, to VObject o.
+
+ VObject* addGroup(VObject *o, const char *g);
+ -- add a group g to VObject o.
+ e.g. if g is a.b.c, you will have
+ o
+ c
+ VCGroupingProp=b
+ VCGroupingProp=a
+ and the object c is returned.
+
+ VObject* isAPropertyOf(VObject *o, const char *id);
+ -- query if a property by the name id is in o and
+ return the VObject that represent that property.
+
+ void printVObject(VObject *o);
+ -- pretty print VObject o to stdout (for debugging use).
+
+ void writeVObject(FILE *fp, VObject *o);
+ -- convert VObject o to its textual representation and
+ write it to file.
+
+ char* writeMemVObject(char *s, int *len, VObject *o);
+ -- convert VObject o to its textual representation and
+ write it to memory. If s is 0, then memory required
+ to hold the textual representation will be allocated
+ by this API. If a variable len is passed, len will
+ be overwritten with the byte size of the textual
+ representation. If s is non-zero, then s has to
+ be a user allocated buffer whose size has be passed
+ in len as a variable. Memory allocated by the API
+ has to be freed with call to free. The return value
+ of this API is either the user supplied buffer,
+ the memory allocated by the API, or 0 (in case of
+ failure).
+
+ void cleanStrTbl();
+ -- this function has to be called when all
+ VObject has been destroyed.
+
+ void cleanVObject(VObject *o);
+ -- release all resources used by VObject o.
+
+ wchar_t* fakeUnicode(const char *ps, int *bytes);
+ -- convert char* to wchar_t*.
+
+ extern int uStrLen(const wchar_t *u);
+ -- length of unicode u.
+
+ char *fakeCString(const wchar_t *u);
+ -- convert wchar_t to CString (blindly assumes that
+ this could be done).
+
+9. Additional Programming Notes
+ ============================
+In the following notes, please refers to the listing
+of Example.vcf and its VObject Representation
+(shown at the end of this section).
+
+* Handling the Return Value of the VCard/VCalendar Parser
+ The example input text file contains two root VObjects
+ (a VCalendar and a VCard). The output of the VCard/VCalendar
+ parser is a null-terminated list of VObjects. For this
+ particular input file, the list will have two VObjects.
+ The following shows a template for iterating through the
+ output of the Parser:
+
+ VObject *t, *v;
+ v = Parse_Mime_fromFileName("example.vcf");
+ while (v) {
+ // currently, v will either be a VCard or a VCalendar
+ // do whatever your application need to do to
+ // v here ...
+ t = v;
+ v = nextVObjectInList(v);
+ cleanVObject(t);
+ }
+
+* Iterating Through a VCard/VCalendar VObject
+ From the VObject APIs point of view, a VCard VObject
+ is the same as a VCalendar VObject. However, the application
+ needs to know what are in a VCard or a VCalendar.
+ For example, A VCalendar VObject can have VCDCreatedProp,
+ a VCGEOLocationProp, etc, and one or more VCEventProp and
+ or VCTodoProp. The VCEventProp and VCTodoProp can have
+ many properties of their own, which in turn could have
+ more properties (e.g. VCDAlarmProp can be a VCEventProp
+ VObject's property, and VCRunTimeProp can be a
+ VCDAlarmProp VObject's property. Because a VObject tree
+ can be arbitrarily complex, in general, to process all
+ properties and values of a VObject tree, a recursive walk
+ is desirable. An example recursive VObject tree walk
+ can be found in the vobject.c source lines for printVObject*
+ and writeVObject* APIs. Depending on what the application need
+ to do with a VCard or a VCalendar, a recursive walk
+ of the VObject tree may or may not be desirable. An example
+ template of a non-recursive walk is shown below:
+
+ void processVCardVCalendar(char *inputFile)
+ {
+ VObject *t, *v;
+ v = Parse_Mime_fromFileName(inputFile);
+ while (v) {
+ char *n = vObjectName(v);
+ if (strcmp(n,VCCardProp) == 0) {
+ do_VCard(v);
+ }
+ else if (strcmp(n,VCCalendarProp) == 0) {
+ do_VCalendar(v);
+ }
+ else {
+ // don't know how to handle anything else!
+ }
+ t = v;
+ v = nextVObjectInList(v);
+ cleanVObject(t);
+ }
+ }
+
+ void do_VCard(VObject *vcard)
+ {
+ VObjectIterator t;
+ initPropIterator(&t,vcard);
+ while (moreIteration(&t)) {
+ VObject *eachProp = nextVObject(&t);
+ // The primary purpose of this example is to
+ // show how to iterate through a VCard VObject,
+ // it is not meant to be efficient at all.
+ char *n = vObjectName(eachProp);
+ if (strcmp(n,VCNameProp)==0) {
+ do_name(eachProp);
+ }
+ else if (strcmp(n,VCEmailProp)==0) {
+ do_email(eachProp);
+ }
+ else if (strcmp(n,VCLabelProp)==0) {
+ do_label(eachProp);
+ }
+ else if ....
+ }
+ }
+
+ void do_VCalendar(VObject *vcal)
+ {
+ VObjectIterator t;
+ initPropIterator(&t,vcard);
+ while (moreIteration(&t)) {
+ VObject *eachProp = nextVObject(&t);
+ // The primary purpose of this example is to
+ // show how to iterate through a VCalendar VObject,
+ // it is not meant to be efficient at all.
+ char *n = vObjectName(eachProp);
+ if (strcmp(n,VCDCreatedProp)==0) {
+ do_DCreated(eachProp);
+ }
+ else if (strcmp(n,VCVersionProp)==0) {
+ do_Version(eachProp);
+ }
+ else if (strcmp(n,VCTodoProp)==0) {
+ do_Todo(eachProp);
+ }
+ else if (strcmp(n,VCEventProp)==0) {
+ do_Event(eachProp);
+ }
+ else if ....
+ }
+ }
+
+ void do_Todo(VObject *vtodo) { ... }
+
+ void do_Event(VObject *vevent) { ... }
+
+ ...
+
+* Property's Values and Properties
+ The VObject APIs do not attempt to check for the
+ correctness of the values of a property. Nor do they
+ will prevent the user from attaching a non-VCard/VCalendar
+ standard property to a VCard/VCalendar property. Take
+ the example of line [11] of the example, "O.K" is not
+ a valid value of VCStatusProp. It is up to the application
+ to accept or reject the value of a property.
+
+* Output of printVObject
+ PrintVObject pretty prints a VObject tree in human
+ readable form. See the listing at the end of the file
+ for an example output of printVObject on the example
+ input file "Example.vcf".
+
+ Note that binary data are not shown in the output of
+ printVObject. Instead, a note is made ([raw data]) to
+ indicate that there exists such a binary data.
+
+* Note on Binary Data
+ When the value of a property is a binary data, it is only
+ useful to know the size of the binary data.
+
+ In the case of the VCard/VCalendar parser, it chooses
+ to represent the size information as a separate property
+ called VCDataSizeProp whose value is the size of the binary
+ data. The APIs sequence to construct the VObject subtree
+ of line [44] of Example.vcf is
+
+ // VObject *vcard;
+ VObject *p1 = addProp(vcard,VCLogoProp);
+ (void) addProp(p1,VCGIFProp);
+ (void) addProp(p1,VCBASE64Prop);
+ VObject *p2 = addProp(p1,VCDataSizeProp);
+ (void) setVObjectLongValue(p2,1482);
+ setVObjectAnyValue(vcard,...pointer to binary data);
+
+ Note the presence of VCBase64Prop will cause the
+ writeVObject API to output the binary data as BASE64 text.
+ For VCard/VCalendar application, having the VCBase64Prop
+ property is practically always necessary for property with
+ binary data as its value.
+
+* Note on Quoted-Printable String
+ String value with embedded newline are written out as
+ quoted-prinatable string. It is therefore important
+ to mark a property with a string value that has
+ one or more embedded newlines, with the VCQutedPrintableProp
+ property. e.g.
+
+ // VObject *root;
+ char *msg="To be\nor\nnot to be";
+ VObject *p = addPropValue(root,VCDescriptionProp,msg);
+ // the following is how you mark a property with
+ // a property. In this case, the marker is
+ // VCQuotedPrintableProp
+ addProp(p,VCQuotedPrintableProp);
+
+* Note on Unicode
+ Although, the current parser takes ASCII text file only,
+ string values are all stored as Unicode in the VObject tree.
+ For now, when using the VObject APIs to construct a
+ VObject tree, one should always convert ASCII string value
+ to a Unicode string value:
+
+ // VObject *root;
+ VObject *p = addProp(root,VCSomeProp);
+ setVObjectUStringZValue(p,fakeUnicode(someASCIIStringZvalue));
+
+ An API is provided to simplify the above process:
+
+ addPropValue(root,VCSomeProp,someASCIIStringZValue);
+
+ Note that someASCIISTringZValue is automatically converted to
+ Unicode by addPropValue API, where as, the former code
+ sequence do an explicit call to fakeUnicode.
+
+ To read back the value, one should use the vObjectUStringZValue
+ API not vObjectStringZValue API. The value returned by the
+ vObjectUStringZValue API is a Unicode string. If the application
+ do not know how to handle Unicode string, it can use the
+ fakeCString API to convert it back to ASCII string (as long
+ as the conversion is meaningful).
+
+ Note that fakeCString return a heap allocated memory. It is
+ important to call deleteStr on fakeCString return value if
+ it is not longer required (or there will be memory leak).
+
+ NOTE: Unfortunately, at the point when this document is written,
+ there is still no consensus on how Unicode is to be handled
+ in the textual representation of VCard/VCalendar. So, there
+ is no version of writeVObject and the parser to output and
+ input Unicode textual representation of VCard/VCalendar.
+
+
+Example.vcf
+-----------
+line
+number Input Text (example.vcf)
+------ ----------
+1 BEGIN:VCALENDAR
+2 DCREATED:19961102T100522
+3 GEO:0,0
+4 VERSION:1.0
+5 BEGIN:VEVENT
+6 DTSTART:19961103T000000
+7 DTEND:20000101T000000
+8 DESCRIPTION;QUOTED-PRINTABLE:To be =0A=
+9 or =0A=
+10 not to be
+11 STATUS:O.K.
+12 X-ACTION:No action required
+13 DALARM:19961103T114500;5;3;Enjoy
+14 MALARM:19970101T120000;;;johny@nowhere.com;Call Mom.
+15 END:VEVENT
+16
+17 BEGIN:VTODO
+18 DUE:19960614T0173000
+19 DESCRIPTION:Relex.
+20 END:VTODO
+21
+22 END:VCALENDAR
+23
+24 BEGIN:VCARD
+25 N:Alden;Roland
+26 FN:Roland H. Alden
+27 ORG:AT&T;Versit Project Office
+28 TITLE:Consultant
+29 EMAIL;WORK;PREF;INTERNET:ralden@ralden.com
+30 LABEL;DOM;POSTAL;PARCEL;HOME;WORK;QUOTED-PRINTABLE:Roland H. Alden=0A=
+31 Suite 2208=0A=
+32 One Pine Street=0A=
+33 San Francisco, CA 94111
+34 LABEL;POSTAL;PARCEL;HOME;WORK;QUOTED-PRINTABLE:Roland H. Alden=0A=
+35 Suite 2208=0A=
+36 One Pine Street=0A=
+37 San Francisco, CA 94111=0A=
+38 U.S.A.
+39 TEL;WORK;PREF;MSG:+1 415 296 9106
+40 TEL;WORK;FAX:+1 415 296 9016
+41 TEL;MSG;CELL:+1 415 608 5981
+42 ADR:;Suite 2208;One Pine Street;San Francisco;CA;94111;U.S.A.
+43 SOUND:ROW-LAND H ALL-DIN
+44 LOGO;GIF;BASE64:
+45 R0lGODdhpgBOAMQAAP///+/v797e3s7Ozr29va2trZycnIyMjHt7e2NjY1JSUkJC
+ ... 30 lines of BASE64 data not shown here.
+76 END:VCARD
+
+
+VObject Representation of Example.vcf:
+-------------------------------------
+line
+in
+text
+file VObject Tree as Printed by printVObject API
+---- -------------------------------------------
+1 VCALENDAR
+2 DCREATED="19961102T100522"
+3 GEO="0,0"
+4 VERSION="1.0"
+5 VEVENT
+6 DTSTART="19961103T000000"
+7 DTEND="20000101T000000"
+8 DESCRIPTION="To be
+9 or
+10 not to be"
+8 QUOTED-PRINTABLE
+11 STATUS="O.K."
+12 X-ACTION="No action required"
+13 DALARM
+13 RUNTIME="19961103T114500"
+13 SNOOZETIME="5"
+13 REPEATCOUNT="3"
+13 DISPLAYSTRING="Enjoy"
+14 MALARM
+14 RUNTIME="19970101T120000"
+14 EMAIL="johny@nowhere.com"
+14 NOTE="Call Mom"
+17 VTODO
+18 DUE="19960614T0173000"
+19 DESCRIPTION="Relex."
+24 VCARD
+25 N
+25 F="Alden"
+25 G="Roland"
+26 FN="Roland H. Alden"
+27 ORG
+27 ORGNAME="AT&T"
+27 OUN="Versit Project Office"
+28 TITLE="Consultant"
+29 EMAIL="ralden@alden.com"
+29 WORK
+29 PREF
+29 INTERNET
+30 LABEL="Roland H. Alden
+31 Suite 2208
+32 One Pine Street
+33 San Francisco, CA 94111"
+30 DOM
+30 POSTAL
+30 PARCEL
+30 HOME
+30 WORK
+30 QUOTED-PRINTABLE
+34 LABEL="Roland H. Alden
+35 Suite 2208
+36 One Pine Street
+37 San Francisco, CA 94111
+38 U.S.A."
+34 POSTAL
+34 PARCEL
+34 HOME
+34 WORK
+34 QUOTED-PRINTABLE
+39 TEL="+1 415 296 9106"
+39 WORK
+39 PREF
+39 MSG
+40 TEL="+1 415 296 9016"
+40 WORK
+40 FAX
+41 TEL="+1 415 608 5981"
+41 MSG
+41 CELL
+42 ADR
+42 EXT ADD="Suite 2208"
+42 STREET="One Pine Street"
+42 L="San Francisco"
+42 R="CA"
+42 PC="94111"
+42 C="U.S.A."
+43 SOUND="ROW-LAND H ALL-DIN"
+44 LOGO=[raw data]
+44 GIF
+44 BASE64
+44 DATASIZE=1482
+
diff --git a/src/libicalvcal/icalvcal.c b/src/libicalvcal/icalvcal.c
index 1c330187..a4389603 100644
--- a/src/libicalvcal/icalvcal.c
+++ b/src/libicalvcal/icalvcal.c
@@ -1258,7 +1258,7 @@ static void *rule_prop(int icaltype, VObject *object, icalcomponent *comp,
return (void *)prop;
}
-/* directly convertable property. The string representation of vcal is
+/* directly convertible property. The string representation of vcal is
the same as ical */
void *dc_prop(int icaltype, VObject *object, icalcomponent *comp, icalvcal_defaults *defaults)
diff --git a/src/libicalvcal/vcc.c b/src/libicalvcal/vcc.c
index 3eb80d2c..1e11d7a5 100644
--- a/src/libicalvcal/vcc.c
+++ b/src/libicalvcal/vcc.c
@@ -743,7 +743,7 @@ static char* lexLookaheadWord() {
#ifdef _SUPPORT_LINE_FOLDING
static void handleMoreRFC822LineBreak(int c) {
- /* suport RFC 822 line break in cases like
+ /* support RFC 822 line break in cases like
* ADR: foo;
* morefoo;
* more foo;
@@ -1142,7 +1142,7 @@ int yylex() {
}
}
else {
- /* unknow token */
+ /* unknown token */
return 0;
}
break;
diff --git a/src/libicalvcal/vcc.y b/src/libicalvcal/vcc.y
index 834f6b98..9643e562 100644
--- a/src/libicalvcal/vcc.y
+++ b/src/libicalvcal/vcc.y
@@ -709,7 +709,7 @@ static char* lexLookaheadWord() {
#ifdef _SUPPORT_LINE_FOLDING
static void handleMoreRFC822LineBreak(int c) {
- /* suport RFC 822 line break in cases like
+ /* support RFC 822 line break in cases like
* ADR: foo;
* morefoo;
* more foo;
@@ -1108,7 +1108,7 @@ int yylex() {
}
}
else {
- /* unknow token */
+ /* unknown token */
return 0;
}
break;
diff --git a/src/python/ChangeLog b/src/python/ChangeLog
index f6499f49..4cc5e099 100644
--- a/src/python/ChangeLog
+++ b/src/python/ChangeLog
@@ -3,19 +3,19 @@
* Component.py Added Calendar class.
* Componeny.py Changed all component constructor so they cannot
- take string arguments. Now, only NewComponent() can turn an iCal
- string into a component.
+ take string arguments. Now, only NewComponent() can turn an iCal
+ string into a component.
2001-04-02 Eric Busboom <eric@civicknowledge.com>
* Component.py removed arguments from the Event constructor, since
- I presume that the Component derived classes will always be
- constructed with no arguments.
+ I presume that the Component derived classes will always be
+ constructed with no arguments.
* Property.py Split out Attendee, Organizer, Time, Duration and
- Period into their own files. Moved remaining classes to Derived
- Properties.pm
+ Period into their own files. Moved remaining classes to Derived
+ Properties.pm
2001-03-13 Eric Busboom <eric@civicknowledge.com>
@@ -42,10 +42,10 @@
2001-03-05 Eric Busboom <eric@civicknowledge.com>
* Property.py Added a lot of exception code to signal failure to
- create a Property.
+ create a Property.
* DerivedProperties.py Added derived property classes for RDATE
- and TRIGGER, two properties that can have one of two value types.
+ and TRIGGER, two properties that can have one of two value types.
2001-03-04 Eric Busboom <eric@civicknowledge.com>
@@ -53,7 +53,7 @@
* Property.pm Added Property.ConstructorFailedError exception
* Component.pm fixed bug in Collection.__setslice__. "," used
- instead of ":"
+ instead of ":"
2001-03-04 Patrick Lewis <plewis@inetarena.com>
@@ -73,30 +73,30 @@
2001-02-28 Eric Busboom <eric@civicknowledge.com>
* Property Remove most internal data. The property now work
- alsmost entirely off of the icalproperty that it holds a reference
- to. Made changes in all derived Properties to accomodate the
- change.
+ almost entirely off of the icalproperty that it holds a reference
+ to. Made changes in all derived Properties to accommodate the
+ change.
* Property Added __del__
* Component Component.properties() now caches properties that it
- constructs, so two calls to properties() to that get the same
- icalproperty will also get the same Property.
+ constructs, so two calls to properties() to that get the same
+ icalproperty will also get the same Property.
* Property Added Property.__cmp__ to test equality of properties
- based on ical string values
+ based on ical string values
2001-02-27 Eric Busboom <eric@civicknowledge.com>
* Property Added Property.ref() to set/get the reference to the
- Property's internal icalproperty
+ Property's internal icalproperty
* Property Property._update_value now changes the icalproperty
- value if a reference has been set.
+ value if a reference has been set.
* Component re-instituted Component.properties(). The routine now
- adds a 'ref' key to the dict that holds the python pointer
- string. The C hex value of the pointer is in the 'pid' key
+ adds a 'ref' key to the dict that holds the python pointer
+ string. The C hex value of the pointer is in the 'pid' key
2001-02-27 Patrick Lewis <plewis@inetarena.com>
@@ -110,17 +110,17 @@
* Period implemented methods in period
- * Time Addedd addition and subtraction operators
+ * Time Added addition and subtraction operators
2001-02-25 Eric Busboom <eric@civicknowledge.com>
* Libical.py Added test routine for time, time_test()
* Libical.py Remove end of line chars ('\r\n" ) from
- Property._str__. Caller should add these lines itself
+ Property._str__. Caller should add these lines itself
* Liical.py CHanges Time._update_values to set time VALUE type
- based on use of is_date, rather than length of string.
+ based on use of is_date, rather than length of string.
* Libical.py Removed call to _update_value in TIme::timezone
diff --git a/src/python/Collection.py b/src/python/Collection.py
index 1df6c351..389689e0 100644
--- a/src/python/Collection.py
+++ b/src/python/Collection.py
@@ -24,7 +24,7 @@ class Collection:
"""A group of components that can be modified somewhat like a list.
Usage:
- Collection(componet, propSequence)
+ Collection(component, propSequence)
component is a Component object
propSequence is a list or tuple of Property (or subclass of Property)
diff --git a/src/python/Gauge.py b/src/python/Gauge.py
index e56f949d..44954006 100644
--- a/src/python/Gauge.py
+++ b/src/python/Gauge.py
@@ -28,7 +28,7 @@ class Gauge:
"""
class ConstructorFailedError(LibicalError):
- "Failed to create a Guage "
+ "Failed to create a Gauge "
class CloneFailedError(LibicalError):
"Failed to clone a component given Gauge "
diff --git a/src/python/LibicalWrap_icaltime.i b/src/python/LibicalWrap_icaltime.i
index 062c7746..f82a7706 100644
--- a/src/python/LibicalWrap_icaltime.i
+++ b/src/python/LibicalWrap_icaltime.i
@@ -123,7 +123,7 @@
return icaltime_days_in_month(month, year);
}
- /** Returns whether you've specified a leapyear or not. */
+ /** Returns whether you've specified a leap year or not. */
static int is_leap_year (const int year) {
return icaltime_is_leap_year(year);
}
diff --git a/src/python/Period.py b/src/python/Period.py
index 6c95edee..60c2f304 100644
--- a/src/python/Period.py
+++ b/src/python/Period.py
@@ -116,7 +116,7 @@ class Period(Property):
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. """
+ method will calculate the end time from the duration. """
if v != None:
diff --git a/src/python/python-binding.txt b/src/python/python-binding.txt
index 613022a6..514a95ab 100644
--- a/src/python/python-binding.txt
+++ b/src/python/python-binding.txt
@@ -92,14 +92,14 @@ component. But, if the component already has a DURATION property, then
this is an error -- a component can't have both.
icalcomponent_set_dtend determines if the component already has a
-DURATION. If it does, it substracts the dtstart time from the new
+DURATION. If it does, it subtracts the dtstart time from the new
dtend time and sets the duration to that. Otherwise, it creates aor
changes the DTEND.
Also, icalcomponent_set_duration works the same regardless if the
component is a VCALENDAR or a VEVENT. If it is a VCALENDAR, the
routine descends into the VEVENT before making any changes. If it is
-allready a VEVENT ( or VTODO or VJOURNAL ) the routine just makes the
+already a VEVENT ( or VTODO or VJOURNAL ) the routine just makes the
changes. With icalcomponent_add_property, you need to do this check
yourself.
diff --git a/src/python/test.py b/src/python/test.py
index b8a78455..2de1fe61 100644
--- a/src/python/test.py
+++ b/src/python/test.py
@@ -32,7 +32,7 @@ PRODID:-//ABC Corporation//NONSGML My Product//EN
METHOD:REQUEST
BEGIN:VEVENT
ATTENDEE;RSVP=TRUE;ROLE=REQ-PARTICIPANT;CUTYPE=GROUP:MAILTO:employee-A@host.com
-COMMENT: When in the course of writting comments and nonsense text\, it
+COMMENT: When in the course of writing comments and nonsense text\, it
becomes necessary to insert a newline
DTSTART:19972512T120000
DTSTART:19970101T120000Z
@@ -395,7 +395,7 @@ def test_event():
assert(len(event.x_properties('X-TEST'))==2)
- event.description("A short description. Longer ones break things. Really. What does it break. The code is supposed to handle realy long lines, longer, in fact, than any sane person would create except by writting a random text generator or by excerpting text from a less sane person. Actually, it did \"break\" and I had to remove an \n assert to fix it.")
+ event.description("A short description. Longer ones break things. Really. What does it break. The code is supposed to handle really long lines, longer, in fact, than any sane person would create except by writing a random text generator or by excerpting text from a less sane person. Actually, it did \"break\" and I had to remove an \n assert to fix it.")
event.status('TeNtAtIvE')
print event.as_ical_string()
diff --git a/src/test/regression-classify.c b/src/test/regression-classify.c
index 38cacfee..7e5d4aa7 100644
--- a/src/test/regression-classify.c
+++ b/src/test/regression-classify.c
@@ -147,7 +147,7 @@ void test_classify(void)
if (this_uid != 0) {
/* Look in the calendar for a component with the same UID
- as the incoming component. We should reall also be
+ as the incoming component. We should really also be
checking the RECURRENCE-ID. Another way to do this
operation is to us icalset_find_match(), which does use
the RECURRENCE-ID. */