]> git.stg.codes - stg.git/blob - tests/testusers.h
Fixes due to changes in API.
[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         int  FindByName(const std::string & /*login*/, CONST_USER_PTR * /*user*/) const
11         { return -1; }
12
13         bool TariffInUse(const std::string & /*tariffName*/) const
14         { return -1; }
15
16         void AddNotifierUserAdd(NOTIFIER_BASE<USER_PTR> * /*notifier*/) {}
17         void DelNotifierUserAdd(NOTIFIER_BASE<USER_PTR> * /*notifier*/) {}
18
19         void AddNotifierUserDel(NOTIFIER_BASE<USER_PTR> * /*notifier*/) {}
20         void DelNotifierUserDel(NOTIFIER_BASE<USER_PTR> * /*notifier*/) {}
21
22         int  Add(const std::string & /*login*/, const ADMIN * /*admin*/)
23         { return 0; }
24         void Del(const std::string & /*login*/, const ADMIN * /*admin*/) {}
25
26         bool Authorize(const std::string &, uint32_t, uint32_t, const AUTH *)
27         { return false; }
28         bool Unauthorize(const std::string &, const AUTH *, const std::string &)
29         { return false; }
30
31         int  ReadUsers() { return 0; }
32         virtual size_t Count() const { return 0; };
33
34         int  FindByIPIdx(uint32_t /*ip*/, USER_PTR * /*user*/) const
35         { return -1; }
36         bool IsIPInIndex(uint32_t /*ip*/) const { return false; }
37         bool IsIPInUse(uint32_t, const std::string &, CONST_USER_PTR *) const { return false; }
38         bool Exists(const std::string &) const { return false; }
39
40         int  OpenSearch() { return 0; }
41         int  SearchNext(int /*handle*/, USER_PTR * /*u*/) { return -1; }
42         int  CloseSearch(int /*handle*/) { return 0; }
43
44         int  Start() { return 0; }
45         int  Stop() { return 0; }
46
47     private:
48 };
49
50 #endif