forked from Kistler-Group/sdbus-cpp
Add object manager automatically in ObjectManager_adaptor constructor
This commit is contained in:
@@ -130,30 +130,6 @@ namespace sdbus {
|
||||
getObject().unregister();
|
||||
}
|
||||
|
||||
/*!
|
||||
* @brief Adds an ObjectManager interface at the path of this D-Bus object
|
||||
*
|
||||
* Creates an ObjectManager interface at the specified object path on
|
||||
* the connection. This is a convenient way to interrogate a connection
|
||||
* to see what objects it has.
|
||||
*
|
||||
* @throws sdbus::Error in case of failure
|
||||
*/
|
||||
void addObjectManager()
|
||||
{
|
||||
getObject().addObjectManager();
|
||||
}
|
||||
|
||||
/*!
|
||||
* @brief Removes an ObjectManager interface from the path of this D-Bus object
|
||||
*
|
||||
* @throws sdbus::Error in case of failure
|
||||
*/
|
||||
void removeObjectManager()
|
||||
{
|
||||
getObject().removeObjectManager();
|
||||
}
|
||||
|
||||
protected:
|
||||
using base_type = AdaptorInterfaces;
|
||||
};
|
||||
|
||||
@@ -216,6 +216,7 @@ namespace sdbus {
|
||||
ObjectManager_adaptor(sdbus::IObject& object)
|
||||
: object_(object)
|
||||
{
|
||||
object_.addObjectManager();
|
||||
}
|
||||
|
||||
public:
|
||||
|
||||
Reference in New Issue
Block a user