Add object manager automatically in ObjectManager_adaptor constructor

This commit is contained in:
Stanislav Angelovic
2019-06-05 12:18:04 +02:00
parent 65b3e7ba00
commit 5c0a8d5ab4
4 changed files with 14 additions and 43 deletions
-24
View File
@@ -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;
};
+1
View File
@@ -216,6 +216,7 @@ namespace sdbus {
ObjectManager_adaptor(sdbus::IObject& object)
: object_(object)
{
object_.addObjectManager();
}
public: