/* * 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; }