Add getConnection() method to IObject so we ask Object about its connection

This commit is contained in:
Stanislav Angelovic
2019-04-04 20:39:03 +02:00
parent a919058d13
commit 94fd3c88d8
4 changed files with 16 additions and 2 deletions
+7
View File
@@ -173,6 +173,13 @@ namespace sdbus {
*/
virtual void emitSignal(const sdbus::Signal& message) = 0;
/*!
* @brief Provides D-Bus connection used by the object
*
* @return Reference to the D-Bus connection
*/
virtual sdbus::IConnection& getConnection() const = 0;
/*!
* @brief Registers method that the object will provide on D-Bus
*
+2 -2
View File
@@ -74,7 +74,7 @@ namespace sdbus {
***********************************************/
template <typename... _Interfaces>
class Interfaces
: private ObjectHolder<IObject>
: protected ObjectHolder<IObject>
, public _Interfaces...
{
public:
@@ -96,7 +96,7 @@ namespace sdbus {
***********************************************/
template <typename... _Interfaces>
class ProxyInterfaces
: private ObjectHolder<IObjectProxy>
: protected ObjectHolder<IObjectProxy>
, public _Interfaces...
{
public: