aboutsummaryrefslogtreecommitdiff
path: root/src/old/multilogchannel.h
diff options
context:
space:
mode:
authorMike Buland <eichlan@xagasoft.com>2007-04-03 03:49:53 +0000
committerMike Buland <eichlan@xagasoft.com>2007-04-03 03:49:53 +0000
commitf4c20290509d7ed3a8fd5304577e7a4cc0b9d974 (patch)
tree13cdf64f7cf134f397a7165b7a3fe0807e37026b /src/old/multilogchannel.h
parent74d4c8cd27334fc7204d5a8773deb3d424565778 (diff)
downloadlibbu++-f4c20290509d7ed3a8fd5304577e7a4cc0b9d974.tar.gz
libbu++-f4c20290509d7ed3a8fd5304577e7a4cc0b9d974.tar.bz2
libbu++-f4c20290509d7ed3a8fd5304577e7a4cc0b9d974.tar.xz
libbu++-f4c20290509d7ed3a8fd5304577e7a4cc0b9d974.zip
Ok, no code is left in src, it's all in src/old. We'll gradually move code back
into src as it's fixed and re-org'd. This includes tests, which, I may write a unit test system into libbu++ just to make my life easier.
Diffstat (limited to 'src/old/multilogchannel.h')
-rw-r--r--src/old/multilogchannel.h46
1 files changed, 46 insertions, 0 deletions
diff --git a/src/old/multilogchannel.h b/src/old/multilogchannel.h
new file mode 100644
index 0000000..d891a65
--- /dev/null
+++ b/src/old/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