[gnome-photos] Properly namespace the dleyna-renderer stubs
- From: Debarshi Ray <debarshir src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-photos] Properly namespace the dleyna-renderer stubs
- Date: Mon, 23 Jun 2014 11:51:48 +0000 (UTC)
commit a031fddb38f43ad2e191519c3a63a4a679ed4b6f
Author: Debarshi Ray <debarshir gnome org>
Date: Wed Jun 18 16:18:39 2014 +0200
Properly namespace the dleyna-renderer stubs
Fixes: https://bugzilla.gnome.org/731856
src/Makefile.am | 4 +-
src/photos-dlna-renderer.c | 43 ++++++++++++++++++----------------
src/photos-dlna-renderers-manager.c | 24 +++++++++---------
3 files changed, 37 insertions(+), 34 deletions(-)
---
diff --git a/src/Makefile.am b/src/Makefile.am
index 3a7135e..36cff24 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -457,14 +457,14 @@ photos-dleyna-renderer-device.h photos-dleyna-renderer-device.c: photos-dleyna-r
photos-dleyna-renderer-manager.h photos-dleyna-renderer-manager.c: photos-dleyna-renderer-manager.xml
$(AM_V_GEN)gdbus-codegen \
- --c-namespace Dleyna \
+ --c-namespace DleynaRenderer \
--generate-c-code photos-dleyna-renderer-manager \
--interface-prefix com.intel.dLeynaRenderer. \
$<
photos-dleyna-renderer-push-host.h photos-dleyna-renderer-push-host.c: photos-dleyna-renderer-push-host.xml
$(AM_V_GEN)gdbus-codegen \
- --c-namespace Dleyna \
+ --c-namespace DleynaRenderer \
--generate-c-code photos-dleyna-renderer-push-host \
--interface-prefix com.intel.dLeynaRenderer. \
$<
diff --git a/src/photos-dlna-renderer.c b/src/photos-dlna-renderer.c
index a96d3fd..c428060 100644
--- a/src/photos-dlna-renderer.c
+++ b/src/photos-dlna-renderer.c
@@ -32,7 +32,7 @@
struct _PhotosDlnaRendererPrivate
{
DleynaRendererDevice *device;
- DleynaPushHost *push_host;
+ DleynaRendererPushHost *push_host;
GBusType bus_type;
GDBusProxyFlags flags;
GHashTable *urls_to_item;
@@ -298,13 +298,13 @@ photos_dlna_renderer_init_async (GAsyncInitable *initable,
init_task = g_task_new (initable, cancellable, callback, user_data);
g_task_set_priority (init_task, io_priority);
- priv->push_host = dleyna_push_host_proxy_new_for_bus_sync (priv->bus_type,
- G_DBUS_PROXY_FLAGS_DO_NOT_LOAD_PROPERTIES
- | G_DBUS_PROXY_FLAGS_DO_NOT_CONNECT_SIGNALS,
- priv->well_known_name,
- priv->object_path,
- NULL,
- &error);
+ priv->push_host = dleyna_renderer_push_host_proxy_new_for_bus_sync (priv->bus_type,
+
G_DBUS_PROXY_FLAGS_DO_NOT_LOAD_PROPERTIES
+ |
G_DBUS_PROXY_FLAGS_DO_NOT_CONNECT_SIGNALS,
+ priv->well_known_name,
+ priv->object_path,
+ NULL,
+ &error);
RETURN_ON_ERROR (init_task, error, "Unable to load the PushHost interface");
priv->player = mpris_player_proxy_new_for_bus_sync (priv->bus_type,
@@ -419,7 +419,10 @@ photos_dlna_renderer_share_host_file_cb (GObject *source_object,
self = PHOTOS_DLNA_RENDERER (g_task_get_source_object (task));
priv = self->priv;
- dleyna_push_host_call_host_file_finish (DLEYNA_PUSH_HOST (source_object), &hosted_url, res, &error);
+ dleyna_renderer_push_host_call_host_file_finish (DLEYNA_RENDERER_PUSH_HOST (source_object),
+ &hosted_url,
+ res,
+ &error);
RETURN_ON_ERROR (task, error, "Failed to call the HostFile method");
item = g_object_get_data (G_OBJECT (task), "item");
@@ -462,11 +465,11 @@ photos_dlna_renderer_share_download_cb (GObject *source_object,
*/
/* 1) DleynaRenderer.PushHost.HostFile() */
- dleyna_push_host_call_host_file (self->priv->push_host,
- filename,
- g_task_get_cancellable (task),
- photos_dlna_renderer_share_host_file_cb,
- task);
+ dleyna_renderer_push_host_call_host_file (self->priv->push_host,
+ filename,
+ g_task_get_cancellable (task),
+ photos_dlna_renderer_share_host_file_cb,
+ task);
g_free (filename);
}
@@ -526,7 +529,7 @@ photos_dlna_renderer_unshare_remove_file_cb (GObject *source_object,
g_hash_table_foreach_remove (priv->urls_to_item, photos_dlna_renderer_match_by_item_value, item);
g_object_notify (G_OBJECT (self), "shared-count");
- dleyna_push_host_call_remove_file_finish (DLEYNA_PUSH_HOST (source_object), res, &error);
+ dleyna_renderer_push_host_call_remove_file_finish (DLEYNA_RENDERER_PUSH_HOST (source_object), res, &error);
if (error != NULL)
{
/* Assume that ignoring RemoveFile() errors is safe, since they
@@ -560,11 +563,11 @@ photos_dlna_renderer_unshare_download_cb (GObject *source_object,
filename = photos_base_item_download_finish (PHOTOS_BASE_ITEM (source_object), res, &error);
RETURN_ON_ERROR (task, error, "Unable to extract the local filename for the shared item");
- dleyna_push_host_call_remove_file (self->priv->push_host,
- filename,
- g_task_get_cancellable (task),
- photos_dlna_renderer_unshare_remove_file_cb,
- task);
+ dleyna_renderer_push_host_call_remove_file (self->priv->push_host,
+ filename,
+ g_task_get_cancellable (task),
+ photos_dlna_renderer_unshare_remove_file_cb,
+ task);
g_free (filename);
}
diff --git a/src/photos-dlna-renderers-manager.c b/src/photos-dlna-renderers-manager.c
index dc16a6e..23272df 100644
--- a/src/photos-dlna-renderers-manager.c
+++ b/src/photos-dlna-renderers-manager.c
@@ -29,7 +29,7 @@
struct _PhotosDlnaRenderersManagerPrivate
{
- DleynaManager *proxy;
+ DleynaRendererManager *proxy;
GHashTable *renderers;
GError *error;
};
@@ -139,7 +139,7 @@ photos_dlna_renderers_manager_proxy_get_renderers_cb (GObject *source_objec
gchar **object_paths, **path;
GError *error = NULL;
- dleyna_manager_call_get_renderers_finish (priv->proxy, &object_paths, res, &error);
+ dleyna_renderer_manager_call_get_renderers_finish (priv->proxy, &object_paths, res, &error);
if (error != NULL)
{
g_warning ("Unable to fetch the list of available renderers: %s", error->message);
@@ -163,7 +163,7 @@ photos_dlna_renderers_manager_proxy_new_cb (GObject *source_object,
PhotosDlnaRenderersManagerPrivate *priv = self->priv;
GError *error = NULL;
- priv->proxy = dleyna_manager_proxy_new_for_bus_finish (res, &error);
+ priv->proxy = dleyna_renderer_manager_proxy_new_for_bus_finish (res, &error);
if (error != NULL)
{
g_warning ("Unable to connect to the dLeynaRenderer.Manager DBus object: %s", error->message);
@@ -178,8 +178,8 @@ photos_dlna_renderers_manager_proxy_new_cb (GObject *source_object,
g_signal_connect_swapped (priv->proxy, "lost-renderer",
G_CALLBACK (photos_dlna_renderers_manager_renderer_lost_cb), self);
- dleyna_manager_call_get_renderers (priv->proxy, NULL,
- photos_dlna_renderers_manager_proxy_get_renderers_cb, self);
+ dleyna_renderer_manager_call_get_renderers (priv->proxy, NULL,
+ photos_dlna_renderers_manager_proxy_get_renderers_cb, self);
}
@@ -210,13 +210,13 @@ photos_dlna_renderers_manager_init (PhotosDlnaRenderersManager *self)
self->priv = priv = photos_dlna_renderers_manager_get_instance_private (self);
- dleyna_manager_proxy_new_for_bus (G_BUS_TYPE_SESSION,
- G_DBUS_PROXY_FLAGS_NONE,
- "com.intel.dleyna-renderer",
- "/com/intel/dLeynaRenderer",
- NULL, /* GCancellable */
- photos_dlna_renderers_manager_proxy_new_cb,
- self);
+ dleyna_renderer_manager_proxy_new_for_bus (G_BUS_TYPE_SESSION,
+ G_DBUS_PROXY_FLAGS_NONE,
+ "com.intel.dleyna-renderer",
+ "/com/intel/dLeynaRenderer",
+ NULL, /* GCancellable */
+ photos_dlna_renderers_manager_proxy_new_cb,
+ self);
priv->renderers = g_hash_table_new_full (g_str_hash, g_str_equal, NULL, g_object_unref);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]