19 #ifndef CORE_UBUNTU_MEDIA_APPARMOR_DBUS_H_ 20 #define CORE_UBUNTU_MEDIA_APPARMOR_DBUS_H_ 22 #include <core/dbus/bus.h> 23 #include <core/dbus/macros.h> 24 #include <core/dbus/object.h> 25 #include <core/dbus/service.h> 42 static const std::string&
name()
44 static const std::string s =
"org.freedesktop.DBus";
51 DBUS_CPP_METHOD_DEF(GetConnectionAppArmorSecurityContext,
DBus)
57 Stub(
const core::dbus::Object::Ptr&
object) : object{
object}
62 Stub(
const core::dbus::Bus::Ptr& bus)
65 core::dbus::Service::use_service<org::freedesktop::dbus::DBus>(bus)
66 ->object_for_path(core::dbus::types::ObjectPath{
"/org/freedesktop/DBus"})
77 const std::string&
name,
78 std::function<
void(
const std::string&)> handler)
80 object->invoke_method_asynchronously_with_callback<GetConnectionAppArmorSecurityContext, std::string>(
81 [handler](
const core::dbus::Result<std::string>& result)
83 if (not result.is_error()) handler(result.value());
94 #endif // CORE_UBUNTU_MEDIA_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()