summaryrefslogtreecommitdiff
path: root/src/modules/protocols/protoaccs.cpp
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2012-10-07 11:42:28 +0000
committerGeorge Hazan <george.hazan@gmail.com>2012-10-07 11:42:28 +0000
commit197fe77f67654cf8c46c53376190fc321176c08b (patch)
tree1a161cf7fb7968e3781b1d11771195d9b5e4c26c /src/modules/protocols/protoaccs.cpp
parent4bcab3fc00696ca2daf1396bfc75bd49009644d6 (diff)
old database macros removed from m_database.h
git-svn-id: http://svn.miranda-ng.org/main/trunk@1796 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'src/modules/protocols/protoaccs.cpp')
-rw-r--r--src/modules/protocols/protoaccs.cpp22
1 files changed, 11 insertions, 11 deletions
diff --git a/src/modules/protocols/protoaccs.cpp b/src/modules/protocols/protoaccs.cpp
index 0b31bfab25..c21e1a85c8 100644
--- a/src/modules/protocols/protoaccs.cpp
+++ b/src/modules/protocols/protoaccs.cpp
@@ -63,8 +63,8 @@ static int EnumDbModules(const char *szModuleName, DWORD ofsModuleName, LPARAM l
void LoadDbAccounts(void)
{
DBVARIANT dbv;
- int ver = DBGetContactSettingDword(NULL, "Protocols", "PrVer", -1);
- int count = DBGetContactSettingDword(NULL, "Protocols", "ProtoCount", 0), i;
+ int ver = db_get_dw(NULL, "Protocols", "PrVer", -1);
+ int count = db_get_dw(NULL, "Protocols", "ProtoCount", 0), i;
for (i=0; i < count; i++) {
char buf[10];
@@ -83,10 +83,10 @@ void LoadDbAccounts(void)
DBFreeVariant(&dbv);
_itoa(OFFSET_VISIBLE+i, buf, 10);
- pa->bIsVisible = DBGetContactSettingDword(NULL, "Protocols", buf, 1);
+ pa->bIsVisible = db_get_dw(NULL, "Protocols", buf, 1);
_itoa(OFFSET_PROTOPOS+i, buf, 10);
- pa->iOrder = DBGetContactSettingDword(NULL, "Protocols", buf, 1);
+ pa->iOrder = db_get_dw(NULL, "Protocols", buf, 1);
if (ver >= 4) {
DBFreeVariant(&dbv);
@@ -97,7 +97,7 @@ void LoadDbAccounts(void)
}
_itoa(OFFSET_ENABLED+i, buf, 10);
- pa->bIsEnabled = DBGetContactSettingDword(NULL, "Protocols", buf, 1);
+ pa->bIsEnabled = db_get_dw(NULL, "Protocols", buf, 1);
if ( !DBGetContactSettingString(NULL, pa->szModuleName, "AM_BaseProto", &dbv)) {
pa->szProtoName = mir_strdup(dbv.pszVal);
@@ -178,21 +178,21 @@ void WriteDbAccounts()
DBWriteContactSettingString(NULL, "Protocols", buf, pa->szModuleName);
_itoa(OFFSET_PROTOPOS+i, buf, 10);
- DBWriteContactSettingDword(NULL, "Protocols", buf, pa->iOrder);
+ db_set_dw(NULL, "Protocols", buf, pa->iOrder);
_itoa(OFFSET_VISIBLE+i, buf, 10);
- DBWriteContactSettingDword(NULL, "Protocols", buf, pa->bIsVisible);
+ db_set_dw(NULL, "Protocols", buf, pa->bIsVisible);
_itoa(OFFSET_ENABLED+i, buf, 10);
- DBWriteContactSettingDword(NULL, "Protocols", buf, pa->bIsEnabled);
+ db_set_dw(NULL, "Protocols", buf, pa->bIsEnabled);
_itoa(OFFSET_NAME+i, buf, 10);
DBWriteContactSettingTString(NULL, "Protocols", buf, pa->tszAccountName);
}
DBDeleteContactSetting(0, "Protocols", "ProtoCount");
- DBWriteContactSettingDword(0, "Protocols", "ProtoCount", accounts.getCount());
- DBWriteContactSettingDword(0, "Protocols", "PrVer", 4);
+ db_set_dw(0, "Protocols", "ProtoCount", accounts.getCount());
+ db_set_dw(0, "Protocols", "PrVer", 4);
}
/////////////////////////////////////////////////////////////////////////////////////////
@@ -238,7 +238,7 @@ static int InitializeStaticAccounts(WPARAM, LPARAM)
BuildProtoMenus();
- if (count == 0 && !DBGetContactSettingByte(NULL, "FirstRun", "AccManager", 0)) {
+ if (count == 0 && !db_get_b(NULL, "FirstRun", "AccManager", 0)) {
DBWriteContactSettingByte(NULL, "FirstRun", "AccManager", 1);
CallService(MS_PROTO_SHOWACCMGR, 0, 0);
}