| 375 | } |
| 376 | |
| 377 | int 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 |
nothing calls this directly
no test coverage detected