128cbd28bSBenjamin Kietzman// Copyright (c) Benjamin Kietzman (github.com/bkietz) 228cbd28bSBenjamin Kietzman// 328cbd28bSBenjamin Kietzman// Distributed under the Boost Software License, Version 1.0. (See accompanying 428cbd28bSBenjamin Kietzman// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 528cbd28bSBenjamin Kietzman 628cbd28bSBenjamin Kietzman#ifndef DBUS_MATCH_IPP 728cbd28bSBenjamin Kietzman#define DBUS_MATCH_IPP 828cbd28bSBenjamin Kietzman 928cbd28bSBenjamin Kietzmannamespace dbus { 10*da3eeb6aSEd Tanousvoid connection_service::new_match(implementation_type& impl, match& m) { 1128cbd28bSBenjamin Kietzman error e; 1228cbd28bSBenjamin Kietzman dbus_bus_add_match(impl, m.get_expression().c_str(), e); 1328cbd28bSBenjamin Kietzman e.throw_if_set(); 1428cbd28bSBenjamin Kietzman // eventually, for complete asynchronicity, this should connect to 1528cbd28bSBenjamin Kietzman // org.freedesktop.DBus and call AddMatch 1628cbd28bSBenjamin Kietzman} 1728cbd28bSBenjamin Kietzman 18*da3eeb6aSEd Tanousvoid connection_service::delete_match(implementation_type& impl, match& m) { 1928cbd28bSBenjamin Kietzman error e; 2028cbd28bSBenjamin Kietzman dbus_bus_remove_match(impl, m.get_expression().c_str(), e); 2128cbd28bSBenjamin Kietzman e.throw_if_set(); 2228cbd28bSBenjamin Kietzman} 2328cbd28bSBenjamin Kietzman 2428cbd28bSBenjamin Kietzman} // namespace dbus 2528cbd28bSBenjamin Kietzman 2628cbd28bSBenjamin Kietzman#endif // DBUS_MATCH_IPP 27