rygel r67 - in trunk: . src



Author: zeeshanak
Date: Tue Oct 28 20:59:31 2008
New Revision: 67
URL: http://svn.gnome.org/viewvc/rygel?rev=67&view=rev

Log:
Start using the new Vala syntax for connecting signals with details.

Modified:
   trunk/ChangeLog
   trunk/src/gupnp-content-directory.vala
   trunk/src/gupnp-media-receiver-registrar.vala

Modified: trunk/src/gupnp-content-directory.vala
==============================================================================
--- trunk/src/gupnp-content-directory.vala	(original)
+++ trunk/src/gupnp-content-directory.vala	Tue Oct 28 20:59:31 2008
@@ -34,16 +34,12 @@
     construct {
         this.tracker = new MediaTracker ("0", this.context);
         
-        /* FIXME: Use Vala's syntax for connecting signals when Vala adds
-        * support for signal details. */
-        Signal.connect (this,
-                        "action-invoked::Browse",
-                        (GLib.Callback) this.browse_cb,
-                        null);
+        this.action_invoked["Browse"] += this.browse_cb;
     }
 
     /* Browse action implementation */
-    private void browse_cb (ServiceAction action) {
+    private void browse_cb (ContentDirectory content_dir,
+                            ServiceAction    action) {
         string object_id, browse_flag;
         bool browse_metadata;
         string didl, sort_criteria, filter;

Modified: trunk/src/gupnp-media-receiver-registrar.vala
==============================================================================
--- trunk/src/gupnp-media-receiver-registrar.vala	(original)
+++ trunk/src/gupnp-media-receiver-registrar.vala	Tue Oct 28 20:59:31 2008
@@ -28,30 +28,21 @@
 public class GUPnP.MediaReceiverRegistrar: Service {
 
     construct {
-        /* FIXME: Use Vala's syntax for connecting signals when Vala adds
-        * support for signal details. */
-        Signal.connect (this,
-                        "action-invoked::IsAuthorized",
-                        (GLib.Callback) this.is_authorized_cb,
-                        null);
-        Signal.connect (this,
-                        "action-invoked::IsValidated",
-                        (GLib.Callback) this.is_authorized_cb,
-                        null);
-        Signal.connect (this,
-                        "action-invoked::RegisterDevice",
-                        (GLib.Callback) this.register_device_cb,
-                        null);
+        this.action_invoked["IsAuthorized"] += this.is_authorized_cb;
+        this.action_invoked["IsValidated"] += this.is_authorized_cb;
+        this.action_invoked["RegisterDevice"] += this.register_device_cb;
     }
 
     /* IsAuthorized and IsValided action implementations (fake) */
-    private void is_authorized_cb (ServiceAction action) {
+    private void is_authorized_cb (MediaReceiverRegistrar registrar,
+                                   ServiceAction          action) {
         action.set ("Result", typeof (int), 1);
 
         action.return ();
     }
 
-    private void register_device_cb (ServiceAction action) {
+    private void register_device_cb (MediaReceiverRegistrar registrar,
+                                     ServiceAction          action) {
         action.set ("RegistrationRespMsg",
                     typeof (string),
                     "WhatisSupposedToBeHere");



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