ViewVC Help
View File | Revision Log | Show Annotations | Download File | View Changeset | Root Listing
root/public/ibx/branches/udr/client/FBActivityMonitor.pas
(Generate patch)

Comparing:
ibx/trunk/fbintf/client/FBActivityMonitor.pas (file contents), Revision 87 by tony, Mon Jan 1 11:31:26 2018 UTC vs.
ibx/branches/udr/client/FBActivityMonitor.pas (file contents), Revision 379 by tony, Mon Jan 10 10:08:03 2022 UTC

# Line 91 | Line 91 | type
91     reports.}
92  
93    IActivityMonitor = interface
94 +    ['{8261840a-741b-4c1c-94ea-c5c66ba72f22}']
95      procedure AddObject(obj: TInterfacedObject);
96      procedure Remove(intf: TInterfacedObject);
97      procedure SignalActivity;
# Line 107 | Line 108 | type
108      interface, implemented through the helper object TTransactionMonitor.
109    }
110  
111 +  TOnDatabaseError = procedure of object;
112 +
113    TActivityReporter = class(TInterfaceOwner)
114    private
115      FHasActivity: boolean;
116      FMonitors: array of IActivityMonitor;
117 +    FOnDatabaseError: TOnDatabaseError;
118      function FindMonitor(aMonitor: IActivityMonitor): integer;
119    protected
120      function Call(ErrCode: ISC_STATUS; RaiseError: Boolean = true): ISC_STATUS;
# Line 121 | Line 125 | type
125      destructor Destroy; override;
126      function HasActivity: boolean;
127      procedure SignalActivity;
128 +    property OnDatabaseError: TOnDatabaseError read FOnDatabaseError write FOnDatabaseError;
129    end;
130  
131    { TActivityHandler is a base class for classes that receive activity reports.}
# Line 135 | Line 140 | type
140  
141   implementation
142  
143 < uses FB25ClientAPI;
143 > uses FBClientAPI;
144  
145   { TActivityHandler }
146  
# Line 189 | Line 194 | function TActivityReporter.Call(ErrCode:
194   begin
195    result := ErrCode;
196    SignalActivity;
197 <  if RaiseError and (ErrCode > 0) then
198 <    Firebird25ClientAPI.IBDataBaseError;
197 >  if RaiseError and (ErrCode > 0) and assigned(FOnDatabaseError) then
198 >    OnDatabaseError;
199   end;
200  
201   procedure TActivityReporter.AddMonitor(aMonitor: IActivityMonitor);

Comparing:
ibx/trunk/fbintf/client/FBActivityMonitor.pas (property svn:eol-style), Revision 87 by tony, Mon Jan 1 11:31:26 2018 UTC vs.
ibx/branches/udr/client/FBActivityMonitor.pas (property svn:eol-style), Revision 379 by tony, Mon Jan 10 10:08:03 2022 UTC

# Line 0 | Line 1
1 + native

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines