+ PluginScanMessage(X_("closeme"), "", false);
+ _cancel_scan = false;
+}
+
+void
+PluginManager::cancel_plugin_scan ()
+{
+ _cancel_scan = true;
+}
+
+void
+PluginManager::cancel_plugin_timeout ()
+{
+ _cancel_timeout = true;
+}
+
+void
+PluginManager::clear_vst_cache ()
+{
+ // see also libs/ardour/vst_info_file.cc - vstfx_infofile_path()
+#ifdef WINDOWS_VST_SUPPORT
+ {
+ vector<string> fsi_files;
+ find_files_matching_regex (fsi_files, Config->get_plugin_path_vst(), "\\.fsi$", true);
+ for (vector<string>::iterator i = fsi_files.begin(); i != fsi_files.end (); ++i) {
+ ::g_unlink(i->c_str());
+ }
+ }
+#endif
+
+#ifdef LXVST_SUPPORT
+ {
+ vector<string> fsi_files;
+ find_files_matching_regex (fsi_files, Config->get_plugin_path_lxvst(), "\\.fsi$", true);
+ for (vector<string>::iterator i = fsi_files.begin(); i != fsi_files.end (); ++i) {
+ ::g_unlink(i->c_str());
+ }
+ }
+#endif
+
+#if (defined WINDOWS_VST_SUPPORT || defined LXVST_SUPPORT)
+ {
+ string personal = get_personal_vst_info_cache_dir();
+ vector<string> fsi_files;
+ find_files_matching_regex (fsi_files, personal, "\\.fsi$", /* user cache is flat, no recursion */ false);
+ for (vector<string>::iterator i = fsi_files.begin(); i != fsi_files.end (); ++i) {
+ ::g_unlink(i->c_str());
+ }
+ }
+#endif
+}
+
+void
+PluginManager::clear_vst_blacklist ()
+{
+#ifdef WINDOWS_VST_SUPPORT
+ {
+ vector<string> fsi_files;
+ find_files_matching_regex (fsi_files, Config->get_plugin_path_vst(), "\\.fsb$", true);
+ for (vector<string>::iterator i = fsi_files.begin(); i != fsi_files.end (); ++i) {
+ ::g_unlink(i->c_str());
+ }
+ }
+#endif
+
+#ifdef LXVST_SUPPORT
+ {
+ vector<string> fsi_files;
+ find_files_matching_regex (fsi_files, Config->get_plugin_path_lxvst(), "\\.fsb$", true);
+ for (vector<string>::iterator i = fsi_files.begin(); i != fsi_files.end (); ++i) {
+ ::g_unlink(i->c_str());
+ }
+ }
+#endif
+
+#if (defined WINDOWS_VST_SUPPORT || defined LXVST_SUPPORT)
+ {
+ string personal = get_personal_vst_blacklist_dir();
+
+ vector<string> fsi_files;
+ find_files_matching_regex (fsi_files, personal, "\\.fsb$", /* flat user cache */ false);
+ for (vector<string>::iterator i = fsi_files.begin(); i != fsi_files.end (); ++i) {
+ ::g_unlink(i->c_str());
+ }
+ }
+#endif
+}
+
+void
+PluginManager::clear_au_cache ()
+{
+#ifdef AUDIOUNIT_SUPPORT
+ // AUPluginInfo::au_cache_path ()
+ string fn = Glib::build_filename (ARDOUR::user_config_directory(), "au_cache");
+ if (Glib::file_test (fn, Glib::FILE_TEST_EXISTS)) {
+ ::g_unlink(fn.c_str());
+ }
+#endif
+}
+
+void
+PluginManager::clear_au_blacklist ()
+{
+#ifdef AUDIOUNIT_SUPPORT
+ string fn = Glib::build_filename (ARDOUR::user_cache_directory(), "au_blacklist.txt");
+ if (Glib::file_test (fn, Glib::FILE_TEST_EXISTS)) {
+ ::g_unlink(fn.c_str());
+ }
+#endif