Files
winix/core/session.cpp
Tomasz Sowa 2ad666d221 added: sessions data for plugins (plugindata.h plugindata.cpp)
git-svn-id: svn://ttmath.org/publicrep/winix/trunk@598 e52654a7-88a9-db11-a3e9-0013d4bc506e
2010-05-04 21:58:22 +00:00

57 lines
739 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.
*
*/
#include "session.h"
Session::Session()
{
Clear();
time = std::time(0);
tm_time = *std::localtime(&time);
last_time = time;
tm_last_time = tm_time;
// the first request can be a POST (it doesn't matter)
last_time_get = time;
}
void Session::Clear()
{
id = 0;
time = 0;
puser = 0;
rebus_item = 0;
rebus_checked = false;
remember_me = false;
new_session = true;
spam_score = 0;
// dir_old.clear();
}
bool Session::operator==(const Session & s) const
{
return id == s.id;
}
bool Session::operator<(const Session & s) const
{
return id < s.id;
}