[evolution-ews] EEwsConnection: Integrate GProxyResolver in backends.



commit e0b97b3b1786581bf423f591363c054246ebe0d8
Author: Matthew Barnes <mbarnes redhat com>
Date:   Thu Oct 10 11:18:27 2013 -0400

    EEwsConnection: Integrate GProxyResolver in backends.

 src/addressbook/e-book-backend-ews.c |   15 +++++++++++++++
 src/calendar/e-cal-backend-ews.c     |    5 +++++
 src/camel/camel-ews-store.c          |   10 ++++++++++
 src/collection/e-ews-backend.c       |    5 +++++
 4 files changed, 35 insertions(+), 0 deletions(-)
---
diff --git a/src/addressbook/e-book-backend-ews.c b/src/addressbook/e-book-backend-ews.c
index 0a88e5a..b5c34c0 100644
--- a/src/addressbook/e-book-backend-ews.c
+++ b/src/addressbook/e-book-backend-ews.c
@@ -2193,6 +2193,11 @@ ews_download_gal_file (EBookBackendEws *cbews,
 
        oab_cnc = e_ews_connection_new (full_url, ews_settings);
 
+       g_object_bind_property (
+               cbews, "proxy-resolver",
+               oab_cnc, "proxy-resolver",
+               G_BINDING_SYNC_CREATE);
+
        password = e_ews_connection_dup_password (priv->cnc);
        e_ews_connection_set_password (oab_cnc, password);
        g_free (password);
@@ -2478,6 +2483,11 @@ ebews_start_gal_sync (gpointer data)
 
        oab_cnc = e_ews_connection_new (priv->oab_url, ews_settings);
 
+       g_object_bind_property (
+               cbews, "proxy-resolver",
+               oab_cnc, "proxy-resolver",
+               G_BINDING_SYNC_CREATE);
+
        password = e_ews_connection_dup_password (priv->cnc);
        e_ews_connection_set_password (oab_cnc, password);
        g_free (password);
@@ -3779,6 +3789,11 @@ book_backend_ews_try_password_sync (ESourceAuthenticator *authenticator,
 
        connection = e_ews_connection_new (hosturl, ews_settings);
 
+       g_object_bind_property (
+               backend, "proxy-resolver",
+               connection, "proxy-resolver",
+               G_BINDING_SYNC_CREATE);
+
        result = e_source_authenticator_try_password_sync (
                E_SOURCE_AUTHENTICATOR (connection),
                password, cancellable, error);
diff --git a/src/calendar/e-cal-backend-ews.c b/src/calendar/e-cal-backend-ews.c
index 21d5445..b180cec 100644
--- a/src/calendar/e-cal-backend-ews.c
+++ b/src/calendar/e-cal-backend-ews.c
@@ -4511,6 +4511,11 @@ cal_backend_ews_try_password_sync (ESourceAuthenticator *authenticator,
 
        g_free (hosturl);
 
+       g_object_bind_property (
+               backend, "proxy-resolver",
+               connection, "proxy-resolver",
+               G_BINDING_SYNC_CREATE);
+
        store = backend->priv->store;
        old_sync_state = e_cal_backend_store_get_key_value (store, SYNC_KEY);
 
diff --git a/src/camel/camel-ews-store.c b/src/camel/camel-ews-store.c
index 3afda8e..ed4c54d 100644
--- a/src/camel/camel-ews-store.c
+++ b/src/camel/camel-ews-store.c
@@ -1133,6 +1133,11 @@ ews_authenticate_sync (CamelService *service,
 
        g_object_unref (settings);
 
+       g_object_bind_property (
+               service, "proxy-resolver",
+               connection, "proxy-resolver",
+               G_BINDING_SYNC_CREATE);
+
        /* XXX We need to run some operation that requires authentication
         *     but does not change any server-side state, so we can check
         *     the error status and determine if our password is valid.
@@ -1306,6 +1311,11 @@ ews_store_query_auth_types_sync (CamelService *service,
        g_free (hosturl);
        g_object_unref (settings);
 
+       g_object_bind_property (
+               service, "proxy-resolver",
+               connection, "proxy-resolver",
+               G_BINDING_SYNC_CREATE);
+
        if (e_ews_connection_query_auth_methods_sync (connection, G_PRIORITY_DEFAULT, &auth_methods, 
cancellable, error)) {
                CamelProvider *provider;
                CamelServiceAuthType *authtype;
diff --git a/src/collection/e-ews-backend.c b/src/collection/e-ews-backend.c
index 26c50b5..ff83660 100644
--- a/src/collection/e-ews-backend.c
+++ b/src/collection/e-ews-backend.c
@@ -1074,6 +1074,11 @@ e_ews_backend_ref_connection_sync (EEwsBackend *backend,
        connection = e_ews_connection_new (hosturl, settings);
        g_free (hosturl);
 
+       g_object_bind_property (
+               backend, "proxy-resolver",
+               connection, "proxy-resolver",
+               G_BINDING_SYNC_CREATE);
+
        success = e_backend_authenticate_sync (
                E_BACKEND (backend),
                E_SOURCE_AUTHENTICATOR (connection),


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]