libquentier 0.5.0
The library for rich desktop clients of Evernote service
Loading...
Searching...
No Matches
SharedNotebook.h
1/*
2 * Copyright 2016-2020 Dmitry Ivanov
3 *
4 * This file is part of libquentier
5 *
6 * libquentier is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU Lesser General Public License as published by
8 * the Free Software Foundation, version 3 of the License.
9 *
10 * libquentier is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU Lesser General Public License for more details.
14 *
15 * You should have received a copy of the GNU Lesser General Public License
16 * along with libquentier. If not, see <http://www.gnu.org/licenses/>.
17 */
18
19#ifndef LIB_QUENTIER_TYPES_SHARED_NOTEBOOK_H
20#define LIB_QUENTIER_TYPES_SHARED_NOTEBOOK_H
21
22#include <quentier/utility/Printable.h>
23
24#include <qt5qevercloud/QEverCloud.h>
25
26#include <QSharedDataPointer>
27
28namespace quentier {
29
30QT_FORWARD_DECLARE_CLASS(SharedNotebookData)
31
32class QUENTIER_EXPORT SharedNotebook : public Printable
33{
34public:
35 using SharedNotebookPrivilegeLevel =
36 qevercloud::SharedNotebookPrivilegeLevel;
37
38public:
39 explicit SharedNotebook();
40 SharedNotebook(const SharedNotebook & other);
42
43 explicit SharedNotebook(
44 const qevercloud::SharedNotebook & qecSharedNotebook);
45
46 SharedNotebook & operator=(const SharedNotebook & other);
47 SharedNotebook & operator=(SharedNotebook && other);
48
49 virtual ~SharedNotebook() override;
50
51 bool operator==(const SharedNotebook & other) const;
52 bool operator!=(const SharedNotebook & other) const;
53
54 const qevercloud::SharedNotebook & qevercloudSharedNotebook() const;
55 qevercloud::SharedNotebook & qevercloudSharedNotebook();
56
57 int indexInNotebook() const;
58 void setIndexInNotebook(const int index);
59
60 bool hasId() const;
61 qint64 id() const;
62 void setId(const qint64 id);
63
64 bool hasUserId() const;
65 qint32 userId() const;
66 void setUserId(const qint32 userId);
67
68 bool hasNotebookGuid() const;
69 const QString & notebookGuid() const;
70 void setNotebookGuid(const QString & notebookGuid);
71
72 bool hasEmail() const;
73 const QString & email() const;
74 void setEmail(const QString & email);
75
76 bool hasCreationTimestamp() const;
77 qint64 creationTimestamp() const;
78 void setCreationTimestamp(const qint64 timestamp);
79
80 bool hasModificationTimestamp() const;
81 qint64 modificationTimestamp() const;
82 void setModificationTimestamp(const qint64 timestamp);
83
84 bool hasUsername() const;
85 const QString & username() const;
86 void setUsername(const QString & username);
87
88 bool hasPrivilegeLevel() const;
89 SharedNotebookPrivilegeLevel privilegeLevel() const;
90 void setPrivilegeLevel(const SharedNotebookPrivilegeLevel privilegeLevel);
91 void setPrivilegeLevel(const qint8 privilegeLevel);
92
93 bool hasReminderNotifyEmail() const;
94 bool reminderNotifyEmail() const;
95 void setReminderNotifyEmail(const bool notifyEmail);
96
97 bool hasReminderNotifyApp() const;
98 bool reminderNotifyApp() const;
99 void setReminderNotifyApp(const bool notifyApp);
100
101 bool hasRecipientUsername() const;
102 const QString & recipientUsername() const;
103 void setRecipientUsername(const QString & recipientUsername);
104
105 bool hasRecipientUserId() const;
106 qint32 recipientUserId() const;
107 void setRecipientUserId(const qint32 userId);
108
109 bool hasRecipientIdentityId() const;
110 qint64 recipientIdentityId() const;
111 void setRecipientIdentityId(const qint64 recipientIdentityId);
112
113 bool hasGlobalId() const;
114 const QString & globalId() const;
115 void setGlobalId(const QString & globalId);
116
117 bool hasSharerUserId() const;
118 qint32 sharerUserId() const;
119 void setSharerUserId(qint32 sharerUserId);
120
121 bool hasAssignmentTimestamp() const;
122 qint64 assignmentTimestamp() const;
123 void setAssignmentTimestamp(const qint64 timestamp);
124
125 virtual QTextStream & print(QTextStream & strm) const override;
126
127 friend class Notebook;
128
129private:
130 QSharedDataPointer<SharedNotebookData> d;
131};
132
133} // namespace quentier
134
135#endif // LIB_QUENTIER_TYPES_SHARED_NOTEBOOK_H
Definition Notebook.h:35
The Printable class is the interface for Quentier's internal classes which should be able to write th...
Definition Printable.h:38
Definition SharedNotebook.h:33