3 $Date: 2010/03/11 14:42:05 $
14 #include "resetable.h"
17 //-----------------------------------------------------------------------------
24 disabledDetailStat(0),
37 userdata(USERDATA_NUM),
45 int disabledDetailStat;
47 std::string tariffName;
54 std::vector<std::string> service;
57 std::string nextTariff;
58 std::vector<std::string> userdata;
62 //-----------------------------------------------------------------------------
80 userdata(USERDATA_NUM),
86 USER_CONF_RES & operator=(const USER_CONF & uc)
88 userdata.resize(USERDATA_NUM);
89 password = uc.password;
91 disabled = uc.disabled;
92 disabledDetailStat = uc.disabledDetailStat;
93 alwaysOnline = uc.alwaysOnline;
94 tariffName = uc.tariffName;
99 realName = uc.realName;
102 nextTariff = uc.nextTariff;
103 for (size_t i = 0; i < USERDATA_NUM; i++) userdata[i] = uc.userdata[i];
104 creditExpire = uc.creditExpire;
108 USER_CONF GetData() const
111 uc.password = password.data();
112 uc.passive = passive.data();
113 uc.disabled = disabled.data();
114 uc.disabledDetailStat = disabledDetailStat.data();
115 uc.alwaysOnline = alwaysOnline.data();
116 uc.tariffName = tariffName.data();
117 uc.address = address.data();
118 uc.phone = phone.data();
119 uc.email = email.data();
120 uc.note = note.data();
121 uc.realName = realName.data();
122 uc.group = group.data();
123 uc.credit = credit.data();
124 uc.nextTariff = nextTariff.data();
125 for (int i = 0; i < USERDATA_NUM; i++)
127 uc.userdata[i] = userdata[i].data();
129 uc.creditExpire = creditExpire.data();
133 //-------------------------------------------------------------------------
135 RESETABLE<std::string> password;
136 RESETABLE<int> passive;
137 RESETABLE<int> disabled;
138 RESETABLE<int> disabledDetailStat;
139 RESETABLE<int> alwaysOnline;
140 RESETABLE<std::string> tariffName;
141 RESETABLE<std::string> address;
142 RESETABLE<std::string> phone;
143 RESETABLE<std::string> email;
144 RESETABLE<std::string> note;
145 RESETABLE<std::string> realName;
146 RESETABLE<std::string> group;
147 RESETABLE<double> credit;
148 RESETABLE<std::string> nextTariff;
149 std::vector<RESETABLE<std::string> > userdata;
150 RESETABLE<time_t> creditExpire;
151 RESETABLE<USER_IPS> ips;
153 //-----------------------------------------------------------------------------