class ADMIN {
public:
- virtual const std::string & GetPassword() const = 0;
- virtual const std::string & GetLogin() const = 0;
- virtual PRIV const * GetPriv() const = 0;
- virtual uint16_t GetPrivAsInt() const = 0;
- virtual const ADMIN_CONF & GetConf() const = 0;
- virtual uint32_t GetIP() const = 0;
- virtual std::string GetIPStr() const = 0;
- virtual void SetIP(uint32_t ip) = 0;
- virtual const std::string GetLogStr() const = 0;
+ virtual ~ADMIN() {}
+ virtual const std::string & GetPassword() const = 0;
+ virtual const std::string & GetLogin() const = 0;
+ virtual PRIV const * GetPriv() const = 0;
+ virtual uint16_t GetPrivAsInt() const = 0;
+ virtual const ADMIN_CONF & GetConf() const = 0;
+ virtual uint32_t GetIP() const = 0;
+ virtual std::string GetIPStr() const = 0;
+ virtual void SetIP(uint32_t ip) = 0;
+ virtual const std::string GetLogStr() const = 0;
};
#endif
class ADMINS {
public:
+ virtual ~ADMINS() {}
virtual int Add(const std::string & login, const ADMIN * admin) = 0;
virtual int Del(const std::string & login, const ADMIN * admin) = 0;
virtual int Change(const ADMIN_CONF & ac, const ADMIN * admin) = 0;
class CORPORATIONS {
public:
+ virtual ~CORPORATIONS() {}
virtual int Add(const CORP_CONF & corp, const ADMIN * admin) = 0;
virtual int Del(const std::string & name, const ADMIN * admin) = 0;
virtual int Change(const CORP_CONF & corp, const ADMIN * admin) = 0;
showTime(0),
repeat(0),
repeatPeriod(0)
-{};
+{}
uint64_t id;
unsigned ver;
//-----------------------------------------------------------------------------
struct STG_MSG
{
-STG_MSG() {};
+STG_MSG() : header(), text() {}
time_t GetNextSendTime() const
{
return header.lastSendTime + header.repeat * 60;
-};
+}
STG_MSG_HDR header;
std::string text;
class PLUGIN : private NONCOPYABLE {
public:
+ virtual ~PLUGIN() {}
virtual void SetUsers(USERS *) {}
virtual void SetTariffs(TARIFFS *) {}
virtual void SetAdmins(ADMINS *) {}
class SERVICES {
public:
+ virtual ~SERVICES() {}
virtual int Add(const SERVICE_CONF & service, const ADMIN * admin) = 0;
virtual int Del(const std::string & name, const ADMIN * admin) = 0;
virtual int Change(const SERVICE_CONF & service, const ADMIN * admin) = 0;
//-----------------------------------------------------------------------------
class STORE {
public:
+ virtual ~STORE() {}
virtual int GetUsersList(std::vector<std::string> * usersList) const = 0;
virtual int AddUser(const std::string & login) const = 0;
virtual int DelUser(const std::string & login) const = 0;
class TARIFF {
public:
+ virtual ~TARIFF() {}
virtual double GetPriceWithTraffType(uint64_t up,
uint64_t down,
int dir,
class TARIFFS {
public:
+ virtual ~TARIFFS() {}
virtual int ReadTariffs () = 0;
virtual const TARIFF * FindByName(const std::string & name) const = 0;
virtual const TARIFF * GetNoTariff() const = 0;
class USER {
public:
+ virtual ~USER() {}
virtual int WriteConf() = 0;
virtual int WriteStat() = 0;
class USERS {
public:
+ virtual ~USERS() {}
virtual int FindByName(const std::string & login, USER_PTR * user) = 0;
virtual bool TariffInUse(const std::string & tariffName) const = 0;