git.stg.codes
/
stg.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fixed issues in cap_pcap.
[stg.git]
/
projects
/
stargazer
/
plugin_runner.h
diff --git
a/projects/stargazer/plugin_runner.h
b/projects/stargazer/plugin_runner.h
index 2889300dab7fb432abf6eb96d69c76d1f8c61fb5..8e2272bfb1cf9ba84a9d08d3a4a8c1425c010310 100644
(file)
--- a/
projects/stargazer/plugin_runner.h
+++ b/
projects/stargazer/plugin_runner.h
@@
-26,29
+26,35
@@
#ifndef PLUGIN_RUNNER_H
#define PLUGIN_RUNNER_H
#ifndef PLUGIN_RUNNER_H
#define PLUGIN_RUNNER_H
-#include <pthread.h>
+
#include <string>
#include <string>
-#include "base_plugin.h"
-#include "base_settings.h"
-#include "traffcounter.h"
-#include "tariffs.h"
-#include "admins.h"
-#include "users.h"
+#include "stg/module_settings.h"
+#include "stg/plugin.h"
+#include "stg/os_int.h"
+
+class SETTINGS_IMPL;
+class ADMINS_IMPL;
+class TARIFFS_IMPL;
+class USERS_IMPL;
+class SERVICES_IMPL;
+class CORPORATIONS_IMPL;
+class TRAFFCOUNTER;
+class STORE;
-using namespace std;
//-----------------------------------------------------------------------------
//-----------------------------------------------------------------------------
-class PLUGIN_RUNNER
-{
+class PLUGIN_RUNNER {
public:
public:
- PLUGIN_RUNNER(const string & pluginFileName,
+ PLUGIN_RUNNER(const st
d::st
ring & pluginFileName,
const MODULE_SETTINGS & ms,
const MODULE_SETTINGS & ms,
- ADMINS * admins,
- TARIFFS * tariffs,
- USERS * users,
+ ADMINS_IMPL * admins,
+ TARIFFS_IMPL * tariffs,
+ USERS_IMPL * users,
+ SERVICES_IMPL * services,
+ CORPORATIONS_IMPL * corporations,
TRAFFCOUNTER * tc,
TRAFFCOUNTER * tc,
-
BASE_
STORE * store,
- const SETTINGS * s);
+ STORE * store,
+ const SETTINGS
_IMPL
* s);
PLUGIN_RUNNER(const PLUGIN_RUNNER & rvalue);
~PLUGIN_RUNNER();
PLUGIN_RUNNER(const PLUGIN_RUNNER & rvalue);
~PLUGIN_RUNNER();
@@
-60,36
+66,36
@@
public:
int Restart();
bool IsRunning();
int Restart();
bool IsRunning();
- const st
ring & GetStrError() const;
-
BASE_PLUGIN *
GetPlugin();
- const st
ring & GetFileName() const { return pluginFileName; };
+ const st
d::string & GetStrError() const { return errorStr; }
+
PLUGIN *
GetPlugin();
+ const st
d::string & GetFileName() const { return pluginFileName; }
int Load();
int Unload();
int Load();
int Unload();
- uint16_t GetStartPosition() const
;
- uint16_t GetStopPosition() const
;
+ uint16_t GetStartPosition() const
{ return plugin->GetStartPosition(); }
+ uint16_t GetStopPosition() const
{ return plugin->GetStopPosition(); }
private:
private:
- st
ring
pluginFileName;
- st
ring
pluginSettingFileName;
+ st
d::string
pluginFileName;
+ st
d::string
pluginSettingFileName;
-
BASE_PLUGIN *
plugin;
-
int
isPluginLoaded;
- st
ring
errorStr;
+
PLUGIN *
plugin;
+
bool
isPluginLoaded;
+ st
d::string
errorStr;
void * libHandle;
bool isRunning;
void * libHandle;
bool isRunning;
- ADMINS * admins;
- TARIFFS * tariffs;
- USERS * users;
- BASE_STORE * store;
+ ADMINS_IMPL * admins;
+ TARIFFS_IMPL * tariffs;
+ USERS_IMPL * users;
+ SERVICES_IMPL * services;
+ CORPORATIONS_IMPL * corps;
+ STORE * store;
TRAFFCOUNTER * traffCnt;
TRAFFCOUNTER * traffCnt;
- const SETTINGS * stgSettings;
+ const SETTINGS
_IMPL
* stgSettings;
MODULE_SETTINGS modSettings;
};
//-----------------------------------------------------------------------------
#endif //PLUGIN_RUNNER_H
MODULE_SETTINGS modSettings;
};
//-----------------------------------------------------------------------------
#endif //PLUGIN_RUNNER_H
-
-