+}
+
+Client.prototype.pageSuivante = function(numConv)
+{
+ if (numConv < 0 && this.pagePrincipale > 1)
+ this.pagePrincipale -= 1
+ else if (this.conversations[numConv].page > 1)
+ this.conversations[numConv].page -= 1
+ this.flush(false)
+}
+
+Client.prototype.pagePrecedente = function(numConv)
+{
+ if (numConv < 0)
+ this.pagePrincipale += 1
+ else
+ this.conversations[numConv].page += 1
+ this.flush(false)
+}
+
+/**
+ * Définit la première page pour la conversation donnée.
+ * @return true si la page a changé sinon false
+ */
+Client.prototype.goPremierePage = function(numConv)
+{
+ if (numConv < 0)
+ {
+ if (this.pagePrincipale == 1)
+ return false
+ this.pagePrincipale = 1
+ }
+ else
+ {
+ if (this.conversations[numConv].page == 1)
+ return false
+ this.conversations[numConv].page = 1
+ }
+ this.flush(false)
+ return true
+}
+
+/**
+ * Ajoute une conversation à la vue de l'utilisateur.
+ * Le profile de l'utilisateur est directement sauvegardé sur le serveur.
+ * @param racines la racine de la conversation
+ * @return true si la conversation a été créée sinon false (par exemple si la conv existe déjà)
+ */
+Client.prototype.ajouterConversation = function(racine)
+{
+ // vérification s'il elle n'existe pas déjà
+ for (var i = 0; i < this.conversations.length; i++)
+ if (this.conversations[i].racine == racine)
+ return false
+
+ this.conversations.push({racine : racine, page : 1})
+ this.flush(false)
+ return true
+}
+
+Client.prototype.supprimerConversation = function(num)
+{
+ if (num < 0 || num >= this.conversations.length) return
+
+ // décalage TODO : supprimer le dernier élément
+ for (var i = num; i < this.conversations.length - 1; i++)
+ this.conversations[i] = this.conversations[i+1]
+ this.conversations.pop()
+
+ this.flush(false)