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

Method addObjectVTable

src/Connection.cpp:476–494  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

474#endif // SDBUS_basu
475
476Slot 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
496PlainMessage Connection::createPlainMessage() const
497{

Callers 1

addVTableMethod · 0.80

Calls 3

sd_bus_slot_unrefMethod · 0.80
getMethod · 0.45

Tested by

no test coverage detected