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> services;
57 std::string nextTariff;
58 std::vector<std::string> userdata;
62 //-----------------------------------------------------------------------------
81 userdata(USERDATA_NUM),
88 USER_CONF_RES & operator=(const USER_CONF & uc)
90 userdata.resize(USERDATA_NUM);
91 password = uc.password;
93 disabled = uc.disabled;
94 disabledDetailStat = uc.disabledDetailStat;
95 alwaysOnline = uc.alwaysOnline;
96 tariffName = uc.tariffName;
101 realName = uc.realName;
105 nextTariff = uc.nextTariff;
106 for (size_t i = 0; i < USERDATA_NUM; i++) userdata[i] = uc.userdata[i];
107 services = uc.services;
108 creditExpire = uc.creditExpire;
112 USER_CONF GetData() const
115 uc.password = password.data();
116 uc.passive = passive.data();
117 uc.disabled = disabled.data();
118 uc.disabledDetailStat = disabledDetailStat.data();
119 uc.alwaysOnline = alwaysOnline.data();
120 uc.tariffName = tariffName.data();
121 uc.address = address.data();
122 uc.phone = phone.data();
123 uc.email = email.data();
124 uc.note = note.data();
125 uc.realName = realName.data();
126 uc.corp = corp.data();
127 uc.group = group.data();
128 uc.credit = credit.data();
129 uc.nextTariff = nextTariff.data();
130 for (size_t i = 0; i < USERDATA_NUM; i++)
132 uc.userdata[i] = userdata[i].data();
134 uc.services = services.data();
135 uc.creditExpire = creditExpire.data();
139 //-------------------------------------------------------------------------
141 RESETABLE<std::string> password;
142 RESETABLE<int> passive;
143 RESETABLE<int> disabled;
144 RESETABLE<int> disabledDetailStat;
145 RESETABLE<int> alwaysOnline;
146 RESETABLE<std::string> tariffName;
147 RESETABLE<std::string> address;
148 RESETABLE<std::string> phone;
149 RESETABLE<std::string> email;
150 RESETABLE<std::string> note;
151 RESETABLE<std::string> realName;
152 RESETABLE<std::string> corp;
153 RESETABLE<std::string> group;
154 RESETABLE<double> credit;
155 RESETABLE<std::string> nextTariff;
156 std::vector<RESETABLE<std::string> > userdata;
157 RESETABLE<std::vector<std::string> > services;
158 RESETABLE<time_t> creditExpire;
159 RESETABLE<USER_IPS> ips;
161 //-----------------------------------------------------------------------------