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 //-----------------------------------------------------------------------------
53 USER_CONF_RES & operator=(const USER_CONF & uc)
55 userdata.resize(USERDATA_NUM);
56 password = uc.password;
58 disabled = uc.disabled;
59 disabledDetailStat = uc.disabledDetailStat;
60 alwaysOnline = uc.alwaysOnline;
61 tariffName = uc.tariffName;
66 realName = uc.realName;
69 nextTariff = uc.nextTariff;
70 for (int i = 0; i < USERDATA_NUM; i++)
72 userdata[i] = uc.userdata[i];
74 creditExpire = uc.creditExpire;
78 USER_CONF GetData() const
81 uc.password = password.data();
82 uc.passive = passive.data();
83 uc.disabled = disabled.data();
84 uc.disabledDetailStat = disabledDetailStat.data();
85 uc.alwaysOnline = alwaysOnline.data();
86 uc.tariffName = tariffName.data();
87 uc.address = address.data();
88 uc.phone = phone.data();
89 uc.email = email.data();
90 uc.note = note.data();
91 uc.realName = realName.data();
92 uc.group = group.data();
93 uc.credit = credit.data();
94 uc.nextTariff = nextTariff.data();
95 for (int i = 0; i < USERDATA_NUM; i++)
97 uc.userdata[i] = userdata[i].data();
99 uc.creditExpire = creditExpire.data();
103 //-------------------------------------------------------------------------
105 RESETABLE<std::string> password;
106 RESETABLE<int> passive;
107 RESETABLE<int> disabled;
108 RESETABLE<int> disabledDetailStat;
109 RESETABLE<int> alwaysOnline;
110 RESETABLE<std::string> tariffName;
111 RESETABLE<std::string> address;
112 RESETABLE<std::string> phone;
113 RESETABLE<std::string> email;
114 RESETABLE<std::string> note;
115 RESETABLE<std::string> realName;
116 RESETABLE<std::string> group;
117 RESETABLE<double> credit;
118 RESETABLE<std::string> nextTariff;
119 std::vector<RESETABLE<std::string> > userdata;
120 RESETABLE<time_t> creditExpire;
121 RESETABLE<USER_IPS> ips;
123 //-----------------------------------------------------------------------------