[rygel] core: RootDeviceFactory doesn't create context
- From: Zeeshan Ali Khattak <zeeshanak src gnome org>
- To: svn-commits-list gnome org
- Subject: [rygel] core: RootDeviceFactory doesn't create context
- Date: Wed, 8 Jul 2009 14:55:26 +0000 (UTC)
commit bc3076bea49baeb58b25aaf2b757b15ab6b6af02
Author: Zeeshan Ali (Khattak) <zeeshanak gnome org>
Date: Wed Jul 8 15:11:04 2009 +0300
core: RootDeviceFactory doesn't create context
The context is passed to it as constructor argument.
src/rygel/rygel-root-device-factory.vala | 23 ++---------------------
1 files changed, 2 insertions(+), 21 deletions(-)
---
diff --git a/src/rygel/rygel-root-device-factory.vala b/src/rygel/rygel-root-device-factory.vala
index 3192bd4..d3de206 100644
--- a/src/rygel/rygel-root-device-factory.vala
+++ b/src/rygel/rygel-root-device-factory.vala
@@ -41,11 +41,9 @@ public class Rygel.RootDeviceFactory {
private string desc_dir;
- public RootDeviceFactory () throws GLib.Error {
+ public RootDeviceFactory (GUPnP.Context context) throws GLib.Error {
this.config = MetaConfig.get_default ();
-
- /* Set up GUPnP context */
- this.context = create_upnp_context ();
+ this.context = context;
/* We store the modified descriptions in the user's config dir */
this.desc_dir = Path.build_filename (Environment.get_user_config_dir (),
@@ -106,23 +104,6 @@ public class Rygel.RootDeviceFactory {
return doc;
}
- private GUPnP.Context create_upnp_context () throws GLib.Error {
- string host_ip = null;
- int port = 0;
-
- try {
- host_ip = this.config.get_host_ip ();
- port = this.config.get_port ();
- } catch (GLib.Error err) {}
-
- GUPnP.Context context = new GUPnP.Context (null, host_ip, port);
-
- /* Host UPnP dir */
- context.host_path (BuildConfig.DATA_DIR, "");
-
- return context;
- }
-
private void prepare_desc_for_plugin (Xml.Doc doc, Plugin plugin) {
Xml.Node *device_element;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]