Skip to content

Commit

Permalink
🚧 Removing WinAPI
Browse files Browse the repository at this point in the history
  • Loading branch information
p-samuel committed Mar 12, 2023
1 parent c9647a8 commit 5ba5381
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions src/Notify.Core.pas
Original file line number Diff line number Diff line change
Expand Up @@ -63,8 +63,10 @@ TNotifyCore = class sealed(TInterfacedObject, INotifyCore)
function Response: TNotifyApiResponse;
procedure BasicValidation;
procedure DoLoadLibrary;
procedure LoadLibraries(const ALibName: String);
procedure WithAuthentication;
{$IF DEFINED(NTFY_HTTP_INDY)}
procedure LoadLibraries(const ALibName: String);
{$IFEND}
end;

implementation
Expand All @@ -80,8 +82,10 @@ implementation
Notify.Action.DTO,
Notify.Attachment.DTO,
Notify.Action.Contract,
Notify.Attachment.Contract,
Winapi.Windows;
Notify.Attachment.Contract
{$IF DEFINED(NTFY_HTTP_INDY)}
Winapi.Windows
{$IFEND};

{ TNotifyCore }

Expand Down Expand Up @@ -251,6 +255,7 @@ procedure TNotifyCore.ConsoleLogEvent;

end;

{$IF DEFINED(NTFY_HTTP_INDY)}
procedure TNotifyCore.LoadLibraries(const ALibName: String);
var
LSavedCW: Word;
Expand All @@ -273,6 +278,7 @@ procedure TNotifyCore.LoadLibraries(const ALibName: String);
raise Exception.Create(Format('Could not load %s library. Errors: %s', [ALibName, LError]));
end
end;
{$IFEND}

function TNotifyCore.LogPath(const AValue: String): INotifyCore;
begin
Expand Down

0 comments on commit 5ba5381

Please sign in to comment.