- var XMLDocument = this.util.creerDocumentXMLAction()
- XMLDocument.documentElement.setAttribute("name", "profile")
-
- var nodeCookie = XMLDocument.createElement("cookie")
- nodeCookie.appendChild(XMLDocument.createTextNode(this.cookie))
- XMLDocument.documentElement.appendChild(nodeCookie)
-
- var nodeLogin = XMLDocument.createElement("login")
- nodeLogin.appendChild(XMLDocument.createTextNode(this.login))
- XMLDocument.documentElement.appendChild(nodeLogin)
-
- var nodePassword = XMLDocument.createElement("password")
- nodePassword.appendChild(XMLDocument.createTextNode(this.password))
- XMLDocument.documentElement.appendChild(nodePassword)
-
- var nodePseudo = XMLDocument.createElement("pseudo")
- nodePseudo.appendChild(XMLDocument.createTextNode(this.pseudo))
- XMLDocument.documentElement.appendChild(nodePseudo)
-
- var nodeEmail = XMLDocument.createElement("email")
- nodeEmail.appendChild(XMLDocument.createTextNode(this.email))
- XMLDocument.documentElement.appendChild(nodeEmail)
+ return {
+ "action" : "authentification",
+ "login" : login,
+ "password" : password
+ }
+}
+
+Client.prototype.getJSONLoginCookie = function()
+{
+ return {
+ "action" : "authentification",
+ "cookie" : this.cookie
+ }
+}
+
+/**
+ * le couple (login, password) est facultatif. S'il n'est pas fournit alors il ne sera pas possible
+ * de s'autentifier avec (login, password).
+ */
+Client.prototype.getJSONEnregistrement = function(login, password)
+{
+ var mess = { "action" : "register" }