19 #ifndef LIB_QUENTIER_TYPES_USER_H 20 #define LIB_QUENTIER_TYPES_USER_H 22 #include <quentier/utility/Printable.h> 23 #include <quentier/types/ErrorString.h> 25 #if QT_VERSION >= QT_VERSION_CHECK(5, 0, 0) 26 #include <qt5qevercloud/QEverCloud.h> 28 #include <qt4qevercloud/QEverCloud.h> 35 QT_FORWARD_DECLARE_CLASS(UserData)
40 typedef qevercloud::PrivilegeLevel::type PrivilegeLevel;
41 typedef qevercloud::ServiceLevel::type ServiceLevel;
45 explicit User(
const qevercloud::User & user);
46 explicit User(qevercloud::User && user);
49 User & operator=(
const User & other);
53 bool operator==(
const User & other)
const;
54 bool operator!=(
const User & other)
const;
56 const qevercloud::User & qevercloudUser()
const;
57 qevercloud::User & qevercloudUser();
62 void setDirty(
const bool dirty);
65 void setLocal(
const bool local);
67 bool checkParameters(
ErrorString & errorDescription)
const;
71 void setId(
const qint32
id);
73 bool hasUsername()
const;
74 const QString & username()
const;
75 void setUsername(
const QString & username);
77 bool hasEmail()
const;
78 const QString & email()
const;
79 void setEmail(
const QString & email);
82 const QString & name()
const;
83 void setName(
const QString & name);
85 bool hasTimezone()
const;
86 const QString & timezone()
const;
87 void setTimezone(
const QString & timezone);
89 bool hasPrivilegeLevel()
const;
90 PrivilegeLevel privilegeLevel()
const;
91 void setPrivilegeLevel(
const qint8 level);
93 bool hasServiceLevel()
const;
94 ServiceLevel serviceLevel()
const;
95 void setServiceLevel(
const qint8 level);
97 bool hasCreationTimestamp()
const;
98 qint64 creationTimestamp()
const;
99 void setCreationTimestamp(
const qint64 timestamp);
101 bool hasModificationTimestamp()
const;
102 qint64 modificationTimestamp()
const;
103 void setModificationTimestamp(
const qint64 timestamp);
105 bool hasDeletionTimestamp()
const;
106 qint64 deletionTimestamp()
const;
107 void setDeletionTimestamp(
const qint64 timestamp);
109 bool hasActive()
const;
111 void setActive(
const bool active);
113 bool hasShardId()
const;
114 const QString & shardId()
const;
115 void setShardId(
const QString & shardId);
117 bool hasUserAttributes()
const;
118 const qevercloud::UserAttributes & userAttributes()
const;
119 void setUserAttributes(qevercloud::UserAttributes && attributes);
121 bool hasAccounting()
const;
122 const qevercloud::Accounting & accounting()
const;
123 void setAccounting(qevercloud::Accounting && accounting);
125 bool hasBusinessUserInfo()
const;
126 const qevercloud::BusinessUserInfo & businessUserInfo()
const;
127 void setBusinessUserInfo(qevercloud::BusinessUserInfo && info);
129 bool hasPhotoUrl()
const;
130 QString photoUrl()
const;
131 void setPhotoUrl(
const QString & photoUrl);
133 bool hasPhotoLastUpdateTimestamp()
const;
134 qint64 photoLastUpdateTimestamp()
const;
135 void setPhotoLastUpdateTimestamp(
const qint64 timestamp);
137 bool hasAccountLimits()
const;
138 const qevercloud::AccountLimits & accountLimits()
const;
139 void setAccountLimits(qevercloud::AccountLimits && limits);
141 virtual QTextStream & print(QTextStream & strm)
const Q_DECL_OVERRIDE;
146 QSharedDataPointer<UserData> d;
151 #endif // LIB_QUENTIER_TYPES_USER_H The ErrorString class encapsulates two (or more) strings which are meant to contain translatable (bas...
Definition: ErrorString.h:38
The Printable class is the interface for Quentier's internal classes which should be able to write th...
Definition: Printable.h:54
Definition: Notebook.h:38