[evolution-patches] ECal bindings in evolution-sharp.
- From: Veerapuram Varadhan <vvaradhan novell com>
- To: evo-patches <evolution-patches lists ximian com>
- Cc: KHarish <KHarish novell com>, mkestner novell com
- Subject: [evolution-patches] ECal bindings in evolution-sharp.
- Date: Tue, 05 Jul 2005 15:17:16 +0530
Hi,
Attached patch exposes a limited-edition of ECal APIs through
evolution-sharp.
The code is organized into
1) a glue-code in "C".
2) Wrapper classes in C#.
Glue-code in "C" is mainly used to convert between ical and ecal
components.
Wrapper classes uses the glue-code and creates a
minimalistic-representation of ECal in C#. Only, a few fields are
exposed as of now and can be extended to support many other fields
later.
Kindly let me know your comments/suggestions/concerns. :-)
TIA,
V. Varadhan
? evo-sharp-cal-bindings.diff
? glue
? evolution/Cal.custom
? evolution/CalView.custom
? evolution/TestCal.cs
? evolution/evolution-api-new.raw
? evolution/evolution-api-orig.raw
? evolution/src
Index: Makefile.am
===================================================================
RCS file: /cvs/gnome/evolution-sharp/Makefile.am,v
retrieving revision 1.3
diff -u -p -r1.3 Makefile.am
--- Makefile.am 27 Aug 2004 22:34:57 -0000 1.3
+++ Makefile.am 5 Jul 2005 08:50:17 -0000
@@ -1,4 +1,4 @@
-SUBDIRS = evolution
+SUBDIRS = glue evolution
pkgconfigdir = $(libdir)/pkgconfig
pkgconfig_DATA = evolution-sharp.pc
Index: configure.in
===================================================================
RCS file: /cvs/gnome/evolution-sharp/configure.in,v
retrieving revision 1.17
diff -u -p -r1.17 configure.in
--- configure.in 16 Mar 2005 02:06:55 -0000 1.17
+++ configure.in 5 Jul 2005 08:50:17 -0000
@@ -5,6 +5,7 @@ AM_INIT_AUTOMAKE(evolution-sharp, 0.7)
AM_MAINTAINER_MODE
AC_PROG_INSTALL
+AM_PROG_LIBTOOL
AC_PATH_PROG(PKG_CONFIG, pkg-config, no)
if test "x$PKG_CONFIG" = "xno"; then
@@ -59,10 +60,17 @@ if test "x$GAPI_FIXUP" = "xno"; then
AC_MSG_ERROR([You need to install gtk-sharp-gapi])
fi
+LIBECAL_PKG_NAME="libecal$EDS_VERSION"
+PKG_CHECK_MODULES(LIBECAL, $LIBECAL_PKG_NAME >= 1.2.0)
+AC_SUBST(LIBECAL_CFLAGS)
+AC_SUBST(LIBECAL_LIBS)
+
API_VERSION=1.0.0.0
AC_SUBST(API_VERSION)
AC_OUTPUT([
+glue/Makefile
+glue/cal/Makefile
evolution/Makefile
evolution/AssemblyInfo.cs
evolution/evolution-sharp.dll.config
Index: sources.xml
===================================================================
RCS file: /cvs/gnome/evolution-sharp/sources.xml,v
retrieving revision 1.4
diff -u -p -r1.4 sources.xml
--- sources.xml 1 Jun 2004 22:29:15 -0000 1.4
+++ sources.xml 5 Jul 2005 08:50:17 -0000
@@ -15,5 +15,13 @@
<file>../evolution-data-server/libedataserver/e-source.h</file>
</namespace>
</library>
+ <library name="ecal">
+ <namespace name="E">
+ <file>../evolution-data-server/calendar/libecal/e-cal-view.c</file>
+ <file>../evolution-data-server/calendar/libecal/e-cal-view.h</file>
+ <file>../evolution-data-server/calendar/libecal/e-cal.c</file>
+ <file>../evolution-data-server/calendar/libecal/e-cal.h</file>
+ </namespace>
+ </library>
</api>
</gapi-parser-input>
Index: evolution/Evolution.metadata
===================================================================
RCS file: /cvs/gnome/evolution-sharp/evolution/Evolution.metadata,v
retrieving revision 1.6
diff -u -p -r1.6 Evolution.metadata
--- evolution/Evolution.metadata 13 Mar 2005 21:55:22 -0000 1.6
+++ evolution/Evolution.metadata 5 Jul 2005 08:50:17 -0000
@@ -17,5 +17,10 @@
<attr path="/api/namespace/object[ cname='EDestination']/method[ name='SetRaw']" name="name">SetRawDestination</attr>
<attr path="/api/namespace/object[ cname='ESource']/method[ name='GetProperty']" name="name">GetSourceProperty</attr>
<attr path="/api/namespace/struct[ cname='EBookListenerResponse']" name="hidden">1</attr>
+ <attr path="/api/namespace/object[ cname='ECal']/method[ name='GetItemsFromSource']" name="hidden">1</attr>
+ <attr path="/api/namespace/object[ cname='ECal']/method[ name='GetItemsFromSourceOccurInRange']" name="hidden">1</attr>
+ <attr path="/api/namespace/object[ cname='ECal']/method[ name='GetObjectList']" name="hidden">1</attr>
+ <attr path="/api/namespace/object[ cname='ECal']/method[ name='GetObjectListAsComp']" name="hidden">1</attr>
+ <attr path="/api/namespace/object[ cname='ECal']/method[ name='GetQuery']" name="hidden">1</attr>
<attr path="/api/namespace" name="name">Evolution</attr>
</metadata>
Index: evolution/Makefile.am
===================================================================
RCS file: /cvs/gnome/evolution-sharp/evolution/Makefile.am,v
retrieving revision 1.13
diff -u -p -r1.13 Makefile.am
--- evolution/Makefile.am 2 Nov 2004 22:34:06 -0000 1.13
+++ evolution/Makefile.am 5 Jul 2005 08:50:17 -0000
@@ -13,14 +13,19 @@ CLEANFILES = $(ASSEMBLY) generated-stamp
DISTCLEANFILES = $(ASSEMBLY).config AssemblyInfo.cs
sources = \
- #
+ src/CalUtil.cs \
+ src/CalComponent.cs \
+ src/CalGlueComponentUtil.cs \
+ src/ObjectsAddedHandler.cs
build_sources = $(addprefix $(srcdir)/, $(sources)) AssemblyInfo.cs
customs = \
Book.custom \
Contact.custom \
- ContactPhoto.custom
+ ContactPhoto.custom \
+ Cal.custom \
+ CalView.custom
build_customs = $(addprefix $(srcdir)/, $(customs))
Index: evolution/evolution-api.raw
===================================================================
RCS file: /cvs/gnome/evolution-sharp/evolution/evolution-api.raw,v
retrieving revision 1.2
diff -u -p -r1.2 evolution-api.raw
--- evolution/evolution-api.raw 13 Mar 2005 21:55:22 -0000 1.2
+++ evolution/evolution-api.raw 5 Jul 2005 08:50:18 -0000
@@ -1697,4 +1697,503 @@
</method>
</object>
</namespace>
+ <namespace name="E" library="ecal">
+ <enum name="CalLoadState" cname="ECalLoadState" type="enum">
+ <member cname="E_CAL_LOAD_NOT_LOADED" name="NotLoaded"/>
+ <member cname="E_CAL_LOAD_AUTHENTICATING" name="Authenticating"/>
+ <member cname="E_CAL_LOAD_LOADING" name="Loading"/>
+ <member cname="E_CAL_LOAD_LOADED" name="Loaded"/>
+ </enum>
+ <enum name="CalSetModeStatus" cname="ECalSetModeStatus" type="enum">
+ <member cname="E_CAL_SET_MODE_SUCCESS" name="Success"/>
+ <member cname="E_CAL_SET_MODE_ERROR" name="Error"/>
+ <member cname="E_CAL_SET_MODE_NOT_SUPPORTED" name="NotSupported"/>
+ </enum>
+ <enum name="CalSourceType" cname="ECalSourceType" type="enum">
+ <member cname="E_CAL_SOURCE_TYPE_EVENT" name="Event"/>
+ <member cname="E_CAL_SOURCE_TYPE_TODO" name="Todo"/>
+ <member cname="E_CAL_SOURCE_TYPE_JOURNAL" name="Journal"/>
+ <member cname="E_CAL_SOURCE_TYPE_LAST" name="Last"/>
+ </enum>
+ <callback name="CalAuthFunc" cname="ECalAuthFunc">
+ <return-type type="char*"/>
+ <parameters>
+ <parameter type="ECal*" name="ecal"/>
+ <parameter type="const-char*" name="prompt"/>
+ <parameter type="const-char*" name="key"/>
+ <parameter type="gpointer" name="user_data"/>
+ </parameters>
+ </callback>
+ <object name="Cal" cname="ECal" parent="GObject">
+ <field cname="priv" type="ECalPrivate*"/>
+ <signal name="CalOpened" cname="cal_opened" when="FIRST">
+ <return-type type="void"/>
+ <parameters>
+ <parameter type="ECal*" name="ecal"/>
+ <parameter type="ECalendarStatus" name="status"/>
+ </parameters>
+ </signal>
+ <signal name="CalSetMode" cname="cal_set_mode" when="FIRST">
+ <return-type type="void"/>
+ <parameters>
+ <parameter type="ECal*" name="ecal"/>
+ <parameter type="ECalSetModeStatus" name="status"/>
+ <parameter type="CalMode" name="mode"/>
+ </parameters>
+ </signal>
+ <signal name="BackendError" cname="backend_error" when="FIRST">
+ <return-type type="void"/>
+ <parameters>
+ <parameter type="ECal*" name="ecal"/>
+ <parameter type="const-char*" name="message"/>
+ </parameters>
+ </signal>
+ <signal name="BackendDied" cname="backend_died" when="FIRST">
+ <return-type type="void"/>
+ <parameters>
+ <parameter type="ECal*" name="ecal"/>
+ </parameters>
+ </signal>
+ <method name="AddTimezone" cname="e_cal_add_timezone">
+ <return-type type="gboolean"/>
+ <parameters>
+ <parameter type="icaltimezone*" name="izone"/>
+ <parameter type="GError**" name="error"/>
+ </parameters>
+ </method>
+ <method name="CreateObject" cname="e_cal_create_object">
+ <return-type type="gboolean"/>
+ <parameters>
+ <parameter type="icalcomponent*" name="icalcomp"/>
+ <parameter type="char**" name="uid"/>
+ <parameter type="GError**" name="error"/>
+ </parameters>
+ </method>
+ <method name="DiscardAlarm" cname="e_cal_discard_alarm">
+ <return-type type="gboolean"/>
+ <parameters>
+ <parameter type="ECalComponent*" name="comp"/>
+ <parameter type="const-char*" name="auid"/>
+ <parameter type="GError**" name="error"/>
+ </parameters>
+ </method>
+ <method name="FreeAlarms" cname="e_cal_free_alarms" shared="true">
+ <return-type type="void"/>
+ <parameters>
+ <parameter type="GSList*" name="comp_alarms"/>
+ </parameters>
+ </method>
+ <method name="FreeChangeList" cname="e_cal_free_change_list" shared="true">
+ <return-type type="void"/>
+ <parameters>
+ <parameter type="GList*" name="list"/>
+ </parameters>
+ </method>
+ <method name="FreeObjectList" cname="e_cal_free_object_list" shared="true">
+ <return-type type="void"/>
+ <parameters>
+ <parameter type="GList*" name="objects"/>
+ </parameters>
+ </method>
+ <method name="GenerateInstances" cname="e_cal_generate_instances">
+ <return-type type="void"/>
+ <parameters>
+ <parameter type="time_t" name="start"/>
+ <parameter type="time_t" name="end"/>
+ <parameter type="ECalRecurInstanceFn" name="cb"/>
+ <parameter type="gpointer" name="cb_data"/>
+ </parameters>
+ </method>
+ <method name="GenerateInstancesForObject" cname="e_cal_generate_instances_for_object">
+ <return-type type="void"/>
+ <parameters>
+ <parameter type="icalcomponent*" name="icalcomp"/>
+ <parameter type="time_t" name="start"/>
+ <parameter type="time_t" name="end"/>
+ <parameter type="ECalRecurInstanceFn" name="cb"/>
+ <parameter type="gpointer" name="cb_data"/>
+ </parameters>
+ </method>
+ <method name="GetAlarmEmailAddress" cname="e_cal_get_alarm_email_address">
+ <return-type type="gboolean"/>
+ <parameters>
+ <parameter type="char**" name="alarm_address"/>
+ <parameter type="GError**" name="error"/>
+ </parameters>
+ </method>
+ <method name="GetAlarmsForObject" cname="e_cal_get_alarms_for_object">
+ <return-type type="gboolean"/>
+ <parameters>
+ <parameter type="const-char*" name="uid"/>
+ <parameter type="time_t" name="start"/>
+ <parameter type="time_t" name="end"/>
+ <parameter type="ECalComponentAlarms**" name="alarms"/>
+ </parameters>
+ </method>
+ <method name="GetAlarmsInRange" cname="e_cal_get_alarms_in_range">
+ <return-type type="GSList*"/>
+ <parameters>
+ <parameter type="time_t" name="start"/>
+ <parameter type="time_t" name="end"/>
+ </parameters>
+ </method>
+ <method name="GetCalAddress" cname="e_cal_get_cal_address">
+ <return-type type="gboolean"/>
+ <parameters>
+ <parameter type="char**" name="cal_address"/>
+ <parameter type="GError**" name="error"/>
+ </parameters>
+ </method>
+ <method name="GetChanges" cname="e_cal_get_changes">
+ <return-type type="gboolean"/>
+ <parameters>
+ <parameter type="const-char*" name="change_id"/>
+ <parameter type="GList**" name="changes"/>
+ <parameter type="GError**" name="error"/>
+ </parameters>
+ </method>
+ <method name="GetComponentAsString" cname="e_cal_get_component_as_string">
+ <return-type type="char*"/>
+ <parameters>
+ <parameter type="icalcomponent*" name="icalcomp"/>
+ </parameters>
+ </method>
+ <method name="GetDefaultObject" cname="e_cal_get_default_object">
+ <return-type type="gboolean"/>
+ <parameters>
+ <parameter type="icalcomponent**" name="icalcomp"/>
+ <parameter type="GError**" name="error"/>
+ </parameters>
+ </method>
+ <method name="GetErrorMessage" cname="e_cal_get_error_message" shared="true">
+ <return-type type="const-char*"/>
+ <parameters>
+ <parameter type="ECalendarStatus" name="status"/>
+ </parameters>
+ </method>
+ <method name="GetFreeBusy" cname="e_cal_get_free_busy">
+ <return-type type="gboolean"/>
+ <parameters>
+ <parameter type="GList*" name="users"/>
+ <parameter type="time_t" name="start"/>
+ <parameter type="time_t" name="end"/>
+ <parameter type="GList**" name="freebusy"/>
+ <parameter type="GError**" name="error"/>
+ </parameters>
+ </method>
+ <method name="GetItemsFromSource" cname="e_cal_get_items_from_source" shared="true">
+ <return-type type="GSList*"/>
+ <parameters>
+ <parameter type="ESource*" name="source"/>
+ <parameter type="ECalSourceType" name="type"/>
+ <parameter type="const-char*" name="query"/>
+ <parameter type="GError**" name="error"/>
+ </parameters>
+ </method>
+ <method name="GetItemsFromSourceOccurInRange" cname="e_cal_get_items_from_source_occur_in_range" shared="true">
+ <return-type type="GSList*"/>
+ <parameters>
+ <parameter type="ESource*" name="source"/>
+ <parameter type="ECalSourceType" name="type"/>
+ <parameter type="time_t" name="start_date_time"/>
+ <parameter type="time_t" name="end_date_time"/>
+ <parameter type="GError**" name="error"/>
+ </parameters>
+ </method>
+ <method name="GetLdapAttribute" cname="e_cal_get_ldap_attribute">
+ <return-type type="gboolean"/>
+ <parameters>
+ <parameter type="char**" name="ldap_attribute"/>
+ <parameter type="GError**" name="error"/>
+ </parameters>
+ </method>
+ <method name="GetLoadState" cname="e_cal_get_load_state">
+ <return-type type="ECalLoadState"/>
+ </method>
+ <method name="GetLocalAttachmentStore" cname="e_cal_get_local_attachment_store">
+ <return-type type="const-char*"/>
+ </method>
+ <method name="GetObject" cname="e_cal_get_object">
+ <return-type type="gboolean"/>
+ <parameters>
+ <parameter type="const-char*" name="uid"/>
+ <parameter type="const-char*" name="rid"/>
+ <parameter type="icalcomponent**" name="icalcomp"/>
+ <parameter type="GError**" name="error"/>
+ </parameters>
+ </method>
+ <method name="GetObjectList" cname="e_cal_get_object_list">
+ <return-type type="gboolean"/>
+ <parameters>
+ <parameter type="const-char*" name="query"/>
+ <parameter type="GList**" name="objects"/>
+ <parameter type="GError**" name="error"/>
+ </parameters>
+ </method>
+ <method name="GetObjectListAsComp" cname="e_cal_get_object_list_as_comp">
+ <return-type type="gboolean"/>
+ <parameters>
+ <parameter type="const-char*" name="query"/>
+ <parameter type="GList**" name="objects"/>
+ <parameter type="GError**" name="error"/>
+ </parameters>
+ </method>
+ <method name="GetObjectsForUid" cname="e_cal_get_objects_for_uid">
+ <return-type type="gboolean"/>
+ <parameters>
+ <parameter type="const-char*" name="uid"/>
+ <parameter type="GList**" name="objects"/>
+ <parameter type="GError**" name="error"/>
+ </parameters>
+ </method>
+ <method name="GetOneAlarmOnly" cname="e_cal_get_one_alarm_only">
+ <return-type type="gboolean"/>
+ </method>
+ <method name="GetOrganizerMustAccept" cname="e_cal_get_organizer_must_accept">
+ <return-type type="gboolean"/>
+ </method>
+ <method name="GetOrganizerMustAttend" cname="e_cal_get_organizer_must_attend">
+ <return-type type="gboolean"/>
+ </method>
+ <method name="GetQuery" cname="e_cal_get_query">
+ <return-type type="gboolean"/>
+ <parameters>
+ <parameter type="const-char*" name="sexp"/>
+ <parameter type="ECalView**" name="query"/>
+ <parameter type="GError**" name="error"/>
+ </parameters>
+ </method>
+ <method name="GetSaveSchedules" cname="e_cal_get_save_schedules">
+ <return-type type="gboolean"/>
+ </method>
+ <method name="GetSource" cname="e_cal_get_source">
+ <return-type type="ESource*"/>
+ </method>
+ <method name="GetSourceType" cname="e_cal_get_source_type">
+ <return-type type="ECalSourceType"/>
+ </method>
+ <method name="GetSources" cname="e_cal_get_sources" shared="true">
+ <return-type type="gboolean"/>
+ <parameters>
+ <parameter type="ESourceList**" name="sources"/>
+ <parameter type="ECalSourceType" name="type"/>
+ <parameter type="GError**" name="error"/>
+ </parameters>
+ </method>
+ <method name="GetStaticCapability" cname="e_cal_get_static_capability">
+ <return-type type="gboolean"/>
+ <parameters>
+ <parameter type="const-char*" name="cap"/>
+ </parameters>
+ </method>
+ <method name="GetTimezone" cname="e_cal_get_timezone">
+ <return-type type="gboolean"/>
+ <parameters>
+ <parameter type="const-char*" name="tzid"/>
+ <parameter type="icaltimezone**" name="zone"/>
+ <parameter type="GError**" name="error"/>
+ </parameters>
+ </method>
+ <method name="GetType" cname="e_cal_get_type" shared="true">
+ <return-type type="GType"/>
+ </method>
+ <method name="GetUri" cname="e_cal_get_uri">
+ <return-type type="const-char*"/>
+ </method>
+ <method name="IsReadOnly" cname="e_cal_is_read_only">
+ <return-type type="gboolean"/>
+ <parameters>
+ <parameter type="gboolean*" name="read_only"/>
+ <parameter type="GError**" name="error"/>
+ </parameters>
+ </method>
+ <method name="ModifyObject" cname="e_cal_modify_object">
+ <return-type type="gboolean"/>
+ <parameters>
+ <parameter type="icalcomponent*" name="icalcomp"/>
+ <parameter type="CalObjModType" name="mod"/>
+ <parameter type="GError**" name="error"/>
+ </parameters>
+ </method>
+ <constructor cname="e_cal_new">
+ <parameters>
+ <parameter type="ESource*" name="source"/>
+ <parameter type="ECalSourceType" name="type"/>
+ </parameters>
+ </constructor>
+ <constructor cname="e_cal_new_from_uri">
+ <parameters>
+ <parameter type="const-gchar*" name="uri"/>
+ <parameter type="ECalSourceType" name="type"/>
+ </parameters>
+ </constructor>
+ <constructor cname="e_cal_new_system_calendar"/>
+ <constructor cname="e_cal_new_system_tasks"/>
+ <method name="Open" cname="e_cal_open">
+ <return-type type="gboolean"/>
+ <parameters>
+ <parameter type="gboolean" name="only_if_exists"/>
+ <parameter type="GError**" name="error"/>
+ </parameters>
+ </method>
+ <method name="OpenAsync" cname="e_cal_open_async">
+ <return-type type="void"/>
+ <parameters>
+ <parameter type="gboolean" name="only_if_exists"/>
+ </parameters>
+ </method>
+ <method name="OpenDefault" cname="e_cal_open_default">
+ <return-type type="gboolean"/>
+ <parameters>
+ <parameter type="ECalSourceType" name="type"/>
+ <parameter type="ECalAuthFunc" name="func"/>
+ <parameter type="gpointer" name="data"/>
+ <parameter type="GError**" name="error"/>
+ </parameters>
+ </method>
+ <method name="OpenStatusEnumGetType" cname="e_cal_open_status_enum_get_type" shared="true">
+ <return-type type="GType"/>
+ </method>
+ <method name="ReceiveObjects" cname="e_cal_receive_objects">
+ <return-type type="gboolean"/>
+ <parameters>
+ <parameter type="icalcomponent*" name="icalcomp"/>
+ <parameter type="GError**" name="error"/>
+ </parameters>
+ </method>
+ <method name="Remove" cname="e_cal_remove">
+ <return-type type="gboolean"/>
+ <parameters>
+ <parameter type="GError**" name="error"/>
+ </parameters>
+ </method>
+ <method name="RemoveObject" cname="e_cal_remove_object">
+ <return-type type="gboolean"/>
+ <parameters>
+ <parameter type="const-char*" name="uid"/>
+ <parameter type="GError**" name="error"/>
+ </parameters>
+ </method>
+ <method name="RemoveObjectWithMod" cname="e_cal_remove_object_with_mod">
+ <return-type type="gboolean"/>
+ <parameters>
+ <parameter type="const-char*" name="uid"/>
+ <parameter type="const-char*" name="rid"/>
+ <parameter type="CalObjModType" name="mod"/>
+ <parameter type="GError**" name="error"/>
+ </parameters>
+ </method>
+ <method name="ResolveTzidCb" cname="e_cal_resolve_tzid_cb" shared="true">
+ <return-type type="icaltimezone*"/>
+ <parameters>
+ <parameter type="const-char*" name="tzid"/>
+ <parameter type="gpointer" name="data"/>
+ </parameters>
+ </method>
+ <method name="SendObjects" cname="e_cal_send_objects">
+ <return-type type="gboolean"/>
+ <parameters>
+ <parameter type="icalcomponent*" name="icalcomp"/>
+ <parameter type="GList**" name="users"/>
+ <parameter type="icalcomponent**" name="modified_icalcomp"/>
+ <parameter type="GError**" name="error"/>
+ </parameters>
+ </method>
+ <method name="SetAuthFunc" cname="e_cal_set_auth_func">
+ <return-type type="void"/>
+ <parameters>
+ <parameter type="ECalAuthFunc" name="func"/>
+ <parameter type="gpointer" name="data"/>
+ </parameters>
+ </method>
+ <method name="SetDefault" cname="e_cal_set_default">
+ <return-type type="gboolean"/>
+ <parameters>
+ <parameter type="GError**" name="error"/>
+ </parameters>
+ </method>
+ <method name="SetDefaultSource" cname="e_cal_set_default_source" shared="true">
+ <return-type type="gboolean"/>
+ <parameters>
+ <parameter type="ESource*" name="source"/>
+ <parameter type="ECalSourceType" name="type"/>
+ <parameter type="GError**" name="error"/>
+ </parameters>
+ </method>
+ <method name="SetDefaultTimezone" cname="e_cal_set_default_timezone">
+ <return-type type="gboolean"/>
+ <parameters>
+ <parameter type="icaltimezone*" name="zone"/>
+ <parameter type="GError**" name="error"/>
+ </parameters>
+ </method>
+ <method name="SetMode" cname="e_cal_set_mode">
+ <return-type type="gboolean"/>
+ <parameters>
+ <parameter type="CalMode" name="mode"/>
+ </parameters>
+ </method>
+ <method name="UriList" cname="e_cal_uri_list">
+ <return-type type="GList*"/>
+ <parameters>
+ <parameter type="CalMode" name="mode"/>
+ </parameters>
+ </method>
+ </object>
+ <object name="CalView" cname="ECalView" parent="GObject">
+ <field cname="priv" type="ECalViewPrivate*"/>
+ <property name="" cname="" type=""/>
+ <property name="" cname="" type=""/>
+ <property name="" cname="" type=""/>
+ <signal name="ObjectsModified" cname="objects_modified" when="FIRST">
+ <return-type type="void"/>
+ <parameters>
+ <parameter type="ECalView*" name="view"/>
+ <parameter type="GList*" name="objects"/>
+ </parameters>
+ </signal>
+ <signal name="ObjectsRemoved" cname="objects_removed" when="FIRST">
+ <return-type type="void"/>
+ <parameters>
+ <parameter type="ECalView*" name="view"/>
+ <parameter type="GList*" name="uids"/>
+ </parameters>
+ </signal>
+ <signal name="ViewProgress" cname="view_progress" when="FIRST">
+ <return-type type="void"/>
+ <parameters>
+ <parameter type="ECalView*" name="view"/>
+ <parameter type="char*" name="message"/>
+ <parameter type="int" name="percent"/>
+ </parameters>
+ </signal>
+ <signal name="ViewDone" cname="view_done" when="FIRST">
+ <return-type type="void"/>
+ <parameters>
+ <parameter type="ECalView*" name="view"/>
+ <parameter type="ECalendarStatus" name="status"/>
+ </parameters>
+ </signal>
+ <virtual_method name="ObjectsAdded" cname="objects_added">
+ <return-type type="void"/>
+ <parameters>
+ <parameter type="ECalView*" name="view"/>
+ <parameter type="GList*" name="objects"/>
+ </parameters>
+ </virtual_method>
+ <method name="GetType" cname="e_cal_view_get_type" shared="true">
+ <return-type type="GType"/>
+ </method>
+ <constructor cname="e_cal_view_new">
+ <parameters>
+ <parameter type="GNOME_Evolution_Calendar_CalView" name="corba_view"/>
+ <parameter type="ECalViewListener*" name="listener"/>
+ <parameter type="_ECal*" name="client"/>
+ </parameters>
+ </constructor>
+ <method name="Start" cname="e_cal_view_start">
+ <return-type type="void"/>
+ </method>
+ </object>
+ </namespace>
</api>
--- /dev/null 2005-03-20 01:06:14.000000000 +0530
+++ glue/Makefile.am 2005-07-05 14:55:42.000000000 +0530
@@ -0,0 +1 @@
+SUBDIRS = cal
--- /dev/null 2005-03-20 01:06:14.000000000 +0530
+++ glue/cal/e-cal-glue.c 2005-07-04 17:18:22.000000000 +0530
@@ -0,0 +1,328 @@
+#include <string.h>
+#include <libecal/e-cal.h>
+#include <libecal/e-cal-time-util.h>
+#include <libical/ical.h>
+
+#include "e-cal-glue-comp.h"
+
+icalproperty_kind ical_props[] = { ICAL_ATTENDEE_PROPERTY,
+ ICAL_CATEGORIES_PROPERTY,
+ ICAL_COMMENT_PROPERTY,
+ ICAL_DESCRIPTION_PROPERTY,
+ ICAL_LOCATION_PROPERTY,
+ ICAL_SUMMARY_PROPERTY,
+ ICAL_DTSTART_PROPERTY,
+ ICAL_DTEND_PROPERTY,
+ -1 };
+
+
+GSList* e_cal_glue_from_ecal_comp_objects_to_glue_components (GList* ecal_comp_objects);
+
+ECalGlueComponent*
+get_ecal_comp_properties (ECalComponent* comp)
+{
+
+ GSList* attendee_list = NULL;
+ GSList* category_list = NULL;
+ GSList* comment_list = NULL;
+ GSList* summary_list = NULL;
+ GSList* desc_list = NULL;
+ GSList* location_list = NULL;
+
+ GSList* comp_attendee_list = NULL;
+ GSList* comp_comment_list = NULL;
+ GSList* comp_desc_list = NULL;
+ GSList* l = NULL;
+ ECalComponentText summary;
+
+ ECalComponentAttendee *a = NULL;
+ ECalComponentText *t = NULL;
+ ECalComponentDateTime dt;
+
+ ECalGlueComponent* glue_comp = NULL;
+
+ char* location = NULL;
+ char* buf;
+
+ time_t dtstart;
+ time_t dtend;
+ struct tm stm;
+
+ e_cal_component_get_attendee_list (comp, &comp_attendee_list);
+ e_cal_component_get_categories_list (comp, &category_list);
+ e_cal_component_get_description_list (comp, &comp_desc_list);
+ e_cal_component_get_summary (comp, &summary);
+ e_cal_component_get_comment_list (comp, &comp_comment_list);
+ e_cal_component_get_location (comp, &location);
+
+
+ /* FIXME: We should use the icaltimetype_XXX APIs for the conversion
+ of icaltimetype to time_t. We need to generate a TZID and pass it
+ to icaltimezone_get_zone (tzid) and pass the return value to
+ icaltimetype_as_timet_with_zone () to get the correct time_t value. */
+
+ e_cal_component_get_dtstart (comp, &dt);
+ stm.tm_year = dt.value->year - 1900;
+ stm.tm_mon = dt.value->month - 1;
+ stm.tm_mday = dt.value->day;
+ stm.tm_hour = dt.value->hour;
+ stm.tm_min = dt.value->minute;
+ stm.tm_sec = dt.value->second;
+
+ dtstart = mktime (&stm);
+
+ e_cal_component_get_dtend (comp, &dt);
+ stm.tm_year = dt.value->year - 1900;
+ stm.tm_mon = dt.value->month - 1;
+ stm.tm_mday = dt.value->day;
+ stm.tm_hour = dt.value->hour;
+ stm.tm_min = dt.value->minute;
+ stm.tm_sec = dt.value->second;
+
+ dtend = mktime (&stm);
+
+ for (l = comp_attendee_list; l; l = l->next) {
+ a = l->data;
+ if (a->value) {
+ buf = g_strdup (a->value);
+ attendee_list = g_slist_append (attendee_list, buf);
+ }
+ }
+ e_cal_component_free_attendee_list (comp_attendee_list);
+
+ for (l = comp_desc_list; l; l = l->next) {
+ t = l->data;
+ if (t->value) {
+ buf = g_strdup (t->value);
+ desc_list = g_slist_append (desc_list, buf);
+ }
+ }
+ e_cal_component_free_text_list (comp_desc_list);
+
+ for (l = comp_comment_list; l; l = l->next) {
+ t = l->data;
+ if (t->value) {
+ buf = g_strdup (t->value);
+ comment_list = g_slist_append (comment_list, buf);
+ }
+ }
+ e_cal_component_free_text_list (comp_comment_list);
+
+ summary_list = g_slist_append (summary_list, g_strdup (summary.value));
+
+ location_list = g_slist_append (location_list, g_strdup (location));
+
+ glue_comp = e_cal_glue_component_new ();
+
+ buf = NULL;
+ e_cal_component_get_uid (comp, &buf);
+ e_cal_glue_component_set_uid (glue_comp, buf);
+
+ attendee_list ? e_cal_glue_component_set_attendees (glue_comp, attendee_list):0;
+ summary_list ? e_cal_glue_component_set_summaries (glue_comp, summary_list):0;
+ location_list ? e_cal_glue_component_set_location (glue_comp, location_list):0;
+ category_list ? e_cal_glue_component_set_categories (glue_comp, category_list):0;
+ desc_list ? e_cal_glue_component_set_descriptions (glue_comp, desc_list):0;
+ comment_list ? e_cal_glue_component_set_comments (glue_comp, comment_list):0;
+
+ e_cal_glue_component_set_dtstart (glue_comp, dtstart);
+ e_cal_glue_component_set_dtend (glue_comp, dtend);
+
+ return glue_comp;
+}
+
+ECalGlueComponent*
+get_ical_comp_properties (icalcomponent* ical)
+{
+ icalproperty* p = NULL;
+ icaltimetype tt;
+
+ GSList* attendee_list = NULL;
+ GSList* category_list = NULL;
+ GSList* comment_list = NULL;
+ GSList* location_list = NULL;
+ GSList* summary_list = NULL;
+ GSList* desc_list = NULL;
+ time_t dtstart;
+ time_t dtend;
+ struct tm t;
+
+ ECalGlueComponent* comp = NULL;
+
+ char* tmp = NULL;
+ char* buf = NULL;
+
+ int i = -1;
+
+ if (!ical)
+ return;
+
+ while (ical_props [++i] != -1) {
+
+ p = icalcomponent_get_first_property (ical, ical_props[i]);
+ if (!p)
+ continue;
+
+ while (p) {
+ switch (ical_props [i]) {
+ case ICAL_ATTENDEE_PROPERTY:
+ tmp = (char *)icalproperty_get_attendee (p);
+ if (tmp) {
+ buf = g_strdup (tmp);
+ attendee_list = g_slist_append (attendee_list, buf);
+ }
+ break;
+
+ case ICAL_CATEGORIES_PROPERTY:
+ tmp = (char *)icalproperty_get_categories (p);
+ if (tmp) {
+ buf = g_strdup (tmp);
+ category_list = g_slist_append (category_list, buf);
+ }
+ break;
+
+ case ICAL_COMMENT_PROPERTY:
+ tmp = (char *)icalproperty_get_comment (p);
+ if (tmp) {
+ buf = g_strdup (tmp);
+ comment_list = g_slist_append (comment_list, buf);
+ }
+ break;
+
+ case ICAL_DESCRIPTION_PROPERTY:
+ tmp = (char *)icalproperty_get_description (p);
+ if (tmp) {
+ buf = g_strdup (tmp);
+ desc_list = g_slist_append (desc_list, buf);
+ }
+ break;
+
+ case ICAL_LOCATION_PROPERTY:
+ tmp = (char *)icalproperty_get_location (p);
+ if (tmp) {
+ buf = g_strdup (tmp);
+ location_list = g_slist_append (location_list, buf);
+ }
+ break;
+
+ case ICAL_SUMMARY_PROPERTY:
+ tmp = (char *)icalproperty_get_summary (p);
+ if (tmp) {
+ buf = g_strdup (tmp);
+ summary_list = g_slist_append (summary_list, buf);
+ }
+ break;
+
+ case ICAL_DTSTART_PROPERTY:
+ tt = icalproperty_get_dtstart (p);
+ t.tm_year = tt.year - 1900;
+ t.tm_mon = tt.month - 1;
+ t.tm_mday = tt.day;
+ t.tm_hour = tt.hour;
+ t.tm_min = tt.minute;
+ t.tm_sec = tt.second;
+
+ dtstart = mktime (&t);
+ break;
+
+ case ICAL_DTEND_PROPERTY:
+ tt = icalproperty_get_dtend (p);
+ t.tm_year = tt.year - 1900;
+ t.tm_mon = tt.month - 1;
+ t.tm_mday = tt.day;
+ t.tm_hour = tt.hour;
+ t.tm_min = tt.minute;
+ t.tm_sec = tt.second;
+
+ dtend = mktime (&t);
+ break;
+
+ default: fprintf (stderr, "Property [%d] not available\n", i);
+ break;
+ }
+ p = icalcomponent_get_next_property (ical, ical_props[i]);
+ }
+
+ }
+
+ /*
+ tt = icalproperty_get_dtstart (ical);
+ dtstart = icaltime_as_timet_with_zone (tt, NULL);
+
+ tt = icalcomponent_get_dtend (ical);
+ dtend = icaltime_as_timet_with_zone (tt, NULL);
+ */
+ comp = e_cal_glue_component_new ();
+
+ e_cal_glue_component_set_uid (comp, ical_property_get_uid (ical));
+
+ attendee_list ? e_cal_glue_component_set_attendees (comp, attendee_list):0;
+ summary_list ? e_cal_glue_component_set_summaries (comp, summary_list):0;
+ location_list ? e_cal_glue_component_set_location (comp, location_list):0;
+ category_list ? e_cal_glue_component_set_categories (comp, category_list):0;
+ desc_list ? e_cal_glue_component_set_descriptions (comp, desc_list):0;
+ comment_list ? e_cal_glue_component_set_comments (comp, comment_list):0;
+
+ e_cal_glue_component_set_dtstart (comp, dtstart);
+ e_cal_glue_component_set_dtend (comp, dtend);
+
+ return comp;
+}
+
+GSList*
+e_cal_glue_from_objects_to_glue_components (GList* ical_objects)
+{
+ GList *l;
+ GSList* wrapped_cal_comp = NULL;
+ ECalGlueComponent* glue_comp = NULL;
+ GList* ecal_objects;
+
+ if (!ical_objects)
+ return NULL;
+
+ for (l = ical_objects; l; l = l->next) {
+ ECalComponent *comp = NULL;
+ icalcomponent* clone = NULL;
+
+ comp = e_cal_component_new ();
+ clone = icalcomponent_new_clone (l->data);
+ e_cal_component_set_icalcomponent (comp, clone);
+ glue_comp = get_ecal_comp_properties (comp);
+ if (glue_comp)
+ wrapped_cal_comp = g_slist_append (wrapped_cal_comp, glue_comp);
+ g_object_unref (comp);
+ }
+
+ return wrapped_cal_comp;
+}
+
+GSList*
+e_cal_glue_from_ecal_comp_objects_to_glue_components (GList* ecal_comp_objects)
+{
+ GList *l;
+ GSList* wrapped_cal_comp = NULL;
+ ECalGlueComponent* glue_comp = NULL;
+
+ if (!ecal_comp_objects)
+ return NULL;
+
+ for (l = ecal_comp_objects; l; l = l->next) {
+ glue_comp = get_ecal_comp_properties (l->data);
+ if (glue_comp)
+ wrapped_cal_comp = g_slist_append (wrapped_cal_comp, glue_comp);
+ }
+
+ fprintf (stderr, "Returning the ecal-components\n");
+ return wrapped_cal_comp;
+}
+
+void
+e_cal_glue_free_e_cal_comp_objects (GList* objects)
+{
+ GList* l;
+
+ for (l = objects; l; l = l->next)
+ g_object_unref (l->data);
+
+ g_list_free (objects);
+}
--- /dev/null 2005-03-20 01:06:14.000000000 +0530
+++ glue/cal/e-cal-glue-comp.c 2005-07-04 17:19:02.000000000 +0530
@@ -0,0 +1,279 @@
+#include "e-cal-glue-comp.h"
+
+static void e_cal_glue_component_class_init (ECalGlueComponentClass *klass);
+static void e_cal_glue_component_init (ECalGlueComponent *comp, ECalGlueComponentClass *klass);
+static void e_cal_glue_component_finalize (GObject *object);
+
+static GObjectClass *parent_class;
+
+/**
+ * e_cal_glue_component_get_type:
+ *
+ * Registers the #ECalGlueComponent class if necessary, and returns the type ID
+ * associated to it.
+ *
+ * Return value: The type ID of the #ECalGlueComponent class.
+ **/
+GType
+e_cal_glue_component_get_type (void)
+{
+ static GType e_cal_glue_component_type = 0;
+
+ if (!e_cal_glue_component_type) {
+ static GTypeInfo info = {
+ sizeof (ECalGlueComponentClass),
+ (GBaseInitFunc) NULL,
+ (GBaseFinalizeFunc) NULL,
+ (GClassInitFunc) e_cal_glue_component_class_init,
+ NULL, NULL,
+ sizeof (ECalGlueComponent),
+ 0,
+ (GInstanceInitFunc) e_cal_glue_component_init
+ };
+ e_cal_glue_component_type = g_type_register_static (G_TYPE_OBJECT, "ECalGlueComponent", &info, 0);
+ }
+
+ return e_cal_glue_component_type;
+}
+
+/* Class initialization function for the calendar-glue object */
+static void
+e_cal_glue_component_class_init (ECalGlueComponentClass *klass)
+{
+ GObjectClass *object_class;
+
+ object_class = (GObjectClass *) klass;
+
+ parent_class = g_type_class_peek_parent (klass);
+
+ object_class->finalize = e_cal_glue_component_finalize;
+}
+
+/* Object initialization function for the calendar-glue object */
+static void
+e_cal_glue_component_init (ECalGlueComponent *comp, ECalGlueComponentClass *klass)
+{
+ comp->uid = NULL;
+ comp->attendee_list = NULL;
+ comp->category_list = NULL;
+ comp->comment_list = NULL;
+ comp->location_list = NULL;
+ comp->summary_list = NULL;
+ comp->desc_list = NULL;
+ comp->dtstart = 0;
+ comp->dtend = 0;
+}
+
+/**
+ * e_cal_glue_component_new:
+ *
+ * Creates a new empty calendar-glue component object.
+ *
+ * Return value: A newly-created calendar-glue component object.
+ **/
+ECalGlueComponent *
+e_cal_glue_component_new (void)
+{
+ return E_CAL_GLUE_COMPONENT (g_object_new (E_TYPE_CAL_GLUE_COMPONENT, NULL));
+}
+
+/* Finalize handler for the calendar-glue component object */
+static void
+e_cal_glue_component_finalize (GObject *object)
+{
+ ECalGlueComponent *comp;
+
+ g_return_if_fail (object != NULL);
+ g_return_if_fail (E_IS_CAL_COMPONENT (object));
+
+ comp = E_CAL_GLUE_COMPONENT (object);
+
+ if (comp->attendee_list) {
+ g_slist_foreach (comp->attendee_list, (GFunc)g_free, NULL);
+ g_slist_free (comp->attendee_list);
+ }
+
+ if (comp->category_list) {
+ g_slist_foreach (comp->category_list, (GFunc)g_free, NULL);
+ g_slist_free (comp->category_list);
+ }
+
+ if (comp->comment_list) {
+ g_slist_foreach (comp->comment_list, (GFunc)g_free, NULL);
+ g_slist_free (comp->comment_list);
+ }
+
+ if (comp->location_list) {
+ g_slist_foreach (comp->location_list, (GFunc)g_free, NULL);
+ g_slist_free (comp->location_list);
+ }
+
+ if (comp->summary_list) {
+ g_slist_foreach (comp->summary_list, (GFunc)g_free, NULL);
+ g_slist_free (comp->summary_list);
+ }
+
+ if (comp->desc_list) {
+ g_slist_foreach (comp->desc_list, (GFunc)g_free, NULL);
+ g_slist_free (comp->desc_list);
+ }
+
+ if (comp->uid)
+ g_free (comp->uid);
+
+ comp->attendee_list = NULL;
+ comp->category_list = NULL;
+ comp->comment_list = NULL;
+ comp->location_list = NULL;
+ comp->summary_list = NULL;
+ comp->desc_list = NULL;
+ comp->dtstart = 0;
+ comp->dtend = 0;
+ if (G_OBJECT_CLASS (parent_class)->finalize)
+ (* G_OBJECT_CLASS (parent_class)->finalize) (object);
+}
+
+void
+e_cal_glue_component_set_uid (ECalGlueComponent* comp, const char* uid)
+{
+ g_return_if_fail (comp != NULL);
+ g_return_if_fail (uid != NULL);
+
+ comp->uid = g_strdup (uid);
+}
+
+
+void
+e_cal_glue_component_set_attendees (ECalGlueComponent* comp, GSList* l)
+{
+ g_return_if_fail (comp != NULL);
+ g_return_if_fail (l != NULL);
+
+ comp->attendee_list = l;
+}
+
+void
+e_cal_glue_component_set_comments (ECalGlueComponent* comp, GSList* l)
+{
+ g_return_if_fail (comp != NULL);
+ g_return_if_fail (l != NULL);
+
+ comp->comment_list = l;
+}
+
+void
+e_cal_glue_component_set_descriptions (ECalGlueComponent* comp, GSList* l)
+{
+ g_return_if_fail (comp != NULL);
+ g_return_if_fail (l != NULL);
+
+ comp->desc_list = l;
+}
+
+void
+e_cal_glue_component_set_location (ECalGlueComponent* comp, GSList* l)
+{
+ g_return_if_fail (comp != NULL);
+ g_return_if_fail (l != NULL);
+
+ comp->location_list = l;
+}
+
+void
+e_cal_glue_component_set_summaries (ECalGlueComponent* comp, GSList* l)
+{
+ g_return_if_fail (comp != NULL);
+ g_return_if_fail (l != NULL);
+
+ comp->summary_list = l;
+}
+
+void
+e_cal_glue_component_set_categories (ECalGlueComponent* comp, GSList* l)
+{
+ g_return_if_fail (comp != NULL);
+ g_return_if_fail (l != NULL);
+
+ comp->category_list = l;
+}
+
+void
+e_cal_glue_component_set_dtstart (ECalGlueComponent* comp, time_t start)
+{
+ g_return_if_fail (comp != NULL);
+
+ comp->dtstart = start;
+}
+
+
+void
+e_cal_glue_component_set_dtend (ECalGlueComponent* comp, time_t end)
+{
+ g_return_if_fail (comp != NULL);
+
+ comp->dtend = end;
+}
+
+
+char*
+e_cal_glue_component_get_uid (ECalGlueComponent* comp)
+{
+ g_return_if_fail (comp != NULL);
+ return comp->uid;
+}
+
+GSList*
+e_cal_glue_component_get_attendees (ECalGlueComponent* comp)
+{
+ g_return_if_fail (comp != NULL);
+ return comp->attendee_list;
+}
+
+GSList*
+e_cal_glue_component_get_comments (ECalGlueComponent* comp)
+{
+ g_return_if_fail (comp != NULL);
+ return comp->comment_list;
+}
+
+GSList*
+e_cal_glue_component_get_descriptions (ECalGlueComponent* comp)
+{
+ g_return_if_fail (comp != NULL);
+ return comp->desc_list;
+}
+
+GSList*
+e_cal_glue_component_get_location (ECalGlueComponent* comp)
+{
+ g_return_if_fail (comp != NULL);
+ return comp->location_list;
+}
+
+GSList*
+e_cal_glue_component_get_summaries (ECalGlueComponent* comp)
+{
+ g_return_if_fail (comp != NULL);
+ return comp->summary_list;
+}
+
+GSList*
+e_cal_glue_component_get_categories (ECalGlueComponent* comp)
+{
+ g_return_if_fail (comp != NULL);
+ return comp->category_list;
+}
+
+time_t
+e_cal_glue_component_get_dtstart (ECalGlueComponent* comp)
+{
+ g_return_if_fail (comp != NULL);
+ return comp->dtstart;
+}
+
+time_t
+e_cal_glue_component_get_dtend (ECalGlueComponent* comp)
+{
+ g_return_if_fail (comp != NULL);
+ return comp->dtend;
+}
--- /dev/null 2005-03-20 01:06:14.000000000 +0530
+++ glue/cal/e-cal-glue-comp.h 2005-07-04 17:14:46.000000000 +0530
@@ -0,0 +1,62 @@
+#ifndef _E_CAL_GLUE_COMPONENT_H_
+#define _E_CAL_GLUE_COMPONENT_H_
+
+#include <glib/gmacros.h>
+#include <time.h>
+#include <glib-object.h>
+
+G_BEGIN_DECLS
+
+#define E_TYPE_CAL_GLUE_COMPONENT (e_cal_glue_component_get_type ())
+#define E_CAL_GLUE_COMPONENT(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), E_TYPE_CAL_GLUE_COMPONENT, \
+ ECalGlueComponent))
+#define E_CAL_GLUE_COMPONENT_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), E_TYPE_CAL_GLUE_COMPONENT, \
+ ECalGlueComponentClass))
+#define E_IS_CAL_GLUE_COMPONENT(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), E_TYPE_CAL_GLUE__COMPONENT))
+#define E_IS_CAL_GLUE_COMPONENT_CLASS(klass)(G_TYPE_CHECK_CLASS_TYPE ((klass), E_TYPE_CAL_GLUE_COMPONENT))
+
+typedef struct _ECalGlueComponent ECalGlueComponent;
+typedef struct _ECalGlueComponentClass ECalGlueComponentClass;
+
+struct _ECalGlueComponent {
+ GObject parent_instance;
+ char* uid;
+ GSList* attendee_list;
+ GSList* category_list;
+ GSList* comment_list;
+ GSList* location_list;
+ GSList* summary_list;
+ GSList* desc_list;
+ time_t dtstart;
+ time_t dtend;
+
+};
+
+struct _ECalGlueComponentClass {
+ GObjectClass parent_class;
+};
+
+G_END_DECLS
+
+ECalGlueComponent* e_cal_glue_component_new (void);
+
+void e_cal_glue_component_set_uid (ECalGlueComponent* comp, const char* uid);
+void e_cal_glue_component_set_attendees (ECalGlueComponent* comp, GSList* l);
+void e_cal_glue_component_set_categories (ECalGlueComponent* comp, GSList* l);
+void e_cal_glue_component_set_comments (ECalGlueComponent* comp, GSList* l);
+void e_cal_glue_component_set_summaries (ECalGlueComponent* comp, GSList* l);
+void e_cal_glue_component_set_location (ECalGlueComponent* comp, GSList* l);
+void e_cal_glue_component_set_descriptions (ECalGlueComponent* comp, GSList* l);
+void e_cal_glue_component_set_dtstart (ECalGlueComponent* comp, time_t dtstart);
+void e_cal_glue_component_set_dtend (ECalGlueComponent* comp, time_t dtend);
+
+char* e_cal_glue_component_get_uid (ECalGlueComponent* comp);
+GSList* e_cal_glue_component_get_attendees (ECalGlueComponent* comp);
+GSList* e_cal_glue_component_get_categories (ECalGlueComponent* comp);
+GSList* e_cal_glue_component_get_comments (ECalGlueComponent* comp);
+GSList* e_cal_glue_component_get_summaries (ECalGlueComponent* comp);
+GSList* e_cal_glue_component_get_location (ECalGlueComponent* comp);
+GSList* e_cal_glue_component_get_descriptions (ECalGlueComponent* comp);
+time_t e_cal_glue_component_get_dtstart (ECalGlueComponent* comp);
+time_t e_cal_glue_component_get_dtend (ECalGlueComponent* comp);
+#endif
--- /dev/null 2005-03-20 01:06:14.000000000 +0530
+++ glue/cal/Makefile.am 2005-06-22 20:51:20.000000000 +0530
@@ -0,0 +1,15 @@
+INCLUDES= \
+ $(LIBECAL_CFLAGS)
+
+gluelibdir = $(pkglibdir)
+
+gluelib_LTLIBRARIES = \
+ libecalglue.la
+
+libecalglue_la_SOURCES = \
+ e-cal-glue.c \
+ e-cal-glue-comp.h \
+ e-cal-glue-comp.c
+
+libecalglue_la_LIBADD = \
+ $(LIBECAL_LIBS)
--- /dev/null 2005-03-20 01:06:14.000000000 +0530
+++ evolution/src/CalComponent.cs 2005-07-04 17:06:30.000000000 +0530
@@ -0,0 +1,118 @@
+using System;
+using System.Collections;
+
+namespace Evolution {
+ public class CalComponent {
+
+ string Uid;
+ ArrayList attendees;
+ ArrayList comments;
+ ArrayList descriptions;
+ ArrayList categories;
+ ArrayList location;
+ ArrayList summaries;
+ DateTime dtStart;
+ DateTime dtEnd;
+
+ public CalComponent ()
+ {
+ Uid = null;
+ attendees = new ArrayList ();
+ comments = new ArrayList ();
+ descriptions = new ArrayList ();
+ categories = new ArrayList ();
+ location = new ArrayList ();
+ summaries = new ArrayList ();
+ }
+
+ public string UID {
+ get {
+ return Uid;
+ }
+
+ set {
+ Uid = value;
+ }
+ }
+
+ public string[] Attendees {
+ get {
+ return (string[]) attendees.ToArray (typeof (string));
+ }
+
+ set {
+ attendees.AddRange (value);
+ }
+ }
+
+ public string[] Comments {
+ get {
+ return (string [])comments.ToArray (typeof (string));
+ }
+
+ set {
+ comments.AddRange (value);
+ }
+ }
+
+ public string[] Descriptions {
+ get {
+ return (string [])descriptions.ToArray (typeof (string));
+ }
+
+ set {
+ descriptions.AddRange (value);
+ }
+ }
+
+ public string[] Summaries {
+ get {
+ return (string [])summaries.ToArray (typeof (string));
+ }
+
+ set {
+ summaries.AddRange (value);
+ }
+ }
+
+ public string[] Categories {
+ get {
+ return (string [])categories.ToArray (typeof (string));
+ }
+
+ set {
+ categories.AddRange (value);
+ }
+ }
+
+ public string[] Location {
+ get {
+ return (string [])location.ToArray (typeof (string));
+ }
+
+ set {
+ location.AddRange (value);
+ }
+ }
+
+ public System.DateTime Dtstart {
+ get {
+ return dtStart;
+ }
+
+ set {
+ dtStart = value;
+ }
+ }
+
+ public System.DateTime Dtend {
+ get {
+ return dtEnd;
+ }
+
+ set {
+ dtEnd = value;
+ }
+ }
+ }
+}
--- /dev/null 2005-03-20 01:06:14.000000000 +0530
+++ evolution/src/CalGlueComponentUtil.cs 2005-07-04 17:08:46.000000000 +0530
@@ -0,0 +1,88 @@
+using System;
+using System.Runtime.InteropServices;
+
+namespace Evolution {
+ public class CalGlueComponentUtil {
+
+ [DllImport("ecalglue")]
+ static extern string e_cal_glue_component_get_uid(IntPtr raw);
+ public static string GetUID (IntPtr Handle)
+ {
+ string raw_ret = e_cal_glue_component_get_uid (Handle);
+ return raw_ret;
+ }
+
+ [DllImport("ecalglue")]
+ static extern IntPtr e_cal_glue_component_get_attendees(IntPtr raw);
+
+ public static string[] GetAttendees (IntPtr Handle)
+ {
+ IntPtr raw_ret = e_cal_glue_component_get_attendees (Handle);
+ return Evolution.CalUtil.GLibSListToStringArray (raw_ret);
+ }
+
+ [DllImport("ecalglue")]
+ static extern IntPtr e_cal_glue_component_get_descriptions(IntPtr raw);
+
+ public static string[] GetDescriptions (IntPtr Handle)
+ {
+ IntPtr raw_ret = e_cal_glue_component_get_descriptions(Handle);
+ return Evolution.CalUtil.GLibSListToStringArray (raw_ret);
+ }
+
+ [DllImport("ecalglue")]
+ static extern IntPtr e_cal_glue_component_get_comments(IntPtr raw);
+
+ public static string[] GetComments (IntPtr Handle)
+ {
+ IntPtr raw_ret = e_cal_glue_component_get_comments(Handle);
+ return Evolution.CalUtil.GLibSListToStringArray (raw_ret);
+ }
+
+ [DllImport("ecalglue")]
+ static extern IntPtr e_cal_glue_component_get_categories(IntPtr raw);
+
+ public static string[] GetCategories (IntPtr Handle)
+ {
+ IntPtr raw_ret = e_cal_glue_component_get_categories(Handle);
+ return Evolution.CalUtil.GLibSListToStringArray (raw_ret);
+ }
+
+ [DllImport("ecalglue")]
+ static extern IntPtr e_cal_glue_component_get_location(IntPtr raw);
+
+ public static string[] GetLocation (IntPtr Handle)
+ {
+ IntPtr raw_ret = e_cal_glue_component_get_location(Handle);
+ return Evolution.CalUtil.GLibSListToStringArray (raw_ret);
+
+ }
+
+ [DllImport("ecalglue")]
+ static extern IntPtr e_cal_glue_component_get_summaries(IntPtr raw);
+
+ public static string[] GetSummaries (IntPtr Handle)
+ {
+ IntPtr raw_ret = e_cal_glue_component_get_summaries(Handle);
+ return Evolution.CalUtil.GLibSListToStringArray (raw_ret);
+ }
+
+ [DllImport("ecalglue")]
+ static extern IntPtr e_cal_glue_component_get_dtstart(IntPtr raw);
+
+ public static System.DateTime GetDtstart (IntPtr Handle) {
+ IntPtr raw_ret = e_cal_glue_component_get_dtstart(Handle);
+ System.DateTime ret = GLib.Marshaller.time_tToDateTime (raw_ret);
+ return ret;
+ }
+
+ [DllImport("ecalglue")]
+ static extern IntPtr e_cal_glue_component_get_dtend(IntPtr raw);
+
+ public static System.DateTime GetDtend (IntPtr Handle) {
+ IntPtr raw_ret = e_cal_glue_component_get_dtend(Handle);
+ System.DateTime ret = GLib.Marshaller.time_tToDateTime (raw_ret);
+ return ret;
+ }
+ }
+}
--- /dev/null 2005-03-20 01:06:14.000000000 +0530
+++ evolution/src/CalUtil.cs 2005-07-04 17:07:27.000000000 +0530
@@ -0,0 +1,116 @@
+using System;
+using System.Runtime.InteropServices;
+
+namespace Evolution {
+ public class CalUtil {
+ static DateTime local_epoch = new DateTime (1970, 1, 1);
+
+ public static int DateTimeToUnixtime_t (DateTime time)
+ {
+ return ((int)time.Subtract (local_epoch).TotalSeconds);
+ }
+
+ [DllImport("glib-2.0")]
+ static extern int g_slist_length (IntPtr slist);
+
+ [DllImport("glibsharpglue")]
+ static extern IntPtr gtksharp_slist_get_data (IntPtr slist);
+
+ [DllImport("glibsharpglue")]
+ static extern IntPtr gtksharp_slist_get_next (IntPtr slist);
+
+ [DllImport("glib-2.0")]
+ static extern void g_slist_free (IntPtr slist);
+
+ public static string[] GLibSListToStringArray (IntPtr slist)
+ {
+ string[] ret;
+ int i = 0;
+ IntPtr iter = IntPtr.Zero;
+
+ ret = new string [g_slist_length (slist)];
+
+ for (i = 0, iter=slist; iter != IntPtr.Zero; iter = gtksharp_slist_get_next (iter), i++)
+ ret[i] = GLib.Marshaller.PtrToStringGFree (gtksharp_slist_get_data (iter));
+ g_slist_free (slist);
+ return ret;
+ }
+ public static CalComponent[] GLibSListToCalCompArray (IntPtr slist)
+ {
+ int i = 0;
+ IntPtr iter = IntPtr.Zero;
+ int len = 0;
+
+ len = g_slist_length (slist);
+ CalComponent[] compArray = new CalComponent [len];
+
+ for (i = 0, iter=slist; iter != IntPtr.Zero; iter = gtksharp_slist_get_next (iter), i++) {
+ CalComponent calComp = new CalComponent ();
+ calComp.UID = CalGlueComponentUtil.GetUID (gtksharp_slist_get_data (iter));
+ calComp.Attendees = CalGlueComponentUtil.GetAttendees (gtksharp_slist_get_data (iter));
+ calComp.Comments = CalGlueComponentUtil.GetComments (gtksharp_slist_get_data (iter));
+ calComp.Categories = CalGlueComponentUtil.GetCategories (gtksharp_slist_get_data (iter));
+ calComp.Summaries = CalGlueComponentUtil.GetSummaries (gtksharp_slist_get_data (iter));
+ calComp.Descriptions = CalGlueComponentUtil.GetDescriptions (gtksharp_slist_get_data (iter));
+ calComp.Location = CalGlueComponentUtil.GetLocation (gtksharp_slist_get_data (iter));
+ calComp.Dtstart = CalGlueComponentUtil.GetDtstart (gtksharp_slist_get_data (iter));
+ calComp.Dtend = CalGlueComponentUtil.GetDtend (gtksharp_slist_get_data (iter));
+
+ compArray[i] = calComp;
+
+ }
+ return compArray;
+ }
+
+ public static String GetQueryStringForTimeRange (DateTime start, DateTime end)
+ {
+ string query;
+ string strDtstart;
+ string strDtend;
+ strDtstart = String.Format ("{0:0000}{1:00}{2:00}T{3:00}{4:00}{5:00}Z",
+ start.Year,
+ start.Month,
+ start.Day,
+ start.Hour,
+ start.Minute,
+ start.Second);
+
+ strDtend = String.Format ("{0:0000}{1:00}{2:00}T{3:00}{4:00}{5:00}Z",
+ end.Year,
+ end.Month,
+ end.Day,
+ end.Hour,
+ end.Minute,
+ end.Second);
+
+
+ query = "(occur-in-time-range? (make-time \""
+ + strDtstart + "\")"
+ + " (make-time \""
+ + strDtend + "\"))";
+
+ return query;
+ }
+
+
+ [DllImport("ecalglue")]
+ static extern IntPtr e_cal_glue_from_objects_to_glue_components (IntPtr ical_objects);
+
+ [DllImport("ecalglue")]
+ static extern IntPtr e_cal_glue_from_ecal_comp_objects_to_glue_components (IntPtr ecal_objects);
+
+ public static CalComponent[] CalCompFromECal (IntPtr ecal_objects)
+ {
+ IntPtr raw_ret = e_cal_glue_from_ecal_comp_objects_to_glue_components (ecal_objects);
+
+ return GLibSListToCalCompArray (raw_ret);
+ }
+
+ public static CalComponent[] CalCompFromICal (IntPtr ical_objects)
+ {
+ IntPtr raw_ret = e_cal_glue_from_objects_to_glue_components (ical_objects);
+
+ return GLibSListToCalCompArray (raw_ret);
+ }
+ }
+}
--- /dev/null 2005-03-20 01:06:14.000000000 +0530
+++ evolution/src/ObjectsAddedHandler.cs 2005-06-30 20:11:18.000000000 +0530
@@ -0,0 +1,21 @@
+// Somehow this file was not getting generated through
+// gapi-codegen. This file is generated manually using
+// evolution/generated/ObjectsModifiedHandler.cs.
+//
+// Author: Veerapuram Varadhan (vvaradhan AT novell DOT com)
+
+namespace Evolution {
+
+ using System;
+
+ public delegate void ObjectsAddedHandler(object o, ObjectsAddedArgs args);
+
+ public class ObjectsAddedArgs : GLib.SignalArgs {
+ public GLib.List Objects{
+ get {
+ return (GLib.List) Args[0];
+ }
+ }
+
+ }
+}
--- /dev/null 2005-03-20 01:06:14.000000000 +0530
+++ evolution/CalView.custom 2005-06-30 20:07:13.000000000 +0530
@@ -0,0 +1,68 @@
+
+ delegate void ObjectsAddedDelegate (IntPtr view, IntPtr objects);
+
+ static ObjectsAddedDelegate ObjectsAddedCallback;
+
+ static void objectsadded_cb (IntPtr view, IntPtr objects)
+ {
+ CalView obj = GLib.Object.GetObject (view, false) as CalView;
+ obj.OnObjectsAdded (new GLib.List(objects));
+ }
+
+ private static void OverrideObjectsAdded (GLib.GType gtype)
+ {
+ if (ObjectsAddedCallback == null)
+ ObjectsAddedCallback = new ObjectsAddedDelegate (objectsadded_cb);
+ OverrideVirtualMethod (gtype, "objects_added", ObjectsAddedCallback);
+ }
+
+ [GLib.DefaultSignalHandler(Type=typeof(Evolution.CalView), ConnectionMethod="OverrideObjectsAdded")]
+ protected virtual void OnObjectsAdded (GLib.List objects)
+ {
+ GLib.Value ret = GLib.Value.Empty;
+ GLib.ValueArray inst_and_params = new GLib.ValueArray (2);
+ GLib.Value[] vals = new GLib.Value [2];
+ vals [0] = new GLib.Value (this);
+ inst_and_params.Append (vals [0]);
+ vals [1] = new GLib.Value (objects);
+ inst_and_params.Append (vals [1]);
+ g_signal_chain_from_overridden (inst_and_params.ArrayPtr, ref ret);
+ }
+
+ [GLib.Signal("objects_added")]
+ public event Evolution.ObjectsAddedHandler ObjectsAdded {
+ add {
+ if (value.Method.GetCustomAttributes(typeof(GLib.ConnectBeforeAttribute), false).Length > 0) {
+ if (BeforeHandlers["objects_added"] == null)
+ BeforeSignals["objects_added"] = new EvolutionSharp.voidObjectListSignal(this, "objects_added", value, typeof (Evolution.ObjectsAddedArgs), 0);
+ else
+ ((GLib.SignalCallback) BeforeSignals ["objects_added"]).AddDelegate (value);
+ BeforeHandlers.AddHandler("objects_added", value);
+ } else {
+ if (AfterHandlers["objects_added"] == null)
+ AfterSignals["objects_added"] = new EvolutionSharp.voidObjectListSignal(this, "objects_added", value, typeof (Evolution.ObjectsAddedArgs), 1);
+ else
+ ((GLib.SignalCallback) AfterSignals ["objects_added"]).AddDelegate (value);
+ AfterHandlers.AddHandler("objects_added", value);
+ }
+ }
+ remove {
+ System.ComponentModel.EventHandlerList event_list = AfterHandlers;
+ Hashtable signals = AfterSignals;
+ if (value.Method.GetCustomAttributes(typeof(GLib.ConnectBeforeAttribute), false).Length > 0) {
+ event_list = BeforeHandlers;
+ signals = BeforeSignals;
+ }
+ GLib.SignalCallback cb = signals ["objects_added"] as GLib.SignalCallback;
+ event_list.RemoveHandler("objects_added", value);
+ if (cb == null)
+ return;
+
+ cb.RemoveDelegate (value);
+
+ if (event_list["objects_added"] == null) {
+ signals.Remove("objects_added");
+ cb.Dispose ();
+ }
+ }
+ }
--- /dev/null 2005-03-20 01:06:14.000000000 +0530
+++ evolution/Cal.custom 2005-07-04 16:43:50.000000000 +0530
@@ -0,0 +1,84 @@
+ [DllImport("ecal")]
+ static extern unsafe bool e_cal_get_object_list_as_comp(IntPtr raw, string query, out IntPtr objects, out IntPtr error);
+
+ public unsafe bool GetObjectListAsComp(string query, out IntPtr objects) {
+ IntPtr error = IntPtr.Zero;
+ bool raw_ret = e_cal_get_object_list_as_comp(Handle, query, out objects, out error);
+ bool ret = raw_ret;
+ if (error != IntPtr.Zero) throw new GLib.GException (error);
+ return ret;
+ }
+
+ [DllImport("ecal")]
+ static extern unsafe bool e_cal_get_object_list(IntPtr raw, string query, out IntPtr objects, out IntPtr error);
+
+ public unsafe bool GetObjectList(string query, out IntPtr objects) {
+ IntPtr error = IntPtr.Zero;
+ bool raw_ret = e_cal_get_object_list(Handle, query, out objects, out error);
+ bool ret = raw_ret;
+ if (error != IntPtr.Zero) throw new GLib.GException (error);
+ return ret;
+ }
+
+
+ [DllImport("ecalglue")]
+ static extern IntPtr e_cal_glue_free_e_cal_comp_objects (IntPtr ecal_objects);
+
+ public Evolution.CalComponent[] GetItems (string query) {
+ IntPtr error = IntPtr.Zero;
+ IntPtr ecal_objects = IntPtr.Zero;
+ bool ret;
+ CalComponent[] retval;
+
+
+// if (query != null && query.Length > 0)
+// ret = GetObjectList (query, out ical_objects);
+// else
+// ret = GetObjectList ("#t", out ical_objects);
+//
+ if (query != null && query.Length > 0)
+ ret = GetObjectListAsComp (query, out ecal_objects);
+ else
+ ret = GetObjectListAsComp ("#t", out ecal_objects);
+
+ if (!ret)
+ return null;
+
+ retval = Evolution.CalUtil.CalCompFromECal (ecal_objects);
+// retval = Evolution.CalUtil.CalCompFromICal (ical_objects);
+
+// IntPtr raw_ret = e_cal_glue_from_ecal_comp_objects_to_glue_components (ecal_objects);
+
+// GLib.List objList = new GLib.List (ecal_objects);
+// FreeObjectList (objList);
+//
+ e_cal_glue_free_e_cal_comp_objects (ecal_objects);
+
+ return retval;
+ }
+
+ public Evolution.CalComponent[] GetItemsOccurInRange (System.DateTime start_date_time,
+ System.DateTime end_date_time)
+ {
+
+ return (GetItems (Evolution.CalUtil.GetQueryStringForTimeRange (start_date_time, end_date_time)));
+ }
+
+ [DllImport("ecal")]
+ static extern unsafe bool e_cal_get_query(IntPtr raw, string sexp, out IntPtr query, out IntPtr error);
+
+ public Evolution.CalView GetCalView (string sexp)
+ {
+ IntPtr calviewHandle;
+ IntPtr error = IntPtr.Zero;
+
+ bool raw_ret = e_cal_get_query (Handle,
+ sexp,
+ out calviewHandle,
+ out error);
+ if (error != IntPtr.Zero) throw new GLib.GException (error);
+ if (raw_ret == false || calviewHandle == (IntPtr)0)
+ return null;
+
+ return new CalView (calviewHandle);
+ }
\ No newline at end of file
--- /dev/null 2005-03-20 01:06:14.000000000 +0530
+++ evolution/TestCal.cs 2005-07-04 18:15:22.000000000 +0530
@@ -0,0 +1,138 @@
+using System;
+using System.Collections;
+using Gtk;
+using GLib;
+using Evolution;
+
+namespace CalBindingsTest {
+ public class CalendarBindingsTest {
+
+ public void OnItemsAdded (object o,
+ Evolution.ObjectsAddedArgs args)
+ {
+ //AddItems (args.Objects);
+ Console.WriteLine ("An item is added");
+ CalComponent[] addedComp = CalUtil.CalCompFromICal (args.Objects.Handle);
+ Console.WriteLine ("# of items Added: {0}", addedComp.Length);
+ foreach (CalComponent comp in addedComp) {
+ Console.WriteLine (comp.UID);
+ foreach (string str in comp.Attendees)
+ Console.WriteLine (str);
+ foreach (string str in comp.Categories)
+ Console.WriteLine (str);
+ foreach (string str in comp.Summaries)
+ Console.WriteLine (str);
+ foreach (string str in comp.Descriptions)
+ Console.WriteLine (str);
+ foreach (string str in comp.Location)
+ Console.WriteLine (str);
+ foreach (string str in comp.Comments)
+ Console.WriteLine (str);
+ Console.WriteLine (comp.Dtstart);
+ Console.WriteLine (comp.Dtend);
+ }
+ }
+
+ public void OnItemsModified (object o,
+ Evolution.ObjectsModifiedArgs args)
+ {
+ //AddItems (args.Objects);
+ Console.WriteLine ("An item is modified");
+ CalComponent[] addedComp = CalUtil.CalCompFromICal (args.Objects.Handle);
+ Console.WriteLine ("# of items modified: {0}", addedComp.Length);
+ foreach (CalComponent comp in addedComp) {
+ foreach (string str in comp.Attendees)
+ Console.WriteLine (str);
+ foreach (string str in comp.Categories)
+ Console.WriteLine (str);
+ foreach (string str in comp.Summaries)
+ Console.WriteLine (str);
+ foreach (string str in comp.Descriptions)
+ Console.WriteLine (str);
+ foreach (string str in comp.Location)
+ Console.WriteLine (str);
+ foreach (string str in comp.Comments)
+ Console.WriteLine (str);
+ Console.WriteLine (comp.Dtstart);
+ Console.WriteLine (comp.Dtend);
+ }
+ }
+
+ public void OnItemsRemoved (object o,
+ Evolution.ObjectsRemovedArgs args)
+ {
+ //RemoveItems (args.Objects);
+ Console.WriteLine ("An item is Removed");
+ }
+
+ public static void Main (string[] args)
+ {
+ Application.Init ();
+
+ SourceList slist = new SourceList ("/apps/evolution/calendar/sources");
+ if (slist != null) {
+ SList group_list = slist.PeekGroups ();
+ Console.WriteLine ("Group count: {0}", group_list.Count);
+ foreach (SourceGroup group in group_list) {
+ Console.WriteLine ("UID: {0}, Name: {1}", group.PeekUid (), group.PeekName ());
+ SList src_list = group.PeekSources ();
+ foreach (Evolution.Source src in src_list) {
+ Cal cal = new Cal (src, CalSourceType.Event);
+ cal.Open (true);
+
+ Console.WriteLine ("UID: {0}, Name: {1}", src.PeekUid (), src.PeekName ());
+
+ CalComponent[] event_list = cal.GetItems (null);
+ Console.WriteLine ("Event count : {0}", event_list.Length);
+ DateTime start = new DateTime (2005, 6, 23);
+ DateTime end = new DateTime (2005, 6, 24);
+ event_list = cal.GetItemsOccurInRange (start, end);
+ Console.WriteLine ("Event count (range) : {0}", event_list.Length);
+
+
+ if (event_list != null) {
+ //string str;
+ //IEnumerator iter = event_list.GetEnumerator ();
+ //while (iter.MoveNext ()) {
+ //str = iter.Current as String;
+ foreach (CalComponent comp in event_list) {
+ foreach (string str in comp.Attendees)
+ Console.WriteLine (str);
+ foreach (string str in comp.Categories)
+ Console.WriteLine (str);
+ foreach (string str in comp.Summaries)
+ Console.WriteLine (str);
+ foreach (string str in comp.Descriptions)
+ Console.WriteLine (str);
+ foreach (string str in comp.Location)
+ Console.WriteLine (str);
+ foreach (string str in comp.Comments)
+ Console.WriteLine (str);
+ Console.WriteLine (comp.Dtstart);
+ Console.WriteLine (comp.Dtend);
+ }
+ } else
+ Console.WriteLine ("No event strings found");
+
+ CalendarBindingsTest t = new CalendarBindingsTest ();
+ CalView cquery;
+ cquery = cal.GetCalView ("#t");
+ if (cquery == null)
+ Console.WriteLine ("Query object creation failed");
+
+ cquery.ObjectsModified += t.OnItemsModified;
+ cquery.ObjectsAdded += t.OnItemsAdded;
+ cquery.ObjectsRemoved += t.OnItemsRemoved;
+
+ cquery.Start ();
+ }
+
+ }
+
+ }
+ else
+ Console.WriteLine ("slist is NULL");
+ Application.Run ();
+ }
+ }
+}
Index: ChangeLog
===================================================================
RCS file: /cvs/gnome/evolution-sharp/ChangeLog,v
retrieving revision 1.38
diff -u -p -r1.38 ChangeLog
--- ChangeLog 4 Apr 2005 22:43:06 -0000 1.38
+++ ChangeLog 5 Jul 2005 09:06:42 -0000
@@ -1,3 +1,24 @@
+2005-06-07 Veerapuram Varadhan <vvaradhan novell com>
+
+ * evolution/Cal.custom, evolution/Evolution.Metadata:
+ Hand-implement GetQuery, GetItems, GetItemsForRange,
+ GetObjectsList and GetObjectListAsComp.
+ * evolution/glue/cal/e-cal-glue.c,
+ * evolution/glue/cal/e-cal-glue-comp.c:
+ * evolution/glue/cal/e-cal-glue-comp.h: Glue code that talks to
+ e-d-s and converts ical to ecal and ecal to an intermediate
+ e-cal-glue component.
+ * sources.xml: Added e-cal related files to parse.
+ * evolution/evolution-api.raw: APIs for e-cal.
+ * evolution/src/CalUtil.cs: Utility methods to convert from GSList to
+ string[] and etc.
+ * evolution/src/CalComponent.cs: A minimalistic representation of
+ an e-cal component.
+ * evolution/src/CalGlueComponent.cs: Wrapper for the glue-code.
+ * evolution/TestCal.cs: A test program to verify Cal bindings.
+ * configure.in: Added checks for the presence of libecal.
+ * All the related Makefile.am's are changed.
+
2005-04-04 Joe Shaw <joeshaw novell com>
* evolution/Book.custom (GetContacts): If the query passed in is
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]