MCPcopy Create free account
hub / github.com/Kistler-Group/sdbus-cpp / getEventLoopPollData

Method getEventLoopPollData

src/Connection.cpp:192–203  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

190}
191
192Connection::PollData Connection::getEventLoopPollData() const
193{
194 ISdBus::PollData pollData{};
195 auto r = sdbus_->sd_bus_get_poll_data(bus_.get(), &pollData);
196 SDBUS_THROW_ERROR_IF(r < 0, "Failed to get bus poll data", -r);
197
198 assert(eventFd_.fd >= 0);
199
200 auto timeout = pollData.timeout_usec == UINT64_MAX ? std::chrono::microseconds::max() : std::chrono::microseconds(pollData.timeout_usec);
201
202 return {pollData.fd, pollData.events, timeout, eventFd_.fd};
203}
204
205void Connection::addObjectManager(const ObjectPath& objectPath)
206{

Callers 1

onSdEventPrepareMethod · 0.80

Calls 2

sd_bus_get_poll_dataMethod · 0.80
getMethod · 0.45

Tested by

no test coverage detected