| 740 | } |
| 741 | |
| 742 | Connection::BusPtr Connection::openBus(const BusFactory& busFactory) |
| 743 | { |
| 744 | sd_bus* bus{}; |
| 745 | const int r = busFactory(&bus); |
| 746 | SDBUS_THROW_ERROR_IF(r < 0, "Failed to open bus", -r); |
| 747 | |
| 748 | BusPtr busPtr{bus, [this](sd_bus* bus){ return sdbus_->sd_bus_flush_close_unref(bus); }}; |
| 749 | finishHandshake(busPtr.get()); |
| 750 | return busPtr; |
| 751 | } |
| 752 | |
| 753 | Connection::BusPtr Connection::openPseudoBus() |
| 754 | { |
nothing calls this directly
no test coverage detected