forked from Kistler-Group/sdbus-cpp
* Implement #104: add getObjectPath() for classes * Implement #104: changes requested in review Co-authored-by: Christian Schneider <cschneider@radiodata.biz>
This commit is contained in:
@@ -225,6 +225,11 @@ sdbus::IConnection& Object::getConnection() const
|
||||
return dynamic_cast<sdbus::IConnection&>(connection_);
|
||||
}
|
||||
|
||||
const std::string& Object::getObjectPath() const
|
||||
{
|
||||
return objectPath_;
|
||||
}
|
||||
|
||||
const std::vector<sd_bus_vtable>& Object::createInterfaceVTable(InterfaceData& interfaceData)
|
||||
{
|
||||
auto& vtable = interfaceData.vtable;
|
||||
|
||||
@@ -101,6 +101,7 @@ namespace sdbus::internal {
|
||||
bool hasObjectManager() const override;
|
||||
|
||||
sdbus::IConnection& getConnection() const override;
|
||||
const std::string& getObjectPath() const override;
|
||||
|
||||
private:
|
||||
using InterfaceName = std::string;
|
||||
|
||||
@@ -198,6 +198,11 @@ void Proxy::unregister()
|
||||
interfaces_.clear();
|
||||
}
|
||||
|
||||
const std::string& Proxy::getObjectPath() const
|
||||
{
|
||||
return objectPath_;
|
||||
}
|
||||
|
||||
int Proxy::sdbus_async_reply_handler(sd_bus_message *sdbusMessage, void *userData, sd_bus_error */*retError*/)
|
||||
{
|
||||
auto* asyncCallData = static_cast<AsyncCalls::CallData*>(userData);
|
||||
|
||||
@@ -60,6 +60,8 @@ namespace sdbus::internal {
|
||||
void finishRegistration() override;
|
||||
void unregister() override;
|
||||
|
||||
const std::string& getObjectPath() const override;
|
||||
|
||||
private:
|
||||
class SyncCallReplyData
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user