summaryrefslogtreecommitdiff
path: root/plugins/Utils.pas
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2016-09-14 18:01:49 +0000
committerGeorge Hazan <george.hazan@gmail.com>2016-09-14 18:01:49 +0000
commit7bdb598e26e7e98788933af43090d34027166969 (patch)
tree65c215c0693c86134e471f0746e9726b645b51bb /plugins/Utils.pas
parent9f285a935709f4dda1065d6450739476168c43af (diff)
second major wipeout of database services & structures:
- DBCONTACTENUMSETTINGS removed; - all helpers moved to mir_core.dll git-svn-id: http://svn.miranda-ng.org/main/trunk@17296 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/Utils.pas')
-rw-r--r--plugins/Utils.pas/dbsettings.pas16
-rw-r--r--plugins/Utils.pas/mircontacts.pas2
-rw-r--r--plugins/Utils.pas/srvblock.pas2
3 files changed, 6 insertions, 14 deletions
diff --git a/plugins/Utils.pas/dbsettings.pas b/plugins/Utils.pas/dbsettings.pas
index c60220e3a2..32ba169808 100644
--- a/plugins/Utils.pas/dbsettings.pas
+++ b/plugins/Utils.pas/dbsettings.pas
@@ -217,7 +217,6 @@ end;
function DBDeleteGroup(hContact:TMCONTACT;szModule:PAnsiChar;prefix:PAnsiChar=nil):int_ptr;
var
- ces:TDBCONTACTENUMSETTINGS;
p:PAnsiChar;
code,num:integer;
ptr:PAnsiChar;
@@ -227,26 +226,19 @@ var
begin
if (prefix=nil) or (prefix^=#0) then
begin
- DbModule_Delete(hContact,szModule);
+ db_delete_module(hContact,szModule);
result:=0;
exit;
end;
- ces.szModule:=szModule;
- num:=0;
//calculate size for setting names buffer
- ces.pfnEnumProc:=@EnumSettingsProcCalc;
- ces.lParam :=lParam(@num);
- ces.ofsSettings:=0;
- CallService(MS_DB_CONTACT_ENUMSETTINGS,hContact,lparam(@ces));
+ num:=0;
+ db_enum_settings(hContact,@EnumSettingsProcCalc,szModule,@num);
//get setting names list
GetMem(p,num+1);
ptr:=p;
- ces.pfnEnumProc:=@EnumSettingsProc;
- ces.lParam :=lparam(@ptr);
- ces.ofsSettings:=0;
- result:=CallService(MS_DB_CONTACT_ENUMSETTINGS,hContact,lparam(@ces));
+ result:=db_enum_settings(hContact,@EnumSettingsProc,szModule,@ptr);
ptr^:=#0;
ptr:=p;
diff --git a/plugins/Utils.pas/mircontacts.pas b/plugins/Utils.pas/mircontacts.pas
index cb87d93b5a..d9e2e2bf7e 100644
--- a/plugins/Utils.pas/mircontacts.pas
+++ b/plugins/Utils.pas/mircontacts.pas
@@ -459,7 +459,7 @@ begin
{
CallService(MS_CLIST_CONTACTDOUBLECLICKED,hContact,0);
}
- if (hContact<>0) and (CallService(MS_DB_CONTACT_IS,hContact,0)<>0) then
+ if (hContact<>0) and (db_is_contact(hContact)<>0) then
begin
if StrCopy(pc,GetContactProto(hContact))<>nil then
if DblClk or (DBReadByte(hContact,pc,'ChatRoom',0)=1) then // chat room
diff --git a/plugins/Utils.pas/srvblock.pas b/plugins/Utils.pas/srvblock.pas
index cf7b4125eb..6a0e0adfe0 100644
--- a/plugins/Utils.pas/srvblock.pas
+++ b/plugins/Utils.pas/srvblock.pas
@@ -561,7 +561,7 @@ begin
mFreeMem(lservice);
if StrPos(buf,protostr)<>nil then
- if CallService(MS_DB_CONTACT_IS,data.Parameter,0)<>0 then
+ if db_is_contact(data.Parameter)<>0 then
StrReplace(buf,protostr,Proto_GetBaseAccountName(data.Parameter))
else
Exit;