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

Comparing ibx/trunk/fbintf/client/FBServices.pas (file contents):
Revision 262 by tony, Wed Mar 14 12:48:51 2018 UTC vs.
Revision 263 by tony, Thu Dec 6 15:55:01 2018 UTC

# Line 40 | Line 40 | unit FBServices;
40   interface
41  
42   uses
43 <  Classes, SysUtils, IB,  FBParamBlock, FBActivityMonitor;
43 >  Classes, SysUtils, IB,  FBParamBlock, FBActivityMonitor, FBClientAPI;
44  
45   type
46  
# Line 57 | Line 57 | type
57      FSPB: ISPB;
58      procedure InternalAttach(ConnectString: AnsiString); virtual; abstract;
59    public
60 <    constructor Create(ServerName: AnsiString; Protocol: TProtocol; SPB: ISPB; Port: AnsiString = '');
60 >    constructor Create(api: TFBClientAPI; ServerName: AnsiString; Protocol: TProtocol; SPB: ISPB; Port: AnsiString = '');
61      destructor Destroy; override;
62    public
63      {IServiceManager}
64 +    function getFirebirdAPI: IFirebirdAPI;
65      function getSPB: ISPB;
66      function getServerName: AnsiString;
67      function getProtocol: TProtocol;
# Line 75 | Line 76 | type
76  
77   implementation
78  
79 < uses FBMessages, FBClientAPI, IBUtils;
79 > uses FBMessages, IBUtils;
80  
81   { TFBServiceManager }
82  
# Line 85 | Line 86 | begin
86      IBError(ibxeServerNameMissing, [nil]);
87   end;
88  
89 < constructor TFBServiceManager.Create(ServerName: AnsiString;
89 > constructor TFBServiceManager.Create(api: TFBClientAPI; ServerName: AnsiString;
90    Protocol: TProtocol; SPB: ISPB; Port: AnsiString);
91   begin
92    inherited Create;
93 <  FFirebirdAPI := FirebirdAPI; {Keep reference to interface}
93 >  FFirebirdAPI := api.getAPI; {Keep reference to interface}
94    FProtocol := Protocol;
95    FSPB := SPB;
96    FServerName := ServerName;
# Line 103 | Line 104 | begin
104    inherited Destroy;
105   end;
106  
107 + function TFBServiceManager.getFirebirdAPI: IFirebirdAPI;
108 + begin
109 +  Result := FFirebirdAPI;
110 + end;
111 +
112   function TFBServiceManager.getSPB: ISPB;
113   begin
114    Result := FSPB;
# Line 132 | Line 138 | end;
138  
139   function TFBServiceManager.AllocateSRB: ISRB;
140   begin
141 <  Result := TSRB.Create;
141 >  Result := TSRB.Create(FFirebirdAPI as TFBClientAPI);
142   end;
143  
144   function TFBServiceManager.AllocateSQPB: ISQPB;
145   begin
146 <   Result := TSQPB.Create;
146 >   Result := TSQPB.Create(FFirebirdAPI as TFBClientAPI);
147   end;
148  
149   function TFBServiceManager.Query(Request: ISRB; RaiseExceptionOnError: boolean

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines