3 #include "stg/optional.h"
9 #define ADM_LOGIN_LEN (32)
10 #define ADM_PASSWD_LEN (32)
28 explicit Priv(uint32_t p) noexcept
29 : userStat((p & 0x00000003) >> 0x00),
30 userConf((p & 0x0000000C) >> 0x02),
31 userCash((p & 0x00000030) >> 0x04),
32 userPasswd((p & 0x000000C0) >> 0x06),
33 userAddDel((p & 0x00000300) >> 0x08),
34 adminChg((p & 0x00000C00) >> 0x0A),
35 tariffChg((p & 0x00003000) >> 0x0C),
36 serviceChg((p & 0x0000C000) >> 0x0E),
37 corpChg((p & 0x00030000) >> 0x10)
40 Priv(const Priv&) = default;
41 Priv& operator=(const Priv&) = default;
42 Priv(Priv&&) = default;
43 Priv& operator=(Priv&&) = default;
45 uint32_t toInt() const noexcept
47 uint32_t p = (userStat << 0) |
69 //-----------------------------------------------------------------------------
73 : password("* NO PASSWORD *")
75 AdminConf(const Priv & pr, const std::string & l, const std::string & p)
81 AdminConf(const AdminConf&) = default;
82 AdminConf& operator=(const AdminConf&) = default;
83 AdminConf(AdminConf&&) = default;
84 AdminConf& operator=(AdminConf&&) = default;
90 //-----------------------------------------------------------------------------
94 Optional<std::string> login;
95 Optional<std::string> password;