X-Git-Url: https://git.stg.codes/stg.git/blobdiff_plain/ede91934442fd804d7b818971a44e3ad795cb01f..1f6214607a4f2b727484a4ae9e9411044dae8051:/projects/stargazer/user_impl.h?ds=sidebyside diff --git a/projects/stargazer/user_impl.h b/projects/stargazer/user_impl.h index ad5b4516..e9c9f986 100644 --- a/projects/stargazer/user_impl.h +++ b/projects/stargazer/user_impl.h @@ -48,6 +48,7 @@ class TARIFF; class TARIFFS; class ADMIN; class USER_IMPL; +class SETTINGS_IMPL; //----------------------------------------------------------------------------- class USER_ID_GENERATOR { friend class USER_IMPL; @@ -102,10 +103,10 @@ friend class CHG_TARIFF_NOTIFIER; 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, + const ADMIN * sysAdmin, const USERS * u); USER_IMPL(const USER_IMPL & u); virtual ~USER_IMPL(); @@ -128,6 +129,12 @@ public: void AddCurrIPAfterNotifier(PROPERTY_NOTIFIER_BASE *); void DelCurrIPAfterNotifier(PROPERTY_NOTIFIER_BASE *); + void AddConnectedBeforeNotifier(PROPERTY_NOTIFIER_BASE *); + void DelConnectedBeforeNotifier(PROPERTY_NOTIFIER_BASE *); + + void AddConnectedAfterNotifier(PROPERTY_NOTIFIER_BASE *); + void DelConnectedAfterNotifier(PROPERTY_NOTIFIER_BASE *); + int GetID() const { return id; } double GetPassiveTimePart() const; @@ -210,18 +217,14 @@ private: USER_ID_GENERATOR userIDGenerator; - uint32_t __currIP; // ôÅËÕÝÉÊ ÁÄÒÅÓ ÐÏÌØÚÏ×ÁÔÅÌÑ + uint32_t __currIP; // Current user's ip USER_PROPERTY currIP; - /* - ë ÔÏÍÕ ÍÏÍÅÎÔÕ ËÁË ÍÙ ÕÖÅ ÎÅ Á×ÔÏÒÉÚÏ×ÁÎÉÙ, ÎÏ ÅÝÅ ÎÅ ×ÙÐÏÌÎÅÎ Disconnect, - currIP ÕÖÅ ÓÂÒÏÛÅÎ. ðÏÓÌÅÄÎÅÅ ÚÎÁÞÅÎÉÅ currIP ÓÏÈÒÁÎÑÅÍ × lastIPForDisconnect - */ - uint32_t lastIPForDisconnect; + uint32_t lastIPForDisconnect; // User's ip after unauth but before disconnect time_t pingTime; - const ADMIN & sysAdmin; + const ADMIN * sysAdmin; const STORE * store; const TARIFFS * tariffs; @@ -230,7 +233,7 @@ private: TRAFF_STAT traffStat; std::pair traffStatSaved; - const SETTINGS * settings; + const SETTINGS_IMPL * settings; std::set authorizedBy; @@ -238,8 +241,8 @@ private: bool deleted; - time_t lastWriteStat; // ÷ÒÅÍÑ ÐÏÓÌÅÄÎÅÊ ÚÁÐÉÓÉ ÓÔÁÔÉÓÔÉËÉ - time_t lastWriteDeatiledStat; // ÷ÒÅÍÑ ÐÏÓÌÅÄÎÅÊ ÚÁÐÉÓÉ ÄÅÔÁÌØÎÏÊ ÓÔÁÔÉÓÔÉËÉ + time_t lastWriteStat; + time_t lastWriteDetailedStat; // Properties USER_PROPERTY & cash;