[rygel] core: RootDevice to GObject-style



commit 3c7120cf65dc85113ea938077e3cb0f4cf23cd76
Author: Jens Georg <jensg openismus com>
Date:   Thu Dec 6 23:14:47 2012 +0100

    core: RootDevice to GObject-style

 src/librygel-core/rygel-root-device.vala |   20 ++++++++++----------
 1 files changed, 10 insertions(+), 10 deletions(-)
---
diff --git a/src/librygel-core/rygel-root-device.vala b/src/librygel-core/rygel-root-device.vala
index b3d5385..e9b58f5 100644
--- a/src/librygel-core/rygel-root-device.vala
+++ b/src/librygel-core/rygel-root-device.vala
@@ -50,19 +50,19 @@ public class Rygel.RootDevice: GUPnP.RootDevice {
                 description_doc : description_doc,
                 description_path: description_path,
                 description_dir: description_dir);
+    }
 
-        // Yes, this can happen.
-        if (this != null) {
-            this.services = new ArrayList<ServiceInfo> ();
+    public override void constructed () {
+        this.services = new ArrayList<ServiceInfo> ();
+        var plugin = this.resource_factory as Plugin;
 
-            // Now create the sevice objects
-            foreach (ResourceInfo info in plugin.resource_infos) {
-                // FIXME: We only support plugable services for now
-                if (info.type.is_a (typeof (Service))) {
-                    var service = this.get_service (info.upnp_type);
+        // Now create the sevice objects
+        foreach (var info in plugin.resource_infos) {
+            // FIXME: We only support plugable services for now
+            if (info.type.is_a (typeof (Service))) {
+                var service = this.get_service (info.upnp_type);
 
-                    this.services.add (service);
-                }
+                this.services.add (service);
             }
         }
     }



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