From: Greg Burri Date: Fri, 8 Aug 2008 14:39:39 +0000 (+0000) Subject: ADD début du regroupement de la communication avec le serveur dans protocole.js X-Git-Tag: 1.1.0~13 X-Git-Url: https://git.euphorik.ch/?a=commitdiff_plain;h=9be780a2fbd68bf4c71431d94e8e8c07666468fb;p=euphorik.git ADD début du regroupement de la communication avec le serveur dans protocole.js --- diff --git a/js/fragment.js b/js/fragment.js index f5a734e..ef087f4 100644 --- a/js/fragment.js +++ b/js/fragment.js @@ -17,7 +17,7 @@ // along with Euphorik. If not, see . /** - * + * Gestion du fragment d'url, permet de le modifier en direct. */ Fragment = function() { var thisFragment = this; 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) { + +}