![]() |
Leosac
0.8.0
Open Source Access Control
|
CoreAPI is a class for interact with Leosac's core. More...
#include <CoreAPI.hpp>
Collaboration diagram for Leosac::CoreAPI:Public Member Functions | |
| CoreAPI (Kernel &k) | |
| uint64_t | config_version () const |
| Retrieve the local configuration version. More... | |
| boost::property_tree::ptree | kernel_config () const |
| Retrieve the property tree describing the Leosac's kernel configuration. More... | |
| std::string | instance_name () const |
Returns the instance_name of Leosac. More... | |
| uint64_t | uptime () const |
| Returns the uptime, in seconds. More... | |
| void | restart_server () const |
| Request that Leosac restarts. More... | |
| std::vector< std::string > | modules_names () const |
| Retrieve the names of all enabled modules. More... | |
Private Attributes | |
| Kernel & | kernel_ |
CoreAPI is a class for interact with Leosac's core.
This class is intended to be used by modules, as a way to retrieve information from Leosac's Kernel in a clean way.
This class uses message passing / tasks scheduling internally, and expose an easy to use API to client code.
Definition at line 47 of file CoreAPI.hpp.
|
explicit |
Definition at line 31 of file CoreAPI.cpp.
| uint64_t CoreAPI::config_version | ( | ) | const |
Retrieve the local configuration version.
Definition at line 36 of file CoreAPI.cpp.
| std::string CoreAPI::instance_name | ( | ) | const |
Returns the instance_name of Leosac.
Definition at line 76 of file CoreAPI.cpp.
| boost::property_tree::ptree CoreAPI::kernel_config | ( | ) | const |
Retrieve the property tree describing the Leosac's kernel configuration.
Definition at line 45 of file CoreAPI.cpp.
| std::vector< std::string > CoreAPI::modules_names | ( | ) | const |
Retrieve the names of all enabled modules.
Definition at line 90 of file CoreAPI.cpp.
| void CoreAPI::restart_server | ( | ) | const |
Request that Leosac restarts.
Definition at line 104 of file CoreAPI.cpp.
| uint64_t CoreAPI::uptime | ( | ) | const |
Returns the uptime, in seconds.
Definition at line 60 of file CoreAPI.cpp.
|
private |
Definition at line 84 of file CoreAPI.hpp.