gloox  1.0.16
connectiondatahandler.h
1 /*
2  Copyright (c) 2007-2015 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__
An abstract base class for a connection.
ConnectionError
Definition: gloox.h:679
This is an abstract base class to receive events from a ConnectionBase-derived object.
The namespace for the gloox library.
Definition: adhoc.cpp:27