2008-12-30 02:05:03 +01:00
|
|
|
/*
|
2010-02-28 01:08:10 +01:00
|
|
|
* This file is a part of Winix
|
2008-12-30 02:05:03 +01:00
|
|
|
* and is not publicly distributed
|
|
|
|
*
|
2012-03-09 03:36:25 +01:00
|
|
|
* Copyright (c) 2008-2012, Tomasz Sowa
|
2008-12-30 02:05:03 +01:00
|
|
|
* All rights reserved.
|
|
|
|
*
|
|
|
|
*/
|
|
|
|
|
|
|
|
#include "templates.h"
|
2011-06-27 23:38:19 +02:00
|
|
|
#include "core/request.h"
|
|
|
|
#include "core/version.h"
|
|
|
|
#include "core/plugin.h"
|
2009-04-21 22:50:55 +02:00
|
|
|
|
|
|
|
|
2008-12-30 02:05:03 +01:00
|
|
|
|
|
|
|
|
|
|
|
namespace TemplatesFunctions
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
|
|
void sys_ver_major(Info & i)
|
|
|
|
{
|
2010-05-20 20:28:19 +02:00
|
|
|
i.out << WINIX_VER_MAJOR;
|
2008-12-30 02:05:03 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void sys_ver_minor(Info & i)
|
|
|
|
{
|
2010-05-20 20:28:19 +02:00
|
|
|
i.out << WINIX_VER_MINOR;
|
2008-12-30 02:05:03 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
void sys_ver_revision(Info & i)
|
|
|
|
{
|
2010-05-20 20:28:19 +02:00
|
|
|
i.out << WINIX_VER_REVISION;
|
2008-12-30 02:05:03 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
2011-06-27 23:38:19 +02:00
|
|
|
static size_t sys_plugin_index = 0;
|
|
|
|
|
|
|
|
|
|
|
|
void sys_plugin_tab(Info & i)
|
|
|
|
{
|
|
|
|
sys_plugin_index = i.iter;
|
|
|
|
i.res = sys_plugin_index < plugin.GetPlugins()->size();
|
|
|
|
}
|
|
|
|
|
|
|
|
void sys_plugin_tab_has_name(Info & i)
|
|
|
|
{
|
|
|
|
if( sys_plugin_index < plugin.GetPlugins()->size() )
|
|
|
|
i.res = (*plugin.GetPlugins())[sys_plugin_index].plugin_name != 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
void sys_plugin_tab_name(Info & i)
|
|
|
|
{
|
|
|
|
if( sys_plugin_index < plugin.GetPlugins()->size() )
|
|
|
|
{
|
|
|
|
const wchar_t * name = (*plugin.GetPlugins())[sys_plugin_index].plugin_name;
|
|
|
|
|
|
|
|
if( name )
|
|
|
|
i.out << name;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2008-12-30 02:05:03 +01:00
|
|
|
|
|
|
|
} // namespace TemplatesFunctions
|
|
|
|
|
|
|
|
|