Forráskód Böngészése

* fcl-rpc namespaced

Michaël Van Canneyt 1 éve
szülő
commit
2026290a99

+ 3 - 0
packages/fcl-rpc/namespaced/FpRPC.Client.pas

@@ -0,0 +1,3 @@
+{$DEFINE FPC_DOTTEDUNITS}
+unit FpRPC.Client;
+{$include ../src/fprpcclient.pp}

+ 3 - 0
packages/fcl-rpc/namespaced/FpRPC.CodeGen.pas

@@ -0,0 +1,3 @@
+{$DEFINE FPC_DOTTEDUNITS}
+unit FpRPC.CodeGen;
+{$include ../src/fprpccodegen.pp}

+ 26 - 1
packages/fcl-rpc/fprpcclient.pp → packages/fcl-rpc/src/fprpcclient.pp

@@ -1,4 +1,20 @@
+{
+    This file is part of the Pas2JS run time library.
+    Copyright (c) 2023 by Michael Van Canneyt
+    
+    JSON-RPC Client 
+
+    See the file COPYING.FPC, included in this distribution,
+    for details about the copyright.
+
+    This program is distributed in the hope that it will be useful,
+    but WITHOUT ANY WARRANTY; without even the implied warranty of
+    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+
+ **********************************************************************}
+{$IFNDEF FPC_DOTTEDUNITS}
 unit fprpcclient;
+{$ENDIF}
 
 {$mode ObjFPC}
 {$modeswitch advancedrecords}
@@ -6,7 +22,11 @@ unit fprpcclient;
 interface
 
 uses
+{$IFDEF FPC_DOTTEDUNITS}
+  System.Classes, System.SysUtils, JSApi.JS;
+{$ELSE}
   Classes, SysUtils, JS;
+{$ENDIF}
 
 Const
   DefaultJSONRPCversion = '2.0';
@@ -228,7 +248,12 @@ Type
 
 implementation
 
-uses web;
+uses
+{$IFDEF FPC_DOTTEDUNITS}
+  BrowserApi.Web;
+{$ELSE}
+  web;
+{$ENDIF}
 
 { TRPCCustomService }
 

+ 21 - 1
packages/fcl-rpc/fprpccodegen.pp → packages/fcl-rpc/src/fprpccodegen.pp

@@ -1,12 +1,32 @@
+{
+    This file is part of the Pas2JS run time library.
+    Copyright (c) 2023 by Michael Van Canneyt
+    
+    JSON-RPC Client code generation
+
+    See the file COPYING.FPC, included in this distribution,
+    for details about the copyright.
+
+    This program is distributed in the hope that it will be useful,
+    but WITHOUT ANY WARRANTY; without even the implied warranty of
+    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+
+ **********************************************************************}
+{$IFNDEF FPC_DOTTEDUNITS}
 unit fprpccodegen;
+{$ENDIF}
 
 {$mode ObjFPC}
 {$h+}
+
 interface
 
 uses
+{$IFDEF FPC_DOTTEDUNITS}
+  System.Classes, System.SysUtils, FpJson.Data, Pascal.CodeGenerator;
+{$ELSE}
   Classes, SysUtils, fpjson, pascodegen;
-
+{$ENDIF}
 type
 
   { TAPIClientCodeGen }