quick commit

This commit is contained in:
2026-02-04 15:52:31 +01:00
parent 0463c37543
commit ce0643b6ac
26 changed files with 929 additions and 45 deletions

View File

@@ -0,0 +1,24 @@
#pragma once
#include <giomm.h>
#include <sigc++/sigc++.h>
class DbusConnection {
public:
virtual ~DbusConnection() = default;
protected:
Glib::RefPtr<Gio::DBus::Connection> connection;
void connect_session_async(const sigc::slot<void(const Glib::RefPtr<Gio::AsyncResult> &)> &callback) {
Gio::DBus::Connection::get(Gio::DBus::BusType::SESSION, callback);
}
static void ensure_gio_init() {
try {
Gio::init();
} catch (const Glib::Error &) {
// Already initialized.
}
}
};