diff options
author | George Hazan <george.hazan@gmail.com> | 2013-06-29 18:16:23 +0000 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2013-06-29 18:16:23 +0000 |
commit | de5dce707cc60ace5b92d2ac61914c590cb9680b (patch) | |
tree | 64f2ee6639edeefcc9a32425d10cd56463dab6a4 /plugins/HistoryPlusPlus/hpp_database.pas | |
parent | 13952bddf4931ed75338460754860a81d3710678 (diff) |
rest of unused databases services removed
git-svn-id: http://svn.miranda-ng.org/main/trunk@5181 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/HistoryPlusPlus/hpp_database.pas')
-rw-r--r-- | plugins/HistoryPlusPlus/hpp_database.pas | 31 |
1 files changed, 5 insertions, 26 deletions
diff --git a/plugins/HistoryPlusPlus/hpp_database.pas b/plugins/HistoryPlusPlus/hpp_database.pas index 483e5c553d..4341fa64e2 100644 --- a/plugins/HistoryPlusPlus/hpp_database.pas +++ b/plugins/HistoryPlusPlus/hpp_database.pas @@ -115,12 +115,8 @@ end; function DBExists(const hContact: THandle; const Module, Param: AnsiString): Boolean;
var
dbv: TDBVARIANT;
- cgs: TDBCONTACTGETSETTING;
begin
- cgs.szModule := PAnsiChar(Module);
- cgs.szSetting := PAnsiChar(Param);
- cgs.pValue := @dbv;
- Result := (CallService(MS_DB_CONTACT_GETSETTING, hContact, lParam(@cgs)) = 0);
+ Result := (db_get(hContact, PAnsiChar(Module), PAnsiChar(Param), @dbv) = 0);
if Result then
DBFreeVariant(@dbv);
end;
@@ -262,15 +258,10 @@ end; function GetDBBlob(const hContact: THandle; const Module,Param: AnsiString; var Value: Pointer; var Size: Integer): Boolean;
var
- cgs: TDBContactGetSetting;
dbv: TDBVARIANT;
begin
Result := False;
- ZeroMemory(@cgs,SizeOf(cgs));
- cgs.szModule := PAnsiChar(Module);
- cgs.szSetting := PAnsiChar(Param);
- cgs.pValue := @dbv;
- if CallService(MS_DB_CONTACT_GETSETTING, hContact, lParam(@cgs)) <> 0 then exit;
+ if db_get(hContact, PAnsiChar(Module), PAnsiChar(Param), @dbv) <> 0 then exit;
Size := dbv.cpbVal;
Value := nil;
if dbv.cpbVal = 0 then exit;
@@ -327,15 +318,11 @@ end; function GetDBInt(const hContact: THandle; const Module,Param: AnsiString; Default: Integer): Integer;
var
- cws:TDBCONTACTGETSETTING;
dbv:TDBVariant;
begin
dbv._type := DBVT_DWORD;
dbv.dVal:=Default;
- cws.szModule:=PAnsiChar(Module);
- cws.szSetting:=PAnsiChar(Param);
- cws.pValue:=@dbv;
- if CallService(MS_DB_CONTACT_GETSETTING,hContact,LPARAM(@cws))<>0 then
+ if db_get(hContact,PAnsiChar(Module),PAnsiChar(Param),@dbv)<>0 then
Result:=default
else
Result:=dbv.dval;
@@ -354,13 +341,9 @@ end; function DBGetContactSettingString(hContact: THandle; const szModule: PAnsiChar; const szSetting: PAnsiChar; ErrorValue: PAnsiChar): AnsiString;
var
dbv: TDBVARIANT;
- cgs: TDBCONTACTGETSETTING;
tmp: WideString;
begin
- cgs.szModule := szModule;
- cgs.szSetting := szSetting;
- cgs.pValue := @dbv;
- if CallService(MS_DB_CONTACT_GETSETTING, hContact, lParam(@cgs)) <> 0 then
+ if db_get(hContact, szModule, szSetting, @dbv) <> 0 then
Result := ErrorValue
else begin
case dbv._type of
@@ -391,12 +374,8 @@ end; function DBGetContactSettingWideString(hContact: THandle; const szModule: PAnsiChar; const szSetting: PAnsiChar; ErrorValue: PWideChar): WideString;
var
dbv: TDBVARIANT;
- cgs: TDBCONTACTGETSETTING;
begin
- cgs.szModule := szModule;
- cgs.szSetting := szSetting;
- cgs.pValue := @dbv;
- if CallService(MS_DB_CONTACT_GETSETTING, hContact, lParam(@cgs)) <> 0 then
+ if db_get(hContact, szModule, szSetting, @dbv) <> 0 then
Result := ErrorValue
else begin
case dbv._type of
|