[evolution-patches] Re: patch for deleting shared folder and reply request
- From: chen <pchenthill novell com>
- To: sparthasarathi novell com
- Cc: evolution-patches lists ximian com
- Subject: [evolution-patches] Re: patch for deleting shared folder and reply request
- Date: Fri, 04 Feb 2005 11:04:07 +0530
Hi partha,
looks good to me.
thanks, chenthill.
Parthasarathi Susarla wrote:
Sorry,
missed out on attaching the patch last time.
-partha
On Thu, 2005-02-03 at 17:11 +0530, Parthasarathi Susarla wrote:
Hi,
the attached patch fixes bug associated with deleting a shared folder.
The patch also contains code for reply request for soap mailer
thanks,
partha
------------------------------------------------------------------------
Index: e-gw-connection.c
===================================================================
RCS file: /cvs/gnome/evolution-data-server/servers/groupwise/e-gw-connection.c,v
retrieving revision 1.102
diff -u -p -r1.102 e-gw-connection.c
--- e-gw-connection.c 2 Feb 2005 10:17:09 -0000 1.102
+++ e-gw-connection.c 3 Feb 2005 06:58:57 -0000
@@ -573,10 +573,7 @@ e_gw_connection_get_container_list (EGwC
/* if status is OK - parse result. return the list */
param = soup_soap_response_get_first_parameter_by_name (response, "folders");
- if (!param) {
- g_object_unref (response);
- return E_GW_CONNECTION_STATUS_INVALID_RESPONSE;
- } else {
+ if (param) {
SoupSoapParameter *subparam;
for (subparam = soup_soap_parameter_get_first_child_by_name (param, "folder");
subparam != NULL;
@@ -2548,4 +2545,62 @@ e_gw_connection_mark_unread(EGwConnectio
g_object_unref (msg);
return status;
+}
+
+EGwConnectionStatus
+e_gw_connection_reply_item (EGwConnection *cnc, const char *id, const char *view, EGwItem **item)
+{
+ SoupSoapMessage *msg;
+ SoupSoapResponse *response;
+ EGwConnectionStatus status;
+ SoupSoapParameter *param;
+
+ g_return_val_if_fail (E_IS_GW_CONNECTION (cnc), E_GW_CONNECTION_STATUS_INVALID_OBJECT);
+
+ /* build the SOAP message */
+ msg = e_gw_message_new_with_header (cnc->priv->uri, cnc->priv->session_id, "replyRequest");
+ if (!msg) {
+ g_warning (G_STRLOC ": Could not build SOAP message");
+ return E_GW_CONNECTION_STATUS_UNKNOWN;
+ }
+
+ e_gw_message_write_string_parameter (msg, "id", NULL, id);
+
+ if (view)
+ e_gw_message_write_string_parameter (msg, "view", NULL, view) ;
+ e_gw_message_write_footer (msg);
+
+ /* send message to server */
+ response = e_gw_connection_send_message (cnc, msg);
+ if (!response) {
+ g_object_unref (msg);
+ return E_GW_CONNECTION_STATUS_NO_RESPONSE;
+ }
+
+ status = e_gw_connection_parse_response_status (response);
+ if (status != E_GW_CONNECTION_STATUS_OK) {
+ if (status == E_GW_CONNECTION_STATUS_INVALID_CONNECTION)
+ reauthenticate (cnc);
+ g_object_unref (response);
+ g_object_unref (msg);
+ return status;
+ }
+
+ /* if status is OK - parse result. return the list */
+ param = soup_soap_response_get_first_parameter_by_name (response, "item");
+ if (!param) {
+ g_object_unref (response);
+ g_object_unref (msg);
+ return E_GW_CONNECTION_STATUS_INVALID_RESPONSE;
+ }
+
+ *item = e_gw_item_new_from_soap_parameter (cnc->priv->user_email, "", param);
+
+
+ /* free memory */
+ g_object_unref (response);
+ g_object_unref (msg);
+
+ return E_GW_CONNECTION_STATUS_OK;
+
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]