[Pkg-javascript-commits] [ltx] 39/469: README: Design & TODO

Jonas Smedegaard dr at jones.dk
Wed Aug 31 13:00:56 UTC 2016


This is an automated email from the git hooks/post-receive script.

js pushed a commit to branch master
in repository ltx.

commit 7f2aa4af7c4d48cde2f8a8683859f7a2ea856880
Author: Astro <astro at spaceboyz.net>
Date:   Sat Jun 19 11:40:03 2010 +0200

    README: Design & TODO
---
 README.markdown | 29 ++++++++++++++++++++++++++++-
 1 file changed, 28 insertions(+), 1 deletion(-)

diff --git a/README.markdown b/README.markdown
index 6c78bba..7a12756 100644
--- a/README.markdown
+++ b/README.markdown
@@ -53,12 +53,39 @@ Objectives of *node-xmpp:*
     ┗━━━━━━━━━━┛ ┗━━━━━━━━━━━┛
 
 That means you can use the TCP events of `net.Stream` with Client and
-Component objects.
+Component objects. Other than that, hook callbacks to these events:
+
+* `authFail`, distinguished from `error`
+* `online`, when authentication is done and you can send XMPP stanzas
+  (ie. `<presence/>`)
+* `stanza` for each incoming XMPP stanza, with the XML Element as
+  parameter
+* `error` with the `<stream:error/>` as parameter
+
+This foundation is complemented by two basic data structures:
+
+* *JID:* a Jabber-Id, represented as a triple of `user`, `domain`,
+   `resource`
+* *Element:* any XML Element
 
 Desires about the API? Propose them ASAP!
 
+### Building XML Elements
+
+strophejs' XML Builder is very convenient for producing XMPP
+stanzas. node-xmpp includes it in a much more primitive way: the
+`c()`, `cnode()` and `t()` methods can be called on any *Element*
+object, returning the new child element.
+
+This can be confusing: in the end, you will hold the last-added child
+until you use `up()`, a getter for the parent. `Connection.send()`
+first invokes `tree()` to retrieve the uppermost parent, the XMPP
+stanza, before sending it out the wire.
+
 
 ## TODO
 
 * Documentation
 * Tests ([what framework?](http://wiki.github.com/ry/node/modules#testing))
+* Avoid namespace pollution?
+* Fix the [npmjs](http://github.com/isaacs/npm) package

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-javascript/ltx.git



More information about the Pkg-javascript-commits mailing list