プラグインの有効/無効を切り替え可能に。
1 parent 4db409b commit cd0f52e11a707838c4e08e11b0a014dadc44cc37
@tamra tamra authored on 26 Apr 2005
Showing 2 changed files
View
2
■■■
honoka/src/honoka_def.h
#else
#define HONOKA_DEFAULT_SERVERTYPE "Wnn4"
#endif
 
#define HONOKA_CONFIG_PLUGINLOADER_PREFIX "/IMEngine/Honoka/PluginLoader"
 
#define HONOKA_CONFIG_MINISTATUS "/IMEngine/Honoka/MiniStatus"
#define HONOKA_DEFAULT_MINISTATUS false
 
#define HONOKA_CONFIG_YOSOKU "/IMEngine/Honoka/Yosoku"
View
2
■■■
honoka/src/honoka_imengine.cpp
struct dirent *entry;
while((entry = readdir(dir)) != NULL) {
String d = entry->d_name;
if ((d.substr(0,6) == "plugin") && (d.substr(d.length() - 3,3) == ".so")) {
if (!_scim_config->read(String(HONOKA_CONFIG_PLUGINLOADER_PREFIX) + "/" + d.substr(0,d.length() - 3),true))
continue;
d = String(HONOKA_PLUGINDIR) + "/" + d;
void* plugin = dlopen(d.c_str(), RTLD_LAZY);
if (!plugin) continue;
createInstanceFunc *getInstance = (createInstanceFunc *)dlsym(plugin,"getHonokaPluginInstance");