ViewVC Help
View File | Revision Log | Show Annotations | Download File | View Changeset | Root Listing
root/public/ibx/trunk/fbintf/client/3.0/firebird/Firebird.pas
(Generate patch)

Comparing ibx/trunk/fbintf/client/3.0/firebird/Firebird.pas (file contents):
Revision 344 by tony, Thu Feb 25 11:56:36 2021 UTC vs.
Revision 345 by tony, Mon Aug 23 14:22:29 2021 UTC

# Line 1 | Line 1
1   { This file was autogenerated by cloop - Cross Language Object Oriented Programming }
2  
3 { This file was autogenerated by cloop - Cross Language Object Oriented Programming }
4
5
3   {Note that for use with IBX, type TISC_QUAD is used instead of ISC_QUAD. TISC_QUAD is
4   sourced from unit IB
5  
6 < Common types moved to IBExternals.
6 > Common types moved to IBExternals.
7 >
8 > BytePtr is now type equivalent to PByte.
9  
10   Use of FBException is now conditional and not used for IBX.
11  
# Line 22 | Line 21 | When testing with FPC, if this line was
21   manager (needed for testing for memory leaks).
22   }
23  
24 + { $DEFINE USEFBEXCEPTION}
25 +
26   {$IFDEF MSWINDOWS}
27   {$DEFINE WINDOWS}
28   {$ENDIF}
# Line 176 | Line 177 | type
177                  dsc_address: ^Byte;
178          end;
179          BooleanPtr = ^Boolean;
180 <        BytePtr = ^Byte;
180 >        BytePtr = PByte;
181          CardinalPtr = ^Cardinal;
182          FB_DEC16Ptr = ^FB_DEC16;
183          FB_DEC34Ptr = ^FB_DEC34;
# Line 344 | Line 345 | type
345          IBatch_getBlobAlignmentPtr = function(this: IBatch; status: IStatus): Cardinal; cdecl;
346          IBatch_getMetadataPtr = function(this: IBatch; status: IStatus): IMessageMetadata; cdecl;
347          IBatch_setDefaultBpbPtr = procedure(this: IBatch; status: IStatus; parLength: Cardinal; par: BytePtr); cdecl;
348 +        IBatch_closePtr = procedure(this: IBatch; status: IStatus); cdecl;
349          IBatchCompletionState_getSizePtr = function(this: IBatchCompletionState; status: IStatus): Cardinal; cdecl;
350          IBatchCompletionState_getStatePtr = function(this: IBatchCompletionState; status: IStatus; pos: Cardinal): Integer; cdecl;
351          IBatchCompletionState_findErrorPtr = function(this: IBatchCompletionState; status: IStatus; pos: Cardinal): Cardinal; cdecl;
# Line 679 | Line 681 | type
681          IReplicatedTransaction_deleteRecordPtr = procedure(this: IReplicatedTransaction; status: IStatus; name: PAnsiChar; record_: IReplicatedRecord); cdecl;
682          IReplicatedTransaction_executeSqlPtr = procedure(this: IReplicatedTransaction; status: IStatus; sql: PAnsiChar); cdecl;
683          IReplicatedTransaction_executeSqlIntlPtr = procedure(this: IReplicatedTransaction; status: IStatus; charset: Cardinal; sql: PAnsiChar); cdecl;
684 <        IReplicatedSession_setAttachmentPtr = procedure(this: IReplicatedSession; attachment: IAttachment); cdecl;
684 >        IReplicatedSession_initPtr = function(this: IReplicatedSession; status: IStatus; attachment: IAttachment): Boolean; cdecl;
685          IReplicatedSession_startTransactionPtr = function(this: IReplicatedSession; status: IStatus; transaction: ITransaction; number: Int64): IReplicatedTransaction; cdecl;
686          IReplicatedSession_cleanupTransactionPtr = procedure(this: IReplicatedSession; status: IStatus; number: Int64); cdecl;
687          IReplicatedSession_setSequencePtr = procedure(this: IReplicatedSession; status: IStatus; name: PAnsiChar; value: Int64); cdecl;
# Line 1497 | Line 1499 | type
1499                  getBlobAlignment: IBatch_getBlobAlignmentPtr;
1500                  getMetadata: IBatch_getMetadataPtr;
1501                  setDefaultBpb: IBatch_setDefaultBpbPtr;
1502 +                close: IBatch_closePtr;
1503          end;
1504  
1505          IBatch = class(IReferenceCounted)
# Line 1523 | Line 1526 | type
1526                  function getBlobAlignment(status: IStatus): Cardinal;
1527                  function getMetadata(status: IStatus): IMessageMetadata;
1528                  procedure setDefaultBpb(status: IStatus; parLength: Cardinal; par: BytePtr);
1529 +                procedure close(status: IStatus);
1530          end;
1531  
1532          IBatchImpl = class(IBatch)
# Line 1540 | Line 1544 | type
1544                  function getBlobAlignment(status: IStatus): Cardinal; virtual; abstract;
1545                  function getMetadata(status: IStatus): IMessageMetadata; virtual; abstract;
1546                  procedure setDefaultBpb(status: IStatus; parLength: Cardinal; par: BytePtr); virtual; abstract;
1547 +                procedure close(status: IStatus); virtual; abstract;
1548          end;
1549  
1550          BatchCompletionStateVTable = class(DisposableVTable)
# Line 3634 | Line 3639 | type
3639          end;
3640  
3641          ReplicatedSessionVTable = class(PluginBaseVTable)
3642 <                setAttachment: IReplicatedSession_setAttachmentPtr;
3642 >                init: IReplicatedSession_initPtr;
3643                  startTransaction: IReplicatedSession_startTransactionPtr;
3644                  cleanupTransaction: IReplicatedSession_cleanupTransactionPtr;
3645                  setSequence: IReplicatedSession_setSequencePtr;
# Line 3643 | Line 3648 | type
3648          IReplicatedSession = class(IPluginBase)
3649                  const VERSION = 4;
3650  
3651 <                procedure setAttachment(attachment: IAttachment);
3651 >                function init(status: IStatus; attachment: IAttachment): Boolean;
3652                  function startTransaction(status: IStatus; transaction: ITransaction; number: Int64): IReplicatedTransaction;
3653                  procedure cleanupTransaction(status: IStatus; number: Int64);
3654                  procedure setSequence(status: IStatus; name: PAnsiChar; value: Int64);
# Line 3656 | Line 3661 | type
3661                  function release(): Integer; virtual; abstract;
3662                  procedure setOwner(r: IReferenceCounted); virtual; abstract;
3663                  function getOwner(): IReferenceCounted; virtual; abstract;
3664 <                procedure setAttachment(attachment: IAttachment); virtual; abstract;
3664 >                function init(status: IStatus; attachment: IAttachment): Boolean; virtual; abstract;
3665                  function startTransaction(status: IStatus; transaction: ITransaction; number: Int64): IReplicatedTransaction; virtual; abstract;
3666                  procedure cleanupTransaction(status: IStatus; number: Int64); virtual; abstract;
3667                  procedure setSequence(status: IStatus; name: PAnsiChar; value: Int64); virtual; abstract;
3668          end;
3669  
3670 < {       function fb_get_master_interface : IMaster; cdecl; external 'fbclient';}
3670 >        {function fb_get_master_interface : IMaster; cdecl; external 'fbclient';}
3671 >
3672  
3673   implementation
3674  
# Line 4522 | Line 4528 | begin
4528          {$IFDEF USEFBEXCEPTION}FbException.checkException(status);{$ENDIF}
4529   end;
4530  
4531 + procedure IBatch.close(status: IStatus);
4532 + begin
4533 +        BatchVTable(vTable).close(Self, status);
4534 +        {$IFDEF USEFBEXCEPTION}FbException.checkException(status);{$ENDIF}
4535 + end;
4536 +
4537   function IBatchCompletionState.getSize(status: IStatus): Cardinal;
4538   begin
4539          Result := BatchCompletionStateVTable(vTable).getSize(Self, status);
# Line 6381 | Line 6393 | begin
6393          {$IFDEF USEFBEXCEPTION}FbException.checkException(status);{$ENDIF}
6394   end;
6395  
6396 < procedure IReplicatedSession.setAttachment(attachment: IAttachment);
6396 > function IReplicatedSession.init(status: IStatus; attachment: IAttachment): Boolean;
6397   begin
6398 <        ReplicatedSessionVTable(vTable).setAttachment(Self, attachment);
6398 >        Result := ReplicatedSessionVTable(vTable).init(Self, status, attachment);
6399 >        {$IFDEF USEFBEXCEPTION}FbException.checkException(status);{$ENDIF}
6400   end;
6401  
6402   function IReplicatedSession.startTransaction(status: IStatus; transaction: ITransaction; number: Int64): IReplicatedTransaction;
# Line 8208 | Line 8221 | begin
8221          end
8222   end;
8223  
8224 + procedure IBatchImpl_closeDispatcher(this: IBatch; status: IStatus); cdecl;
8225 + begin
8226 +        try
8227 +                IBatchImpl(this).close(status);
8228 +        except
8229 +                on e: Exception do FbException.catchException(status, e);
8230 +        end
8231 + end;
8232 +
8233   var
8234          IBatchImpl_vTable: BatchVTable;
8235  
# Line 12718 | Line 12740 | begin
12740          end
12741   end;
12742  
12743 < procedure IReplicatedSessionImpl_setAttachmentDispatcher(this: IReplicatedSession; attachment: IAttachment); cdecl;
12743 > function IReplicatedSessionImpl_initDispatcher(this: IReplicatedSession; status: IStatus; attachment: IAttachment): Boolean; cdecl;
12744   begin
12745          try
12746 <                IReplicatedSessionImpl(this).setAttachment(attachment);
12746 >                Result := IReplicatedSessionImpl(this).init(status, attachment);
12747          except
12748 <                on e: Exception do FbException.catchException(nil, e);
12748 >                on e: Exception do FbException.catchException(status, e);
12749          end
12750   end;
12751  
# Line 13057 | Line 13079 | initialization
13079          IBatchImpl_vTable.getBlobAlignment := @IBatchImpl_getBlobAlignmentDispatcher;
13080          IBatchImpl_vTable.getMetadata := @IBatchImpl_getMetadataDispatcher;
13081          IBatchImpl_vTable.setDefaultBpb := @IBatchImpl_setDefaultBpbDispatcher;
13082 +        IBatchImpl_vTable.close := @IBatchImpl_closeDispatcher;
13083  
13084          IBatchCompletionStateImpl_vTable := BatchCompletionStateVTable.create;
13085          IBatchCompletionStateImpl_vTable.version := 3;
# Line 13708 | Line 13731 | initialization
13731          IReplicatedSessionImpl_vTable.release := @IReplicatedSessionImpl_releaseDispatcher;
13732          IReplicatedSessionImpl_vTable.setOwner := @IReplicatedSessionImpl_setOwnerDispatcher;
13733          IReplicatedSessionImpl_vTable.getOwner := @IReplicatedSessionImpl_getOwnerDispatcher;
13734 <        IReplicatedSessionImpl_vTable.setAttachment := @IReplicatedSessionImpl_setAttachmentDispatcher;
13734 >        IReplicatedSessionImpl_vTable.init := @IReplicatedSessionImpl_initDispatcher;
13735          IReplicatedSessionImpl_vTable.startTransaction := @IReplicatedSessionImpl_startTransactionDispatcher;
13736          IReplicatedSessionImpl_vTable.cleanupTransaction := @IReplicatedSessionImpl_cleanupTransactionDispatcher;
13737          IReplicatedSessionImpl_vTable.setSequence := @IReplicatedSessionImpl_setSequenceDispatcher;

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines