The IKeychainService interface provides the ability to interact with the storage of sensitive data - read, write and delete it.
More...
#include <IKeychainService.h>
|
| virtual QFuture< void > | writePassword (QString service, QString key, QString password)=0 |
| |
| virtual QFuture< QString > | readPassword (QString service, QString key) const =0 |
| |
| virtual QFuture< void > | deletePassword (QString service, QString key)=0 |
| |
|
|
QUENTIER_EXPORT QTextStream & | operator<< (QTextStream &strm, ErrorCode errorCode) |
| |
|
QUENTIER_EXPORT QDebug & | operator<< (QDebug &dbg, ErrorCode errorCode) |
| |
The IKeychainService interface provides the ability to interact with the storage of sensitive data - read, write and delete it.
◆ ErrorCode
Error codes for results of operations with the keychain service
| Enumerator |
|---|
| NoError | No error occurred, operation was successful
|
| EntryNotFound | For the given key no data was found
|
| CouldNotDeleteEntry | Could not delete existing secret data
|
| AccessDeniedByUser | User denied access to keychain
|
| AccessDenied | Access denied for some reason
|
| NoBackendAvailable | No platform-specific keychain service available
|
| NotImplemented | Not implemented on platform
|
| OtherError | Something else went wrong, the error description specifies what
|
◆ deletePassword()
| virtual QFuture< void > quentier::utility::IKeychainService::deletePassword |
( |
QString | service, |
|
|
QString | key ) |
|
nodiscardpure virtual |
deletePassword potentially asynchronously deletes password from the keychain.
- Parameters
-
| service | Name of service within the keychain |
| key | Key under which the password is stored |
- Returns
- Future which becomes finished when the operation is comlete. If the operation fails, the future would contain an exception.
◆ readPassword()
| virtual QFuture< QString > quentier::utility::IKeychainService::readPassword |
( |
QString | service, |
|
|
QString | key ) const |
|
nodiscardpure virtual |
readPassword method potentially asynchronously reads password from the keychain.
- Parameters
-
| service | Name of service within the keychain |
| key | Key under which the password is stored |
- Returns
- Future which becomes finished when the operation is complete. The value inside the future would be the read password. If the operation fails, the future would contain an exception.
◆ writePassword()
| virtual QFuture< void > quentier::utility::IKeychainService::writePassword |
( |
QString | service, |
|
|
QString | key, |
|
|
QString | password ) |
|
nodiscardpure virtual |
writePassword method potentially asynchronously writes password to the keychain.
- Parameters
-
| service | Name of service within the keychain |
| key | Key to store the password under |
| password | Password to store in the keychain |
- Returns
- Future which becomes finished when the operation is comlete. If the operation fails, the future would contain an exception.