Package xmpp :: Module filetransfer :: Class IBB
[show private | hide private]
[frames | no frames]

Class IBB

PlugIn --+
         |
        IBB


IBB used to transfer small-sized data chunk over estabilished xmpp connection. Data is split into small blocks (by default 3000 bytes each), encoded as base 64 and sent to another entity that compiles these blocks back into the data chunk. This is very inefficiend but should work under any circumstances. Note that using IBB normally should be the last resort.
Method Summary
  __init__(self)
Initialise internal variables.
  IqHandler(self, conn, stanza)
Handles streams state change.
  OpenStream(self, sid, to, fp, blocksize)
Start new stream.
  plugin(self, owner)
Register handlers for receiving incoming datastreams.
  ReceiveHandler(self, conn, stanza)
Receive next portion of incoming datastream and store it write it to temporary file.
  SendHandler(self, conn)
Send next portion of data if it is time to do it.
  StreamBrokenHandler(self, conn, stanza)
Handle stream closure due to all some error while receiving data.
  StreamCloseHandler(self, conn, stanza)
Handle stream closure due to all data transmitted.
  StreamOpenHandler(self, conn, stanza)
Handles opening of new incoming stream.
  StreamOpenReplyHandler(self, conn, stanza)
Handle remote side reply about is it agree or not to receive our datastream.
    Inherited from PlugIn
  DEBUG(self, text, severity)
Feed a provided debug line to main instance's debug facility along with our ID string.
  PlugIn(self, owner)
Attach to main instance and register ourself and all our staff in it.
  PlugOut(self)
Unregister all our staff from main instance and detach from it.

Method Details

__init__(self)
(Constructor)

Initialise internal variables.
Overrides:
xmpp.client.PlugIn.__init__

IqHandler(self, conn, stanza)

Handles streams state change. Used internally.

OpenStream(self, sid, to, fp, blocksize=3000)

Start new stream. You should provide stream id 'sid', the endpoind jid 'to', the file object containing info for send 'fp'. Also the desired blocksize can be specified. Take into account that recommended stanza size is 4k and IBB uses base64 encoding that increases size of data by 1/3.

plugin(self, owner)

Register handlers for receiving incoming datastreams. Used internally.

ReceiveHandler(self, conn, stanza)

Receive next portion of incoming datastream and store it write it to temporary file. Used internally.

SendHandler(self, conn)

Send next portion of data if it is time to do it. Used internally.

StreamBrokenHandler(self, conn, stanza)

Handle stream closure due to all some error while receiving data. Raise xmpppy event specifying unsuccessfull data receive.

StreamCloseHandler(self, conn, stanza)

Handle stream closure due to all data transmitted. Raise xmpppy event specifying successfull data receive.

StreamOpenHandler(self, conn, stanza)

Handles opening of new incoming stream. Used internally.

StreamOpenReplyHandler(self, conn, stanza)

Handle remote side reply about is it agree or not to receive our datastream. Used internally. Raises xmpppy event specfiying if the data transfer is agreed upon.

Generated by Epydoc 2.1 on Mon Mar 6 14:11:54 2006 http://epydoc.sf.net