2 ======================================================================
4 CREATOR: eric 03 April 1999
8 $Id: usecases.c,v 1.3 2008-01-02 20:07:29 dothebart Exp $
11 (C) COPYRIGHT 1999 Eric Busboom
12 http://www.softwarestudio.org
14 The contents of this file are subject to the Mozilla Public License
15 Version 1.0 (the "License"); you may not use this file except in
16 compliance with the License. You may obtain a copy of the License at
17 http://www.mozilla.org/MPL/
19 Software distributed under the License is distributed on an "AS IS"
20 basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
21 the License for the specific language governing rights and
22 limitations under the License.
24 The original author is Eric Busboom
25 The original code is usecases.c
28 ======================================================================*/
30 #include <libical/ical.h>
32 #include <string.h> /* for strdup */
33 #include <stdlib.h> /* for malloc */
34 #include <stdio.h> /* for printf */
35 #include <time.h> /* for time() */
37 char str[] = "BEGIN:VCALENDAR\
38 PRODID:\"-//RDU Software//NONSGML HandCal//EN\"\
41 DTSTAMP:19980309T231000Z\
43 ORGANIZER;ROLE=CHAIR:MAILTO:mrbig@host.com\
44 ATTENDEE;RSVP=TRUE;ROLE=REQ-PARTICIPANT;CUTYPE=GROUP:MAILTO:employee-A@host.com\
45 DESCRIPTION:Project XYZ Review Meeting\
47 CREATED:19980309T130000Z\
48 SUMMARY:XYZ Project Review\
49 DTSTART;TZID=US-Eastern:19980312T083000\
50 DTEND;TZID=US-Eastern:19980312T093000\
57 /* Here are some ways to work with values. */
64 v = icalvalue_new_caladdress("cap://value/1");
65 printf("caladdress 1: %s\n",icalvalue_get_caladdress(v));
67 icalvalue_set_caladdress(v,"cap://value/2");
68 printf("caladdress 2: %s\n",icalvalue_get_caladdress(v));
69 str = icalvalue_as_ical_string_r(v));
70 printf("String: %s\n", str);
73 copy = icalvalue_new_clone(v);
74 str = icalvalue_as_ical_string_r(v);
75 printf("Clone: %s\n", str);
83 void test_parameters()
88 p = icalparameter_new_cn("A Common Name");
90 printf("Common Name: %s\n",icalparameter_get_cn(p));
92 str = icalparameter_as_ical_string_r(p));
93 printf("As String: %s\n", str);