rygel r84 - in trunk: . src



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

Log:
Initialize "SystemUpdateID" variable and implement related query and action.

Modified:
   trunk/ChangeLog
   trunk/src/gupnp-content-directory.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:54 2008
@@ -33,8 +33,14 @@
 
     construct {
         this.tracker = new MediaTracker ("0", this.context);
-        
+        this.system_update_id = 0;
+
         this.action_invoked["Browse"] += this.browse_cb;
+
+        /* Connect SystemUpdateID related signals */
+        this.action_invoked["GetSystemUpdateID"] +=
+                                                this.get_system_update_id_cb;
+        this.query_variable["SystemUpdateID"] += this.query_system_update_id;
     }
 
     /* Browse action implementation */
@@ -113,5 +119,23 @@
 
         action.return ();
     }
+
+    /* GetSystemUpdateID action implementation */
+    private void get_system_update_id_cb (ContentDirectory content_dir,
+                                          ServiceAction    action) {
+        /* Set action return arguments */
+        action.set ("Id", typeof (uint32), this.system_update_id);
+
+        action.return ();
+    }
+
+    /* Query GetSystemUpdateID */
+    private void query_system_update_id (ContentDirectory content_dir,
+                                         string variable,
+                                         GLib.Value value) {
+        /* Set action return arguments */
+        value.init (typeof (uint32));
+        value.set_uint (this.system_update_id);
+    }
 }
 



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