X-Git-Url: https://git.stg.codes/stg.git/blobdiff_plain/19ad06653de8ff5946a2ef1d577cf42217b2e3e3..2ecac495e165f5247a5e33669588a4ca8c2e8266:/projects/stargazer/plugins/store/files/file_store.h diff --git a/projects/stargazer/plugins/store/files/file_store.h b/projects/stargazer/plugins/store/files/file_store.h index 91fb7fa8..2fe41326 100644 --- a/projects/stargazer/plugins/store/files/file_store.h +++ b/projects/stargazer/plugins/store/files/file_store.h @@ -37,9 +37,8 @@ #include "stg/store.h" #include "stg/conffiles.h" #include "stg/user_traff.h" +#include "stg/logger.h" -//----------------------------------------------------------------------------- -extern "C" STORE * GetStore(); //----------------------------------------------------------------------------- class FILES_STORE_SETTINGS { public: @@ -51,6 +50,7 @@ public: std::string GetUsersDir() const { return usersDir; } std::string GetAdminsDir() const { return adminsDir; } std::string GetTariffsDir() const { return tariffsDir; } + std::string GetServicesDir() const { return servicesDir; } mode_t GetStatMode() const { return statMode; } mode_t GetStatModeDir() const; @@ -89,6 +89,7 @@ private: std::string usersDir; std::string adminsDir; std::string tariffsDir; + std::string servicesDir; mode_t statMode; uid_t statUID; @@ -176,11 +177,11 @@ public: virtual int DelCorp(const std::string &) const { return 0; } // Services - virtual int GetServicesList(std::vector *) const { return 0; } - virtual int SaveService(const SERVICE_CONF &) const { return 0; } - virtual int RestoreService(SERVICE_CONF *, const std::string &) const { return 0; } - virtual int AddService(const std::string &) const { return 0; } - virtual int DelService(const std::string &) const { return 0; } + virtual int GetServicesList(std::vector *) const; + virtual int SaveService(const SERVICE_CONF &) const; + virtual int RestoreService(SERVICE_CONF *, const std::string &) const; + virtual int AddService(const std::string &) const; + virtual int DelService(const std::string &) const; virtual void SetSettings(const MODULE_SETTINGS & s) { settings = s; } virtual int ParseSettings(); @@ -198,11 +199,13 @@ private: int RemoveDir(const char * path) const; int Touch(const std::string & path) const; - mutable string errorStr; + mutable std::string errorStr; std::string version; FILES_STORE_SETTINGS storeSettings; MODULE_SETTINGS settings; mutable pthread_mutex_t mutex; + + PLUGIN_LOGGER logger; }; //-----------------------------------------------------------------------------