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, RESETABLE<std::string>()),
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 (int i = 0; i < USERDATA_NUM; i++)
105 userdata[i] = uc.userdata[i];
107 creditExpire = uc.creditExpire;
111 USER_CONF GetData() const
114 uc.password = password.data();
115 uc.passive = passive.data();
116 uc.disabled = disabled.data();
117 uc.disabledDetailStat = disabledDetailStat.data();
118 uc.alwaysOnline = alwaysOnline.data();
119 uc.tariffName = tariffName.data();
120 uc.address = address.data();
121 uc.phone = phone.data();
122 uc.email = email.data();
123 uc.note = note.data();
124 uc.realName = realName.data();
125 uc.group = group.data();
126 uc.credit = credit.data();
127 uc.nextTariff = nextTariff.data();
128 for (int i = 0; i < USERDATA_NUM; i++)
130 uc.userdata[i] = userdata[i].data();
132 uc.creditExpire = creditExpire.data();
136 //-------------------------------------------------------------------------
138 RESETABLE<std::string> password;
139 RESETABLE<int> passive;
140 RESETABLE<int> disabled;
141 RESETABLE<int> disabledDetailStat;
142 RESETABLE<int> alwaysOnline;
143 RESETABLE<std::string> tariffName;
144 RESETABLE<std::string> address;
145 RESETABLE<std::string> phone;
146 RESETABLE<std::string> email;
147 RESETABLE<std::string> note;
148 RESETABLE<std::string> realName;
149 RESETABLE<std::string> group;
150 RESETABLE<double> credit;
151 RESETABLE<std::string> nextTariff;
152 std::vector<RESETABLE<std::string> > userdata;
153 RESETABLE<time_t> creditExpire;
154 RESETABLE<USER_IPS> ips;
156 //-----------------------------------------------------------------------------