added: Patterns class (in templates)
ezc patterns are managed by this class added: some work in groupitem plugin (not finished yet) changed: ConfParser can read a string from memory now (need some testing yet) git-svn-id: svn://ttmath.org/publicrep/winix/trunk@757 e52654a7-88a9-db11-a3e9-0013d4bc506e
This commit is contained in:
@@ -6,10 +6,10 @@
|
||||
* All rights reserved.
|
||||
*
|
||||
*/
|
||||
|
||||
|
||||
#include "core/log.h"
|
||||
#include "core/plugin.h"
|
||||
#include "groupinfo.h"
|
||||
|
||||
|
||||
|
||||
@@ -18,15 +18,39 @@ extern "C" void Init(PluginInfo &);
|
||||
|
||||
|
||||
|
||||
namespace Groupitem
|
||||
namespace GroupItem
|
||||
{
|
||||
|
||||
|
||||
const wchar_t plugin_name[] = L"groupitem";
|
||||
GroupInfo group_info;
|
||||
|
||||
|
||||
|
||||
|
||||
void AddMountPar(PluginInfo & info)
|
||||
{
|
||||
group_info.mount_par_group_conf = info.system->mounts.AddMountPar(L"group_conf");
|
||||
group_info.mount_par_group_lang_conf = info.system->mounts.AddMountPar(L"group_lang_conf");
|
||||
}
|
||||
|
||||
|
||||
void FstabChanged(PluginInfo & info)
|
||||
{
|
||||
group_info.ReadGroupsConfigs(true);
|
||||
|
||||
group_info.PrintGroups();
|
||||
}
|
||||
|
||||
|
||||
void ProcessRequest(PluginInfo & info)
|
||||
{
|
||||
if( info.cur->request->function == &info.functions->fun_reload )
|
||||
{
|
||||
if( info.cur->request->IsParam(L"groupitem") )
|
||||
group_info.ReadGroupsConfigs(false);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
void AddEzcFunctions(PluginInfo & info);
|
||||
@@ -39,10 +63,14 @@ void AddEzcFunctions(PluginInfo & info);
|
||||
|
||||
void Init(PluginInfo & info)
|
||||
{
|
||||
using namespace Groupitem;
|
||||
using namespace GroupItem;
|
||||
|
||||
plugin.Assign(WINIX_TEMPLATES_CREATEFUNCTIONS, AddEzcFunctions);
|
||||
plugin.Assign(WINIX_TEMPLATES_CREATEFUNCTIONS, AddEzcFunctions);
|
||||
plugin.Assign(WINIX_ADD_MOUNTS, AddMountPar);
|
||||
plugin.Assign(WINIX_FSTAB_CHANGED, FstabChanged);
|
||||
plugin.Assign(WINIX_PROCESS_REQUEST, ProcessRequest);
|
||||
|
||||
group_info.SetSystem(info.system);
|
||||
|
||||
info.p1 = (void*)(plugin_name);
|
||||
}
|
||||
|
Reference in New Issue
Block a user