00001
00002
00003
00004
00005
00006
00007
00008
00009
00010 #ifndef __PLUGIN_H
00011 #define __PLUGIN_H
00012
00013 #include <string>
00014
00015 #include <Common.h>
00016 #include <Config.h>
00017 #include <Error.h>
00018
00019 class StrongroomCore;
00020
00021 using namespace std;
00022
00026 class Plugin
00027 {
00028 public:
00033 Plugin( const Config &cfg );
00034
00038 virtual ~Plugin() = 0;
00039
00043 Config &config();
00044
00048 virtual bool init() = 0;
00049
00053 bool attachCore( StrongroomCore *core );
00054
00058 void log( const string &msg, int level=0 );
00059
00060 private:
00061 Config cfg;
00062
00063 protected:
00065 StrongroomCore *core;
00066
00067 };
00068
00069 #endif