libquentier 0.8.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 , Evernote }
enum class  EvernoteAccountType { Free , Plus , Premium , Business }

Public Member Functions

 Account (QString name, Type type, qevercloud::UserID userId=-1, EvernoteAccountType evernoteAccountType=EvernoteAccountType::Free, QString evernoteHost={}, QString shardId={})
 Account (const Account &other)
 Account (Account &&other) noexcept
Account & operator= (const Account &other)
Account & operator= (Account &&other) noexcept
bool operator== (const Account &other) const noexcept
bool operator!= (const Account &other) const noexcept
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 (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)
QTextStream & print (QTextStream &strm) const override
Public Member Functions inherited from quentier::utility::Printable
QString toString () const

Friends

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

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
nodiscard
Returns
Displayable user's name which 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
nodiscard
Returns
The type of the Evernote account; if applied to free account, returns "Free"

◆ evernoteHost()

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

◆ id()

qevercloud::UserID quentier::Account::id ( ) const
nodiscard
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
nodiscard
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
nodiscard
Returns
Username for either local or Evernote account

◆ print()

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

◆ setDisplayName()

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

Set the printable name of the account

◆ shardId()

QString quentier::Account::shardId ( ) const
nodiscard
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
nodiscard
Returns
The type of the account: either local of Evernote