| 474 | #endif // SDBUS_basu |
| 475 | |
| 476 | Slot Connection::addObjectVTable( const ObjectPath& objectPath |
| 477 | , const InterfaceName& interfaceName |
| 478 | , const sd_bus_vtable* vtable |
| 479 | , void* userData |
| 480 | , return_slot_t ) |
| 481 | { |
| 482 | sd_bus_slot *slot{}; |
| 483 | |
| 484 | auto r = sdbus_->sd_bus_add_object_vtable( bus_.get() |
| 485 | , &slot |
| 486 | , objectPath.c_str() |
| 487 | , interfaceName.c_str() |
| 488 | , vtable |
| 489 | , userData ); |
| 490 | |
| 491 | SDBUS_THROW_ERROR_IF(r < 0, "Failed to register object vtable", -r); |
| 492 | |
| 493 | return {slot, [this](void *slot){ sdbus_->sd_bus_slot_unref(static_cast<sd_bus_slot*>(slot)); }}; |
| 494 | } |
| 495 | |
| 496 | PlainMessage Connection::createPlainMessage() const |
| 497 | { |
no test coverage detected