Sailfish Secrets
API DocumentationDeleteSecretRequest Class
(Sailfish::Secrets::DeleteSecretRequest)Allows a client request that a secret be deleted from the system's secure secret storage service More...
Header: | #include <Secrets/deletesecretrequest.h> |
Inherits: | Sailfish::Secrets::Request |
Properties
- identifier : Sailfish::Secrets::Secret::Identifier
- userInteractionMode : Sailfish::Secrets::SecretManager::UserInteractionMode
- 3 properties inherited from Sailfish::Secrets::Request
Public Functions
DeleteSecretRequest(QObject *parent = Q_NULLPTR) | |
~DeleteSecretRequest() | |
Sailfish::Secrets::Secret::Identifier | identifier() const |
void | setIdentifier(const Sailfish::Secrets::Secret::Identifier &ident) |
void | setUserInteractionMode(Sailfish::Secrets::SecretManager::UserInteractionMode mode) |
Sailfish::Secrets::SecretManager::UserInteractionMode | userInteractionMode() 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 | identifierChanged() |
void | userInteractionModeChanged() |
- 3 signals inherited from Sailfish::Secrets::Request
Detailed Description
Allows a client request that a secret be deleted from the system's secure secret storage service
If the calling application is the creator of the secret, or alternatively if the user has granted the application permission to delete the secret, then the Secrets service will instruct the storage plugin to delete the secret.
If the application is not the creator of the secret and the user has not yet been asked if the application should have permission to delete the secret, then a system-mediated access control UI flow may be triggered to obtain the user's permission (unless the given userInteractionMode() is PreventInteraction
in which case the request will fail).
An example of deleting a secret follows:
Sailfish::Secrets::SecretManager sm; Sailfish::Secrets::DeleteSecretRequest dsr; dsr.setManager(&sm); dsr.setIdentifier(Sailfish::Secrets::Secret::Identifier("ExampleSecret", "ExampleCollection")); dsr.setUserInteractionMode(Sailfish::Secrets::SecretManager::SystemInteraction); dsr.startRequest(); // status() will change to Finished when complete
Property Documentation
identifier : Sailfish::Secrets::Secret::Identifier
Access functions:
Sailfish::Secrets::Secret::Identifier | identifier() const |
void | setIdentifier(const Sailfish::Secrets::Secret::Identifier &ident) |
Notifier signal:
void | identifierChanged() |
userInteractionMode : Sailfish::Secrets::SecretManager::UserInteractionMode
Access functions:
Sailfish::Secrets::SecretManager::UserInteractionMode | userInteractionMode() const |
void | setUserInteractionMode(Sailfish::Secrets::SecretManager::UserInteractionMode mode) |
Notifier signal:
void | userInteractionModeChanged() |
Member Function Documentation
DeleteSecretRequest::DeleteSecretRequest(QObject *parent = Q_NULLPTR)
Constructs a new DeleteSecretRequest object with the given parent.
DeleteSecretRequest::~DeleteSecretRequest()
Destroys the DeleteSecretRequest
Sailfish::Secrets::Secret::Identifier DeleteSecretRequest::identifier() const
Returns the identifier of the secret which the client wishes to delete
Note: Getter function for property identifier.
See also setIdentifier().
[virtual]
Sailfish::Secrets::SecretManager *DeleteSecretRequest::manager() const
See also setManager().
[virtual]
Sailfish::Secrets::Result DeleteSecretRequest::result() const
[virtual]
void DeleteSecretRequest::setManager(Sailfish::Secrets::SecretManager *manager)
See also manager().
[virtual]
void DeleteSecretRequest::startRequest()
[virtual]
Sailfish::Secrets::Request::Status DeleteSecretRequest::status() const
Sailfish::Secrets::SecretManager::UserInteractionMode DeleteSecretRequest::userInteractionMode() const
Returns the user interaction mode required when deleting the secret (e.g. if a custom lock code must be requested from the user)
Note: Getter function for property userInteractionMode.
See also setUserInteractionMode().