19 #ifndef APPARMOR_DBUS_H_
20 #define APPARMOR_DBUS_H_
22 #include <core/dbus/macros.h>
23 #include <core/dbus/object.h>
24 #include <core/dbus/service.h>
41 static const std::string&
name()
43 static const std::string s =
"org.freedesktop.DBus";
50 DBUS_CPP_METHOD_DEF(GetConnectionAppArmorSecurityContext,
DBus)
56 Stub(
const core::dbus::Object::Ptr&
object) : object{
object}
61 Stub(
const core::dbus::Bus::Ptr& bus)
64 core::dbus::Service::use_service<org::freedesktop::dbus::DBus>(bus)
65 ->object_for_path(core::dbus::types::ObjectPath{
"/org/freedesktop/DBus"})
76 const std::string&
name,
77 std::function<
void(
const std::string&)> handler)
79 object->invoke_method_asynchronously_with_callback<GetConnectionAppArmorSecurityContext, std::string>(
80 [handler](
const core::dbus::Result<std::string>& result)
82 if (not result.is_error()) handler(result.value());
93 #endif // APPARMOR_DBUS_H_
Stub(const core::dbus::Bus::Ptr &bus)
core::dbus::Object::Ptr object
Stub(const core::dbus::Object::Ptr &object)
void get_connection_app_armor_security_async(const std::string &name, std::function< void(const std::string &)> handler)
static const std::string & name()