* Fixed namespaced compilation, rename sender to client to be in line with class name

This commit is contained in:
Michaël Van Canneyt 2024-03-17 14:24:31 +01:00
parent 5ea775dc58
commit 2cec5996df
9 changed files with 32 additions and 12 deletions

View File

@ -6,7 +6,7 @@ uses
{$IFDEF UNIX}
cthreads,
{$ENDIF}
Classes, SysUtils, CustApp, fpjson, jsonparser, fpfcmsender, opensslsockets, fpfcmtypes, fpwebclient, fphttpwebclient;
Classes, SysUtils, CustApp, fpjson, jsonparser, fpfcmclient, opensslsockets, fpfcmtypes, fpwebclient, fphttpwebclient;
type

View File

@ -20,7 +20,7 @@ unit module.messaging;
interface
uses
Classes, SysUtils, fpjsonrpc, fpjson, fpfcmtypes, fpfcmsender;
Classes, SysUtils, fpjsonrpc, fpjson, fpfcmtypes, fpfcmclient;
type

View File

@ -527,7 +527,7 @@ begin
AddUnit('fpjwt');
AddUnit('fpfcmstrings');
end;
T:=P.Targets.AddUnit('fpfcmsender.pp');
T:=P.Targets.AddUnit('fpfcmclient.pp');
With T.Dependencies do
begin
AddUnit('fpfcmstrings');

View File

@ -0,0 +1,3 @@
{$DEFINE FPC_DOTTEDUNITS}
unit Fcm.Client;
{$i fpfcmclient.pp}

View File

@ -1,3 +0,0 @@
{$DEFINE FPC_DOTTEDUNITS}
unit Fcm.Sender;
{$i fpfcmsender.pp}

View File

@ -100,6 +100,6 @@ src/jwt/fpjwaes256.pp=namespaced/Jwt.Jwa.Es256.pp
src/jwt/fpjwasha256.pp=namespaced/Jwt.Jwa.Sha256.pp
src/jwt/fpjwt.pp=namespaced/Jwt.Types.pp
src/jwt/fpoauth2.pp=namespaced/Jwt.Oauth2.pp
src/fcm/fpfcmsender.pp=Fcm.Sender.pp
src/fcm/fpfcmclient.pp=Fcm.Client.pp
src/fcm/fpfcmstrings.pp=Fcm.Strings.pp
src/fcm/fpfcmtypes.pp=Fcm.Types.pp

View File

@ -12,8 +12,9 @@
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
**********************************************************************}
unit fpfcmsender;
{$IFNDEF FPC_DOTTEDUNITS}
unit fpfcmclient;
{$ENDIF}
{$mode ObjFPC}{$H+}
{$modeswitch typehelpers}
@ -21,8 +22,12 @@ unit fpfcmsender;
interface
uses
uses
{$IFDEF FPC_DOTTEDUNITS}
System.Classes, System.SysUtils, FpJson.Data, Jwt.Types, Fcm.Types, FpWeb.Client, System.Types;
{$ELSE}
Classes, SysUtils, fpjson, fpjwt, fpfcmtypes, fpwebclient, types;
{$ENDIF}
type
TFCMErrorStage = (esConfig, esAccessToken, esPost);
@ -145,7 +150,11 @@ type
implementation
{$IFDEF FPC_DOTTEDUNITS}
uses System.DateUtils, FpWeb.Http.Protocol, Fcm.Strings, Jwt.Jwa.Rsa, System.Hash.Pem;
{$ELSE}
uses dateutils, httpprotocol, fpfcmstrings, fpjwarsa, fppem;
{$ENDIF}
{ TFCMErrorStageHelper }

View File

@ -13,8 +13,9 @@
**********************************************************************}
{$IFNDEF FPC_DOTTEDUNITS}
unit fpfcmstrings;
{$ENDIF}
{$mode ObjFPC}{$H+}

View File

@ -13,7 +13,9 @@
**********************************************************************}
{$IFNDEF FPC_DOTTEDUNITS}
unit fpfcmtypes;
{$ENDIF}
{$mode ObjFPC}
{$H+}
@ -22,7 +24,11 @@ unit fpfcmtypes;
interface
uses
{$IFDEF FPC_DOTTEDUNITS}
System.Classes, System.SysUtils, FpJson.Data, Jwt.Types;
{$ELSE}
Classes, SysUtils, fpjson, fpjwt;
{$ENDIF}
Type
EFCM = Class(Exception)
@ -441,8 +447,12 @@ Type
implementation
uses dateutils, fpfcmstrings;
{$IFDEF FPC_DOTTEDUNITS}
uses System.DateUtils, FCM.Strings;
{$ELSE}
uses dateutils, fpfcmstrings;
{$ENDIF}
{ TServiceAccountData }
function TServiceAccountData.Parse(const AJSON: string): Boolean;