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

[CLOYSTER-104] Preliminary support to dbus, plus a daemon management class #65

Merged
merged 7 commits into from
Aug 15, 2024

Conversation

arthurmco
Copy link
Collaborator

@arthurmco arthurmco commented Jul 31, 2024

Before, when we needed to manage a daemon, we called systemd using the command line.

This is not good for a series of reasons: complex error handling, depending on the necessary process quota, feeling of sloppiness...

This PR start adding a DBus management class, plus a DaemonHandler class, to do all the required tasks.

This also fixes some memory leaks I found

(Note that most operations do not exist, and will be added as required, when we start implementing the DaemonHandler. This PR only add sufficient support for us to "start get going", and to acquire opinions)

sdbus-cpp will be our dbus communication library, this commit adds it
Here, we encapsulate the sdbus communication classes, instead of using
them directly, so we can mock them later

We do not encapsulate the data types though, because it is not worth
it: they are simple enough to be instantiated, and the library depends
on they being the exact type, not subclasses or anything other
This daemon handler class will manage the daemons we configure (start,
stop, reload etc) using dbus (or any other message bus, such as the
test one, to allow easy mocking)

We also add a test message bus to test this daemon handler
@arthurmco arthurmco self-assigned this Jul 31, 2024
Copy link

sonarcloud bot commented Jul 31, 2024

@arthurmco arthurmco merged commit 241b662 into master Aug 15, 2024
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant