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

IUserStore is the interface which provides methods required for the implementation of UserStore part of Evernote EDAM sync protocol. More...

#include <IUserStore.h>

Public Member Functions

virtual void setAuthData (QString authenticationToken, QList< QNetworkCookie > cookies)=0
 
virtual bool checkVersion (const QString &clientName, qint16 edamVersionMajor, qint16 edamVersionMinor, ErrorString &errorDescription)=0
 
virtual qint32 getUser (User &user, ErrorString &errorDescription, qint32 &rateLimitSeconds)=0
 
virtual qint32 getAccountLimits (const qevercloud::ServiceLevel serviceLevel, qevercloud::AccountLimits &limits, ErrorString &errorDescription, qint32 &rateLimitSeconds)=0
 

Detailed Description

IUserStore is the interface which provides methods required for the implementation of UserStore part of Evernote EDAM sync protocol.

Member Function Documentation

◆ checkVersion()

virtual bool quentier::IUserStore::checkVersion ( const QString &  clientName,
qint16  edamVersionMajor,
qint16  edamVersionMinor,
ErrorString errorDescription 
)
pure virtual

Check the version of EDAM protocol

Parameters
clientNameApplication name + application version + platform name string
edamVersionMajorThe major version of EDAM protocol the application wants to use to connect to Evernote
edamVersionMinorThe minor version of EDAM protocol the application wants to use to connect to Evernote
errorDescriptionThe textual description of the error if the supplied protocol version cannot be used to connect to Evernote
Returns
True if protocol check was successful i.e. the service can talk to the client using the supplied protocol version, false otherwise

◆ getAccountLimits()

virtual qint32 quentier::IUserStore::getAccountLimits ( const qevercloud::ServiceLevel  serviceLevel,
qevercloud::AccountLimits &  limits,
ErrorString errorDescription,
qint32 &  rateLimitSeconds 
)
pure virtual

Retrieve account limits corresponding to certain provided service level

Parameters
serviceLevelThe level of Evernote service for which account limits are requested
limitsOutput account limits
errorDescriptionThe textual description of the error if account limits could not be retrieved
rateLimitSecondsOutput parameter, the number of seconds the client needs to wait before attempting to call this method or any other method calling Evernote API again; only meaningful if returned value matches qevercloud::EDAMErrorCode::RATE_LIMIT_REACHED
Returns
Error code, 0 in case of successful retrieval of account limits for the given service level, other values corresponding to qevercoud::EDAMErrorCode::type enumeration instead

◆ getUser()

virtual qint32 quentier::IUserStore::getUser ( User user,
ErrorString errorDescription,
qint32 &  rateLimitSeconds 
)
pure virtual

Retrieve full information about user (account)

Parameters
userInput and output parameter; on input needs to have user id set
errorDescriptionThe textual description of the error if full user information could not be retrieved
rateLimitSecondsOutput parameter, the number of seconds the client needs to wait before attempting to call this method or any other method calling Evernote API again; only meaningful if returned value matches qevercloud::EDAMErrorCode::RATE_LIMIT_REACHED
Returns
Error code, 0 in case of successful retrieval of full user information, other values corresponding to qevercloud::EDAMErrorCode enumeration instead

◆ setAuthData()

virtual void quentier::IUserStore::setAuthData ( QString  authenticationToken,
QList< QNetworkCookie >  cookies 
)
pure virtual

Set authentication data to be used by this IUserStore instance