aboutsummaryrefslogtreecommitdiffstats
path: root/libical/src/test
diff options
context:
space:
mode:
authorSeth Alves <alves@src.gnome.org>2000-02-18 02:02:37 +0800
committerSeth Alves <alves@src.gnome.org>2000-02-18 02:02:37 +0800
commit788bcf6373185aa29f8e2f83ad48cb10bf6e8a9b (patch)
treef5f14715c1c0aede7eb872eda7166cd3ddcd7e3b /libical/src/test
parentb39cda14b7678b925a6e3e645b60fb9858fdfaf6 (diff)
downloadgsoc2013-evolution-788bcf6373185aa29f8e2f83ad48cb10bf6e8a9b.tar
gsoc2013-evolution-788bcf6373185aa29f8e2f83ad48cb10bf6e8a9b.tar.gz
gsoc2013-evolution-788bcf6373185aa29f8e2f83ad48cb10bf6e8a9b.tar.bz2
gsoc2013-evolution-788bcf6373185aa29f8e2f83ad48cb10bf6e8a9b.tar.lz
gsoc2013-evolution-788bcf6373185aa29f8e2f83ad48cb10bf6e8a9b.tar.xz
gsoc2013-evolution-788bcf6373185aa29f8e2f83ad48cb10bf6e8a9b.tar.zst
gsoc2013-evolution-788bcf6373185aa29f8e2f83ad48cb10bf6e8a9b.zip
Initial revision
svn path=/trunk/; revision=1823
Diffstat (limited to 'libical/src/test')
-rw-r--r--libical/src/test/Makefile37
-rw-r--r--libical/src/test/Makefile.in36
-rw-r--r--libical/src/test/alice/booked/199706317
-rw-r--r--libical/src/test/alice/booked/199707701
-rw-r--r--libical/src/test/alice/booked/19970845
-rw-r--r--libical/src/test/alice/booked/19970958
-rw-r--r--libical/src/test/alice/booked/199803241
-rw-r--r--libical/src/test/alice/incoming.ics2164
-rwxr-xr-xlibical/src/test/copyclusterbin0 -> 379958 bytes
-rw-r--r--libical/src/test/copycluster.c113
-rwxr-xr-xlibical/src/test/findobjbin0 -> 369172 bytes
-rw-r--r--libical/src/test/findobj.c71
-rwxr-xr-xlibical/src/test/icalparserbin0 -> 328913 bytes
-rw-r--r--libical/src/test/icaltestparser.c110
-rwxr-xr-xlibical/src/test/regressionbin0 -> 420398 bytes
-rw-r--r--libical/src/test/regression.c1314
-rwxr-xr-xlibical/src/test/usecasesbin0 -> 330708 bytes
-rw-r--r--libical/src/test/usecases.c561
18 files changed, 5768 insertions, 0 deletions
diff --git a/libical/src/test/Makefile b/libical/src/test/Makefile
new file mode 100644
index 0000000000..29eeed08ee
--- /dev/null
+++ b/libical/src/test/Makefile
@@ -0,0 +1,37 @@
+# Generated automatically from Makefile.in by configure.
+INCLUDES = -I . -I../libical -I../libicalss
+CFLAGS = -Wall -g $(INCLUDES)
+LIBS = -L../libical -L../libicalss -licalss -lical
+CC = gcc
+LD = ld
+
+all: usecases copycluster regression parser findobj
+
+parser: icaltestparser.o ../libical/libical.a ../libicalss/libicalss.a
+ $(CC) -o icalparser icaltestparser.o $(LIBS)
+
+copycluster: copycluster.o ../libical/libical.a ../libicalss/libicalss.a
+ $(CC) -o copycluster copycluster.o $(INCLUDES) $(LIBS)
+
+findobj: findobj.o ../libical/libical.a ../libicalss/libicalss.a
+ $(CC) -o findobj findobj.o $(INCLUDES) $(LIBS)
+
+regression: regression.o ../libical/libical.a ../libicalss/libicalss.a
+ $(CC) -o regression regression.o $(INCLUDES) $(LIBS)
+
+usecases: usecases.o ../libical/libical.a ../libicalss/libicalss.a
+ $(CC) -o usecases usecases.o $(INCLUDES) $(LIBS)
+
+clean:
+ -/bin/rm -f *.o
+ -/bin/rm -f \#*
+ -/bin/rm -f *~ Makefile.bak icalitip.tab.h icalitip.tab.c lex.yy.c
+ -/bin/rm -rf icalparser core regression usecases copycluster findobj
+
+ci: clean
+ ci -u *.c *.h
+
+depend:
+ @makedepend -Y $(INCLUDES) $(SOURCES)
+
+install: \ No newline at end of file
diff --git a/libical/src/test/Makefile.in b/libical/src/test/Makefile.in
new file mode 100644
index 0000000000..5d3d5f709f
--- /dev/null
+++ b/libical/src/test/Makefile.in
@@ -0,0 +1,36 @@
+INCLUDES = -I . -I../libical -I../libicalss
+CFLAGS = -Wall -g $(INCLUDES)
+LIBS = -L../libical -L../libicalss -licalss -lical
+CC = gcc
+LD = ld
+
+all: usecases copycluster regression parser findobj
+
+parser: icaltestparser.o ../libical/libical.a ../libicalss/libicalss.a
+ $(CC) -o icalparser icaltestparser.o $(LIBS)
+
+copycluster: copycluster.o ../libical/libical.a ../libicalss/libicalss.a
+ $(CC) -o copycluster copycluster.o $(INCLUDES) $(LIBS)
+
+findobj: findobj.o ../libical/libical.a ../libicalss/libicalss.a
+ $(CC) -o findobj findobj.o $(INCLUDES) $(LIBS)
+
+regression: regression.o ../libical/libical.a ../libicalss/libicalss.a
+ $(CC) -o regression regression.o $(INCLUDES) $(LIBS)
+
+usecases: usecases.o ../libical/libical.a ../libicalss/libicalss.a
+ $(CC) -o usecases usecases.o $(INCLUDES) $(LIBS)
+
+clean:
+ -/bin/rm -f *.o
+ -/bin/rm -f \#*
+ -/bin/rm -f *~ Makefile.bak icalitip.tab.h icalitip.tab.c lex.yy.c
+ -/bin/rm -rf icalparser core regression usecases copycluster findobj
+
+ci: clean
+ ci -u *.c *.h
+
+depend:
+ @makedepend -Y $(INCLUDES) $(SOURCES)
+
+install: \ No newline at end of file
diff --git a/libical/src/test/alice/booked/199706 b/libical/src/test/alice/booked/199706
new file mode 100644
index 0000000000..8ad5c7d8b1
--- /dev/null
+++ b/libical/src/test/alice/booked/199706
@@ -0,0 +1,317 @@
+BEGIN:VCALENDAR
+X-LIC-CLUSTERCOUNT
+ :13
+DTSTART
+ :00000000T000000
+DTEND
+ :00000000T000000
+BEGIN:VEVENT
+ORGANIZER
+ :mailto:a@example.com
+COMMENT
+ :DUKES forfeit the game
+SEQUENCE
+ :2
+UID
+ :0981234-1234234-23@example.com
+DTSTAMP
+ :19970613T190000Z
+LAST-MODIFIED
+ :20000209T060027Z
+END:VEVENT
+BEGIN:VEVENT
+ATTENDEE
+ ;PARTSTAT=ACCEPTED
+ :Mailto:B@example.com
+ORGANIZER
+ :MAILTO:A@example.com
+UID
+ :calsrv.example.com-873970198738777@example.com
+SEQUENCE
+ :0
+REQUEST-STATUS
+ :2.0\;Success
+DTSTAMP
+ :19970612T190000Z
+LAST-MODIFIED
+ :20000209T060027Z
+END:VEVENT
+BEGIN:VEVENT
+ORGANIZER
+ :Mailto:A@example.com
+ATTENDEE
+ ;RSVP=TRUE
+ :Mailto:B@example.com
+X-LIC-ERROR
+ ;X-LIC-ERRORTYPE=PARAMETER_PARSE_ERROR
+ :Can't parse parameter name: 'TYPE=INDIVIDUAL'
+COMMENT
+ :Sorry
+COMMENT
+ : I cannot change this meeting time
+UID
+ :calsrv.example.com-873970198738777@example.com
+SEQUENCE
+ :0
+DTSTAMP
+ :19970614T190000Z
+LAST-MODIFIED
+ :20000209T060027Z
+END:VEVENT
+BEGIN:VEVENT
+ORGANIZER
+ :MAILTO:A@Example.com
+ATTENDEE
+ ;PARTSTAT=DELEGATED
+ ;DELEGATED-TO="Mailto:E@example.com"
+ :Mailto:C@example.com
+UID
+ :calsrv.example.com-873970198738777@example.com
+SEQUENCE
+ :0
+REQUEST-STATUS
+ :2.0\;Success
+DTSTAMP
+ :19970611T190000Z
+LAST-MODIFIED
+ :20000209T060027Z
+END:VEVENT
+BEGIN:VEVENT
+ORGANIZER
+ :MAILTO:A@Example.com
+ATTENDEE
+ ;PARTSTAT=ACCEPTED
+ ;DELEGATED-FROM="Mailto:C@example.com"
+ :Mailto:E@example.com
+ATTENDEE
+ ;PARTSTAT=DELEGATED
+ ;DELEGATED-TO="Mailto:E@example.com"
+ :Mailto:C@example.com
+UID
+ :calsrv.example.com-873970198738777@example.com
+SEQUENCE
+ :0
+REQUEST-STATUS
+ :2.0\;Success
+DTSTAMP
+ :19970614T190000Z
+LAST-MODIFIED
+ :20000209T060027Z
+END:VEVENT
+BEGIN:VEVENT
+ORGANIZER
+ :MAILTO:A@Example.com
+ATTENDEE
+ ;PARTSTAT=DELEGATED
+ ;DELEGATED-TO="Mailto:E@example.com"
+ :Mailto:C@example.com
+ATTENDEE
+ ;PARTSTAT=DECLINED
+ ;DELEGATED-FROM="Mailto:C@example.com"
+ :Mailto:E@example.com
+COMMENT
+ :Sorry
+COMMENT
+ : I will be out of town at that time.
+UID
+ :calsrv.example.com-873970198738777@example.com
+SEQUENCE
+ :0
+REQUEST-STATUS
+ :2.0\;Success
+DTSTAMP
+ :19970614T190000Z
+LAST-MODIFIED
+ :20000209T060027Z
+END:VEVENT
+BEGIN:VEVENT
+ORGANIZER
+ :Mailto:A@example.com
+ATTENDEE
+ :A@example.com
+X-LIC-ERROR
+ ;X-LIC-ERRORTYPE=PARAMETER_PARSE_ERROR
+ :Can't parse parameter name: 'TYPE=INDIVIDUAL'
+X-LIC-ERROR
+ ;X-LIC-ERRORTYPE=PARAMETER_PARSE_ERROR
+ :Can't parse parameter name: 'Mailto'
+ATTENDEE
+ :Mailto:B@example.com
+X-LIC-ERROR
+ ;X-LIC-ERRORTYPE=PARAMETER_PARSE_ERROR
+ :Can't parse parameter name: 'TYPE=INDIVIDUAL'
+ATTENDEE
+ :Mailto:C@example.com
+X-LIC-ERROR
+ ;X-LIC-ERRORTYPE=PARAMETER_PARSE_ERROR
+ :Can't parse parameter name: 'TYPE=INDIVIDUAL'
+ATTENDEE
+ :Mailto:D@example.com
+X-LIC-ERROR
+ ;X-LIC-ERRORTYPE=PARAMETER_PARSE_ERROR
+ :Can't parse parameter name: 'TYPE=INDIVIDUAL'
+COMMENT
+ :Mr. B cannot attend. It's raining. Lets cancel.
+UID
+ :calsrv.example.com-873970198738777@example.com
+SEQUENCE
+ :1
+STATUS
+ :CANCELLED
+DTSTAMP
+ :19970613T190000Z
+LAST-MODIFIED
+ :20000209T060027Z
+END:VEVENT
+BEGIN:VEVENT
+ORGANIZER
+ :Mailto:A@example.com
+ATTENDEE
+ :mailto:B@example.com
+COMMENT
+ :You're off the hook for this meeting
+UID
+ :calsrv.example.com-873970198738777@example.com
+DTSTAMP
+ :19970613T193000Z
+SEQUENCE
+ :1
+LAST-MODIFIED
+ :20000209T060027Z
+END:VEVENT
+BEGIN:VEVENT
+UID
+ :guid-1@host1.com
+SEQUENCE
+ :0
+X-LIC-ERROR
+ ;X-LIC-ERRORTYPE=VALUE_PARSE_ERROR
+ :Can't parse as RECUR value in RRULE property. Removing entire property:
+ 'FREQ=MONTHLY\;BYMONTHDAY=1\;UNTIL=19980901T210000Z'
+ORGANIZER
+ :Mailto:A@example.com
+ATTENDEE
+ ;ROLE=CHAIR
+ ;PARTSTAT=ACCEPTED
+ :Mailto:A@example.com
+ATTENDEE
+ :Mailto:B@example.com
+ATTENDEE
+ :Mailto:C@example.com
+ATTENDEE
+ :Mailto:D@example.com
+DESCRIPTION
+ :IETF-C&S Conference Call
+CLASS
+ :PUBLIC
+SUMMARY
+ :IETF Calendaring Working Group Meeting
+DTSTART
+ :19970601T210000Z
+DTEND
+ :19970601T220000Z
+LOCATION
+ :Conference Call
+DTSTAMP
+ :19970526T083000Z
+STATUS
+ :CONFIRMED
+LAST-MODIFIED
+ :20000209T060027Z
+END:VEVENT
+BEGIN:VEVENT
+UID
+ :guid-1@host1.com
+SEQUENCE
+ :0
+X-LIC-ERROR
+ ;X-LIC-ERRORTYPE=VALUE_PARSE_ERROR
+ :Can't parse as RECUR value in RRULE property. Removing entire property:
+ 'FREQ=MONTHLY\;BYMONTHDAY=1'
+ORGANIZER
+ :Mailto:A@example.com
+ATTENDEE
+ ;ROLE=CHAIR
+ :Mailto:A@example.com
+ATTENDEE
+ ;RSVP=TRUE
+ :Mailto:B@example.com
+ATTENDEE
+ ;RSVP=TRUE
+ :Mailto:C@example.com
+ATTENDEE
+ ;RSVP=TRUE
+ :Mailto:D@example.com
+DESCRIPTION
+ :IETF-C&S Conference Call
+CLASS
+ :PUBLIC
+SUMMARY
+ :IETF Calendaring Working Group Meeting
+DTSTART
+ :19970601T210000Z
+DTEND
+ :19970601T220000Z
+DTSTAMP
+ :19970602T094000Z
+LOCATION
+ :Conference Call
+STATUS
+ :CONFIRMED
+X-LIC-ERROR
+ ;X-LIC-ERRORTYPE=PROPERTY_PARSE_ERROR
+ :Parse error in property name: 'FOO'
+LAST-MODIFIED
+ :20000209T060027Z
+END:VEVENT
+BEGIN:VEVENT
+ORGANIZER
+ :Mailto:A@example.com
+ATTENDEE
+ :Mailto:B@example.com
+REQUEST-STATUS
+ :2.8\;Repeating event ignored. Scheduled as a single event\;RRULE
+REQUEST-STATUS
+ :3.0\;Invalid Property Name\;FOO
+UID
+ :guid-1@host1.com
+SEQUENCE
+ :0
+DTSTAMP
+ :19970603T094000Z
+LAST-MODIFIED
+ :20000209T060027Z
+END:VEVENT
+BEGIN:VEVENT
+ORGANIZER
+ :Mailto:A@example.com
+ATTENDEE
+ ;ROLE=CHAIR
+ ;PARTSTAT=ACCEPTED
+ :Mailto:A@example.com
+ATTENDEE
+ :Mailto:B@example.com
+ATTENDEE
+ :Mailto:C@example.com
+ATTENDEE
+ :Mailto:D@example.com
+UID
+ : guid-1-12345@host1.com
+DTSTAMP
+ :19970603T094000
+LAST-MODIFIED
+ :20000209T060027Z
+END:VEVENT
+BEGIN:VEVENT
+ORGANIZER
+ :Mailto:A@example.com
+ATTENDEE
+ :Mailto:B@example.com
+UID
+ :acme-12345@host1.com
+DTSTAMP
+ :19970603T094000
+LAST-MODIFIED
+ :20000209T060028Z
+END:VEVENT
+END:VCALENDAR
diff --git a/libical/src/test/alice/booked/199707 b/libical/src/test/alice/booked/199707
new file mode 100644
index 0000000000..c52d27aa91
--- /dev/null
+++ b/libical/src/test/alice/booked/199707
@@ -0,0 +1,701 @@
+BEGIN:VCALENDAR
+X-LIC-CLUSTERCOUNT
+ :19
+DTSTART
+ :00000000T000000
+DTEND
+ :00000000T000000
+BEGIN:VEVENT
+ORGANIZER
+ :mailto:a@example.com
+DTSTART
+ :19970701T200000Z
+DTSTAMP
+ :19970611T190000Z
+SUMMARY
+ :ST. PAUL SAINTS -VS- DULUTH-SUPERIOR DUKES
+UID
+ :0981234-1234234-23@example.com
+LAST-MODIFIED
+ :20000209T060027Z
+END:VEVENT
+BEGIN:VEVENT
+ORGANIZER
+ :mailto:a@example.com
+DTSTAMP
+ :19970612T190000Z
+DTSTART
+ :19970701T210000Z
+DTEND
+ :19970701T230000Z
+SEQUENCE
+ :1
+UID
+ :0981234-1234234-23@example.com
+SUMMARY
+ :ST. PAUL SAINTS -VS- DULUTH-SUPERIOR DUKES
+LAST-MODIFIED
+ :20000209T060027Z
+END:VEVENT
+BEGIN:VEVENT
+ORGANIZER
+ :mailto:a@example.com
+ATTACH
+ :http://www.dukes.com/
+CATEGORIES
+ :SPORTS EVENT
+CATEGORIES
+ :ENTERTAINMENT
+CLASS
+ :PRIVATE
+DESCRIPTION
+ :MIDWAY STADIUM\nBig time game. MUST see.\nExpected duration:2 hours\n
+DTEND
+ ;TZID=America-Chicago
+ :19970701T180000
+DTSTART
+ ;TZID=America-Chicago
+ :19970702T160000
+DTSTAMP
+ :19970614T190000Z
+STATUS
+ :CONFIRMED
+LOCATION
+ :http://www.midwaystadium.com/
+X-LIC-ERROR
+ ;X-LIC-ERRORTYPE=PARAMETER_PARSE_ERROR
+ :Can't parse parameter value: 'VALUE=America-Chicago'
+PRIORITY
+ :2
+RESOURCES
+ :SCOREBOARD
+SEQUENCE
+ :3
+SUMMARY
+ :ST. PAUL SAINTS -VS- DULUTH-SUPERIOR DUKES
+UID
+ :0981234-1234234-23@example.com
+RELATED-TO
+ :0981234-1234234-14@example.com
+LAST-MODIFIED
+ :20000209T060027Z
+BEGIN:VALARM
+TRIGGER
+ :PT2H
+ACTION
+ :DISPLAY
+DESCRIPTION
+ :You should be leaving for the game now.
+END:VALARM
+BEGIN:VALARM
+TRIGGER
+ :PT30M
+ACTION
+ :AUDIO
+END:VALARM
+END:VEVENT
+BEGIN:VEVENT
+ORGANIZER
+ :mailto:a@example.com
+DTSTAMP
+ :19970614T190000Z
+UID
+ :0981234-1234234-23@example.com
+DTSTART
+ ;VALUE=DATE
+ :19970714
+X-LIC-ERROR
+ ;X-LIC-ERRORTYPE=VALUE_PARSE_ERROR
+ :Can't parse as RECUR value in RRULE property. Removing entire property:
+ 'FREQ=YEARLY\;INTERVAL=1'
+SUMMARY
+ : Bastille Day
+LAST-MODIFIED
+ :20000209T060027Z
+END:VEVENT
+BEGIN:VEVENT
+ORGANIZER
+ :Mailto:A@example.com
+ATTENDEE
+ ;ROLE=CHAIR
+ ;PARTSTAT=ACCEPTED
+ ;CN=BIG A
+ :Mailto:A@example.com
+ATTENDEE
+ ;RSVP=TRUE
+ ;CN=B
+ :Mailto:B@example.com
+X-LIC-ERROR
+ ;X-LIC-ERRORTYPE=PARAMETER_PARSE_ERROR
+ :Can't parse parameter name: 'TYPE=INDIVIDUAL'
+ATTENDEE
+ ;RSVP=TRUE
+ ;CN=C
+ :Mailto:C@example.com
+X-LIC-ERROR
+ ;X-LIC-ERRORTYPE=PARAMETER_PARSE_ERROR
+ :Can't parse parameter name: 'TYPE=INDIVIDUAL'
+ATTENDEE
+ ;RSVP=TRUE
+ ;CN=Hal
+ :Mailto:D@example.com
+X-LIC-ERROR
+ ;X-LIC-ERRORTYPE=PARAMETER_PARSE_ERROR
+ :Can't parse parameter name: 'TYPE=INDIVIDUAL'
+ATTENDEE
+ ;RSVP=FALSE
+ :conf_Big@example.com
+X-LIC-ERROR
+ ;X-LIC-ERRORTYPE=PARAMETER_PARSE_ERROR
+ :Can't parse parameter name: 'TYPE=ROOM'
+ATTENDEE
+ ;ROLE=NON-PARTICIPANT
+ ;RSVP=FALSE
+ :Mailto:E@example.com
+DTSTAMP
+ :19970611T190000Z
+DTSTART
+ :19970701T200000Z
+DTEND
+ :19970701T200000Z
+SUMMARY
+ :Conference
+UID
+ :calsrv.example.com-873970198738777@example.com
+SEQUENCE
+ :0
+STATUS
+ :CONFIRMED
+LAST-MODIFIED
+ :20000209T060027Z
+END:VEVENT
+BEGIN:VEVENT
+ORGANIZER
+ :Mailto:A@example.com
+ATTENDEE
+ ;ROLE=CHAIR
+ ;PARTSTAT=ACCEPTED
+ :Mailto:A@example.com
+ATTENDEE
+ ;RSVP=TRUE
+ :Mailto:B@example.com
+X-LIC-ERROR
+ ;X-LIC-ERRORTYPE=PARAMETER_PARSE_ERROR
+ :Can't parse parameter name: 'TYPE=INDIVIDUAL'
+ATTENDEE
+ ;RSVP=TRUE
+ :Mailto:C@example.com
+X-LIC-ERROR
+ ;X-LIC-ERRORTYPE=PARAMETER_PARSE_ERROR
+ :Can't parse parameter name: 'TYPE=INDIVIDUAL'
+ATTENDEE
+ ;RSVP=TRUE
+ ;CN=Hal
+ :Mailto:D@example.com
+X-LIC-ERROR
+ ;X-LIC-ERRORTYPE=PARAMETER_PARSE_ERROR
+ :Can't parse parameter name: 'TYPE=INDIVIDUAL'
+ATTENDEE
+ ;ROLE=NON-PARTICIPANT
+ ;RSVP=FALSE
+ ;CUTYPE=ROOM
+ :Mailto:Conf@example.com
+ATTENDEE
+ ;ROLE=NON-PARTICIPANT
+ ;RSVP=FALSE
+ :Mailto:E@example.com
+DTSTART
+ :19970701T180000Z
+DTEND
+ :19970701T190000Z
+SUMMARY
+ :Phone Conference
+UID
+ :calsrv.example.com-873970198738777@example.com
+SEQUENCE
+ :1
+DTSTAMP
+ :19970613T190000Z
+STATUS
+ :CONFIRMED
+LAST-MODIFIED
+ :20000209T060027Z
+END:VEVENT
+BEGIN:VEVENT
+ORGANIZER
+ :Mailto:A@example.com
+ATTENDEE
+ ;ROLE=CHAIR
+ ;PARTSTAT=ACCEPTED
+ :Mailto:A@example.com
+ATTENDEE
+ ;RSVP=TRUE
+ :Mailto:B@example.com
+X-LIC-ERROR
+ ;X-LIC-ERRORTYPE=PARAMETER_PARSE_ERROR
+ :Can't parse parameter name: 'TYPE=INDIVIDUAL'
+ATTENDEE
+ ;RSVP=TRUE
+ :Mailto:C@example.com
+X-LIC-ERROR
+ ;X-LIC-ERRORTYPE=PARAMETER_PARSE_ERROR
+ :Can't parse parameter name: 'TYPE=INDIVIDUAL'
+DTSTART
+ :19970701T190000Z
+DTEND
+ :19970701T200000Z
+SUMMARY
+ :Discuss the Merits of the election results
+LOCATION
+ :Green Conference Room
+UID
+ :calsrv.example.com-873970198738777a@example.com
+SEQUENCE
+ :0
+DTSTAMP
+ :19970611T190000Z
+STATUS
+ :CONFIRMED
+LAST-MODIFIED
+ :20000209T060027Z
+END:VEVENT
+BEGIN:VEVENT
+ORGANIZER
+ :Mailto:A@example.com
+ATTENDEE
+ ;ROLE=CHAIR
+ ;PARTSTAT=ACCEPTED
+ :Mailto:A@example.com
+ATTENDEE
+ ;RSVP=TRUE
+ :Mailto:B@example.com
+X-LIC-ERROR
+ ;X-LIC-ERRORTYPE=PARAMETER_PARSE_ERROR
+ :Can't parse parameter name: 'TYPE=INDIVIDUAL'
+ATTENDEE
+ ;RSVP=TRUE
+ :Mailto:C@example.com
+X-LIC-ERROR
+ ;X-LIC-ERRORTYPE=PARAMETER_PARSE_ERROR
+ :Can't parse parameter name: 'TYPE=INDIVIDUAL'
+DTSTART
+ :19970701T160000Z
+DTEND
+ :19970701T190000Z
+DTSTAMP
+ :19970612T190000Z
+SUMMARY
+ :Discuss the Merits of the election results
+LOCATION
+ :Green Conference Room
+COMMENT
+ :This time works much better and I think the big conference room is
+ too big
+UID
+ :calsrv.example.com-873970198738777a@example.com
+SEQUENCE
+ :0
+DTSTAMP
+ :19970611T190000Z
+LAST-MODIFIED
+ :20000209T060027Z
+END:VEVENT
+BEGIN:VEVENT
+ORGANIZER
+ :Mailto:A@example.com
+ATTENDEE
+ ;ROLE=CHAIR
+ ;PARTSTAT=ACCEPTED
+ :Mailto:A@example.com
+ATTENDEE
+ ;RSVP=TRUE
+ :Mailto:B@example.com
+X-LIC-ERROR
+ ;X-LIC-ERRORTYPE=PARAMETER_PARSE_ERROR
+ :Can't parse parameter name: 'TYPE=INDIVIDUAL'
+ATTENDEE
+ ;RSVP=TRUE
+ :Mailto:C@example.com
+X-LIC-ERROR
+ ;X-LIC-ERRORTYPE=PARAMETER_PARSE_ERROR
+ :Can't parse parameter name: 'TYPE=INDIVIDUAL'
+DTSTAMP
+ :19970613T190000Z
+DTSTART
+ :19970701T160000Z
+DTEND
+ :19970701T190000Z
+SUMMARY
+ :Discuss the Merits of the election results - changed to meet B's schedule
+LOCATION
+ :Green Conference Room
+UID
+ :calsrv.example.com-873970198738777@example.com
+SEQUENCE
+ :1
+STATUS
+ :CONFIRMED
+LAST-MODIFIED
+ :20000209T060027Z
+END:VEVENT
+BEGIN:VEVENT
+ORGANIZER
+ :Mailto:A@example.com
+ATTENDEE
+ ;PARTSTAT=DELEGATED
+ ;DELEGATED-TO="Mailto:E@example.com"
+ :Mailto:C@example.com
+ATTENDEE
+ ;RSVP=TRUE
+ ;DELEGATED-FROM="Mailto:C@example.com"
+ :Mailto:E@example.com
+DTSTART
+ :19970701T180000Z
+DTEND
+ :19970701T200000Z
+SUMMARY
+ :Phone Conference
+UID
+ :calsrv.example.com-873970198738777@example.com
+SEQUENCE
+ :0
+STATUS
+ :CONFIRMED
+DTSTAMP
+ :19970611T190000Z
+LAST-MODIFIED
+ :20000209T060027Z
+END:VEVENT
+BEGIN:VEVENT
+ORGANIZER
+ :MAILTO:A@Example.com
+ATTENDEE
+ ;PARTSTAT=DECLINED
+ ;DELEGATED-FROM="Mailto:C@example.com"
+ :Mailto:E@example.com
+ATTENDEE
+ ;RSVP=TRUE
+ :Mailto:C@example.com
+UID
+ :calsrv.example.com-873970198738777@example.com
+SEQUENCE
+ :0
+SUMMARY
+ :Phone Conference
+DTSTART
+ :19970701T180000Z
+DTEND
+ :19970701T200000Z
+DTSTAMP
+ :19970614T200000Z
+COMMENT
+ :DELEGATE (ATTENDEE Mailto:E@example.com) DECLINED YOURINVITATION
+LAST-MODIFIED
+ :20000209T060027Z
+END:VEVENT
+BEGIN:VEVENT
+ORGANIZER
+ :Mailto:A@example.com
+ATTENDEE
+ ;ROLE=CHAIR
+ ;PARTSTAT=ACCEPTED
+ :Mailto:A@example.com
+ATTENDEE
+ :Mailto:C@example.com
+X-LIC-ERROR
+ ;X-LIC-ERRORTYPE=PARAMETER_PARSE_ERROR
+ :Can't parse parameter name: 'TYPE=INDIVIDUAL'
+ATTENDEE
+ :Mailto:D@example.com
+X-LIC-ERROR
+ ;X-LIC-ERRORTYPE=PARAMETER_PARSE_ERROR
+ :Can't parse parameter name: 'TYPE=INDIVIDUAL'
+ATTENDEE
+ :CR_Big@example.com
+X-LIC-ERROR
+ ;X-LIC-ERRORTYPE=PARAMETER_PARSE_ERROR
+ :Can't parse parameter name: 'TYPE=ROOM'
+ATTENDEE
+ ;ROLE=NON-PARTICIPANT
+ ;RSVP=FALSE
+ :Mailto:E@example.com
+DTSTAMP
+ :19970611T190000Z
+DTSTART
+ :19970701T200000Z
+DTEND
+ :19970701T203000Z
+SUMMARY
+ :Phone Conference
+UID
+ :calsrv.example.com-873970198738777@example.com
+SEQUENCE
+ :2
+STATUS
+ :CONFIRMED
+LAST-MODIFIED
+ :20000209T060027Z
+END:VEVENT
+BEGIN:VEVENT
+ORGANIZER
+ :Mailto:B@example.com
+ATTENDEE
+ ;ROLE=CHAIR
+ :Mailto:B@example.com
+X-LIC-ERROR
+ ;X-LIC-ERRORTYPE=PARAMETER_PARSE_ERROR
+ :Can't parse parameter name: 'STATUS=ACCEPTED'
+ATTENDEE
+ :Mailto:C@example.com
+X-LIC-ERROR
+ ;X-LIC-ERRORTYPE=PARAMETER_PARSE_ERROR
+ :Can't parse parameter name: 'TYPE=INDIVIDUAL'
+ATTENDEE
+ :Mailto:D@example.com
+X-LIC-ERROR
+ ;X-LIC-ERRORTYPE=PARAMETER_PARSE_ERROR
+ :Can't parse parameter name: 'TYPE=INDIVIDUAL'
+DTSTAMP
+ :19970611T190000Z
+DTSTART
+ :19970701T200000Z
+DTEND
+ :19970701T203000Z
+X-LIC-ERROR
+ ;X-LIC-ERRORTYPE=VALUE_PARSE_ERROR
+ :Can't parse as RECUR value in RRULE property. Removing entire property:
+ 'FREQ=WEEKLY'
+SUMMARY
+ :Phone Conference
+UID
+ :123456@example.com
+SEQUENCE
+ :1
+STATUS
+ :CONFIRMED
+LAST-MODIFIED
+ :20000209T060027Z
+END:VEVENT
+BEGIN:VEVENT
+ORGANIZER
+ :Mailto:A@example.com
+ATTENDEE
+ ;ROLE=CHAIR
+ ;PARTSTAT=ACCEPTED
+ :A@example.COM
+X-LIC-ERROR
+ ;X-LIC-ERRORTYPE=PARAMETER_PARSE_ERROR
+ :Can't parse parameter name: 'TYPE=INDIVIDUAL'
+ATTENDEE
+ ;RSVP=TRUE
+ :B@example.fr
+X-LIC-ERROR
+ ;X-LIC-ERRORTYPE=PARAMETER_PARSE_ERROR
+ :Can't parse parameter name: 'TYPE=INDIVIDUAL'
+ATTENDEE
+ ;RSVP=TRUE
+ :c@example.jp
+X-LIC-ERROR
+ ;X-LIC-ERRORTYPE=PARAMETER_PARSE_ERROR
+ :Can't parse parameter name: 'TYPE=INDIVIDUAL'
+DTSTAMP
+ :19970613T190030Z
+DTSTART
+ ;TZID=America-SanJose
+ :19970701T140000
+DTEND
+ ;TZID=America-SanJose
+ :19970701T150000
+X-LIC-ERROR
+ ;X-LIC-ERRORTYPE=VALUE_PARSE_ERROR
+ :Can't parse as RECUR value in RRULE property. Removing entire property:
+ 'FREQ=WEEKLY\;INTERVAL=20\;WKST=SU\;BYDAY=TU'
+RDATE
+ ;TZID=America-SanJose
+ :19970910T140000
+EXDATE
+ ;TZID=America-SanJose
+ :19970909T140000
+EXDATE
+ ;TZID=America-SanJose
+ :19971028T140000
+SUMMARY
+ :Weekly Phone Conference
+UID
+ :calsrv.example.com-873970198738777@example.com
+SEQUENCE
+ :0
+STATUS
+ :CONFIRMED
+LAST-MODIFIED
+ :20000209T060027Z
+END:VEVENT
+BEGIN:VEVENT
+UID
+ :guid-1@host1com
+RECURRENCE-ID
+ :19970701T210000Z
+SEQUENCE
+ :1
+ORGANIZER
+ :Mailto:A@example.com
+ATTENDEE
+ ;ROLE=CHAIR
+ ;PARTSTAT=ACCEPTED
+ :Mailto:A@example.com
+ATTENDEE
+ :Mailto:B@example.com
+ATTENDEE
+ :Mailto:C@example.com
+ATTENDEE
+ :Mailto:D@example.com
+DESCRIPTION
+ :IETF-C&S Conference Call
+CLASS
+ :PUBLIC
+SUMMARY
+ :IETF Calendaring Working Group Meeting
+DTSTART
+ :19970703T210000Z
+DTEND
+ :19970703T220000Z
+LOCATION
+ :Conference Call
+DTSTAMP
+ :19970626T093000Z
+STATUS
+ :CONFIRMED
+LAST-MODIFIED
+ :20000209T060027Z
+END:VEVENT
+BEGIN:VEVENT
+UID
+ :guid-1@host1.com
+ORGANIZER
+ :Mailto:A@example.com
+ATTENDEE
+ ;ROLE=CHAIR
+ ;PARTSTAT=ACCEPTED
+ :Mailto:A@example.com
+ATTENDEE
+ :Mailto:B@example.com
+ATTENDEE
+ :Mailto:C@example.com
+ATTENDEE
+ :Mailto:D@example.com
+RECURRENCE-ID
+ :19970801T210000Z
+SEQUENCE
+ :2
+STATUS
+ :CANCELLED
+DTSTAMP
+ :19970721T093000Z
+LAST-MODIFIED
+ :20000209T060027Z
+END:VEVENT
+BEGIN:VEVENT
+UID
+ :guid-1@host1.com
+ORGANIZER
+ :Mailto:A@example.com
+ATTENDEE
+ ;ROLE=CHAIR
+ ;PARTSTAT=ACCEPTED
+ :Mailto:A@example.com
+ATTENDEE
+ :Mailto:B@example.com
+ATTENDEE
+ :Mailto:C@example.com
+ATTENDEE
+ :Mailto:D@example.com
+DTSTAMP
+ :19970721T103000Z
+STATUS
+ :CANCELLED
+SEQUENCE
+ :3
+LAST-MODIFIED
+ :20000209T060027Z
+END:VEVENT
+BEGIN:VEVENT
+UID
+ :123456789@host1.com
+SEQUENCE
+ :4
+ORGANIZER
+ :Mailto:A@example.com
+ATTENDEE
+ ;ROLE=CHAIR
+ ;PARTSTAT=ACCEPTED
+ :Mailto:A@example.com
+ATTENDEE
+ ;RSVP=TRUE
+ :Mailto:B@example.com
+ATTENDEE
+ ;RSVP=TRUE
+ :Mailto:C@example.com
+ATTENDEE
+ ;RSVP=TRUE
+ :Mailto:D@example.com
+DESCRIPTION
+ :IETF-C&S Conference Call
+CLASS
+ :PUBLIC
+SUMMARY
+ :IETF Calendaring Working Group Meeting
+DTSTART
+ :19970715T210000Z
+DTEND
+ :19970715T220000Z
+LOCATION
+ :Conference Call
+DTSTAMP
+ :19970629T093000Z
+STATUS
+ :CONFIRMED
+LAST-MODIFIED
+ :20000209T060027Z
+END:VEVENT
+BEGIN:VEVENT
+UID
+ :guid-1@host1.com
+RECURRENCE-ID
+ :19970715T210000Z
+SEQUENCE
+ :4
+ORGANIZER
+ :Mailto:A@example.com
+ATTENDEE
+ ;ROLE=CHAIR
+ ;RSVP=TRUE
+ :Mailto:A@example.com
+ATTENDEE
+ ;RSVP=TRUE
+ :Mailto:B@example.com
+ATTENDEE
+ ;RSVP=TRUE
+ :Mailto:C@example.com
+ATTENDEE
+ ;RSVP=TRUE
+ :Mailto:D@example.com
+DESCRIPTION
+ :IETF-C&S Conference Call
+CLASS
+ :PUBLIC
+SUMMARY
+ :IETF Calendaring Working Group Meeting
+DTSTART
+ :19970715T220000Z
+DTEND
+ :19970715T230000Z
+LOCATION
+ :Conference Call
+COMMENT
+ :May we bump this by an hour? I have a conflict
+DTSTAMP
+ :19970629T094000Z
+LAST-MODIFIED
+ :20000209T060027Z
+END:VEVENT
+END:VCALENDAR
diff --git a/libical/src/test/alice/booked/199708 b/libical/src/test/alice/booked/199708
new file mode 100644
index 0000000000..2db95cabcf
--- /dev/null
+++ b/libical/src/test/alice/booked/199708
@@ -0,0 +1,45 @@
+BEGIN:VCALENDAR
+X-LIC-CLUSTERCOUNT
+ :1
+DTSTART
+ :00000000T000000
+DTEND
+ :00000000T000000
+BEGIN:VEVENT
+UID
+ :acme-12345@host1.com
+SEQUENCE
+ :3
+X-LIC-ERROR
+ ;X-LIC-ERRORTYPE=VALUE_PARSE_ERROR
+ :Can't parse as RECUR value in RRULE property. Removing entire property:
+ 'FREQ=WEEKLY'
+RDATE
+ ;VALUE=PERIOD
+ :19970819T210000Z/19970081T220000Z
+ORGANIZER
+ :Mailto:A@example.com
+ATTENDEE
+ ;ROLE=CHAIR
+ ;PARTSTAT=ACCEPTED
+ :Mailto:A@example.com
+ATTENDEE
+ :Mailto:B@example.com
+DESCRIPTION
+ :IETF-C&S Conference Call
+SUMMARY
+ :IETF Calendaring Working Group Meeting
+DTSTART
+ :19970801T210000Z
+DTEND
+ :19970801T220000Z
+RECURRENCE-ID
+ :19970809T210000Z
+DTSTAMP
+ :19970726T083000
+STATUS
+ :CONFIRMED
+LAST-MODIFIED
+ :20000209T060028Z
+END:VEVENT
+END:VCALENDAR
diff --git a/libical/src/test/alice/booked/199709 b/libical/src/test/alice/booked/199709
new file mode 100644
index 0000000000..30a4471bde
--- /dev/null
+++ b/libical/src/test/alice/booked/199709
@@ -0,0 +1,58 @@
+BEGIN:VCALENDAR
+X-LIC-CLUSTERCOUNT
+ :1
+DTSTART
+ :00000000T000000
+DTEND
+ :00000000T000000
+BEGIN:VEVENT
+UID
+ :guid-1@host1.com
+RECURRENCE-ID
+ :19970901T210000Z
+X-LIC-ERROR
+ ;X-LIC-ERRORTYPE=PARAMETER_PARSE_ERROR
+ :Can't parse parameter name: 'THISANDFUTURE'
+SEQUENCE
+ :3
+ORGANIZER
+ :Mailto:A@example.com
+ATTENDEE
+ ;ROLE=CHAIR
+ ;PARTSTAT=ACCEPTED
+ :Mailto:A@example.com
+ATTENDEE
+ ;RSVP=TRUE
+ :Mailto:B@example.com
+ATTENDEE
+ ;RSVP=TRUE
+ :Mailto:C@example.com
+ATTENDEE
+ ;RSVP=TRUE
+ :Mailto:D@example.com
+DESCRIPTION
+ :IETF-C&S Discussion
+CLASS
+ :PUBLIC
+SUMMARY
+ :IETF Calendaring Working Group Meeting
+DTSTART
+ :19970901T210000Z
+DTEND
+ :19970901T220000Z
+LOCATION
+ :Building 32
+LOCATION
+ : Microsoft
+LOCATION
+ : Seattle
+LOCATION
+ : WA
+DTSTAMP
+ :19970526T083000Z
+STATUS
+ :CONFIRMED
+LAST-MODIFIED
+ :20000209T060027Z
+END:VEVENT
+END:VCALENDAR
diff --git a/libical/src/test/alice/booked/199803 b/libical/src/test/alice/booked/199803
new file mode 100644
index 0000000000..4b673d7ccc
--- /dev/null
+++ b/libical/src/test/alice/booked/199803
@@ -0,0 +1,241 @@
+BEGIN:VCALENDAR
+X-LIC-CLUSTERCOUNT
+ :7
+DTSTART
+ :00000000T000000
+DTEND
+ :00000000T000000
+BEGIN:VEVENT
+UID
+ :123456789@host1.com
+SEQUENCE
+ :0
+X-LIC-ERROR
+ ;X-LIC-ERRORTYPE=VALUE_PARSE_ERROR
+ :Can't parse as RECUR value in RRULE property. Removing entire property:
+ 'WKST=SU\;BYDAY=TU\;FREQ=WEEKLY'
+ORGANIZER
+ :Mailto:A@example.com
+ATTENDEE
+ ;ROLE=CHAIR
+ ;PARTSTAT=ACCEPTED
+ :Mailto:A@example.com
+ATTENDEE
+ ;RSVP=TRUE
+ :Mailto:B@example.com
+SUMMARY
+ :Review Accounts
+DTSTART
+ :19980303T210000Z
+DTEND
+ :19980303T220000Z
+LOCATION
+ :The White Room
+DTSTAMP
+ :19980301T093000Z
+STATUS
+ :CONFIRMED
+LAST-MODIFIED
+ :20000209T060027Z
+END:VEVENT
+BEGIN:VEVENT
+UID
+ :123456789@host1.com
+SEQUENCE
+ :7
+X-LIC-ERROR
+ ;X-LIC-ERRORTYPE=VALUE_PARSE_ERROR
+ :Can't parse as RECUR value in RRULE property. Removing entire property:
+ 'WKST=SU\;BYDAY=TH\;FREQ=WEEKLY'
+ORGANIZER
+ :Mailto:A@example.com
+ATTENDEE
+ ;ROLE=CHAIR
+ ;PARTSTAT=ACCEPTED
+ :Mailto:A@example.com
+ATTENDEE
+ ;RSVP=TRUE
+ :Mailto:B@example.com
+SUMMARY
+ :Review Accounts
+DTSTART
+ :19980303T210000Z
+DTEND
+ :19980303T220000Z
+DTSTAMP
+ :19980303T193000Z
+LOCATION
+ :The Usual conference room
+STATUS
+ :CONFIRMED
+LAST-MODIFIED
+ :20000209T060027Z
+END:VEVENT
+BEGIN:VEVENT
+UID
+ :123456789@host1.com
+SEQUENCE
+ :7
+X-LIC-ERROR
+ ;X-LIC-ERRORTYPE=VALUE_PARSE_ERROR
+ :Can't parse as RECUR value in RRULE property. Removing entire property:
+ 'WKST=SU\;BYDAY=TU'
+ORGANIZER
+ :Mailto:A@example.com
+ATTENDEE
+ ;ROLE=CHAIR
+ ;PARTSTAT=ACCEPTED
+ :Mailto:A@example.com
+ATTENDEE
+ ;RSVP=TRUE
+ :Mailto:B@example.com
+SUMMARY
+ :Review Accounts
+DTSTART
+ :19980303T210000Z
+DTEND
+ :19980303T220000Z
+DTSTAMP
+ :19980303T193000Z
+LOCATION
+ :The White Room
+STATUS
+ :CONFIRMED
+LAST-MODIFIED
+ :20000209T060027Z
+END:VEVENT
+BEGIN:VEVENT
+UID
+ :123456789@host1.com
+SEQUENCE
+ :0
+RDATE
+ :19980304T180000Z
+RDATE
+ :19980311T180000Z
+RDATE
+ :19980318T180000Z
+ORGANIZER
+ :Mailto:A@example.com
+ATTENDEE
+ ;ROLE=CHAIR
+ ;PARTSTAT=ACCEPTED
+ :Mailto:A@example.com
+ATTENDEE
+ ;RSVP=TRUE
+ :Mailto:B@example.com
+SUMMARY
+ :Review Accounts
+DTSTART
+ :19980304T180000Z
+DTEND
+ :19980304T200000Z
+DTSTAMP
+ :19980303T193000Z
+LOCATION
+ :Conference Room A
+STATUS
+ :CONFIRMED
+LAST-MODIFIED
+ :20000209T060027Z
+END:VEVENT
+BEGIN:VEVENT
+UID
+ :123456789@host1.com
+SEQUENCE
+ :1
+RECURRENCE-ID
+ :19980311T180000Z
+ORGANIZER
+ :Mailto:A@example.com
+ATTENDEE
+ ;ROLE=CHAIR
+ ;PARTSTAT=ACCEPTED
+ :Mailto:A@example.com
+ATTENDEE
+ ;RSVP=TRUE
+ :Mailto:B@example.com
+SUMMARY
+ :Review Accounts
+DTSTART
+ :19980311T160000Z
+DTEND
+ :19980311T180000Z
+DTSTAMP
+ :19980306T193000Z
+LOCATION
+ :The Small conference room
+STATUS
+ :CONFIRMED
+LAST-MODIFIED
+ :20000209T060027Z
+END:VEVENT
+BEGIN:VEVENT
+UID
+ :123456789@host1.com
+SEQUENCE
+ :2
+ORGANIZER
+ :Mailto:A@example.com
+ATTENDEE
+ ;ROLE=CHAIR
+ ;PARTSTAT=ACCEPTED
+ :Mailto:A@example.com
+ATTENDEE
+ ;RSVP=TRUE
+ :Mailto:B@example.com
+SUMMARY
+ :Review Accounts
+DTSTART
+ :19980315T180000Z
+DTEND
+ :19980315T200000Z
+DTSTAMP
+ :19980307T193000Z
+LOCATION
+ :Conference Room A
+STATUS
+ :CONFIRMED
+LAST-MODIFIED
+ :20000209T060027Z
+END:VEVENT
+BEGIN:VEVENT
+UID
+ :123456789@host1.com
+SEQUENCE
+ :2
+RDATE
+ :19980304T180000Z
+RDATE
+ :19980311T160000Z
+RDATE
+ :19980315T180000Z
+X-LIC-ERROR
+ ;X-LIC-ERRORTYPE=COMPONENT_PARSE_ERROR
+ :Got a data line\, but could not find a property name or component
+ begin tag: 'Error! Bookmark not defined.'
+ORGANIZER
+ :Mailto:A@example.com
+ATTENDEE
+ ;ROLE=CHAIR
+ ;PARTSTAT=ACCEPTED
+ :Mailto:A@example.com
+ATTENDEE
+ ;RSVP=TRUE
+ :Mailto:B@example.com
+SUMMARY
+ :Review Accounts
+DTSTART
+ :19980304T180000Z
+DTEND
+ :19980304T200000Z
+DTSTAMP
+ :19980303T193000Z
+LOCATION
+ :Conference Room A
+STATUS
+ :CONFIRMED
+LAST-MODIFIED
+ :20000209T060027Z
+END:VEVENT
+END:VCALENDAR
diff --git a/libical/src/test/alice/incoming.ics b/libical/src/test/alice/incoming.ics
new file mode 100644
index 0000000000..c25b6b11c3
--- /dev/null
+++ b/libical/src/test/alice/incoming.ics
@@ -0,0 +1,2164 @@
+BEGIN:VCALENDAR
+X-LIC-CLUSTERCOUNT
+ :0
+DTSTART
+ :00000000T000000
+DTEND
+ :00000000T000000
+BEGIN:VCALENDAR
+METHOD
+ :PUBLISH
+PRODID
+ :-//ACME/DesktopCalendar//EN
+VERSION
+ :2.0
+X-LIC-SENDER
+ :eric@busboom.org
+BEGIN:VEVENT
+ORGANIZER
+ :mailto:a@example.com
+DTSTART
+ :19970701T200000Z
+DTSTAMP
+ :19970611T190000Z
+SUMMARY
+ :ST. PAUL SAINTS -VS- DULUTH-SUPERIOR DUKES
+UID
+ :0981234-1234234-23@example.com
+END:VEVENT
+END:VCALENDAR
+BEGIN:VCALENDAR
+METHOD
+ :PUBLISH
+VERSION
+ :2.0
+PRODID
+ :-//ACME/DesktopCalendar//EN
+X-LIC-SENDER
+ :eric@busboom.org
+BEGIN:VEVENT
+ORGANIZER
+ :mailto:a@example.com
+DTSTAMP
+ :19970612T190000Z
+DTSTART
+ :19970701T210000Z
+DTEND
+ :19970701T230000Z
+SEQUENCE
+ :1
+UID
+ :0981234-1234234-23@example.com
+SUMMARY
+ :ST. PAUL SAINTS -VS- DULUTH-SUPERIOR DUKES
+END:VEVENT
+END:VCALENDAR
+BEGIN:VCALENDAR
+METHOD
+ :CANCEL
+VERSION
+ :2.0
+PRODID
+ :-//ACME/DesktopCalendar//EN
+X-LIC-SENDER
+ :eric@busboom.org
+BEGIN:VEVENT
+ORGANIZER
+ :mailto:a@example.com
+COMMENT
+ :DUKES forfeit the game
+SEQUENCE
+ :2
+UID
+ :0981234-1234234-23@example.com
+DTSTAMP
+ :19970613T190000Z
+END:VEVENT
+END:VCALENDAR
+BEGIN:VCALENDAR
+PRODID
+ :-//ACME/DesktopCalendar//EN
+METHOD
+ :PUBLISH
+X-LIC-ERROR
+ ;X-LIC-ERRORTYPE=PROPERTY_PARSE_ERROR
+ :Parse error in property name: 'SCALE'
+VERSION
+ :2.0
+X-LIC-SENDER
+ :eric@busboom.org
+BEGIN:VTIMEZONE
+TZID
+ :America-Chicago
+TZURL
+ :http://zones.stds_r_us.net/tz/America-Chicago
+BEGIN:STANDARD
+DTSTART
+ :19671029T020000
+X-LIC-ERROR
+ ;X-LIC-ERRORTYPE=VALUE_PARSE_ERROR
+ :Can't parse as RECUR value in RRULE property. Removing entire property:
+ 'FREQ=YEARLY\;BYDAY=-1SU\;BYMONTH=10'
+TZOFFSETFROM
+ :-050000
+TZOFFSETTO
+ :-060000
+TZNAME
+ :CST
+END:STANDARD
+BEGIN:DAYLIGHT
+DTSTART
+ :19870405T020000
+X-LIC-ERROR
+ ;X-LIC-ERRORTYPE=VALUE_PARSE_ERROR
+ :Can't parse as RECUR value in RRULE property. Removing entire property:
+ 'FREQ=YEARLY\;BYDAY=1SU\;BYMONTH=4'
+TZOFFSETFROM
+ :-060000
+TZOFFSETTO
+ :-050000
+TZNAME
+ :CDT
+END:DAYLIGHT
+END:VTIMEZONE
+BEGIN:VEVENT
+ORGANIZER
+ :mailto:a@example.com
+ATTACH
+ :http://www.dukes.com/
+CATEGORIES
+ :SPORTS EVENT
+CATEGORIES
+ :ENTERTAINMENT
+CLASS
+ :PRIVATE
+DESCRIPTION
+ :MIDWAY STADIUM\nBig time game. MUST see.\nExpected duration:2 hours\n
+DTEND
+ ;TZID=America-Chicago
+ :19970701T180000
+DTSTART
+ ;TZID=America-Chicago
+ :19970702T160000
+DTSTAMP
+ :19970614T190000Z
+STATUS
+ :CONFIRMED
+LOCATION
+ :http://www.midwaystadium.com/
+X-LIC-ERROR
+ ;X-LIC-ERRORTYPE=PARAMETER_PARSE_ERROR
+ :Can't parse parameter value: 'VALUE=America-Chicago'
+PRIORITY
+ :2
+RESOURCES
+ :SCOREBOARD
+SEQUENCE
+ :3
+SUMMARY
+ :ST. PAUL SAINTS -VS- DULUTH-SUPERIOR DUKES
+UID
+ :0981234-1234234-23@example.com
+RELATED-TO
+ :0981234-1234234-14@example.com
+BEGIN:VALARM
+TRIGGER
+ :PT2H
+ACTION
+ :DISPLAY
+DESCRIPTION
+ :You should be leaving for the game now.
+END:VALARM
+BEGIN:VALARM
+TRIGGER
+ :PT30M
+ACTION
+ :AUDIO
+END:VALARM
+END:VEVENT
+END:VCALENDAR
+BEGIN:VCALENDAR
+PRODID
+ :-//ACME/DesktopCalendar//EN
+METHOD
+ :PUBLISH
+VERSION
+ :2.0
+X-LIC-SENDER
+ :eric@busboom.org
+BEGIN:VEVENT
+ORGANIZER
+ :mailto:a@example.com
+DTSTAMP
+ :19970614T190000Z
+UID
+ :0981234-1234234-23@example.com
+DTSTART
+ ;VALUE=DATE
+ :19970714
+X-LIC-ERROR
+ ;X-LIC-ERRORTYPE=VALUE_PARSE_ERROR
+ :Can't parse as RECUR value in RRULE property. Removing entire property:
+ 'FREQ=YEARLY\;INTERVAL=1'
+SUMMARY
+ : Bastille Day
+END:VEVENT
+END:VCALENDAR
+BEGIN:VCALENDAR
+PRODID
+ :-//ACME/DesktopCalendar//EN
+METHOD
+ :REQUEST
+VERSION
+ :2.0
+X-LIC-SENDER
+ :eric@busboom.org
+BEGIN:VEVENT
+ORGANIZER
+ :Mailto:A@example.com
+ATTENDEE
+ ;ROLE=CHAIR
+ ;PARTSTAT=ACCEPTED
+ ;CN=BIG A
+ :Mailto:A@example.com
+ATTENDEE
+ ;RSVP=TRUE
+ ;CN=B
+ :Mailto:B@example.com
+X-LIC-ERROR
+ ;X-LIC-ERRORTYPE=PARAMETER_PARSE_ERROR
+ :Can't parse parameter name: 'TYPE=INDIVIDUAL'
+ATTENDEE
+ ;RSVP=TRUE
+ ;CN=C
+ :Mailto:C@example.com
+X-LIC-ERROR
+ ;X-LIC-ERRORTYPE=PARAMETER_PARSE_ERROR
+ :Can't parse parameter name: 'TYPE=INDIVIDUAL'
+ATTENDEE
+ ;RSVP=TRUE
+ ;CN=Hal
+ :Mailto:D@example.com
+X-LIC-ERROR
+ ;X-LIC-ERRORTYPE=PARAMETER_PARSE_ERROR
+ :Can't parse parameter name: 'TYPE=INDIVIDUAL'
+ATTENDEE
+ ;RSVP=FALSE
+ :conf_Big@example.com
+X-LIC-ERROR
+ ;X-LIC-ERRORTYPE=PARAMETER_PARSE_ERROR
+ :Can't parse parameter name: 'TYPE=ROOM'
+ATTENDEE
+ ;ROLE=NON-PARTICIPANT
+ ;RSVP=FALSE
+ :Mailto:E@example.com
+DTSTAMP
+ :19970611T190000Z
+DTSTART
+ :19970701T200000Z
+DTEND
+ :19970701T200000Z
+SUMMARY
+ :Conference
+UID
+ :calsrv.example.com-873970198738777@example.com
+SEQUENCE
+ :0
+STATUS
+ :CONFIRMED
+END:VEVENT
+END:VCALENDAR
+BEGIN:VCALENDAR
+PRODID
+ :-//ACME/DesktopCalendar//EN
+METHOD
+ :REPLY
+VERSION
+ :2.0
+X-LIC-SENDER
+ :eric@busboom.org
+BEGIN:VEVENT
+ATTENDEE
+ ;PARTSTAT=ACCEPTED
+ :Mailto:B@example.com
+ORGANIZER
+ :MAILTO:A@example.com
+UID
+ :calsrv.example.com-873970198738777@example.com
+SEQUENCE
+ :0
+REQUEST-STATUS
+ :2.0\;Success
+DTSTAMP
+ :19970612T190000Z
+END:VEVENT
+END:VCALENDAR
+BEGIN:VCALENDAR
+PRODID
+ :-//ACME/DesktopCalendar//EN
+METHOD
+ :REQUEST
+VERSION
+ :2.0
+X-LIC-SENDER
+ :eric@busboom.org
+BEGIN:VEVENT
+ORGANIZER
+ :Mailto:A@example.com
+ATTENDEE
+ ;ROLE=CHAIR
+ ;PARTSTAT=ACCEPTED
+ :Mailto:A@example.com
+ATTENDEE
+ ;RSVP=TRUE
+ :Mailto:B@example.com
+X-LIC-ERROR
+ ;X-LIC-ERRORTYPE=PARAMETER_PARSE_ERROR
+ :Can't parse parameter name: 'TYPE=INDIVIDUAL'
+ATTENDEE
+ ;RSVP=TRUE
+ :Mailto:C@example.com
+X-LIC-ERROR
+ ;X-LIC-ERRORTYPE=PARAMETER_PARSE_ERROR
+ :Can't parse parameter name: 'TYPE=INDIVIDUAL'
+ATTENDEE
+ ;RSVP=TRUE
+ ;CN=Hal
+ :Mailto:D@example.com
+X-LIC-ERROR
+ ;X-LIC-ERRORTYPE=PARAMETER_PARSE_ERROR
+ :Can't parse parameter name: 'TYPE=INDIVIDUAL'
+ATTENDEE
+ ;ROLE=NON-PARTICIPANT
+ ;RSVP=FALSE
+ ;CUTYPE=ROOM
+ :Mailto:Conf@example.com
+ATTENDEE
+ ;ROLE=NON-PARTICIPANT
+ ;RSVP=FALSE
+ :Mailto:E@example.com
+DTSTART
+ :19970701T180000Z
+DTEND
+ :19970701T190000Z
+SUMMARY
+ :Phone Conference
+UID
+ :calsrv.example.com-873970198738777@example.com
+SEQUENCE
+ :1
+DTSTAMP
+ :19970613T190000Z
+STATUS
+ :CONFIRMED
+END:VEVENT
+END:VCALENDAR
+BEGIN:VCALENDAR
+PRODID
+ :-//ACME/DesktopCalendar//EN
+METHOD
+ :REQUEST
+VERSION
+ :2.0
+X-LIC-SENDER
+ :eric@busboom.org
+BEGIN:VEVENT
+ORGANIZER
+ :Mailto:A@example.com
+ATTENDEE
+ ;ROLE=CHAIR
+ ;PARTSTAT=ACCEPTED
+ :Mailto:A@example.com
+ATTENDEE
+ ;RSVP=TRUE
+ :Mailto:B@example.com
+X-LIC-ERROR
+ ;X-LIC-ERRORTYPE=PARAMETER_PARSE_ERROR
+ :Can't parse parameter name: 'TYPE=INDIVIDUAL'
+ATTENDEE
+ ;RSVP=TRUE
+ :Mailto:C@example.com
+X-LIC-ERROR
+ ;X-LIC-ERRORTYPE=PARAMETER_PARSE_ERROR
+ :Can't parse parameter name: 'TYPE=INDIVIDUAL'
+DTSTART
+ :19970701T190000Z
+DTEND
+ :19970701T200000Z
+SUMMARY
+ :Discuss the Merits of the election results
+LOCATION
+ :Green Conference Room
+UID
+ :calsrv.example.com-873970198738777a@example.com
+SEQUENCE
+ :0
+DTSTAMP
+ :19970611T190000Z
+STATUS
+ :CONFIRMED
+END:VEVENT
+END:VCALENDAR
+BEGIN:VCALENDAR
+PRODID
+ :-//ACME/DesktopCalendar//EN
+METHOD
+ :COUNTER
+VERSION
+ :2.0
+X-LIC-SENDER
+ :eric@busboom.org
+BEGIN:VEVENT
+ORGANIZER
+ :Mailto:A@example.com
+ATTENDEE
+ ;ROLE=CHAIR
+ ;PARTSTAT=ACCEPTED
+ :Mailto:A@example.com
+ATTENDEE
+ ;RSVP=TRUE
+ :Mailto:B@example.com
+X-LIC-ERROR
+ ;X-LIC-ERRORTYPE=PARAMETER_PARSE_ERROR
+ :Can't parse parameter name: 'TYPE=INDIVIDUAL'
+ATTENDEE
+ ;RSVP=TRUE
+ :Mailto:C@example.com
+X-LIC-ERROR
+ ;X-LIC-ERRORTYPE=PARAMETER_PARSE_ERROR
+ :Can't parse parameter name: 'TYPE=INDIVIDUAL'
+DTSTART
+ :19970701T160000Z
+DTEND
+ :19970701T190000Z
+DTSTAMP
+ :19970612T190000Z
+SUMMARY
+ :Discuss the Merits of the election results
+LOCATION
+ :Green Conference Room
+COMMENT
+ :This time works much better and I think the big conference room is
+ too big
+UID
+ :calsrv.example.com-873970198738777a@example.com
+SEQUENCE
+ :0
+DTSTAMP
+ :19970611T190000Z
+END:VEVENT
+END:VCALENDAR
+BEGIN:VCALENDAR
+PRODID
+ :-//ACME/DesktopCalendar//EN
+METHOD
+ :REQUEST
+VERSION
+ :2.0
+X-LIC-SENDER
+ :eric@busboom.org
+BEGIN:VEVENT
+ORGANIZER
+ :Mailto:A@example.com
+ATTENDEE
+ ;ROLE=CHAIR
+ ;PARTSTAT=ACCEPTED
+ :Mailto:A@example.com
+ATTENDEE
+ ;RSVP=TRUE
+ :Mailto:B@example.com
+X-LIC-ERROR
+ ;X-LIC-ERRORTYPE=PARAMETER_PARSE_ERROR
+ :Can't parse parameter name: 'TYPE=INDIVIDUAL'
+ATTENDEE
+ ;RSVP=TRUE
+ :Mailto:C@example.com
+X-LIC-ERROR
+ ;X-LIC-ERRORTYPE=PARAMETER_PARSE_ERROR
+ :Can't parse parameter name: 'TYPE=INDIVIDUAL'
+DTSTAMP
+ :19970613T190000Z
+DTSTART
+ :19970701T160000Z
+DTEND
+ :19970701T190000Z
+SUMMARY
+ :Discuss the Merits of the election results - changed to meet B's schedule
+LOCATION
+ :Green Conference Room
+UID
+ :calsrv.example.com-873970198738777@example.com
+SEQUENCE
+ :1
+STATUS
+ :CONFIRMED
+END:VEVENT
+END:VCALENDAR
+BEGIN:VCALENDAR
+PRODID
+ :-//ACME/DesktopCalendar//EN
+METHOD
+ :DECLINECOUNTER
+VERSION
+ :2.0
+X-LIC-SENDER
+ :eric@busboom.org
+BEGIN:VEVENT
+ORGANIZER
+ :Mailto:A@example.com
+ATTENDEE
+ ;RSVP=TRUE
+ :Mailto:B@example.com
+X-LIC-ERROR
+ ;X-LIC-ERRORTYPE=PARAMETER_PARSE_ERROR
+ :Can't parse parameter name: 'TYPE=INDIVIDUAL'
+COMMENT
+ :Sorry
+COMMENT
+ : I cannot change this meeting time
+UID
+ :calsrv.example.com-873970198738777@example.com
+SEQUENCE
+ :0
+DTSTAMP
+ :19970614T190000Z
+END:VEVENT
+END:VCALENDAR
+BEGIN:VCALENDAR
+PRODID
+ :-//ACME/DesktopCalendar//EN
+METHOD
+ :REPLY
+VERSION
+ :2.0
+X-LIC-SENDER
+ :eric@busboom.org
+BEGIN:VEVENT
+ORGANIZER
+ :MAILTO:A@Example.com
+ATTENDEE
+ ;PARTSTAT=DELEGATED
+ ;DELEGATED-TO="Mailto:E@example.com"
+ :Mailto:C@example.com
+UID
+ :calsrv.example.com-873970198738777@example.com
+SEQUENCE
+ :0
+REQUEST-STATUS
+ :2.0\;Success
+DTSTAMP
+ :19970611T190000Z
+END:VEVENT
+END:VCALENDAR
+BEGIN:VCALENDAR
+PRODID
+ :-//ACME/DesktopCalendar//EN
+METHOD
+ :REQUEST
+VERSION
+ :2.0
+X-LIC-SENDER
+ :eric@busboom.org
+BEGIN:VEVENT
+ORGANIZER
+ :Mailto:A@example.com
+ATTENDEE
+ ;PARTSTAT=DELEGATED
+ ;DELEGATED-TO="Mailto:E@example.com"
+ :Mailto:C@example.com
+ATTENDEE
+ ;RSVP=TRUE
+ ;DELEGATED-FROM="Mailto:C@example.com"
+ :Mailto:E@example.com
+DTSTART
+ :19970701T180000Z
+DTEND
+ :19970701T200000Z
+SUMMARY
+ :Phone Conference
+UID
+ :calsrv.example.com-873970198738777@example.com
+SEQUENCE
+ :0
+STATUS
+ :CONFIRMED
+DTSTAMP
+ :19970611T190000Z
+END:VEVENT
+END:VCALENDAR
+BEGIN:VCALENDAR
+PRODID
+ :-//ACME/DesktopCalendar//EN
+METHOD
+ :REPLY
+VERSION
+ :2.0
+X-LIC-SENDER
+ :eric@busboom.org
+BEGIN:VEVENT
+ORGANIZER
+ :MAILTO:A@Example.com
+ATTENDEE
+ ;PARTSTAT=ACCEPTED
+ ;DELEGATED-FROM="Mailto:C@example.com"
+ :Mailto:E@example.com
+ATTENDEE
+ ;PARTSTAT=DELEGATED
+ ;DELEGATED-TO="Mailto:E@example.com"
+ :Mailto:C@example.com
+UID
+ :calsrv.example.com-873970198738777@example.com
+SEQUENCE
+ :0
+REQUEST-STATUS
+ :2.0\;Success
+DTSTAMP
+ :19970614T190000Z
+END:VEVENT
+END:VCALENDAR
+BEGIN:VCALENDAR
+PRODID
+ :-//ACME/DesktopCalendar//EN
+METHOD
+ :REPLY
+VERSION
+ :2.0
+X-LIC-SENDER
+ :eric@busboom.org
+BEGIN:VEVENT
+ORGANIZER
+ :MAILTO:A@Example.com
+ATTENDEE
+ ;PARTSTAT=DELEGATED
+ ;DELEGATED-TO="Mailto:E@example.com"
+ :Mailto:C@example.com
+ATTENDEE
+ ;PARTSTAT=DECLINED
+ ;DELEGATED-FROM="Mailto:C@example.com"
+ :Mailto:E@example.com
+COMMENT
+ :Sorry
+COMMENT
+ : I will be out of town at that time.
+UID
+ :calsrv.example.com-873970198738777@example.com
+SEQUENCE
+ :0
+REQUEST-STATUS
+ :2.0\;Success
+DTSTAMP
+ :19970614T190000Z
+END:VEVENT
+END:VCALENDAR
+BEGIN:VCALENDAR
+PRODID
+ :-//ACME/DesktopCalendar//EN
+METHOD
+ :REQUEST
+VERSION
+ :2.0
+X-LIC-SENDER
+ :eric@busboom.org
+BEGIN:VEVENT
+ORGANIZER
+ :MAILTO:A@Example.com
+ATTENDEE
+ ;PARTSTAT=DECLINED
+ ;DELEGATED-FROM="Mailto:C@example.com"
+ :Mailto:E@example.com
+ATTENDEE
+ ;RSVP=TRUE
+ :Mailto:C@example.com
+UID
+ :calsrv.example.com-873970198738777@example.com
+SEQUENCE
+ :0
+SUMMARY
+ :Phone Conference
+DTSTART
+ :19970701T180000Z
+DTEND
+ :19970701T200000Z
+DTSTAMP
+ :19970614T200000Z
+COMMENT
+ :DELEGATE (ATTENDEE Mailto:E@example.com) DECLINED YOURINVITATION
+END:VEVENT
+END:VCALENDAR
+BEGIN:VCALENDAR
+PRODID
+ :-//ACME/DesktopCalendar//EN
+METHOD
+ :CANCEL
+VERSION
+ :2.0
+X-LIC-SENDER
+ :eric@busboom.org
+BEGIN:VEVENT
+ORGANIZER
+ :Mailto:A@example.com
+ATTENDEE
+ :A@example.com
+X-LIC-ERROR
+ ;X-LIC-ERRORTYPE=PARAMETER_PARSE_ERROR
+ :Can't parse parameter name: 'TYPE=INDIVIDUAL'
+X-LIC-ERROR
+ ;X-LIC-ERRORTYPE=PARAMETER_PARSE_ERROR
+ :Can't parse parameter name: 'Mailto'
+ATTENDEE
+ :Mailto:B@example.com
+X-LIC-ERROR
+ ;X-LIC-ERRORTYPE=PARAMETER_PARSE_ERROR
+ :Can't parse parameter name: 'TYPE=INDIVIDUAL'
+ATTENDEE
+ :Mailto:C@example.com
+X-LIC-ERROR
+ ;X-LIC-ERRORTYPE=PARAMETER_PARSE_ERROR
+ :Can't parse parameter name: 'TYPE=INDIVIDUAL'
+ATTENDEE
+ :Mailto:D@example.com
+X-LIC-ERROR
+ ;X-LIC-ERRORTYPE=PARAMETER_PARSE_ERROR
+ :Can't parse parameter name: 'TYPE=INDIVIDUAL'
+COMMENT
+ :Mr. B cannot attend. It's raining. Lets cancel.
+UID
+ :calsrv.example.com-873970198738777@example.com
+SEQUENCE
+ :1
+STATUS
+ :CANCELLED
+DTSTAMP
+ :19970613T190000Z
+END:VEVENT
+END:VCALENDAR
+BEGIN:VCALENDAR
+PRODID
+ :-//ACME/DesktopCalendar//EN
+METHOD
+ :CANCEL
+VERSION
+ :2.0
+X-LIC-SENDER
+ :eric@busboom.org
+BEGIN:VEVENT
+ORGANIZER
+ :Mailto:A@example.com
+ATTENDEE
+ :mailto:B@example.com
+COMMENT
+ :You're off the hook for this meeting
+UID
+ :calsrv.example.com-873970198738777@example.com
+DTSTAMP
+ :19970613T193000Z
+SEQUENCE
+ :1
+END:VEVENT
+END:VCALENDAR
+BEGIN:VCALENDAR
+PRODID
+ :-//ACME/DesktopCalendar//EN
+METHOD
+ :REQUEST
+VERSION
+ :2.0
+X-LIC-SENDER
+ :eric@busboom.org
+BEGIN:VEVENT
+ORGANIZER
+ :Mailto:A@example.com
+ATTENDEE
+ ;ROLE=CHAIR
+ ;PARTSTAT=ACCEPTED
+ :Mailto:A@example.com
+ATTENDEE
+ :Mailto:C@example.com
+X-LIC-ERROR
+ ;X-LIC-ERRORTYPE=PARAMETER_PARSE_ERROR
+ :Can't parse parameter name: 'TYPE=INDIVIDUAL'
+ATTENDEE
+ :Mailto:D@example.com
+X-LIC-ERROR
+ ;X-LIC-ERRORTYPE=PARAMETER_PARSE_ERROR
+ :Can't parse parameter name: 'TYPE=INDIVIDUAL'
+ATTENDEE
+ :CR_Big@example.com
+X-LIC-ERROR
+ ;X-LIC-ERRORTYPE=PARAMETER_PARSE_ERROR
+ :Can't parse parameter name: 'TYPE=ROOM'
+ATTENDEE
+ ;ROLE=NON-PARTICIPANT
+ ;RSVP=FALSE
+ :Mailto:E@example.com
+DTSTAMP
+ :19970611T190000Z
+DTSTART
+ :19970701T200000Z
+DTEND
+ :19970701T203000Z
+SUMMARY
+ :Phone Conference
+UID
+ :calsrv.example.com-873970198738777@example.com
+SEQUENCE
+ :2
+STATUS
+ :CONFIRMED
+END:VEVENT
+END:VCALENDAR
+BEGIN:VCALENDAR
+PRODID
+ :-//ACME/DesktopCalendar//EN
+METHOD
+ :REQUEST
+VERSION
+ :2.0
+X-LIC-SENDER
+ :eric@busboom.org
+BEGIN:VEVENT
+ORGANIZER
+ :Mailto:B@example.com
+ATTENDEE
+ ;ROLE=CHAIR
+ :Mailto:B@example.com
+X-LIC-ERROR
+ ;X-LIC-ERRORTYPE=PARAMETER_PARSE_ERROR
+ :Can't parse parameter name: 'STATUS=ACCEPTED'
+ATTENDEE
+ :Mailto:C@example.com
+X-LIC-ERROR
+ ;X-LIC-ERRORTYPE=PARAMETER_PARSE_ERROR
+ :Can't parse parameter name: 'TYPE=INDIVIDUAL'
+ATTENDEE
+ :Mailto:D@example.com
+X-LIC-ERROR
+ ;X-LIC-ERRORTYPE=PARAMETER_PARSE_ERROR
+ :Can't parse parameter name: 'TYPE=INDIVIDUAL'
+DTSTAMP
+ :19970611T190000Z
+DTSTART
+ :19970701T200000Z
+DTEND
+ :19970701T203000Z
+X-LIC-ERROR
+ ;X-LIC-ERRORTYPE=VALUE_PARSE_ERROR
+ :Can't parse as RECUR value in RRULE property. Removing entire property:
+ 'FREQ=WEEKLY'
+SUMMARY
+ :Phone Conference
+UID
+ :123456@example.com
+SEQUENCE
+ :1
+STATUS
+ :CONFIRMED
+END:VEVENT
+END:VCALENDAR
+BEGIN:VCALENDAR
+PRODID
+ :-//ACME/DesktopCalendar//EN
+VERSION
+ :2.0
+METHOD
+ :PUBLISH
+X-LIC-SENDER
+ :eric@busboom.org
+BEGIN:VFREEBUSY
+DTSTAMP
+ :19980101T124100Z
+ORGANIZER
+ :MAILTO:A@Example.com
+DTSTART
+ :19980101T124200Z
+DTEND
+ :19980107T124200Z
+FREEBUSY
+ :19980101T180000Z/19980101T190000Z
+FREEBUSY
+ :19980103T020000Z/19980103T050000Z
+FREEBUSY
+ :19980107T020000Z/19980107T050000Z
+FREEBUSY
+ :19980113T000000Z/19980113T010000Z
+FREEBUSY
+ :19980115T190000Z/19980115T200000Z
+FREEBUSY
+ :19980115T220000Z/19980115T230000Z
+FREEBUSY
+ :19980116T013000Z/19980116T043000Z
+END:VFREEBUSY
+END:VCALENDAR
+BEGIN:VCALENDAR
+PRODID
+ :-//ACME/DesktopCalendar//EN
+METHOD
+ :REQUEST
+VERSION
+ :2.0
+X-LIC-SENDER
+ :eric@busboom.org
+BEGIN:VFREEBUSY
+ORGANIZER
+ :Mailto:A@example.com
+ATTENDEE
+ ;ROLE=CHAIR
+ :Mailto:A@example.com
+ATTENDEE
+ :Mailto:B@example.com
+ATTENDEE
+ :Mailto:C@example.com
+DTSTAMP
+ :19970613T190000Z
+DTSTART
+ :19970701T080000Z
+DTEND
+ :19970701T200000
+UID
+ :calsrv.example.com-873970198738777@example.com
+END:VFREEBUSY
+END:VCALENDAR
+BEGIN:VCALENDAR
+PRODID
+ :-//ACME/DesktopCalendar//EN
+METHOD
+ :REPLY
+VERSION
+ :2.0
+X-LIC-SENDER
+ :eric@busboom.org
+BEGIN:VFREEBUSY
+ORGANIZER
+ :MAILTO:A@example.com
+ATTENDEE
+ :Mailto:B@example.com
+DTSTART
+ :19970701T080000Z
+DTEND
+ :19970701T200000Z
+UID
+ :calsrv.example.com-873970198738777@example.com
+X-LIC-ERROR
+ ;X-LIC-ERRORTYPE=VALUE_PARSE_ERROR
+ :Can't parse as PERIOD value in FREEBUSY property. Removing entire
+ property: '19970701T090000Z/PT1H'
+DTSTAMP
+ :19970613T190030Z
+END:VFREEBUSY
+END:VCALENDAR
+BEGIN:VCALENDAR
+PRODID
+ :-//ACME/DesktopCalendar//EN
+METHOD
+ :REQUEST
+VERSION
+ :2.0
+X-LIC-SENDER
+ :eric@busboom.org
+BEGIN:VTIMEZONE
+TZID
+ :America-SanJose
+TZURL
+ :http://zones.stds_r_us.net/tz/America-SanJose
+BEGIN:STANDARD
+DTSTART
+ :19671029T020000
+X-LIC-ERROR
+ ;X-LIC-ERRORTYPE=VALUE_PARSE_ERROR
+ :Can't parse as RECUR value in RRULE property. Removing entire property:
+ 'FREQ=YEARLY\;BYDAY=-1SU\;BYMONTH=10'
+TZOFFSETFROM
+ :-070000
+TZOFFSETTO
+ :-080000
+TZNAME
+ :PST
+END:STANDARD
+BEGIN:DAYLIGHT
+DTSTART
+ :19870405T020000
+X-LIC-ERROR
+ ;X-LIC-ERRORTYPE=VALUE_PARSE_ERROR
+ :Can't parse as RECUR value in RRULE property. Removing entire property:
+ 'FREQ=YEARLY\;BYDAY=1SU\;BYMONTH=4'
+TZOFFSETFROM
+ :-080000
+TZOFFSETTO
+ :-070000
+TZNAME
+ :PDT
+END:DAYLIGHT
+END:VTIMEZONE
+BEGIN:VEVENT
+ORGANIZER
+ :Mailto:A@example.com
+ATTENDEE
+ ;ROLE=CHAIR
+ ;PARTSTAT=ACCEPTED
+ :A@example.COM
+X-LIC-ERROR
+ ;X-LIC-ERRORTYPE=PARAMETER_PARSE_ERROR
+ :Can't parse parameter name: 'TYPE=INDIVIDUAL'
+ATTENDEE
+ ;RSVP=TRUE
+ :B@example.fr
+X-LIC-ERROR
+ ;X-LIC-ERRORTYPE=PARAMETER_PARSE_ERROR
+ :Can't parse parameter name: 'TYPE=INDIVIDUAL'
+ATTENDEE
+ ;RSVP=TRUE
+ :c@example.jp
+X-LIC-ERROR
+ ;X-LIC-ERRORTYPE=PARAMETER_PARSE_ERROR
+ :Can't parse parameter name: 'TYPE=INDIVIDUAL'
+DTSTAMP
+ :19970613T190030Z
+DTSTART
+ ;TZID=America-SanJose
+ :19970701T140000
+DTEND
+ ;TZID=America-SanJose
+ :19970701T150000
+X-LIC-ERROR
+ ;X-LIC-ERRORTYPE=VALUE_PARSE_ERROR
+ :Can't parse as RECUR value in RRULE property. Removing entire property:
+ 'FREQ=WEEKLY\;INTERVAL=20\;WKST=SU\;BYDAY=TU'
+RDATE
+ ;TZID=America-SanJose
+ :19970910T140000
+EXDATE
+ ;TZID=America-SanJose
+ :19970909T140000
+EXDATE
+ ;TZID=America-SanJose
+ :19971028T140000
+SUMMARY
+ :Weekly Phone Conference
+UID
+ :calsrv.example.com-873970198738777@example.com
+SEQUENCE
+ :0
+STATUS
+ :CONFIRMED
+END:VEVENT
+END:VCALENDAR
+BEGIN:VCALENDAR
+METHOD
+ :REQUEST
+PRODID
+ :-//RDU Software//NONSGML HandCal//EN
+VERSION
+ :2.0
+X-LIC-SENDER
+ :eric@busboom.org
+BEGIN:VEVENT
+UID
+ :guid-1@host1.com
+SEQUENCE
+ :0
+X-LIC-ERROR
+ ;X-LIC-ERRORTYPE=VALUE_PARSE_ERROR
+ :Can't parse as RECUR value in RRULE property. Removing entire property:
+ 'FREQ=MONTHLY\;BYMONTHDAY=1\;UNTIL=19980901T210000Z'
+ORGANIZER
+ :Mailto:A@example.com
+ATTENDEE
+ ;ROLE=CHAIR
+ ;PARTSTAT=ACCEPTED
+ :Mailto:A@example.com
+ATTENDEE
+ :Mailto:B@example.com
+ATTENDEE
+ :Mailto:C@example.com
+ATTENDEE
+ :Mailto:D@example.com
+DESCRIPTION
+ :IETF-C&S Conference Call
+CLASS
+ :PUBLIC
+SUMMARY
+ :IETF Calendaring Working Group Meeting
+DTSTART
+ :19970601T210000Z
+DTEND
+ :19970601T220000Z
+LOCATION
+ :Conference Call
+DTSTAMP
+ :19970526T083000Z
+STATUS
+ :CONFIRMED
+END:VEVENT
+END:VCALENDAR
+BEGIN:VCALENDAR
+METHOD
+ :REQUEST
+PRODID
+ :-//RDU Software//NONSGML HandCal//EN
+VERSION
+ :2.0
+X-LIC-SENDER
+ :eric@busboom.org
+BEGIN:VEVENT
+UID
+ :guid-1@host1com
+RECURRENCE-ID
+ :19970701T210000Z
+SEQUENCE
+ :1
+ORGANIZER
+ :Mailto:A@example.com
+ATTENDEE
+ ;ROLE=CHAIR
+ ;PARTSTAT=ACCEPTED
+ :Mailto:A@example.com
+ATTENDEE
+ :Mailto:B@example.com
+ATTENDEE
+ :Mailto:C@example.com
+ATTENDEE
+ :Mailto:D@example.com
+DESCRIPTION
+ :IETF-C&S Conference Call
+CLASS
+ :PUBLIC
+SUMMARY
+ :IETF Calendaring Working Group Meeting
+DTSTART
+ :19970703T210000Z
+DTEND
+ :19970703T220000Z
+LOCATION
+ :Conference Call
+DTSTAMP
+ :19970626T093000Z
+STATUS
+ :CONFIRMED
+END:VEVENT
+END:VCALENDAR
+BEGIN:VCALENDAR
+METHOD
+ :CANCEL
+PRODID
+ :-//RDU Software//NONSGML HandCal//EN
+VERSION
+ :2.0
+X-LIC-SENDER
+ :eric@busboom.org
+BEGIN:VEVENT
+UID
+ :guid-1@host1.com
+ORGANIZER
+ :Mailto:A@example.com
+ATTENDEE
+ ;ROLE=CHAIR
+ ;PARTSTAT=ACCEPTED
+ :Mailto:A@example.com
+ATTENDEE
+ :Mailto:B@example.com
+ATTENDEE
+ :Mailto:C@example.com
+ATTENDEE
+ :Mailto:D@example.com
+RECURRENCE-ID
+ :19970801T210000Z
+SEQUENCE
+ :2
+STATUS
+ :CANCELLED
+DTSTAMP
+ :19970721T093000Z
+END:VEVENT
+END:VCALENDAR
+BEGIN:VCALENDAR
+METHOD
+ :CANCEL
+PRODID
+ :-//RDU Software//NONSGML HandCal//EN
+VERSION
+ :2.0
+X-LIC-SENDER
+ :eric@busboom.org
+BEGIN:VEVENT
+UID
+ :guid-1@host1.com
+ORGANIZER
+ :Mailto:A@example.com
+ATTENDEE
+ ;ROLE=CHAIR
+ ;PARTSTAT=ACCEPTED
+ :Mailto:A@example.com
+ATTENDEE
+ :Mailto:B@example.com
+ATTENDEE
+ :Mailto:C@example.com
+ATTENDEE
+ :Mailto:D@example.com
+DTSTAMP
+ :19970721T103000Z
+STATUS
+ :CANCELLED
+SEQUENCE
+ :3
+END:VEVENT
+END:VCALENDAR
+BEGIN:VCALENDAR
+METHOD
+ :REQUEST
+PRODID
+ :-//RDU Software//NONSGML HandCal//EN
+VERSION
+ :2.0
+X-LIC-SENDER
+ :eric@busboom.org
+BEGIN:VEVENT
+UID
+ :guid-1@host1.com
+RECURRENCE-ID
+ :19970901T210000Z
+X-LIC-ERROR
+ ;X-LIC-ERRORTYPE=PARAMETER_PARSE_ERROR
+ :Can't parse parameter name: 'THISANDFUTURE'
+SEQUENCE
+ :3
+ORGANIZER
+ :Mailto:A@example.com
+ATTENDEE
+ ;ROLE=CHAIR
+ ;PARTSTAT=ACCEPTED
+ :Mailto:A@example.com
+ATTENDEE
+ ;RSVP=TRUE
+ :Mailto:B@example.com
+ATTENDEE
+ ;RSVP=TRUE
+ :Mailto:C@example.com
+ATTENDEE
+ ;RSVP=TRUE
+ :Mailto:D@example.com
+DESCRIPTION
+ :IETF-C&S Discussion
+CLASS
+ :PUBLIC
+SUMMARY
+ :IETF Calendaring Working Group Meeting
+DTSTART
+ :19970901T210000Z
+DTEND
+ :19970901T220000Z
+LOCATION
+ :Building 32
+LOCATION
+ : Microsoft
+LOCATION
+ : Seattle
+LOCATION
+ : WA
+DTSTAMP
+ :19970526T083000Z
+STATUS
+ :CONFIRMED
+END:VEVENT
+END:VCALENDAR
+BEGIN:VCALENDAR
+METHOD
+ :ADD
+PRODID
+ :-//RDU Software//NONSGML HandCal//EN
+VERSION
+ :2.0
+X-LIC-SENDER
+ :eric@busboom.org
+BEGIN:VEVENT
+UID
+ :123456789@host1.com
+SEQUENCE
+ :4
+ORGANIZER
+ :Mailto:A@example.com
+ATTENDEE
+ ;ROLE=CHAIR
+ ;PARTSTAT=ACCEPTED
+ :Mailto:A@example.com
+ATTENDEE
+ ;RSVP=TRUE
+ :Mailto:B@example.com
+ATTENDEE
+ ;RSVP=TRUE
+ :Mailto:C@example.com
+ATTENDEE
+ ;RSVP=TRUE
+ :Mailto:D@example.com
+DESCRIPTION
+ :IETF-C&S Conference Call
+CLASS
+ :PUBLIC
+SUMMARY
+ :IETF Calendaring Working Group Meeting
+DTSTART
+ :19970715T210000Z
+DTEND
+ :19970715T220000Z
+LOCATION
+ :Conference Call
+DTSTAMP
+ :19970629T093000Z
+STATUS
+ :CONFIRMED
+END:VEVENT
+END:VCALENDAR
+BEGIN:VCALENDAR
+METHOD
+ :REQUEST
+PRODID
+ :-//RDU Software//NONSGML HandCal//EN
+VERSION
+ :2.0
+X-LIC-SENDER
+ :eric@busboom.org
+BEGIN:VEVENT
+UID
+ :123456789@host1.com
+SEQUENCE
+ :0
+X-LIC-ERROR
+ ;X-LIC-ERRORTYPE=VALUE_PARSE_ERROR
+ :Can't parse as RECUR value in RRULE property. Removing entire property:
+ 'WKST=SU\;BYDAY=TU\;FREQ=WEEKLY'
+ORGANIZER
+ :Mailto:A@example.com
+ATTENDEE
+ ;ROLE=CHAIR
+ ;PARTSTAT=ACCEPTED
+ :Mailto:A@example.com
+ATTENDEE
+ ;RSVP=TRUE
+ :Mailto:B@example.com
+SUMMARY
+ :Review Accounts
+DTSTART
+ :19980303T210000Z
+DTEND
+ :19980303T220000Z
+LOCATION
+ :The White Room
+DTSTAMP
+ :19980301T093000Z
+STATUS
+ :CONFIRMED
+END:VEVENT
+END:VCALENDAR
+BEGIN:VCALENDAR
+METHOD
+ :ADD
+PRODID
+ :-//RDU Software//NONSGML HandCal//EN
+VERSION
+ :2.0
+X-LIC-SENDER
+ :eric@busboom.org
+BEGIN:VEVENT
+UID
+ :123456789@host1.com
+SEQUENCE
+ :7
+X-LIC-ERROR
+ ;X-LIC-ERRORTYPE=VALUE_PARSE_ERROR
+ :Can't parse as RECUR value in RRULE property. Removing entire property:
+ 'WKST=SU\;BYDAY=TH\;FREQ=WEEKLY'
+ORGANIZER
+ :Mailto:A@example.com
+ATTENDEE
+ ;ROLE=CHAIR
+ ;PARTSTAT=ACCEPTED
+ :Mailto:A@example.com
+ATTENDEE
+ ;RSVP=TRUE
+ :Mailto:B@example.com
+SUMMARY
+ :Review Accounts
+DTSTART
+ :19980303T210000Z
+DTEND
+ :19980303T220000Z
+DTSTAMP
+ :19980303T193000Z
+LOCATION
+ :The Usual conference room
+STATUS
+ :CONFIRMED
+END:VEVENT
+END:VCALENDAR
+BEGIN:VCALENDAR
+METHOD
+ :REQUEST
+PRODID
+ :-//RDU Software//NONSGML HandCal//EN
+VERSION
+ :2.0
+X-LIC-SENDER
+ :eric@busboom.org
+BEGIN:VEVENT
+UID
+ :123456789@host1.com
+SEQUENCE
+ :7
+X-LIC-ERROR
+ ;X-LIC-ERRORTYPE=VALUE_PARSE_ERROR
+ :Can't parse as RECUR value in RRULE property. Removing entire property:
+ 'WKST=SU\;BYDAY=TU'
+ORGANIZER
+ :Mailto:A@example.com
+ATTENDEE
+ ;ROLE=CHAIR
+ ;PARTSTAT=ACCEPTED
+ :Mailto:A@example.com
+ATTENDEE
+ ;RSVP=TRUE
+ :Mailto:B@example.com
+SUMMARY
+ :Review Accounts
+DTSTART
+ :19980303T210000Z
+DTEND
+ :19980303T220000Z
+DTSTAMP
+ :19980303T193000Z
+LOCATION
+ :The White Room
+STATUS
+ :CONFIRMED
+END:VEVENT
+END:VCALENDAR
+BEGIN:VCALENDAR
+METHOD
+ :REQUEST
+PRODID
+ :-//RDU Software//NONSGML HandCal//EN
+VERSION
+ :2.0
+X-LIC-SENDER
+ :eric@busboom.org
+BEGIN:VEVENT
+UID
+ :123456789@host1.com
+SEQUENCE
+ :0
+RDATE
+ :19980304T180000Z
+RDATE
+ :19980311T180000Z
+RDATE
+ :19980318T180000Z
+ORGANIZER
+ :Mailto:A@example.com
+ATTENDEE
+ ;ROLE=CHAIR
+ ;PARTSTAT=ACCEPTED
+ :Mailto:A@example.com
+ATTENDEE
+ ;RSVP=TRUE
+ :Mailto:B@example.com
+SUMMARY
+ :Review Accounts
+DTSTART
+ :19980304T180000Z
+DTEND
+ :19980304T200000Z
+DTSTAMP
+ :19980303T193000Z
+LOCATION
+ :Conference Room A
+STATUS
+ :CONFIRMED
+END:VEVENT
+END:VCALENDAR
+BEGIN:VCALENDAR
+METHOD
+ :REQUEST
+PRODID
+ :-//RDU Software//NONSGML HandCal//EN
+VERSION
+ :2.0
+X-LIC-SENDER
+ :eric@busboom.org
+BEGIN:VEVENT
+UID
+ :123456789@host1.com
+SEQUENCE
+ :1
+RECURRENCE-ID
+ :19980311T180000Z
+ORGANIZER
+ :Mailto:A@example.com
+ATTENDEE
+ ;ROLE=CHAIR
+ ;PARTSTAT=ACCEPTED
+ :Mailto:A@example.com
+ATTENDEE
+ ;RSVP=TRUE
+ :Mailto:B@example.com
+SUMMARY
+ :Review Accounts
+DTSTART
+ :19980311T160000Z
+DTEND
+ :19980311T180000Z
+DTSTAMP
+ :19980306T193000Z
+LOCATION
+ :The Small conference room
+STATUS
+ :CONFIRMED
+END:VEVENT
+END:VCALENDAR
+BEGIN:VCALENDAR
+METHOD
+ :ADD
+PRODID
+ :-//RDU Software//NONSGML HandCal//EN
+VERSION
+ :2.0
+X-LIC-SENDER
+ :eric@busboom.org
+BEGIN:VEVENT
+UID
+ :123456789@host1.com
+SEQUENCE
+ :2
+ORGANIZER
+ :Mailto:A@example.com
+ATTENDEE
+ ;ROLE=CHAIR
+ ;PARTSTAT=ACCEPTED
+ :Mailto:A@example.com
+ATTENDEE
+ ;RSVP=TRUE
+ :Mailto:B@example.com
+SUMMARY
+ :Review Accounts
+DTSTART
+ :19980315T180000Z
+DTEND
+ :19980315T200000Z
+DTSTAMP
+ :19980307T193000Z
+LOCATION
+ :Conference Room A
+STATUS
+ :CONFIRMED
+END:VEVENT
+END:VCALENDAR
+BEGIN:VCALENDAR
+METHOD
+ :REQUEST
+PRODID
+ :-//RDU Software//NONSGML HandCal//EN
+VERSION
+ :2.0
+X-LIC-SENDER
+ :eric@busboom.org
+BEGIN:VEVENT
+UID
+ :123456789@host1.com
+SEQUENCE
+ :2
+RDATE
+ :19980304T180000Z
+RDATE
+ :19980311T160000Z
+RDATE
+ :19980315T180000Z
+X-LIC-ERROR
+ ;X-LIC-ERRORTYPE=COMPONENT_PARSE_ERROR
+ :Got a data line\, but could not find a property name or component
+ begin tag: 'Error! Bookmark not defined.'
+ORGANIZER
+ :Mailto:A@example.com
+ATTENDEE
+ ;ROLE=CHAIR
+ ;PARTSTAT=ACCEPTED
+ :Mailto:A@example.com
+ATTENDEE
+ ;RSVP=TRUE
+ :Mailto:B@example.com
+SUMMARY
+ :Review Accounts
+DTSTART
+ :19980304T180000Z
+DTEND
+ :19980304T200000Z
+DTSTAMP
+ :19980303T193000Z
+LOCATION
+ :Conference Room A
+STATUS
+ :CONFIRMED
+END:VEVENT
+BEGIN:VEVENT
+X-LIC-ERROR
+ ;X-LIC-ERRORTYPE=COMPONENT_PARSE_ERROR
+ :Got a data line\, but could not find a property name or component
+ begin tag: 'Error! Bookmark not defined.'
+SEQUENCE
+ :2
+RECURRENCE-ID
+ :19980311T160000Z
+X-LIC-ERROR
+ ;X-LIC-ERRORTYPE=COMPONENT_PARSE_ERROR
+ :Got a data line\, but could not find a property name or component
+ begin tag: 'Error! Bookmark not defined.'
+ATTENDEE
+ :ROLE=CHAIR;Error! Bookmark not defined.
+ATTENDEE
+ :Error! Bookmark not defined.
+SUMMARY
+ :Review Accounts
+DTSTART
+ :19980311T160000Z
+DTEND
+ :19980304T180000Z
+DTSTAMP
+ :19980306T193000Z
+LOCATION
+ :The Small conference room
+STATUS
+ :CONFIRMED
+END:VEVENT
+END:VCALENDAR
+BEGIN:VCALENDAR
+METHOD
+ :COUNTER
+PRODID
+ :-//RDU Software//NONSGML HandCal//EN
+VERSION
+ :2.0
+X-LIC-SENDER
+ :eric@busboom.org
+BEGIN:VEVENT
+UID
+ :guid-1@host1.com
+RECURRENCE-ID
+ :19970715T210000Z
+SEQUENCE
+ :4
+ORGANIZER
+ :Mailto:A@example.com
+ATTENDEE
+ ;ROLE=CHAIR
+ ;RSVP=TRUE
+ :Mailto:A@example.com
+ATTENDEE
+ ;RSVP=TRUE
+ :Mailto:B@example.com
+ATTENDEE
+ ;RSVP=TRUE
+ :Mailto:C@example.com
+ATTENDEE
+ ;RSVP=TRUE
+ :Mailto:D@example.com
+DESCRIPTION
+ :IETF-C&S Conference Call
+CLASS
+ :PUBLIC
+SUMMARY
+ :IETF Calendaring Working Group Meeting
+DTSTART
+ :19970715T220000Z
+DTEND
+ :19970715T230000Z
+LOCATION
+ :Conference Call
+COMMENT
+ :May we bump this by an hour? I have a conflict
+DTSTAMP
+ :19970629T094000Z
+END:VEVENT
+END:VCALENDAR
+BEGIN:VCALENDAR
+METHOD
+ :REQUEST
+PRODID
+ :-//RDU Software//NONSGML HandCal//EN
+VERSION
+ :2.0
+X-LIC-SENDER
+ :eric@busboom.org
+BEGIN:VEVENT
+UID
+ :guid-1@host1.com
+SEQUENCE
+ :0
+X-LIC-ERROR
+ ;X-LIC-ERRORTYPE=VALUE_PARSE_ERROR
+ :Can't parse as RECUR value in RRULE property. Removing entire property:
+ 'FREQ=MONTHLY\;BYMONTHDAY=1'
+ORGANIZER
+ :Mailto:A@example.com
+ATTENDEE
+ ;ROLE=CHAIR
+ :Mailto:A@example.com
+ATTENDEE
+ ;RSVP=TRUE
+ :Mailto:B@example.com
+ATTENDEE
+ ;RSVP=TRUE
+ :Mailto:C@example.com
+ATTENDEE
+ ;RSVP=TRUE
+ :Mailto:D@example.com
+DESCRIPTION
+ :IETF-C&S Conference Call
+CLASS
+ :PUBLIC
+SUMMARY
+ :IETF Calendaring Working Group Meeting
+DTSTART
+ :19970601T210000Z
+DTEND
+ :19970601T220000Z
+DTSTAMP
+ :19970602T094000Z
+LOCATION
+ :Conference Call
+STATUS
+ :CONFIRMED
+X-LIC-ERROR
+ ;X-LIC-ERRORTYPE=PROPERTY_PARSE_ERROR
+ :Parse error in property name: 'FOO'
+END:VEVENT
+END:VCALENDAR
+BEGIN:VCALENDAR
+PRODID
+ :-//RDU Software//NONSGML HandCal//EN
+METHOD
+ :REPLY
+VERSION
+ :2.0
+X-LIC-SENDER
+ :eric@busboom.org
+BEGIN:VEVENT
+ORGANIZER
+ :Mailto:A@example.com
+ATTENDEE
+ :Mailto:B@example.com
+REQUEST-STATUS
+ :2.8\;Repeating event ignored. Scheduled as a single event\;RRULE
+REQUEST-STATUS
+ :3.0\;Invalid Property Name\;FOO
+UID
+ :guid-1@host1.com
+SEQUENCE
+ :0
+DTSTAMP
+ :19970603T094000Z
+END:VEVENT
+END:VCALENDAR
+BEGIN:VCALENDAR
+PRODID
+ :-//ACME/DesktopCalendar//EN
+METHOD
+ :REQUEST
+VERSION
+ :2.0
+X-LIC-SENDER
+ :eric@busboom.org
+BEGIN:VTODO
+ORGANIZER
+ :Mailto:A@example.com
+ATTENDEE
+ ;ROLE=CHAIR
+ :Mailto:A@example.com
+ATTENDEE
+ ;RSVP=TRUE
+ :Mailto:B@example.com
+ATTENDEE
+ ;RSVP=TRUE
+ :Mailto:C@example.com
+ATTENDEE
+ ;RSVP=TRUE
+ :Mailto:D@example.com
+DTSTART
+ :19970701T170000Z
+DUE
+ :19970722T170000Z
+PRIORITY
+ :1
+SUMMARY
+ :Create the requirements document
+UID
+ :calsrv.example.com-873970198738777-00@example.com
+SEQUENCE
+ :0
+DTSTAMP
+ :19970717T200000Z
+STATUS
+ :Needs Action
+END:VTODO
+END:VCALENDAR
+BEGIN:VCALENDAR
+PRODID
+ :-//ACME/DesktopCalendar//EN
+METHOD
+ :REPLY
+VERSION
+ :2.0
+X-LIC-SENDER
+ :eric@busboom.org
+BEGIN:VTODO
+ORGANIZER
+ :Mailto:A@example.com
+ATTENDEE
+ ;PARTSTAT=ACCEPTED
+ :Mailto:B@example.com
+UID
+ :calsrv.example.com-873970198738777-00@example.com
+COMMENT
+ :I'll send you my input by e-mail
+SEQUENCE
+ :0
+DTSTAMP
+ :19970717T203000Z
+REQUEST-STATUS
+ :2.0\;Success
+END:VTODO
+END:VCALENDAR
+BEGIN:VCALENDAR
+PRODID
+ :-//ACME/DesktopCalendar//EN
+METHOD
+ :REQUEST
+VERSION
+ :2.0
+X-LIC-SENDER
+ :eric@busboom.org
+BEGIN:VTODO
+ORGANIZER
+ :Mailto:A@example.com
+ATTENDEE
+ ;ROLE=CHAIR
+ :Mailto:A@example.com
+ATTENDEE
+ ;RSVP=TRUE
+ :Mailto:B@example.com
+X-LIC-ERROR
+ ;X-LIC-ERRORTYPE=PARAMETER_PARSE_ERROR
+ :Can't parse parameter name: 'TYPE=INDIVIDUAL'
+ATTENDEE
+ ;RSVP=TRUE
+ :Mailto:D@example.com
+X-LIC-ERROR
+ ;X-LIC-ERRORTYPE=PARAMETER_PARSE_ERROR
+ :Can't parse parameter name: 'TYPE=INDIVIDUAL'
+UID
+ :calsrv.example.com-873970198738777-00@example.com
+SUMMARY
+ :Create the requirements document
+PRIORITY
+ :1
+SEQUENCE
+ :0
+STATUS
+ :IN-PROCESS
+DTSTART
+ :19970701T170000Z
+DTSTAMP
+ :19970717T230000Z
+END:VTODO
+END:VCALENDAR
+BEGIN:VCALENDAR
+PRODID
+ :-//ACME/DesktopCalendar//EN
+METHOD
+ :REPLY
+VERSION
+ :2.0
+X-LIC-SENDER
+ :eric@busboom.org
+BEGIN:VTODO
+ORGANIZER
+ :MAILTO:A@example.com
+ATTENDEE
+ ;PARTSTAT=IN-PROCESS
+ :Mailto:B@example.com
+PERCENT-COMPLETE
+ :75
+UID
+ :calsrv.example.com-873970198738777-00@example.com
+DTSTAMP
+ :19970717T233000Z
+SEQUENCE
+ :0
+END:VTODO
+END:VCALENDAR
+BEGIN:VCALENDAR
+PRODID
+ :-//ACME/DesktopCalendar//EN
+METHOD
+ :REPLY
+VERSION
+ :2.0
+X-LIC-SENDER
+ :eric@busboom.org
+BEGIN:VTODO
+ORGANIZER
+ :MAILTO:A@example.com
+ATTENDEE
+ ;PARTSTAT=COMPLETED
+ :Mailto:D@example.com
+UID
+ :calsrv.example.com-873970198738777-00@example.com
+DTSTAMP
+ :19970717T233000Z
+SEQUENCE
+ :0
+END:VTODO
+END:VCALENDAR
+BEGIN:VCALENDAR
+PRODID
+ :-//ACME/DesktopCalendar//EN
+METHOD
+ :REQUEST
+VERSION
+ :2.0
+X-LIC-SENDER
+ :eric@busboom.org
+BEGIN:VTODO
+ORGANIZER
+ :Mailto:A@example.com
+ATTENDEE
+ ;ROLE=CHAIR
+ ;PARTSTAT=ACCEPTED
+ :Mailto:A@example.com
+ATTENDEE
+ ;PARTSTAT=ACCEPTED
+ :Mailto:B@example.com
+X-LIC-ERROR
+ ;X-LIC-ERRORTYPE=PARAMETER_PARSE_ERROR
+ :Can't parse parameter name: 'TYPE=INDIVIDUAL'
+ATTENDEE
+ ;PARTSTAT=IN-PROCESS
+ :Mailto:D@example.com
+X-LIC-ERROR
+ ;X-LIC-ERRORTYPE=PARAMETER_PARSE_ERROR
+ :Can't parse parameter name: 'TYPE=INDIVIDUAL'
+DTSTART
+ :19970701T170000Z
+DUE
+ :19970722T170000Z
+PRIORITY
+ :1
+SUMMARY
+ :Create the requirements document
+UID
+ :calsrv.example.com-873970198738777-00@example.com
+SEQUENCE
+ :1
+DTSTAMP
+ :19970718T100000Z
+STATUS
+ :IN-PROGRESS
+PERCENT-COMPLETE
+ :40
+END:VTODO
+END:VCALENDAR
+BEGIN:VCALENDAR
+PRODID
+ :-//ACME/DesktopCalendar//EN
+METHOD
+ :REQUEST
+VERSION
+ :2.0
+X-LIC-SENDER
+ :eric@busboom.org
+BEGIN:VTODO
+ORGANIZER
+ :Mailto:A@example.com
+ATTENDEE
+ ;ROLE=CHAIR
+ :Mailto:A@example.com
+ATTENDEE
+ ;RSVP=TRUE
+ :Mailto:B@example.com
+X-LIC-ERROR
+ ;X-LIC-ERRORTYPE=PARAMETER_PARSE_ERROR
+ :Can't parse parameter name: 'TYPE=INDIVIDUAL'
+ATTENDEE
+ ;RSVP=TRUE
+ :Mailto:D@example.com
+X-LIC-ERROR
+ ;X-LIC-ERRORTYPE=PARAMETER_PARSE_ERROR
+ :Can't parse parameter name: 'TYPE=INDIVIDUAL'
+X-LIC-ERROR
+ ;X-LIC-ERRORTYPE=VALUE_PARSE_ERROR
+ :Can't parse as RECUR value in RRULE property. Removing entire property:
+ 'FREQ=MONTHLY\;COUNT=10\;BYDAY=1FR'
+X-LIC-ERROR
+ ;X-LIC-ERRORTYPE=VALUE_PARSE_ERROR
+ :Can't parse as DATE-TIME value in DTSTART property. Removing entire
+ property: '19980101T100000-0700'
+X-LIC-ERROR
+ ;X-LIC-ERRORTYPE=VALUE_PARSE_ERROR
+ :Can't parse as DATE-TIME value in DUE property. Removing entire property:
+ '19980103T100000-0700'
+SUMMARY
+ :Send Status Reports to Area Managers
+UID
+ :calsrv.example.com-873970198738777-00@example.com
+SEQUENCE
+ :0
+DTSTAMP
+ :19970717T200000Z
+STATUS
+ :NEEDS ACTION
+PRIORITY
+ :1
+END:VTODO
+END:VCALENDAR
+BEGIN:VCALENDAR
+PRODID
+ :-//ACME/DesktopCalendar//EN
+METHOD
+ :REPLY
+VERSION
+ :2.0
+X-LIC-SENDER
+ :eric@busboom.org
+BEGIN:VTODO
+ATTENDEE
+ ;PARTSTAT=IN-PROCESS
+ :Mailto:B@example.com
+PERCENT-COMPLETE
+ :75
+UID
+ :calsrv.example.com-873970198738777-00@example.com
+DTSTAMP
+ :19970717T233000Z
+RECURRENCE-ID
+ :19980101T170000Z
+SEQUENCE
+ :1
+END:VTODO
+END:VCALENDAR
+BEGIN:VCALENDAR
+METHOD
+ :PUBLISH
+PRODID
+ :-//ACME/DesktopCalendar//EN
+VERSION
+ :2.0
+X-LIC-SENDER
+ :eric@busboom.org
+BEGIN:VJOURNAL
+DTSTART
+ :19971002T200000Z
+ORGANIZER
+ :MAILTO:A@Example.com
+SUMMARY
+ :Phone conference minutes
+DESCRIPTION
+ :The editors meeting was held on October 1
+DESCRIPTION
+ : 1997. Details are in the attached document.
+UID
+ :0981234-1234234-2410@example.com
+RELATED-TO
+ :0981234-1234234-2402-35@example.com
+ATTACH
+ :ftp://ftp.example.com/pub/ed/minutes100197.txt
+END:VJOURNAL
+END:VCALENDAR
+BEGIN:VCALENDAR
+PRODID
+ :-//RDU Software//NONSGML HandCal//EN
+METHOD
+ :REFRESH
+VERSION
+ :2.0
+X-LIC-SENDER
+ :eric@busboom.org
+BEGIN:VEVENT
+ORGANIZER
+ :Mailto:A@example.com
+ATTENDEE
+ ;ROLE=CHAIR
+ ;PARTSTAT=ACCEPTED
+ :Mailto:A@example.com
+ATTENDEE
+ :Mailto:B@example.com
+ATTENDEE
+ :Mailto:C@example.com
+ATTENDEE
+ :Mailto:D@example.com
+UID
+ : guid-1-12345@host1.com
+DTSTAMP
+ :19970603T094000
+END:VEVENT
+END:VCALENDAR
+BEGIN:VCALENDAR
+METHOD
+ :REQUEST
+PRODID
+ :-//RDU Software//NONSGML HandCal//EN
+VERSION
+ :2.0
+X-LIC-SENDER
+ :eric@busboom.org
+BEGIN:VEVENT
+UID
+ :acme-12345@host1.com
+SEQUENCE
+ :3
+X-LIC-ERROR
+ ;X-LIC-ERRORTYPE=VALUE_PARSE_ERROR
+ :Can't parse as RECUR value in RRULE property. Removing entire property:
+ 'FREQ=WEEKLY'
+RDATE
+ ;VALUE=PERIOD
+ :19970819T210000Z/19970081T220000Z
+ORGANIZER
+ :Mailto:A@example.com
+ATTENDEE
+ ;ROLE=CHAIR
+ ;PARTSTAT=ACCEPTED
+ :Mailto:A@example.com
+ATTENDEE
+ :Mailto:B@example.com
+DESCRIPTION
+ :IETF-C&S Conference Call
+SUMMARY
+ :IETF Calendaring Working Group Meeting
+DTSTART
+ :19970801T210000Z
+DTEND
+ :19970801T220000Z
+RECURRENCE-ID
+ :19970809T210000Z
+DTSTAMP
+ :19970726T083000
+STATUS
+ :CONFIRMED
+END:VEVENT
+END:VCALENDAR
+BEGIN:VCALENDAR
+PRODID
+ :-//RDU Software//NONSGML HandCal//EN
+METHOD
+ :REFRESH
+VERSION
+ :2.0
+X-LIC-SENDER
+ :eric@busboom.org
+BEGIN:VEVENT
+ORGANIZER
+ :Mailto:A@example.com
+ATTENDEE
+ :Mailto:B@example.com
+UID
+ :acme-12345@host1.com
+DTSTAMP
+ :19970603T094000
+END:VEVENT
+END:VCALENDAR
+END:VCALENDAR
diff --git a/libical/src/test/copycluster b/libical/src/test/copycluster
new file mode 100755
index 0000000000..ced0a0157e
--- /dev/null
+++ b/libical/src/test/copycluster
Binary files differ
diff --git a/libical/src/test/copycluster.c b/libical/src/test/copycluster.c
new file mode 100644
index 0000000000..b059130c13
--- /dev/null
+++ b/libical/src/test/copycluster.c
@@ -0,0 +1,113 @@
+/* -*- Mode: C -*-
+ ======================================================================
+ FILE: copycluster.c
+ CREATOR: eric 15 January 2000
+
+ $Id$
+ $Locker$
+
+ (C) COPYRIGHT 2000 Eric Busboom
+ http://www.softwarestudio.org
+
+ The contents of this file are subject to the Mozilla Public License
+ Version 1.0 (the "License"); you may not use this file except in
+ compliance with the License. You may obtain a copy of the License at
+ http://www.mozilla.org/MPL/
+
+ Software distributed under the License is distributed on an "AS IS"
+ basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
+ the License for the specific language governing rights and
+ limitations under the License.
+
+ The Original Code is eric. The Initial Developer of the Original
+ Code is Eric Busboom
+
+
+ ======================================================================*/
+
+#include <stdio.h> /* for printf */
+#include "ical.h"
+#include "icalcluster.h"
+#include <errno.h>
+#include <string.h> /* For strerror */
+#include "icalrestriction.h"
+
+/* This program copies a file that holds iCal components to an other file. */
+
+
+void usage(char* arg0) {
+ printf("usage: %s cluster-file1 cluster-file2\n",arg0);
+}
+
+int main(int c, char *argv[]){
+
+ icalcluster *clusterin, *clusterout;
+ icalcomponent *itr;
+ int count=0;
+ int tostdout = 0;
+
+ if(c < 2 || c > 3){
+ usage(argv[0]);
+ exit(1);
+ }
+
+ if (c == 2){
+ tostdout = 1;
+ }
+
+ clusterin = icalcluster_new(argv[1]);
+
+ if (clusterin == 0){
+ printf("Could not open input cluster \"%s\"",argv[1]);
+
+ exit(1);
+ }
+
+ if (!tostdout){
+ clusterout = icalcluster_new(argv[2]);
+ if (clusterout == 0){
+ printf("Could not open output cluster \"%s\"\n",argv[2]);
+ exit(1);
+ }
+ }
+
+
+ for (itr = icalcluster_get_first_component(clusterin,
+ ICAL_ANY_COMPONENT);
+ itr != 0;
+ itr = icalcluster_get_next_component(clusterin,
+ ICAL_ANY_COMPONENT)){
+
+ icalrestriction_check(itr);
+
+ if (itr != 0){
+
+ if(tostdout){
+
+ printf("--------------\n%s\n",icalcomponent_as_ical_string(itr));
+ } else {
+
+ icalcluster_add_component(clusterout,
+ icalcomponent_new_clone(itr));
+ }
+
+ count++;
+
+ } else {
+ printf("Got NULL component");
+ }
+ }
+
+
+ printf("Transfered %d components\n",count);
+
+ icalcluster_free(clusterin);
+
+ if (!tostdout){
+ icalcluster_mark(clusterout);
+ icalcluster_free(clusterout);
+ }
+
+ return 0;
+}
+
diff --git a/libical/src/test/findobj b/libical/src/test/findobj
new file mode 100755
index 0000000000..ff7058a7b3
--- /dev/null
+++ b/libical/src/test/findobj
Binary files differ
diff --git a/libical/src/test/findobj.c b/libical/src/test/findobj.c
new file mode 100644
index 0000000000..e7ec59169a
--- /dev/null
+++ b/libical/src/test/findobj.c
@@ -0,0 +1,71 @@
+/* -*- Mode: C -*-
+ ======================================================================
+ FILE: findobj.c
+ CREATOR: eric 11 February 2000
+
+ $Id$
+ $Locker$
+
+ (C) COPYRIGHT 2000 Eric Busboom
+ http://www.softwarestudio.org
+
+ The contents of this file are subject to the Mozilla Public License
+ Version 1.0 (the "License"); you may not use this file except in
+ compliance with the License. You may obtain a copy of the License at
+ http://www.mozilla.org/MPL/
+
+ Software distributed under the License is distributed on an "AS IS"
+ basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
+ the License for the specific language governing rights and
+ limitations under the License.
+
+ The Original Code is eric. The Initial Developer of the Original
+ Code is Eric Busboom
+
+
+ ======================================================================*/
+
+#include <stdio.h> /* for printf */
+#include "ical.h"
+#include "icalcalendar.h"
+#include <errno.h>
+#include <string.h> /* For strerror */
+#include "icalrestriction.h"
+
+/* This program finds an object stored in a calendar */
+
+void usage(char* arg0) {
+ printf("usage: %s calendar-dir uid\n",arg0);
+}
+
+int main(int c, char *argv[]){
+
+ icalcalendar *cal;
+ icalstore *booked;
+ icalcomponent *itr;
+
+ if(c < 2 || c > 3){
+ usage(argv[0]);
+ exit(1);
+ }
+
+ cal = icalcalendar_new(argv[1]);
+
+ if(cal == 0){
+ fprintf(stderr,"%s: error in opening calendar \"%s\": %s. errno is \"%s\"\n",
+ argv[0],argv[1],icalerror_strerror(icalerrno),
+ strerror(errno));
+ }
+
+ booked = icalcalendar_get_booked(cal);
+
+ itr = icalstore_fetch(booked,argv[2]);
+
+
+ if(itr != 0){
+ printf("%s",icalcomponent_as_ical_string(itr));
+ }
+
+ return 0;
+}
+
diff --git a/libical/src/test/icalparser b/libical/src/test/icalparser
new file mode 100755
index 0000000000..25d75af1b1
--- /dev/null
+++ b/libical/src/test/icalparser
Binary files differ
diff --git a/libical/src/test/icaltestparser.c b/libical/src/test/icaltestparser.c
new file mode 100644
index 0000000000..d56af49258
--- /dev/null
+++ b/libical/src/test/icaltestparser.c
@@ -0,0 +1,110 @@
+/* -*- Mode: C -*-
+ ======================================================================
+ FILE: icaltestparser.c
+ CREATOR: eric 20 June 1999
+
+ $Id$
+ $Locker$
+
+ The contents of this file are subject to the Mozilla Public License
+ Version 1.0 (the "License"); you may not use this file except in
+ compliance with the License. You may obtain a copy of the License at
+ http://www.mozilla.org/MPL/
+
+ Software distributed under the License is distributed on an "AS IS"
+ basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
+ the License for the specific language governing rights and
+ limitations under the License.
+
+ The original author is Eric Busboom
+ The original code is icaltestparser.c
+
+
+ (C) COPYRIGHT 1999 The Software Studio.
+ http://www.softwarestudio.org
+
+ ======================================================================*/
+
+#include <stdio.h>
+#include <errno.h>
+#include <stdio.h>
+#include <string.h>
+#include "ical.h"
+
+#include <stdlib.h>
+
+char str[] = "BEGIN:VCALENDAR
+PRODID:\"-//RDU Software//NONSGML HandCal//EN\"
+VERSION:2.0
+BEGIN:VTIMEZONE
+TZID:US-Eastern
+BEGIN:STANDARD
+DTSTART:19990404T020000
+RDATE:19990u404xT020000
+TZOFFSETFROM:-0500
+TZOFFSETTO:-0400
+END:STANDARD
+BEGIN:DAYLIGHT
+DTSTART:19990404T020000
+RDATE:19990404T020000
+TZOFFSETFROM:-0500
+TZOFFSETTO:-0400
+TZNAME:EDT
+Dkjhgri:derhvnv;
+BEGIN:dfkjh
+END:dfdfkjh
+END:DAYLIGHT
+END:VTIMEZONE
+BEGIN:VEVENT
+GEO:Bongo
+DTSTAMP:19980309T231000Z
+UID:guid-1.host1.com
+ORGANIZER;ROLE=CHAIR:MAILTO:mrbig@host.com
+ATTENDEE;RSVP=TRUE;ROLE=REQ-PARTICIPANT;CUTYPE=GROUP
+ :MAILTO:employee-A@host.com
+DESCRIPTION:Project XYZ Review Meeting
+CATEGORIES:MEETING
+CLASS:PUBLIC
+CREATED:19980309T130000Z
+SUMMARY:XYZ Project Review
+DTSTART;TZID=US-Eastern:19980312T083000
+DTEND;TZID=US-Eastern:19980312T093000
+LOCATION:1CP Conference Room 4350
+END:VEVENT
+END:VCALENDAR
+";
+
+extern int yydebug;
+
+/* Have the parser fetch data from stdin */
+
+char* read_stdin(char *s, size_t size, void *d)
+{
+ char *c = fgets(s,size, stdin);
+
+ return c;
+
+}
+
+int main()
+{
+
+ /* This is how we would have the parser parse a string */
+ /* icalcomponent *c = icalparser_parse_string(str);*/
+
+ icalcomponent *c = icalparser_parse(read_stdin);
+
+ printf("%s\n",icalcomponent_as_ical_string(c));
+
+ /* Strip errors and spit it out again
+ printf("\n%d Errors in Component\n",icalcomponent_count_errors(c));
+ icalcomponent_strip_errors(c);
+ printf("%s\n",icalcomponent_as_ical_string(c));
+ */
+
+ icalmemory_free_ring();
+ icalcomponent_free(c);
+
+ return 1;
+}
+
diff --git a/libical/src/test/regression b/libical/src/test/regression
new file mode 100755
index 0000000000..181f28b5ab
--- /dev/null
+++ b/libical/src/test/regression
Binary files differ
diff --git a/libical/src/test/regression.c b/libical/src/test/regression.c
new file mode 100644
index 0000000000..822de6b22c
--- /dev/null
+++ b/libical/src/test/regression.c
@@ -0,0 +1,1314 @@
+/* -*- Mode: C -*-
+ ======================================================================
+ FILE: usecases.c
+ CREATOR: eric 03 April 1999
+
+ DESCRIPTION:
+
+ $Id$
+ $Locker$
+
+ (C) COPYRIGHT 1999 Eric Busboom
+ http://www.softwarestudio.org
+
+ The contents of this file are subject to the Mozilla Public License
+ Version 1.0 (the "License"); you may not use this file except in
+ compliance with the License. You may obtain a copy of the License at
+ http://www.mozilla.org/MPL/
+
+ Software distributed under the License is distributed on an "AS IS"
+ basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
+ the License for the specific language governing rights and
+ limitations under the License.
+
+ The original author is Eric Busboom
+ The original code is usecases.c
+
+
+ ======================================================================*/
+
+#include "ical.h"
+#include <assert.h>
+#include <string.h> /* for strdup */
+#include <stdlib.h> /* for malloc */
+#include <stdio.h> /* for printf */
+#include <time.h> /* for time() */
+#include "icalmemory.h"
+#include "icalstore.h"
+#include "icalcluster.h"
+#include "icalerror.h"
+#include "icalrestriction.h"
+#include "icalcalendar.h"
+
+/* This example creates and minipulates the ical object that appears
+ * in rfc 2445, page 137 */
+
+/*
+ BEGIN:VCALENDAR
+ PRODID:-//RDU Software//NONSGML HandCal//EN
+ VERSION:2.0
+ BEGIN:VTIMEZONE
+ TZID:US-Eastern
+ BEGIN:STANDARD
+ DTSTART:19981025T020000
+ RDATE:19981025T020000
+ TZOFFSETFROM:-0400
+ TZOFFSETTO:-0500
+ TZNAME:EST
+ END:STANDARD
+ BEGIN:DAYLIGHT
+ DTSTART:19990404T020000
+ RDATE:19990404T020000
+ TZOFFSETFROM:-0500
+ TZOFFSETTO:-0400
+ TZNAME:EDT
+ END:DAYLIGHT
+ END:VTIMEZONE
+ BEGIN:VEVENT
+ DTSTAMP:19980309T231000Z
+ UID:guid-1.host1.com
+ ORGANIZER;ROLE=CHAIR:MAILTO:mrbig@host.com
+ ATTENDEE;RSVP=TRUE;ROLE=REQ-PARTICIPANT;CUTYPE=GROUP:
+ MAILTO:employee-A@host.com
+ DESCRIPTION:Project XYZ Review Meeting
+ CATEGORIES:MEETING
+ CLASS:PUBLIC
+ CREATED:19980309T130000Z
+ SUMMARY:XYZ Project Review
+ DTSTART;TZID=US-Eastern:19980312T083000
+ DTEND;TZID=US-Eastern:19980312T093000
+ LOCATION:1CP Conference Room 4350
+ END:VEVENT
+ END:VCALENDAR
+
+*/
+char str[] = "BEGIN:VCALENDAR
+PRODID:\"-//RDU Software//NONSGML HandCal//EN\"
+VERSION:2.0
+BEGIN:VTIMEZONE
+TZID:US-Eastern
+BEGIN:STANDARD
+DTSTART:19981025T020000
+RDATE:19981025T020000
+TZOFFSETFROM:-0400
+TZOFFSETTO:-0500
+TZNAME:EST
+END:STANDARD
+BEGIN:DAYLIGHT
+DTSTART:19990404T020000
+RDATE:19990404T020000
+TZOFFSETFROM:-0500
+TZOFFSETTO:-0400
+TZNAME:EDT
+END:DAYLIGHT
+END:VTIMEZONE
+BEGIN:VEVENT
+DTSTAMP:19980309T231000Z
+UID:guid-1.host1.com
+ORGANIZER;ROLE=CHAIR:MAILTO:mrbig@host.com
+ATTENDEE;RSVP=TRUE;ROLE=REQ-PARTICIPANT;CUTYPE=GROUP:MAILTO:employee-A@host.com
+DESCRIPTION:Project XYZ Review Meeting
+CATEGORIES:MEETING
+CLASS:PUBLIC
+CREATED:19980309T130000Z
+SUMMARY:XYZ Project Review
+DTSTART;TZID=US-Eastern:19980312T083000
+DTEND;TZID=US-Eastern:19980312T093000
+LOCATION:1CP Conference Room 4350
+END:VEVENT
+BEGIN:BOOGA
+DTSTAMP:19980309T231000Z
+X-LIC-FOO:Booga
+DTSTOMP:19980309T231000Z
+UID:guid-1.host1.com
+END:BOOGA
+END:VCALENDAR";
+
+void _test_string_line_generator(char* str);
+
+void test_string_line_generator() {
+
+ _test_string_line_generator(str);
+
+}
+
+icalcomponent* create_simple_component()
+{
+
+ icalcomponent* calendar;
+ struct icalperiodtype rtime;
+
+ rtime.start = icaltimetype_from_timet( time(0),0);
+ rtime.end = icaltimetype_from_timet( time(0),0);
+
+ rtime.end.hour++;
+
+
+
+ /* Create calendar and add properties */
+ calendar = icalcomponent_new(ICAL_VCALENDAR_COMPONENT);
+
+
+ icalcomponent_add_property(
+ calendar,
+ icalproperty_new_version("2.0")
+ );
+
+ printf("%s\n",icalcomponent_as_ical_string(calendar));
+
+ return calendar;
+
+}
+
+/* Create a new component */
+icalcomponent* create_new_component()
+{
+
+ icalcomponent* calendar;
+ icalcomponent* timezone;
+ icalcomponent* tzc;
+ icalcomponent* event;
+ struct icaltimetype atime = icaltimetype_from_timet( time(0),0);
+ struct icalperiodtype rtime;
+ icalproperty* property;
+
+ rtime.start = icaltimetype_from_timet( time(0),0);
+ rtime.end = icaltimetype_from_timet( time(0),0);
+
+ rtime.end.hour++;
+
+
+
+ /* Create calendar and add properties */
+ calendar = icalcomponent_new(ICAL_VCALENDAR_COMPONENT);
+
+
+ icalcomponent_add_property(
+ calendar,
+ icalproperty_new_version("2.0")
+ );
+
+ icalcomponent_add_property(
+ calendar,
+ icalproperty_new_prodid("-//RDU Software//NONSGML HandCal//EN")
+ );
+
+ /* Create a timezone object and add it to the calendar */
+
+ timezone = icalcomponent_new(ICAL_VTIMEZONE_COMPONENT);
+
+ icalcomponent_add_property(
+ timezone,
+ icalproperty_new_tzid("US_Eastern")
+ );
+
+ /* Add a sub-component of the timezone */
+ tzc = icalcomponent_new(ICAL_XDAYLIGHT_COMPONENT);
+
+ icalcomponent_add_property(
+ tzc,
+ icalproperty_new_dtstart(atime)
+ );
+
+ icalcomponent_add_property(
+ tzc,
+ icalproperty_new_rdate(rtime)
+ );
+
+ icalcomponent_add_property(
+ tzc,
+ icalproperty_new_tzoffsetfrom(-4.0)
+ );
+
+ icalcomponent_add_property(
+ tzc,
+ icalproperty_new_tzoffsetto(-5.0)
+ );
+
+ icalcomponent_add_property(
+ tzc,
+ icalproperty_new_tzname("EST")
+ );
+
+ icalcomponent_add_component(timezone,tzc);
+
+ icalcomponent_add_component(calendar,timezone);
+
+ /* Add a second subcomponent */
+ tzc = icalcomponent_new(ICAL_XSTANDARD_COMPONENT);
+
+ icalcomponent_add_property(
+ tzc,
+ icalproperty_new_dtstart(atime)
+ );
+
+ icalcomponent_add_property(
+ tzc,
+ icalproperty_new_rdate(rtime)
+ );
+
+ icalcomponent_add_property(
+ tzc,
+ icalproperty_new_tzoffsetfrom(-4.0)
+ );
+
+ icalcomponent_add_property(
+ tzc,
+ icalproperty_new_tzoffsetto(-5.0)
+ );
+
+ icalcomponent_add_property(
+ tzc,
+ icalproperty_new_tzname("EST")
+ );
+
+ icalcomponent_add_component(timezone,tzc);
+
+ /* Add an event */
+
+ event = icalcomponent_new(ICAL_VEVENT_COMPONENT);
+
+ icalcomponent_add_property(
+ event,
+ icalproperty_new_dtstamp(atime)
+ );
+
+ icalcomponent_add_property(
+ event,
+ icalproperty_new_uid("guid-1.host1.com")
+ );
+
+ /* add a property that has parameters */
+ property = icalproperty_new_organizer("mrbig@host.com");
+
+ icalproperty_add_parameter(
+ property,
+ icalparameter_new_role(ICAL_ROLE_CHAIR)
+ );
+
+ icalcomponent_add_property(event,property);
+
+ /* add another property that has parameters */
+ property = icalproperty_new_attendee("employee-A@host.com");
+
+ icalproperty_add_parameter(
+ property,
+ icalparameter_new_role(ICAL_ROLE_REQPARTICIPANT)
+ );
+
+ icalproperty_add_parameter(
+ property,
+ icalparameter_new_rsvp(1)
+ );
+
+ icalproperty_add_parameter(
+ property,
+ icalparameter_new_cutype(ICAL_CUTYPE_GROUP)
+ );
+
+ icalcomponent_add_property(event,property);
+
+
+ /* more properties */
+
+ icalcomponent_add_property(
+ event,
+ icalproperty_new_description("Project XYZ Review Meeting")
+ );
+
+ icalcomponent_add_property(
+ event,
+ icalproperty_new_categories("MEETING")
+ );
+
+ icalcomponent_add_property(
+ event,
+ icalproperty_new_class("PUBLIC")
+ );
+
+ icalcomponent_add_property(
+ event,
+ icalproperty_new_created(atime)
+ );
+
+ icalcomponent_add_property(
+ event,
+ icalproperty_new_summary("XYZ Project Review")
+ );
+
+
+ property = icalproperty_new_dtstart(atime);
+
+ icalproperty_add_parameter(
+ property,
+ icalparameter_new_tzid("US-Eastern")
+ );
+
+ icalcomponent_add_property(event,property);
+
+
+ property = icalproperty_new_dtend(atime);
+
+ icalproperty_add_parameter(
+ property,
+ icalparameter_new_tzid("US-Eastern")
+ );
+
+ icalcomponent_add_property(event,property);
+
+ icalcomponent_add_property(
+ event,
+ icalproperty_new_location("1CP Conference Room 4350")
+ );
+
+ icalcomponent_add_component(calendar,event);
+
+ printf("%s\n",icalcomponent_as_ical_string(calendar));
+
+ icalcomponent_free(calendar);
+
+ return 0;
+}
+
+
+/* Create a new component, using the va_args list */
+
+icalcomponent* create_new_component_with_va_args()
+{
+
+ icalcomponent* calendar;
+ struct icaltimetype atime = icaltimetype_from_timet( time(0),0);
+ struct icalperiodtype rtime;
+
+ rtime.start = icaltimetype_from_timet( time(0),0);
+ rtime.end = icaltimetype_from_timet( time(0),0);
+
+ rtime.end.hour++;
+
+ calendar =
+ icalcomponent_vanew(
+ ICAL_VCALENDAR_COMPONENT,
+ icalproperty_new_version("2.0"),
+ icalproperty_new_prodid("-//RDU Software//NONSGML HandCal//EN"),
+ icalcomponent_vanew(
+ ICAL_VTIMEZONE_COMPONENT,
+ icalproperty_new_tzid("US_Eastern"),
+ icalcomponent_vanew(
+ ICAL_XDAYLIGHT_COMPONENT,
+ icalproperty_new_dtstart(atime),
+ icalproperty_new_rdate(rtime),
+ icalproperty_new_tzoffsetfrom(-4.0),
+ icalproperty_new_tzoffsetto(-5.0),
+ icalproperty_new_tzname("EST"),
+ 0
+ ),
+ icalcomponent_vanew(
+ ICAL_XSTANDARD_COMPONENT,
+ icalproperty_new_dtstart(atime),
+ icalproperty_new_rdate(rtime),
+ icalproperty_new_tzoffsetfrom(-5.0),
+ icalproperty_new_tzoffsetto(-4.0),
+ icalproperty_new_tzname("EST"),
+ 0
+ ),
+ 0
+ ),
+ icalcomponent_vanew(
+ ICAL_VEVENT_COMPONENT,
+ icalproperty_new_dtstamp(atime),
+ icalproperty_new_uid("guid-1.host1.com"),
+ icalproperty_vanew_organizer(
+ "mrbig@host.com",
+ icalparameter_new_role(ICAL_ROLE_CHAIR),
+ 0
+ ),
+ icalproperty_vanew_attendee(
+ "employee-A@host.com",
+ icalparameter_new_role(ICAL_ROLE_REQPARTICIPANT),
+ icalparameter_new_rsvp(1),
+ icalparameter_new_cutype(ICAL_CUTYPE_GROUP),
+ 0
+ ),
+ icalproperty_new_description("Project XYZ Review Meeting"),
+ icalproperty_new_categories("MEETING"),
+ icalproperty_new_class("PUBLIC"),
+ icalproperty_new_created(atime),
+ icalproperty_new_summary("XYZ Project Review"),
+ icalproperty_vanew_dtstart(
+ atime,
+ icalparameter_new_tzid("US-Eastern"),
+ 0
+ ),
+ icalproperty_vanew_dtend(
+ atime,
+ icalparameter_new_tzid("US-Eastern"),
+ 0
+ ),
+ icalproperty_new_location("1CP Conference Room 4350"),
+ 0
+ ),
+ 0
+ );
+
+ printf("%s\n",icalcomponent_as_ical_string(calendar));
+
+
+ icalcomponent_free(calendar);
+
+ return 0;
+}
+
+
+/* Return a list of all attendees who are required. */
+
+char** get_required_attendees(icalproperty* event)
+{
+ icalproperty* p;
+ icalparameter* parameter;
+
+ char **attendees;
+ int max = 10;
+ int c = 0;
+
+ attendees = malloc(max * (sizeof (char *)));
+
+ assert(event != 0);
+ assert(icalcomponent_isa(event) == ICAL_VEVENT_COMPONENT);
+
+ for(
+ p = icalcomponent_get_first_property(event,ICAL_ATTENDEE_PROPERTY);
+ p != 0;
+ p = icalcomponent_get_next_property(event,ICAL_ATTENDEE_PROPERTY)
+ ) {
+
+ parameter = icalproperty_get_first_parameter(p,ICAL_ROLE_PARAMETER);
+
+ if ( icalparameter_get_role(parameter) == ICAL_ROLE_REQPARTICIPANT)
+ {
+ attendees[c++] = strdup(icalproperty_get_attendee(p));
+
+ if (c >= max) {
+ max *= 2;
+ attendees = realloc(attendees, max * (sizeof (char *)));
+ }
+
+ }
+ }
+
+ return attendees;
+}
+
+/* If an attendee has a PARTSTAT of NEEDSACTION or has no PARTSTAT
+ parameter, change it to TENTATIVE. */
+
+void update_attendees(icalproperty* event)
+{
+ icalproperty* p;
+ icalparameter* parameter;
+
+
+ assert(event != 0);
+ assert(icalcomponent_isa(event) == ICAL_VEVENT_COMPONENT);
+
+ for(
+ p = icalcomponent_get_first_property(event,ICAL_ATTENDEE_PROPERTY);
+ p != 0;
+ p = icalcomponent_get_next_property(event,ICAL_ATTENDEE_PROPERTY)
+ ) {
+
+ parameter = icalproperty_get_first_parameter(p,ICAL_PARTSTAT_PARAMETER);
+
+ if (parameter == 0) {
+
+ icalproperty_add_parameter(
+ p,
+ icalparameter_new_partstat(ICAL_PARTSTAT_TENTATIVE)
+ );
+
+ } else if (icalparameter_get_partstat(parameter) == ICAL_PARTSTAT_NEEDSACTION) {
+
+ icalproperty_remove_parameter(p,ICAL_PARTSTAT_PARAMETER);
+
+ icalparameter_free(parameter);
+
+ icalproperty_add_parameter(
+ p,
+ icalparameter_new_partstat(ICAL_PARTSTAT_TENTATIVE)
+ );
+ }
+
+ }
+}
+
+
+void test_values()
+{
+ icalvalue *v;
+ icalvalue *copy;
+
+ v = icalvalue_new_caladdress("cap://value/1");
+ printf("caladdress 1: %s\n",icalvalue_get_caladdress(v));
+ icalvalue_set_caladdress(v,"cap://value/2");
+ printf("caladdress 2: %s\n",icalvalue_get_caladdress(v));
+ printf("String: %s\n",icalvalue_as_ical_string(v));
+
+ copy = icalvalue_new_clone(v);
+ printf("Clone: %s\n",icalvalue_as_ical_string(v));
+ icalvalue_free(v);
+ icalvalue_free(copy);
+
+
+ v = icalvalue_new_boolean(1);
+ printf("caladdress 1: %d\n",icalvalue_get_boolean(v));
+ icalvalue_set_boolean(v,2);
+ printf("caladdress 2: %d\n",icalvalue_get_boolean(v));
+ printf("String: %s\n",icalvalue_as_ical_string(v));
+
+ copy = icalvalue_new_clone(v);
+ printf("Clone: %s\n",icalvalue_as_ical_string(v));
+ icalvalue_free(v);
+ icalvalue_free(copy);
+
+
+ v = icalvalue_new_date(icaltimetype_from_timet( time(0),0));
+ printf("date 1: %s\n",icalvalue_as_ical_string(v));
+ icalvalue_set_date(v,icaltimetype_from_timet( time(0)+3600,0));
+ printf("date 2: %s\n",icalvalue_as_ical_string(v));
+
+ copy = icalvalue_new_clone(v);
+ printf("Clone: %s\n",icalvalue_as_ical_string(v));
+ icalvalue_free(v);
+ icalvalue_free(copy);
+
+
+ v = icalvalue_new(-1);
+
+ printf("Invalid type: %p\n",v);
+
+ if (v!=0) icalvalue_free(v);
+
+
+ /* v = icalvalue_new_caladdress(0);
+
+ printf("Bad string: %p\n",v);
+
+ if (v!=0) icalvalue_free(v); */
+
+}
+
+void test_properties()
+{
+ icalproperty *prop;
+ icalparameter *param;
+
+ icalproperty *clone;
+
+ prop = icalproperty_vanew_comment(
+ "Another Comment",
+ icalparameter_new_cn("A Common Name 1"),
+ icalparameter_new_cn("A Common Name 2"),
+ icalparameter_new_cn("A Common Name 3"),
+ icalparameter_new_cn("A Common Name 4"),
+ 0);
+
+ for(param = icalproperty_get_first_parameter(prop,ICAL_ANY_PROPERTY);
+ param != 0;
+ param = icalproperty_get_next_parameter(prop,ICAL_ANY_PROPERTY)) {
+
+ printf("Prop parameter: %s\n",icalparameter_get_cn(param));
+ }
+
+ printf("Prop value: %s\n",icalproperty_get_comment(prop));
+
+
+ printf("As iCAL string:\n %s\n",icalproperty_as_ical_string(prop));
+
+ clone = icalproperty_new_clone(prop);
+
+ printf("Clone:\n %s\n",icalproperty_as_ical_string(prop));
+
+ icalproperty_free(clone);
+ icalproperty_free(prop);
+
+ prop = icalproperty_new(-1);
+
+ printf("Invalid type: %p\n",prop);
+
+ if (prop!=0) icalproperty_free(prop);
+
+ /*
+ prop = icalproperty_new_method(0);
+
+ printf("Bad string: %p\n",prop);
+
+
+ if (prop!=0) icalproperty_free(prop);
+ */
+}
+
+void test_parameters()
+{
+ icalparameter *p;
+
+ p = icalparameter_new_cn("A Common Name");
+
+ printf("Common Name: %s\n",icalparameter_get_cn(p));
+
+ printf("As String: %s\n",icalparameter_as_ical_string(p));
+
+ icalparameter_free(p);
+}
+
+
+void test_components()
+{
+
+ icalcomponent* c;
+ icalcomponent* child;
+
+ c = icalcomponent_vanew(
+ ICAL_VCALENDAR_COMPONENT,
+ icalproperty_new_version("2.0"),
+ icalproperty_new_prodid("-//RDU Software//NONSGML HandCal//EN"),
+ icalproperty_vanew_comment(
+ "A Comment",
+ icalparameter_new_cn("A Common Name 1"),
+ 0),
+ icalcomponent_vanew(
+ ICAL_VEVENT_COMPONENT,
+ icalproperty_new_version("2.0"),
+ icalproperty_new_description("This is an event"),
+ icalproperty_vanew_comment(
+ "Another Comment",
+ icalparameter_new_cn("A Common Name 1"),
+ icalparameter_new_cn("A Common Name 2"),
+ icalparameter_new_cn("A Common Name 3"),
+ icalparameter_new_cn("A Common Name 4"),
+ 0),
+ icalproperty_vanew_xlicerror(
+ "This is only a test",
+ icalparameter_new_xlicerrortype(ICAL_XLICERRORTYPE_COMPONENTPARSEERROR),
+ 0),
+
+ 0
+ ),
+ 0
+ );
+
+ printf("Original Component:\n%s\n\n",icalcomponent_as_ical_string(c));
+
+ child = icalcomponent_get_first_component(c,ICAL_VEVENT_COMPONENT);
+
+ printf("Child Component:\n%s\n\n",icalcomponent_as_ical_string(child));
+
+ icalcomponent_free(c);
+
+}
+
+void test_memory()
+{
+ size_t bufsize = 256;
+ char *p;
+
+ char S1[] = "1) When in the Course of human events, ";
+ char S2[] = "2) it becomes necessary for one people to dissolve the political bands which have connected them with another, ";
+ char S3[] = "3) and to assume among the powers of the earth, ";
+ char S4[] = "4) the separate and equal station to which the Laws of Nature and of Nature's God entitle them, ";
+ char S5[] = "5) a decent respect to the opinions of mankind requires that they ";
+ char S6[] = "6) should declare the causes which impel them to the separation. ";
+ char S7[] = "7) We hold these truths to be self-evident, ";
+ char S8[] = "8) that all men are created equal, ";
+
+/* char S9[] = "9) that they are endowed by their Creator with certain unalienable Rights, ";
+ char S10[] = "10) that among these are Life, Liberty, and the pursuit of Happiness. ";
+ char S11[] = "11) That to secure these rights, Governments are instituted among Men, ";
+ char S12[] = "12) deriving their just powers from the consent of the governed. ";
+*/
+
+
+ char *f, *b1, *b2, *b3, *b4, *b5, *b6, *b7, *b8;
+
+ #define BUFSIZE 1024
+
+
+ f = icalmemory_new_buffer(bufsize);
+ p = f;
+ b1 = icalmemory_tmp_buffer(BUFSIZE);
+ strcpy(b1, S1);
+ icalmemory_append_string(&f, &p, &bufsize, b1);
+
+ b2 = icalmemory_tmp_buffer(BUFSIZE);
+ strcpy(b2, S2);
+ icalmemory_append_string(&f, &p, &bufsize, b2);
+
+ b3 = icalmemory_tmp_buffer(BUFSIZE);
+ strcpy(b3, S3);
+ icalmemory_append_string(&f, &p, &bufsize, b3);
+
+ b4 = icalmemory_tmp_buffer(BUFSIZE);
+ strcpy(b4, S4);
+ icalmemory_append_string(&f, &p, &bufsize, b4);
+
+ b5 = icalmemory_tmp_buffer(BUFSIZE);
+ strcpy(b5, S5);
+ icalmemory_append_string(&f, &p, &bufsize, b5);
+
+ b6 = icalmemory_tmp_buffer(BUFSIZE);
+ strcpy(b6, S6);
+ icalmemory_append_string(&f, &p, &bufsize, b6);
+
+ b7 = icalmemory_tmp_buffer(BUFSIZE);
+ strcpy(b7, S7);
+ icalmemory_append_string(&f, &p, &bufsize, b7);
+
+ b8 = icalmemory_tmp_buffer(BUFSIZE);
+ strcpy(b8, S8);
+ icalmemory_append_string(&f, &p, &bufsize, b8);
+
+
+ printf("1: %p %s \n",b1,b1);
+ printf("2: %p %s\n",b2,b2);
+ printf("3: %p %s\n",b3,b3);
+ printf("4: %p %s\n",b4,b4);
+ printf("5: %p %s\n",b5,b5);
+ printf("6: %p %s\n",b6,b6);
+ printf("7: %p %s\n",b7,b7);
+ printf("8: %p %s\n",b8,b8);
+
+
+ printf("Final: %s\n", f);
+
+ printf("Final buffer size: %d\n",bufsize);
+
+ free(f);
+
+ bufsize = 4;
+ f = icalmemory_new_buffer(bufsize);
+ p = f;
+
+ icalmemory_append_char(&f, &p, &bufsize, 'a');
+ icalmemory_append_char(&f, &p, &bufsize, 'b');
+ icalmemory_append_char(&f, &p, &bufsize, 'c');
+ icalmemory_append_char(&f, &p, &bufsize, 'd');
+ icalmemory_append_char(&f, &p, &bufsize, 'e');
+ icalmemory_append_char(&f, &p, &bufsize, 'f');
+ icalmemory_append_char(&f, &p, &bufsize, 'g');
+ icalmemory_append_char(&f, &p, &bufsize, 'h');
+ icalmemory_append_char(&f, &p, &bufsize, 'i');
+ icalmemory_append_char(&f, &p, &bufsize, 'j');
+ icalmemory_append_char(&f, &p, &bufsize, 'a');
+ icalmemory_append_char(&f, &p, &bufsize, 'b');
+ icalmemory_append_char(&f, &p, &bufsize, 'c');
+ icalmemory_append_char(&f, &p, &bufsize, 'd');
+ icalmemory_append_char(&f, &p, &bufsize, 'e');
+ icalmemory_append_char(&f, &p, &bufsize, 'f');
+ icalmemory_append_char(&f, &p, &bufsize, 'g');
+ icalmemory_append_char(&f, &p, &bufsize, 'h');
+ icalmemory_append_char(&f, &p, &bufsize, 'i');
+ icalmemory_append_char(&f, &p, &bufsize, 'j');
+
+ printf("Char-by-Char buffer: %s\n", f);
+
+}
+
+int test_parser()
+{
+
+
+ icalcomponent *c = icalparser_parse_string(str);
+ printf("%s\n",icalcomponent_as_ical_string(c));
+ icalcomponent_free(c);
+ icalmemory_free_ring();
+ return 1;
+}
+
+
+int test_store()
+{
+
+ icalcomponent *c, *gauge;
+ icalerrorenum error;
+ icalcomponent *next, *itr;
+ icalcluster* cluster;
+ struct icalperiodtype rtime;
+ icalstore *s = icalstore_new("store");
+ int i;
+
+ rtime.start = icaltimetype_from_timet( time(0),0);
+
+ cluster = icalcluster_new("clusterin.vcd");
+
+ if (cluster == 0){
+ printf("Failed to create cluster: %s\n",icalerror_strerror(icalerrno));
+ return 0;
+ }
+
+#define NUMCOMP 4
+
+ /* Duplicate every component in the cluster NUMCOMP times */
+
+ icalerror_clear_errno();
+
+ for (i = 1; i<NUMCOMP+1; i++){
+
+ /*rtime.start.month = i%12;*/
+ rtime.start.month = i;
+ rtime.end = rtime.start;
+ rtime.end.hour++;
+
+ for (itr = icalcluster_get_first_component(cluster,
+ ICAL_ANY_COMPONENT);
+ itr != 0;
+ itr = icalcluster_get_next_component(cluster,
+ ICAL_ANY_COMPONENT)){
+ icalcomponent *clone;
+ icalproperty *p;
+
+
+ if(icalcomponent_isa(itr) != ICAL_VEVENT_COMPONENT){
+ continue;
+ }
+
+ assert(itr != 0);
+
+ /* Change the dtstart and dtend times in the component
+ pointed to by Itr*/
+
+ clone = icalcomponent_new_clone(itr);
+ assert(icalerrno == ICAL_NO_ERROR);
+ assert(clone !=0);
+
+ /* DTSTART*/
+ p = icalcomponent_get_first_property(clone,ICAL_DTSTART_PROPERTY);
+ assert(icalerrno == ICAL_NO_ERROR);
+
+ if (p == 0){
+ p = icalproperty_new_dtstart(rtime.start);
+ icalcomponent_add_property(clone,p);
+ } else {
+ icalproperty_set_dtstart(p,rtime.start);
+ }
+ assert(icalerrno == ICAL_NO_ERROR);
+
+ /* DTEND*/
+ p = icalcomponent_get_first_property(clone,ICAL_DTEND_PROPERTY);
+ assert(icalerrno == ICAL_NO_ERROR);
+
+ if (p == 0){
+ p = icalproperty_new_dtstart(rtime.end);
+ icalcomponent_add_property(clone,p);
+ } else {
+ icalproperty_set_dtstart(p,rtime.end);
+ }
+ assert(icalerrno == ICAL_NO_ERROR);
+
+ printf("\n----------\n%s\n---------\n",icalcomponent_as_ical_string(clone));
+
+ error = icalstore_add_component(s,clone);
+
+ assert(icalerrno == ICAL_NO_ERROR);
+
+ }
+
+ }
+
+ gauge =
+ icalcomponent_vanew(
+ ICAL_VCALENDAR_COMPONENT,
+ icalcomponent_vanew(
+ ICAL_VEVENT_COMPONENT,
+ icalproperty_vanew_summary(
+ "Submit Income Taxes",
+ icalparameter_new_xliccomparetype(ICAL_XLICCOMPARETYPE_EQUAL),
+ 0),
+ 0),
+ icalcomponent_vanew(
+ ICAL_VEVENT_COMPONENT,
+ icalproperty_vanew_summary(
+ "Bastille Day Party",
+ icalparameter_new_xliccomparetype(ICAL_XLICCOMPARETYPE_EQUAL),
+ 0),
+ 0),
+ 0);
+
+#if 0
+
+
+ icalstore_select(s,gauge);
+
+ for(c = icalstore_first(s); c != 0; c = icalstore_next(s)){
+
+ printf("Got one! (%d)\n", count++);
+
+ if (c != 0){
+ printf("%s", icalcomponent_as_ical_string(c));;
+ if (icalstore_store(s2,c) == 0){
+ printf("Failed to write!\n");
+ }
+ icalcomponent_free(c);
+ } else {
+ printf("Failed to get component\n");
+ }
+ }
+
+
+ icalstore_free(s2);
+#endif
+
+
+ for(c = icalstore_get_first_component(s);
+ c != 0;
+ c = next){
+
+ next = icalstore_get_next_component(s);
+
+ if (c != 0){
+ /*icalstore_remove_component(s,c);*/
+ printf("%s", icalcomponent_as_ical_string(c));;
+ } else {
+ printf("Failed to get component\n");
+ }
+
+
+ }
+
+ icalstore_free(s);
+ return 0;
+}
+
+int test_compare()
+{
+ icalvalue *v1, *v2;
+ icalcomponent *c, *gauge;
+
+ v1 = icalvalue_new_caladdress("cap://value/1");
+ v2 = icalvalue_new_clone(v1);
+
+ printf("%d\n",icalvalue_compare(v1,v2));
+
+ v1 = icalvalue_new_caladdress("A");
+ v2 = icalvalue_new_caladdress("B");
+
+ printf("%d\n",icalvalue_compare(v1,v2));
+
+ v1 = icalvalue_new_caladdress("B");
+ v2 = icalvalue_new_caladdress("A");
+
+ printf("%d\n",icalvalue_compare(v1,v2));
+
+ v1 = icalvalue_new_integer(5);
+ v2 = icalvalue_new_integer(5);
+
+ printf("%d\n",icalvalue_compare(v1,v2));
+
+ v1 = icalvalue_new_integer(5);
+ v2 = icalvalue_new_integer(10);
+
+ printf("%d\n",icalvalue_compare(v1,v2));
+
+ v1 = icalvalue_new_integer(10);
+ v2 = icalvalue_new_integer(5);
+
+ printf("%d\n",icalvalue_compare(v1,v2));
+
+
+ gauge =
+ icalcomponent_vanew(
+ ICAL_VCALENDAR_COMPONENT,
+ icalcomponent_vanew(
+ ICAL_VEVENT_COMPONENT,
+ icalproperty_vanew_comment(
+ "Comment",
+ icalparameter_new_xliccomparetype(ICAL_XLICCOMPARETYPE_EQUAL),
+ 0),
+ 0),
+ 0);
+
+ c = icalcomponent_vanew(
+ ICAL_VEVENT_COMPONENT,
+ icalproperty_vanew_comment(
+ "Comment",
+ 0),
+ 0);
+
+ printf("%s",icalcomponent_as_ical_string(gauge));
+
+ printf("%d\n",icalstore_test(c,gauge));
+
+ return 0;
+}
+
+void test_restriction()
+{
+ icalcomponent *comp;
+ struct icaltimetype atime = icaltimetype_from_timet( time(0),0);
+ int valid;
+
+ struct icalperiodtype rtime;
+
+ rtime.start = icaltimetype_from_timet( time(0),0);
+ rtime.end = icaltimetype_from_timet( time(0),0);
+
+ rtime.end.hour++;
+
+
+ /* Property restrictions */
+ assert(icalrestriction_get_property_restriction(
+ ICAL_METHOD_PUBLISH,
+ ICAL_VEVENT_COMPONENT,
+ ICAL_SEQUENCE_PROPERTY) == 5); /* ZEROORONE -> 5 */
+
+ assert(icalrestriction_get_property_restriction(
+ ICAL_METHOD_PUBLISH,
+ ICAL_VEVENT_COMPONENT,
+ ICAL_ATTACH_PROPERTY)==3); /* ZEROPLUS -> 3 */
+
+ assert(icalrestriction_get_property_restriction(
+ ICAL_METHOD_DECLINECOUNTER,
+ ICAL_VEVENT_COMPONENT,
+ ICAL_SEQUENCE_PROPERTY)==1); /* ZERO -> 1 */
+
+ /* Component restrictions */
+ assert(icalrestriction_get_component_restriction(
+ ICAL_METHOD_PUBLISH,
+ ICAL_VJOURNAL_COMPONENT,
+ ICAL_X_COMPONENT) == 3); /* ZEROPLUS */
+
+ assert(icalrestriction_get_component_restriction(
+ ICAL_METHOD_CANCEL,
+ ICAL_VJOURNAL_COMPONENT,
+ ICAL_VEVENT_COMPONENT) == 1); /* ZERO */
+
+ comp =
+ icalcomponent_vanew(
+ ICAL_VCALENDAR_COMPONENT,
+ icalproperty_new_version("2.0"),
+ icalproperty_new_prodid("-//RDU Software//NONSGML HandCal//EN"),
+ icalproperty_new_method(ICAL_METHOD_CANCEL),
+ icalcomponent_vanew(
+ ICAL_VTIMEZONE_COMPONENT,
+ icalproperty_new_tzid("US_Eastern"),
+ icalcomponent_vanew(
+ ICAL_XDAYLIGHT_COMPONENT,
+ icalproperty_new_dtstart(atime),
+ icalproperty_new_rdate(rtime),
+ icalproperty_new_tzoffsetfrom(-4.0),
+ icalproperty_new_tzoffsetto(-5.0),
+ icalproperty_new_tzname("EST"),
+ 0
+ ),
+ icalcomponent_vanew(
+ ICAL_XSTANDARD_COMPONENT,
+ icalproperty_new_dtstart(atime),
+ icalproperty_new_rdate(rtime),
+ icalproperty_new_tzoffsetfrom(-5.0),
+ icalproperty_new_tzoffsetto(-4.0),
+ icalproperty_new_tzname("EST"),
+ 0
+ ),
+ 0
+ ),
+ icalcomponent_vanew(
+ ICAL_VEVENT_COMPONENT,
+ icalproperty_new_dtstamp(atime),
+ icalproperty_new_uid("guid-1.host1.com"),
+ icalproperty_vanew_organizer(
+ "mrbig@host.com",
+ icalparameter_new_role(ICAL_ROLE_CHAIR),
+ 0
+ ),
+ icalproperty_vanew_attendee(
+ "employee-A@host.com",
+ icalparameter_new_role(ICAL_ROLE_REQPARTICIPANT),
+ icalparameter_new_rsvp(1),
+ icalparameter_new_cutype(ICAL_CUTYPE_GROUP),
+ 0
+ ),
+ icalproperty_new_description("Project XYZ Review Meeting"),
+ icalproperty_new_categories("MEETING"),
+ icalproperty_new_class("PUBLIC"),
+ icalproperty_new_created(atime),
+ icalproperty_new_summary("XYZ Project Review"),
+ icalproperty_vanew_dtstart(
+ atime,
+ icalparameter_new_tzid("US-Eastern"),
+ 0
+ ),
+ icalproperty_vanew_dtend(
+ atime,
+ icalparameter_new_tzid("US-Eastern"),
+ 0
+ ),
+ icalproperty_new_location("1CP Conference Room 4350"),
+ 0
+ ),
+ 0
+ );
+
+ valid = icalrestriction_check(comp);
+
+ printf("#### %d ####\n%s\n",valid, icalcomponent_as_ical_string(comp));
+
+}
+
+void test_calendar()
+{
+ icalcomponent *comp;
+ icalcluster *c;
+ icalstore *s;
+ icalcalendar* calendar = icalcalendar_new("calendar");
+ icalerrorenum error;
+ struct icaltimetype atime = icaltimetype_from_timet( time(0),0);
+
+ comp = icalcomponent_vanew(
+ ICAL_VEVENT_COMPONENT,
+ icalproperty_new_version("2.0"),
+ icalproperty_new_description("This is an event"),
+ icalproperty_new_dtstart(atime),
+ icalproperty_vanew_comment(
+ "Another Comment",
+ icalparameter_new_cn("A Common Name 1"),
+ icalparameter_new_cn("A Common Name 2"),
+ icalparameter_new_cn("A Common Name 3"),
+ icalparameter_new_cn("A Common Name 4"),
+ 0),
+ icalproperty_vanew_xlicerror(
+ "This is only a test",
+ icalparameter_new_xlicerrortype(ICAL_XLICERRORTYPE_COMPONENTPARSEERROR),
+ 0),
+
+ 0);
+
+
+ s = icalcalendar_get_booked(calendar);
+
+ error = icalstore_add_component(s,comp);
+
+ assert(error == ICAL_NO_ERROR);
+
+ c = icalcalendar_get_properties(calendar);
+
+ error = icalcluster_add_component(c,icalcomponent_new_clone(comp));
+
+ assert(error == ICAL_NO_ERROR);
+
+ icalcalendar_free(calendar);
+
+}
+
+void test_recur()
+{
+ icalvalue *v;
+
+ v = icalvalue_new_from_string(ICAL_RECUR_VALUE,
+ "FREQ=DAILY;COUNT=5;BYDAY=MO,TU,WE,TH,FR");
+
+ printf("%s\n",icalvalue_as_ical_string(v));
+
+ v = icalvalue_new_from_string(ICAL_RECUR_VALUE,
+ "FREQ=YEARLY;UNTIL=123456T123456;BYSETPOS=-1,2");
+
+ printf("%s\n",icalvalue_as_ical_string(v));
+
+ v = icalvalue_new_from_string(ICAL_RECUR_VALUE,
+ "FREQ=YEARLY;UNTIL=123456T123456;INTERVAL=2;BYMONTH=1;BYDAY=SU;BYHOUR=8,9;BYMINUTE=30");
+
+ printf("%s\n",icalvalue_as_ical_string(v));
+
+ v = icalvalue_new_from_string(ICAL_RECUR_VALUE,
+ "FREQ=MONTHLY;BYDAY=-1MO,TU,WE,TH,FR");
+
+ printf("%s\n",icalvalue_as_ical_string(v));
+
+ v = icalvalue_new_from_string(ICAL_RECUR_VALUE,
+ "FREQ=WEEKLY;INTERVAL=20;WKST=SU;BYDAY=TU");
+
+ printf("%s\n",icalvalue_as_ical_string(v));
+
+}
+
+void test_duration()
+{
+
+ icalvalue *v;
+
+ v = icalvalue_new_from_string(ICAL_DURATION_VALUE,
+ "PT8H30M");
+
+ printf("%s\n",icalvalue_as_ical_string(v));
+
+ v = icalvalue_new_from_string(ICAL_PERIOD_VALUE,
+ "19971015T050000Z/PT8H30M");
+
+ printf("%s\n",icalvalue_as_ical_string(v));
+
+ v = icalvalue_new_from_string(ICAL_PERIOD_VALUE,
+ "19971015T050000Z/19971015T060000Z");
+
+ printf("%s\n",icalvalue_as_ical_string(v));
+
+
+}
+
+int main(int argc, char *argv[])
+{
+
+#if 0
+ printf("\n------------Test Calendar---------------\n");
+ test_calendar();
+
+ printf("\n------------Test Store---------------\n");
+ test_store();
+
+ printf("\n------------Test duration---------------\n");
+ test_duration();
+
+#endif
+
+ printf("\n------------Test recur---------------\n");
+ test_recur();
+
+
+
+exit(0);
+
+ printf("\n------------Test Restriction---------------\n");
+ test_restriction();
+
+
+
+ printf("\n------------Test Compare---------------\n");
+ test_compare();
+
+ printf("\n------------Test Memory---------------\n");
+ test_memory();
+
+ printf("\n------------Test Values---------------\n");
+ test_values();
+
+ printf("\n------------Test Parameters-----------\n");
+ test_parameters();
+
+ printf("\n------------Test Properties-----------\n");
+ test_properties();
+
+ printf("\n------------Test Components ----------\n");
+ test_components();
+
+ printf("\n------------Create Components --------\n");
+ create_new_component();
+
+ printf("\n------------Test Parser---------------\n");
+ test_parser();
+
+ printf("\n----- Create Components with vaargs ---\n");
+ create_new_component_with_va_args();
+
+
+
+
+ return 0;
+}
+
+
+
diff --git a/libical/src/test/usecases b/libical/src/test/usecases
new file mode 100755
index 0000000000..541faf8388
--- /dev/null
+++ b/libical/src/test/usecases
Binary files differ
diff --git a/libical/src/test/usecases.c b/libical/src/test/usecases.c
new file mode 100644
index 0000000000..d07b5edac5
--- /dev/null
+++ b/libical/src/test/usecases.c
@@ -0,0 +1,561 @@
+/* -*- Mode: C -*-
+ ======================================================================
+ FILE: usecases.c
+ CREATOR: eric 03 April 1999
+
+ DESCRIPTION:
+
+ $Id$
+ $Locker$
+
+ (C) COPYRIGHT 1999 Eric Busboom
+ http://www.softwarestudio.org
+
+ The contents of this file are subject to the Mozilla Public License
+ Version 1.0 (the "License"); you may not use this file except in
+ compliance with the License. You may obtain a copy of the License at
+ http://www.mozilla.org/MPL/
+
+ Software distributed under the License is distributed on an "AS IS"
+ basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
+ the License for the specific language governing rights and
+ limitations under the License.
+
+ The original author is Eric Busboom
+ The original code is usecases.c
+
+
+ ======================================================================*/
+
+#include "ical.h"
+#include <assert.h>
+#include <string.h> /* for strdup */
+#include <stdlib.h> /* for malloc */
+#include <stdio.h> /* for printf */
+#include <time.h> /* for time() */
+#include "icalmemory.h"
+
+/*
+
+ Here is the example iCal object that the examples routines in this
+ file will use:
+
+ BEGIN:VCALENDAR
+ PRODID:-//RDU Software//NONSGML HandCal//EN
+ VERSION:2.0
+ BEGIN:VTIMEZONE
+ BEGIN:VEVENT
+ DTSTAMP:19980309T231000Z
+ UID:guid-1.host1.com
+ ORGANIZER;ROLE=CHAIR:MAILTO:mrbig@host.com
+ ATTENDEE;RSVP=TRUE;ROLE=REQ-PARTICIPANT;CUTYPE=GROUP:
+ MAILTO:employee-A@host.com
+ DESCRIPTION:Project XYZ Review Meeting
+ CREATED:19980309T130000Z
+ SUMMARY:XYZ Project Review
+ DTSTART;TZID=US-Eastern:19980312T083000
+ DTEND;TZID=US-Eastern:19980312T093000
+ END:VEVENT
+ END:VCALENDAR
+
+*/
+char str[] = "BEGIN:VCALENDAR
+PRODID:\"-//RDU Software//NONSGML HandCal//EN\"
+VERSION:2.0
+BEGIN:VEVENT
+DTSTAMP:19980309T231000Z
+UID:guid-1.host1.com
+ORGANIZER;ROLE=CHAIR:MAILTO:mrbig@host.com
+ATTENDEE;RSVP=TRUE;ROLE=REQ-PARTICIPANT;CUTYPE=GROUP:MAILTO:employee-A@host.com
+DESCRIPTION:Project XYZ Review Meeting
+CATEGORIES:MEETING
+CREATED:19980309T130000Z
+SUMMARY:XYZ Project Review
+DTSTART;TZID=US-Eastern:19980312T083000
+DTEND;TZID=US-Eastern:19980312T093000
+END:VEVENT
+END:VCALENDAR";
+
+/* Creating iCal Components
+
+ There are two ways to create new component in libical. You can
+ build the component from primitive parts, or you can create it
+ from a string.
+
+ There are two variations of the API for building the component from
+ primitive parts. In the first variation, you add each parameter and
+ value to a property, and then add each property to a
+ component. This results in a long series of function calls. This
+ style is show in create_new_component()
+
+ The second variation uses vargs lists to nest many primitive part
+ constructors, resulting in a compact, neatly formated way to create
+ components. This style is shown in create_new_component_with_va_args()
+
+
+
+*/
+
+icalcomponent* create_new_component()
+{
+
+ /* variable definitions */
+ icalcomponent* calendar;
+ icalcomponent* event;
+ struct icaltimetype atime = icaltimetype_from_timet( time(0),0);
+ struct icalperiodtype rtime;
+ icalproperty* property;
+
+ /* Define a time type that will use as data later. */
+ rtime.start = icaltimetype_from_timet( time(0),0);
+ rtime.end = icaltimetype_from_timet( time(0),0);
+ rtime.end.hour++;
+
+ /* Create calendar and add properties */
+
+ calendar = icalcomponent_new(ICAL_VCALENDAR_COMPONENT);
+
+ /* Nearly every libical function call has the same general
+ form. The first part of the name defines the 'class' for the
+ function, and the first argument will be a pointer to a struct
+ of that class. So, icalcomponent_ functions will all take
+ icalcomponent* as their first argument. */
+
+ /* The next call creates a new proeprty and immediately adds it to the
+ 'calendar' component. */
+
+ icalcomponent_add_property(
+ calendar,
+ icalproperty_new_version(strdup("2.0"))
+ );
+
+ /* Note the use of strdup() in the previous and next call. All
+ properties constructors for properties with value types of
+ TEXT will take control of the string you pass into them. Since
+ the string '2.0' is a static string, we need to duplicate it in
+ new memory before giving it to the property */
+
+ /* Here is the short version of the memory rules:
+
+ If the routine name has "new" in it:
+ Caller owns the returned memory.
+ If you pass in a string, the routine takes the memory.
+
+ If the routine name has "add" in it:
+ The routine takes control of the component, property,
+ parameter or value memory.
+
+ If the routine returns a string ( "get" and "as_ical_string" )
+ The library owns the returned memory.
+
+ */
+
+ icalcomponent_add_property(
+ calendar,
+ icalproperty_new_prodid(strdup("-//RDU Software//NONSGML HandCal//EN"))
+ );
+
+ /* Add an event */
+
+ event = icalcomponent_new(ICAL_VEVENT_COMPONENT);
+
+ icalcomponent_add_property(
+ event,
+ icalproperty_new_dtstamp(atime)
+ );
+
+ /* In the previous call, atime is a struct, and it is passed in by value.
+ This is how all compound types of values are handled. */
+
+ icalcomponent_add_property(
+ event,
+ icalproperty_new_uid(strdup("guid-1.host1.com"))
+ );
+
+ /* add a property that has parameters */
+ property = icalproperty_new_organizer(strdup("mrbig@host.com"));
+
+ icalproperty_add_parameter(
+ property,
+ icalparameter_new_role(ICAL_ROLE_CHAIR)
+ );
+
+ icalcomponent_add_property(event,property);
+
+ /* In this style of component creation, you need to use an extra
+ call to add parameters to properties, but the form of this
+ operation is the same as adding a property to a component */
+
+ /* add another property that has parameters */
+ property = icalproperty_new_attendee(strdup("employee-A@host.com"));
+
+ icalproperty_add_parameter(
+ property,
+ icalparameter_new_role(ICAL_ROLE_REQPARTICIPANT)
+ );
+
+ icalproperty_add_parameter(
+ property,
+ icalparameter_new_rsvp(1)
+ );
+
+ icalproperty_add_parameter(
+ property,
+ icalparameter_new_cutype(ICAL_CUTYPE_GROUP)
+ );
+
+ icalcomponent_add_property(event,property);
+
+
+ /* more properties */
+
+ icalcomponent_add_property(
+ event,
+ icalproperty_new_description(strdup("Project XYZ Review Meeting"))
+ );
+
+ icalcomponent_add_property(
+ event,
+ icalproperty_new_categories(strdup("MEETING"))
+ );
+
+ icalcomponent_add_property(
+ event,
+ icalproperty_new_class(strdup("PUBLIC"))
+ );
+
+ icalcomponent_add_property(
+ event,
+ icalproperty_new_created(atime)
+ );
+
+ icalcomponent_add_property(
+ event,
+ icalproperty_new_summary(strdup("XYZ Project Review"))
+ );
+
+ property = icalproperty_new_dtstart(atime);
+
+ icalproperty_add_parameter(
+ property,
+ icalparameter_new_tzid(strdup("US-Eastern"))
+ );
+
+ icalcomponent_add_property(event,property);
+
+
+ property = icalproperty_new_dtend(atime);
+
+ icalproperty_add_parameter(
+ property,
+ icalparameter_new_tzid(strdup("US-Eastern"))
+ );
+
+ icalcomponent_add_property(event,property);
+
+ icalcomponent_add_property(
+ event,
+ icalproperty_new_location(strdup("1CP Conference Room 4350"))
+ );
+
+ icalcomponent_add_component(calendar,event);
+
+ return calendar;
+}
+
+
+/* Now, create the same component as in the previous routine, but use
+the constructor style. */
+
+icalcomponent* create_new_component_with_va_args()
+{
+
+ /* This is a similar set up to the last routine */
+ icalcomponent* calendar;
+ struct icaltimetype atime = icaltimetype_from_timet( time(0),0);
+ struct icalperiodtype rtime;
+
+ rtime.start = icaltimetype_from_timet( time(0),0);
+ rtime.end = icaltimetype_from_timet( time(0),0);
+ rtime.end.hour++;
+
+ /* Some of these routines are the same as those in the previous
+ routine, but we've also added several 'vanew' routines. These
+ 'vanew' routines take a list of properties, parameters or
+ values and add each of them to the parent property or
+ component. */
+
+ calendar =
+ icalcomponent_vanew(
+ ICAL_VCALENDAR_COMPONENT,
+ icalproperty_new_version(strdup("2.0")),
+ icalproperty_new_prodid(strdup("-//RDU Software//NONSGML HandCal//EN")),
+ icalcomponent_vanew(
+ ICAL_VEVENT_COMPONENT,
+ icalproperty_new_dtstamp(atime),
+ icalproperty_new_uid(strdup("guid-1.host1.com")),
+ icalproperty_vanew_organizer(
+ strdup("mrbig@host.com"),
+ icalparameter_new_role(ICAL_ROLE_CHAIR),
+ 0
+ ),
+ icalproperty_vanew_attendee(
+ strdup("employee-A@host.com"),
+ icalparameter_new_role(ICAL_ROLE_REQPARTICIPANT),
+ icalparameter_new_rsvp(1),
+ icalparameter_new_cutype(ICAL_CUTYPE_GROUP),
+ 0
+ ),
+ icalproperty_new_description(strdup("Project XYZ Review Meeting")),
+ icalproperty_new_categories(strdup("MEETING")),
+ icalproperty_new_class(strdup("PUBLIC")),
+ icalproperty_new_created(atime),
+ icalproperty_new_summary(strdup("XYZ Project Review")),
+ icalproperty_vanew_dtstart(
+ atime,
+ icalparameter_new_tzid(strdup("US-Eastern")),
+ 0
+ ),
+ icalproperty_vanew_dtend(
+ atime,
+ icalparameter_new_tzid(strdup("US-Eastern")),
+ 0
+ ),
+ icalproperty_new_location(strdup("1CP Conference Room 4350")),
+ 0
+ ),
+ 0
+ );
+
+
+ /* Note that properties with no parameters can use the regular
+ 'new' constructor, while those with parameters use the 'vanew'
+ constructor. And, be sure that the last argument in the 'vanew'
+ call is a zero. Without, your program will probably crash. */
+
+ return calendar;
+}
+
+
+/* Now, lets try to get a particular parameter out of a
+ component. This routine will return a list of strings of all
+ attendees who are required. Note that this routine assumes that the
+ component that we pass in is a VEVENT; the top level component we
+ created in the above two routines is a VCALENDAR */
+
+char *attendees[10];
+#define MAX_ATTENDEES 10;
+
+char** get_required_attendees(icalcomponent* event)
+{
+ icalproperty* p;
+ icalparameter* parameter;
+ int c=0;
+
+ assert(event != 0);
+ assert(icalcomponent_isa(event) == ICAL_VEVENT_COMPONENT);
+
+ /* This loop iterates over all of the ATTENDEE properties in the
+ event */
+
+ /* Yes, the iteration routines save their state in the event
+ struct, so the are not thread safe unless you lock the whole
+ event. */
+
+ for(
+ p = icalcomponent_get_first_property(event,ICAL_ATTENDEE_PROPERTY);
+ p != 0;
+ p = icalcomponent_get_next_property(event,ICAL_ATTENDEE_PROPERTY)
+ ) {
+
+ /* Get the first ROLE parameter in the property. There should
+ only be one, so we wont bother to iterate over them. */
+
+ parameter = icalproperty_get_first_parameter(p,ICAL_ROLE_PARAMETER);
+
+ /* If the parameter indicates the participant is required, get
+ the attendees name and stick a copy of it into the output
+ array */
+
+ if ( icalparameter_get_role(parameter) == ICAL_ROLE_REQPARTICIPANT)
+ {
+ attendees[c++] = strdup(icalproperty_get_attendee(p));
+ }
+ }
+
+ return attendees;
+}
+
+/* Here is a similar example. If an attendee has a PARTSTAT of
+ NEEDSACTION or has no PARTSTAT parameter, change it to
+ TENTATIVE. */
+
+void update_attendees(icalcomponent* event)
+{
+ icalproperty* p;
+ icalparameter* parameter;
+
+ assert(event != 0);
+ assert(icalcomponent_isa(event) == ICAL_VEVENT_COMPONENT);
+
+ for(
+ p = icalcomponent_get_first_property(event,ICAL_ATTENDEE_PROPERTY);
+ p != 0;
+ p = icalcomponent_get_next_property(event,ICAL_ATTENDEE_PROPERTY)
+ ) {
+
+ parameter = icalproperty_get_first_parameter(p,ICAL_PARTSTAT_PARAMETER);
+
+ if (parameter == 0) {
+
+ /* There was no PARTSTAT parameter, so add one. */
+ icalproperty_add_parameter(
+ p,
+ icalparameter_new_partstat(ICAL_PARTSTAT_TENTATIVE)
+ );
+
+ } else if (icalparameter_get_partstat(parameter) == ICAL_PARTSTAT_NEEDSACTION) {
+ /* Remove the NEEDSACTION parameter and replace it with
+ TENTATIVE */
+
+ icalproperty_remove_parameter(p,ICAL_PARTSTAT_PARAMETER);
+
+ /* Don't forget to free it */
+ icalparameter_free(parameter);
+
+ /* Add a new one */
+ icalproperty_add_parameter(
+ p,
+ icalparameter_new_partstat(ICAL_PARTSTAT_TENTATIVE)
+ );
+ }
+
+ }
+}
+
+/* Here are some examples of manipulating properties */
+
+void test_properties()
+{
+ icalproperty *prop;
+ icalparameter *param;
+ icalvalue *value;
+
+ icalproperty *clone;
+
+ /* Create a new property */
+ prop = icalproperty_vanew_comment(
+ strdup("Another Comment"),
+ icalparameter_new_cn("A Common Name 1"),
+ icalparameter_new_cn("A Common Name 2"),
+ icalparameter_new_cn("A Common Name 3"),
+ icalparameter_new_cn("A Common Name 4"),
+ 0);
+
+ /* Iterate through all of the parameters in the property */
+ for(param = icalproperty_get_first_parameter(prop,ICAL_ANY_PROPERTY);
+ param != 0;
+ param = icalproperty_get_next_parameter(prop,ICAL_ANY_PROPERTY)) {
+
+ printf("Prop parameter: %s\n",icalparameter_get_cn(param));
+ }
+
+ /* Get a string representation of the property's value */
+ printf("Prop value: %s\n",icalproperty_get_comment(prop));
+
+ /* Spit out the property in its RFC 2445 representation */
+ printf("As iCAL string:\n %s\n",icalproperty_as_ical_string(prop));
+
+ /* Make a copy of the property. Caller owns the memory */
+ clone = icalproperty_new_clone(prop);
+
+ /* Get a reference to the value within the clone property */
+ value = icalproperty_get_value(clone);
+
+ printf("Value: %s",icalvalue_as_ical_string(value));
+
+ /* Free the original and the clone */
+ icalproperty_free(clone);
+ icalproperty_free(prop);
+
+}
+
+
+
+/* Here are some ways to work with values. */
+void test_values()
+{
+ icalvalue *v;
+ icalvalue *copy;
+
+ v = icalvalue_new_caladdress(strdup("cap://value/1"));
+ printf("caladdress 1: %s\n",icalvalue_get_caladdress(v));
+
+ icalvalue_set_caladdress(v,strdup("cap://value/2"));
+ printf("caladdress 2: %s\n",icalvalue_get_caladdress(v));
+ printf("String: %s\n",icalvalue_as_ical_string(v));
+
+ copy = icalvalue_new_clone(v);
+ printf("Clone: %s\n",icalvalue_as_ical_string(v));
+ icalvalue_free(v);
+ icalvalue_free(copy);
+
+
+}
+
+void test_parameters()
+{
+ icalparameter *p;
+
+ p = icalparameter_new_cn("A Common Name");
+
+ printf("Common Name: %s\n",icalparameter_get_cn(p));
+
+ printf("As String: %s\n",icalparameter_as_ical_string(p));
+}
+
+
+int test_parser()
+{
+
+
+ icalcomponent *c = icalparser_parse_string(str);
+ printf("%s\n",icalcomponent_as_ical_string(c));
+ icalcomponent_free(c);
+ icalmemory_free_ring();
+ return 1;
+}
+
+
+int main(int argc, char *argv[])
+{
+ icalcomponent *c1;
+ icalcomponent *c2;
+ icalcomponent *vevent;
+ char **attendees;
+
+ c1 = create_new_component();
+ c2 = create_new_component_with_va_args();
+
+ /* Extract the VEVENT component from the component */
+
+ vevent = icalcomponent_get_first_component(c1,ICAL_VEVENT_COMPONENT);
+
+ attendees = get_required_attendees(vevent);
+
+ printf("Attendees: %s\n",attendees[0]);
+
+ /* Now print out the component as a string. Remember that the
+ library retains control of the memory returned by
+ icalcomponent_as_ical_string. Do not sotre references to it or
+ try to free it. It is stored on an internal ring buffer,and the
+ library will eventuall reclaim it. */
+
+ printf("%s\n",icalcomponent_as_ical_string(c1));
+
+ return 0;
+
+}
+
+
+