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

Comparing:
ibx/trunk/fbintf/client/3.0/FB30Events.pas (file contents), Revision 217 by tony, Fri Mar 16 10:27:26 2018 UTC vs.
ibx/branches/udr/client/3.0/FB30Events.pas (file contents), Revision 381 by tony, Sat Jan 15 00:06:22 2022 UTC

# Line 78 | Line 78 | type
78      FEventsIntf: Firebird.IEvents;
79      FAsyncEventCallback: TEventhandlerInterface;
80      FSyncEventCallback: TEventhandlerInterface;
81 +    FFirebird30ClientAPI: TFB30ClientAPI;
82      procedure InternalAsyncWaitForEvent(EventHandler: TEventHandler; EventCallBack: TEventhandlerInterface);
83      procedure ReleaseIntf;
84    protected
# Line 88 | Line 89 | type
89      destructor Destroy; override;
90  
91      {IEvents}
92 <    procedure WaitForEvent;
92 >    procedure WaitForEvent; override;
93      procedure AsyncWaitForEvent(EventHandler: TEventHandler); override;
94    end;
95  
# Line 214 | Line 215 | begin
215    begin
216      FEventHandler.WaitForEvent;
217      {$IFDEF EVENTDEBUG}  writeln('Event Handler Ends Wait ',Terminated); {$ENDIF}
217
218      if not Terminated  then
219        FOwner.EventSignaled;
220    end;
# Line 245 | Line 245 | begin
245    try
246      if not FInWaitState then Exit;
247      if FEventsIntf <> nil then
248 <    with Firebird30ClientAPI do
248 >    with FFirebird30ClientAPI do
249      begin
250        FEventsIntf.Cancel(StatusIntf);
251        if not Force then
# Line 274 | Line 274 | begin
274  
275      FEventHandler := EventHandler;
276      ReleaseIntf;
277 <    with Firebird30ClientAPI do
277 >    with FFirebird30ClientAPI do
278      begin
279        FEventsIntf := FAttachmentIntf.queEvents(
280                                  StatusIntf,EventCallBack,
# Line 299 | Line 299 | constructor TFB30Events.Create(DBAttachm
299   begin
300    inherited Create(DBAttachment,DBAttachment,Events);
301    FAttachmentIntf := DBAttachment.AttachmentIntf;
302 +  FFirebird30ClientAPI := DBAttachment.Firebird30ClientAPI;
303    FSyncEventCallback := TEventhandlerInterface.Create(self,'Sync');
304 +  FAsyncEventCallback := TEventhandlerInterface.Create(self,'Async');
305 +  FEventHandlerThread := TEventHandlerThread.Create(self,FAsyncEventCallback);
306   end;
307  
308   destructor TFB30Events.Destroy;
# Line 315 | Line 318 | end;
318  
319   procedure TFB30Events.AsyncWaitForEvent(EventHandler: TEventHandler);
320   begin
318  {Seems like we have to create a new callback object each time to avoid empty events}
319  if assigned(FEventHandlerThread) then
320    TEventHandlerThread(FEventHandlerThread).Terminate;
321  if assigned(FAsyncEventCallback) then TEventhandlerInterface(FAsyncEventCallback).release;
322  FAsyncEventCallback := TEventhandlerInterface.Create(self,'Async');
323  FEventHandlerThread := TEventHandlerThread.Create(self,FAsyncEventCallback);
321    InternalAsyncWaitForEvent(EventHandler,FAsyncEventCallback);
322   end;
323  

Comparing:
ibx/trunk/fbintf/client/3.0/FB30Events.pas (property svn:eol-style), Revision 217 by tony, Fri Mar 16 10:27:26 2018 UTC vs.
ibx/branches/udr/client/3.0/FB30Events.pas (property svn:eol-style), Revision 381 by tony, Sat Jan 15 00:06:22 2022 UTC

# Line 0 | Line 1
1 + native

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines