Removed the two functions for accepting/declining recurring appointments and
authorChenthill Palanisamy <pchen@src.gnome.org>
Tue, 19 Jul 2005 14:11:49 +0000 (14:11 +0000)
committerChenthill Palanisamy <pchen@src.gnome.org>
Tue, 19 Jul 2005 14:11:49 +0000 (14:11 +0000)
handled them with the exisinting functions.

servers/groupwise/ChangeLog
servers/groupwise/e-gw-connection.c
servers/groupwise/e-gw-connection.h

index 1821bd1..4424e2e 100644 (file)
@@ -1,3 +1,11 @@
+2005-07-19  Chenthill Palanisamy  <pchenthill@novell.com>
+
+       * e-gw-connection.c: (e_gw_connection_accept_request),
+       (e_gw_connection_decline_request): Added additional parameters
+       for passing the recurrence key.
+       * e-gw-connection.h: Removed two functions for accepting/declining
+       for recurrences.
+
 2005-07-10  Sankar P  <psankar@novell.com>
 
        * e-gw-connection.c : 
index 1abcb84..beb5d25 100644 (file)
@@ -1377,7 +1377,7 @@ e_gw_connection_remove_items (EGwConnection *cnc, const char *container, GList *
 }
 
 EGwConnectionStatus
-e_gw_connection_accept_request (EGwConnection *cnc, const char *id, const char *accept_level)
+e_gw_connection_accept_request (EGwConnection *cnc, const char *id, const char *accept_level, const char *accept_comment, const char *recurrence_key)
 {
        SoupSoapMessage *msg;
        int status;
@@ -1388,35 +1388,13 @@ e_gw_connection_accept_request (EGwConnection *cnc, const char *id, const char *
        e_gw_message_write_string_parameter (msg, "item", NULL, id);
        soup_soap_message_end_element (msg);
        e_gw_message_write_string_parameter (msg, "acceptLevel", NULL, accept_level);
-       e_gw_message_write_footer (msg);
-
-       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_INVALID_CONNECTION)
-               reauthenticate (cnc);
-       g_object_unref (response);
-       g_object_unref (msg);
-       return status;
-}
-
-EGwConnectionStatus
-e_gw_connection_accept_request_by_recurrence_key (EGwConnection *cnc, const char *recurrence_key, const char *accept_level, const char *accept_comment)
-{
-       SoupSoapMessage *msg;
-       int status;
-       SoupSoapResponse *response;
+       
+       if (recurrence_key)
+               e_gw_message_write_string_parameter (msg, "recurrenceAllInstances", NULL, recurrence_key);
 
-       msg = e_gw_message_new_with_header (cnc->priv->uri, cnc->priv->session_id, "acceptRequest");
        if (accept_comment)
                e_gw_message_write_string_parameter (msg, "comment", NULL, accept_comment);
 
-       e_gw_message_write_string_parameter (msg, "acceptLevel", NULL, accept_level);
-       e_gw_message_write_string_parameter (msg, "recurrenceAllInstances", NULL, recurrence_key);
        e_gw_message_write_footer (msg);
 
        response = e_gw_connection_send_message (cnc, msg);
@@ -1434,7 +1412,7 @@ e_gw_connection_accept_request_by_recurrence_key (EGwConnection *cnc, const char
 }
 
 EGwConnectionStatus
-e_gw_connection_decline_request (EGwConnection *cnc, const char *id)
+e_gw_connection_decline_request (EGwConnection *cnc, const char *id, const char *decline_comment, const char *recurrence_key)
 {
        SoupSoapMessage *msg;
        int status;
@@ -1444,33 +1422,13 @@ e_gw_connection_decline_request (EGwConnection *cnc, const char *id)
        soup_soap_message_start_element (msg, "items", NULL, NULL);
        e_gw_message_write_string_parameter (msg, "item", NULL, id);
        soup_soap_message_end_element (msg);
-       e_gw_message_write_footer (msg);
-
-       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_INVALID_CONNECTION)
-               reauthenticate (cnc);
-       g_object_unref (response);
-       g_object_unref (msg);
-       return status;
-}
-
-EGwConnectionStatus
-e_gw_connection_decline_request_by_recurrence_key (EGwConnection *cnc, const char *recurrence_key, const char *decline_comment)
-{
-       SoupSoapMessage *msg;
-       int status;
-       SoupSoapResponse *response;
-
-       msg = e_gw_message_new_with_header (cnc->priv->uri, cnc->priv->session_id, "declineRequest");
+       
        if (decline_comment)
                e_gw_message_write_string_parameter (msg, "comment", NULL, decline_comment);
-       e_gw_message_write_string_parameter (msg, "recurrenceAllInstances", NULL, recurrence_key);
+
+       if (recurrence_key)
+               e_gw_message_write_string_parameter (msg, "recurrenceAllInstances", NULL, recurrence_key);
+
        e_gw_message_write_footer (msg);
 
        response = e_gw_connection_send_message (cnc, msg);
index 3fa7e5e..077fe78 100644 (file)
@@ -119,13 +119,11 @@ char               *e_gw_connection_format_date_string (const char *dtstring);
 EGwConnectionStatus e_gw_connection_create_item (EGwConnection *cnc, EGwItem *item, char** id);
 EGwConnectionStatus e_gw_connection_get_item (EGwConnection *cnc, const char *container, const char *id, const char *view, EGwItem **item);
 EGwConnectionStatus e_gw_connection_modify_item (EGwConnection *cnc, const char *id, EGwItem *item);
-EGwConnectionStatus e_gw_connection_accept_request (EGwConnection *cnc, const char *id, const char *accept_level);
-EGwConnectionStatus e_gw_connection_decline_request (EGwConnection *cnc, const char *id);
+EGwConnectionStatus e_gw_connection_accept_request (EGwConnection *cnc, const char *id, const char *accept_level, const char *accept_comment, const char *recurrence_key);
+EGwConnectionStatus e_gw_connection_decline_request (EGwConnection *cnc, const char *id, const char *decline_comment, const char *recurrence_key);
 EGwConnectionStatus e_gw_connection_retract_request (EGwConnection *cnc, const char *id, const char *comment, gboolean retract_all, gboolean resend);
 EGwConnectionStatus e_gw_connection_complete_request (EGwConnection *cnc, const char *id);
 EGwConnectionStatus e_gw_connection_delegate_request (EGwConnection *cnc, EGwItem *item, const char *id, const char *comments_org, const char *comments_del, const char *recur_key);
-EGwConnectionStatus e_gw_connection_decline_request_by_recurrence_key (EGwConnection *cnc, const char *recurrence_key, const char *decline_comment);
-EGwConnectionStatus e_gw_connection_accept_request_by_recurrence_key (EGwConnection *cnc, const char *recurrence_key, const char *accept_level, const char *accept_comment);
 EGwConnectionStatus e_gw_connection_create_book (EGwConnection *cnc, char *book_name, char**id);
 EGwConnectionStatus e_gw_connection_remove_book (EGwConnection *cnc, char *book_uid);
 EGwConnectionStatus e_gw_connection_get_address_book_list (EGwConnection *cnc, GList **container_list);