libquentier  0.4.0
The library for rich desktop clients of Evernote service
SharedNotebook.h
1 /*
2  * Copyright 2016 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 #if QT_VERSION >= QT_VERSION_CHECK(5, 0, 0)
25 #include <qt5qevercloud/QEverCloud.h>
26 #else
27 #include <qt4qevercloud/QEverCloud.h>
28 #endif
29 
30 #include <QSharedDataPointer>
31 
32 namespace quentier {
33 
34 QT_FORWARD_DECLARE_CLASS(SharedNotebookData)
35 
36 class QUENTIER_EXPORT SharedNotebook: public Printable
37 {
38 public:
39  typedef qevercloud::SharedNotebookPrivilegeLevel::type SharedNotebookPrivilegeLevel;
40 
41 public:
42  explicit SharedNotebook();
43  SharedNotebook(const SharedNotebook & other);
45  explicit SharedNotebook(const qevercloud::SharedNotebook & qecSharedNotebook);
46  SharedNotebook & operator=(const SharedNotebook & other);
47  SharedNotebook & operator=(SharedNotebook && other);
48  virtual ~SharedNotebook();
49 
50  bool operator==(const SharedNotebook & other) const;
51  bool operator!=(const SharedNotebook & other) const;
52 
53  const qevercloud::SharedNotebook & qevercloudSharedNotebook() const;
54  qevercloud::SharedNotebook & qevercloudSharedNotebook();
55 
56  int indexInNotebook() const;
57  void setIndexInNotebook(const int index);
58 
59  bool hasId() const;
60  qint64 id() const;
61  void setId(const qint64 id);
62 
63  bool hasUserId() const;
64  qint32 userId() const;
65  void setUserId(const qint32 userId);
66 
67  bool hasNotebookGuid() const;
68  const QString & notebookGuid() const;
69  void setNotebookGuid(const QString & notebookGuid);
70 
71  bool hasEmail() const;
72  const QString & email() const;
73  void setEmail(const QString & email);
74 
75  bool hasCreationTimestamp() const;
76  qint64 creationTimestamp() const;
77  void setCreationTimestamp(const qint64 timestamp);
78 
79  bool hasModificationTimestamp() const;
80  qint64 modificationTimestamp() const;
81  void setModificationTimestamp(const qint64 timestamp);
82 
83  bool hasUsername() const;
84  const QString & username() const;
85  void setUsername(const QString & username);
86 
87  bool hasPrivilegeLevel() const;
88  SharedNotebookPrivilegeLevel privilegeLevel() const;
89  void setPrivilegeLevel(const SharedNotebookPrivilegeLevel privilegeLevel);
90  void setPrivilegeLevel(const qint8 privilegeLevel);
91 
92  bool hasReminderNotifyEmail() const;
93  bool reminderNotifyEmail() const;
94  void setReminderNotifyEmail(const bool notifyEmail);
95 
96  bool hasReminderNotifyApp() const;
97  bool reminderNotifyApp() const;
98  void setReminderNotifyApp(const bool notifyApp);
99 
100  bool hasRecipientUsername() const;
101  const QString & recipientUsername() const;
102  void setRecipientUsername(const QString & recipientUsername);
103 
104  bool hasRecipientUserId() const;
105  qint32 recipientUserId() const;
106  void setRecipientUserId(const qint32 userId);
107 
108  bool hasRecipientIdentityId() const;
109  qint64 recipientIdentityId() const;
110  void setRecipientIdentityId(const qint64 recipientIdentityId);
111 
112  bool hasGlobalId() const;
113  const QString & globalId() const;
114  void setGlobalId(const QString & globalId);
115 
116  bool hasSharerUserId() const;
117  qint32 sharerUserId() const;
118  void setSharerUserId(qint32 sharerUserId);
119 
120  bool hasAssignmentTimestamp() const;
121  qint64 assignmentTimestamp() const;
122  void setAssignmentTimestamp(const qint64 timestamp);
123 
124  virtual QTextStream & print(QTextStream & strm) const Q_DECL_OVERRIDE;
125 
126  friend class Notebook;
127 
128 private:
129  QSharedDataPointer<SharedNotebookData> d;
130 };
131 
132 } // namespace quentier
133 
134 #endif // LIB_QUENTIER_TYPES_SHARED_NOTEBOOK_H
Definition: SharedNotebook.h:36
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