Add "title" prop to MediaProvider interface.
authorZeeshan Ali (Khattak) <zeeshanak@src.gnome.org>
Tue, 5 Aug 2008 15:50:50 +0000 (15:50 +0000)
committerZeeshan Ali (Khattak) <zeeshanak@src.gnome.org>
Tue, 5 Aug 2008 15:50:50 +0000 (15:50 +0000)
svn path=/trunk/; revision=236

ChangeLog
src/gupnp-media-manager.vala
src/gupnp-media-provider.vala
src/gupnp-media-tracker.vala

index 6e0ea2f..f4f2e49 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,13 @@
 2008-08-03  Zeeshan Ali Khattak  <zeenix@gmail.com>
 
+       * src/gupnp-media-manager.vala:
+       * src/gupnp-media-provider.vala:
+       * src/gupnp-media-tracker.vala:
+
+       Add "title" prop to MediaProvider interface.
+
+2008-08-03  Zeeshan Ali Khattak  <zeenix@gmail.com>
+
        * src/gupnp-media-tracker.vala:
 
        - Correct a typo. Now we export the ID of the container in the format we
index 6147ff9..76eeb6c 100644 (file)
@@ -28,6 +28,7 @@ public class GUPnP.MediaManager : GLib.Object, MediaProvider {
     /* 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 class GUPnP.MediaManager : GLib.Object, MediaProvider {
     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 @@ public class GUPnP.MediaManager : GLib.Object, MediaProvider {
         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 @@ public class GUPnP.MediaManager : GLib.Object, MediaProvider {
 
         add_container (this.root_id,
                        "-1",         /* FIXME */
-                       this.root_id, /* FIXME */
+                       this.title,
                        this.providers.size ());
 
         /* End DIDL-Lite fragment */
index f6b7e2f..2f3f19c 100644 (file)
@@ -26,6 +26,7 @@ public interface MediaProvider : GLib.Object {
     /* 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,
index d5a4510..23a6b3e 100644 (file)
@@ -72,6 +72,7 @@ public class GUPnP.MediaTracker : GLib.Object, MediaProvider {
     /* 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 @@ public class GUPnP.MediaTracker : GLib.Object, MediaProvider {
                          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 @@ public class GUPnP.MediaTracker : GLib.Object, MediaProvider {
     private void add_root_container () {
         add_container (this.root_id,
                        this.root_parent_id,
-                       this.root_id,
+                       this.title,
                        this.containers.length ());
     }