Exemple #1
0
 def connectionInitialized(self):
     MessageProtocol.connectionInitialized(self)
     RosterClientProtocol.connectionInitialized(self)
     PresenceClientProtocol.connectionInitialized(self)
     
     #Call to handler
     self._xmpphandler.onAuthenticated()
Exemple #2
0
    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)
        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)
Exemple #4
0
    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)
Exemple #6
0
 def __init__(self, jid):
     RosterClientProtocol.__init__(self)
     self.jid = jid
Exemple #7
0
 def connectionInitialized(self):
     RosterClientProtocol.connectionInitialized(self)
     self.getRoster()
Exemple #8
0
 def connectionInitialized(self):
     RosterClientProtocol.connectionInitialized(self)
     d = self.getRoster()
     d.addCallback(self.gotRoster)
     d.addErrback(log.err)
Exemple #9
0
 def connectionInitialized(self):
     RosterClientProtocol.connectionInitialized(self)
     PresenceClientProtocol.connectionInitialized(self)
     self.attemptGetRoster()
Exemple #10
0
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()
Exemple #11
0
 def connectionInitialized(self):
     print 'Initializing connection'
     MessageProtocol.connectionInitialized(self)
     PresenceClientProtocol.connectionInitialized(self)
     RosterClientProtocol.connectionInitialized(self)
     self.getRoster().addCallback(self.processRoster)
Exemple #12
0
 def connectionInitialized(self):
     RosterClientProtocol.connectionInitialized(self)
     self.getRoster()
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()