* fcl-rpc namespaced

This commit is contained in:
Michaël Van Canneyt 2023-11-26 21:23:18 +01:00
parent 8b9c9cd5d6
commit 2026290a99
4 changed files with 53 additions and 2 deletions

View File

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

View File

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

View File

@ -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 }

View File

@ -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 }