50 lines
793 B
C++
Executable File
50 lines
793 B
C++
Executable File
/*
|
|
* This file is a part of Winix
|
|
* and is not publicly distributed
|
|
*
|
|
* Copyright (c) 2008-2010, Tomasz Sowa
|
|
* All rights reserved.
|
|
*
|
|
*/
|
|
|
|
#ifndef headerfilecmslucoresessionmanager
|
|
#define headerfilecmslucoresessionmanager
|
|
|
|
#include <set>
|
|
#include <ctime>
|
|
|
|
#include "sessioncontainer.h"
|
|
|
|
|
|
|
|
class SessionManager
|
|
{
|
|
SessionContainer session_table;
|
|
|
|
|
|
|
|
bool IsSession(long s);
|
|
|
|
long CreateSessionId();
|
|
void CreateTemporarySession();
|
|
void CreateSession();
|
|
bool SetSessionFromCookie(const std::string & cookie);
|
|
int session_checker;
|
|
|
|
public:
|
|
|
|
SessionManager();
|
|
void SetSession();
|
|
void DeleteAllPluginsData();
|
|
void DeleteOldSessions();
|
|
|
|
void LoadSessions();
|
|
void SaveSessions();
|
|
|
|
SessionContainer::Iterator SessionBegin();
|
|
SessionContainer::Iterator SessionEnd();
|
|
};
|
|
|
|
|
|
#endif
|