[seed] dbus: Add support for Synchronous property reading/writing
- From: Robert Carr <racarr src gnome org>
- To: svn-commits-list gnome org
- Subject: [seed] dbus: Add support for Synchronous property reading/writing
- Date: Wed, 13 May 2009 15:21:24 -0400 (EDT)
commit 04ed48bd6c83540bec53a79f0aa0f41547a0768b
Author: Robert Carr <racarr svn gnome org>
Date: Wed May 13 15:20:42 2009 -0400
dbus: Add support for Synchronous property reading/writing
---
modules/dbus/dbus.js | 30 ++++++++++++++++++++++++++++++
1 files changed, 30 insertions(+), 0 deletions(-)
diff --git a/modules/dbus/dbus.js b/modules/dbus/dbus.js
index 9cacfd6..390a70c 100644
--- a/modules/dbus/dbus.js
+++ b/modules/dbus/dbus.js
@@ -248,6 +248,34 @@ function _setRemote(propName, value) {
argArray);
}
+function _getRemoteSync(propName) {
+ // convert arguments to regular array
+ var argArray = [].splice.call(arguments, 0);
+ // prepend iface the property is on
+ argArray.splice(0, 0, this._dbusInterface);
+
+ return _proxyInvokerSync(this, "org.freedesktop.DBus.Properties",
+ "Get",
+ "v",
+ "ss",
+ -1,
+ argArray);
+}
+
+function _setRemoteSync(propName, value) {
+ // convert arguments to regular array
+ var argArray = [].splice.call(arguments, 0);
+ // prepend iface the property is on
+ argArray.splice(0, 0, this._dbusInterface);
+
+ _proxyInvokerSync(this, "org.freedesktop.DBus.Properties",
+ "Set",
+ "",
+ "ssv",
+ -1,
+ argArray);
+}
+
function _getAllRemote() {
// convert arguments to regular array
var argArray = [].splice.call(arguments, 0);
@@ -328,6 +356,8 @@ function proxifyPrototype(proto, iface) {
iface.properties.length > 0) {
proto['GetRemote'] = _getRemote;
proto['SetRemote'] = _setRemote;
+ proto['GetRemoteSync'] = _getRemoteSync;
+ proto['SetRemoteSync'] = _setRemoteSync;
proto['GetAllRemote'] = _getAllRemote;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]