rygel r125 - in trunk: . src



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

Log:
Add "title" prop to MediaProvider interface.

Modified:
   trunk/ChangeLog
   trunk/src/gupnp-media-manager.vala
   trunk/src/gupnp-media-provider.vala
   trunk/src/gupnp-media-tracker.vala

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:56 2008
@@ -28,6 +28,7 @@
     /* Properties */
     public string# root_id { get; construct; }
     public string# root_parent_id { get; construct; }
+    public string# title { get; private construct; }
     public GUPnP.Context context { get; construct; }
     public uint32 system_update_id { get; private set; }
 
@@ -56,6 +57,7 @@
     public MediaManager (GUPnP.Context context) {
         this.root_id = "0";
         this.root_parent_id = "-1";
+        this.title = "Media Manager";
         this.context = context;
     }
 
@@ -134,9 +136,11 @@
         this.didl_writer.start_didl_lite (null, null, true);
 
         this.providers.for_each ((key, value) => {
+            MediaProvider provider = (MediaProvider) value;
+
             add_container ((string) key,
                            this.root_id,
-                           (string) key,  /* FIXME */
+                           provider.title,
                            -1);           /* FIXME */
             });
 
@@ -162,7 +166,7 @@
 
         add_container (this.root_id,
                        "-1",         /* FIXME */
-                       this.root_id, /* FIXME */
+                       this.title,
                        this.providers.size ());
 
         /* End DIDL-Lite fragment */

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:56 2008
@@ -26,6 +26,7 @@
     /* Properties */
     public abstract string# root_id { get; construct; }
     public abstract string# root_parent_id { get; construct; }
+    public abstract string# title { get; private 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:56 2008
@@ -72,6 +72,7 @@
     /* Properties */
     public string# root_id { get; construct; }
     public string# root_parent_id { get; construct; }
+    public string# title { get; private construct; }
     public GUPnP.Context context { get; construct; }
 
     construct {
@@ -119,6 +120,7 @@
                          GUPnP.Context context) {
         this.root_id = root_id;
         this.root_parent_id = root_parent_id;
+        this.title = "Tracker";
         this.context = context;
     }
 
@@ -673,7 +675,7 @@
     private void add_root_container () {
         add_container (this.root_id,
                        this.root_parent_id,
-                       this.root_id,
+                       this.title,
                        this.containers.length ());
     }
 



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