[rygel] core: Make MediaReceiverRegistrar send events
- From: Zeeshan Ali Khattak <zeeshanak src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [rygel] core: Make MediaReceiverRegistrar send events
- Date: Mon, 13 Jun 2011 14:49:46 +0000 (UTC)
commit 9913f522cc5077683fe1b1aa799cbacf8b9efbb3
Author: Jens Georg <mail jensge org>
Date: Tue May 24 18:07:13 2011 +0200
core: Make MediaReceiverRegistrar send events
It neither help nor harm the XBox but fixes UPnP CTT UDA-4.2.2.
data/xml/X_MS_MediaReceiverRegistrar1.xml.in | 8 ++++----
src/rygel/rygel-media-receiver-registrar.vala | 16 ++++++++++++++++
2 files changed, 20 insertions(+), 4 deletions(-)
---
diff --git a/data/xml/X_MS_MediaReceiverRegistrar1.xml.in b/data/xml/X_MS_MediaReceiverRegistrar1.xml.in
index c862c1d..a1cc979 100644
--- a/data/xml/X_MS_MediaReceiverRegistrar1.xml.in
+++ b/data/xml/X_MS_MediaReceiverRegistrar1.xml.in
@@ -74,22 +74,22 @@
</stateVariable>
<stateVariable>
<name>AuthorizationGrantedUpdateID</name>
- <sendEventsAttribute>no</sendEventsAttribute>
+ <sendEventsAttribute>yes</sendEventsAttribute>
<dataType>ui4</dataType>
</stateVariable>
<stateVariable>
<name>AuthorizationDeniedUpdateID</name>
- <sendEventsAttribute>no</sendEventsAttribute>
+ <sendEventsAttribute>yes</sendEventsAttribute>
<dataType>ui4</dataType>
</stateVariable>
<stateVariable>
<name>ValidationSucceededUpdateID</name>
- <sendEventsAttribute>no</sendEventsAttribute>
+ <sendEventsAttribute>yes</sendEventsAttribute>
<dataType>ui4</dataType>
</stateVariable>
<stateVariable>
<name>ValidationRevokedUpdateID</name>
- <sendEventsAttribute>no</sendEventsAttribute>
+ <sendEventsAttribute>yes</sendEventsAttribute>
<dataType>ui4</dataType>
</stateVariable>
</serviceStateTable>
diff --git a/src/rygel/rygel-media-receiver-registrar.vala b/src/rygel/rygel-media-receiver-registrar.vala
index 8ab5233..f1bc226 100644
--- a/src/rygel/rygel-media-receiver-registrar.vala
+++ b/src/rygel/rygel-media-receiver-registrar.vala
@@ -42,6 +42,15 @@ internal class Rygel.MediaReceiverRegistrar: Service {
this.action_invoked["IsAuthorized"].connect (this.is_authorized_cb);
this.action_invoked["IsValidated"].connect (this.is_authorized_cb);
this.action_invoked["RegisterDevice"].connect (this.register_device_cb);
+
+ this.query_variable["AuthorizationGrantedUpdateID"].connect
+ (this.query_state);
+ this.query_variable["AuthorizationDeniedUpdateID"].connect
+ (this.query_state);
+ this.query_variable["ValidationSucceededUpdateID"].connect
+ (this.query_state);
+ this.query_variable["ValidationRevokedUpdateID"].connect
+ (this.query_state);
}
/* IsAuthorized and IsValided action implementations (fake) */
@@ -60,4 +69,11 @@ internal class Rygel.MediaReceiverRegistrar: Service {
action.return ();
}
+
+ private void query_state (Service registrar,
+ string variable,
+ ref GLib.Value value) {
+ value.init (typeof (int));
+ value.set_int (0);
+ }
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]