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

Method ServiceHandler

src/log/log-service.cpp:181–325  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

179
180
181ServiceHandler::ServiceHandler(DBus::Connection::Ptr connection_,
182 DBus::Object::Manager::Ptr obj_mgr,
183 Configuration &&cfgobj)
184 : DBus::Object::Base(Constants::GenPath("log"),
185 Constants::GenInterface("log")),
186 connection(connection_), object_mgr(obj_mgr), config(cfgobj),
187 logwr(cfgobj.servicelog->GetLogWriter()),
188 log(cfgobj.servicelog),
189 logfilter(cfgobj.logfilter)
190{
191 DisableIdleDetector(true);
192 dbuscreds = DBus::Credentials::Query::Create(connection);
193 subscrmgr = DBus::Signals::SubscriptionManager::Create(connection);
194
195 auto meth_attach = AddMethod(
196 "Attach",
197 [&](DBus::Object::Method::Arguments::Ptr args)
198 {
199 method_attach(args);
200 });
201 meth_attach->AddInput("interface",
202 glib2::DataType::DBus<std::string>());
203
204
205 auto meth_assign = AddMethod(
206 "AssignSession",
207 [&](DBus::Object::Method::Arguments::Ptr args)
208 {
209 method_assign_session(args);
210 });
211 meth_assign->AddInput("session_path",
212 glib2::DataType::DBus<DBus::Object::Path>());
213 meth_assign->AddInput("interface",
214 glib2::DataType::DBus<std::string>());
215
216
217 auto meth_detach = AddMethod(
218 "Detach",
219 [&](DBus::Object::Method::Arguments::Ptr args)
220 {
221 method_detach(args);
222 });
223 meth_detach->AddInput("interface",
224 glib2::DataType::DBus<std::string>());
225
226
227 auto meth_getsublst = AddMethod(
228 "GetSubscriberList",
229 [&](DBus::Object::Method::Arguments::Ptr args)
230 {
231 method_get_subscr_list(args);
232 });
233 meth_getsublst->AddOutput("subscribers", "a(ssss)");
234
235
236 auto meth_proxylogev = AddMethod(
237 "ProxyLogEvents",
238 [&](DBus::Object::Method::Arguments::Ptr args)

Callers

nothing calls this directly

Calls 11

LogMetaEnabledMethod · 0.80
EnableLogMetaMethod · 0.80
MessagePrependEnabledMethod · 0.80
EnableMessagePrependMethod · 0.80
EnableTimestampMethod · 0.80
sizeMethod · 0.80
GetLogWriterMethod · 0.45
TimestampEnabledMethod · 0.45
GetLogLevelMethod · 0.45
SetLogLevelMethod · 0.45
GetFilenameMethod · 0.45

Tested by

no test coverage detected