ops_module_names.push_back (link_name.substr (0, link_name.find_last_of ('.')));
}
-
file = readdir (dir);
}
closedir (dir);
std::sort (ops_module_names.begin (), ops_module_names.end ());
ops_module_names.erase (std::unique (ops_module_names.begin (), ops_module_names.end ()), ops_module_names.end ());
+
return ops_module_names.size ();
}
char *osp_module_name = (char *)data;
String rpath = String ("/opt/apps/") + String (osp_module_name).substr (0, String (osp_module_name).find_first_of ('.'));
- String osp_ime_name = String (osp_module_name).substr (String (osp_module_name).find_first_of('.') + 1, String (osp_module_name).find_last_of('.'));
+ String osp_ime_name = String (osp_module_name).substr (String (osp_module_name).find_first_of ('.') + 1, String (osp_module_name).find_last_of ('.'));
String exe_path = rpath + String ("/bin/") + osp_ime_name + String (".exe");
-
if (event == ECORE_FILE_EVENT_CLOSED) {
if (String (path) == exe_path) {
- LOGD("%s", ecore_file_monitor_path_get (em));
- LOGD("%s", osp_module_name);
+ LOGD ("%s", ecore_file_monitor_path_get (em));
+ LOGD ("%s", osp_module_name);
}
}
-
-
- return;
}
static void osp_info_dir_monitor_cb (void *data, Ecore_File_Monitor *em, Ecore_File_Event event, const char *path)
if (event == ECORE_FILE_EVENT_CLOSED) {
if (String (path) == manifest_path) {
- LOGD("%s", ecore_file_monitor_path_get (em));
- LOGD("%s", osp_module_name);
+ LOGD ("%s", ecore_file_monitor_path_get (em));
+ LOGD ("%s", osp_module_name);
}
}
-
-
- return;
}
/**
* @brief : add monitor for engine file and info file update of 3rd party's IMEs
*/
-static void add_monitor_for_osp_modules()
+static void add_monitor_for_osp_modules ()
{
LOGD ("");
std::vector<String> osp_module_list;
scim_get_osp_module_list (osp_module_list);
- if (osp_module_list.size() > 0) {
- for (unsigned int i = 0; i < osp_module_list.size(); i ++) {
- LOGD ("%s", osp_module_list[i].c_str());
+ if (osp_module_list.size () > 0) {
+ for (unsigned int i = 0; i < osp_module_list.size (); i++) {
+ LOGD ("%s", osp_module_list[i].c_str ());
String rpath = String ("/opt/apps/") + osp_module_list[i].substr (0, osp_module_list[i].find_first_of ('.'));
String exe_path = rpath + String ("/bin");
String manifest_path = rpath + String ("/info");
- ecore_file_monitor_add (exe_path.c_str (), osp_engine_dir_monitor_cb, (void *)(strdup(osp_module_list[i].c_str())));
- ecore_file_monitor_add (manifest_path.c_str (), osp_info_dir_monitor_cb, (void *)(strdup (osp_module_list[i].c_str())));
+ ecore_file_monitor_add (exe_path.c_str (), osp_engine_dir_monitor_cb, (void *)(strdup (osp_module_list[i].c_str ())));
+ ecore_file_monitor_add (manifest_path.c_str (), osp_info_dir_monitor_cb, (void *)(strdup (osp_module_list[i].c_str ())));
}
}
}