From: Zeeshan Ali (Khattak) Date: Fri, 9 Jul 2010 12:24:18 +0000 (+0300) Subject: external: Add 'Proxy' suffix to D-Bus proxy objects X-Git-Tag: RYGEL_0_7_2~20 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=0562c4c712ba24a2c867aa480c8c25467683a12c;p=profile%2Fivi%2Frygel.git external: Add 'Proxy' suffix to D-Bus proxy objects --- diff --git a/src/plugins/external/rygel-external-container.vala b/src/plugins/external/rygel-external-container.vala index 54475dd..2238826 100644 --- a/src/plugins/external/rygel-external-container.vala +++ b/src/plugins/external/rygel-external-container.vala @@ -31,7 +31,7 @@ using FreeDesktop; * Represents an external container. */ public class Rygel.ExternalContainer : Rygel.MediaContainer { - public ExternalMediaContainer actual_container; + public ExternalMediaContainerProxy actual_container; public string host_ip; public string service_name; @@ -65,7 +65,7 @@ public class Rygel.ExternalContainer : Rygel.MediaContainer { // Create proxy to MediaContainer iface this.actual_container = this.connection.get_object (this.service_name, id) - as ExternalMediaContainer; + as ExternalMediaContainerProxy; this.update_container.begin (true); } @@ -77,11 +77,11 @@ public class Rygel.ExternalContainer : Rygel.MediaContainer { throws GLib.Error { string[] filter = {}; - foreach (var object_prop in ExternalMediaObject.PROPERTIES) { + foreach (var object_prop in ExternalMediaObjectProxy.PROPERTIES) { filter += object_prop; } - foreach (var item_prop in ExternalMediaItem.PROPERTIES) { + foreach (var item_prop in ExternalMediaItemProxy.PROPERTIES) { filter += item_prop; } @@ -110,15 +110,15 @@ public class Rygel.ExternalContainer : Rygel.MediaContainer { } string[] filter = {}; - foreach (var object_prop in ExternalMediaObject.PROPERTIES) { + foreach (var object_prop in ExternalMediaObjectProxy.PROPERTIES) { filter += object_prop; } - foreach (var container_prop in ExternalMediaContainer.PROPERTIES) { + foreach (var container_prop in ExternalMediaContainerProxy.PROPERTIES) { filter += container_prop; } - foreach (var item_prop in ExternalMediaItem.PROPERTIES) { + foreach (var item_prop in ExternalMediaItemProxy.PROPERTIES) { filter += item_prop; } @@ -140,7 +140,7 @@ public class Rygel.ExternalContainer : Rygel.MediaContainer { // Create proxy to MediaObject iface var actual_object = this.connection.get_object (this.service_name, id) - as ExternalMediaObject; + as ExternalMediaObjectProxy; if (actual_object.object_type == "container") { media_object = this.find_container_by_id (id); @@ -166,7 +166,8 @@ public class Rygel.ExternalContainer : Rygel.MediaContainer { var props_iface = this.connection.get_object (this.service_name, id) as Properties; - var props = yield props_iface.get_all (ExternalMediaItem.IFACE); + var props = yield props_iface.get_all ( + ExternalMediaItemProxy.IFACE); // Its an item then media_object = yield this.item_factory.create ( @@ -242,11 +243,11 @@ public class Rygel.ExternalContainer : Rygel.MediaContainer { private async void refresh_child_containers () throws GLib.Error { string[] filter = {}; - foreach (var object_prop in ExternalMediaObject.PROPERTIES) { + foreach (var object_prop in ExternalMediaObjectProxy.PROPERTIES) { filter += object_prop; } - foreach (var container_prop in ExternalMediaContainer.PROPERTIES) { + foreach (var container_prop in ExternalMediaContainerProxy.PROPERTIES) { filter += container_prop; } @@ -291,7 +292,7 @@ public class Rygel.ExternalContainer : Rygel.MediaContainer { } } - private void on_updated (ExternalMediaContainer actual_container) { + private void on_updated (ExternalMediaContainerProxy actual_container) { this.update_container.begin (); } diff --git a/src/plugins/external/rygel-external-interfaces.vala b/src/plugins/external/rygel-external-interfaces.vala index c8c6973..74f489b 100644 --- a/src/plugins/external/rygel-external-interfaces.vala +++ b/src/plugins/external/rygel-external-interfaces.vala @@ -24,7 +24,7 @@ using DBus; [DBus (name = "org.gnome.UPnP.MediaObject2")] -public interface Rygel.ExternalMediaObject : DBus.Object { +public interface Rygel.ExternalMediaObjectProxy : DBus.Object { public static const string IFACE = "org.gnome.UPnP.MediaObject2"; public static const string[] PROPERTIES = { "Parent", "Type", @@ -38,8 +38,8 @@ public interface Rygel.ExternalMediaObject : DBus.Object { } [DBus (name = "org.gnome.UPnP.MediaContainer2")] -public interface Rygel.ExternalMediaContainer : DBus.Object, - ExternalMediaObject { +public interface Rygel.ExternalMediaContainerProxy : DBus.Object, + ExternalMediaObjectProxy { public static const string IFACE = "org.gnome.UPnP.MediaContainer2"; public static const string[] PROPERTIES = { "ChildCount", "Searchable" }; @@ -74,7 +74,8 @@ public interface Rygel.ExternalMediaContainer : DBus.Object, } [DBus (name = "org.gnome.UPnP.MediaItem2")] -public interface Rygel.ExternalMediaItem : DBus.Object, ExternalMediaObject { +public interface Rygel.ExternalMediaItemProxy : DBus.Object, + ExternalMediaObjectProxy { public static const string IFACE = "org.gnome.UPnP.MediaItem2"; public static const string[] PROPERTIES = { "URLs", "MIMEType", diff --git a/src/plugins/external/rygel-external-item-factory.vala b/src/plugins/external/rygel-external-item-factory.vala index 3f99692..16ac802 100644 --- a/src/plugins/external/rygel-external-item-factory.vala +++ b/src/plugins/external/rygel-external-item-factory.vala @@ -59,7 +59,7 @@ public class Rygel.ExternalItemFactory { // value = props.lookup ("URLs"); var connection = DBus.Bus.get (DBus.BusType.SESSION); var item_iface = connection.get_object (service_name, id) - as ExternalMediaItem; + as ExternalMediaItemProxy; string[] uris = item_iface.urls; for (var i = 0; uris[i] != null; i++) { diff --git a/src/plugins/external/rygel-external-thumbnail-factory.vala b/src/plugins/external/rygel-external-thumbnail-factory.vala index a10ae22..f35e3e3 100644 --- a/src/plugins/external/rygel-external-thumbnail-factory.vala +++ b/src/plugins/external/rygel-external-thumbnail-factory.vala @@ -39,7 +39,7 @@ public class Rygel.ExternalThumbnailFactory { object_path) as Properties; - var item_props = yield props.get_all (ExternalMediaItem.IFACE); + var item_props = yield props.get_all (ExternalMediaItemProxy.IFACE); var thumbnail = new Thumbnail ();