From 9be780a2fbd68bf4c71431d94e8e8c07666468fb Mon Sep 17 00:00:00 2001 From: Greg Burri Date: Fri, 8 Aug 2008 14:39:39 +0000 Subject: [PATCH] =?utf8?q?ADD=20d=C3=A9but=20du=20regroupement=20de=20la?= =?utf8?q?=20communication=20avec=20le=20serveur=20dans=20protocole.js?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- js/fragment.js | 2 +- js/protocole.js | 46 ++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 47 insertions(+), 1 deletion(-) create mode 100644 js/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) { + +} -- 2.43.0