|
plptools
|
Class for managing and serializing device details. More...
#include <deviceconfiguration.h>
Public Member Functions | |
| DeviceConfiguration () | |
| DeviceConfiguration (std::string const &id, std::string const &name) | |
| std::string | id () const |
| std::string | name () const |
| void | setName (std::string name) |
| std::string | serialize () const |
Static Public Member Functions | |
| static std::unique_ptr< DeviceConfiguration > | deserialize (const std::string &contents) |
Private Attributes | |
| std::string | id_ |
| std::string | name_ |
Class for managing and serializing device details.
Right now this includes the device identifier string (expected to be a UUID4) and the user-assigned device name.
This configuration is generated the first time a device is seen to ensure plptools has a way to uniquely identify it on future connections. This is particularly important for backups.
Definition at line 34 of file deviceconfiguration.h.
| DeviceConfiguration::DeviceConfiguration | ( | ) |
Definition at line 42 of file deviceconfiguration.cc.
| DeviceConfiguration::DeviceConfiguration | ( | std::string const & | id, |
| std::string const & | name | ||
| ) |
Definition at line 47 of file deviceconfiguration.cc.
|
static |
Definition at line 31 of file deviceconfiguration.cc.
|
inline |
Definition at line 43 of file deviceconfiguration.h.
|
inline |
Definition at line 47 of file deviceconfiguration.h.
| std::string DeviceConfiguration::serialize | ( | ) | const |
Definition at line 52 of file deviceconfiguration.cc.
|
inline |
Definition at line 51 of file deviceconfiguration.h.
|
private |
Definition at line 58 of file deviceconfiguration.h.
|
private |
Definition at line 59 of file deviceconfiguration.h.