From 53fe3e46177d17b4941610de19f5cc6210700cb4 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Mon, 12 Nov 2018 21:44:56 +0300 Subject: db_* functions replaced with g_plugin calls --- plugins/NotifyAnything/src/options.cpp | 36 +++++++++++++++++----------------- 1 file changed, 18 insertions(+), 18 deletions(-) (limited to 'plugins/NotifyAnything/src') diff --git a/plugins/NotifyAnything/src/options.cpp b/plugins/NotifyAnything/src/options.cpp index 0976c9151e..24c46c4f7e 100644 --- a/plugins/NotifyAnything/src/options.cpp +++ b/plugins/NotifyAnything/src/options.cpp @@ -134,34 +134,34 @@ INT_PTR CALLBACK DlgProcOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lPara void save_settings() { - db_set_b(NULL, MODULENAME, "local_only", g_settings.local_only); - db_set_b(NULL, MODULENAME, "debug_messages", g_settings.debug_messages); - db_set_b(NULL, MODULENAME, "log_to_file", g_settings.log_to_file); - db_set_b(NULL, MODULENAME, "beep", g_settings.sound); - db_set_b(NULL, MODULENAME, "use_pcspeaker", g_settings.use_pcspeaker); - db_set_b(NULL, MODULENAME, "allow_execute", g_settings.allow_execute); - db_set_dw(NULL, MODULENAME, "port", g_settings.port); - db_set_ws(NULL, MODULENAME, "password", g_settings.password.c_str()); - db_set_ws(NULL, MODULENAME, "log_filename", g_settings.log_filename.c_str()); + g_plugin.setByte("local_only", g_settings.local_only); + g_plugin.setByte("debug_messages", g_settings.debug_messages); + g_plugin.setByte("log_to_file", g_settings.log_to_file); + g_plugin.setByte("beep", g_settings.sound); + g_plugin.setByte("use_pcspeaker", g_settings.use_pcspeaker); + g_plugin.setByte("allow_execute", g_settings.allow_execute); + g_plugin.setDword("port", g_settings.port); + g_plugin.setWString("password", g_settings.password.c_str()); + g_plugin.setWString("log_filename", g_settings.log_filename.c_str()); } void load_settings() { - g_settings.local_only = db_get_b(NULL, MODULENAME, "local_only", 1) != 0; - g_settings.debug_messages = db_get_b(NULL, MODULENAME, "debug_messages", 0) != 0; - g_settings.log_to_file = db_get_b(NULL, MODULENAME, "log_to_file", 0) != 0; - g_settings.sound = NASettings::sound_t(db_get_b(NULL, MODULENAME, "beep", g_settings.request)); - g_settings.use_pcspeaker = db_get_b(NULL, MODULENAME, "use_pcspeaker", 0) != 0; - g_settings.allow_execute = db_get_b(NULL, MODULENAME, "allow_execute", 0) != 0; - g_settings.port = db_get_dw(NULL, MODULENAME, "port", 12001); + g_settings.local_only = g_plugin.getByte("local_only", 1) != 0; + g_settings.debug_messages = g_plugin.getByte("debug_messages", 0) != 0; + g_settings.log_to_file = g_plugin.getByte("log_to_file", 0) != 0; + g_settings.sound = NASettings::sound_t(g_plugin.getByte("beep", g_settings.request)); + g_settings.use_pcspeaker = g_plugin.getByte("use_pcspeaker", 0) != 0; + g_settings.allow_execute = g_plugin.getByte("allow_execute", 0) != 0; + g_settings.port = g_plugin.getDword("port", 12001); DBVARIANT dbv; - if (!db_get_ws(NULL, MODULENAME, "password", &dbv)) { + if (!g_plugin.getWString("password", &dbv)) { g_settings.password = dbv.pwszVal; db_free(&dbv); } - if (!db_get_ws(NULL, MODULENAME, "log_filename", &dbv)) { + if (!g_plugin.getWString("log_filename", &dbv)) { g_settings.log_filename = dbv.pwszVal; db_free(&dbv); } -- cgit v1.2.3