Sailfish Secrets
API DocumentationDeleteCollectionRequest Class
(Sailfish::Secrets::DeleteCollectionRequest)Allows a client request that the system secrets service delete a collection from secrets storage More...
Header: | #include <Secrets/deletecollectionrequest.h> |
Inherits: | Sailfish::Secrets::Request |
Properties
- collectionName : QString
- storagePluginName : QString
- userInteractionMode : Sailfish::Secrets::SecretManager::UserInteractionMode
- 3 properties inherited from Sailfish::Secrets::Request
Public Functions
DeleteCollectionRequest(QObject *parent = Q_NULLPTR) | |
~DeleteCollectionRequest() | |
QString | collectionName() const |
void | setCollectionName(const QString &name) |
void | setStoragePluginName(const QString &pluginName) |
void | setUserInteractionMode(Sailfish::Secrets::SecretManager::UserInteractionMode mode) |
QString | storagePluginName() const |
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 | collectionNameChanged() |
void | storagePluginNameChanged() |
void | userInteractionModeChanged() |
- 3 signals inherited from Sailfish::Secrets::Request
Detailed Description
Allows a client request that the system secrets service delete a collection from secrets storage
This class allows clients to request the Secrets service to delete a collection with the particular collectionName() from the storage plugin with the specified storagePluginName().
If the calling application is the creator of the collection, or alternatively if the user has granted the application permission to delete the collection, then the Secrets service will instruct the storage plugin to delete the collection and any secrets it contains.
If the application is not the creator of the collection and the user has not yet been asked if the application should have permission to delete the collection, 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 collection is as follows:
Sailfish::Secrets::SecretManager sm; Sailfish::Secrets::DeleteCollectionRequest dcr; dcr.setManager(&sm); dcr.setStoragePluginName(Sailfish::Secrets::SecretManager::DefaultEncryptedStoragePluginName); dcr.setCollectionName(QLatin1String("ExampleCollection")); dcr.setUserInteractionMode(Sailfish::Secrets::SecretManager::SystemInteraction); dcr.startRequest(); // status() will change to Finished when complete
}
Property Documentation
collectionName : QString
Access functions:
QString | collectionName() const |
void | setCollectionName(const QString &name) |
Notifier signal:
void | collectionNameChanged() |
storagePluginName : QString
Access functions:
QString | storagePluginName() const |
void | setStoragePluginName(const QString &pluginName) |
Notifier signal:
void | storagePluginNameChanged() |
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
DeleteCollectionRequest::DeleteCollectionRequest(QObject *parent = Q_NULLPTR)
Constructs a new DeleteCollectionRequest object with the given parent.
DeleteCollectionRequest::~DeleteCollectionRequest()
Destroys the DeleteCollectionRequest
QString DeleteCollectionRequest::collectionName() const
Returns the name of the collection which the client wishes delete
Note: Getter function for property collectionName.
See also setCollectionName().
[virtual]
Sailfish::Secrets::SecretManager *DeleteCollectionRequest::manager() const
See also setManager().
[virtual]
Sailfish::Secrets::Result DeleteCollectionRequest::result() const
void DeleteCollectionRequest::setCollectionName(const QString &name)
Sets the name of the collection which the client wishes to delete to name
Note: Setter function for property collectionName.
See also collectionName().
[virtual]
void DeleteCollectionRequest::setManager(Sailfish::Secrets::SecretManager *manager)
See also manager().
void DeleteCollectionRequest::setStoragePluginName(const QString &pluginName)
Sets the name of the storage plugin from which the client wishes to delete the collection to pluginName
Note: Setter function for property storagePluginName.
See also storagePluginName().
[virtual]
void DeleteCollectionRequest::startRequest()
[virtual]
Sailfish::Secrets::Request::Status DeleteCollectionRequest::status() const
QString DeleteCollectionRequest::storagePluginName() const
Returns the name of the storage plugin from which the client wishes to delete the collection
Note: Getter function for property storagePluginName.
See also setStoragePluginName().
Sailfish::Secrets::SecretManager::UserInteractionMode DeleteCollectionRequest::userInteractionMode() const
Returns the user interaction mode required when deleting the collection (e.g. if a custom lock code must be requested from the user)
Note: Getter function for property userInteractionMode.
See also setUserInteractionMode().