| 22 | namespace DevPosture { |
| 23 | |
| 24 | Handler::Handler(DBus::Connection::Ptr dbuscon, |
| 25 | DBus::Object::Manager::Ptr object_manager, |
| 26 | LogWriter::Ptr logwr, |
| 27 | uint8_t log_level) |
| 28 | : DBus::Object::Base(PATH_DEVPOSTURE, INTERFACE_DEVPOSTURE), |
| 29 | object_manager_(object_manager) |
| 30 | { |
| 31 | signals_ = DevPosture::Log::Create(dbuscon, |
| 32 | LogGroup::EXTSERVICE, |
| 33 | GetPath(), |
| 34 | logwr); |
| 35 | signals_->SetLogLevel(log_level); |
| 36 | RegisterSignals(signals_); |
| 37 | |
| 38 | auto grm_args = AddMethod("GetRegisteredModules", |
| 39 | [this](DBus::Object::Method::Arguments::Ptr args) |
| 40 | { |
| 41 | method_get_registered_modules(args); |
| 42 | }); |
| 43 | |
| 44 | grm_args->AddOutput("paths", "ao"); |
| 45 | |
| 46 | auto pl_args = AddMethod("ProtocolLookup", |
| 47 | [this](DBus::Object::Method::Arguments::Ptr args) |
| 48 | { |
| 49 | method_protocol_lookup(args); |
| 50 | }); |
| 51 | |
| 52 | pl_args->AddInput("enterprise_profile", glib2::DataType::DBus<std::string>()); |
| 53 | pl_args->AddOutput("protocol", glib2::DataType::DBus<std::string>()); |
| 54 | |
| 55 | auto rc_args = AddMethod("RunChecks", |
| 56 | [this](DBus::Object::Method::Arguments::Ptr args) |
| 57 | { |
| 58 | method_run_checks(args); |
| 59 | }); |
| 60 | |
| 61 | rc_args->AddInput("protocol", glib2::DataType::DBus<std::string>()); |
| 62 | rc_args->AddInput("request", glib2::DataType::DBus<std::string>()); |
| 63 | rc_args->AddOutput("result", glib2::DataType::DBus<std::string>()); |
| 64 | } |
| 65 | |
| 66 | |
| 67 | const bool Handler::Authorize(const DBus::Authz::Request::Ptr authzreq) |
nothing calls this directly
no test coverage detected