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> services;
45 std::string nextTariff;
46 std::vector<std::string> userdata;
50 //-----------------------------------------------------------------------------
57 USER_CONF_RES & operator=(const USER_CONF & uc)
59 userdata.resize(USERDATA_NUM);
60 password = uc.password;
62 disabled = uc.disabled;
63 disabledDetailStat = uc.disabledDetailStat;
64 alwaysOnline = uc.alwaysOnline;
65 tariffName = uc.tariffName;
70 realName = uc.realName;
74 nextTariff = uc.nextTariff;
75 for (size_t i = 0; i < USERDATA_NUM; i++) userdata[i] = uc.userdata[i];
76 services = uc.services;
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.corp = corp.data();
96 uc.group = group.data();
97 uc.credit = credit.data();
98 uc.nextTariff = nextTariff.data();
99 for (size_t i = 0; i < USERDATA_NUM; i++)
101 uc.userdata[i] = userdata[i].data();
103 uc.services = services.data();
104 uc.creditExpire = creditExpire.data();
108 //-------------------------------------------------------------------------
110 RESETABLE<std::string> password;
111 RESETABLE<int> passive;
112 RESETABLE<int> disabled;
113 RESETABLE<int> disabledDetailStat;
114 RESETABLE<int> alwaysOnline;
115 RESETABLE<std::string> tariffName;
116 RESETABLE<std::string> address;
117 RESETABLE<std::string> phone;
118 RESETABLE<std::string> email;
119 RESETABLE<std::string> note;
120 RESETABLE<std::string> realName;
121 RESETABLE<std::string> corp;
122 RESETABLE<std::string> group;
123 RESETABLE<double> credit;
124 RESETABLE<std::string> nextTariff;
125 std::vector<RESETABLE<std::string> > userdata;
126 RESETABLE<std::vector<std::string> > services;
127 RESETABLE<time_t> creditExpire;
128 RESETABLE<USER_IPS> ips;
130 //-----------------------------------------------------------------------------