connectionlistener.h
/*
Copyright (c) 2004-2023 by Jakob Schröter <js@camaya.net>
This file is part of the gloox library. http://camaya.net/gloox
This software is distributed under a license. The full license
agreement can be found in the file LICENSE in this distribution.
This software may not be copied, modified, sold or distributed
other than expressed in the named license agreement.
This software is distributed without any warranty.
*/
#ifndef CONNECTIONLISTENER_H__
#define CONNECTIONLISTENER_H__
#include "gloox.h"
namespace gloox
{
class Error;
class GLOOX_API ConnectionListener
{
public:
virtual ~ConnectionListener() {}
virtual void onConnect() = 0;
virtual void onDisconnect( ConnectionError e ) = 0;
virtual void onResourceBind( const std::string& resource ) { (void)resource; }
virtual void onResourceBindError( const Error* error ) { (void) (error); }
virtual void onSessionCreateError( const Error* error ) { (void) (error); }
virtual bool onTLSConnect( const CertInfo& info ) = 0;
virtual void onStreamEvent( StreamEvent event ) { (void) (event); }
};
}
#endif // CONNECTIONLISTENER_H__
gloox::ConnectionListener
Derived classes can be registered as ConnectionListeners with the Client.
Definition connectionlistener.h:34
gloox::ConnectionListener::onConnect
virtual void onConnect()=0
gloox::ConnectionListener::~ConnectionListener
virtual ~ConnectionListener()
Definition connectionlistener.h:39
gloox::ConnectionListener::onDisconnect
virtual void onDisconnect(ConnectionError e)=0
gloox::ConnectionListener::onResourceBind
virtual void onResourceBind(const std::string &resource)
Definition connectionlistener.h:68
gloox::ConnectionListener::onTLSConnect
virtual bool onTLSConnect(const CertInfo &info)=0
gloox::ConnectionListener::onResourceBindError
virtual void onResourceBindError(const Error *error)
Definition connectionlistener.h:75
gloox::ConnectionListener::onStreamEvent
virtual void onStreamEvent(StreamEvent event)
Definition connectionlistener.h:100
gloox::ConnectionListener::onSessionCreateError
virtual void onSessionCreateError(const Error *error)
Definition connectionlistener.h:83
gloox::Error
A stanza error abstraction implemented as a StanzaExtension.
Definition error.h:35
gloox
The namespace for the gloox library.
Definition adhoc.cpp:28
gloox::ConnectionError
ConnectionError
Definition gloox.h:684
gloox::StreamEvent
StreamEvent
Definition gloox.h:653
gloox::CertInfo
Definition gloox.h:990