dbus: stub: don't register an object but retrieve the already registered one
This commit is contained in:
parent
bcdbdbac6a
commit
83bf973d98
2 changed files with 3 additions and 5 deletions
|
|
@ -25,10 +25,8 @@ namespace skeleton {
|
||||||
std::shared_ptr<Service> Service::create_for_bus(
|
std::shared_ptr<Service> Service::create_for_bus(
|
||||||
const core::dbus::Bus::Ptr &bus,
|
const core::dbus::Bus::Ptr &bus,
|
||||||
const std::shared_ptr<anbox::application::Manager> &application_manager) {
|
const std::shared_ptr<anbox::application::Manager> &application_manager) {
|
||||||
auto service = core::dbus::Service::add_service(
|
auto service = core::dbus::Service::add_service(bus, anbox::dbus::interface::Service::name());
|
||||||
bus, anbox::dbus::interface::Service::name());
|
auto object = service->add_object_for_path(anbox::dbus::interface::Service::path());
|
||||||
auto object =
|
|
||||||
service->add_object_for_path(anbox::dbus::interface::Service::path());
|
|
||||||
return std::make_shared<Service>(bus, service, object, application_manager);
|
return std::make_shared<Service>(bus, service, object, application_manager);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -25,7 +25,7 @@ namespace dbus {
|
||||||
namespace stub {
|
namespace stub {
|
||||||
std::shared_ptr<ApplicationManager> ApplicationManager::create_for_bus(const core::dbus::Bus::Ptr &bus) {
|
std::shared_ptr<ApplicationManager> ApplicationManager::create_for_bus(const core::dbus::Bus::Ptr &bus) {
|
||||||
auto service = core::dbus::Service::use_service_or_throw_if_not_available(bus, anbox::dbus::interface::Service::name());
|
auto service = core::dbus::Service::use_service_or_throw_if_not_available(bus, anbox::dbus::interface::Service::name());
|
||||||
auto object = service->add_object_for_path(anbox::dbus::interface::Service::path());
|
auto object = service->object_for_path(anbox::dbus::interface::Service::path());
|
||||||
return std::make_shared<ApplicationManager>(bus, service, object);
|
return std::make_shared<ApplicationManager>(bus, service, object);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue