]> git.stg.codes - stg.git/blob - tests/testusers.h
Fix test tariffs and users interface
[stg.git] / tests / testusers.h
1 #ifndef __TEST_USERS_H__
2 #define __TEST_USERS_H__
3
4 class TEST_USERS : public USERS {
5     public:
6         TEST_USERS() {}
7
8         int  FindByName(const std::string & /*login*/, USER_PTR * /*user*/)
9         { return -1; }
10
11         bool TariffInUse(const std::string & /*tariffName*/) const
12         { return -1; }
13
14         void AddNotifierUserAdd(NOTIFIER_BASE<USER_PTR> * /*notifier*/) {}
15         void DelNotifierUserAdd(NOTIFIER_BASE<USER_PTR> * /*notifier*/) {}
16
17         void AddNotifierUserDel(NOTIFIER_BASE<USER_PTR> * /*notifier*/) {}
18         void DelNotifierUserDel(NOTIFIER_BASE<USER_PTR> * /*notifier*/) {}
19
20         int  Add(const std::string & /*login*/, const ADMIN * /*admin*/)
21         { return 0; }
22         void Del(const std::string & /*login*/, const ADMIN * /*admin*/) {}
23
24         int  ReadUsers() { return 0; }
25         virtual size_t Count() const { return 0; };
26
27         int  FindByIPIdx(uint32_t /*ip*/, USER_PTR * /*user*/) const
28         { return -1; }
29         bool IsIPInIndex(uint32_t /*ip*/) const { return false; }
30
31         int  OpenSearch() { return 0; }
32         int  SearchNext(int /*handle*/, USER_PTR * /*u*/) { return -1; }
33         int  CloseSearch(int /*handle*/) { return 0; }
34
35         int  Start() { return 0; }
36         int  Stop() { return 0; }
37
38     private:
39 };
40
41 #endif