xref: /openbmc/boost-dbus/include/dbus/impl/match.ipp (revision cfc0655f)
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 {
10
11void connection_service::new_match(implementation_type& impl,
12    match& m)
13{
14  error e;
15  dbus_bus_add_match(impl, m.get_expression().c_str(), e);
16  e.throw_if_set();
17  // eventually, for complete asynchronicity, this should connect to
18  // org.freedesktop.DBus and call AddMatch
19}
20
21void connection_service::delete_match(implementation_type& impl,
22    match& m)
23{
24  error e;
25  dbus_bus_remove_match(impl, m.get_expression().c_str(), e);
26  e.throw_if_set();
27}
28
29} // namespace dbus
30
31#endif // DBUS_MATCH_IPP
32