Add support for ObjectManager's InterfaceAdded/Removed signals on server side

This commit is contained in:
sangelovic
2019-06-03 23:47:27 +02:00
parent 01e2a7a570
commit 38b51bddc6
14 changed files with 313 additions and 24 deletions

View File

@@ -145,9 +145,24 @@ void Object::emitPropertiesChangedSignal(const std::string& interfaceName)
Object::emitPropertiesChangedSignal(interfaceName, {});
}
sdbus::IConnection& Object::getConnection() const
void Object::emitInterfacesAddedSignal()
{
return dynamic_cast<sdbus::IConnection&>(connection_);
connection_.emitInterfacesAddedSignal(objectPath_);
}
void Object::emitInterfacesAddedSignal(const std::vector<std::string>& interfaces)
{
connection_.emitInterfacesAddedSignal(objectPath_, interfaces);
}
void Object::emitInterfacesRemovedSignal()
{
connection_.emitInterfacesRemovedSignal(objectPath_);
}
void Object::emitInterfacesRemovedSignal(const std::vector<std::string>& interfaces)
{
connection_.emitInterfacesRemovedSignal(objectPath_, interfaces);
}
void Object::addObjectManager()
@@ -165,6 +180,11 @@ bool Object::hasObjectManager() const
return objectManagerSlot_ != nullptr;
}
sdbus::IConnection& Object::getConnection() const
{
return dynamic_cast<sdbus::IConnection&>(connection_);
}
const std::vector<sd_bus_vtable>& Object::createInterfaceVTable(InterfaceData& interfaceData)
{
auto& vtable = interfaceData.vtable_;