blob: 1cc78e52e27a776fbdb0201baaa07cf3464af5aa (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
|
#include "util/dbus.hpp"
#include <stdexcept>
DbusUtil::DbusUtil(const std::string &address)
: connection(dbus_connection_open(address.c_str(), nullptr))
{
if (connection == nullptr) {
throw std::invalid_argument("Could not connect to dbus address");
}
}
DbusUtil::~DbusUtil()
{
dbus_connection_unref(connection);
}
|