| 397 | namespace sdbus { |
| 398 | |
| 399 | std::unique_ptr<IProxy> createProxy( IConnection& connection |
| 400 | , ServiceName destination |
| 401 | , ObjectPath objectPath ) |
| 402 | { |
| 403 | auto* sdbusConnection = dynamic_cast<internal::IConnection*>(&connection); |
| 404 | SDBUS_THROW_ERROR_IF(!sdbusConnection, "Connection is not a real sdbus-c++ connection", EINVAL); |
| 405 | |
| 406 | return std::make_unique<internal::Proxy>( *sdbusConnection |
| 407 | , std::move(destination) |
| 408 | , std::move(objectPath) ); |
| 409 | } |
| 410 | |
| 411 | // NOLINTNEXTLINE(cppcoreguidelines-rvalue-reference-param-not-moved): connection is moved but cast to an internal type |
| 412 | std::unique_ptr<IProxy> createProxy( std::unique_ptr<IConnection>&& connection |
no test coverage detected