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 //-----------------------------------------------------------------------------
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;
73 nextTariff = uc.nextTariff;
74 for (size_t i = 0; i < USERDATA_NUM; i++) userdata[i] = uc.userdata[i];
75 services = uc.services;
76 creditExpire = uc.creditExpire;
80 USER_CONF GetData() const
83 uc.password = password.data();
84 uc.passive = passive.data();
85 uc.disabled = disabled.data();
86 uc.disabledDetailStat = disabledDetailStat.data();
87 uc.alwaysOnline = alwaysOnline.data();
88 uc.tariffName = tariffName.data();
89 uc.address = address.data();
90 uc.phone = phone.data();
91 uc.email = email.data();
92 uc.note = note.data();
93 uc.realName = realName.data();
94 uc.corp = corp.data();
95 uc.group = group.data();
96 uc.credit = credit.data();
97 uc.nextTariff = nextTariff.data();
98 for (size_t i = 0; i < USERDATA_NUM; i++)
100 uc.userdata[i] = userdata[i].data();
102 uc.services = services.data();
103 uc.creditExpire = creditExpire.data();
107 //-------------------------------------------------------------------------
109 RESETABLE<std::string> password;
110 RESETABLE<int> passive;
111 RESETABLE<int> disabled;
112 RESETABLE<int> disabledDetailStat;
113 RESETABLE<int> alwaysOnline;
114 RESETABLE<std::string> tariffName;
115 RESETABLE<std::string> address;
116 RESETABLE<std::string> phone;
117 RESETABLE<std::string> email;
118 RESETABLE<std::string> note;
119 RESETABLE<std::string> realName;
120 RESETABLE<std::string> corp;
121 RESETABLE<std::string> group;
122 RESETABLE<double> credit;
123 RESETABLE<std::string> nextTariff;
124 std::vector<RESETABLE<std::string> > userdata;
125 RESETABLE<std::vector<std::string> > services;
126 RESETABLE<time_t> creditExpire;
127 RESETABLE<USER_IPS> ips;
129 //-----------------------------------------------------------------------------