summaryrefslogtreecommitdiffstats
path: root/qooxdoo/source/class/Mtr/Server.js
diff options
context:
space:
mode:
authorTobi Oetiker <tobi@oetiker.ch>2008-06-02 22:03:33 +0200
committerTobi Oetiker <tobi@oetiker.ch>2008-06-02 22:03:33 +0200
commit8793d83042d5cf388a30ee5f8637fa6554334aa6 (patch)
treeca1d1a68cd3513f1eab9fa9a14559f687d233aae /qooxdoo/source/class/Mtr/Server.js
parent6b239270a134ef8f26d59a7ab9b35eeeeceb9c47 (diff)
downloadsmokeping-8793d83042d5cf388a30ee5f8637fa6554334aa6.tar.gz
smokeping-8793d83042d5cf388a30ee5f8637fa6554334aa6.tar.xz
initial support for mrt integration
Diffstat (limited to 'qooxdoo/source/class/Mtr/Server.js')
-rw-r--r--qooxdoo/source/class/Mtr/Server.js74
1 files changed, 74 insertions, 0 deletions
diff --git a/qooxdoo/source/class/Mtr/Server.js b/qooxdoo/source/class/Mtr/Server.js
new file mode 100644
index 0000000..3e77047
--- /dev/null
+++ b/qooxdoo/source/class/Mtr/Server.js
@@ -0,0 +1,74 @@
+/* ************************************************************************
+#module(Mtr)
+************************************************************************ */
+
+/**
+ * A Mtr specific rpc call which works
+ */
+
+qx.Class.define('Mtr.Server', {
+ extend: qx.io.remote.Rpc,
+ type: "singleton",
+
+ /*
+ *****************************************************************************
+ CONSTRUCTOR
+ *****************************************************************************
+ */
+
+ /**
+ * @param local_url {String} When running the application in file:// mode.
+ * where will we find our RPC server.
+ */
+ construct: function (local_url) {
+
+ with(this){
+ base(arguments);
+ setTimeout(7000000);
+ setUrl('mtr.cgi');
+ setServiceName('Mtr');
+ setCrossDomain(true);
+ }
+
+ return this;
+ },
+
+ /*
+ *****************************************************************************
+ MEMBERS
+ *****************************************************************************
+ */
+
+ members :
+ {
+
+ /*
+ ---------------------------------------------------------------------------
+ CORE METHODS
+ ---------------------------------------------------------------------------
+ */
+
+ /**
+ * Tell about the BaseUrl we found.
+ *
+ * @type member
+ *
+ * @param {void}
+ *
+ * @return BaseUrl {Strings}
+ */
+
+ getBaseUrl: function(){
+ return this.__base_url;
+ },
+
+ setLocalUrl: function(local_url){
+ if ( document.location.host === '' ) {
+ with(this){
+ setUrl(local_url+'mtr.cgi');
+ }
+ }
+ }
+
+ }
+});