From 0f7d406b3da99019403e76e7ca7686c14a583b3f Mon Sep 17 00:00:00 2001 From: Maxim Mamontov Date: Thu, 17 Mar 2011 12:43:46 +0200 Subject: [PATCH] Fix compilation issues for plugin and auth interfaces --- include/auth.h | 21 ++++++------------ include/plugin.h | 56 ++++++++++++++++++++++-------------------------- 2 files changed, 32 insertions(+), 45 deletions(-) diff --git a/include/auth.h b/include/auth.h index 55152def..c48dd7d0 100644 --- a/include/auth.h +++ b/include/auth.h @@ -23,25 +23,16 @@ $Date: 2009/03/18 17:24:57 $ */ -#ifndef BASE_AUTH_H -#define BASE_AUTH_H +#ifndef AUTH_H +#define AUTH_H -#include -#include - -#include "base_plugin.h" +#include "plugin.h" #include "stg_message.h" +#include "noncopyable.h" -using namespace std; - -//----------------------------------------------------------------------------- -class BASE_AUTH : public BASE_PLUGIN -{ +class AUTH : public PLUGIN, private NONCOPYABLE { public: - virtual ~BASE_AUTH() {}; virtual int SendMessage(const STG_MSG & msg, uint32_t ip) const = 0; }; -//----------------------------------------------------------------------------- -#endif - +#endif diff --git a/include/plugin.h b/include/plugin.h index 16dfa5fa..089202ba 100644 --- a/include/plugin.h +++ b/include/plugin.h @@ -25,47 +25,43 @@ */ -#ifndef BASE_PLUGIN_H -#define BASE_PLUGIN_H +#ifndef PLUGIN_H +#define PLUGIN_H #include -#include "base_settings.h" + #include "noncopyable.h" #include "os_int.h" +#include "admins.h" +#include "users.h" +#include "tariffs.h" -using namespace std; - -class ADMINS; -class USERS; -class TARIFFS; class TRAFFCOUNTER; class SETTINGS; class BASE_STORE; +class MODULE_SETTINGS; -//----------------------------------------------------------------------------- -class BASE_PLUGIN : private NONCOPYABLE +class PLUGIN : private NONCOPYABLE { public: - virtual ~BASE_PLUGIN(){}; - virtual void SetUsers(USERS * u) = 0; - virtual void SetTariffs(TARIFFS * t) = 0; - virtual void SetAdmins(ADMINS * a) = 0; - virtual void SetTraffcounter(TRAFFCOUNTER * tc) = 0; - virtual void SetStore(BASE_STORE * st) = 0; - virtual void SetStgSettings(const SETTINGS * s) = 0; - virtual void SetSettings(const MODULE_SETTINGS & s) = 0; - virtual int ParseSettings() = 0; + virtual ~PLUGIN() = 0; + virtual void SetUsers(USERS * u) = 0; + virtual void SetTariffs(TARIFFS * t) = 0; + virtual void SetAdmins(ADMINS * a) = 0; + virtual void SetTraffcounter(TRAFFCOUNTER * tc) = 0; + virtual void SetStore(BASE_STORE * st) = 0; + virtual void SetStgSettings(const SETTINGS * s) = 0; + virtual void SetSettings(const MODULE_SETTINGS & s) = 0; + virtual int ParseSettings() = 0; - virtual int Start() = 0; - virtual int Stop() = 0; - virtual int Reload() = 0; - virtual bool IsRunning() = 0; - virtual const string & GetStrError() const = 0; - virtual const string GetVersion() const = 0; - virtual uint16_t GetStartPosition() const = 0; - virtual uint16_t GetStopPosition() const = 0; + virtual int Start() = 0; + virtual int Stop() = 0; + virtual int Reload() = 0; + virtual bool IsRunning() = 0; + virtual const std::string & GetStrError() const = 0; + virtual const std::string GetVersion() const = 0; + virtual uint16_t GetStartPosition() const = 0; + virtual uint16_t GetStopPosition() const = 0; }; -//----------------------------------------------------------------------------- -#endif - +#endif -- 2.43.2