19 #ifndef LIB_QUENTIER_TYPES_NOTEBOOK_H
20 #define LIB_QUENTIER_TYPES_NOTEBOOK_H
22 #include "IFavoritableDataElement.h"
24 #include <qt5qevercloud/QEverCloud.h>
26 #include <QSharedDataPointer>
30 QT_FORWARD_DECLARE_CLASS(SharedNotebook)
31 QT_FORWARD_DECLARE_CLASS(User)
32 QT_FORWARD_DECLARE_CLASS(NotebookData)
49 explicit Notebook(
const qevercloud::Notebook & other);
50 explicit Notebook(qevercloud::Notebook && other);
51 Notebook & operator=(
const qevercloud::Notebook & other);
52 Notebook & operator=(qevercloud::Notebook && other);
56 bool operator==(
const Notebook & other)
const;
57 bool operator!=(
const Notebook & other)
const;
59 const qevercloud::Notebook & qevercloudNotebook()
const;
60 qevercloud::Notebook & qevercloudNotebook();
62 virtual void clear()
override;
64 static bool validateName(
65 const QString & name,
ErrorString * pErrorDescription =
nullptr);
67 virtual bool hasGuid()
const override;
68 virtual const QString & guid()
const override;
69 virtual void setGuid(
const QString & guid)
override;
71 virtual bool hasUpdateSequenceNumber()
const override;
72 virtual qint32 updateSequenceNumber()
const override;
73 virtual void setUpdateSequenceNumber(
const qint32 usn)
override;
75 virtual bool checkParameters(
ErrorString & errorDescription)
const override;
78 const QString & name()
const;
79 void setName(
const QString & name);
81 bool isDefaultNotebook()
const;
82 void setDefaultNotebook(
const bool defaultNotebook);
84 bool hasLinkedNotebookGuid()
const;
85 const QString & linkedNotebookGuid()
const;
86 void setLinkedNotebookGuid(
const QString & linkedNotebookGuid);
88 bool hasCreationTimestamp()
const;
89 qint64 creationTimestamp()
const;
90 void setCreationTimestamp(
const qint64 timestamp);
92 bool hasModificationTimestamp()
const;
93 qint64 modificationTimestamp()
const;
94 void setModificationTimestamp(
const qint64 timestamp);
96 bool hasPublishingUri()
const;
97 const QString & publishingUri()
const;
98 void setPublishingUri(
const QString & uri);
100 bool hasPublishingOrder()
const;
101 qint8 publishingOrder()
const;
102 void setPublishingOrder(
const qint8 order);
104 bool hasPublishingAscending()
const;
105 bool isPublishingAscending()
const;
106 void setPublishingAscending(
const bool ascending);
108 bool hasPublishingPublicDescription()
const;
109 const QString & publishingPublicDescription()
const;
110 void setPublishingPublicDescription(
const QString & publishingPublicDescription);
112 bool hasPublished()
const;
113 bool isPublished()
const;
114 void setPublished(
const bool published);
116 bool hasStack()
const;
117 const QString & stack()
const;
118 void setStack(
const QString & stack);
120 bool hasSharedNotebooks();
121 QList<SharedNotebook> sharedNotebooks()
const;
122 void setSharedNotebooks(QList<qevercloud::SharedNotebook> sharedNotebooks);
123 void setSharedNotebooks(QList<SharedNotebook> && notebooks);
127 bool hasBusinessNotebookDescription()
const;
128 const QString & businessNotebookDescription()
const;
130 void setBusinessNotebookDescription(
131 const QString & businessNotebookDescription);
133 bool hasBusinessNotebookPrivilegeLevel()
const;
134 qint8 businessNotebookPrivilegeLevel()
const;
135 void setBusinessNotebookPrivilegeLevel(
const qint8 privilegeLevel);
137 bool hasBusinessNotebookRecommended()
const;
138 bool isBusinessNotebookRecommended()
const;
139 void setBusinessNotebookRecommended(
const bool recommended);
141 bool hasContact()
const;
142 const User contact()
const;
143 void setContact(
const User & contact);
145 bool isLastUsed()
const;
146 void setLastUsed(
const bool lastUsed);
148 bool canReadNotes()
const;
149 void setCanReadNotes(
const bool canReadNotes);
151 bool canCreateNotes()
const;
152 void setCanCreateNotes(
const bool canCreateNotes);
154 bool canUpdateNotes()
const;
155 void setCanUpdateNotes(
const bool canUpdateNotes);
157 bool canExpungeNotes()
const;
158 void setCanExpungeNotes(
const bool canExpungeNotes);
160 bool canShareNotes()
const;
161 void setCanShareNotes(
const bool canShareNotes);
163 bool canEmailNotes()
const;
164 void setCanEmailNotes(
const bool canEmailNotes);
166 bool canSendMessageToRecipients()
const;
167 void setCanSendMessageToRecipients(
const bool canSendMessageToRecipients);
169 bool canUpdateNotebook()
const;
170 void setCanUpdateNotebook(
const bool canUpdateNotebook);
172 bool canExpungeNotebook()
const;
173 void setCanExpungeNotebook(
const bool canExpungeNotebook);
175 bool canSetDefaultNotebook()
const;
176 void setCanSetDefaultNotebook(
const bool canSetDefaultNotebook);
178 bool canSetNotebookStack()
const;
179 void setCanSetNotebookStack(
const bool canSetNotebookStack);
181 bool canPublishToPublic()
const;
182 void setCanPublishToPublic(
const bool canPublishToPublic);
184 bool canPublishToBusinessLibrary()
const;
185 void setCanPublishToBusinessLibrary(
const bool canPublishToBusinessLibrary);
187 bool canCreateTags()
const;
188 void setCanCreateTags(
const bool canCreateTags);
190 bool canUpdateTags()
const;
191 void setCanUpdateTags(
const bool canUpdateTags);
193 bool canExpungeTags()
const;
194 void setCanExpungeTags(
const bool canExpungeTags);
196 bool canSetParentTag()
const;
197 void setCanSetParentTag(
const bool canSetParentTag);
199 bool canCreateSharedNotebooks()
const;
200 void setCanCreateSharedNotebooks(
const bool canCreateSharedNotebooks);
202 bool canShareNotesWithBusiness()
const;
203 void setCanShareNotesWithBusiness(
const bool canShareNotesWithBusiness);
205 bool canRenameNotebook()
const;
206 void setCanRenameNotebook(
const bool canRenameNotebook);
208 bool hasUpdateWhichSharedNotebookRestrictions()
const;
209 qint8 updateWhichSharedNotebookRestrictions()
const;
210 void setUpdateWhichSharedNotebookRestrictions(
const qint8 which);
212 bool hasExpungeWhichSharedNotebookRestrictions()
const;
213 qint8 expungeWhichSharedNotebookRestrictions()
const;
214 void setExpungeWhichSharedNotebookRestrictions(
const qint8 which);
216 bool hasRestrictions()
const;
217 const qevercloud::NotebookRestrictions & restrictions()
const;
219 void setNotebookRestrictions(
220 qevercloud::NotebookRestrictions && restrictions);
222 bool hasRecipientReminderNotifyEmail()
const;
223 bool recipientReminderNotifyEmail()
const;
224 void setRecipientReminderNotifyEmail(
const bool notifyEmail);
226 bool hasRecipientReminderNotifyInApp()
const;
227 bool recipientReminderNotifyInApp()
const;
228 void setRecipientReminderNotifyInApp(
const bool notifyInApp);
230 bool hasRecipientInMyList()
const;
231 bool recipientInMyList()
const;
232 void setRecipientInMyList(
const bool inMyList);
234 bool hasRecipientStack()
const;
235 const QString & recipientStack()
const;
236 void setRecipientStack(
const QString & recipientString);
238 bool hasRecipientSettings()
const;
239 const qevercloud::NotebookRecipientSettings & recipientSettings()
const;
240 void setNotebookRecipientSettings(qevercloud::NotebookRecipientSettings && settings);
242 virtual QTextStream & print(QTextStream & strm)
const override;
245 QSharedDataPointer<NotebookData> d;
252 #endif // LIB_QUENTIER_TYPES_NOTEBOOK_H