2008-12-10 05:42:49 +01:00
|
|
|
/*
|
|
|
|
* This file is a part of CMSLU -- Content Management System like Unix
|
|
|
|
* and is not publicly distributed
|
|
|
|
*
|
2009-04-21 22:50:55 +02:00
|
|
|
* Copyright (c) 2008-2009, Tomasz Sowa
|
2008-12-10 05:42:49 +01:00
|
|
|
* All rights reserved.
|
|
|
|
*
|
|
|
|
*/
|
|
|
|
|
2009-04-21 22:50:55 +02:00
|
|
|
#ifndef headerfilecmslucoresessionmanager
|
|
|
|
#define headerfilecmslucoresessionmanager
|
2008-12-10 05:42:49 +01:00
|
|
|
|
|
|
|
#include <set>
|
|
|
|
#include <ctime>
|
|
|
|
|
2009-01-31 07:53:36 +01:00
|
|
|
#include "sessioncontainer.h"
|
2008-12-10 05:42:49 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
class SessionManager
|
|
|
|
{
|
2009-01-31 07:53:36 +01:00
|
|
|
SessionContainer session_table;
|
|
|
|
|
|
|
|
|
2008-12-10 05:42:49 +01:00
|
|
|
|
|
|
|
bool IsSession(long s);
|
|
|
|
|
|
|
|
long CreateSessionId();
|
|
|
|
void CreateTemporarySession();
|
|
|
|
void CreateSession();
|
|
|
|
|
|
|
|
public:
|
|
|
|
|
|
|
|
|
|
|
|
void SetSession();
|
2009-01-31 07:53:36 +01:00
|
|
|
void DeleteOldSessions();
|
|
|
|
|
|
|
|
SessionContainer::Iterator SessionBegin();
|
|
|
|
SessionContainer::Iterator SessionEnd();
|
2008-12-10 05:42:49 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
#endif
|