libquentier  0.4.0
The library for rich desktop clients of Evernote service
Account.h
1 #ifndef LIB_QUENTIER_TYPES_ACCOUNT_H
2 #define LIB_QUENTIER_TYPES_ACCOUNT_H
3 
4 #include <quentier/utility/Printable.h>
5 #include <quentier/utility/Macros.h>
6 #include <QString>
7 #include <QSharedDataPointer>
8 
9 #if QT_VERSION >= QT_VERSION_CHECK(5, 0, 0)
10 #include <qt5qevercloud/QEverCloud.h>
11 #else
12 #include <qt4qevercloud/QEverCloud.h>
13 #endif
14 
15 namespace quentier {
16 
17 QT_FORWARD_DECLARE_CLASS(AccountData)
18 
19 
24 class QUENTIER_EXPORT Account: public Printable
25 {
26 public:
27  struct Type
28  {
29  enum type
30  {
31  Local = 0,
32  Evernote
33  };
34  };
35 
37  {
38  enum type
39  {
40  Free = 0,
41  Plus,
42  Premium,
43  Business
44  };
45  };
46 
47 public:
48  explicit Account();
49  explicit Account(const QString & name, const Type::type type,
50  const qevercloud::UserID userId = -1,
51  const EvernoteAccountType::type evernoteAccountType = EvernoteAccountType::Free,
52  const QString & evernoteHost = QString(),
53  const QString & shardId = QString());
54  Account(const Account & other);
55  Account & operator=(const Account & other);
56  virtual ~Account();
57 
58  bool operator==(const Account & other) const;
59  bool operator!=(const Account & other) const;
60 
65  bool isEmpty() const;
66 
70  QString name() const;
71 
75  void setName(const QString & name);
76 
81  QString displayName() const;
82 
86  void setDisplayName(const QString & displayName);
87 
91  Type::type type() const;
92 
96  qevercloud::UserID id() const;
97 
101  EvernoteAccountType::type evernoteAccountType() const;
102 
106  QString evernoteHost() const;
107 
111  QString shardId() const;
112 
113  void setEvernoteAccountType(const EvernoteAccountType::type evernoteAccountType);
114  void setEvernoteHost(const QString & evernoteHost);
115  void setShardId(const QString & shardId);
116 
117  qint32 mailLimitDaily() const;
118  qint64 noteSizeMax() const;
119  qint64 resourceSizeMax() const;
120  qint32 linkedNotebookMax() const;
121  qint32 noteCountMax() const;
122  qint32 notebookCountMax() const;
123  qint32 tagCountMax() const;
124  qint32 noteTagCountMax() const;
125  qint32 savedSearchCountMax() const;
126  qint32 noteResourceCountMax() const;
127  void setEvernoteAccountLimits(const qevercloud::AccountLimits & limits);
128 
129  virtual QTextStream & print(QTextStream & strm) const Q_DECL_OVERRIDE;
130 
131 private:
132  QSharedDataPointer<AccountData> d;
133 };
134 
135 } // namespace quentier
136 
137 #endif // LIB_QUENTIER_TYPES_ACCOUNT_H
The Printable class is the interface for Quentier's internal classes which should be able to write th...
Definition: Printable.h:54
The Account class encapsulates some details about the account: its name, whether it is local or synch...
Definition: Account.h:24
Definition: Account.h:27