refactor: rename dont_request_slot tag to floating_slot

This commit is contained in:
Stanislav Angelovic
2022-06-27 12:05:06 +02:00
parent b7f3d7c876
commit d864e1dfa4
7 changed files with 37 additions and 4 deletions
+5
View File
@@ -143,6 +143,11 @@ ISdBus& Connection::getSdBusInterface()
}
void Connection::addObjectManager(const std::string& objectPath)
{
Connection::addObjectManager(objectPath, floating_slot);
}
void Connection::addObjectManager(const std::string& objectPath, floating_slot_t)
{
auto r = iface_->sd_bus_add_object_manager(bus_.get(), nullptr, objectPath.c_str());
+1
View File
@@ -68,6 +68,7 @@ namespace sdbus::internal {
bool processPendingRequest() override;
void addObjectManager(const std::string& objectPath) override;
void addObjectManager(const std::string& objectPath, floating_slot_t) override;
Slot addObjectManager(const std::string& objectPath, request_slot_t) override;
void setMethodCallTimeout(uint64_t timeout) override;
+5
View File
@@ -794,6 +794,11 @@ MethodReply MethodCall::sendWithNoReply() const
}
void MethodCall::send(void* callback, void* userData, uint64_t timeout, dont_request_slot_t) const
{
MethodCall::send(callback, userData, timeout, floating_slot);
}
void MethodCall::send(void* callback, void* userData, uint64_t timeout, floating_slot_t) const
{
auto r = sdbus_->sd_bus_call_async(nullptr, nullptr, (sd_bus_message*)msg_, (sd_bus_message_handler_t)callback, userData, timeout);
SDBUS_THROW_ERROR_IF(r < 0, "Failed to call method", -r);
+1 -1
View File
@@ -127,7 +127,7 @@ MethodReply Proxy::sendMethodCallMessageAndWaitForReply(const MethodCall& messag
auto callback = (void*)&Proxy::sdbus_async_reply_handler;
AsyncCalls::CallData callData{*this, std::move(asyncReplyCallback), {}};
message.send(callback, &callData, timeout, dont_request_slot);
message.send(callback, &callData, timeout, floating_slot);
return syncCallReplyData.waitForMethodReply();
}