From 8364e6bbedf919008da50cc1b54dbb8a49dee88d Mon Sep 17 00:00:00 2001 From: Tobi Oetiker Date: Wed, 4 Jun 2008 21:33:02 +0000 Subject: alter name to Tr since we do not use mtr anmore --- qooxdoo/source/class/Tr/Server.js | 74 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 74 insertions(+) create mode 100644 qooxdoo/source/class/Tr/Server.js (limited to 'qooxdoo/source/class/Tr/Server.js') diff --git a/qooxdoo/source/class/Tr/Server.js b/qooxdoo/source/class/Tr/Server.js new file mode 100644 index 0000000..f17e54b --- /dev/null +++ b/qooxdoo/source/class/Tr/Server.js @@ -0,0 +1,74 @@ +/* ************************************************************************ +#module(Tr) +************************************************************************ */ + +/** + * A Tr specific rpc call which works + */ + +qx.Class.define('Tr.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('tr.cgi'); + setServiceName('Tr'); + 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+'tr.cgi'); + } + } + } + + } +}); -- cgit v1.2.3-24-g4f1b