<script src="../../lib/autobahn.min.js"></script>
<script src="../../cloudeebus/cloudeebus.js"></script>
<script type="text/javascript">
- var manifest = {
- name: "cloudeebus",
- key: "secret",
- permissions: [
- "org.freedesktop.DBus",
- "org.freedesktop.Notifications"
- ]
- };
function evalScript() {
eval(
"var lambda = function() {" +
<body>
<center><h1>cloudeebus</h1></center>
<br>
- <textarea cols="80" rows=24 id="script">
+ <textarea style="width:80%" rows="32" id="script">
+var manifest = {
+ name: "cloudeebus",
+ key: "secret",
+ permissions: [
+ "org.freedesktop.DBus",
+ "org.freedesktop.Notifications"
+ ]
+};
+
cloudeebus.log = function(msg) {
document.getElementById("log").innerHTML += msg + "\n";
}
}
function gotNotifProxy(proxy) {
- proxy.Notify("Cloudeebus",0,"","Cloudeebus says:", "Hello, world !", [], {}, 0);
+ for (var ifproxy in proxy.interfaceProxies)
+ cloudeebus.log(ifproxy);
+ proxy.getInterface("org.freedesktop.Notifications").Notify("Cloudeebus",0,"","Cloudeebus says:", "Hello, world !", [], {}, 0);
}
function gotBusProxy(proxy) {
- proxy.ListNames(logCB, errorCB);
+ proxy.ListNames().then(logCB, errorCB);
}
function connectSuccess() {