diff options
-rw-r--r-- | tools/test.js | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/tools/test.js b/tools/test.js new file mode 100644 index 00000000..c90d0390 --- /dev/null +++ b/tools/test.js @@ -0,0 +1,37 @@ +log("hello"); + +const DBus = imports.dbus +const Mainloop = imports.mainloop; +const Telepathy = imports.telepathy; + +let bus = DBus.session; + +function ConnectionManager() { + this._init(); +}; + +ConnectionManager.prototype = { + _init: function() { + DBus.session.proxifyObject(this, + 'org.freedesktop.Telepathy.ConnectionManager.gabble', + '/org/freedesktop/Telepathy/ConnectionManager/gabble'); + } +}; +DBus.proxifyPrototype(ConnectionManager.prototype, + Telepathy.ConnectionManager_Iface); + +let cm = new ConnectionManager(); +log(cm); +cm.ListProtocolsRemote(function(r, e) { + log("list protos"); + for (i = 0; i < r.length; i++) + { + log(r[i]); + cm.GetParametersRemote(r[i], function(r,e) { + log("get parameters"); + log(r.toSource()); + }); + } + }); +log("awesome"); +Mainloop.run('test'); |