-class DisconnectUser;
-
-using UserPtr = STG::User*;
-
-//-----------------------------------------------------------------------------
-class IP_NOTIFIER: public STG::PropertyNotifierBase<uint32_t> {
-public:
- IP_NOTIFIER(REMOTE_SCRIPT & r, UserPtr u)
- : user(u), rs(r) { user->AddCurrIPAfterNotifier(this); }
- IP_NOTIFIER(const IP_NOTIFIER & rhs)
- : user(rhs.user), rs(rhs.rs) { user->AddCurrIPAfterNotifier(this); }
- ~IP_NOTIFIER() { user->DelCurrIPAfterNotifier(this); }
-
- IP_NOTIFIER & operator=(const IP_NOTIFIER & rhs)
- {
- user->DelCurrIPAfterNotifier(this);
- user = rhs.user;
- user->AddCurrIPAfterNotifier(this);
- return *this;
- }
-
- void notify(const uint32_t & oldValue, const uint32_t & newValue) override;
- UserPtr GetUser() const { return user; }
-
-private:
-
- UserPtr user;
- REMOTE_SCRIPT & rs;
-};
-//-----------------------------------------------------------------------------
-class CONNECTED_NOTIFIER: public STG::PropertyNotifierBase<bool> {
-public:
- CONNECTED_NOTIFIER(REMOTE_SCRIPT & r, UserPtr u)
- : user(u), rs(r) { user->AddConnectedAfterNotifier(this); }
- CONNECTED_NOTIFIER(const CONNECTED_NOTIFIER & rhs)
- : user(rhs.user), rs(rhs.rs) { user->AddConnectedAfterNotifier(this); }
- ~CONNECTED_NOTIFIER() { user->DelConnectedAfterNotifier(this); }
-
- CONNECTED_NOTIFIER & operator=(const CONNECTED_NOTIFIER & rhs)
- {
- user->DelConnectedAfterNotifier(this);
- user = rhs.user;
- user->AddConnectedAfterNotifier(this);
- return *this;
- }
-
- void notify(const bool & oldValue, const bool & newValue) override;
- UserPtr GetUser() const { return user; }
-
-private: