//----------------------- // CLX LOCAL Communicator Class // by Caspar Noetzli // www.crealogix.com // vs. 0.1 2004-08-30 // ---------------------- // //--------------------------- // CLX_local_communicator Constructor //--------------------------- CLX_local_communicator = function (objRef, debugMode, userRef) { // objRef ist eine Referenz zum CLX_Translator bzw. zum aufrufenden Object this.refTranslator = objRef; this.user = userRef this.version = "v2004-08-27-001_clx"; // aus dem html this.id = id this.language = language this.datum = objRef.refController.getStrukturXMLDatum() this.sharedObjectName = "clxLocalUserData_"+this.id+"_"+this.language+"_"+this.datum }; //--------------------------- // CLX_local_communicator getVersion //--------------------------- CLX_local_communicator.prototype.getVersion = function() { return ("CLX LOCAL Communicator Class Version: "+this.version); }; //--------------------------- // CLX_local_communicator init //--------------------------- CLX_local_communicator.prototype.init = function() { // Help: Schnittstelle this.userData = SharedObject.getLocal(this.sharedObjectName) this.refTranslator.initCallback(0); }; //--------------------------- // CLX_local_communicator getUserData //--------------------------- CLX_local_communicator.prototype.getUserData = function() { this.refTranslator.getUserDataCallback(0); }; //--------------------------- // CLX_local_communicator setUserData //--------------------------- CLX_local_communicator.prototype.setUserData = function() { if (this.userData.data.trackingdata== undefined) { this.userData.data.trackingdata = this.user.trackingdata this.userData.data.location = this.user.location }else{ this.userData.data.trackingdata = this.user.trackingdata this.userData.data.location = this.user.location } this.userData.flush(); this.checkSetUserData() }; //--------------------------- // CLX_local_communicator checkSetUserData //--------------------------- CLX_local_communicator.prototype.checkSetUserData = function() { this.refTranslator.setUserDataCallback(0); }; //--------------------------- // CLX_local_communicator exitUserData //--------------------------- CLX_local_communicator.prototype.connectionExit = function() { this.checkConnectionExit() }; //--------------------------- // CLX_local_communicator checkConnectionExit //--------------------------- CLX_local_communicator.prototype.checkConnectionExit = function() { this.refTranslator.connectionExitCallback(0); }; //--------------------------- // CLX_local_communicator getLesson_location //--------------------------- CLX_local_communicator.prototype.getLesson_location = function() { return this.userData.data.location; }; //--------------------------- // CLX_local_communicator getLesson_data //--------------------------- CLX_local_communicator.prototype.getLesson_data = function() { return this.userData.data.trackingdata; };