/* * This file is a part of Winix * and is not publicly distributed * * Copyright (c) 2008-2010, Tomasz Sowa * All rights reserved. * */ #include "plugindata.h" #include "plugin.h" #include "log.h" void PluginData::Assign(size_t index, PluginDataBase * data) { if( index >= table.size() ) Resize(index+1); table[index] = data; } void PluginData::Assign(PluginDataBase * data) { if( plugin.current_plugin == -1 ) { log << log1 << "PD: Assign(PluginDataBase*) should be called only from plugins" << logend; return; } Assign(plugin.current_plugin, data); } PluginDataBase * PluginData::Get(size_t index) { if( index >= table.size() ) Resize(index+1); return table[index]; } PluginDataBase * PluginData::Get() { if( plugin.current_plugin == -1 ) { log << log1 << "PD: Get() should be called only from plugins" << logend; return 0; } return Get(plugin.current_plugin); } void PluginData::DeleteAll() { if( table.empty() ) return; plugin.Call(WINIX_SESSION_REMOVE); for(size_t i=0 ; i