aboutsummaryrefslogtreecommitdiff
path: root/src/connectionmonitor.h
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/connectionmonitor.h41
1 files changed, 41 insertions, 0 deletions
diff --git a/src/connectionmonitor.h b/src/connectionmonitor.h
new file mode 100644
index 0000000..b96b533
--- /dev/null
+++ b/src/connectionmonitor.h
@@ -0,0 +1,41 @@
1/**@file
2 * Describes the ConnectionMonitor class.
3 */
4#ifndef CONNECTIONMONITOR_H
5#define CONNECTIONMONITOR_H
6
7#include "connection.h"
8
9/** Connection Monitor defines the base class of the objects that will be
10 * notified whenever a connection is created or destroyed.
11 *@author Mike Buland
12 */
13class ConnectionMonitor
14{
15public:
16 /**
17 * This is only here for completeness. It does nothing.
18 */
19 ConnectionMonitor();
20
21 /**
22 * This is only here for completeness. It does nothing.
23 */
24 virtual ~ConnectionMonitor();
25
26 /** Receives the notification that new connection was received.
27 *@param pCon The connection that was created.
28 *@returns Should return a true value if everything is OK, a false to
29 * force a shutdown.
30 */
31 virtual bool onNewConnection( Connection *pCon ) = 0;
32
33 /** Receives the notification that a connection was closed.
34 *@param pCon The connection that was closed.
35 *@returns Should return a true value if everything is OK, a false to
36 * force a shutdown.
37 */
38 virtual bool onClosedConnection( Connection *pCon ) = 0;
39};
40
41#endif