rygel r119 - in trunk: . src



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

Log:
- MediaProviders now get the "root_parent_id" though a prop. - MediaManager now decides the IDs to use on it's own.

Modified:
   trunk/ChangeLog
   trunk/src/gupnp-content-directory.vala
   trunk/src/gupnp-media-manager.vala
   trunk/src/gupnp-media-provider.vala
   trunk/src/gupnp-media-tracker.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:48 2008
@@ -32,7 +32,7 @@
     MediaManager media_manager;
 
     construct {
-        this.media_manager = new MediaManager ("0", this.context);
+        this.media_manager = new MediaManager (this.context);
 
         this.feature_list =
             "<?xml version=\"1.0\" encoding=\"UTF-8\"?>" +

Modified: trunk/src/gupnp-media-manager.vala
==============================================================================
--- trunk/src/gupnp-media-manager.vala	(original)
+++ trunk/src/gupnp-media-manager.vala	Tue Oct 28 21:00:48 2008
@@ -27,6 +27,7 @@
 
     /* Properties */
     public string# root_id { get; construct; }
+    public string# root_parent_id { get; construct; }
     public GUPnP.Context context { get; construct; }
     public uint32 system_update_id { get; private set; }
 
@@ -41,7 +42,9 @@
                                 ((HashFunc) id_hash_func,
                                  (EqualFunc) is_root_equal);
 
-        MediaTracker tracker = new MediaTracker ("1", this.context);
+        MediaTracker tracker = new MediaTracker ("1",
+                                                 this.root_id,
+                                                 this.context);
         providers.insert ("1", tracker);
 
         this.didl_writer = new DIDLLiteWriter ();
@@ -50,9 +53,9 @@
     }
 
     /* Pubic methods */
-    public MediaManager (string        root_id,
-                                 GUPnP.Context context) {
-        this.root_id = root_id;
+    public MediaManager (GUPnP.Context context) {
+        this.root_id = "0";
+        this.root_parent_id = "-1";
         this.context = context;
     }
 

Modified: trunk/src/gupnp-media-provider.vala
==============================================================================
--- trunk/src/gupnp-media-provider.vala	(original)
+++ trunk/src/gupnp-media-provider.vala	Tue Oct 28 21:00:48 2008
@@ -25,6 +25,7 @@
 public interface MediaProvider : GLib.Object {
     /* Properties */
     public abstract string# root_id { get; construct; }
+    public abstract string# root_parent_id { get; construct; }
     public abstract GUPnP.Context context { get; construct; }
 
     public abstract string? browse (string   container_id,

Modified: trunk/src/gupnp-media-tracker.vala
==============================================================================
--- trunk/src/gupnp-media-tracker.vala	(original)
+++ trunk/src/gupnp-media-tracker.vala	Tue Oct 28 21:00:48 2008
@@ -71,6 +71,7 @@
 
     /* Properties */
     public string# root_id { get; construct; }
+    public string# root_parent_id { get; construct; }
     public GUPnP.Context context { get; construct; }
 
     construct {
@@ -114,8 +115,10 @@
 
     /* Pubic methods */
     public MediaTracker (string        root_id,
+                         string        root_parent_id,
                          GUPnP.Context context) {
         this.root_id = root_id;
+        this.root_parent_id = root_parent_id;
         this.context = context;
     }
 
@@ -669,7 +672,7 @@
 
     private void add_root_container () {
         add_container (this.root_id,
-                       "-1",
+                       this.root_parent_id,
                        this.root_id,
                        this.containers.length ());
     }



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