8 #define ADM_LOGIN_LEN (32)
9 #define ADM_PASSWD_LEN (32)
16 Priv() noexcept : Priv(0) {}
17 explicit Priv(uint32_t p) noexcept
18 : userStat((p & 0x00000003) >> 0x00),
19 userConf((p & 0x0000000C) >> 0x02),
20 userCash((p & 0x00000030) >> 0x04),
21 userPasswd((p & 0x000000C0) >> 0x06),
22 userAddDel((p & 0x00000300) >> 0x08),
23 adminChg((p & 0x00000C00) >> 0x0A),
24 tariffChg((p & 0x00003000) >> 0x0C),
25 serviceChg((p & 0x0000C000) >> 0x0E),
26 corpChg((p & 0x00030000) >> 0x10)
29 Priv(const Priv&) = default;
30 Priv& operator=(const Priv&) = default;
31 Priv(Priv&&) = default;
32 Priv& operator=(Priv&&) = default;
34 uint32_t toInt() const noexcept
36 uint32_t p = (userStat << 0) |
58 //-----------------------------------------------------------------------------
61 AdminConf() : AdminConf({}, {}, "* NO PASSWORD *") {}
62 AdminConf(const Priv& pr, const std::string& l, const std::string& p)
68 AdminConf(const AdminConf&) = default;
69 AdminConf& operator=(const AdminConf&) = default;
70 AdminConf(AdminConf&&) = default;
71 AdminConf& operator=(AdminConf&&) = default;
77 //-----------------------------------------------------------------------------
80 std::optional<Priv> priv;
81 std::optional<std::string> login;
82 std::optional<std::string> password;