| 333 | } |
| 334 | |
| 335 | Slot Connection::createSdTimeEventSourceSlot(sd_event *event, int priority) |
| 336 | { |
| 337 | sd_event_source *timeEventSource{}; |
| 338 | auto r = sd_event_add_time(event, &timeEventSource, CLOCK_MONOTONIC, 0, 0, onSdTimerEvent, this); |
| 339 | SDBUS_THROW_ERROR_IF(r < 0, "Failed to add timer event", -r); |
| 340 | Slot sdTimeEventSource{timeEventSource, [](void* source){ deleteSdEventSource(static_cast<sd_event_source*>(source)); }}; |
| 341 | |
| 342 | r = sd_event_source_set_priority(timeEventSource, priority); |
| 343 | SDBUS_THROW_ERROR_IF(r < 0, "Failed to set time event priority", -r); |
| 344 | |
| 345 | r = sd_event_source_set_description(timeEventSource, "bus-time"); |
| 346 | SDBUS_THROW_ERROR_IF(r < 0, "Failed to set time event description", -r); |
| 347 | |
| 348 | return sdTimeEventSource; |
| 349 | } |
| 350 | |
| 351 | Slot Connection::createSdIoEventSourceSlot(sd_event *event, int fd, int priority) // NOLINT(bugprone-easily-swappable-parameters) |
| 352 | { |
nothing calls this directly
no outgoing calls
no test coverage detected