summaryrefslogtreecommitdiff
path: root/plugins/CrashDumper/src
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/CrashDumper/src
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/CrashDumper/src')
-rw-r--r--plugins/CrashDumper/src/crshdmp.cpp6
-rw-r--r--plugins/CrashDumper/src/ui.cpp24
-rw-r--r--plugins/CrashDumper/src/upload.cpp16
-rw-r--r--plugins/CrashDumper/src/utils.cpp2
4 files changed, 24 insertions, 24 deletions
diff --git a/plugins/CrashDumper/src/crshdmp.cpp b/plugins/CrashDumper/src/crshdmp.cpp
index d01e364ee3..8b58bddd20 100644
--- a/plugins/CrashDumper/src/crshdmp.cpp
+++ b/plugins/CrashDumper/src/crshdmp.cpp
@@ -328,7 +328,7 @@ static int ModulesLoaded(WPARAM, LPARAM)
if (servicemode)
ViewVersionInfo(0, 0);
- else if (DBGetContactSettingByte(NULL, PluginName, "UploadChanged", 0) && !ProcessVIHash(false))
+ else if (db_get_b(NULL, PluginName, "UploadChanged", 0) && !ProcessVIHash(false))
UploadVersionInfo(0, 0xa1);
CheckForOtherCrashReportingPlugins();
@@ -344,9 +344,9 @@ static int PreShutdown(WPARAM, LPARAM)
extern "C" int __declspec(dllexport) Load(void)
{
- clsdates = DBGetContactSettingByte(NULL, PluginName, "ClassicDates", 1) != 0;
+ clsdates = db_get_b(NULL, PluginName, "ClassicDates", 1) != 0;
- dtsubfldr = DBGetContactSettingByte(NULL, PluginName, "SubFolders", 1) != 0;
+ dtsubfldr = db_get_b(NULL, PluginName, "SubFolders", 1) != 0;
mir_getLP(&pluginInfoEx);
HookEvent(ME_SYSTEM_MODULESLOADED, ModulesLoaded);
diff --git a/plugins/CrashDumper/src/ui.cpp b/plugins/CrashDumper/src/ui.cpp
index 21eea4fb13..d7366d24b9 100644
--- a/plugins/CrashDumper/src/ui.cpp
+++ b/plugins/CrashDumper/src/ui.cpp
@@ -215,18 +215,18 @@ INT_PTR CALLBACK DlgProcOptions(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lP
TranslateDialogDefault(hwndDlg);
DBVARIANT dbv;
- if (DBGetContactSettingString(NULL, PluginName, "Username", &dbv) == 0)
+ if (db_get_s(NULL, PluginName, "Username", &dbv) == 0)
{
SetDlgItemTextA(hwndDlg, IDC_USERNAME, dbv.pszVal);
- DBFreeVariant(&dbv);
+ db_free(&dbv);
}
- if (DBGetContactSettingString(NULL, PluginName, "Password", &dbv) == 0)
+ if (db_get_s(NULL, PluginName, "Password", &dbv) == 0)
{
CallService(MS_DB_CRYPT_DECODESTRING, strlen(dbv.pszVal)+1, (LPARAM)dbv.pszVal);
SetDlgItemTextA(hwndDlg, IDC_PASSWORD, dbv.pszVal);
- DBFreeVariant(&dbv);
+ db_free(&dbv);
}
- CheckDlgButton(hwndDlg, IDC_UPLOADCHN, DBGetContactSettingByte(NULL, PluginName, "UploadChanged", 0));
+ CheckDlgButton(hwndDlg, IDC_UPLOADCHN, db_get_b(NULL, PluginName, "UploadChanged", 0));
CheckDlgButton(hwndDlg, IDC_CLASSICDATES, clsdates);
CheckDlgButton(hwndDlg, IDC_DATESUBFOLDER, dtsubfldr);
}
@@ -242,25 +242,25 @@ INT_PTR CALLBACK DlgProcOptions(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lP
{
char szSetting[100];
GetDlgItemTextA(hwndDlg, IDC_USERNAME, szSetting, SIZEOF(szSetting));
- DBWriteContactSettingString(NULL, PluginName, "Username", szSetting);
+ db_set_s(NULL, PluginName, "Username", szSetting);
GetDlgItemTextA(hwndDlg, IDC_PASSWORD, szSetting, SIZEOF(szSetting));
CallService(MS_DB_CRYPT_ENCODESTRING, SIZEOF(szSetting), (LPARAM)szSetting);
- DBWriteContactSettingString(NULL, PluginName, "Password", szSetting);
+ db_set_s(NULL, PluginName, "Password", szSetting);
- DBWriteContactSettingByte(NULL, PluginName, "UploadChanged",
+ db_set_b(NULL, PluginName, "UploadChanged",
(BYTE)IsDlgButtonChecked(hwndDlg, IDC_UPLOADCHN));
clsdates = IsDlgButtonChecked(hwndDlg, IDC_CLASSICDATES) == BST_CHECKED;
if (clsdates)
- DBWriteContactSettingByte(NULL, PluginName, "ClassicDates", 1);
+ db_set_b(NULL, PluginName, "ClassicDates", 1);
else
- DBDeleteContactSetting(NULL, PluginName, "ClassicDates");
+ db_unset(NULL, PluginName, "ClassicDates");
dtsubfldr = IsDlgButtonChecked(hwndDlg, IDC_DATESUBFOLDER) == BST_CHECKED;
if (dtsubfldr)
- DBWriteContactSettingByte(NULL, PluginName, "SubFolders", 1);
+ db_set_b(NULL, PluginName, "SubFolders", 1);
else
- DBDeleteContactSetting(NULL, PluginName, "SubFolders");
+ db_unset(NULL, PluginName, "SubFolders");
}
break;
}
diff --git a/plugins/CrashDumper/src/upload.cpp b/plugins/CrashDumper/src/upload.cpp
index 7b50d9f866..7dd74d65c4 100644
--- a/plugins/CrashDumper/src/upload.cpp
+++ b/plugins/CrashDumper/src/upload.cpp
@@ -40,15 +40,15 @@ void GetLoginStr(char* user, size_t szuser, char* pass)
{
DBVARIANT dbv;
- if (DBGetContactSettingString(NULL, PluginName, "Username", &dbv) == 0)
+ if (db_get_s(NULL, PluginName, "Username", &dbv) == 0)
{
mir_snprintf(user, szuser, "%s", dbv.pszVal);
- DBFreeVariant(&dbv);
+ db_free(&dbv);
}
else
user[0] = 0;
- if (DBGetContactSettingString(NULL, PluginName, "Password", &dbv) == 0)
+ if (db_get_s(NULL, PluginName, "Password", &dbv) == 0)
{
CallService(MS_DB_CRYPT_DECODESTRING, strlen(dbv.pszVal)+1, (LPARAM)dbv.pszVal);
@@ -61,7 +61,7 @@ void GetLoginStr(char* user, size_t szuser, char* pass)
arrayToHex(hash, sizeof(hash), pass);
- DBFreeVariant(&dbv);
+ db_free(&dbv);
}
else
pass[0] = 0;
@@ -142,7 +142,7 @@ bool InternetDownloadFile(const char *szUrl, VerTrnsfr* szReq)
switch(nlhrReply->resultCode)
{
case 200:
- if (DBGetContactSettingByte(NULL, PluginName, "UploadChanged", 0))
+ if (db_get_b(NULL, PluginName, "UploadChanged", 0))
ProcessVIHash(true);
for (i=nlhrReply->headersCount; i--; )
@@ -267,16 +267,16 @@ bool ProcessVIHash(bool store)
bool result;
if (store)
{
- DBWriteContactSettingString(NULL, PluginName, "VIHash", hashstr);
+ db_set_s(NULL, PluginName, "VIHash", hashstr);
result = true;
}
else
{
DBVARIANT dbv;
- if (DBGetContactSettingString(NULL, PluginName, "VIHash", &dbv) == 0)
+ if (db_get_s(NULL, PluginName, "VIHash", &dbv) == 0)
{
result = strcmp(hashstr, dbv.pszVal) == 0;
- DBFreeVariant(&dbv);
+ db_free(&dbv);
}
else
result = false;
diff --git a/plugins/CrashDumper/src/utils.cpp b/plugins/CrashDumper/src/utils.cpp
index 625ca46ae5..1bb3b770aa 100644
--- a/plugins/CrashDumper/src/utils.cpp
+++ b/plugins/CrashDumper/src/utils.cpp
@@ -830,6 +830,6 @@ bool IsPluginEnabled(TCHAR* filename)
char* fname;
crsi_t2a(fname, filename);
char* ext = strstr(_strlwr(fname), ".dll");
- bool res = ext && ext[4] == '\0' && DBGetContactSettingByte(NULL, "PluginDisable", fname, 0) == 0;
+ bool res = ext && ext[4] == '\0' && db_get_b(NULL, "PluginDisable", fname, 0) == 0;
return res;
}