[rygel/wip/track-changes: 9/13] WIP: Some early changes adding missing properties for tracking object changes.



commit c010d5bfe0d5ab6d0c1b869aa59457c95bd52a2c
Author: Krzesimir Nowak <qdlacz gmail com>
Date:   Tue Sep 11 16:29:14 2012 +0200

    WIP: Some early changes adding missing properties for tracking object changes.

 src/librygel-server/rygel-media-object.vala        |    4 ++++
 .../rygel-relational-expression.vala               |    9 ++++++++-
 2 files changed, 12 insertions(+), 1 deletions(-)
---
diff --git a/src/librygel-server/rygel-media-object.vala b/src/librygel-server/rygel-media-object.vala
index d8d9ca9..a4b78d1 100644
--- a/src/librygel-server/rygel-media-object.vala
+++ b/src/librygel-server/rygel-media-object.vala
@@ -42,6 +42,10 @@ public abstract class Rygel.MediaObject : GLib.Object {
     public string ref_id;
     public string upnp_class;
     public uint64 modified;
+    // TODO: Spec says that upnp.objectUpdateID is unsigned int.
+    // Should I add a compare_uint to RelationalExpression or just use
+    // signed int?
+    public uint object_update_id;
     public Gee.ArrayList<string> uris;
 
     // You can keep both a unowned and owned ref to parent of this MediaObject.
diff --git a/src/librygel-server/rygel-relational-expression.vala b/src/librygel-server/rygel-relational-expression.vala
index 744d37a..5949f5d 100644
--- a/src/librygel-server/rygel-relational-expression.vala
+++ b/src/librygel-server/rygel-relational-expression.vala
@@ -31,7 +31,8 @@ public class Rygel.RelationalExpression :
              Rygel.SearchExpression<SearchCriteriaOp,string,string> {
     internal const string CAPS = "@id,@parentID,@refID,upnp:class," +
                                  "dc:title,upnp:artist,upnp:album," +
-                                 "dc:creator,upnp:createClass,@childCount";
+                                 "dc:creator,upnp:createClass,@childCount," +
+                                 "upnp:objectUpdateID,upnp:containerUpdateID";
 
     public override bool satisfied_by (MediaObject media_object) {
         switch (this.operand1) {
@@ -77,6 +78,12 @@ public class Rygel.RelationalExpression :
 
             var container = media_object as MediaContainer;
             return this.compare_int (container.child_count);
+            /*
+        case "upnp:objectUpdateID":
+            return this.compare_int ();
+        case "upnp:containerUpdateID":
+            return this.compare_int ();
+            */
         default:
             return false;
         }



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