[evolution-ews] Remove e_ews_connection_set_oof_settings().
- From: Matthew Barnes <mbarnes src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [evolution-ews] Remove e_ews_connection_set_oof_settings().
- Date: Wed, 18 Jul 2012 20:13:01 +0000 (UTC)
commit 6598e60aba853365d58cf242ca8a815066e52d3e
Author: Matthew Barnes <mbarnes redhat com>
Date: Wed Jul 18 16:06:56 2012 -0400
Remove e_ews_connection_set_oof_settings().
Use e_ews_oof_settings_submit() instead.
src/server/e-ews-connection.c | 153 -----------------------------------------
src/server/e-ews-connection.h | 18 -----
2 files changed, 0 insertions(+), 171 deletions(-)
---
diff --git a/src/server/e-ews-connection.c b/src/server/e-ews-connection.c
index 58a8cf2..09f4a13 100644
--- a/src/server/e-ews-connection.c
+++ b/src/server/e-ews-connection.c
@@ -6036,159 +6036,6 @@ e_ews_connection_get_delegate_sync (EEwsConnection *cnc,
}
-static void
-set_oof_settings_response_cb (ESoapResponse *response,
- GSimpleAsyncResult *simple)
-{
- ESoapParameter *param;
- GError *error = NULL;
-
- param = e_soap_response_get_first_parameter_by_name (
- response, "ResponseMessage", &error);
-
- /* Sanity check */
- g_return_if_fail (
- (param != NULL && error == NULL) ||
- (param == NULL && error != NULL));
-
- if (error != NULL)
- g_simple_async_result_take_error (simple, error);
-
- else if (!ews_get_response_status (param, &error))
- g_simple_async_result_take_error (simple, error);
-}
-
-/**
- * e_ews_connection__set_oof_settings:
- * @cnc: The EWS Connection
- * @pri: The priority associated with the request
- * @oof_settings: Details to set for ooof
- * @cancellable: a GCancellable to monitor cancelled operations
- * @callback: Responses are parsed and returned to this callback
- * @user_data: user data passed to callback
- **/
-void
-e_ews_connection_set_oof_settings (EEwsConnection *cnc,
- gint pri,
- OOFSettings *oof_settings,
- GCancellable *cancellable,
- GAsyncReadyCallback callback,
- gpointer user_data)
-{
- ESoapMessage *msg;
- GSimpleAsyncResult *simple;
- EwsAsyncData *async_data;
- gchar *start_tm = NULL, *end_tm = NULL;
- GTimeVal *time_val;
-
- g_return_if_fail (cnc != NULL);
-
- msg = e_ews_message_new_with_header (cnc->priv->uri, "SetUserOofSettingsRequest", NULL, NULL, EWS_EXCHANGE_2007_SP1);
-
- /*Set Mailbox to user Address we want to set*/
- e_soap_message_start_element (msg, "Mailbox", NULL, NULL);
- e_ews_message_write_string_parameter (msg, "Address", NULL, cnc->priv->email);
- e_soap_message_end_element (msg);
-
- /*Write out of office settings to message*/
- e_soap_message_start_element (msg, "UserOofSettings", NULL, NULL);
- e_ews_message_write_string_parameter (msg, "OofState", NULL, oof_settings->state);
- e_ews_message_write_string_parameter (msg, "ExternalAudience", NULL, oof_settings->ext_aud);
-
- time_val = g_new0 (GTimeVal, 1);
- time_val->tv_sec = oof_settings->start_tm;
- start_tm = g_time_val_to_iso8601 (time_val);
-
- time_val->tv_sec = oof_settings->end_tm;
- end_tm = g_time_val_to_iso8601 (time_val);
-
- e_soap_message_start_element (msg, "Duration", NULL, NULL);
- e_ews_message_write_string_parameter (msg, "StartTime", NULL, start_tm);
- e_ews_message_write_string_parameter (msg, "EndTime", NULL, end_tm);
- e_soap_message_end_element (msg);
-
- e_soap_message_start_element (msg, "InternalReply", NULL, NULL);
- e_ews_message_write_string_parameter (msg, "Message", NULL, oof_settings->int_reply);
- e_soap_message_end_element (msg);
-
- e_soap_message_start_element (msg, "ExternalReply", NULL, NULL);
- e_ews_message_write_string_parameter (msg, "Message", NULL, oof_settings->ext_reply);
- e_soap_message_end_element (msg);
-
- e_soap_message_end_element (msg);
-
- /* Complete the footer and print the request */
- e_ews_message_write_footer (msg);
-
- simple = g_simple_async_result_new (G_OBJECT (cnc),
- callback, user_data,
- e_ews_connection_set_oof_settings);
-
- async_data = g_new0 (EwsAsyncData, 1);
- g_simple_async_result_set_op_res_gpointer (
- simple, async_data, (GDestroyNotify) async_data_free);
-
- e_ews_connection_queue_request (
- cnc, msg, set_oof_settings_response_cb,
- pri, cancellable, simple);
-
- g_object_unref (simple);
-
- g_free (time_val);
- g_free (start_tm);
- g_free (end_tm);
-}
-
-gboolean
-e_ews_connection_set_oof_settings_finish (EEwsConnection *cnc,
- GAsyncResult *result,
- GError **error)
-{
- GSimpleAsyncResult *simple;
-
- g_return_val_if_fail (cnc != NULL, FALSE);
- g_return_val_if_fail (
- g_simple_async_result_is_valid (
- result, G_OBJECT (cnc), e_ews_connection_set_oof_settings),
- FALSE);
-
- simple = G_SIMPLE_ASYNC_RESULT (result);
-
- if (g_simple_async_result_propagate_error (simple, error))
- return FALSE;
-
- return TRUE;
-}
-
-gboolean
-e_ews_connection_set_oof_settings_sync (EEwsConnection *cnc,
- gint pri,
- OOFSettings *oof_settings,
- GCancellable *cancellable,
- GError **error)
-{
- EAsyncClosure *closure;
- GAsyncResult *result;
- gboolean success;
-
- g_return_val_if_fail (cnc != NULL, FALSE);
-
- closure = e_async_closure_new ();
-
- e_ews_connection_set_oof_settings (
- cnc, pri, oof_settings, cancellable,
- e_async_closure_callback, closure);
-
- result = e_async_closure_wait (closure);
-
- success = e_ews_connection_set_oof_settings_finish (
- cnc, result, error);
-
- e_async_closure_free (closure);
-
- return success;
-}
-
void
e_ews_connection_free_oof_settings (OOFSettings *oof_settings)
{
diff --git a/src/server/e-ews-connection.h b/src/server/e-ews-connection.h
index 464a57b..714afe4 100644
--- a/src/server/e-ews-connection.h
+++ b/src/server/e-ews-connection.h
@@ -817,24 +817,6 @@ gboolean e_ews_connection_get_delegate_sync
GCancellable *cancellable,
GError **error);
-void e_ews_connection_set_oof_settings
- (EEwsConnection *cnc,
- gint pri,
- OOFSettings *oof_settings,
- GCancellable *cancellable,
- GAsyncReadyCallback callback,
- gpointer user_data);
-gboolean e_ews_connection_set_oof_settings_finish
- (EEwsConnection *cnc,
- GAsyncResult *result,
- GError **error);
-gboolean e_ews_connection_set_oof_settings_sync
- (EEwsConnection *cnc,
- gint pri,
- OOFSettings *oof_settings,
- GCancellable *cancellable,
- GError **error);
-
void e_ews_connection_free_oof_settings
(OOFSettings *oof_settings);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]