X-Git-Url: https://git.stg.codes/stg.git/blobdiff_plain/7c89c05d7fb37ff6cd90eeab811ef812c03218ec..4c030cdad118fd574774f0fd00313e0042401c7c:/projects/stargazer/plugins/store/firebird/firebird_store.h diff --git a/projects/stargazer/plugins/store/firebird/firebird_store.h b/projects/stargazer/plugins/store/firebird/firebird_store.h index 58054cba..638067f2 100644 --- a/projects/stargazer/plugins/store/firebird/firebird_store.h +++ b/projects/stargazer/plugins/store/firebird/firebird_store.h @@ -32,18 +32,16 @@ #include #include #include -#include #include "stg/store.h" #include "stg/locker.h" #include "stg/ibpp.h" +#include "stg/logger.h" struct ToLower { - char operator() (char c) const { return std::tolower(c); } + char operator() (char c) const { return static_cast(std::tolower(c)); } }; -extern "C" STORE * GetStore(); - class FIREBIRD_STORE : public STORE { public: FIREBIRD_STORE(); @@ -92,7 +90,7 @@ public: int GetTariffsList(std::vector * tariffsList) const; int AddTariff(const std::string & name) const; - int DelTariff(const string & name) const; + int DelTariff(const std::string & name) const; int SaveTariff(const TARIFF_DATA & td, const std::string & tariffName) const; int RestoreTariff(TARIFF_DATA * td, const std::string & tariffName) const; @@ -102,12 +100,12 @@ public: int AddCorp(const std::string & name) const; int DelCorp(const std::string & name) const; - inline void SetSettings(const MODULE_SETTINGS & s) { settings = s; }; + inline void SetSettings(const MODULE_SETTINGS & s) { settings = s; } int ParseSettings(); - inline const string & GetStrError() const { return strError; }; + inline const std::string & GetStrError() const { return strError; } - inline const string & GetVersion() const { return version; }; + inline const std::string & GetVersion() const { return version; } int GetServicesList(std::vector * servicesList) const; int SaveService(const SERVICE_CONF & sc) const; @@ -121,12 +119,13 @@ private: std::string version; mutable std::string strError; - mutable std::string db_server, db_database, db_user, db_password; + std::string db_server, db_database, db_user, db_password; MODULE_SETTINGS settings; mutable IBPP::Database db; mutable pthread_mutex_t mutex; - mutable IBPP::TIL til; - mutable IBPP::TLR tlr; + IBPP::TIL til; + IBPP::TLR tlr; + PLUGIN_LOGGER logger; int SaveStat(const USER_STAT & stat, const std::string & login, int year = 0, int month = 0) const; };