[rygel] core: Use the new GSSDP/GUPnP APIs



commit ee395e4c999b601bd93d685d74db02f01968ba74
Author: Zeeshan Ali (Khattak) <zeeshanak gnome org>
Date:   Thu Jul 30 00:58:11 2009 +0300

    core: Use the new GSSDP/GUPnP APIs

 src/rygel/rygel-main.vala                |    6 +++---
 src/rygel/rygel-root-device-factory.vala |    9 ++-------
 src/rygel/rygel-root-device.vala         |    6 ++++--
 3 files changed, 9 insertions(+), 12 deletions(-)
---
diff --git a/src/rygel/rygel-main.vala b/src/rygel/rygel-main.vala
index a3976a1..8de27bb 100644
--- a/src/rygel/rygel-main.vala
+++ b/src/rygel/rygel-main.vala
@@ -98,7 +98,7 @@ public class Rygel.Main : Object {
         string host_ip = null;
 
         debug ("new network context %s (%s) available.",
-               context.name,
+               context.interface,
                context.host_ip);
 
         try {
@@ -115,7 +115,7 @@ public class Rygel.Main : Object {
             this.factories.add (factory);
         } else {
             debug ("Ignoring network context %s (%s).",
-                   context.name,
+                   context.interface,
                    context.host_ip);
         }
     }
@@ -123,7 +123,7 @@ public class Rygel.Main : Object {
     private void on_context_unavailable (GUPnP.ContextManager manager,
                                          GUPnP.Context        context) {
         debug ("Network context %s (%s) now unavailable.",
-               context.name,
+               context.interface,
                context.host_ip);
 
         var factory_list = new ArrayList <RootDeviceFactory> ();
diff --git a/src/rygel/rygel-root-device-factory.vala b/src/rygel/rygel-root-device-factory.vala
index de3daa9..b6d479d 100644
--- a/src/rygel/rygel-root-device-factory.vala
+++ b/src/rygel/rygel-root-device-factory.vala
@@ -49,9 +49,6 @@ public class Rygel.RootDeviceFactory {
         this.desc_dir = Path.build_filename (Environment.get_user_config_dir (),
                                              "Rygel");
         this.ensure_dir_exists (this.desc_dir);
-
-        // Host UPnP dir
-        context.host_path (BuildConfig.DATA_DIR, "");
     }
 
     public RootDevice create (Plugin plugin) throws GLib.Error {
@@ -72,13 +69,11 @@ public class Rygel.RootDeviceFactory {
         /* Create the description xml */
         Xml.Doc *doc = this.create_desc (plugin, desc_path);
 
-        /* Host our modified file */
-        this.context.host_path (desc_path, "/" + modified_desc);
-
         return new RootDevice (this.context,
                                plugin,
                                doc,
-                               modified_desc);
+                               desc_path,
+                               BuildConfig.DATA_DIR);
     }
 
     private Xml.Doc * create_desc (Plugin plugin,
diff --git a/src/rygel/rygel-root-device.vala b/src/rygel/rygel-root-device.vala
index 080ee1b..78812ce 100644
--- a/src/rygel/rygel-root-device.vala
+++ b/src/rygel/rygel-root-device.vala
@@ -34,14 +34,16 @@ public class Rygel.RootDevice: GUPnP.RootDevice {
     public RootDevice (GUPnP.Context context,
                        Plugin        plugin,
                        Xml.Doc      *description_doc,
-                       string        relative_location) {
+                       string        description_path,
+                       string        description_dir) {
         this.resource_factory = plugin;
         this.root_device = null;
         this.context = context;
 
         this.description_doc = description_doc;
         this.weak_ref ((WeakNotify) xml_doc_free, description_doc);
-        this.relative_location = relative_location;
+        this.description_path = description_path;
+        this.description_dir = description_dir;
 
         this.services = new ArrayList<ServiceInfo> ();
 



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