MCPcopy Create free account
hub / github.com/OpenVPN/openvpn3-linux / AttachInterface

Method AttachInterface

src/log/proxy-log.hpp:220–235  ·  view source on GitHub ↗

* 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

Source from the content-addressed store, hash-verified

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 /**

Callers 1

ServiceMethod · 0.80

Calls 3

AttachMethod · 0.80
whatMethod · 0.45

Tested by

no test coverage detected