コード例 #1
0
 def __init__(self, backend_interaction, component=False):
     '''
     @param backend_interaction: The handler for cumminicating with the logic of the backend.
     @type backend_interaction: ServerInteraction 
     '''
     #init XEPs
     MessageProtocol.__init__(self)
     LocationQuery.__init__(self)
     JabberRPC.__init__(self)
     IQBasedAvatar.__init__(self)
     PresenceClientProtocol.__init__(self)
     self.component = component
     
     #register rpc functions
     self.registerMethodCall('getSettings', self.onGetSettings)
     self.registerMethodCall('setSettings', self.onSetSettings)
     self.registerMethodCall('getUserInfo', self.onGetUserInfo)
     self.registerMethodCall('createFriendship', self.onCreateFriendship)
     self.registerMethodCall('destroyFriendship', self.onDestroyFriendship)
     
     #give the backend (ServerInteraction) a reference to this protocol handler
     self.backend = backend_interaction
     self.backend.set_server_component(self)
コード例 #2
0
ファイル: diarybot2.py プロジェクト: drewp/diarybot
 def __init__(self, availableSubscribers):
     PresenceClientProtocol.__init__(self)
     self.availableSubscribers = availableSubscribers
コード例 #3
0
ファイル: xmppClient.py プロジェクト: allo-/otfbot
 def __init__(self, bot):
     self.bot = bot
     PresenceClientProtocol.__init__(self)
コード例 #4
0
ファイル: xmpp_protocol.py プロジェクト: tsing/XMPP-Proxy
 def __init__(self, component, jid_act_as, jid_proxy_to):
     PresenceClientProtocol.__init__(self)
     XmppProxyHandler.__init__(self, component, jid_act_as, jid_proxy_to)
コード例 #5
0
ファイル: xmppClient.py プロジェクト: otfbot/otfbot
 def __init__(self, bot):
     self.bot=bot
     PresenceClientProtocol.__init__(self)