rewritten: sessions management

(Session, SessionContainer, SessionManager)
           now a Session object don't copy all fields in its copy constructor (only id)
           the rest fields are set after the object is inserted in SessionContainer
added:     after successfully login a session id is changed
added:     plugin.Call() methods with a first argument a pointer to a Session object



git-svn-id: svn://ttmath.org/publicrep/winix/trunk@823 e52654a7-88a9-db11-a3e9-0013d4bc506e
This commit is contained in:
2012-03-17 05:11:23 +00:00
parent 70421b7bd1
commit e83fd91423
25 changed files with 444 additions and 183 deletions

View File

@@ -36,6 +36,7 @@ public:
void SetSession();
void DeleteSessions(); // deleting all sessions
bool ChangeSessionId(long old_id);
void InitTmpSession();
void UninitTmpSession();
@@ -68,9 +69,6 @@ private:
// session with id 0
Session temporary_session;
// for adding a new session to the container
Session new_session;
bool IsSession(long s);
long CreateSessionId();
@@ -81,9 +79,9 @@ private:
// second thread
int deleted;
virtual void Work();
void CheckSession(SessionContainer::IndexId::iterator & i);
void CheckSession(SessionContainer::Iterator & i);
bool IsSessionOutdated(const Session & s) const;
void DeleteSession(SessionContainer::IdIterator i);
void DeleteSession(Session * del_session);
};