Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New unit for NetHTTP #33

Open
wants to merge 20 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 15 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -67,3 +67,10 @@ __recovery/

# Boss dependency manager vendor folder https://github.com/HashLoad/boss
modules/

#Android
*Android64/
*Android32/
*.res
*.xml
*.deployproj
50 changes: 13 additions & 37 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ You need to add ```src``` folder to your library path or search path.

## ⚙️ Boss Installation

Boss is a dependecy manager for Delphi created by [Hashload](https://github.com/HashLoad) community.

```
boss install github.com/hazzelnuts/ntfy-for-delphi
```
Expand Down Expand Up @@ -58,55 +60,29 @@ end;

```

There is a [VCL Sample](https://github.com/p-samuel/delphi-notify/tree/main/sample/vcl) demonstration showing you how to use Delphi Ntfy subscription mechanism into your project.
There is a [VCL Sample](https://github.com/p-samuel/delphi-notify/tree/main/sample/vcl) demonstration showing you how to utilize the subscription mechanism into your project.

## ⚙️ Supported Version & Platforms

<img src="https://img.shields.io/badge/Delphi%20Supported%20Version%20-v10.1%2B%20-blue"></img>
<img src="https://img.shields.io/badge/Supported%20Platforms-Win32%20%26%20Win64-green"></img>

It hasn't been tested in some Delphi versions yet. You can help finding out informing with a PR update to this README file. In the PR, inform the selected badged.

## ⛔ Limitations

Support to notifications that contains ```broadcast``` actions has not been implemented. Likewise, some advanced specific resources has not yet been implemented as well.

| Action | Support |
|-------------|:--------:|
| view | ✔ |
| broadcast | ❌ |
| http | ✔ |

| Subscription Type | Support |
|-------------------------|:---------:|
| json | ✔ |
| raw | ❌ |
| sse | ❌ |
| websocket | ❌ |
<img src="https://img.shields.io/badge/Delphi%20-v10.1%2B%20-blue"></img>
<img src="https://img.shields.io/badge/Windows-32%20%26%2064%20bits-green"></img>
<img src="https://img.shields.io/badge/Android-gray"></img>
<img src="https://img.shields.io/badge/IOS-gray"></img>

## 🔗 Dependencies

Ntfy for Delphi uses a few libraries in the messages subscription and publishing mechanism. There is no need to install. The respective credit adviced.

* [NxHorizon](https://github.com/dalijap/nx-horizon) by Dalija Prasnikar.
* [Indy10](https://github.com/IndySockets/Indy) by IndySockets.
* [JsonToDelphiClass](https://github.com/PKGeorgiev) by Petar Georgiev.
* NetHTTP (On development 🛠)
* [NetHTTP](https://docwiki.embarcadero.com/RADStudio/Rio/en/Using_an_HTTP_Client) native components.
* [Indy10](https://github.com/IndySockets/Indy) by IndySockets. (optional)

## 🌱 Consider Contributing

Ntfy for Delphi it's an open source project under the MIT license. Feel free to use or contribute!

## ⚠ Observations
For the moment this library uses OpenSSL and is necessary to have it in the executable's folder. Support for NetHTTP is on work.

## 🚀 Basic ntfy server
For purposes of demonstration, I created a small demo showing you how to setup your own server using railway, which is only one of many alternatives to you self-host ntfy server. Click on the link bellow.
## 📚 Wiki

> https://youtu.be/auJICXtxoNA
Check out the [wiki](https://github.com/hazzelnuts/ntfy-for-delphi/wiki) page for specific instructions or tutorials.

<div width="200px">

![Screen Shot 2023-03-24 at 17 56 41](https://user-images.githubusercontent.com/53358247/227638278-c553deda-17fb-4a23-9795-760902010dfc.png)
## 🌱 Consider Contributing

</div>
Ntfy for Delphi it's an open source project under the MIT license. Feel free to use or contribute!
30 changes: 27 additions & 3 deletions sample/Examples.groupproj → samples/Examples.groupproj
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,12 @@
<Projects Include="..\tests\NtfyForDelphiTests.dproj">
<Dependencies/>
</Projects>
<Projects Include="win-service\NtfyService.dproj">
<Dependencies/>
</Projects>
<Projects Include="android\publisher\AndroidPublisher.dproj">
<Dependencies/>
</Projects>
</ItemGroup>
<ProjectExtensions>
<Borland.Personality>Default.Personality.12</Borland.Personality>
Expand Down Expand Up @@ -71,14 +77,32 @@
<Target Name="NtfyForDelphiTests:Make">
<MSBuild Projects="..\tests\NtfyForDelphiTests.dproj" Targets="Make"/>
</Target>
<Target Name="NtfyService">
<MSBuild Projects="win-service\NtfyService.dproj"/>
</Target>
<Target Name="NtfyService:Clean">
<MSBuild Projects="win-service\NtfyService.dproj" Targets="Clean"/>
</Target>
<Target Name="NtfyService:Make">
<MSBuild Projects="win-service\NtfyService.dproj" Targets="Make"/>
</Target>
<Target Name="AndroidPublisher">
<MSBuild Projects="android\publisher\AndroidPublisher.dproj"/>
</Target>
<Target Name="AndroidPublisher:Clean">
<MSBuild Projects="android\publisher\AndroidPublisher.dproj" Targets="Clean"/>
</Target>
<Target Name="AndroidPublisher:Make">
<MSBuild Projects="android\publisher\AndroidPublisher.dproj" Targets="Make"/>
</Target>
<Target Name="Build">
<CallTarget Targets="VCLPublisher;VCLSubscriber;ConsolePublisher;ConsoleSubscriber;NtfyForDelphiTests"/>
<CallTarget Targets="VCLPublisher;VCLSubscriber;ConsolePublisher;ConsoleSubscriber;NtfyForDelphiTests;NtfyService;AndroidPublisher"/>
</Target>
<Target Name="Clean">
<CallTarget Targets="VCLPublisher:Clean;VCLSubscriber:Clean;ConsolePublisher:Clean;ConsoleSubscriber:Clean;NtfyForDelphiTests:Clean"/>
<CallTarget Targets="VCLPublisher:Clean;VCLSubscriber:Clean;ConsolePublisher:Clean;ConsoleSubscriber:Clean;NtfyForDelphiTests:Clean;NtfyService:Clean;AndroidPublisher:Clean"/>
</Target>
<Target Name="Make">
<CallTarget Targets="VCLPublisher:Make;VCLSubscriber:Make;ConsolePublisher:Make;ConsoleSubscriber:Make;NtfyForDelphiTests:Make"/>
<CallTarget Targets="VCLPublisher:Make;VCLSubscriber:Make;ConsolePublisher:Make;ConsoleSubscriber:Make;NtfyForDelphiTests:Make;NtfyService:Make;AndroidPublisher:Make"/>
</Target>
<Import Project="$(BDS)\Bin\CodeGear.Group.Targets" Condition="Exists('$(BDS)\Bin\CodeGear.Group.Targets')"/>
</Project>
14 changes: 14 additions & 0 deletions samples/android/publisher/AndroidPublisher.dpr
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
program AndroidPublisher;

uses
System.StartUpCopy,
FMX.Forms,
View.Main in 'src\View.Main.pas' {ViewMain};

{$R *.res}

begin
Application.Initialize;
Application.CreateForm(TViewMain, ViewMain);
Application.Run;
end.
Loading