Leosac
0.8.0
Open Source Access Control
|
Database aware Hardware Service. More...
#include <HardwareService.hpp>
Public Member Functions | |
HardwareService (const Leosac::DBServicePtr &dbservice) | |
DevicePtr | find_device_by_name (const std::string &dev_name) const |
std::string | hardware_device_type (const Hardware::Device &device) const |
Return the name of real type of a device. More... | |
json | serialize_device_metadata (const Hardware::DevicePtr &device) const |
Serialize as json the metadata of a device. More... | |
Public Member Functions inherited from Leosac::ExtensibleSerializer< json, Hardware::Device, const SecurityContext & > | |
json | serialize (const Hardware::Device &input, AdditionalArgs &&... args) const |
void | register_serializer (Callable &&callable) |
Register a serializer for T. More... | |
void | unregister_serializer () |
Private Attributes | |
DBServicePtr | dbservice_ |
Additional Inherited Members | |
Public Types inherited from Leosac::ExtensibleSerializer< json, Hardware::Device, const SecurityContext & > | |
using | SerializationCallable = std::function< json(const Hardware::Device &, AdditionalArgs &&...)> |
Callable type for serialization. More... | |
Database aware Hardware Service.
Definition at line 39 of file HardwareService.hpp.
|
explicit |
Definition at line 33 of file HardwareService.cpp.
DevicePtr Leosac::Hardware::HardwareService::find_device_by_name | ( | const std::string & | dev_name | ) | const |
Definition at line 61 of file HardwareService.cpp.
std::string Leosac::Hardware::HardwareService::hardware_device_type | ( | const Hardware::Device & | device | ) | const |
Return the name of real type of a device.
Definition at line 41 of file HardwareService.cpp.
json Leosac::Hardware::HardwareService::serialize_device_metadata | ( | const Hardware::DevicePtr & | device | ) | const |
Serialize as json the metadata of a device.
This is useful when serializer when to describe a relationship.
device |
Definition at line 50 of file HardwareService.cpp.
|
private |
Definition at line 62 of file HardwareService.hpp.