summaryrefslogtreecommitdiffstats
path: root/apps
diff options
context:
space:
mode:
authorStefan Radomski <radomski@tk.informatik.tu-darmstadt.de>2014-01-08 15:14:02 (GMT)
committerStefan Radomski <radomski@tk.informatik.tu-darmstadt.de>2014-01-08 15:14:02 (GMT)
commit8d1f0d8cd595c5e9690b2745ec89a955bf9e397e (patch)
tree85077868385ccc20eb996feecd1803ba51fca65a /apps
parenta39086067c99ab691f704017ff853250469aa91a (diff)
downloaduscxml-8d1f0d8cd595c5e9690b2745ec89a955bf9e397e.zip
uscxml-8d1f0d8cd595c5e9690b2745ec89a955bf9e397e.tar.gz
uscxml-8d1f0d8cd595c5e9690b2745ec89a955bf9e397e.tar.bz2
Started http to instant-messaging bridge
Diffstat (limited to 'apps')
-rw-r--r--apps/samples/http2im/http2im.scxml49
1 files changed, 49 insertions, 0 deletions
diff --git a/apps/samples/http2im/http2im.scxml b/apps/samples/http2im/http2im.scxml
new file mode 100644
index 0000000..a2b2090
--- /dev/null
+++ b/apps/samples/http2im/http2im.scxml
@@ -0,0 +1,49 @@
+<scxml datamodel="ecmascript" name="http2im">
+
+ <script src="http://uscxml.tk.informatik.tu-darmstadt.de/scripts/dump.js" />
+ <state id="idle">
+ <onentry>
+ <!-- <send event="dump" delay="100ms" /> -->
+ </onentry>
+
+ <invoke type="instant-messaging" id="im">
+ <param name="username" expr="'uscxml@diogenes.local'" />
+ <param name="password" expr="'uscxml'" />
+ <param name="protocol" expr="'prpl-jabber'" />
+ <finalize>
+ <script>
+ print("-----------------\n");
+ dump(_event);</script>
+ </finalize>
+ </invoke>
+
+ <transition event="http.get">
+ <script>
+ print("-----------------\n");
+ dump(_event);</script>
+ <respond status="200" to="_event.origin" />
+ <send target="#_im" event="im.send">
+ <param name="receiver" expr="'sradomski@diogenes.local'" />
+ <content expr="_event.data.query.msg" />
+ </send>
+ </transition>
+
+ <transition event="im.buddy.status.changed">
+ <!-- <script>print("\n\n"); dump(_invokers['im']);</script> -->
+ </transition>
+
+ <transition event="im.signed.on">
+ <!-- <send target="#_im" event="im.buddy.add">
+ <param name="name" expr="'sradomski@diogenes.local'" />
+ <param name="msg" expr="'Please add me as a contact!'" />
+ </send> -->
+ <!-- <script>print("\n\n"); dump(_invokers['im']);</script> -->
+ <send target="#_im" event="im.send">
+ <param name="receiver" expr="'sradomski@diogenes.local'" />
+ <param name="data" expr="someBinaryData" /> <!-- Unsupported :( -->
+ <content><![CDATA[Have a look <a href="http://www.heise.de">here</a>]]></content>
+ </send>
+ </transition>
+
+ </state>
+</scxml> \ No newline at end of file