GError **error)
{
EBookBackendGooglePrivate *priv;
- ESourceRegistry *registry;
- ESource *source;
priv = E_BOOK_BACKEND_GOOGLE_GET_PRIVATE (backend);
- source = e_backend_get_source (E_BACKEND (backend));
- registry = e_book_backend_get_registry (backend);
/* Make sure we have the GDataService configured
* before requesting authorization. */
#endif
/* Otherwise it's up to us to obtain a login secret. */
- return e_source_registry_authenticate_sync (
- registry, source, E_SOURCE_AUTHENTICATOR (backend),
+ return e_backend_authenticate_sync (
+ E_BACKEND (backend),
+ E_SOURCE_AUTHENTICATOR (backend),
cancellable, error);
}
ESourceAuthentication *auth_extension;
ESourceLDAP *ldap_extension;
ESourceOffline *offline_extension;
- ESourceRegistry *registry;
ESource *source;
const gchar *extension_name;
const gchar *cache_dir;
source = e_backend_get_source (E_BACKEND (backend));
cache_dir = e_book_backend_get_cache_dir (backend);
- registry = e_book_backend_get_registry (backend);
-
extension_name = E_SOURCE_EXTENSION_AUTHENTICATION;
auth_extension = e_source_get_extension (source, extension_name);
}
if (auth_required && error == NULL)
- e_source_registry_authenticate_sync (
- registry, source,
+ e_backend_authenticate_sync (
+ E_BACKEND (backend),
E_SOURCE_AUTHENTICATOR (backend),
cancellable, &error);
ESourceAuthentication *auth_extension;
ESourceOffline *offline_extension;
ESourceWebdav *webdav_extension;
- ESourceRegistry *registry;
ESource *source;
const gchar *extension_name;
const gchar *cache_dir;
/* will try fetch ctag for the first time, if it fails then sets this to FALSE */
priv->supports_getctag = TRUE;
- registry = e_book_backend_get_registry (backend);
-
source = e_backend_get_source (E_BACKEND (backend));
cache_dir = e_book_backend_get_cache_dir (backend);
e_book_backend_notify_readonly (backend, FALSE);
if (e_source_authentication_required (auth_extension))
- e_source_registry_authenticate_sync (
- registry, source,
+ e_backend_authenticate_sync (
+ E_BACKEND (backend),
E_SOURCE_AUTHENTICATOR (backend),
cancellable, &error);
GCancellable *cancellable,
GError **error)
{
- ESource *source;
- ESourceRegistry *registry;
- gboolean res;
-
- source = e_backend_get_source (E_BACKEND (cbdav));
- registry = e_cal_backend_get_registry (E_CAL_BACKEND (cbdav));
+ gboolean success;
if (ref_cbdav)
g_object_ref (cbdav);
- res = e_source_registry_authenticate_sync (
- registry, source, E_SOURCE_AUTHENTICATOR (cbdav),
+ success = e_backend_authenticate_sync (
+ E_BACKEND (cbdav),
+ E_SOURCE_AUTHENTICATOR (cbdav),
cancellable, error);
if (ref_cbdav)
caldav_unref_in_thread (cbdav);
- return res;
+ return success;
}
/* Returns whether calendar changed on the server. This works only when server
GCancellable *cancellable,
ECalBackendHttp *backend)
{
- ESource *source;
- ESourceRegistry *registry;
const gchar *uri;
GError *error = NULL;
backend->priv->is_loading = TRUE;
- source = e_backend_get_source (E_BACKEND (backend));
- registry = e_cal_backend_get_registry (E_CAL_BACKEND (backend));
-
uri = cal_backend_http_ensure_uri (backend);
cal_backend_http_load (backend, cancellable, uri, &error);
if (g_error_matches (error, SOUP_HTTP_ERROR, SOUP_STATUS_UNAUTHORIZED)) {
g_clear_error (&error);
- e_source_registry_authenticate_sync (
- registry, source,
+ e_backend_authenticate_sync (
+ E_BACKEND (backend),
E_SOURCE_AUTHENTICATOR (backend),
cancellable, &error);
}