| 329 | } |
| 330 | |
| 331 | int Object::sdbus_method_callback(sd_bus_message *sdbusMessage, void *userData, sd_bus_error *retError) |
| 332 | { |
| 333 | auto* vtable = static_cast<VTable*>(userData); |
| 334 | assert(vtable != nullptr); |
| 335 | assert(vtable->object != nullptr); |
| 336 | |
| 337 | auto message = Message::Factory::create<MethodCall>(sdbusMessage, &vtable->object->connection_); |
| 338 | |
| 339 | const auto* methodItem = findMethod(*vtable, message.getMemberName()); |
| 340 | assert(methodItem != nullptr); |
| 341 | assert(methodItem->callback); |
| 342 | |
| 343 | auto ok = invokeHandlerAndCatchErrors([&](){ methodItem->callback(std::move(message)); }, retError); |
| 344 | |
| 345 | return ok ? 1 : -1; |
| 346 | } |
| 347 | |
| 348 | int Object::sdbus_property_get_callback( sd_bus */*bus*/ |
| 349 | , const char */*objectPath*/ |
nothing calls this directly
no test coverage detected