}
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;
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);
}
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;
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);
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);