3 $Date: 2010/03/11 14:42:05 $
14 #include "resetable.h"
17 //-----------------------------------------------------------------------------
23 disabledDetailStat(0),
26 userdata(USERDATA_NUM),
33 int disabledDetailStat;
35 std::string tariffName;
42 std::vector<std::string> service;
45 std::string nextTariff;
46 std::vector<std::string> userdata;
50 //-----------------------------------------------------------------------------
54 : userdata(USERDATA_NUM)
56 USER_CONF_RES & operator=(const USER_CONF & uc)
58 userdata.resize(USERDATA_NUM);
59 password = uc.password;
61 disabled = uc.disabled;
62 disabledDetailStat = uc.disabledDetailStat;
63 alwaysOnline = uc.alwaysOnline;
64 tariffName = uc.tariffName;
69 realName = uc.realName;
72 nextTariff = uc.nextTariff;
73 for (int i = 0; i < USERDATA_NUM; i++)
75 userdata[i] = uc.userdata[i];
77 creditExpire = uc.creditExpire;
81 USER_CONF GetData() const
84 uc.password = password.data();
85 uc.passive = passive.data();
86 uc.disabled = disabled.data();
87 uc.disabledDetailStat = disabledDetailStat.data();
88 uc.alwaysOnline = alwaysOnline.data();
89 uc.tariffName = tariffName.data();
90 uc.address = address.data();
91 uc.phone = phone.data();
92 uc.email = email.data();
93 uc.note = note.data();
94 uc.realName = realName.data();
95 uc.group = group.data();
96 uc.credit = credit.data();
97 uc.nextTariff = nextTariff.data();
98 for (int i = 0; i < USERDATA_NUM; i++)
100 uc.userdata[i] = userdata[i].data();
102 uc.creditExpire = creditExpire.data();
106 //-------------------------------------------------------------------------
108 RESETABLE<std::string> password;
109 RESETABLE<int> passive;
110 RESETABLE<int> disabled;
111 RESETABLE<int> disabledDetailStat;
112 RESETABLE<int> alwaysOnline;
113 RESETABLE<std::string> tariffName;
114 RESETABLE<std::string> address;
115 RESETABLE<std::string> phone;
116 RESETABLE<std::string> email;
117 RESETABLE<std::string> note;
118 RESETABLE<std::string> realName;
119 RESETABLE<std::string> group;
120 RESETABLE<double> credit;
121 RESETABLE<std::string> nextTariff;
122 std::vector<RESETABLE<std::string> > userdata;
123 RESETABLE<time_t> creditExpire;
124 RESETABLE<USER_IPS> ips;
126 //-----------------------------------------------------------------------------