glooxd  0.3-svn
servereventhandler.h
1 /*
2  Copyright (c) 2009 by Jakob Schroeter <js@camaya.net>
3  This file is part of the glooxd library. http://camaya.net/glooxd
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 #ifndef SERVEREVENTHANDLER_H__
15 #define SERVEREVENTHANDLER_H__
16 
17 #include "macros.h"
18 
19 #include <gloox/jid.h>
20 
21 #include <string>
22 
23 namespace glooxd
24 {
25 
33  class GLOOXD_API ServerEventHandler
34  {
35  public:
39  virtual ~ServerEventHandler() {}
40 
52  virtual void handleC2SListening( bool yes ) { (void)yes; }
53 
65  virtual void handleS2SListening( bool yes ) { (void)yes; }
66 
76  virtual void handleClientConnected( const gloox::JID jid, const std::string localIP, int localPort,
77  const std::string remoteIP, int remotePort )
78  {
79  (void)jid;
80  (void)localIP;
81  (void)localPort;
82  (void)remoteIP;
83  (void)remotePort;
84  }
85 
95  virtual void handleClientDisconnected( const gloox::JID jid, gloox::ConnectionError e,
96  gloox::StreamError se )
97  {
98  (void)jid;
99  (void)e;
100  (void)se;
101  }
102 
103  };
104 
105 }
106 
107 #endif // SERVEREVENTHANDLER_H__