ChainLink::ChainLink(KoFilterChain *chain, KoFilterEntry::Ptr filterEntry, const QByteArray& from, const QByteArray& to) : m_chain(chain) , m_filterEntry(filterEntry) , m_from(from) , m_to(to) , m_filter(0) , m_updater(createUpdater(chain)) { }
/************************************************************************* Constructor *************************************************************************/ Lua_Updater::Lua_Updater(LuaPlus::LuaState* pLuaState) : LuaExport< Lua_Updater >("Updater", pLuaState) { //注册导出函数 RegisterFunction("clear", &AXP::Lua_Updater::Lua_clear); RegisterFunction("addPatchFile", &AXP::Lua_Updater::Lua_addPatchFile); RegisterFunction("updateVersion", &AXP::Lua_Updater::Lua_updateVersion); RegisterFunction("checkPatchCRC", &AXP::Lua_Updater::Lua_checkPatchCRC); RegisterFunction("encryptPatchFile", &AXP::Lua_Updater::Lua_encryptPatchFile); m_pUpdaterImpl = createUpdater(); }
/************************************************************************* 清空 *************************************************************************/ int Lua_Updater::Lua_clear(LuaPlus::LuaState* state) { if(m_pUpdaterImpl) { destroyUpdater(m_pUpdaterImpl); m_pUpdaterImpl = 0; } m_pUpdaterImpl = createUpdater(); return 0; }