5 struct TestUsers : public STG::Users
9 using UserPtr = STG::User*;
10 using ConstUserPtr = const STG::User*;
12 int FindByName(const std::string& /*login*/, UserPtr* /*user*/) override
14 int FindByName(const std::string& /*login*/, ConstUserPtr* /*user*/) const override
17 bool TariffInUse(const std::string& /*tariffName*/) const override
20 int Add(const std::string& /*login*/, const STG::Admin* /*admin*/) override
22 void Del(const std::string& /*login*/, const STG::Admin* /*admin*/) override {}
24 bool Authorize(const std::string&, uint32_t, uint32_t, const STG::Auth*) override
26 bool Unauthorize(const std::string&, const STG::Auth*, const std::string&) override
29 int ReadUsers() override { return 0; }
30 virtual size_t Count() const override { return 0; };
32 int FindByIPIdx(uint32_t /*ip*/, UserPtr* /*user*/) const override
34 bool IsIPInIndex(uint32_t /*ip*/) const override { return false; }
35 bool IsIPInUse(uint32_t, const std::string&, ConstUserPtr*) const override { return false; }
36 bool Exists(const std::string&) const override { return false; }
38 unsigned int OpenSearch() override { return 0; }
39 int SearchNext(int /*handle*/, UserPtr* /*u*/) override { return -1; }
40 int CloseSearch(int /*handle*/) override { return 0; }
42 int Start() override { return 0; }
43 int Stop() override { return 0; }