diff options
author | Milan Crha <mcrha@redhat.com> | 2017-08-02 08:26:43 +0200 |
---|---|---|
committer | Milan Crha <mcrha@redhat.com> | 2017-08-02 08:26:43 +0200 |
commit | a65018da76525190318f77f262c0709c4b5efedc (patch) | |
tree | 68a9144633896858708e9564324e161c76684663 /src/modules | |
parent | 17f85044f56251add4fbb29ea2bb9798a99fc02f (diff) | |
download | evolution-data-server-a65018da76525190318f77f262c0709c4b5efedc.tar.gz |
Rename owncloud-backend module to webdav-backend
There had been nothing specific about ownCloud in the module,
thus make it a generic WebDAV module, which can be reused when needed.
A migration code for the change had been added as well.
Diffstat (limited to 'src/modules')
-rw-r--r-- | src/modules/CMakeLists.txt | 2 | ||||
-rw-r--r-- | src/modules/gnome-online-accounts/module-gnome-online-accounts.c | 2 | ||||
-rw-r--r-- | src/modules/webdav-backend/CMakeLists.txt (renamed from src/modules/owncloud-backend/CMakeLists.txt) | 4 | ||||
-rw-r--r-- | src/modules/webdav-backend/module-webdav-backend.c (renamed from src/modules/owncloud-backend/module-owncloud-backend.c) | 68 |
4 files changed, 38 insertions, 38 deletions
diff --git a/src/modules/CMakeLists.txt b/src/modules/CMakeLists.txt index adf29bd45..9bd3a1611 100644 --- a/src/modules/CMakeLists.txt +++ b/src/modules/CMakeLists.txt @@ -65,7 +65,7 @@ endmacro(add_credentials_module) add_subdirectory(cache-reaper) add_subdirectory(google-backend) add_subdirectory(outlook-backend) -add_subdirectory(owncloud-backend) +add_subdirectory(webdav-backend) add_subdirectory(yahoo-backend) if(HAVE_GTK) diff --git a/src/modules/gnome-online-accounts/module-gnome-online-accounts.c b/src/modules/gnome-online-accounts/module-gnome-online-accounts.c index fafc33bc2..72cef7886 100644 --- a/src/modules/gnome-online-accounts/module-gnome-online-accounts.c +++ b/src/modules/gnome-online-accounts/module-gnome-online-accounts.c @@ -103,7 +103,7 @@ gnome_online_accounts_get_backend_name (const gchar *goa_provider_type) eds_backend_name = "none"; if (g_str_equal (goa_provider_type, "owncloud")) - eds_backend_name = "owncloud"; + eds_backend_name = "webdav"; if (g_str_equal (goa_provider_type, "windows_live")) eds_backend_name = "outlook"; diff --git a/src/modules/owncloud-backend/CMakeLists.txt b/src/modules/webdav-backend/CMakeLists.txt index 91bad5a9e..ab7e97c99 100644 --- a/src/modules/owncloud-backend/CMakeLists.txt +++ b/src/modules/webdav-backend/CMakeLists.txt @@ -1,13 +1,13 @@ set(extra_deps) set(sources - module-owncloud-backend.c + module-webdav-backend.c ) set(extra_defines) set(extra_cflags) set(extra_incdirs) set(extra_ldflags) -add_source_registry_module(module-owncloud-backend +add_source_registry_module(module-webdav-backend sources extra_deps extra_defines diff --git a/src/modules/owncloud-backend/module-owncloud-backend.c b/src/modules/webdav-backend/module-webdav-backend.c index 0768959ae..6a349618c 100644 --- a/src/modules/owncloud-backend/module-owncloud-backend.c +++ b/src/modules/webdav-backend/module-webdav-backend.c @@ -1,5 +1,5 @@ /* - * module-owncloud-backend.c + * module-webdav-backend.c * * This library is free software: you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published by @@ -21,34 +21,34 @@ #include <libedataserver/libedataserver.h> /* Standard GObject macros */ -#define E_TYPE_OWNCLOUD_BACKEND \ - (e_owncloud_backend_get_type ()) -#define E_OWNCLOUD_BACKEND(obj) \ +#define E_TYPE_WEBDAV_BACKEND \ + (e_webdav_backend_get_type ()) +#define E_WEBDAV_BACKEND(obj) \ (G_TYPE_CHECK_INSTANCE_CAST \ - ((obj), E_TYPE_OWNCLOUD_BACKEND, EOwncloudBackend)) -#define E_IS_OWNCLOUD_BACKEND(obj) \ + ((obj), E_TYPE_WEBDAV_BACKEND, EWebDAVBackend)) +#define E_IS_WEBDAV_BACKEND(obj) \ (G_TYPE_CHECK_INSTANCE_TYPE \ - ((obj), E_TYPE_OWNCLOUD_BACKEND)) + ((obj), E_TYPE_WEBDAV_BACKEND)) -typedef struct _EOwncloudBackend EOwncloudBackend; -typedef struct _EOwncloudBackendClass EOwncloudBackendClass; +typedef struct _EWebDAVBackend EWebDAVBackend; +typedef struct _EWebDAVBackendClass EWebDAVBackendClass; -typedef struct _EOwncloudBackendFactory EOwncloudBackendFactory; -typedef struct _EOwncloudBackendFactoryClass EOwncloudBackendFactoryClass; +typedef struct _EWebDAVBackendFactory EWebDAVBackendFactory; +typedef struct _EWebDAVBackendFactoryClass EWebDAVBackendFactoryClass; -struct _EOwncloudBackend { +struct _EWebDAVBackend { EWebDAVCollectionBackend parent; }; -struct _EOwncloudBackendClass { +struct _EWebDAVBackendClass { EWebDAVCollectionBackendClass parent_class; }; -struct _EOwncloudBackendFactory { +struct _EWebDAVBackendFactory { ECollectionBackendFactory parent; }; -struct _EOwncloudBackendFactoryClass { +struct _EWebDAVBackendFactoryClass { ECollectionBackendFactoryClass parent_class; }; @@ -57,21 +57,21 @@ void e_module_load (GTypeModule *type_module); void e_module_unload (GTypeModule *type_module); /* Forward Declarations */ -GType e_owncloud_backend_get_type (void); -GType e_owncloud_backend_factory_get_type (void); +GType e_webdav_backend_get_type (void); +GType e_webdav_backend_factory_get_type (void); G_DEFINE_DYNAMIC_TYPE ( - EOwncloudBackend, - e_owncloud_backend, + EWebDAVBackend, + e_webdav_backend, E_TYPE_WEBDAV_COLLECTION_BACKEND) G_DEFINE_DYNAMIC_TYPE ( - EOwncloudBackendFactory, - e_owncloud_backend_factory, + EWebDAVBackendFactory, + e_webdav_backend_factory, E_TYPE_COLLECTION_BACKEND_FACTORY) static ESourceAuthenticationResult -owncloud_backend_authenticate_sync (EBackend *backend, +webdav_backend_authenticate_sync (EBackend *backend, const ENamedParameters *credentials, gchar **out_certificate_pem, GTlsCertificateFlags *out_certificate_errors, @@ -85,7 +85,7 @@ owncloud_backend_authenticate_sync (EBackend *backend, source = e_backend_get_source (backend); - /* Ignore the request for non-GOA ownCloud sources by pretending success */ + /* Ignore the request for non-GOA WebDAV sources by pretending success */ if (!e_source_has_extension (source, E_SOURCE_EXTENSION_GOA)) return E_SOURCE_AUTHENTICATION_ACCEPTED; @@ -98,49 +98,49 @@ owncloud_backend_authenticate_sync (EBackend *backend, } static void -e_owncloud_backend_class_init (EOwncloudBackendClass *class) +e_webdav_backend_class_init (EWebDAVBackendClass *class) { EBackendClass *backend_class; backend_class = E_BACKEND_CLASS (class); - backend_class->authenticate_sync = owncloud_backend_authenticate_sync; + backend_class->authenticate_sync = webdav_backend_authenticate_sync; } static void -e_owncloud_backend_class_finalize (EOwncloudBackendClass *class) +e_webdav_backend_class_finalize (EWebDAVBackendClass *class) { } static void -e_owncloud_backend_init (EOwncloudBackend *backend) +e_webdav_backend_init (EWebDAVBackend *backend) { } static void -e_owncloud_backend_factory_class_init (EOwncloudBackendFactoryClass *class) +e_webdav_backend_factory_class_init (EWebDAVBackendFactoryClass *class) { ECollectionBackendFactoryClass *factory_class; factory_class = E_COLLECTION_BACKEND_FACTORY_CLASS (class); - factory_class->factory_name = "owncloud"; - factory_class->backend_type = E_TYPE_OWNCLOUD_BACKEND; + factory_class->factory_name = "webdav"; + factory_class->backend_type = E_TYPE_WEBDAV_BACKEND; } static void -e_owncloud_backend_factory_class_finalize (EOwncloudBackendFactoryClass *class) +e_webdav_backend_factory_class_finalize (EWebDAVBackendFactoryClass *class) { } static void -e_owncloud_backend_factory_init (EOwncloudBackendFactory *factory) +e_webdav_backend_factory_init (EWebDAVBackendFactory *factory) { } G_MODULE_EXPORT void e_module_load (GTypeModule *type_module) { - e_owncloud_backend_register_type (type_module); - e_owncloud_backend_factory_register_type (type_module); + e_webdav_backend_register_type (type_module); + e_webdav_backend_factory_register_type (type_module); } G_MODULE_EXPORT void |