rygel r118 - in trunk: . src



Author: zeeshanak
Date: Tue Oct 28 21:00:46 2008
New Revision: 118
URL: http://svn.gnome.org/viewvc/rygel?rev=118&view=rev

Log:
Use MediaManager rather than MediaTracker.

This also means that system_update_id doesn't need to be handled by
ContentDirectory anymore.

Modified:
   trunk/ChangeLog
   trunk/src/gupnp-content-directory.vala

Modified: trunk/src/gupnp-content-directory.vala
==============================================================================
--- trunk/src/gupnp-content-directory.vala	(original)
+++ trunk/src/gupnp-content-directory.vala	Tue Oct 28 21:00:46 2008
@@ -27,14 +27,12 @@
 using GUPnP;
 
 public class GUPnP.ContentDirectory: Service {
-    uint32 system_update_id;
     string feature_list;
 
-    MediaTracker tracker;
+    MediaManager media_manager;
 
     construct {
-        this.tracker = new MediaTracker ("0", this.context);
-        this.system_update_id = 0;
+        this.media_manager = new MediaManager ("0", this.context);
 
         this.feature_list =
             "<?xml version=\"1.0\" encoding=\"UTF-8\"?>" +
@@ -108,22 +106,22 @@
         }
 
         if (browse_metadata) {
-            didl = this.tracker.get_metadata (object_id,
-                                                filter,
-                                                sort_criteria,
-                                                out update_id);
+            didl = this.media_manager.get_metadata (object_id,
+                                                    filter,
+                                                    sort_criteria,
+                                                    out update_id);
 
             num_returned = 1;
             total_matches = 1;
         } else {
-            didl = this.tracker.browse (object_id,
-                                        filter,
-                                        starting_index,
-                                        requested_count,
-                                        sort_criteria,
-                                        out num_returned,
-                                        out total_matches,
-                                        out update_id);
+            didl = this.media_manager.browse (object_id,
+                                              filter,
+                                              starting_index,
+                                              requested_count,
+                                              sort_criteria,
+                                              out num_returned,
+                                              out total_matches,
+                                              out update_id);
         }
 
         if (didl == null) {
@@ -132,9 +130,6 @@
             return;
         }
 
-        if (update_id == uint32.MAX)
-            update_id = this.system_update_id;
-
         /* Set action return arguments */
         action.set ("Result", typeof (string), didl,
                     "NumberReturned", typeof (uint), num_returned,
@@ -148,7 +143,7 @@
     private void get_system_update_id_cb (ContentDirectory content_dir,
                                           ServiceAction    action) {
         /* Set action return arguments */
-        action.set ("Id", typeof (uint32), this.system_update_id);
+        action.set ("Id", typeof (uint32), this.media_manager.system_update_id);
 
         action.return ();
     }
@@ -159,7 +154,7 @@
                                          ref GLib.Value value) {
         /* Set action return arguments */
         value.init (typeof (uint32));
-        value.set_uint (this.system_update_id);
+        value.set_uint (this.media_manager.system_update_id);
     }
 
     /* action GetSearchCapabilities implementation */



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