diff options
author | Magnus Henoch <mange@freemail.hu> | 2006-07-15 12:15:50 +0000 |
---|---|---|
committer | Kirill A. Korinskiy <catap@catap.ru> | 2006-07-15 12:15:50 +0000 |
commit | 14ae208a951d10661761219d212a3fc04f5c6314 (patch) | |
tree | 91095922c02bcfeb44a693f8127125e5dfb99cef /jabber-si-server.el | |
parent | 15b148e570e44b864c176423f54459caabfa4b1d (diff) |
Revision: mange@freemail.hu--2005/emacs-jabber--cvs-head--0--patch-248
Creator: Magnus Henoch <mange@freemail.hu>
Merge file transfer work
Patches applied:
* mange@freemail.hu--2005/emacs-jabber--file-transfer--0--base-0
tag of mange@freemail.hu--2005/emacs-jabber--cvs-head--0--patch-243
* mange@freemail.hu--2005/emacs-jabber--file-transfer--0--patch-1
Merge fsm
* mange@freemail.hu--2005/emacs-jabber--file-transfer--0--patch-2
Commit initial file transfer work
* mange@freemail.hu--2005/emacs-jabber--file-transfer--0--patch-3
Really ignore disco items without nodes
* mange@freemail.hu--2005/emacs-jabber--file-transfer--0--patch-4
Remove debug output
* mange@freemail.hu--2005/emacs-jabber--file-transfer--0--patch-5
Wait for all disco info results, in case we need many proxies
* mange@freemail.hu--2005/emacs-jabber--file-transfer--0--patch-6
Move parentheses
* mange@freemail.hu--2005/emacs-jabber--file-transfer--0--patch-7
Fix termination of file transfers
* mange@freemail.hu--2005/emacs-jabber--file-transfer--0--patch-8
Merge from CVS HEAD
* mange@freemail.hu--2005/emacs-jabber--file-transfer--0--patch-9
Fix stupid bug in jabber-socks5
* mange@freemail.hu--2005/emacs-jabber--file-transfer--0--patch-10
kill-all-local-variables after opening buffer for file being downloaded
* mange@freemail.hu--2005/emacs-jabber--file-transfer--0--patch-11
Load file transfer code by default
* mange@freemail.hu--2005/emacs-jabber--file-transfer--0--patch-12
Remove obsolete documentation. Update NEWS.
* mange@freemail.hu--2005/emacs-jabber--fsm--0--base-0
tag of mange@freemail.hu--2005/emacs-jabber--cvs-head--0--patch-243
* mange@freemail.hu--2005/emacs-jabber--fsm--0--patch-1
Add fsm.el
Diffstat (limited to 'jabber-si-server.el')
-rw-r--r-- | jabber-si-server.el | 20 |
1 files changed, 6 insertions, 14 deletions
diff --git a/jabber-si-server.el b/jabber-si-server.el index 6c91b01..a84fb4e 100644 --- a/jabber-si-server.el +++ b/jabber-si-server.el @@ -23,6 +23,8 @@ (require 'jabber-disco) (require 'jabber-feature-neg) +(require 'jabber-si-common) + (add-to-list 'jabber-advertised-features "http://jabber.org/protocol/si") ;; Now, stream methods push data to profiles. It could be the other @@ -35,17 +37,7 @@ Each entry is a list, containing: * Accept function, taking entire IQ stanza, and signalling a 'forbidden' error if request is declined; returning an XML node to return in response, or nil of none needed - * Data function, taking JID of initiator, stream ID, and string - containing received data in binary form; receives `nil' on EOF. - Returns non-nil to keep connection; nil to close it.") - -(defvar jabber-si-stream-methods nil - "Supported SI stream methods. - -Each entry is a list, containing: - * The namespace URI of the stream method - * Accept function, taking JID of initiator, stream ID, profile - data function (as above), preparing to accept a request") + * \"Connection established\" function. See `jabber-si-stream-methods'.") (add-to-list 'jabber-iq-set-xmlns-alist (cons "http://jabber.org/protocol/si" 'jabber-si-process)) @@ -79,12 +71,12 @@ Each entry is a list, containing: ;; accept-function might throw a "forbidden" error ;; on user cancel (profile-response (funcall profile-accept-function xml-data)) - (profile-data-function (nth 2 profile-data)) + (profile-connected-function (nth 2 profile-data)) (stream-method-id (nth 1 (assoc "stream-method" stream-method))) (stream-data (assoc stream-method-id jabber-si-stream-methods)) - (stream-accept-function (nth 1 stream-data))) + (stream-accept-function (nth 2 stream-data))) ;; prepare stream for the transfer - (funcall stream-accept-function to si-id profile-data-function) + (funcall stream-accept-function to si-id profile-connected-function) ;; return result of feature negotiation of stream type (jabber-send-iq to "result" `(si ((xmlns . "http://jabber.org/protocol/si")) |