class TARIFFS;
class ADMIN;
class USER_IMPL;
+class SETTINGS_IMPL;
//-----------------------------------------------------------------------------
class USER_ID_GENERATOR {
friend class USER_IMPL;
friend class CHG_CASH_NOTIFIER;
friend class CHG_IP_NOTIFIER;
public:
- USER_IMPL(const SETTINGS * settings,
+ USER_IMPL(const SETTINGS_IMPL * settings,
const STORE * store,
const TARIFFS * tariffs,
const ADMIN * sysAdmin,
void AddCurrIPAfterNotifier(PROPERTY_NOTIFIER_BASE<uint32_t> *);
void DelCurrIPAfterNotifier(PROPERTY_NOTIFIER_BASE<uint32_t> *);
+ void AddConnectedBeforeNotifier(PROPERTY_NOTIFIER_BASE<bool> *);
+ void DelConnectedBeforeNotifier(PROPERTY_NOTIFIER_BASE<bool> *);
+
+ void AddConnectedAfterNotifier(PROPERTY_NOTIFIER_BASE<bool> *);
+ void DelConnectedAfterNotifier(PROPERTY_NOTIFIER_BASE<bool> *);
+
int GetID() const { return id; }
double GetPassiveTimePart() const;
USER_ID_GENERATOR userIDGenerator;
- uint32_t __currIP; // ôÅËÕÝÉÊ ÁÄÒÅÓ ÐÏÌØÚÏ×ÁÔÅÌÑ
+ uint32_t __currIP; // Current user's ip
USER_PROPERTY<uint32_t> currIP;
- /*
- ë ÔÏÍÕ ÍÏÍÅÎÔÕ ËÁË ÍÙ ÕÖÅ ÎÅ Á×ÔÏÒÉÚÏ×ÁÎÉÙ, ÎÏ ÅÝÅ ÎÅ ×ÙÐÏÌÎÅÎ Disconnect,
- currIP ÕÖÅ ÓÂÒÏÛÅÎ. ðÏÓÌÅÄÎÅÅ ÚÎÁÞÅÎÉÅ currIP ÓÏÈÒÁÎÑÅÍ × lastIPForDisconnect
- */
- uint32_t lastIPForDisconnect;
+ uint32_t lastIPForDisconnect; // User's ip after unauth but before disconnect
time_t pingTime;
TRAFF_STAT traffStat;
std::pair<time_t, TRAFF_STAT> traffStatSaved;
- const SETTINGS * settings;
+ const SETTINGS_IMPL * settings;
std::set<const AUTH *> authorizedBy;
bool deleted;
- time_t lastWriteStat; // ÷ÒÅÍÑ ÐÏÓÌÅÄÎÅÊ ÚÁÐÉÓÉ ÓÔÁÔÉÓÔÉËÉ
- time_t lastWriteDeatiledStat; // ÷ÒÅÍÑ ÐÏÓÌÅÄÎÅÊ ÚÁÐÉÓÉ ÄÅÔÁÌØÎÏÊ ÓÔÁÔÉÓÔÉËÉ
+ time_t lastWriteStat;
+ time_t lastWriteDetailedStat;
// Properties
USER_PROPERTY<double> & cash;