ContentDir keeps a system_update_id.
authorZeeshan Ali (Khattak) <zeeshanak@src.gnome.org>
Mon, 16 Feb 2009 17:33:07 +0000 (17:33 +0000)
committerZeeshan Ali (Khattak) <zeeshanak@src.gnome.org>
Mon, 16 Feb 2009 17:33:07 +0000 (17:33 +0000)
This id is no longer the same as update_id of the root_container.

svn path=/trunk/; revision=608

src/rygel/rygel-browse.vala
src/rygel/rygel-content-directory.vala

index 84741ea..2e7e29b 100644 (file)
@@ -50,6 +50,7 @@ public class Rygel.Browse: GLib.Object {
     private MediaObject media_object;
 
     private MediaContainer root_container;
+    private uint32 system_update_id;
     private ServiceAction action;
     private Rygel.DIDLLiteWriter didl_writer;
 
@@ -59,6 +60,7 @@ public class Rygel.Browse: GLib.Object {
     public Browse (ContentDirectory    content_dir,
                    owned ServiceAction action) {
         this.root_container = content_dir.root_container;
+        this.system_update_id = content_dir.system_update_id;
         this.action = (owned) action;
 
         this.didl_writer =
@@ -204,7 +206,7 @@ public class Rygel.Browse: GLib.Object {
         string didl = this.didl_writer.get_string ();
 
         if (this.update_id == uint32.MAX) {
-            this.update_id = this.root_container.update_id;
+            this.update_id = this.system_update_id;
         }
 
         /* Set action return arguments */
index d06b2d4..e120ead 100644 (file)
@@ -53,6 +53,7 @@ public class Rygel.ContentDirectory: Service {
     public MediaContainer root_container;
 
     private ArrayList<Browse> browses;
+    public uint32 system_update_id;
 
     // Public abstract methods derived classes need to implement
     public virtual MediaContainer? create_root_container () {
@@ -118,7 +119,7 @@ public class Rygel.ContentDirectory: Service {
     private void get_system_update_id_cb (ContentDirectory    content_dir,
                                           owned ServiceAction action) {
         /* Set action return arguments */
-        action.set ("Id", typeof (uint32), this.root_container.update_id);
+        action.set ("Id", typeof (uint32), this.system_update_id);
 
         action.return ();
     }
@@ -129,7 +130,7 @@ public class Rygel.ContentDirectory: Service {
                                          ref GLib.Value   value) {
         /* Set action return arguments */
         value.init (typeof (uint32));
-        value.set_uint (this.root_container.update_id);
+        value.set_uint (this.system_update_id);
     }
 
     /* action GetSearchCapabilities implementation */