1 #ifndef __TEST_ADMIN_H__
2 #define __TEST_ADMIN_H__
6 class TEST_ADMIN : public STG::Admin {
8 TEST_ADMIN() : priv(0xffFF), ip(0) {}
10 const std::string & GetPassword() const override { return password; }
11 const std::string & GetLogin() const override { return login; }
12 STG::Priv const * GetPriv() const override { return &priv; }
13 uint32_t GetPrivAsInt() const override { return priv.toInt(); }
14 const STG::AdminConf & GetConf() const override { return conf; }
15 uint32_t GetIP() const override { return ip; }
16 std::string GetIPStr() const override { return inet_ntostring(ip); }
17 void SetIP(uint32_t ip) override { TEST_ADMIN::ip = ip; }
18 const std::string GetLogStr() const override { return ""; }