19#ifndef LIB_QUENTIER_UTILITY_I_KEYCHAIN_SERVICE_H
20#define LIB_QUENTIER_UTILITY_I_KEYCHAIN_SERVICE_H
22#include <quentier/types/ErrorString.h>
23#include <quentier/utility/ForwardDeclarations.h>
24#include <quentier/utility/Linkage.h>
31QT_FORWARD_DECLARE_CLASS(QDebug)
40class QUENTIER_EXPORT IKeychainService :
public QObject
44 explicit IKeychainService(QObject * parent =
nullptr);
47 virtual ~IKeychainService() {}
88 friend QTextStream & operator<<(
89 QTextStream & strm,
const ErrorCode errorCode);
91 friend QDebug & operator<<(QDebug & dbg,
const ErrorCode errorCode);
107 const QString & service,
const QString & key,
108 const QString & password) = 0;
122 const QString & service,
const QString & key) = 0;
136 const QString & service,
const QString & key) = 0;
187 Q_DISABLE_COPY(IKeychainService);
190QUENTIER_EXPORT IKeychainServicePtr
191newQtKeychainService(QObject * parent =
nullptr);
193QUENTIER_EXPORT IKeychainServicePtr
194newObfuscatingKeychainService(QObject * parent =
nullptr);
196QUENTIER_EXPORT IKeychainServicePtr newCompositeKeychainService(
197 QString name, IKeychainServicePtr primaryKeychain,
198 IKeychainServicePtr secondaryKeychain, QObject * parent =
nullptr);
200QUENTIER_EXPORT IKeychainServicePtr newMigratingKeychainService(
201 IKeychainServicePtr sourceKeychain, IKeychainServicePtr sinkKeychain,
202 QObject * parent =
nullptr);
The ErrorString class encapsulates two (or more) strings which are meant to contain translatable (bas...
Definition ErrorString.h:44
virtual QUuid startWritePasswordJob(const QString &service, const QString &key, const QString &password)=0
virtual QUuid startDeletePasswordJob(const QString &service, const QString &key)=0
void readPasswordJobFinished(QUuid requestId, ErrorCode errorCode, ErrorString errorDescription, QString password)
void deletePasswordJobFinished(QUuid requestId, ErrorCode errorCode, ErrorString errorDescription)
virtual QUuid startReadPasswordJob(const QString &service, const QString &key)=0
void writePasswordJobFinished(QUuid requestId, ErrorCode errorCode, ErrorString errorDescription)
ErrorCode
Definition IKeychainService.h:53
@ AccessDeniedByUser
Definition IKeychainService.h:69
@ OtherError
Definition IKeychainService.h:85
@ NoError
Definition IKeychainService.h:57
@ EntryNotFound
Definition IKeychainService.h:61
@ NotImplemented
Definition IKeychainService.h:81
@ AccessDenied
Definition IKeychainService.h:73
@ CouldNotDeleteEntry
Definition IKeychainService.h:65
@ NoBackendAvailable
Definition IKeychainService.h:77