* Helper function to connect to the Log service and attach this caller to * the service. * * @param conn GDBusConnection* to the D-Bus system bus * @param interface D-Bus interface the log service will log from this process * * @return Returns a LogServiceProxy object pointer, used to detach * from the log service when thi
| 218 | * needed. |
| 219 | */ |
| 220 | static LogServiceProxy::Ptr AttachInterface(DBus::Connection::Ptr conn, |
| 221 | const std::string interface) |
| 222 | { |
| 223 | auto lgs = LogServiceProxy::Create(conn); |
| 224 | try |
| 225 | { |
| 226 | lgs->Attach(interface); |
| 227 | } |
| 228 | catch (const DBus::Exception &excp) |
| 229 | { |
| 230 | throw LogServiceProxyException( |
| 231 | "Could not connect to Log service", |
| 232 | excp.what()); |
| 233 | } |
| 234 | return lgs; |
| 235 | } |
| 236 | |
| 237 | |
| 238 | /** |
no test coverage detected