]> git.stg.codes - stg.git/blob - tests/testauth.h
Start replacing notifiers with subscriptions.
[stg.git] / tests / testauth.h
1 #pragma once
2
3 #include "stg/auth.h"
4
5 class TestAuth : public STG::Auth
6 {
7     public:
8         TestAuth() {}
9
10         void SetUsers(STG::Users* /*u*/) override {}
11         void SetTariffs(STG::Tariffs* /*t*/) override {}
12         void SetAdmins(STG::Admins* /*a*/) override {}
13         void SetTraffcounter(STG::TraffCounter* /*tc*/) override {}
14         void SetStore(STG::Store* /*st*/) override {}
15         void SetStgSettings(const STG::Settings* /*s*/) override {}
16         void SetSettings(const STG::ModuleSettings& /*s*/) override {}
17         int ParseSettings() override { return 0; }
18
19         int Start() override { return 0; }
20         int Stop() override { return 0; }
21         int Reload(const STG::ModuleSettings&) override { return 0; }
22         bool IsRunning() override { return true; }
23         const std::string& GetStrError() const override { return m_errorStr; }
24         std::string GetVersion() const override { return ""; }
25         uint16_t GetStartPosition() const override { return 0; }
26         uint16_t GetStopPosition() const override { return 0; }
27
28         int SendMessage(const STG::Message& /*msg*/, uint32_t /*ip*/) const override { return 0; }
29
30     private:
31         std::string m_errorStr;
32 };