summaryrefslogtreecommitdiff
path: root/src/multilogchannel.h
diff options
context:
space:
mode:
authorMike Buland <eichlan@xagasoft.com>2006-05-01 17:11:04 +0000
committerMike Buland <eichlan@xagasoft.com>2006-05-01 17:11:04 +0000
commitf7a9549bd6ad83f2e0bceec9cddacfa5e3f84a54 (patch)
tree53cec4864776e07950e3c72f2a990a1017d08045 /src/multilogchannel.h
downloadlibbu++-f7a9549bd6ad83f2e0bceec9cddacfa5e3f84a54.tar.gz
libbu++-f7a9549bd6ad83f2e0bceec9cddacfa5e3f84a54.tar.bz2
libbu++-f7a9549bd6ad83f2e0bceec9cddacfa5e3f84a54.tar.xz
libbu++-f7a9549bd6ad83f2e0bceec9cddacfa5e3f84a54.zip
libbu++ is finally laid out the way it should be, trunk, branches, and tags.
Diffstat (limited to 'src/multilogchannel.h')
-rw-r--r--src/multilogchannel.h46
1 files changed, 46 insertions, 0 deletions
diff --git a/src/multilogchannel.h b/src/multilogchannel.h
new file mode 100644
index 0000000..d891a65
--- /dev/null
+++ b/src/multilogchannel.h
@@ -0,0 +1,46 @@
1#ifndef MULTILOGCHANNEL_H
2#define MULTILOGCHANNEL_H
3
4#include "multilog.h"
5
6/**
7 * The baseclass for any MultiLog output channel. Any class that implements
8 * all of these functions can be put in the log chain and will be sent
9 * messages from active MultiLoggers.
10 *@author Mike Buland
11 */
12class MultiLogChannel
13{
14public:
15 /**
16 * Deconstruct a MultiLogChannel.
17 */
18 virtual ~MultiLogChannel() {};
19
20 /**
21 * Should perform any operations that need to take place in order to start
22 * the output of data into this channel. This will be called once by the
23 * MultiLog when the MultiLogChannel is registered.
24 *@returns True means that everything can go as planned. False means that
25 * the MultiLog should remove this channel from the list and delete it.
26 */
27 virtual bool openLog() = 0;
28
29 /**
30 * Should append a log entry to the long, by whatever means are necesarry.
31 *@param pEntry The LogEntry to append.
32 *@returns True means that everything can go as planned. False means that
33 * the MultiLog should remove this channel from the list and delete it.
34 */
35 virtual bool append( MultiLog::LogEntry *pEntry ) = 0;
36
37 /**
38 * Should perform any operations that need to take place in order to safely
39 * close and cleanup the log.
40 *@returns True means that everything can go as planned. False means that
41 * the MultiLog should remove this channel from the list and delete it.
42 */
43 virtual bool closeLog() = 0;
44};
45
46#endif