Skip to content

Commit

Permalink
Merge pull request #32 from zenitheesc/update/example
Browse files Browse the repository at this point in the history
examples: update to the current fkd workflow
  • Loading branch information
Math-42 authored Sep 30, 2022
2 parents 8509f3c + f300a5f commit 1a612e3
Show file tree
Hide file tree
Showing 6 changed files with 32 additions and 12 deletions.
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>

0 comments on commit 1a612e3

Please sign in to comment.