Package archipelcore :: Module archipelFileTransferCapableEntity :: Class TNFileTransferCapableEntity
[hide private]
[frames] | no frames]

Class TNFileTransferCapableEntity

source code

object --+
         |
        TNFileTransferCapableEntity

This class allow ArchipelEntity to handle file transfer. ** This is work in progress. It's not working for now **

Instance Methods [hide private]
 
__init__(self, jid, xmppclient, permission_center, log)
Initialize the TNFileTransferCapableEntity.
source code
 
check_acp(conn, iq)
Function that verify if the ACP is valid.
source code
 
check_perm(self, conn, stanza, action_name, error_code=-1, prefix='')
function that verify if the permissions are granted
source code
 
init_permissions(self)
Initialize the tag permissions.
source code
 
register_handlers(self)
Initialize the handlers for tags.
source code
 
unregister_handlers(self)
Unregister the handlers for tags.
source code
 
process_disco_request(self, conn, iq)
This method is invoked when a http://jabber.org/protocol/disco#info IQ is received.
source code
 
process_si_request(self, conn, iq)
This method is invoked when a http://jabber.org/protocol/si IQ is received.
source code
 
process_bytestream_request(self, conn, iq)
This method is invoked when a http://jabber.org/protocol/bytestreams IQ is received.
source code

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __sizeof__, __str__, __subclasshook__

Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self, jid, xmppclient, permission_center, log)
(Constructor)

source code 

Initialize the TNFileTransferCapableEntity.

Parameters:
  • jid (string) - the JID of the current entity
  • xmppclient (xmpp.Dispatcher) - the entity xmpp client
  • permission_center (TNPermissionCenter) - the permission center of the entity
  • log (TNArchipelLog) - the logger of the entity
Overrides: object.__init__

check_acp(conn, iq)

source code 

Function that verify if the ACP is valid.

Parameters:
  • conn (xmpp.Dispatcher) - the connection
  • iq (xmpp.Protocol.Iq) - the IQ to check
Raises:
  • Exception - Exception if not implemented

check_perm(self, conn, stanza, action_name, error_code=-1, prefix='')

source code 

function that verify if the permissions are granted

Parameters:
  • conn (xmpp.Dispatcher) - the connection
  • stanza (xmpp.Node) - the stanza containing the action
  • action_name (string) - the action to check
  • error_code (int) - the error code to return
  • prefix (string) - the prefix of the action
Raises:
  • Exception - Exception if not implemented

process_disco_request(self, conn, iq)

source code 

This method is invoked when a http://jabber.org/protocol/disco#info IQ is received.

Parameters:
  • conn (xmpp.Dispatcher) - ths instance of the current connection that send the stanza
  • iq (xmpp.Protocol.Iq) - the received IQ

process_si_request(self, conn, iq)

source code 

This method is invoked when a http://jabber.org/protocol/si IQ is received.

Parameters:
  • conn (xmpp.Dispatcher) - ths instance of the current connection that send the stanza
  • iq (xmpp.Protocol.Iq) - the received IQ

process_bytestream_request(self, conn, iq)

source code 

This method is invoked when a http://jabber.org/protocol/bytestreams IQ is received.

Parameters:
  • conn (xmpp.Dispatcher) - ths instance of the current connection that send the stanza
  • iq (xmpp.Protocol.Iq) - the received IQ