dbus service : adding manifest providing security
[contrib/cloudeebus.git] / doc / agent / server.html
index f54698d..b7ab8de 100644 (file)
    <body>
         <center><h1>cloudeebus</h1></center>
         <br>
-               <textarea style="width:80%" rows="32" id="script">var sampleXml= '<!DOCTYPE node PUBLIC "-//freedesktop//DTD D-BUS Object Introspection 1.0//EN"\n"http://www.freedesktop.org/standards/dbus/1.0/introspect.dtd">\n<node><interface name="org.cloudeebus.Sample1"><method name="Release"></method><method name="Add"><arg type="i" name="arg1"/><arg type="i" name="arg2"/><arg type="i" name="result" direction="out"/></method><method name="Variant"><arg type="a{sv}" name="arg1"/><arg type="a{sv}" name="result" direction="out"/></method><signal name="ResultChanged"><arg type="v" name="result"/></signal></interface><interface name="org.cloudeebus.Sample2"><method name="Div"><arg type="d" name="arg1"/><arg type="d" name="arg2"/><arg type="d" name="result" direction="out"/></method></interface></node>';
+               <textarea style="width:80%" rows="32" id="script">
+var manifest = {
+       name: "cloudeebus",
+       key: "secret",
+       services: [
+               "org.cloudeebus.Sample"
+       ]
+};
+
+
+var sampleXml= '<!DOCTYPE node PUBLIC "-//freedesktop//DTD D-BUS Object Introspection 1.0//EN"\n"http://www.freedesktop.org/standards/dbus/1.0/introspect.dtd">\n<node><interface name="org.cloudeebus.Sample1"><method name="Release"></method><method name="Add"><arg type="i" name="arg1"/><arg type="i" name="arg2"/><arg type="i" name="result" direction="out"/></method><method name="Variant"><arg type="a{sv}" name="arg1"/><arg type="a{sv}" name="result" direction="out"/></method><signal name="ResultChanged"><arg type="v" name="result"/></signal></interface><interface name="org.cloudeebus.Sample2"><method name="Div"><arg type="d" name="arg1"/><arg type="d" name="arg2"/><arg type="d" name="result" direction="out"/></method></interface></node>';
 
 cloudeebus.log = function(msg) {
   document.getElementById("log").innerHTML += msg + "\n";
@@ -97,7 +107,7 @@ function connectSuccess() {
   }
 }
 
-cloudeebus.connect("ws://localhost:9003", null, connectSuccess, errorCB);
+cloudeebus.connect("ws://localhost:9003", manifest, connectSuccess, errorCB);
 </textarea>
                <br>
 -              <input type="button" value="run script" onclick="evalScript()"/>