[evolution-patches] e-d-s and modifications
- From: Anders Carlsson <andersca imendio com>
- To: evolution-patches lists ximian com
- Subject: [evolution-patches] e-d-s and modifications
- Date: Mon, 20 Dec 2004 14:21:46 +0100
Hello,
in order to get OpenGroupware.org calendar modifications to work
correctly, I need to be able to specify additional modifications made to
the object by the backend. The attached patch fixes that.
Regards,
Anders
Index: calendar/backends/groupwise/e-cal-backend-groupwise.c
===================================================================
RCS file: /cvs/gnome/evolution-data-server/calendar/backends/groupwise/e-cal-backend-groupwise.c,v
retrieving revision 1.109
diff -u -B -p -r1.109 e-cal-backend-groupwise.c
--- calendar/backends/groupwise/e-cal-backend-groupwise.c 15 Dec 2004 18:20:36 -0000 1.109
+++ calendar/backends/groupwise/e-cal-backend-groupwise.c 17 Dec 2004 14:59:07 -0000
@@ -1329,7 +1329,7 @@ e_cal_backend_groupwise_create_object (E
static ECalBackendSyncStatus
e_cal_backend_groupwise_modify_object (ECalBackendSync *backend, EDataCal *cal, const char *calobj,
- CalObjModType mod, char **old_object)
+ CalObjModType mod, char **old_object, char **new_object)
{
ECalBackendGroupwise *cbgw;
ECalBackendGroupwisePrivate *priv;
@@ -1623,7 +1623,7 @@ send_object (ECalBackendGroupwise *cbgw,
if (found_comp) {
char *comp_str;
status = e_cal_backend_groupwise_modify_object (E_CAL_BACKEND_SYNC (cbgw), cal, comp_str,
- CALOBJ_MOD_THIS, &comp_str);
+ CALOBJ_MOD_THIS, &comp_str, NULL);
g_free (comp_str);
} else
status = e_cal_backend_groupwise_create_object (E_CAL_BACKEND_SYNC (cbgw), cal, &comp_str, NULL);
Index: calendar/backends/http/e-cal-backend-http.c
===================================================================
RCS file: /cvs/gnome/evolution-data-server/calendar/backends/http/e-cal-backend-http.c,v
retrieving revision 1.22
diff -u -B -p -r1.22 e-cal-backend-http.c
--- calendar/backends/http/e-cal-backend-http.c 15 Dec 2004 18:20:37 -0000 1.22
+++ calendar/backends/http/e-cal-backend-http.c 17 Dec 2004 14:59:07 -0000
@@ -771,7 +771,7 @@ e_cal_backend_http_create_object (ECalBa
static ECalBackendSyncStatus
e_cal_backend_http_modify_object (ECalBackendSync *backend, EDataCal *cal, const char *calobj,
- CalObjModType mod, char **old_object)
+ CalObjModType mod, char **old_object, char **new_object)
{
ECalBackendHttp *cbhttp;
ECalBackendHttpPrivate *priv;
Index: calendar/libedata-cal/e-cal-backend-sync.c
===================================================================
RCS file: /cvs/gnome/evolution-data-server/calendar/libedata-cal/e-cal-backend-sync.c,v
retrieving revision 1.11
diff -u -B -p -r1.11 e-cal-backend-sync.c
--- calendar/libedata-cal/e-cal-backend-sync.c 15 Dec 2004 18:20:37 -0000 1.11
+++ calendar/libedata-cal/e-cal-backend-sync.c 17 Dec 2004 14:59:07 -0000
@@ -116,14 +116,14 @@ e_cal_backend_sync_create_object (ECalBa
ECalBackendSyncStatus
e_cal_backend_sync_modify_object (ECalBackendSync *backend, EDataCal *cal, const char *calobj,
- CalObjModType mod, char **old_object)
+ CalObjModType mod, char **old_object, char **new_object)
{
g_return_val_if_fail (backend && E_IS_CAL_BACKEND_SYNC (backend), GNOME_Evolution_Calendar_OtherError);
g_return_val_if_fail (E_CAL_BACKEND_SYNC_GET_CLASS (backend)->modify_object_sync != NULL,
GNOME_Evolution_Calendar_UnsupportedMethod);
return (* E_CAL_BACKEND_SYNC_GET_CLASS (backend)->modify_object_sync) (backend, cal,
- calobj, mod, old_object);
+ calobj, mod, old_object, new_object);
}
ECalBackendSyncStatus
@@ -365,11 +365,15 @@ _e_cal_backend_modify_object (ECalBacken
{
ECalBackendSyncStatus status;
char *old_object = NULL;
+ char *new_object = NULL;
status = e_cal_backend_sync_modify_object (E_CAL_BACKEND_SYNC (backend), cal,
- calobj, mod, &old_object);
+ calobj, mod, &old_object, &new_object);
- e_data_cal_notify_object_modified (cal, status, old_object, calobj);
+ if (new_object)
+ e_data_cal_notify_object_modified (cal, status, old_object, new_object);
+ else
+ e_data_cal_notify_object_modified (cal, status, old_object, calobj);
}
static void
Index: calendar/libedata-cal/e-cal-backend-sync.h
===================================================================
RCS file: /cvs/gnome/evolution-data-server/calendar/libedata-cal/e-cal-backend-sync.h,v
retrieving revision 1.8
diff -u -B -p -r1.8 e-cal-backend-sync.h
--- calendar/libedata-cal/e-cal-backend-sync.h 15 Dec 2004 18:20:37 -0000 1.8
+++ calendar/libedata-cal/e-cal-backend-sync.h 17 Dec 2004 14:59:07 -0000
@@ -43,7 +43,7 @@ struct _ECalBackendSyncClass {
ECalBackendSyncStatus (*remove_sync) (ECalBackendSync *backend, EDataCal *cal);
ECalBackendSyncStatus (*create_object_sync) (ECalBackendSync *backend, EDataCal *cal, char **calobj, char **uid);
- ECalBackendSyncStatus (*modify_object_sync) (ECalBackendSync *backend, EDataCal *cal, const char *calobj, CalObjModType mod, char **old_object);
+ ECalBackendSyncStatus (*modify_object_sync) (ECalBackendSync *backend, EDataCal *cal, const char *calobj, CalObjModType mod, char **old_object, char **new_object);
ECalBackendSyncStatus (*remove_object_sync) (ECalBackendSync *backend, EDataCal *cal, const char *uid, const char *rid, CalObjModType mod, char **old_object, char **object);
ECalBackendSyncStatus (*discard_alarm_sync) (ECalBackendSync *backend, EDataCal *cal, const char *uid, const char *auid);
@@ -104,7 +104,8 @@ ECalBackendSyncStatus e_cal_backend_sync
EDataCal *cal,
const char *calobj,
CalObjModType mod,
- char **old_object);
+ char **old_object,
+ char **new_object);
ECalBackendSyncStatus e_cal_backend_sync_remove_object (ECalBackendSync *backend,
EDataCal *cal,
const char *uid,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]