37 |
|
|
38 |
|
unit IBServices; |
39 |
|
|
40 |
+ |
{$Mode Delphi} |
41 |
+ |
|
42 |
|
interface |
43 |
|
|
44 |
|
uses |
45 |
< |
Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs, |
45 |
> |
{$IFDEF LINUX } |
46 |
> |
unix, |
47 |
> |
{$ELSE} |
48 |
> |
{$DEFINE HAS_SQLMONITOR} |
49 |
> |
Windows, |
50 |
> |
{$ENDIF} |
51 |
> |
Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs, |
52 |
|
IBDialogs, IBHeader, IB, IBExternals; |
53 |
|
|
54 |
|
const |
508 |
|
implementation |
509 |
|
|
510 |
|
uses |
511 |
< |
IBIntf, IBSQLMonitor; |
511 |
> |
IBIntf {$IFDEF HAS_SQLMONITOR}, IBSQLMonitor {$ENDIF}; |
512 |
|
|
513 |
|
{ TIBCustomService } |
514 |
|
|
548 |
|
if Assigned(FOnAttach) then |
549 |
|
FOnAttach(Self); |
550 |
|
|
551 |
+ |
{$IFDEF HAS_SQLMONITOR} |
552 |
|
MonitorHook.ServiceAttach(Self); |
553 |
+ |
{$ENDIF} |
554 |
|
end; |
555 |
|
|
556 |
|
procedure TIBCustomService.Loaded; |
644 |
|
FHandle := nil; |
645 |
|
FLoginPrompt := True; |
646 |
|
FTraceFlags := []; |
647 |
+ |
FOutputbuffer := nil; |
648 |
|
end; |
649 |
|
|
650 |
|
destructor TIBCustomService.Destroy; |
657 |
|
FSPB := nil; |
658 |
|
FParams.Free; |
659 |
|
end; |
660 |
+ |
ReallocMem(FOutputBuffer, 0); |
661 |
|
inherited Destroy; |
662 |
|
end; |
663 |
|
|
671 |
|
end |
672 |
|
else |
673 |
|
FHandle := nil; |
674 |
+ |
{$IFDEF HAS_SQLMONITOR} |
675 |
|
MonitorHook.ServiceDetach(Self); |
676 |
+ |
{$ENDIF} |
677 |
|
end; |
678 |
|
|
679 |
|
function TIBCustomService.GetActive: Boolean; |
727 |
|
FQuerySPBLength := 0; |
728 |
|
FQueryParams := ''; |
729 |
|
end; |
730 |
+ |
{$IFDEF HAS_SQLMONITOR} |
731 |
|
MonitorHook.ServiceQuery(Self); |
732 |
+ |
{$ENDIF} |
733 |
|
end; |
734 |
|
|
735 |
|
procedure TIBCustomService.SetActive(const Value: Boolean); |
737 |
|
if csReading in ComponentState then |
738 |
|
FStreamedActive := Value |
739 |
|
else |
740 |
< |
if Value then |
741 |
< |
Attach |
742 |
< |
else |
743 |
< |
Detach; |
740 |
> |
if Value <> Active then |
741 |
> |
if Value then |
742 |
> |
Attach |
743 |
> |
else |
744 |
> |
Detach; |
745 |
|
end; |
746 |
|
|
747 |
|
procedure TIBCustomService.SetBufferSize(const Value: Integer); |
1247 |
|
FStartSPBLength := 0; |
1248 |
|
FStartParams := ''; |
1249 |
|
end; |
1250 |
+ |
{$IFDEF HAS_SQLMONITOR} |
1251 |
|
MonitorHook.ServiceStart(Self); |
1252 |
+ |
{$ENDIF} |
1253 |
|
end; |
1254 |
|
|
1255 |
|
procedure TIBControlService.ServiceStart; |
1748 |
|
for i := 0 to High(FUserInfo) do |
1749 |
|
FUserInfo[i].Free; |
1750 |
|
FUserInfo := nil; |
1751 |
< |
inherited destroy; |
1751 |
> |
inherited Destroy; |
1752 |
|
end; |
1753 |
|
|
1754 |
|
procedure TIBSecurityService.FetchUserInfo; |
2062 |
|
destructor TDatabaseInfo.Destroy; |
2063 |
|
begin |
2064 |
|
DbName := nil; |
2065 |
< |
inherited; |
2065 |
> |
inherited Destroy; |
2066 |
|
end; |
2067 |
|
|
2068 |
|
{ TLicenseInfo } |
2079 |
|
Key := nil; |
2080 |
|
Id := nil; |
2081 |
|
Desc := nil; |
2082 |
< |
inherited; |
2082 |
> |
inherited Destroy; |
2083 |
|
end; |
2084 |
|
|
2085 |
|
{ TConfigFileData } |
2094 |
|
begin |
2095 |
|
ConfigFileValue := nil; |
2096 |
|
ConfigFileKey := nil; |
2097 |
< |
inherited; |
2097 |
> |
inherited Destroy; |
2098 |
|
end; |
2099 |
|
|
2100 |
|
{ TConfigParams } |
2109 |
|
begin |
2110 |
|
ConfigFileData.Free; |
2111 |
|
ConfigFileParams := nil; |
2112 |
< |
inherited; |
2112 |
> |
inherited Destroy; |
2113 |
|
end; |
2114 |
|
|
2115 |
|
end. |