xref: /openbmc/boost-dbus/include/dbus/impl/match.ipp (revision 377e76ab)
1// Copyright (c) Benjamin Kietzman (github.com/bkietz)
2//
3// Distributed under the Boost Software License, Version 1.0. (See accompanying
4// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
5
6#ifndef DBUS_MATCH_IPP
7#define DBUS_MATCH_IPP
8
9namespace dbus {
10void connection_service::new_match(implementation_type& impl, match& m) {
11  error e;
12  dbus_bus_add_match(impl, m.get_expression().c_str(), e);
13  e.throw_if_set();
14  // eventually, for complete asynchronicity, this should connect to
15  // org.freedesktop.DBus and call AddMatch
16}
17
18void connection_service::delete_match(implementation_type& impl, match& m) {
19  error e;
20  dbus_bus_remove_match(impl, m.get_expression().c_str(), e);
21  e.throw_if_set();
22}
23
24}  // namespace dbus
25
26#endif  // DBUS_MATCH_IPP
27