aboutsummaryrefslogtreecommitdiffstats
path: root/calendar/cal-util/cal-util.c
diff options
context:
space:
mode:
authorFederico Mena Quintero <federico@helixcode.com>2000-03-28 16:05:08 +0800
committerFederico Mena Quintero <federico@src.gnome.org>2000-03-28 16:05:08 +0800
commit8f6adf987eabf47bbe8266f6a0f29de1e7ce2e68 (patch)
tree5d1d1b5f14f7f5f28893bf4f2a3cd14541642b58 /calendar/cal-util/cal-util.c
parent8b355664ab9cabed3c0dd1ec25dba20a8e2827a9 (diff)
downloadgsoc2013-evolution-8f6adf987eabf47bbe8266f6a0f29de1e7ce2e68.tar
gsoc2013-evolution-8f6adf987eabf47bbe8266f6a0f29de1e7ce2e68.tar.gz
gsoc2013-evolution-8f6adf987eabf47bbe8266f6a0f29de1e7ce2e68.tar.bz2
gsoc2013-evolution-8f6adf987eabf47bbe8266f6a0f29de1e7ce2e68.tar.lz
gsoc2013-evolution-8f6adf987eabf47bbe8266f6a0f29de1e7ce2e68.tar.xz
gsoc2013-evolution-8f6adf987eabf47bbe8266f6a0f29de1e7ce2e68.tar.zst
gsoc2013-evolution-8f6adf987eabf47bbe8266f6a0f29de1e7ce2e68.zip
Use ical_object_to_string().
2000-03-27 Federico Mena Quintero <federico@helixcode.com> * pcs/cal-backend.c (cal_backend_get_object): Use ical_object_to_string(). * cal-util/calobj.c (ical_object_to_string): Moved over from pcs/cal-backend.c (was string_from_ical_object). (get_calendar_base_vobject): Likewise, moved over from pcs/cal-backend.c. * cal-util/cal-util.c: Removed string_to_ical_object(); the correct function is in calobj.[ch], called ical_object_find_in_string(). Removed ical_object_to_string, since we now implement it in calobj.c. * cal-util/calobj.c: Removed ical_object_new_from_string(); see above. * idl/evolution-calendar.idl (CalObjInstance): Calendar object instances now contain only the UID for the object, not the whole string representation of the object. This allows clients to implement caching of objects if they wish. * pcs/cal.c (Cal_get_events_in_range): Likewise. * pcs/cal-backend.c (build_event_list): Likewise. * cal-client/cal-client.c (cal_client_get_events_in_range): Likewise. * cal-util/cal-util.h (CalObjInstance): Likewise. * cal-util/cal-util.c (cal_obj_instance_list_free): Likewise. (cal_obj_uid_list_free): Assert that the UIDs in the list are not NULL. * pcs/tlacuache.gnorba (repo_id): The calendar factory also supports the Unknown interface. svn path=/trunk/; revision=2211
Diffstat (limited to 'calendar/cal-util/cal-util.c')
-rw-r--r--calendar/cal-util/cal-util.c76
1 files changed, 2 insertions, 74 deletions
diff --git a/calendar/cal-util/cal-util.c b/calendar/cal-util/cal-util.c
index c49045c141..fc5a22dae9 100644
--- a/calendar/cal-util/cal-util.c
+++ b/calendar/cal-util/cal-util.c
@@ -43,10 +43,8 @@ cal_obj_instance_list_free (GList *list)
g_assert (i != NULL);
g_assert (i->uid != NULL);
- g_assert (i->calobj != NULL);
g_free (i->uid);
- g_free (i->calobj);
g_free (i);
}
@@ -68,80 +66,10 @@ cal_obj_uid_list_free (GList *list)
char *uid;
uid = l->data;
+
+ g_assert (uid != NULL);
g_free (uid);
}
g_list_free (list);
}
-
-
-#warning FIXME -- do we need a complete calendar here? should we use libical instead of libversit? can this be the same as string_from_ical_object in cal-backend.c?
-char *ical_object_to_string (iCalObject *ico)
-{
- VObject *vobj;
- char *buf;
-
- vobj = ical_object_to_vobject (ico);
- buf = writeMemVObject (NULL, NULL, vobj);
- cleanStrTbl ();
- return buf;
-}
-
-iCalObject *string_to_ical_object (char *buffer)
-{
- /* FIX ME */
-#if 0
- /* something */
- VObject *vcal;
- vcal = Parse_MIME (buffer, strlen (buffer));
-#endif /* 0 */
- return NULL;
-}
-
-
-#if 0
-this is the one from calendar.c:
-
-/*
- * calendar_string_from_object:
- *
- * Returns the iCalObject @object armored around a vCalendar
- * object as a string.
- */
-char *
-calendar_string_from_object (iCalObject *object)
-{
- Calendar *cal;
- char *str;
-
- g_return_val_if_fail (object != NULL, NULL);
-
- cal = calendar_new ("Temporal",CALENDAR_INIT_NIL);
- calendar_add_object (cal, object);
- str = calendar_get_as_vcal_string (cal);
- calendar_remove_object (cal, object);
-
- calendar_destroy (cal);
-
- return str;
-}
-
-char *
-calendar_get_as_vcal_string (Calendar *cal)
-{
- VObject *vcal;
- char *result;
-
- g_return_val_if_fail (cal != NULL, NULL);
-
- vcal = vcalendar_create_from_calendar (cal);
- result = writeMemVObject (NULL, 0, vcal);
-
- cleanVObject (vcal);
- cleanStrTbl ();
-
- return result;
-}
-
-#endif /* 0 */
-