[rygel/wip/create-reference: 1/3] server: Add create-child-container caps



commit e39db18e7dbc019b0198742aa88f6c91b92b5c26
Author: Jens Georg <jensg openismus com>
Date:   Tue Feb 19 16:58:42 2013 +0100

    server: Add create-child-container caps
    
    https://bugzilla.gnome.org/show_bug.cgi?id=694155

 src/librygel-core/rygel-description-file.vala |    8 ++++++++
 src/librygel-core/rygel-plugin.vala           |    5 ++++-
 2 files changed, 12 insertions(+), 1 deletions(-)
---
diff --git a/src/librygel-core/rygel-description-file.vala b/src/librygel-core/rygel-description-file.vala
index 1397313..f34908e 100644
--- a/src/librygel-core/rygel-description-file.vala
+++ b/src/librygel-core/rygel-description-file.vala
@@ -164,6 +164,14 @@ public class Rygel.DescriptionFile : Object {
 
         if (PluginCapabilities.TRACK_CHANGES in capabilities) {
             flags += "content-synchronization";
+            flags += "create-child-container";
+        }
+
+        // Might be that the plugin only supports create-child-container but
+        // not change tracking, so we need to add this capability separately
+        if (PluginCapabilities.CREATE_CONTAINERS in capabilities &&
+            !(PluginCapabilities.TRACK_CHANGES in capabilities)) {
+            flags += "create-child-container";
         }
 
         // Set the flags we found; otherwise remove whatever is in the
diff --git a/src/librygel-core/rygel-plugin.vala b/src/librygel-core/rygel-plugin.vala
index 94adb31..b97abb5 100644
--- a/src/librygel-core/rygel-plugin.vala
+++ b/src/librygel-core/rygel-plugin.vala
@@ -46,7 +46,10 @@ public enum Rygel.PluginCapabilities {
     UPLOAD = IMAGE_UPLOAD | VIDEO_UPLOAD | AUDIO_UPLOAD,
 
     /// Server supports tracking changes
-    TRACK_CHANGES
+    TRACK_CHANGES,
+
+    /// Server supports container creation
+    CREATE_CONTAINERS
 
     /* Renderer caps */
 }


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