libquentier 0.8.0
The library for rich desktop clients of Evernote service
Loading...
Searching...
No Matches
Classes | Public Types | Public Member Functions | Friends | List of all members
quentier::IKeychainService Class Referenceabstract

The IKeychainService interface provides the ability to interact with the storage of sensitive data - read, write and delete it. More...

#include <IKeychainService.h>

Inheritance diagram for quentier::IKeychainService:
Inheritance graph
[legend]

Classes

class  Exception
 The IKeychainService::Exception class is the base class for exceptions returned inside QFutures from methods of IKeychainService. More...
 

Public Types

enum class  ErrorCode {
  NoError , EntryNotFound , CouldNotDeleteEntry , AccessDeniedByUser ,
  AccessDenied , NoBackendAvailable , NotImplemented , OtherError
}
 

Public Member Functions

virtual QFuture< voidwritePassword (QString service, QString key, QString password)=0
 
virtual QFuture< QStringreadPassword (QString service, QString key) const =0
 
virtual QFuture< voiddeletePassword (QString service, QString key)=0
 

Friends

QUENTIER_EXPORT QTextStreamoperator<< (QTextStream &strm, ErrorCode errorCode)
 
QUENTIER_EXPORT QDebugoperator<< (QDebug &dbg, ErrorCode errorCode)
 

Detailed Description

The IKeychainService interface provides the ability to interact with the storage of sensitive data - read, write and delete it.

Member Enumeration Documentation

◆ 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

Member Function Documentation

◆ deletePassword()

virtual QFuture< void > quentier::IKeychainService::deletePassword ( QString  service,
QString  key 
)
pure virtual

deletePassword potentially asynchronously deletes password from the keychain.

Parameters
serviceName of service within the keychain
keyKey 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::IKeychainService::readPassword ( QString  service,
QString  key 
) const
pure virtual

readPassword method potentially asynchronously reads password from the keychain.

Parameters
serviceName of service within the keychain
keyKey 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::IKeychainService::writePassword ( QString  service,
QString  key,
QString  password 
)
pure virtual

writePassword method potentially asynchronously writes password to the keychain.

Parameters
serviceName of service within the keychain
keyKey to store the password under
passwordPassword 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.