[libcloudproviders/wip/rename-exporter] libcloudproviders: Rename CloudProviderProxy to CloudProviderAccount
- From: Gitlab System User <gitlab src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [libcloudproviders/wip/rename-exporter] libcloudproviders: Rename CloudProviderProxy to CloudProviderAccount
- Date: Fri, 1 Sep 2017 16:39:11 +0000 (UTC)
commit 34e1e90ee6f8e89db8ba0a3942ffeb8989c15d6c
Author: Julius Härtl <jus bitgrid net>
Date: Fri Sep 1 18:39:00 2017 +0200
libcloudproviders: Rename CloudProviderProxy to CloudProviderAccount
src/cloudprovider.h | 2 +-
...cloudproviderproxy.c => cloudprovideraccount.c} | 142 ++++++++++-----------
src/cloudprovideraccount.h | 73 +++++++++++
src/cloudprovidermanager.c | 2 +-
src/cloudprovidermanager.h | 2 +-
src/cloudproviderproxy.h | 73 -----------
src/cloudproviders.c | 14 +-
src/cloudproviders.h | 2 +-
src/meson.build | 4 +-
test/testcloudproviderclient.c | 16 +--
test/testcloudproviderserver.c | 2 +-
11 files changed, 166 insertions(+), 166 deletions(-)
---
diff --git a/src/cloudprovider.h b/src/cloudprovider.h
index 34ff46e..db7d333 100644
--- a/src/cloudprovider.h
+++ b/src/cloudprovider.h
@@ -21,7 +21,7 @@
#include "cloudprovider-generated.h"
/* for CloudProviderStatus enum */
-#include "cloudproviderproxy.h"
+#include "cloudprovideraccount.h"
#include "cloudprovideraccountexporter.h"
G_BEGIN_DECLS
diff --git a/src/cloudproviderproxy.c b/src/cloudprovideraccount.c
similarity index 68%
rename from src/cloudproviderproxy.c
rename to src/cloudprovideraccount.c
index 0db952d..d2a6ed3 100644
--- a/src/cloudproviderproxy.c
+++ b/src/cloudprovideraccount.c
@@ -1,4 +1,4 @@
-/* cloudproviderproxy.c
+/* cloudprovideraccount.c
*
* Copyright (C) 2015 Carlos Soriano <csoriano gnome org>
* Copyright (C) 2017 Julius Haertl <jus bitgrid net>
@@ -17,7 +17,7 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#include "cloudproviderproxy.h"
+#include "cloudprovideraccount.h"
#include "cloudprovider-generated.h"
@@ -37,17 +37,17 @@ typedef struct
gchar *object_path;
GCancellable *cancellable;
gboolean ready;
-} CloudProviderProxyPrivate;
+} CloudProviderAccountPrivate;
-G_DEFINE_TYPE_WITH_PRIVATE (CloudProviderProxy, cloud_provider_proxy, G_TYPE_OBJECT)
+G_DEFINE_TYPE_WITH_PRIVATE (CloudProviderAccount, cloud_provider_account, G_TYPE_OBJECT)
/**
- * SECTION:cloudproviderproxy
- * @title: CloudProviderProxy
- * @short_description: Base object for representing a single provider for clients.
- * @include: src/cloudproviderproxy.h
+ * SECTION:cloudprovideraccount
+ * @title: CloudProviderAccount
+ * @short_description: Base object for representing a single account for clients.
+ * @include: src/cloudprovideraccount.h
*
- * #CloudProviderProxy is the basic object used to construct the integrator UI
+ * #CloudProviderAccount is the basic object used to construct the integrator UI
* and actions that a provider will present to the user, from the client side.
* Integrators of the cloud providers can use this object to poll the
* #CloudProvider menus, status and actions.
@@ -66,8 +66,8 @@ on_get_icon (GObject *source_object,
GAsyncResult *res,
gpointer user_data)
{
- CloudProviderProxy *self = CLOUD_PROVIDER_PROXY (user_data);
- CloudProviderProxyPrivate *priv = cloud_provider_proxy_get_instance_private (self);
+ CloudProviderAccount *self = CLOUD_PROVIDER_ACCOUNT (user_data);
+ CloudProviderAccountPrivate *priv = cloud_provider_account_get_instance_private (self);
GError *error = NULL;
GVariant *variant_tuple;
GVariant *variant_dict;
@@ -97,7 +97,7 @@ on_get_icon (GObject *source_object,
out:
g_variant_unref (variant_tuple);
g_signal_emit_by_name (self, "changed");
- if(cloud_provider_proxy_is_available(self) && !priv->ready) {
+ if(cloud_provider_account_is_available(self) && !priv->ready) {
priv->ready = TRUE;
g_signal_emit_by_name (self, "ready");
}
@@ -108,8 +108,8 @@ on_get_name (GObject *source_object,
GAsyncResult *res,
gpointer user_data)
{
- CloudProviderProxy *self = CLOUD_PROVIDER_PROXY (user_data);
- CloudProviderProxyPrivate *priv = cloud_provider_proxy_get_instance_private (self);
+ CloudProviderAccount *self = CLOUD_PROVIDER_ACCOUNT (user_data);
+ CloudProviderAccountPrivate *priv = cloud_provider_account_get_instance_private (self);
GError *error = NULL;
if (priv->name != NULL)
@@ -122,7 +122,7 @@ on_get_name (GObject *source_object,
return;
}
g_signal_emit_by_name (self, "changed");
- if(cloud_provider_proxy_is_available(self) && !priv->ready) {
+ if(cloud_provider_account_is_available(self) && !priv->ready) {
priv->ready = TRUE;
g_signal_emit_by_name (self, "ready");
}
@@ -134,8 +134,8 @@ on_get_path (GObject *source_object,
GAsyncResult *res,
gpointer user_data)
{
- CloudProviderProxy *self = CLOUD_PROVIDER_PROXY (user_data);
- CloudProviderProxyPrivate *priv = cloud_provider_proxy_get_instance_private (self);
+ CloudProviderAccount *self = CLOUD_PROVIDER_ACCOUNT (user_data);
+ CloudProviderAccountPrivate *priv = cloud_provider_account_get_instance_private (self);
GError *error = NULL;
if (priv->path != NULL)
@@ -148,7 +148,7 @@ on_get_path (GObject *source_object,
return;
}
g_signal_emit_by_name (self, "changed");
- if(cloud_provider_proxy_is_available(self) && !priv->ready) {
+ if(cloud_provider_account_is_available(self) && !priv->ready) {
priv->ready = TRUE;
g_signal_emit_by_name (self, "ready");
}
@@ -159,8 +159,8 @@ on_get_status (GObject *source_object,
GAsyncResult *res,
gpointer user_data)
{
- CloudProviderProxy *self = CLOUD_PROVIDER_PROXY (user_data);
- CloudProviderProxyPrivate *priv = cloud_provider_proxy_get_instance_private (self);
+ CloudProviderAccount *self = CLOUD_PROVIDER_ACCOUNT (user_data);
+ CloudProviderAccountPrivate *priv = cloud_provider_account_get_instance_private (self);
GError *error = NULL;
gint status;
@@ -172,7 +172,7 @@ on_get_status (GObject *source_object,
}
priv->status = status;
g_signal_emit_by_name (self, "changed");
- if(cloud_provider_proxy_is_available(self) && !priv->ready) {
+ if(cloud_provider_account_is_available(self) && !priv->ready) {
priv->ready = TRUE;
g_signal_emit_by_name (self, "ready");
}
@@ -183,8 +183,8 @@ on_get_status_details(GObject *source_object,
GAsyncResult *res,
gpointer user_data)
{
- CloudProviderProxy *self = CLOUD_PROVIDER_PROXY (user_data);
- CloudProviderProxyPrivate *priv = cloud_provider_proxy_get_instance_private (self);
+ CloudProviderAccount *self = CLOUD_PROVIDER_ACCOUNT (user_data);
+ CloudProviderAccountPrivate *priv = cloud_provider_account_get_instance_private (self);
GError *error = NULL;
if (priv->status_details != NULL)
@@ -197,16 +197,16 @@ on_get_status_details(GObject *source_object,
return;
}
g_signal_emit_by_name (self, "changed");
- if(cloud_provider_proxy_is_available(self) && !priv->ready) {
+ if(cloud_provider_account_is_available(self) && !priv->ready) {
priv->ready = TRUE;
g_signal_emit_by_name (self, "ready");
}
}
void
-cloud_provider_proxy_update (CloudProviderProxy *self)
+cloud_provider_account_update (CloudProviderAccount *self)
{
- CloudProviderProxyPrivate *priv = cloud_provider_proxy_get_instance_private (self);
+ CloudProviderAccountPrivate *priv = cloud_provider_account_get_instance_private (self);
if (priv->proxy != NULL)
{
@@ -246,8 +246,8 @@ on_proxy_created (GObject *source_object,
gpointer user_data)
{
GError *error = NULL;
- CloudProviderProxy *self;
- CloudProviderProxyPrivate *priv;
+ CloudProviderAccount *self;
+ CloudProviderAccountPrivate *priv;
CloudProviderAccount1 *proxy;
proxy = cloud_provider_account1_proxy_new_for_bus_finish (res, &error);
@@ -257,14 +257,14 @@ on_proxy_created (GObject *source_object,
g_warning ("Error creating proxy for cloud provider %s", error->message);
return;
}
- self = CLOUD_PROVIDER_PROXY (user_data);
- priv = cloud_provider_proxy_get_instance_private (self);
+ self = CLOUD_PROVIDER_ACCOUNT (user_data);
+ priv = cloud_provider_account_get_instance_private (self);
priv->proxy = proxy;
- g_signal_connect_swapped(priv->proxy, "cloud-provider-changed", G_CALLBACK(cloud_provider_proxy_update),
self);
+ g_signal_connect_swapped(priv->proxy, "cloud-provider-changed", G_CALLBACK(cloud_provider_account_update),
self);
- cloud_provider_proxy_update(self);
+ cloud_provider_account_update(self);
}
static void
@@ -273,9 +273,9 @@ on_bus_acquired (GObject *source_object,
gpointer user_data)
{
GError *error = NULL;
- CloudProviderProxy *self;
+ CloudProviderAccount *self;
GDBusConnection *bus;
- CloudProviderProxyPrivate *priv;
+ CloudProviderAccountPrivate *priv;
bus = g_bus_get_finish (res, &error);
if (error != NULL)
@@ -285,8 +285,8 @@ on_bus_acquired (GObject *source_object,
return;
}
- self = CLOUD_PROVIDER_PROXY (user_data);
- priv = cloud_provider_proxy_get_instance_private (user_data);
+ self = CLOUD_PROVIDER_ACCOUNT (user_data);
+ priv = cloud_provider_account_get_instance_private (user_data);
priv->bus = bus;
g_clear_object (&priv->cancellable);
priv->cancellable = g_cancellable_new ();
@@ -299,15 +299,15 @@ on_bus_acquired (GObject *source_object,
self);
}
-CloudProviderProxy*
-cloud_provider_proxy_new (const gchar *bus_name,
+CloudProviderAccount*
+cloud_provider_account_new (const gchar *bus_name,
const gchar *object_path)
{
- CloudProviderProxy *self;
- CloudProviderProxyPrivate *priv;
+ CloudProviderAccount *self;
+ CloudProviderAccountPrivate *priv;
- self = g_object_new (TYPE_CLOUD_PROVIDER_PROXY, NULL);
- priv = cloud_provider_proxy_get_instance_private (self);
+ self = g_object_new (TYPE_CLOUD_PROVIDER_ACCOUNT, NULL);
+ priv = cloud_provider_account_get_instance_private (self);
priv->bus_name = g_strdup (bus_name);
priv->object_path = g_strdup (object_path);
@@ -323,10 +323,10 @@ cloud_provider_proxy_new (const gchar *bus_name,
}
static void
-cloud_provider_proxy_finalize (GObject *object)
+cloud_provider_account_finalize (GObject *object)
{
- CloudProviderProxy *self = (CloudProviderProxy *)object;
- CloudProviderProxyPrivate *priv = cloud_provider_proxy_get_instance_private (self);
+ CloudProviderAccount *self = (CloudProviderAccount *)object;
+ CloudProviderAccountPrivate *priv = cloud_provider_account_get_instance_private (self);
g_cancellable_cancel (priv->cancellable);
g_clear_object (&priv->cancellable);
@@ -339,15 +339,15 @@ cloud_provider_proxy_finalize (GObject *object)
g_free (priv->bus_name);
g_free (priv->object_path);
- G_OBJECT_CLASS (cloud_provider_proxy_parent_class)->finalize (object);
+ G_OBJECT_CLASS (cloud_provider_account_parent_class)->finalize (object);
}
static void
-cloud_provider_proxy_class_init (CloudProviderProxyClass *klass)
+cloud_provider_account_class_init (CloudProviderAccountClass *klass)
{
GObjectClass *object_class = G_OBJECT_CLASS (klass);
- object_class->finalize = cloud_provider_proxy_finalize;
+ object_class->finalize = cloud_provider_account_finalize;
gSignals [CHANGED] =
g_signal_new ("changed",
@@ -372,88 +372,88 @@ cloud_provider_proxy_class_init (CloudProviderProxyClass *klass)
}
static void
-cloud_provider_proxy_init (CloudProviderProxy *self)
+cloud_provider_account_init (CloudProviderAccount *self)
{
- CloudProviderProxyPrivate *priv = cloud_provider_proxy_get_instance_private (self);
+ CloudProviderAccountPrivate *priv = cloud_provider_account_get_instance_private (self);
priv->status = CLOUD_PROVIDER_STATUS_INVALID;
}
gchar*
-cloud_provider_proxy_get_name (CloudProviderProxy *self)
+cloud_provider_account_get_name (CloudProviderAccount *self)
{
- CloudProviderProxyPrivate *priv = cloud_provider_proxy_get_instance_private (self);
+ CloudProviderAccountPrivate *priv = cloud_provider_account_get_instance_private (self);
return priv->name;
}
CloudProviderStatus
-cloud_provider_proxy_get_status (CloudProviderProxy *self)
+cloud_provider_account_get_status (CloudProviderAccount *self)
{
- CloudProviderProxyPrivate *priv = cloud_provider_proxy_get_instance_private (self);
+ CloudProviderAccountPrivate *priv = cloud_provider_account_get_instance_private (self);
return priv->status;
}
gchar*
-cloud_provider_proxy_get_status_details (CloudProviderProxy *self)
+cloud_provider_account_get_status_details (CloudProviderAccount *self)
{
- CloudProviderProxyPrivate *priv = cloud_provider_proxy_get_instance_private (self);
+ CloudProviderAccountPrivate *priv = cloud_provider_account_get_instance_private (self);
return priv->status_details;
}
GIcon*
-cloud_provider_proxy_get_icon (CloudProviderProxy *self)
+cloud_provider_account_get_icon (CloudProviderAccount *self)
{
- CloudProviderProxyPrivate *priv = cloud_provider_proxy_get_instance_private (self);
+ CloudProviderAccountPrivate *priv = cloud_provider_account_get_instance_private (self);
return priv->icon;
}
GMenuModel*
-cloud_provider_proxy_get_menu_model (CloudProviderProxy *self)
+cloud_provider_account_get_menu_model (CloudProviderAccount *self)
{
- CloudProviderProxyPrivate *priv = cloud_provider_proxy_get_instance_private (self);
+ CloudProviderAccountPrivate *priv = cloud_provider_account_get_instance_private (self);
return priv->menu_model;
}
GActionGroup*
-cloud_provider_proxy_get_action_group (CloudProviderProxy *self)
+cloud_provider_account_get_action_group (CloudProviderAccount *self)
{
- CloudProviderProxyPrivate *priv = cloud_provider_proxy_get_instance_private (self);
+ CloudProviderAccountPrivate *priv = cloud_provider_account_get_instance_private (self);
return priv->action_group;
}
gchar *
-cloud_provider_proxy_get_path (CloudProviderProxy *self)
+cloud_provider_account_get_path (CloudProviderAccount *self)
{
- CloudProviderProxyPrivate *priv = cloud_provider_proxy_get_instance_private (self);
+ CloudProviderAccountPrivate *priv = cloud_provider_account_get_instance_private (self);
return priv->path;
}
gchar *
-cloud_provider_proxy_get_owner (CloudProviderProxy *self)
+cloud_provider_account_get_owner (CloudProviderAccount *self)
{
- CloudProviderProxyPrivate *priv = cloud_provider_proxy_get_instance_private (self);
+ CloudProviderAccountPrivate *priv = cloud_provider_account_get_instance_private (self);
return g_dbus_proxy_get_name_owner (G_DBUS_PROXY(priv->proxy));
}
-gboolean cloud_provider_proxy_is_available(CloudProviderProxy *self)
+gboolean cloud_provider_account_is_available(CloudProviderAccount *self)
{
GIcon *icon;
gchar *name;
gchar *path;
guint status;
- name = cloud_provider_proxy_get_name (self);
- icon = cloud_provider_proxy_get_icon (self);
- status = cloud_provider_proxy_get_status (self);
- path = cloud_provider_proxy_get_path (self);
+ name = cloud_provider_account_get_name (self);
+ icon = cloud_provider_account_get_icon (self);
+ status = cloud_provider_account_get_status (self);
+ path = cloud_provider_account_get_path (self);
if (name == NULL || icon == NULL || path == NULL || status == CLOUD_PROVIDER_STATUS_INVALID)
return FALSE;
return TRUE;
diff --git a/src/cloudprovideraccount.h b/src/cloudprovideraccount.h
new file mode 100644
index 0000000..9a9d801
--- /dev/null
+++ b/src/cloudprovideraccount.h
@@ -0,0 +1,73 @@
+/* cloudprovideraccount.h
+ *
+ * Copyright (C) 2015 Carlos Soriano <csoriano gnome org>
+ * Copyright (C) 2017 Julius Haertl <jus bitgrid net>
+ *
+ * This file is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 3 of the
+ * License, or (at your option) any later version.
+ *
+ * This file is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#ifndef CLOUD_PROVIDER_ACCOUNT_H
+#define CLOUD_PROVIDER_ACCOUNT_H
+
+#include <gio/gio.h>
+
+G_BEGIN_DECLS
+
+typedef enum {
+ CLOUD_PROVIDER_STATUS_INVALID,
+ CLOUD_PROVIDER_STATUS_IDLE,
+ CLOUD_PROVIDER_STATUS_SYNCING,
+ CLOUD_PROVIDER_STATUS_ERROR
+} CloudProviderStatus;
+
+#define TYPE_CLOUD_PROVIDER_ACCOUNT (cloud_provider_account_get_type())
+#define CLOUD_PROVIDER_ACCOUNT(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj),
TYPE_CLOUD_PROVIDER_ACCOUNT, CloudProviderAccount))
+#define CLOUD_PROVIDER_ACCOUNT_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass),
TYPE_CLOUD_PROVIDER_ACCOUNT, CloudProviderAccountClass))
+#define IS_CLOUD_PROVIDER_ACCOUNT(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj),
TYPE_CLOUD_PROVIDER_ACCOUNT))
+#define IS_CLOUD_PROVIDER_ACCOUNT_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass),
TYPE_CLOUD_PROVIDER_ACCOUNT))
+#define CLOUD_PROVIDER_ACCOUNT_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj),
TYPE_CLOUD_PROVIDER_ACCOUNT, CloudProviderAccountClass))
+
+typedef struct _CloudProviderAccount CloudProviderAccount;
+typedef struct _CloudProviderAccountClass CloudProviderAccountClass;
+
+
+struct _CloudProviderAccountClass
+{
+ GObjectClass parent_class;
+};
+
+struct _CloudProviderAccount
+{
+ GObject parent_instance;
+};
+
+
+GType cloud_provider_account_get_type (void) G_GNUC_CONST;
+CloudProviderAccount *cloud_provider_account_new (const gchar *bus_name,
+ const gchar *object_path);
+
+gchar* cloud_provider_account_get_name (CloudProviderAccount *self);
+CloudProviderStatus cloud_provider_account_get_status (CloudProviderAccount *self);
+gchar* cloud_provider_account_get_status_details (CloudProviderAccount *self);
+GIcon *cloud_provider_account_get_icon (CloudProviderAccount *self);
+GMenuModel *cloud_provider_account_get_menu_model (CloudProviderAccount *self);
+GActionGroup* cloud_provider_account_get_action_group (CloudProviderAccount *self);
+gchar *cloud_provider_account_get_path (CloudProviderAccount *self);
+gchar *cloud_provider_account_get_owner (CloudProviderAccount *self);
+gboolean cloud_provider_account_is_available(CloudProviderAccount *self);
+void cloud_provider_account_update (CloudProviderAccount *self);
+G_END_DECLS
+
+
+#endif /* CLOUD_PROVIDER_ACCOUNT_H */
diff --git a/src/cloudprovidermanager.c b/src/cloudprovidermanager.c
index 0069fd0..9b65f76 100644
--- a/src/cloudprovidermanager.c
+++ b/src/cloudprovidermanager.c
@@ -18,7 +18,7 @@
*/
#include "cloudprovidermanager.h"
-#include "cloudproviderproxy.h"
+#include "cloudprovideraccount.h"
#include <glib.h>
#include <glib/gprintf.h>
#include <gio/gio.h>
diff --git a/src/cloudprovidermanager.h b/src/cloudprovidermanager.h
index 5db8f4f..3ccdcf4 100644
--- a/src/cloudprovidermanager.h
+++ b/src/cloudprovidermanager.h
@@ -20,7 +20,7 @@
#define CLOUD_PROVIDER_MANAGER_H
#include <gio/gio.h>
-#include "cloudproviderproxy.h"
+#include "cloudprovideraccount.h"
#include "cloudprovidermanager-generated.h"
#define CLOUD_PROVIDER_MANAGER_DBUS_IFACE "org.freedesktop.CloudProviderManager1"
diff --git a/src/cloudproviders.c b/src/cloudproviders.c
index 28195b0..efe9a68 100644
--- a/src/cloudproviders.c
+++ b/src/cloudproviders.c
@@ -18,7 +18,7 @@
*/
#include "cloudproviders.h"
-#include "cloudproviderproxy.h"
+#include "cloudprovideraccount.h"
#include "cloudprovidermanager.h"
#include "cloudprovidermanager-generated.h"
#include "cloudprovider-generated.h"
@@ -63,14 +63,14 @@ enum
static guint gSignals [LAST_SIGNAL];
static void
-on_cloud_provider_proxy_ready (CloudProviderProxy *cloud_provider, CloudProviders *self)
+on_cloud_provider_proxy_ready (CloudProviderAccount *cloud_provider, CloudProviders *self)
{
// notify clients that cloud provider list has changed
g_signal_emit_by_name (self, "owners-changed", NULL);
}
static void
-on_cloud_provider_changed (CloudProviderProxy *cloud_provider, CloudProviders *self)
+on_cloud_provider_changed (CloudProviderAccount *cloud_provider, CloudProviders *self)
{
// notify clients that cloud provider has changed
g_signal_emit_by_name (self, "changed", NULL);
@@ -226,7 +226,7 @@ cloud_providers_init (CloudProviders *self)
/**
* cloud_providers_get_providers
* @self: A CloudProviders
- * Returns: (transfer none): A GList* of #CloudProviderProxy objects.
+ * Returns: (transfer none): A GList* of #CloudProviderAccount objects.
*/
GList*
cloud_providers_get_providers (CloudProviders *self)
@@ -245,7 +245,7 @@ on_get_cloud_providers (GObject *source_object,
CloudProvidersPrivate *priv = cloud_providers_get_instance_private (self);
GError *error = NULL;
GVariant *foo;
- CloudProviderProxy*cloud_provider;
+ CloudProviderAccount*cloud_provider;
gboolean success = FALSE;
GVariantIter iter;
gchar *bus_name;
@@ -292,12 +292,12 @@ on_get_cloud_providers (GObject *source_object,
for (l = objects; l != NULL; l = l->next)
{
CloudProviderObject *object = CLOUD_PROVIDER_OBJECT(l->data);
- cloud_provider = cloud_provider_proxy_new (bus_name, g_dbus_object_get_object_path (G_DBUS_OBJECT
(object)));
+ cloud_provider = cloud_provider_account_new (bus_name, g_dbus_object_get_object_path
(G_DBUS_OBJECT (object)));
g_signal_connect (cloud_provider, "ready",
G_CALLBACK (on_cloud_provider_proxy_ready), self);
g_signal_connect (cloud_provider, "changed",
G_CALLBACK (on_cloud_provider_changed), self);
- cloud_provider_proxy_update (cloud_provider);
+ cloud_provider_account_update (cloud_provider);
priv->providers = g_list_append (priv->providers, cloud_provider);
}
}
diff --git a/src/cloudproviders.h b/src/cloudproviders.h
index e73b748..cbdd673 100644
--- a/src/cloudproviders.h
+++ b/src/cloudproviders.h
@@ -20,7 +20,7 @@
#define CLOUD_PROVIDERS_H
#include <gio/gio.h>
-#include "cloudproviderproxy.h"
+#include "cloudprovideraccount.h"
G_BEGIN_DECLS
diff --git a/src/meson.build b/src/meson.build
index f33ae9e..f60d3b8 100644
--- a/src/meson.build
+++ b/src/meson.build
@@ -1,6 +1,6 @@
libcloudproviders_headers = [
'cloudprovidermanager.h',
- 'cloudproviderproxy.h',
+ 'cloudprovideraccount.h',
'cloudproviders.h',
'cloudprovider.h',
'cloudprovideraccountexporter.h',
@@ -8,7 +8,7 @@ libcloudproviders_headers = [
libcloudproviders_sources = [
'cloudprovidermanager.c',
- 'cloudproviderproxy.c',
+ 'cloudprovideraccount.c',
'cloudproviders.c',
'cloudprovider.c',
'cloudprovideraccountexporter.c',
diff --git a/test/testcloudproviderclient.c b/test/testcloudproviderclient.c
index 1a393bc..3fc7791 100644
--- a/test/testcloudproviderclient.c
+++ b/test/testcloudproviderclient.c
@@ -1,5 +1,5 @@
#include <glib.h>
-#include <cloudproviderproxy.h>
+#include <cloudprovideraccount.h>
#include <cloudprovidermanager.h>
#include <cloudproviders.h>
@@ -51,12 +51,12 @@ on_manager_changed (CloudProviders *manager)
return;
for (l = providers; l != NULL; l = l->next)
{
- if(!cloud_provider_proxy_is_available(CLOUD_PROVIDER_PROXY(l->data))) {
+ if(!cloud_provider_account_is_available(CLOUD_PROVIDER_ACCOUNT(l->data))) {
continue;
}
g_print ("Providers data\n");
g_print ("##############\n");
- provider_status = cloud_provider_proxy_get_status (CLOUD_PROVIDER_PROXY (l->data));
+ provider_status = cloud_provider_account_get_status (CLOUD_PROVIDER_ACCOUNT (l->data));
switch (provider_status)
{
case CLOUD_PROVIDER_STATUS_INVALID:
@@ -79,19 +79,19 @@ on_manager_changed (CloudProviders *manager)
g_assert_not_reached ();
}
- icon = cloud_provider_proxy_get_icon (l->data);
+ icon = cloud_provider_account_get_icon (l->data);
icon_representation = g_icon_to_string (icon);
g_print ("Name - %s, Status - %s (%s), Path - %s, Icon - %s\n",
- cloud_provider_proxy_get_name (CLOUD_PROVIDER_PROXY (l->data)),
+ cloud_provider_account_get_name (CLOUD_PROVIDER_ACCOUNT (l->data)),
status_string,
- cloud_provider_proxy_get_status_details (CLOUD_PROVIDER_PROXY (l->data)),
- cloud_provider_proxy_get_path (CLOUD_PROVIDER_PROXY (l->data)),
+ cloud_provider_account_get_status_details (CLOUD_PROVIDER_ACCOUNT (l->data)),
+ cloud_provider_account_get_path (CLOUD_PROVIDER_ACCOUNT (l->data)),
icon_representation);
g_free (icon_representation);
- menu = cloud_provider_proxy_get_menu_model (l->data);
+ menu = cloud_provider_account_get_menu_model (l->data);
g_print ("\nMenu\n");
print_gmenu_model (menu);
}
diff --git a/test/testcloudproviderserver.c b/test/testcloudproviderserver.c
index b7490da..b276464 100644
--- a/test/testcloudproviderserver.c
+++ b/test/testcloudproviderserver.c
@@ -4,7 +4,7 @@
#include <cloudprovider.h>
#include <cloudprovideraccountexporter.h>
/* for CLoudProviderStatus enum */
-#include <cloudproviderproxy.h>
+#include <cloudprovideraccount.h>
#define TIMEOUT 800
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]