diff options
author | Nathan Fritz <nathan@andyet.net> | 2010-10-13 18:15:21 -0700 |
---|---|---|
committer | Nathan Fritz <nathan@andyet.net> | 2010-10-13 18:15:21 -0700 |
commit | 7ad7a29a8f08ff815164731eec50ff1cba46b07a (patch) | |
tree | 444a2d89993072a377155d8f131899a19d18dffa /sleekxmpp/clientxmpp.py | |
parent | b0e036d03c5e850af3a3c1589af7333becf54a86 (diff) | |
download | slixmpp-7ad7a29a8f08ff815164731eec50ff1cba46b07a.tar.gz slixmpp-7ad7a29a8f08ff815164731eec50ff1cba46b07a.tar.bz2 slixmpp-7ad7a29a8f08ff815164731eec50ff1cba46b07a.tar.xz slixmpp-7ad7a29a8f08ff815164731eec50ff1cba46b07a.zip |
new state machine in place
Diffstat (limited to 'sleekxmpp/clientxmpp.py')
-rw-r--r-- | sleekxmpp/clientxmpp.py | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/sleekxmpp/clientxmpp.py b/sleekxmpp/clientxmpp.py index 13de39df..1aab4a78 100644 --- a/sleekxmpp/clientxmpp.py +++ b/sleekxmpp/clientxmpp.py @@ -92,6 +92,7 @@ class ClientXMPP(BaseXMPP): self.sessionstarted = False self.bound = False self.bindfail = False + self.add_event_handler('connected', self.handle_connected) self.register_handler( Callback('Stream Features', @@ -116,6 +117,14 @@ class ClientXMPP(BaseXMPP): self.register_feature( "<session xmlns='urn:ietf:params:xml:ns:xmpp-session' />", self._handle_start_session) + + def handle_connected(self, event=None): + #TODO: Use stream state here + self.authenticated = False + self.sessionstarted = False + self.bound = False + self.bindfail = False + def connect(self, address=tuple()): """ |