From e5c090833d96b8397b1b01bb59c9b1c47995ad95 Mon Sep 17 00:00:00 2001 From: "Zeeshan Ali (Khattak)" Date: Mon, 2 Aug 2010 19:54:38 +0300 Subject: [PATCH] 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 file 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 (); -- 2.7.4