gloox
0.9.9.12
|
#include <connectionlistener.h>
Public Member Functions | |
virtual | ~ConnectionListener () |
virtual void | onConnect ()=0 |
virtual void | onDisconnect (ConnectionError e)=0 |
virtual void | onResourceBindError (ResourceBindError error) |
virtual void | onSessionCreateError (SessionCreateError error) |
virtual bool | onTLSConnect (const CertInfo &info)=0 |
virtual void | onStreamEvent (StreamEvent event) |
Derived classes can be registered as ConnectionListeners with the Client.
This interface is mandatory to implement if a connection is to be made TLS-encrypted. In onTLSConnect(), the server's certificate information needs to be checked, and true returned if the certificate is to be accepted.
Definition at line 31 of file connectionlistener.h.
|
inlinevirtual |
Virtual Destructor.
Definition at line 37 of file connectionlistener.h.
|
pure virtual |
This function notifies about successful connections. It will be called either after all authentication is finished if username/password were supplied, or after a connection has been established if no credentials were supplied. Depending on the setting of AutoPresence, a presence stanza is sent or not.
|
pure virtual |
This function notifies about disconnection and its reason. If e indicates a stream error, you can use ClientBase::streamError() to find out what exactly went wrong, and ClientBase::streamErrorText() to retrieve any explaining text sent along with the error. If e indicates an authentication error, you can use ClientBase::authError() to get a finer grained reason.
e | The reason for the disconnection. |
|
inlinevirtual |
This function is called (by a Client object) if an error occurs while trying to bind a resource.
error | Describes the error condition. |
Definition at line 62 of file connectionlistener.h.
|
inlinevirtual |
This function is called (by a Client object) if an error occurs while trying to establish a session.
error | Describes the error condition. |
Definition at line 69 of file connectionlistener.h.
|
inlinevirtual |
This function is called for certain stream events. Notifications are purely informational and implementation is optional. Not all StreamEvents will necessarily be emitted for a given connection.
event | A stream event. |
Definition at line 86 of file connectionlistener.h.
|
pure virtual |
This function is called when the connection was TLS/SSL secured.
info | Comprehensive info on the certificate. |