summaryrefslogtreecommitdiff
path: root/plugins/StopSpamPlus/src/settings.cpp
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2013-04-05 22:27:16 +0000
committerGeorge Hazan <george.hazan@gmail.com>2013-04-05 22:27:16 +0000
commit007b4c7301f0d26a72f89f74e9929f42e24eb3e6 (patch)
treeb1ee30b70c6e36d1a06aed6885cb80dc560a68ca /plugins/StopSpamPlus/src/settings.cpp
parentf4a1bbc6ba4b8137cb868639ac146aa97e97e9df (diff)
- rest of menus cleared;
- old database macroses wiped out from all plugins (left in m_database.h for compatibility) git-svn-id: http://svn.miranda-ng.org/main/trunk@4324 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/StopSpamPlus/src/settings.cpp')
-rw-r--r--plugins/StopSpamPlus/src/settings.cpp20
1 files changed, 10 insertions, 10 deletions
diff --git a/plugins/StopSpamPlus/src/settings.cpp b/plugins/StopSpamPlus/src/settings.cpp
index 05a9007d0c..52dcc274a2 100644
--- a/plugins/StopSpamPlus/src/settings.cpp
+++ b/plugins/StopSpamPlus/src/settings.cpp
@@ -4,10 +4,10 @@
tstring db_usage::DBGetPluginSetting(std::string const &name, tstring const &defValue)
{
DBVARIANT dbv;
- if(DBGetContactSettingTString(NULL, pluginName, name.c_str(), &dbv))
+ if(db_get_ts(NULL, pluginName, name.c_str(), &dbv))
return defValue;
tstring value = dbv.ptszVal;
- DBFreeVariant(&dbv);
+ db_free(&dbv);
return value;
}
@@ -15,45 +15,45 @@ tstring db_usage::DBGetPluginSetting(std::string const &name, tstring const &def
std::string db_usage::DBGetPluginSetting(std::string const &name, std::string const &defValue)
{
DBVARIANT dbv;
- if(DBGetContactSettingString(NULL, pluginName, name.c_str(), &dbv))
+ if(db_get_s(NULL, pluginName, name.c_str(), &dbv))
return defValue;
std::string value = dbv.pszVal;
- DBFreeVariant(&dbv);
+ db_free(&dbv);
return value;
}
bool db_usage::DBGetPluginSetting(std::string const &name, bool const &defValue)
{
- return(0 != DBGetContactSettingByte(NULL, pluginName, name.c_str(), defValue?1:0));
+ return(0 != db_get_b(NULL, pluginName, name.c_str(), defValue?1:0));
}
DWORD db_usage::DBGetPluginSetting(std::string const &name, DWORD const &defValue)
{
- return DBGetContactSettingDword(NULL, pluginName, name.c_str(), defValue);
+ return db_get_dw(NULL, pluginName, name.c_str(), defValue);
}
//writting to database--------------
void db_usage::DBSetPluginSetting(std::string const &name, tstring const &value)
{
- DBWriteContactSettingTString(NULL, pluginName, name.c_str(), value.c_str());
+ db_set_ts(NULL, pluginName, name.c_str(), value.c_str());
}
void db_usage::DBSetPluginSetting(std::string const &name, std::string const &value)
{
- DBWriteContactSettingString(NULL, pluginName, name.c_str(), value.c_str());
+ db_set_s(NULL, pluginName, name.c_str(), value.c_str());
}
void db_usage::DBSetPluginSetting(std::string const &name, bool const &value)
{
- DBWriteContactSettingByte(NULL, pluginName, name.c_str(), value?1:0);
+ db_set_b(NULL, pluginName, name.c_str(), value?1:0);
}
void db_usage::DBSetPluginSetting(std::string const &name, DWORD const &value)
{
- DBWriteContactSettingDword(NULL, pluginName, name.c_str(),value);
+ db_set_dw(NULL, pluginName, name.c_str(),value);
}
Settings *plSets;