libquentier  0.4.0
The library for rich desktop clients of Evernote service
Classes | Public Member Functions | List of all members
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:
Inheritance graph
[legend]
Collaboration diagram for quentier::Account:
Collaboration graph
[legend]

Classes

struct  EvernoteAccountType
 
struct  Type
 

Public Member Functions

 Account (const QString &name, const Type::type type, const qevercloud::UserID userId=-1, const EvernoteAccountType::type evernoteAccountType=EvernoteAccountType::Free, const QString &evernoteHost=QString(), const QString &shardId=QString())
 
 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 (const QString &name)
 setName - set the username to the account
 
QString displayName () const
 
void setDisplayName (const QString &displayName)
 
Type::type type () const
 
qevercloud::UserID id () const
 
EvernoteAccountType::type evernoteAccountType () const
 
QString evernoteHost () const
 
QString shardId () const
 
void setEvernoteAccountType (const EvernoteAccountType::type evernoteAccountType)
 
void setEvernoteHost (const QString &evernoteHost)
 
void setShardId (const 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 Q_DECL_OVERRIDE
 
- Public Member Functions inherited from quentier::Printable
virtual const QString toString () const
 

Additional Inherited Members

- Protected Member Functions inherited from quentier::Printable
 Printable (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::type 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

◆ setDisplayName()

void quentier::Account::setDisplayName ( const 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::type quentier::Account::type ( ) const
Returns
the type of the account: either local of Evernote