[rygel] core: Use name of the plugin rather than ContentDir



commit e5c090833d96b8397b1b01bb59c9b1c47995ad95
Author: Zeeshan Ali (Khattak) <zeeshanak gnome org>
Date:   Mon Aug 2 19:54:38 2010 +0300

    core: Use name of the plugin rather than ContentDir
    
    We now have only one ContentDirectory implementation so its name is not
    unique amongst the plugins so better use the name of the plugin itself.

 src/rygel/rygel-content-directory.vala |   13 +++++--------
 1 files changed, 5 insertions(+), 8 deletions(-)
---
diff --git a/src/rygel/rygel-content-directory.vala b/src/rygel/rygel-content-directory.vala
index adfb2e5..9fa0752 100644
--- a/src/rygel/rygel-content-directory.vala
+++ b/src/rygel/rygel-content-directory.vala
@@ -67,10 +67,13 @@ public class Rygel.ContentDirectory: Service {
 
     public override void constructed () {
         this.cancellable = new Cancellable ();
-        this.root_container = this.get_root_container ();
+
+        var plugin = this.root_device.resource_factory as MediaServerPlugin;
+
+        this.root_container = plugin.get_root_container (this);
 
         try {
-            this.http_server = new HTTPServer (this, this.get_type ().name ());
+            this.http_server = new HTTPServer (this, plugin.name);
         } catch (GLib.Error err) {
             critical (_("Failed to create HTTP server for %s: %s"),
                       this.get_type ().name (),
@@ -130,12 +133,6 @@ public class Rygel.ContentDirectory: Service {
         this.http_server.run.begin ();
     }
 
-    private MediaContainer get_root_container () {
-        var plugin = this.root_device.resource_factory as MediaServerPlugin;
-
-        return plugin.get_root_container (this);
-    }
-
     ~ContentDirectory () {
         // Cancel all state machines
         this.cancellable.cancel ();



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