From f300a5f2877814ae97615ac3a8039719c9a3e509 Mon Sep 17 00:00:00 2001 From: Arthur Date: Thu, 22 Sep 2022 09:19:21 -0300 Subject: [PATCH] examples: update to the current fkd workflow The examples were outdated. This commit changes the daemon initialization code and json configs, also it's adds the .conf files for dbus --- examples/ping.cpp | 8 ++++---- examples/{PING.json => ping.json} | 4 ++-- examples/pong.cpp | 8 ++++---- examples/{PONG.json => pong.json} | 4 ++-- examples/zfkd.dbus.ping.conf | 10 ++++++++++ examples/zfkd.dbus.pong.conf | 10 ++++++++++ 6 files changed, 32 insertions(+), 12 deletions(-) rename examples/{PING.json => ping.json} (85%) rename examples/{PONG.json => pong.json} (85%) create mode 100644 examples/zfkd.dbus.ping.conf create mode 100644 examples/zfkd.dbus.pong.conf diff --git a/examples/ping.cpp b/examples/ping.cpp index 1fcece3..8c3a816 100644 --- a/examples/ping.cpp +++ b/examples/ping.cpp @@ -1,4 +1,4 @@ -#include "../src/classes/daemon/daemon.hpp" +#include #include class PingService : public RoutineService { @@ -61,9 +61,9 @@ class PingService : public RoutineService { int main() { - Daemon newDaemon("PING.json"); - PingService pingService("PING"); + Daemon newDaemon("ping"); + PingService pingService("ping"); newDaemon.deploy(pingService); newDaemon.run(); return 0; -} \ No newline at end of file +} diff --git a/examples/PING.json b/examples/ping.json similarity index 85% rename from examples/PING.json rename to examples/ping.json index c9d7d6c..c8b9de2 100644 --- a/examples/PING.json +++ b/examples/ping.json @@ -1,9 +1,9 @@ { "serviceId": "ping", "proxys": { - "PING":{} + "ping":{} }, "data": { "anything": "anything" } -} \ No newline at end of file +} diff --git a/examples/pong.cpp b/examples/pong.cpp index 8a761ec..e5931e0 100644 --- a/examples/pong.cpp +++ b/examples/pong.cpp @@ -1,4 +1,4 @@ -#include "../src/classes/daemon/daemon.hpp" +#include #include class PongService : public StaticService { @@ -48,9 +48,9 @@ class PongService : public StaticService { int main() { - Daemon newDaemon("PONG.json"); - PongService pongService("PONG"); + Daemon newDaemon("pong"); + PongService pongService("pong"); newDaemon.deploy(pongService); newDaemon.run(); return 0; -} \ No newline at end of file +} diff --git a/examples/PONG.json b/examples/pong.json similarity index 85% rename from examples/PONG.json rename to examples/pong.json index 1e2dbba..a454221 100644 --- a/examples/PONG.json +++ b/examples/pong.json @@ -1,9 +1,9 @@ { "serviceId": "pong", "proxys": { - "PING":{} + "pong":{} }, "data": { "anything": "anything" } -} \ No newline at end of file +} diff --git a/examples/zfkd.dbus.ping.conf b/examples/zfkd.dbus.ping.conf new file mode 100644 index 0000000..c920fc7 --- /dev/null +++ b/examples/zfkd.dbus.ping.conf @@ -0,0 +1,10 @@ + + + + + + + + diff --git a/examples/zfkd.dbus.pong.conf b/examples/zfkd.dbus.pong.conf new file mode 100644 index 0000000..be620f9 --- /dev/null +++ b/examples/zfkd.dbus.pong.conf @@ -0,0 +1,10 @@ + + + + + + + +