libquentier 0.5.0
The library for rich desktop clients of Evernote service
Loading...
Searching...
No Matches
quentier::Account Class Reference

The Account class encapsulates some details about the account: its name, whether it is local or synchronized to Evernote and for the latter case - some additional details like upload limit etc. More...

#include <Account.h>

Inheritance diagram for quentier::Account:
Collaboration diagram for quentier::Account:

Public Types

enum class  Type { Local = 0 , Evernote }
enum class  EvernoteAccountType { Free = 0 , Plus , Premium , Business }

Public Member Functions

 Account (QString name, const Type type, const qevercloud::UserID userId=-1, const EvernoteAccountType evernoteAccountType=EvernoteAccountType::Free, QString evernoteHost={}, QString shardId={})
 Account (const Account &other)
Accountoperator= (const Account &other)
bool operator== (const Account &other) const
bool operator!= (const Account &other) const
bool isEmpty () const
QString name () const
void setName (QString name)
 setName sets the username to the account
QString displayName () const
void setDisplayName (QString displayName)
Type type () const
qevercloud::UserID id () const
EvernoteAccountType evernoteAccountType () const
QString evernoteHost () const
QString shardId () const
void setEvernoteAccountType (const EvernoteAccountType evernoteAccountType)
void setEvernoteHost (QString evernoteHost)
void setShardId (QString shardId)
qint32 mailLimitDaily () const
qint64 noteSizeMax () const
qint64 resourceSizeMax () const
qint32 linkedNotebookMax () const
qint32 noteCountMax () const
qint32 notebookCountMax () const
qint32 tagCountMax () const
qint32 noteTagCountMax () const
qint32 savedSearchCountMax () const
qint32 noteResourceCountMax () const
void setEvernoteAccountLimits (const qevercloud::AccountLimits &limits)
virtual QTextStream & print (QTextStream &strm) const override
Public Member Functions inherited from quentier::Printable
virtual const QString toString () const

Friends

QUENTIER_EXPORT QTextStream & operator<< (QTextStream &strm, const Type type)
QUENTIER_EXPORT QDebug & operator<< (QDebug &dbg, const Type type)
QUENTIER_EXPORT QTextStream & operator<< (QTextStream &strm, const EvernoteAccountType type)
QUENTIER_EXPORT QDebug & operator<< (QDebug &dbg, const EvernoteAccountType type)

Additional Inherited Members

Protected Member Functions inherited from quentier::Printable
 Printable (const Printable &other)
Printableoperator= (const Printable &other)

Detailed Description

The Account class encapsulates some details about the account: its name, whether it is local or synchronized to Evernote and for the latter case - some additional details like upload limit etc.

Member Function Documentation

◆ displayName()

QString quentier::Account::displayName ( ) const
Returns
Printable user's name that is not used to uniquely identify the account, so this name may repeat across different local and Evernote accounts

◆ evernoteAccountType()

EvernoteAccountType quentier::Account::evernoteAccountType ( ) const
Returns
The type of the Evernote account; if applied to free account, returns "Free"

◆ evernoteHost()

QString quentier::Account::evernoteHost ( ) const
Returns
The Evernote server host with which the account is associated

◆ id()

qevercloud::UserID quentier::Account::id ( ) const
Returns
User id for Evernote accounts, -1 for local accounts (as the concept of user id is not defined for local accounts)

◆ isEmpty()

bool quentier::Account::isEmpty ( ) const
Returns
True if either the account is local but the name is empty or if the account is Evernote but user id is negative; in all other cases return false

◆ name()

QString quentier::Account::name ( ) const
Returns
Username for either local or Evernote account

◆ print()

virtual QTextStream & quentier::Account::print ( QTextStream & strm) const
overridevirtual

Implements quentier::Printable.

◆ setDisplayName()

void quentier::Account::setDisplayName ( QString displayName)

Set the printable name of the account

◆ shardId()

QString quentier::Account::shardId ( ) const
Returns
Shard id for Evernote accounts, empty string for local accounts (as the concept of shard id is not defined for local accounts)

◆ type()

Type quentier::Account::type ( ) const
Returns
The type of the account: either local of Evernote