[cl-xmpp-cvs] CVS update: cl-xmpp/TODO cl-xmpp/cl-xmpp.lisp cl-xmpp/result.lisp

Erik Enge eenge at common-lisp.net
Fri Oct 28 21:18:01 UTC 2005


Update of /project/cl-xmpp/cvsroot/cl-xmpp
In directory common-lisp.net:/tmp/cvs-serv32631

Modified Files:
	TODO cl-xmpp.lisp result.lisp 
Log Message:

Date: Fri Oct 28 23:17:59 2005
Author: eenge

Index: cl-xmpp/TODO
diff -u cl-xmpp/TODO:1.1.1.1 cl-xmpp/TODO:1.2
--- cl-xmpp/TODO:1.1.1.1	Fri Oct 28 15:16:02 2005
+++ cl-xmpp/TODO	Fri Oct 28 23:17:59 2005
@@ -6,6 +6,4 @@
  - also, i'm interning things which will screw up lisps with up/down
    case different.
 
-- ok, test receive-stanza-loop with a file with contents
-  which i think i'm getting and see if it blows up with
-  that.
\ No newline at end of file
+- add support for JEP0030 service discovery
\ No newline at end of file


Index: cl-xmpp/cl-xmpp.lisp
diff -u cl-xmpp/cl-xmpp.lisp:1.2 cl-xmpp/cl-xmpp.lisp:1.3
--- cl-xmpp/cl-xmpp.lisp:1.2	Fri Oct 28 23:04:12 2005
+++ cl-xmpp/cl-xmpp.lisp	Fri Oct 28 23:17:59 2005
@@ -1,4 +1,4 @@
-;;;; $Id: cl-xmpp.lisp,v 1.2 2005/10/28 21:04:12 eenge Exp $
+;;;; $Id: cl-xmpp.lisp,v 1.3 2005/10/28 21:17:59 eenge Exp $
 ;;;; $Source: /project/cl-xmpp/cvsroot/cl-xmpp/cl-xmpp.lisp,v $
 
 ;;;; See the LICENSE file for licensing information.
@@ -251,6 +251,18 @@
     (cxml:with-element "password" (cxml:text password))
     (cxml:with-element "name" (cxml:text name))
     (cxml:with-element "email" (cxml:text email))))
+
+(defmethod cancel-registration ((connection connection))
+  (with-iq-query (connection :id "unreg1" :type "set" :xmlns "jabber:iq:register")
+   (cxml:with-element "remove")))
+
+;;; XXX: connection should know about username?
+(defmethod change-password ((connection connection) username new-password)
+  (with-iq-query (connection :id "change1" :type "set" :xmlns "jabber:iq:register")
+   (cxml:with-element "username"
+    (cxml:text username))
+   (cxml:with-element "password"
+    (cxml:text new-password))))
 
 (defmethod auth-requirements ((connection connection) username)
   (with-iq-query (connection :id "auth1" :xmlns "jabber:iq:auth")


Index: cl-xmpp/result.lisp
diff -u cl-xmpp/result.lisp:1.2 cl-xmpp/result.lisp:1.3
--- cl-xmpp/result.lisp:1.2	Fri Oct 28 23:04:12 2005
+++ cl-xmpp/result.lisp	Fri Oct 28 23:17:59 2005
@@ -1,4 +1,4 @@
-;;;; $Id: result.lisp,v 1.2 2005/10/28 21:04:12 eenge Exp $
+;;;; $Id: result.lisp,v 1.3 2005/10/28 21:17:59 eenge Exp $
 ;;;; $Source: /project/cl-xmpp/cvsroot/cl-xmpp/result.lisp,v $
 
 ;;;; See the LICENSE file for licensing information.
@@ -295,6 +295,19 @@
   (let ((id (intern (string-upcase (value (get-attribute object "id"))) :keyword)))
     (case id
       (:roster_1 (make-roster object))
+      (:reg2 (if (string-equal (value (get-attribute object "type")) "result")
+		 :registration-successful
+	       (make-error (get-element object "error"))))
+      (:unreg_1 (if (string-equal (value (get-attribute object "type")) "result")
+		    :registration-cancellation-successful
+		  (make-error (get-element object "error"))))
+      (:change1 (if (string-equal (value (get-attribute object "type")) "result")
+		    :password-changed-succesfully
+		  (make-error (get-element object "error"))))
+      (:error (make-error (get-element object "error")))
+      (:auth2 (if (string-equal (value (get-attribute object "type")) "result")
+		    :authentication-successful
+		(make-error (get-element object "error"))))
       (t name))))
 
 (defmethod xml-element-to-event ((object xml-element) (name (eql :error)))




More information about the Cl-xmpp-cvs mailing list