rygel r505 - in trunk/src/plugins: dvb tracker



Author: zeeshanak
Date: Wed Jan 28 12:33:57 2009
New Revision: 505
URL: http://svn.gnome.org/viewvc/rygel?rev=505&view=rev

Log:
MediaContainer derivates must implement find_object_by_id method.

Modified:
   trunk/src/plugins/dvb/rygel-dvb-channel-group.vala
   trunk/src/plugins/dvb/rygel-dvb-content-dir.vala
   trunk/src/plugins/tracker/rygel-media-tracker.vala
   trunk/src/plugins/tracker/rygel-tracker-container.vala

Modified: trunk/src/plugins/dvb/rygel-dvb-channel-group.vala
==============================================================================
--- trunk/src/plugins/dvb/rygel-dvb-channel-group.vala	(original)
+++ trunk/src/plugins/dvb/rygel-dvb-channel-group.vala	Wed Jan 28 12:33:57 2009
@@ -78,8 +78,8 @@
         return this.channels.slice ((int) offset, (int) stop);
     }
 
-    public DVBChannel find_channel (string id) {
-        DVBChannel channel = null;
+    public MediaObject find_object_by_id (string id) {
+        MediaObject channel = null;
         foreach (var tmp in this.channels) {
             if (tmp.id == id) {
                 channel = tmp;

Modified: trunk/src/plugins/dvb/rygel-dvb-content-dir.vala
==============================================================================
--- trunk/src/plugins/dvb/rygel-dvb-content-dir.vala	(original)
+++ trunk/src/plugins/dvb/rygel-dvb-content-dir.vala	Wed Jan 28 12:33:57 2009
@@ -176,11 +176,11 @@
         return group;
     }
 
-    private DVBChannel find_channel_by_id (string id) throws GLib.Error {
-        DVBChannel channel = null;
+    private MediaObject find_channel_by_id (string id) throws GLib.Error {
+        MediaObject channel = null;
 
         foreach (DVBChannelGroup group in this.groups) {
-            channel = group.find_channel (id);
+            channel = group.find_object_by_id (id);
             if (channel != null) {
                 break;
             }

Modified: trunk/src/plugins/tracker/rygel-media-tracker.vala
==============================================================================
--- trunk/src/plugins/tracker/rygel-media-tracker.vala	(original)
+++ trunk/src/plugins/tracker/rygel-media-tracker.vala	Wed Jan 28 12:33:57 2009
@@ -95,7 +95,7 @@
             var container = get_item_parent (object_id);
 
             if (container != null)
-                media_object = container.get_item_from_db (object_id);
+                media_object = container.find_object_by_id (object_id);
         }
 
         if (media_object == null) {

Modified: trunk/src/plugins/tracker/rygel-tracker-container.vala
==============================================================================
--- trunk/src/plugins/tracker/rygel-tracker-container.vala	(original)
+++ trunk/src/plugins/tracker/rygel-tracker-container.vala	Wed Jan 28 12:33:57 2009
@@ -129,7 +129,7 @@
 
         /* Iterate through all items */
         for (uint i = 0; i < child_paths.length; i++) {
-            MediaItem item = this.get_item_from_db (child_paths[i]);
+            MediaItem item = this.find_object_by_id (child_paths[i]);
             children.add (item);
         }
 
@@ -144,8 +144,9 @@
         return category;
     }
 
-    public MediaItem get_item_from_db (string path) throws GLib.Error {
+    public MediaItem find_object_by_id (string id) throws GLib.Error {
         MediaItem item;
+        string path = id;
 
         if (this.child_class == MediaItem.VIDEO_CLASS) {
             item = new TrackerVideoItem (path, path, this);



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]