gloox  1.0.24
connectiondatahandler.h
1 /*
2  Copyright (c) 2007-2019 by Jakob Schröter <js@camaya.net>
3  This file is part of the gloox library. http://camaya.net/gloox
4 
5  This software is distributed under a license. The full license
6  agreement can be found in the file LICENSE in this distribution.
7  This software may not be copied, modified, sold or distributed
8  other than expressed in the named license agreement.
9 
10  This software is distributed without any warranty.
11 */
12 
13 
14 
15 #ifndef CONNECTIONDATAHANDLER_H__
16 #define CONNECTIONDATAHANDLER_H__
17 
18 #include "gloox.h"
19 
20 #include <string>
21 
22 namespace gloox
23 {
24 
25  class ConnectionBase;
26 
35  class GLOOX_API ConnectionDataHandler
36  {
37  public:
42 
48  virtual void handleReceivedData( const ConnectionBase* connection, const std::string& data ) = 0;
49 
54  virtual void handleConnect( const ConnectionBase* connection ) = 0;
55 
61  virtual void handleDisconnect( const ConnectionBase* connection, ConnectionError reason ) = 0;
62  };
63 
64 }
65 
66 #endif // CONNECTIONDATAHANDLER_H__
gloox::ConnectionDataHandler
This is an abstract base class to receive events from a ConnectionBase-derived object.
Definition: connectiondatahandler.h:36
gloox::ConnectionDataHandler::handleConnect
virtual void handleConnect(const ConnectionBase *connection)=0
gloox::ConnectionDataHandler::~ConnectionDataHandler
virtual ~ConnectionDataHandler()
Definition: connectiondatahandler.h:41
gloox
The namespace for the gloox library.
Definition: adhoc.cpp:28
gloox::ConnectionBase
An abstract base class for a connection.
Definition: connectionbase.h:35
gloox::ConnectionDataHandler::handleDisconnect
virtual void handleDisconnect(const ConnectionBase *connection, ConnectionError reason)=0
gloox::ConnectionError
ConnectionError
Definition: gloox.h:684
gloox::ConnectionDataHandler::handleReceivedData
virtual void handleReceivedData(const ConnectionBase *connection, const std::string &data)=0