X-Git-Url: http://git.euphorik.ch/index.cgi?a=blobdiff_plain;f=js%2Fprotocole.js;fp=js%2Fprotocole.js;h=5d1b201e24bf7113e75261c7419b0a0dbaa21f06;hb=9be780a2fbd68bf4c71431d94e8e8c07666468fb;hp=0000000000000000000000000000000000000000;hpb=4aa85a2e80963b73773e748fd4402fab2ad852ce;p=euphorik.git diff --git a/js/protocole.js b/js/protocole.js new file mode 100644 index 0000000..5d1b201 --- /dev/null +++ b/js/protocole.js @@ -0,0 +1,46 @@ +// coding: utf-8 +// Copyright 2008 Grégory Burri +// +// This file is part of Euphorik. +// +// Euphorik is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// Euphorik is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with Euphorik. If not, see . + +// regroupe la partie communication +// En chantier !! + +euphorik.Protocole = function(util) { +} + +euphorik.Protocole.prototype.getBase = function() { + this.base = { + "header" : { "action" : "", "version" : euphorik.conf.versionProtocole } + }; +} + +euphorik.Protocole.prototype.registerAnonyme = function(profile) { + this.register(undefined, undefined, profile); +} + +euphorik.Protocole.prototype.register = function(login, password, profile) { + var base = this.getBase(); + if (login && password) { + base.login = login; + base.password = password; + } + base.profile = profile; +} + +euphorik.Protocole.prototype.requete = function(action, funOk, funError) { + +}