diff options
author | Parthasarathi Susarla <sparthasarathi@novell.com> | 2006-06-12 09:19:40 +0000 |
---|---|---|
committer | Parthasarathi Susarla <saps@src.gnome.org> | 2006-06-12 09:19:40 +0000 |
commit | 4984c15ec190c82f4f63712725bc5d8b189cea5e (patch) | |
tree | a754f83dd8d088b453aa98fe0f0dc9c3e0c2be5e | |
parent | 770992955f4248c9cf17900ae05ad979612069aa (diff) | |
download | evolution-data-server-4984c15ec190c82f4f63712725bc5d8b189cea5e.tar.gz |
Fixes bug #166265 on bnc Add a new method
2006-06-12 Parthasarathi Susarla <sparthasarathi@novell.com>
Fixes bug #166265 on bnc
* e-gw-connection.[ch]: Add a new method
e_gw_connection_purge_selected_items to selectively delete messages
from trash.
-rw-r--r-- | servers/groupwise/ChangeLog | 7 | ||||
-rw-r--r-- | servers/groupwise/e-gw-connection.c | 33 | ||||
-rw-r--r-- | servers/groupwise/e-gw-connection.h | 1 |
3 files changed, 41 insertions, 0 deletions
diff --git a/servers/groupwise/ChangeLog b/servers/groupwise/ChangeLog index 2c92a7b60..95c1698be 100644 --- a/servers/groupwise/ChangeLog +++ b/servers/groupwise/ChangeLog @@ -1,3 +1,10 @@ +2006-06-12 Parthasarathi Susarla <sparthasarathi@novell.com> + + Fixes bug #166265 on bnc + * e-gw-connection.[ch]: Add a new method + e_gw_connection_purge_selected_items to selectively delete messages + from trash. + 2006-04-24 Julio M. Merino Vidal <jmmv@NetBSD.org> Reviewed by Harish Krishnaswamy <kharish@novell.com> diff --git a/servers/groupwise/e-gw-connection.c b/servers/groupwise/e-gw-connection.c index ea1c58cf5..291d3fe68 100644 --- a/servers/groupwise/e-gw-connection.c +++ b/servers/groupwise/e-gw-connection.c @@ -2887,6 +2887,39 @@ e_gw_connection_purge_deleted_items (EGwConnection *cnc) } +EGwConnectionStatus +e_gw_connection_purge_selected_items (EGwConnection *cnc, GList *item_ids) +{ + + SoupSoapMessage *msg; + SoupSoapResponse *response; + EGwConnectionStatus status = E_GW_CONNECTION_STATUS_UNKNOWN; + + msg = e_gw_message_new_with_header (cnc->priv->uri, cnc->priv->session_id, "purgeRequest"); + /* Now write the elements that need to be deleted */ + soup_soap_message_start_element (msg, "items", NULL, NULL); + for (; item_ids != NULL; item_ids = g_list_next (item_ids)) + e_gw_message_write_string_parameter (msg, "item", NULL, item_ids->data); + soup_soap_message_end_element (msg); + /*End message*/ + e_gw_message_write_footer (msg); + /* Send 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_INVALID_CONNECTION) + reauthenticate (cnc); + /* free memory */ + g_object_unref (response); + g_object_unref (msg); + + return status; + +} + EGwConnectionStatus e_gw_connection_mark_read(EGwConnection *cnc, GList *item_ids) { diff --git a/servers/groupwise/e-gw-connection.h b/servers/groupwise/e-gw-connection.h index 4ac0939bd..9c023fdef 100644 --- a/servers/groupwise/e-gw-connection.h +++ b/servers/groupwise/e-gw-connection.h @@ -156,6 +156,7 @@ EGwConnectionStatus e_gw_connection_rename_folder (EGwConnection *cnc, const cha EGwConnectionStatus e_gw_connection_share_folder (EGwConnection *cnc, gchar *id, GList *new_list, const char *sub, const char *mesg ,int flag); EGwConnectionStatus e_gw_connection_accept_shared_folder (EGwConnection *cnc, gchar *folder_name, gchar *container_id, gchar *item_id, gchar *desc); EGwConnectionStatus e_gw_connection_purge_deleted_items (EGwConnection *cnc); +EGwConnectionStatus e_gw_connection_purge_selected_items (EGwConnection *cnc, GList *item_ids); EGwConnectionStatus e_gw_connection_mark_read(EGwConnection *cnc, GList *item_ids) ; EGwConnectionStatus e_gw_connection_mark_unread(EGwConnection *cnc, GList *item_ids) ; |