[evolution-patches] Patch for client changes due to readCursor update on GW server
- From: Harish Krishnaswamy <kharish novell com>
- To: patches <evolution-patches lists ximian com>
- Subject: [evolution-patches] Patch for client changes due to readCursor update on GW server
- Date: Thu, 24 Feb 2005 20:36:26 +0530
hi,
Following a fix on the GW server to ensure all items are returned in a
readCursor call, the readCursorRequest schema has been updated with a
new position argument and the use of positionCursorRequest has been
discouraged.
Attached a patch for the consequent changes in the mail, addressbook and
calendar components in eds. Kindly review the same.
Thanks,
harish
Index: addressbook/ChangeLog
===================================================================
RCS file: /cvs/gnome/evolution-data-server/addressbook/ChangeLog,v
retrieving revision 1.252
diff -u -3 -p -u -p -r1.252 ChangeLog
--- addressbook/ChangeLog 23 Feb 2005 09:47:19 -0000 1.252
+++ addressbook/ChangeLog 24 Feb 2005 15:07:01 -0000
@@ -1,3 +1,9 @@
+2005-02-24 Harish Krishnaswamy <kharish novell com>
+
+ * backends/groupwise/e-book-backend-groupwise.c: (build_cache):
+ update the e_gw_connection_read_cursor to use the new prototype
+ that uses a position argument.
+
2005-02-22 Sivaiah Nallagatla <snallagatla novell com>
* backends/groupwise/e-book-backend-groupwise.c
Index: addressbook/backends/groupwise/e-book-backend-groupwise.c
===================================================================
RCS file: /cvs/gnome/evolution-data-server/addressbook/backends/groupwise/e-book-backend-groupwise.c,v
retrieving revision 1.48
diff -u -3 -p -u -p -r1.48 e-book-backend-groupwise.c
--- addressbook/backends/groupwise/e-book-backend-groupwise.c 23 Feb 2005 09:47:20 -0000 1.48
+++ addressbook/backends/groupwise/e-book-backend-groupwise.c 24 Feb 2005 15:07:01 -0000
@@ -2181,6 +2181,7 @@ build_cache (EBookBackendGroupwise *ebgw
int cursor;
gboolean done = FALSE;
EBookBackendGroupwisePrivate *priv = ebgw->priv;
+ const char *position = E_GW_CURSOR_POSITION_START;
status = e_gw_connection_create_cursor (priv->cnc, priv->container_id, NULL, NULL, &cursor);
@@ -2188,7 +2189,7 @@ build_cache (EBookBackendGroupwise *ebgw
return FALSE;
while (!done) {
- status = e_gw_connection_read_cursor (priv->cnc, priv->container_id, cursor, FALSE, CURSOR_ITEM_LIMIT, &gw_items);
+ status = e_gw_connection_read_cursor (priv->cnc, priv->container_id, cursor, FALSE, CURSOR_ITEM_LIMIT, position, &gw_items);
for (l = gw_items; l != NULL; l = g_list_next (l)) {
contact = e_contact_new ();
@@ -2206,6 +2207,7 @@ build_cache (EBookBackendGroupwise *ebgw
g_list_free (gw_items);
gw_items = NULL;
+ position = E_GW_CURSOR_POSITION_CURRENT;
}
e_gw_connection_destroy_cursor (priv->cnc, priv->container_id, cursor);
Index: camel/providers/groupwise/ChangeLog
===================================================================
RCS file: /cvs/gnome/evolution-data-server/camel/providers/groupwise/ChangeLog,v
retrieving revision 1.25
diff -u -3 -p -u -p -r1.25 ChangeLog
--- camel/providers/groupwise/ChangeLog 24 Feb 2005 10:51:52 -0000 1.25
+++ camel/providers/groupwise/ChangeLog 24 Feb 2005 15:07:01 -0000
@@ -1,3 +1,10 @@
+2005-02-24 Harish Krishnaswamy <kharish novell com>
+
+ * camel-groupwise-store.c: (groupwise_get_folder):
+ update calls to read_cursor request to use the
+ position argument. do not use the position cursor
+ calls anymore.
+
2005-02-23 Sankar P <psankar novell com>
* camel-groupwise-folder.c: (groupwise_folder_get_message):
Index: camel/providers/groupwise/camel-groupwise-store.c
===================================================================
RCS file: /cvs/gnome/evolution-data-server/camel/providers/groupwise/camel-groupwise-store.c,v
retrieving revision 1.32
diff -u -3 -p -u -p -r1.32 camel-groupwise-store.c
--- camel/providers/groupwise/camel-groupwise-store.c 17 Feb 2005 10:42:03 -0000 1.32
+++ camel/providers/groupwise/camel-groupwise-store.c 24 Feb 2005 15:07:01 -0000
@@ -485,6 +485,7 @@ groupwise_get_folder (CamelStore *store,
GList *list = NULL ;
GSList *slist = NULL, *sl ;
gboolean done = FALSE ;
+ const char *position = E_GW_CURSOR_POSITION_END;
int count = 0, cursor, summary_count = 0 ;
storage_path = g_strdup_printf ("%s/folders", priv->storage_path);
@@ -623,7 +624,7 @@ groupwise_get_folder (CamelStore *store,
int temp = 0 ;
status = e_gw_connection_read_cursor (priv->cnc, container_id,
cursor, FALSE,
- CURSOR_ITEM_LIMIT, &list) ;
+ CURSOR_ITEM_LIMIT, position, &list) ;
if (status != E_GW_CONNECTION_STATUS_OK) {
CAMEL_SERVICE_UNLOCK (gw_store, connect_lock);
camel_exception_set (ex, CAMEL_EXCEPTION_SERVICE_INVALID, _("Authentication failed"));
@@ -648,6 +649,7 @@ groupwise_get_folder (CamelStore *store,
done = TRUE;
g_list_free (list);
list = NULL;
+ position = E_GW_CURSOR_POSITION_CURRENT;
}
e_gw_connection_destroy_cursor (priv->cnc, container_id, cursor) ;
Index: calendar/ChangeLog
===================================================================
RCS file: /cvs/gnome/evolution-data-server/calendar/ChangeLog,v
retrieving revision 1.426
diff -u -3 -p -u -p -r1.426 ChangeLog
--- calendar/ChangeLog 24 Feb 2005 10:58:56 -0000 1.426
+++ calendar/ChangeLog 24 Feb 2005 15:07:01 -0000
@@ -1,3 +1,10 @@
+2005-02-24 Harish Krishnaswamy <kharish novell com>
+
+ * backends/groupwise/e-cal-backend-groupwise.c: (populate_cache):
+ Do not use position cursor calls anymore. use position field in
+ read cursor request.
+
+
2005-02-22 Rodrigo Moya <rodrigo novell com>
* backends/http/e-cal-backend-http.c (e_cal_backend_http_init):
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.130
diff -u -3 -p -u -p -r1.130 e-cal-backend-groupwise.c
--- calendar/backends/groupwise/e-cal-backend-groupwise.c 24 Feb 2005 10:58:57 -0000 1.130
+++ calendar/backends/groupwise/e-cal-backend-groupwise.c 24 Feb 2005 15:07:01 -0000
@@ -120,6 +120,7 @@ populate_cache (ECalBackendGroupwise *cb
GList *list = NULL, *l;
gboolean done = FALSE;
int cursor = 0;
+ const char *position = E_GW_CURSOR_POSITION_END;
icalcomponent_kind kind;
priv = cbgw->priv;
@@ -149,7 +150,7 @@ populate_cache (ECalBackendGroupwise *cb
}
while (!done) {
- status = e_gw_connection_read_cursor (priv->cnc, priv->container_id, cursor, FALSE, CURSOR_ITEM_LIMIT, &list);
+ status = e_gw_connection_read_cursor (priv->cnc, priv->container_id, cursor, FALSE, CURSOR_ITEM_LIMIT, position, &list);
if (status != E_GW_CONNECTION_STATUS_OK) {
e_cal_backend_groupwise_notify_error_code (cbgw, status);
g_mutex_unlock (mutex);
@@ -179,6 +180,7 @@ populate_cache (ECalBackendGroupwise *cb
done = TRUE;
g_list_free (list);
list = NULL;
+ position = E_GW_CURSOR_POSITION_CURRENT;
}
e_gw_connection_destroy_cursor (priv->cnc, priv->container_id, cursor);
Index: servers/groupwise/ChangeLog
===================================================================
RCS file: /cvs/gnome/evolution-data-server/servers/groupwise/ChangeLog,v
retrieving revision 1.125
diff -u -3 -p -u -p -r1.125 ChangeLog
--- servers/groupwise/ChangeLog 22 Feb 2005 05:45:15 -0000 1.125
+++ servers/groupwise/ChangeLog 24 Feb 2005 15:07:01 -0000
@@ -1,3 +1,9 @@
+2005-02-24 Harish Krishnaswamy <kharish novell com>
+
+ * e-gw-connection.[ch]: (e_gw_connection_read_cursor):
+ Added 'position' field to the readCursor request reflecting
+ the related server fix and the schema change.
+
2005-02-22 Parthasarathi Susarla <sparthasarathi novell com>
* e-gw-item.c (e_gw_item_append_to_soap_message):
Index: servers/groupwise/e-gw-connection.c
===================================================================
RCS file: /cvs/gnome/evolution-data-server/servers/groupwise/e-gw-connection.c,v
retrieving revision 1.109
diff -u -3 -p -u -p -r1.109 e-gw-connection.c
--- servers/groupwise/e-gw-connection.c 17 Feb 2005 10:14:34 -0000 1.109
+++ servers/groupwise/e-gw-connection.c 24 Feb 2005 15:07:01 -0000
@@ -2060,7 +2060,7 @@ e_gw_connection_position_cursor (EGwConn
}
EGwConnectionStatus
-e_gw_connection_read_cursor (EGwConnection *cnc, const char *container, int cursor, gboolean forward, int count, GList **item_list)
+e_gw_connection_read_cursor (EGwConnection *cnc, const char *container, int cursor, gboolean forward, int count, const char *cursor_seek, GList **item_list)
{
SoupSoapMessage *msg;
SoupSoapResponse *response;
@@ -2075,6 +2075,7 @@ e_gw_connection_read_cursor (EGwConnecti
/* there is problem in read curosr if you set this, uncomment after the problem
is fixed in server */
e_gw_message_write_string_parameter (msg, "forward", NULL, forward ? "true": "false");
+ e_gw_message_write_string_parameter (msg, "position", NULL, cursor_seek);
e_gw_message_write_string_parameter (msg, "container", NULL, container);
e_gw_message_write_int_parameter (msg, "count", NULL, count);
Index: servers/groupwise/e-gw-connection.h
===================================================================
RCS file: /cvs/gnome/evolution-data-server/servers/groupwise/e-gw-connection.h,v
retrieving revision 1.55
diff -u -3 -p -u -p -r1.55 e-gw-connection.h
--- servers/groupwise/e-gw-connection.h 17 Feb 2005 10:14:34 -0000 1.55
+++ servers/groupwise/e-gw-connection.h 24 Feb 2005 15:07:02 -0000
@@ -70,6 +70,10 @@ typedef enum {
E_GW_CONNECTION_STATUS_UNKNOWN
} EGwConnectionStatus;
+#define E_GW_CURSOR_POSITION_CURRENT "current"
+#define E_GW_CURSOR_POSITION_START "start"
+#define E_GW_CURSOR_POSITION_END "end"
+
SoupSoapResponse *e_gw_connection_send_message (EGwConnection *cnc, SoupSoapMessage *msg);
EGwConnectionStatus e_gw_connection_parse_response_status (SoupSoapResponse *response);
const char *e_gw_connection_get_error_message (EGwConnectionStatus status);
@@ -116,7 +120,7 @@ EGwConnectionStatus e_gw_connection_get_
EGwConnectionStatus e_gw_connection_create_cursor (EGwConnection *cnc, const char *container, const char *view, EGwFilter *filter, int *cursor);
EGwConnectionStatus e_gw_connection_destroy_cursor (EGwConnection *cnc, const char *container, int cursor);
-EGwConnectionStatus e_gw_connection_read_cursor (EGwConnection *cnc, const char *container, int cursor, gboolean forward, int count, GList **item_list);
+EGwConnectionStatus e_gw_connection_read_cursor (EGwConnection *cnc, const char *container, int cursor, gboolean forward, int count, const char *cursor_seek, GList **item_list);
EGwConnectionStatus e_gw_connection_position_cursor (EGwConnection *cnc, const char *container, int cursor, const char *seek, int offset);
EGwConnectionStatus e_gw_connection_get_quick_messages (EGwConnection *cnc, const char *container, const char *view, const char *start_date, const char *message_list, const char *item_types, const char *item_sources, int count, GSList **item_list);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]