7 #include "stg/os_int.h"
8 #include "stg/blowfish.h"
12 USER(const std::string & login,
13 const std::string & password,
15 USER(const USER & rvalue);
18 USER & operator=(const USER & rvalue);
22 const std::string & GetLogin() const { return login; }
23 uint32_t GetIP() const { return ip; }
24 uint32_t GetAliveTimeout() const { return aliveTimeout; }
25 uint32_t GetUserTimeout() const { return userTimeout; }
26 int GetPhase() const { return phase; }
27 uint32_t GetRnd() const { return rnd; }
28 int GetSocket() const { return sock; }
29 time_t GetPhaseChangeTime() const { return phaseChangeTime; }
31 BLOWFISH_CTX * GetCtx() { return &ctx; }
33 void SetPhase(int p) { phase = p; time(&phaseChangeTime); }
34 void SetRnd(uint32_t r) { rnd = r; }
35 uint32_t IncRnd() { return ++rnd; }
36 void SetAliveTimeout(uint32_t timeout) { aliveTimeout = timeout; }
37 void SetUserTimeout(uint32_t timeout) { userTimeout = timeout; }
43 uint32_t aliveTimeout;
46 time_t phaseChangeTime;