winix/plugins/stats/data.h

53 lines
773 B
C++
Executable File

/*
* This file is a part of Winix
* and is not publicly distributed
*
* Copyright (c) 2010, Tomasz Sowa
* All rights reserved.
*
*/
#ifndef headerfilecmsluplugin_stats_data
#define headerfilecmsluplugin_stats_data
#include "stats.h"
#include <map>
#include "core/plugindata.h"
#include <ctime>
namespace Stats
{
// session data for the plugin
struct StatsData : public PluginDataBase
{
// whether this session has been calculated
bool calculated;
long last_visited;
StatsData()
{
calculated = false;
last_visited = -1;
}
};
extern time_t stats_start;
// statistics for all pages
extern StatsGlobal stat_global;
// statistics for one item
// <item_id, Stats>
extern std::map<long, Stats> stats_tab;
long ItemId();
} // namespace
#endif