Package archipelcore :: Module archipelRosterQueryableEntity :: Class TNRosterQueryableEntity
[hide private]
[frames] | no frames]

Class TNRosterQueryableEntity

source code

object --+
         |
        TNRosterQueryableEntity

TODO ADD description here

Instance Methods [hide private]
 
__init__(self, configuration, permission_center, xmppclient, log)
Initialize the TNRosterQueryableEntity.
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_vocabulary(self)
Initialize the vocabulary.
source code
 
init_permissions(self)
Initialize the permissions.
source code
 
register_handlers(self)
initialize the avatar handlers
source code
 
unregister_handlers(self)
initialize the avatar handlers
source code
 
process_roster_iq(self, conn, iq)
This method is invoked when a ARCHIPEL_NS_ROSTER IQ is received.
source code
 
iq_get_roster(self, iq)
Return the content of the roster.
source code
xmpp.Protocol.Message
message_roster(self, msg)
Handle roster asking message.
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, configuration, permission_center, xmppclient, log)
(Constructor)

source code 

Initialize the TNRosterQueryableEntity.

Parameters:
  • configuration (configuration object) - the configuration
  • permission_center (TNPermissionCenter) - the permission center of the entity
  • xmppclient (xmpp.Dispatcher) - the entity xmpp client
  • 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_roster_iq(self, conn, iq)

source code 

This method is invoked when a ARCHIPEL_NS_ROSTER IQ is received. It understands IQ of type:

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

iq_get_roster(self, iq)

source code 

Return the content of the roster.

Parameters:
  • iq (xmpp.Protocol.Iq) - the IQ containing the request

message_roster(self, msg)

source code 

Handle roster asking message.

Parameters:
  • msg (xmpp.Protocol.Message) - the received message
Returns: xmpp.Protocol.Message
a ready to send Message containing the result of the action