diff options
Diffstat (limited to 'libical/src/test/usecases.c')
-rw-r--r-- | libical/src/test/usecases.c | 54 |
1 files changed, 23 insertions, 31 deletions
diff --git a/libical/src/test/usecases.c b/libical/src/test/usecases.c index d07b5edac5..6c27454ae3 100644 --- a/libical/src/test/usecases.c +++ b/libical/src/test/usecases.c @@ -59,21 +59,22 @@ 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 + +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 @@ -148,6 +149,9 @@ icalcomponent* create_new_component() If the routine returns a string ( "get" and "as_ical_string" ) The library owns the returned memory. + There are more rules, so refer to the documentation for more + details. + */ icalcomponent_add_property( @@ -173,7 +177,7 @@ icalcomponent* create_new_component() ); /* add a property that has parameters */ - property = icalproperty_new_organizer(strdup("mrbig@host.com")); + property = icalproperty_new_organizer(strdup("mailto:mrbig@host.com")); icalproperty_add_parameter( property, @@ -187,7 +191,7 @@ icalcomponent* create_new_component() operation is the same as adding a property to a component */ /* add another property that has parameters */ - property = icalproperty_new_attendee(strdup("employee-A@host.com")); + property = icalproperty_new_attendee(strdup("mailto:employee-A@host.com")); icalproperty_add_parameter( property, @@ -295,12 +299,12 @@ icalcomponent* create_new_component_with_va_args() icalproperty_new_dtstamp(atime), icalproperty_new_uid(strdup("guid-1.host1.com")), icalproperty_vanew_organizer( - strdup("mrbig@host.com"), + strdup("mailto:mrbig@host.com"), icalparameter_new_role(ICAL_ROLE_CHAIR), 0 ), icalproperty_vanew_attendee( - strdup("employee-A@host.com"), + strdup("mailto:employee-A@host.com"), icalparameter_new_role(ICAL_ROLE_REQPARTICIPANT), icalparameter_new_rsvp(1), icalparameter_new_cutype(ICAL_CUTYPE_GROUP), @@ -515,18 +519,6 @@ void test_parameters() } -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; |