[Evolution-hackers] Creating objects in ECal
- From: "Teresa Thomas" <tere ertw gmail com>
- To: evolution-hackers gnome org
- Subject: [Evolution-hackers] Creating objects in ECal
- Date: Wed, 26 Jul 2006 17:46:11 -0400
I am trying to add an event into my ECal, using the following code:
...
// Convert vevent into iCalComponent
icalcomponent* iCalComp = icalcomponent_new_from_string(Filecontents);
// Create an object in calendar
gboolean is_create = e_cal_create_object(ecal, iCalComp, (char **)&uid, &error);
printf("%s%d","Did event add successfully? = ",is_create);
printf("%s%s","\nError message = ",error->message);
g_error_free (error);
...
where my Filecontents is a (sample) string that contains the following:
BEGIN:VEVENT
UID:20060901T130000Z-123402 host com
DTSTAMP:20060901T1300Z
DTSTART:20060401T163000Z
DTEND:20060402T010000Z
SUMMARY:Claudia is in sensitivity awareness class.
CLASS:PUBLIC
CATEGORIES:BUSINESS,HUMAN RESOURCES
TRANSP:TRANSPARENT
END:VEVENT
The first time I run the program, I get a pop-up box saying that the application has quit unexpectedly. But when I run it again, the GError contains the message that
Object ID already exists.
At the same time, I cannot see the event on my evolution calendar.
It behaves similarly when I use the e_cal_remove_object() function. First time running, gives the pop-up box and after that GError contains the message that
Object ID not found.
Am I missing something?
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]