Sailfish Secrets
API DocumentationHealthCheckRequest Class
(Sailfish::Secrets::HealthCheckRequest)Allows a client request information about the well-being of secrets data. More...
Header: | #include <Secrets/healthcheckrequest.h> |
Inherits: | Sailfish::Secrets::Request |
Public Types
enum | Health { HealthOK, HealthUnknown, HealthCorrupted, HealthOtherError } |
Properties
- isHealthy : const bool
- masterlockHealth : const Health
- saltDataHealth : const Health
- 3 properties inherited from Sailfish::Secrets::Request
Public Functions
HealthCheckRequest(QObject *parent = Q_NULLPTR) | |
~HealthCheckRequest() | |
bool | isHealthy() const |
Health | masterlockHealth() const |
Health | saltDataHealth() const |
Reimplemented Public Functions
virtual Sailfish::Secrets::SecretManager * | manager() const |
virtual Sailfish::Secrets::Result | result() const |
virtual void | setManager(Sailfish::Secrets::SecretManager *manager) |
virtual void | startRequest() |
virtual Sailfish::Secrets::Request::Status | status() const |
virtual void | waitForFinished() |
- 6 public functions inherited from Sailfish::Secrets::Request
Signals
void | isHealthyChanged() |
void | masterlockHealthChanged() |
void | saltDataHealthChanged() |
- 3 signals inherited from Sailfish::Secrets::Request
Detailed Description
Allows a client request information about the well-being of secrets data.
Normally, a client does not have to use this kind of request, because the data corruption is taken care of by the Settings app. When a data corruption is detected by the secrets daemon it will display a notification to the user which opens the Settings app that will take care of it.
Here is an example that retrieves information about the secrets data health:
Sailfish::Secrets::SecretManager man; Sailfish::Secrets::HealthCheckRequest req; req.setManager(&man); req.startRequest(); // status() will change to Finished when complete // real clients should not use waitForFinished() because it blocks req.waitForFinished(); qDebug() << "salt data health:" << req.saltDataHealth(); qDebug() << "masterlock health:" << req.masterlockHealth();
Property Documentation
isHealthy : const bool
Access functions:
bool | isHealthy() const |
Notifier signal:
void | isHealthyChanged() |
masterlockHealth : const Health
Access functions:
Health | masterlockHealth() const |
Notifier signal:
void | masterlockHealthChanged() |
saltDataHealth : const Health
Access functions:
Health | saltDataHealth() const |
Notifier signal:
void | saltDataHealthChanged() |
Member Function Documentation
HealthCheckRequest::HealthCheckRequest(QObject *parent = Q_NULLPTR)
Constructs a new HealthCheckRequest object with the given parent.
HealthCheckRequest::~HealthCheckRequest()
Destroys the HealthCheckRequest
bool HealthCheckRequest::isHealthy() const
Tells whether the secrets data is completely healthy.
The result can be used to decuce whether a data corruption happened to any data which is monitored for data corruptions. Returns true if everything is okay and false otherwise.
Note: Getter function for property isHealthy.
[virtual]
Sailfish::Secrets::SecretManager *HealthCheckRequest::manager() const
See also setManager().
Health HealthCheckRequest::masterlockHealth() const
Returns information about masterlock health.
The result can be used to decuce whether a data corruption happened to the masterlock data.
Note: Getter function for property masterlockHealth.
[virtual]
Sailfish::Secrets::Result HealthCheckRequest::result() const
Health HealthCheckRequest::saltDataHealth() const
Returns information about salt data health.
The result can be used to decuce whether a data corruption happened to the salt data.
Note: Getter function for property saltDataHealth.
[virtual]
void HealthCheckRequest::setManager(Sailfish::Secrets::SecretManager *manager)
See also manager().