def connectionInitialized(self): MessageProtocol.connectionInitialized(self) RosterClientProtocol.connectionInitialized(self) PresenceClientProtocol.connectionInitialized(self) #Call to handler self._xmpphandler.onAuthenticated()
def connectionInitialized(self): RosterClientProtocol.connectionInitialized(self) if self.roster is not None: version = self.roster.version else: version = "" d = self.getRoster(version) d.addCallback(self.gotRoster) d.addErrback(log.err) reactor.callLater(15, self.xmlstream.sendFooter)
def connectionInitialized(self): RosterClientProtocol.connectionInitialized(self) global roster_conn roster_conn = self def updateRosterList(roster): global roster_list print roster.keys() roster_list = roster.keys() self.getRoster().addCallback(updateRosterList)
def connectionInitialized(self): RosterClientProtocol.connectionInitialized(self) d = self.getRoster() d.addCallback(self.gotRoster) d.addErrback(log.err)
def __init__(self, jid): RosterClientProtocol.__init__(self) self.jid = jid
def connectionInitialized(self): RosterClientProtocol.connectionInitialized(self) self.getRoster()
def connectionInitialized(self): RosterClientProtocol.connectionInitialized(self) PresenceClientProtocol.connectionInitialized(self) self.attemptGetRoster()
import sys from twisted.internet import reactor from twisted.words.protocols.jabber.jid import JID from wokkel.client import XMPPClient from wokkel.xmppim import RosterClientProtocol, RosterItem USER_JID, PASSWORD, CONTACT_JID, NAME = sys.argv[1:5] client = XMPPClient(JID(USER_JID), PASSWORD) roster = RosterClientProtocol() roster.setHandlerParent(client) d = roster.setItem(RosterItem(JID(CONTACT_JID), name=NAME)) d.addBoth(lambda _: reactor.stop()) client.startService() reactor.run()
def connectionInitialized(self): print 'Initializing connection' MessageProtocol.connectionInitialized(self) PresenceClientProtocol.connectionInitialized(self) RosterClientProtocol.connectionInitialized(self) self.getRoster().addCallback(self.processRoster)
import sys from twisted.internet import reactor from twisted.words.protocols.jabber.jid import JID from wokkel.client import XMPPClient from wokkel.xmppim import RosterClientProtocol USER_JID, PASSWORD, CONTACT_JID = sys.argv[1:4] client = XMPPClient(JID(USER_JID), PASSWORD) roster = RosterClientProtocol() roster.setHandlerParent(client) d = roster.removeItem(JID(CONTACT_JID)) d.addBoth(lambda _: reactor.stop()) client.startService() reactor.run()