rygel r86 - in trunk: . src
- From: zeeshanak svn gnome org
- To: svn-commits-list gnome org
- Subject: rygel r86 - in trunk: . src
- Date: Tue, 28 Oct 2008 20:59:57 +0000 (UTC)
Author: zeeshanak
Date: Tue Oct 28 20:59:56 2008
New Revision: 86
URL: http://svn.gnome.org/viewvc/rygel?rev=86&view=rev
Log:
Implement "FeatureList" related queries and actions.
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:56 2008
@@ -28,6 +28,7 @@
public class GUPnP.ContentDirectory: Service {
uint32 system_update_id;
+ string feature_list;
MediaTracker tracker;
@@ -35,6 +36,14 @@
this.tracker = new MediaTracker ("0", this.context);
this.system_update_id = 0;
+ this.feature_list =
+ "<?xml version=\"1.0\" encoding=\"UTF-8\"?>" +
+ "<Features xmlns=\"urn:schemas-upnp-org:av:avs\" " +
+ "xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" " +
+ "xsi:schemaLocation=\"urn:schemas-upnp-org:av:avs" +
+ "http://www.upnp.org/schemas/av/avs-v1-20060531.xsd\">" +
+ "</Features>";
+
this.action_invoked["Browse"] += this.browse_cb;
/* Connect SystemUpdateID related signals */
@@ -53,6 +62,10 @@
this.get_sort_capabilities_cb;
this.query_variable["SortCapabilities"] +=
this.query_sort_capabilities;
+
+ /* Connect FeatureList related signals */
+ this.action_invoked["GetFeatureList"] += this.get_feature_list_cb;
+ this.query_variable["FeatureList"] += this.query_feature_list;
}
/* Browse action implementation */
@@ -185,5 +198,23 @@
value.init (typeof (string));
value.set_string ("");
}
+
+ /* action GetFeatureList implementation */
+ private void get_feature_list_cb (ContentDirectory content_dir,
+ ServiceAction action) {
+ /* Set action return arguments */
+ action.set ("FeatureList", typeof (string), this.feature_list);
+
+ action.return ();
+ }
+
+ /* Query FeatureList */
+ private void query_feature_list (ContentDirectory content_dir,
+ string variable,
+ GLib.Value value) {
+ /* Set action return arguments */
+ value.init (typeof (string));
+ value.set_string (this.feature_list);
+ }
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]