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

Method sdbus_property_set_callback

src/Object.cpp:377–398  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

375}
376
377int Object::sdbus_property_set_callback( sd_bus */*bus*/
378 , const char */*objectPath*/
379 , const char */*interface*/
380 , const char *property
381 , sd_bus_message *sdbusValue
382 , void *userData
383 , sd_bus_error *retError )
384{
385 auto* vtable = static_cast<VTable*>(userData);
386 assert(vtable != nullptr);
387 assert(vtable->object != nullptr);
388
389 const auto* propertyItem = findProperty(*vtable, property);
390 assert(propertyItem != nullptr);
391 assert(propertyItem->setCallback);
392
393 auto value = Message::Factory::create<PropertySetCall>(sdbusValue, &vtable->object->connection_);
394
395 auto ok = invokeHandlerAndCatchErrors([&](){ propertyItem->setCallback(std::move(value)); }, retError);
396
397 return ok ? 1 : -1;
398}
399
400} // namespace sdbus::internal
401

Callers

nothing calls this directly

Calls 1

Tested by

no test coverage detected