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

The IKeychainService interface provides methods intended to start potentially asynchronous interaction with the keychain and signals intended to notify listeners about the completion of asynchronous interactions. More...

#include <IKeychainService.h>

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

Public Types

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

Signals

void writePasswordJobFinished (QUuid requestId, ErrorCode errorCode, ErrorString errorDescription)
 
void readPasswordJobFinished (QUuid requestId, ErrorCode errorCode, ErrorString errorDescription, QString password)
 
void deletePasswordJobFinished (QUuid requestId, ErrorCode errorCode, ErrorString errorDescription)
 

Public Member Functions

virtual QUuid startWritePasswordJob (const QString &service, const QString &key, const QString &password)=0
 
virtual QUuid startReadPasswordJob (const QString &service, const QString &key)=0
 
virtual QUuid startDeletePasswordJob (const QString &service, const QString &key)=0
 

Protected Member Functions

 IKeychainService (QObject *parent=nullptr)
 

Friends

QTextStream & operator<< (QTextStream &strm, const ErrorCode errorCode)
 
QDebug & operator<< (QDebug &dbg, const ErrorCode errorCode)
 

Detailed Description

The IKeychainService interface provides methods intended to start potentially asynchronous interaction with the keychain and signals intended to notify listeners about the completion of asynchronous interactions.

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

◆ deletePasswordJobFinished

void quentier::IKeychainService::deletePasswordJobFinished ( QUuid  requestId,
ErrorCode  errorCode,
ErrorString  errorDescription 
)
signal

deletePasswordJobFinished signal should be emitted in response to the call of startDeletePasswordJob method

Parameters
requestIdRequest id returned from startDeletePasswordJob method
errorCodeError code determining whether the operation was successful or some error has occurred
errorDescriptionTextual description of error in case of unsuccessful execution

◆ readPasswordJobFinished

void quentier::IKeychainService::readPasswordJobFinished ( QUuid  requestId,
ErrorCode  errorCode,
ErrorString  errorDescription,
QString  password 
)
signal

readPasswordJobFinished signal should be emitted in response to the call of startReadPasswordJob method

Parameters
requestIdRequest id returned from startReadPasswordJob method
errorCodeError code determining whether the operation was successful or some error has occurred
errorDescriptionTextual description of error in case of unsuccessful execution
passwordPassword read from the keychain

◆ startDeletePasswordJob()

virtual QUuid quentier::IKeychainService::startDeletePasswordJob ( const QString &  service,
const QString &  key 
)
pure virtual

startDeletePasswordJob slot should start the potentially asynchronous process of deleting the password from the keychain. When ready, this slot is expected to emit deletePasswordJobFinished signal.

Parameters
serviceName of service within the keychain
keyKey under which the password is stored
Returns
Unique identifier assigned to this delete password request

◆ startReadPasswordJob()

virtual QUuid quentier::IKeychainService::startReadPasswordJob ( const QString &  service,
const QString &  key 
)
pure virtual

startReadPasswordJob slot should start the potentially asynchronous process of reading the password from the keychain. When ready, this slot is expected to emit readPasswordJobFinished signal.

Parameters
serviceName of service within the keychain
keyKey under which the password is stored
Returns
Unique identifier assigned to this read password request

◆ startWritePasswordJob()

virtual QUuid quentier::IKeychainService::startWritePasswordJob ( const QString &  service,
const QString &  key,
const QString &  password 
)
pure virtual

startWritePasswordJob slot should start the potentially asynchronous process of storing the password in the keychain. When ready, this slot is expected to emit writePasswordJobFinished signal.

Parameters
serviceName of service within the keychain
keyKey to store the password under
passwordPassword to store in the keychain
Returns
Unique identifier assigned to this write password request

◆ writePasswordJobFinished

void quentier::IKeychainService::writePasswordJobFinished ( QUuid  requestId,
ErrorCode  errorCode,
ErrorString  errorDescription 
)
signal

writePasswordJobFinished signal should be emitted in response to the call of startWritePasswordJob method

Parameters
requestIdRequest id returned from startWritePasswordJob method
errorCodeError code determining whether the operation was successful or some error has occurred
errorDescriptionTextual description of error in case of unsuccessful execution