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

examples: update to the current fkd workflow #32

Merged
merged 1 commit into from
Sep 30, 2022
Merged
Show file tree
Hide file tree
Changes from all 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
8 changes: 4 additions & 4 deletions examples/ping.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#include "../src/classes/daemon/daemon.hpp"
#include <frameworkd/classes/daemon/daemon.hpp>
#include <iostream>

class PingService : public RoutineService {
Expand Down Expand Up @@ -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;
}
}
4 changes: 2 additions & 2 deletions examples/PING.json → examples/ping.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
{
"serviceId": "ping",
"proxys": {
"PING":{}
"ping":{}
},
"data": {
"anything": "anything"
}
}
}
8 changes: 4 additions & 4 deletions examples/pong.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#include "../src/classes/daemon/daemon.hpp"
#include <frameworkd/classes/daemon/daemon.hpp>
#include <iostream>

class PongService : public StaticService {
Expand Down Expand Up @@ -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;
}
}
4 changes: 2 additions & 2 deletions examples/PONG.json → examples/pong.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
{
"serviceId": "pong",
"proxys": {
"PING":{}
"pong":{}
},
"data": {
"anything": "anything"
}
}
}
10 changes: 10 additions & 0 deletions examples/zfkd.dbus.ping.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
<!DOCTYPE busconfig PUBLIC
"-//freedesktop//DTD D-BUS Bus Configuration 1.0//EN"
"http://www.freedesktop.org/standards/dbus/1.0/busconfig.dtd">
<busconfig>
<policy context="default">
<allow own="zfkd.dbus.ping"/>
<allow send_destination="zfkd.dbus"/>
<allow send_interface="zfkd.dbus.ping"/>
</policy>
</busconfig>
10 changes: 10 additions & 0 deletions examples/zfkd.dbus.pong.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
<!DOCTYPE busconfig PUBLIC
"-//freedesktop//DTD D-BUS Bus Configuration 1.0//EN"
"http://www.freedesktop.org/standards/dbus/1.0/busconfig.dtd">
<busconfig>
<policy context="default">
<allow own="zfkd.dbus.pong"/>
<allow send_destination="zfkd.dbus"/>
<allow send_interface="zfkd.dbus.pong"/>
</policy>
</busconfig>