19#ifndef LIB_QUENTIER_LOCAL_STORAGE_LOCAL_STORAGE_MANAGER_H
20#define LIB_QUENTIER_LOCAL_STORAGE_LOCAL_STORAGE_MANAGER_H
22#include <quentier/local_storage/Lists.h>
23#include <quentier/local_storage/NoteSearchQuery.h>
24#include <quentier/types/Account.h>
25#include <quentier/types/ErrorString.h>
26#include <quentier/utility/Linkage.h>
38QT_FORWARD_DECLARE_STRUCT(Accounting)
39QT_FORWARD_DECLARE_STRUCT(BusinessUserInfo)
40QT_FORWARD_DECLARE_STRUCT(NoteAttributes)
41QT_FORWARD_DECLARE_STRUCT(NotebookRestrictions)
42QT_FORWARD_DECLARE_STRUCT(ResourceAttributes)
43QT_FORWARD_DECLARE_STRUCT(PremiumInfo)
44QT_FORWARD_DECLARE_STRUCT(SharedNotebook)
45QT_FORWARD_DECLARE_STRUCT(UserAttributes)
51QT_FORWARD_DECLARE_CLASS(ILocalStoragePatch)
52QT_FORWARD_DECLARE_CLASS(LocalStorageManagerPrivate)
83 Q_DECLARE_FLAGS(StartupOptions, StartupOption)
85 friend QUENTIER_EXPORT QTextStream & operator<<(
86 QTextStream & strm,
const StartupOption option);
88 friend QUENTIER_EXPORT QDebug & operator<<(
89 QDebug & dbg,
const StartupOption option);
91 friend QUENTIER_EXPORT QTextStream & operator<<(
92 QTextStream & strm,
const StartupOptions options);
94 friend QUENTIER_EXPORT QDebug & operator<<(
95 QDebug & dbg,
const StartupOptions options);
110#
if QT_VERSION >= QT_VERSION_CHECK(5, 15, 0)
111 const StartupOptions options = {},
113 const StartupOptions options = 0,
115 QObject * parent =
nullptr);
148 ListElementsWithoutGuid = 4,
149 ListElementsWithGuid = 8,
152 ListFavoritedElements = 64,
153 ListNonFavoritedElements = 128
155 Q_DECLARE_FLAGS(ListObjectsOptions, ListObjectsOption)
157 friend QUENTIER_EXPORT QTextStream & operator<<(
158 QTextStream & strm,
const ListObjectsOption option);
160 friend QUENTIER_EXPORT QDebug & operator<<(
161 QDebug & dbg,
const ListObjectsOption option);
163 friend QUENTIER_EXPORT QTextStream & operator<<(
164 QTextStream & strm,
const ListObjectsOptions options);
166 friend QUENTIER_EXPORT QDebug & operator<<(
167 QDebug & dbg,
const ListObjectsOptions options);
187#
if QT_VERSION >= QT_VERSION_CHECK(5, 15, 0)
188 const StartupOptions options = {});
190 const StartupOptions options = 0);
498 friend QUENTIER_EXPORT QTextStream & operator<<(
499 QTextStream & strm,
const OrderDirection orderDirection);
501 friend QUENTIER_EXPORT QDebug & operator<<(
502 QDebug & dbg,
const OrderDirection orderDirection);
510 ByUpdateSequenceNumber = 0,
513 ByModificationTimestamp,
517 friend QUENTIER_EXPORT QTextStream & operator<<(
518 QTextStream & strm,
const ListNotebooksOrder order);
520 friend QUENTIER_EXPORT QDebug & operator<<(
521 QDebug & dbg,
const ListNotebooksOrder order);
557 ErrorString & errorDescription,
const size_t limit = 0,
558 const size_t offset = 0,
561 const QString & linkedNotebookGuid = QString())
const;
597 const ListObjectsOptions flag,
ErrorString & errorDescription,
598 const size_t limit = 0,
const size_t offset = 0,
601 const QString & linkedNotebookGuid = QString())
const;
635 const QString & notebookGuid,
ErrorString & errorDescription)
const;
728 ByUpdateSequenceNumber = 0,
734 friend QUENTIER_EXPORT QTextStream & operator<<(
735 QTextStream & strm,
const ListLinkedNotebooksOrder order);
737 friend QUENTIER_EXPORT QDebug & operator<<(
738 QDebug & strm,
const ListLinkedNotebooksOrder order);
764 ErrorString & errorDescription,
const size_t limit = 0,
765 const size_t offset = 0,
767 ListLinkedNotebooksOrder::NoOrder,
768 const OrderDirection orderDirection = OrderDirection::Ascending)
const;
798 const ListObjectsOptions flag,
ErrorString & errorDescription,
799 const size_t limit = 0,
const size_t offset = 0,
801 ListLinkedNotebooksOrder::NoOrder,
802 const OrderDirection orderDirection = OrderDirection::Ascending)
const;
830 IncludeNonDeletedNotes = 1,
831 IncludeDeletedNotes = 2
833 Q_DECLARE_FLAGS(NoteCountOptions, NoteCountOption)
835 friend QUENTIER_EXPORT QTextStream & operator<<(
836 QTextStream & strm,
const NoteCountOption option);
838 friend QUENTIER_EXPORT QDebug & operator<<(
839 QDebug & dbg,
const NoteCountOption option);
841 friend QUENTIER_EXPORT QTextStream & operator<<(
842 QTextStream & strm,
const NoteCountOptions options);
844 friend QUENTIER_EXPORT QDebug & operator<<(
845 QDebug & strm,
const NoteCountOptions options);
861 const NoteCountOptions options =
862 NoteCountOption::IncludeNonDeletedNotes)
const;
882 const NoteCountOptions options =
883 NoteCountOption::IncludeNonDeletedNotes)
const;
903 const NoteCountOptions options =
904 NoteCountOption::IncludeNonDeletedNotes)
const;
924 QHash<QString, int> & noteCountsPerTagLocalUid,
926 const NoteCountOptions options =
927 NoteCountOption::IncludeNonDeletedNotes)
const;
948 const QStringList & notebookLocalUids,
const QStringList & tagLocalUids,
950 const NoteCountOptions options =
951 NoteCountOption::IncludeNonDeletedNotes)
const;
988 UpdateResourceMetadata = 1,
995 UpdateResourceBinaryData = 2,
1001 Q_DECLARE_FLAGS(UpdateNoteOptions, UpdateNoteOption)
1003 friend QUENTIER_EXPORT QTextStream & operator<<(
1004 QTextStream & strm,
const UpdateNoteOption option);
1006 friend QUENTIER_EXPORT QDebug & operator<<(
1007 QDebug & strm,
const UpdateNoteOption option);
1009 friend QUENTIER_EXPORT QTextStream & operator<<(
1010 QTextStream & strm,
const UpdateNoteOptions options);
1012 friend QUENTIER_EXPORT QDebug & operator<<(
1013 QDebug & strm,
const UpdateNoteOptions options);
1057 Note & note,
const UpdateNoteOptions options,
1078 WithResourceMetadata = 1,
1085 WithResourceBinaryData = 2
1087 Q_DECLARE_FLAGS(GetNoteOptions, GetNoteOption)
1089 friend QUENTIER_EXPORT QTextStream & operator<<(
1090 QTextStream & strm,
const GetNoteOption option);
1092 friend QUENTIER_EXPORT QDebug & operator<<(
1093 QDebug & dbg,
const GetNoteOption option);
1095 friend QUENTIER_EXPORT QTextStream & operator<<(
1096 QTextStream & strm,
const GetNoteOptions options);
1098 friend QUENTIER_EXPORT QDebug & operator<<(
1099 QDebug & strm,
const GetNoteOptions options);
1111 Note & note,
const GetNoteOptions options,
1120 ByUpdateSequenceNumber = 0,
1122 ByCreationTimestamp,
1123 ByModificationTimestamp,
1124 ByDeletionTimestamp,
1127 BySourceApplication,
1133 friend QUENTIER_EXPORT QTextStream & operator<<(
1134 QTextStream & strm,
const ListNotesOrder order);
1136 friend QUENTIER_EXPORT QDebug & operator<<(
1137 QDebug & strm,
const ListNotesOrder order);
1168 const Notebook & notebook,
const GetNoteOptions options,
1170 const ListObjectsOptions & flag = ListObjectsOption::ListAll,
1171 const size_t limit = 0,
const size_t offset = 0,
1174 OrderDirection::Ascending)
const;
1204 const Tag & tag,
const GetNoteOptions options,
1206 const ListObjectsOptions & flag = ListObjectsOption::ListAll,
1207 const size_t limit = 0,
const size_t offset = 0,
1210 OrderDirection::Ascending)
const;
1243 const QStringList & notebookLocalUids,
const QStringList & tagLocalUids,
1244 const GetNoteOptions options,
ErrorString & errorDescription,
1245 const ListObjectsOptions & flag = ListObjectsOption::ListAll,
1246 const size_t limit = 0,
const size_t offset = 0,
1249 OrderDirection::Ascending)
const;
1283 const QStringList & noteLocalUids,
const GetNoteOptions options,
1285 const ListObjectsOptions & flag = ListObjectsOption::ListAll,
1286 const size_t limit = 0,
const size_t offset = 0,
1289 OrderDirection::Ascending)
const;
1326 const ListObjectsOptions flag,
const GetNoteOptions options,
1327 ErrorString & errorDescription,
const size_t limit = 0,
1328 const size_t offset = 0,
1331 const QString & linkedNotebookGuid = QString())
const;
1364 const NoteSearchQuery & noteSearchQuery,
const GetNoteOptions options,
1463 ByUpdateSequenceNumber,
1468 friend QUENTIER_EXPORT QTextStream & operator<<(
1469 QTextStream & strm,
const ListTagsOrder order);
1471 friend QUENTIER_EXPORT QDebug & operator<<(
1472 QDebug & strm,
const ListTagsOrder order);
1504 const ListObjectsOptions & flag = ListObjectsOption::ListAll,
1505 const size_t limit = 0,
const size_t offset = 0,
1508 OrderDirection::Ascending)
const;
1541 ErrorString & errorDescription,
const size_t limit = 0,
1542 const size_t offset = 0,
1545 const QString & linkedNotebookGuid = QString())
const;
1580 const ListObjectsOptions flag,
ErrorString & errorDescription,
1581 const size_t limit = 0,
const size_t offset = 0,
1584 const QString & linkedNotebookGuid = QString())
const;
1625 const ListObjectsOptions flag,
ErrorString & errorDescription,
1626 const size_t limit = 0,
const size_t offset = 0,
1629 const QString & linkedNotebookGuid = QString())
const;
1656 Tag & tag, QStringList & expungedChildTagLocalUids,
1742 Q_DECLARE_FLAGS(GetResourceOptions, GetResourceOption)
1744 friend QUENTIER_EXPORT QTextStream & operator<<(
1745 QTextStream & strm,
const GetResourceOption option);
1747 friend QUENTIER_EXPORT QDebug & operator<<(
1748 QDebug & strm,
const GetResourceOption option);
1750 friend QUENTIER_EXPORT QTextStream & operator<<(
1751 QTextStream & strm,
const GetResourceOptions options);
1753 friend QUENTIER_EXPORT QDebug & operator<<(
1754 QDebug & strm,
const GetResourceOptions options);
1775 Resource & resource,
const GetResourceOptions options,
1870 ByUpdateSequenceNumber = 0,
1876 friend QUENTIER_EXPORT QTextStream & operator<<(
1877 QTextStream & strm,
const ListSavedSearchesOrder order);
1879 friend QUENTIER_EXPORT QDebug & operator<<(
1880 QDebug & strm,
const ListSavedSearchesOrder order);
1905 ErrorString & errorDescription,
const size_t limit = 0,
1906 const size_t offset = 0,
1908 const OrderDirection orderDirection = OrderDirection::Ascending)
const;
1940 const ListObjectsOptions flag,
ErrorString & errorDescription,
1941 const size_t limit = 0,
const size_t offset = 0,
1943 const OrderDirection orderDirection = OrderDirection::Ascending)
const;
1979 const QString & linkedNotebookGuid,
ErrorString & errorDescription);
1984 LocalStorageManagerPrivate *
const d_ptr;
1988Q_DECLARE_OPERATORS_FOR_FLAGS(LocalStorageManager::GetNoteOptions)
1989Q_DECLARE_OPERATORS_FOR_FLAGS(LocalStorageManager::ListObjectsOptions)
1990Q_DECLARE_OPERATORS_FOR_FLAGS(LocalStorageManager::StartupOptions)
1991Q_DECLARE_OPERATORS_FOR_FLAGS(LocalStorageManager::UpdateNoteOptions)
The Account class encapsulates some details about the account: its name, whether it is local or synch...
Definition Account.h:39
The ErrorString class encapsulates two (or more) strings which are meant to contain translatable (bas...
Definition ErrorString.h:44
Definition LinkedNotebook.h:33
Definition LocalStorageManager.h:55
bool isLocalStorageVersionTooHigh(ErrorString &errorDescription)
bool localStorageRequiresUpgrade(ErrorString &errorDescription)
QList< SavedSearch > listAllSavedSearches(ErrorString &errorDescription, const size_t limit=0, const size_t offset=0, const ListSavedSearchesOrder order=ListSavedSearchesOrder::NoOrder, const OrderDirection orderDirection=OrderDirection::Ascending) const
listAllSavedSearches lists all saved searches within the account.
QList< SharedNotebook > listAllSharedNotebooks(ErrorString &errorDescription) const
listAllSharedNotebooks attempts to list all shared notebooks within the account.
int noteCount(ErrorString &errorDescription, const NoteCountOptions options=NoteCountOption::IncludeNonDeletedNotes) const
noteCount returns the number of notes currently stored in the local storage database.
bool updateNotebook(Notebook ¬ebook, ErrorString &errorDescription)
updateNotebook updates the passed in Notebook in the local storage database
QList< Tag > listTags(const ListObjectsOptions flag, ErrorString &errorDescription, const size_t limit=0, const size_t offset=0, const ListTagsOrder &order=ListTagsOrder::NoOrder, const OrderDirection orderDirection=OrderDirection::Ascending, const QString &linkedNotebookGuid=QString()) const
listTags attempts to list tags within the account according to the specified input flag.
bool updateNote(Note ¬e, const UpdateNoteOptions options, ErrorString &errorDescription)
updateNote updates passed in Note in the local storage database.
bool addNotebook(Notebook ¬ebook, ErrorString &errorDescription)
addNotebook adds the passed in Notebook to the local storage database
QList< Notebook > listNotebooks(const ListObjectsOptions flag, ErrorString &errorDescription, const size_t limit=0, const size_t offset=0, const ListNotebooksOrder order=ListNotebooksOrder::NoOrder, const OrderDirection orderDirection=OrderDirection::Ascending, const QString &linkedNotebookGuid=QString()) const
listNotebooks attempts to list notebooks within the account according to the specified input flag
qint32 localStorageVersion(ErrorString &errorDescription)
void upgradeProgress(double progress)
LocalStorageManager is capable of performing automatic database upgrades if/when it is necessary.
LocalStorageManager(const Account &account, const StartupOptions options={}, QObject *parent=nullptr)
LocalStorageManager - constructor. Takes in the account for which the LocalStorageManager instance is...
QList< Notebook > listAllNotebooks(ErrorString &errorDescription, const size_t limit=0, const size_t offset=0, const ListNotebooksOrder order=ListNotebooksOrder::NoOrder, const OrderDirection orderDirection=OrderDirection::Ascending, const QString &linkedNotebookGuid=QString()) const
listAllNotebooks attempts to list all notebooks within the current account from the local storage dat...
void switchUser(const Account &account, const StartupOptions options={})
switchUser - switches to another local storage database file associated with the passed in account
GetResourceOption
The GetResourceOption enum is a QFlags enum which allows to specify which resource fields should be i...
Definition LocalStorageManager.h:1735
QList< Note > listNotes(const ListObjectsOptions flag, const GetNoteOptions options, ErrorString &errorDescription, const size_t limit=0, const size_t offset=0, const ListNotesOrder order=ListNotesOrder::NoOrder, const OrderDirection orderDirection=OrderDirection::Ascending, const QString &linkedNotebookGuid=QString()) const
listNotes attempts to list notes within the account according to the specified input flag.
QList< Note > listNotesPerNotebooksAndTags(const QStringList ¬ebookLocalUids, const QStringList &tagLocalUids, const GetNoteOptions options, ErrorString &errorDescription, const ListObjectsOptions &flag=ListObjectsOption::ListAll, const size_t limit=0, const size_t offset=0, const ListNotesOrder &order=ListNotesOrder::NoOrder, const OrderDirection &orderDirection=OrderDirection::Ascending) const
listNotesPerNotebooksAndTags attempts to list notes which are present within one of specified noteboo...
bool addTag(Tag &tag, ErrorString &errorDescription)
addTag adds passed in Tag to the local storage database. If tag has "remote" Evernote service's guid ...
int enResourceCount(ErrorString &errorDescription) const
enResourceCount (the name is not Resource to prevent problems with macro defined on some versions of ...
bool updateUser(const User &user, ErrorString &errorDescription)
updateUser updates the passed in User object in the local storage database
int userCount(ErrorString &errorDescription) const
userCount returns the number of non-deleted users currently stored in the local storage database
bool expungeTag(Tag &tag, QStringList &expungedChildTagLocalUids, ErrorString &errorDescription)
expungeTag permanently deletes tag from the local storage database.
bool updateEnResource(Resource &resource, ErrorString &errorDescription)
updateEnResource updates passed in resource in the local storage database.
bool findNotebook(Notebook ¬ebook, ErrorString &errorDescription) const
findNotebook attempts to find and set all found fields of the passed in Notebook object
QList< Note > listNotesPerTag(const Tag &tag, const GetNoteOptions options, ErrorString &errorDescription, const ListObjectsOptions &flag=ListObjectsOption::ListAll, const size_t limit=0, const size_t offset=0, const ListNotesOrder &order=ListNotesOrder::NoOrder, const OrderDirection &orderDirection=OrderDirection::Ascending) const
listNotesPerTag attempts to list notes labeled with a given tag
bool expungeSavedSearch(SavedSearch &search, ErrorString &errorDescription)
expungeSavedSearch permanently deletes saved search from the local storage database.
bool findNote(Note ¬e, const GetNoteOptions options, ErrorString &errorDescription) const
findNote - attempts to find note in the local storage database
UpdateNoteOption
The UpdateNoteOption enum is a QFlags enum which allows to specify which note fields should be update...
Definition LocalStorageManager.h:982
int savedSearchCount(ErrorString &errorDescription) const
savedSearchCount returns the number of saved seacrhes currently stored in local storage database.
bool addEnResource(Resource &resource, ErrorString &errorDescription)
addEnResource adds passed in resource to the local storage database.
ListSavedSearchesOrder
The ListSavedSearchesOrder enum allows to specify the results ordering for methods listing saved sear...
Definition LocalStorageManager.h:1869
qint32 highestSupportedLocalStorageVersion() const
int notebookCount(ErrorString &errorDescription) const
notebookCount returns the number of notebooks currently stored in the local storage database
bool updateSavedSearch(SavedSearch &search, ErrorString &errorDescription)
updateSavedSearch updates passed in SavedSearch in the local storage database.
bool expungeNote(Note ¬e, ErrorString &errorDescription)
expungeNote permanently deletes note from local storage.
qint32 accountHighUsn(const QString &linkedNotebookGuid, ErrorString &errorDescription)
accountHighUsn returns the highest update sequence number within the data elements stored in the loca...
QList< Note > listNotesPerNotebook(const Notebook ¬ebook, const GetNoteOptions options, ErrorString &errorDescription, const ListObjectsOptions &flag=ListObjectsOption::ListAll, const size_t limit=0, const size_t offset=0, const ListNotesOrder &order=ListNotesOrder::NoOrder, const OrderDirection &orderDirection=OrderDirection::Ascending) const
listNotesPerNotebook attempts to list notes per given notebook
bool findSavedSearch(SavedSearch &search, ErrorString &errorDescription) const
findSavedSearch attempts to find and fill the fields of passed in saved search object.
int noteCountPerNotebook(const Notebook ¬ebook, ErrorString &errorDescription, const NoteCountOptions options=NoteCountOption::IncludeNonDeletedNotes) const
noteCountPerNotebook returns the number of notes currently stored in the local storage database per g...
bool expungeLinkedNotebook(const LinkedNotebook &linkedNotebook, ErrorString &errorDescription)
expungeLinkedNotebook permanently deletes specified linked notebook from the local storage database.
bool findLastUsedNotebook(Notebook ¬ebook, ErrorString &errorDescription) const
findLastUsedNotebook attempts to find the last used notebook in the local storage database.
GetNoteOption
The GetNoteOption enum is a QFlags enum which allows to specify which note fields should be included ...
Definition LocalStorageManager.h:1072
QList< SavedSearch > listSavedSearches(const ListObjectsOptions flag, ErrorString &errorDescription, const size_t limit=0, const size_t offset=0, const ListSavedSearchesOrder order=ListSavedSearchesOrder::NoOrder, const OrderDirection orderDirection=OrderDirection::Ascending) const
listSavedSearches attempts to list saved searches within the account according to the specified input...
ListNotesOrder
The ListNotesOrder enum allows to specify the results ordering for methods listing notes from the loc...
Definition LocalStorageManager.h:1119
bool addUser(const User &user, ErrorString &errorDescription)
addUser adds the passed in User object to the local storage database
int noteCountPerTag(const Tag &tag, ErrorString &errorDescription, const NoteCountOptions options=NoteCountOption::IncludeNonDeletedNotes) const
noteCountPerTag returns the number of notes currently stored in local storage database labeled with g...
StartupOption
The StartupOption enum is a QFlags enum which allows to specify some options to be applied to the loc...
Definition LocalStorageManager.h:64
OrderDirection
The OrderDirection enum specifies the direction of ordering of the results for methods listing the ob...
Definition LocalStorageManager.h:493
bool expungeNotebook(Notebook ¬ebook, ErrorString &errorDescription)
expungeNotebook permanently deletes the specified notebook from the local storage database.
bool findLinkedNotebook(LinkedNotebook &linkedNotebook, ErrorString &errorDescription) const
findLinkedNotebook attempts to find and set all found fields for passed in by reference LinkedNoteboo...
ListTagsOrder
The ListTagsOrder enum allows to specify the results ordering for methods listing tags from the local...
Definition LocalStorageManager.h:1462
bool findTag(Tag &tag, ErrorString &errorDescription) const
findTag attempts to find and fill the fields of passed in tag object.
QStringList findNoteLocalUidsWithSearchQuery(const NoteSearchQuery ¬eSearchQuery, ErrorString &errorDescription) const
findNoteLocalUidsWithSearchQuery attempts to find note local uids of notes corresponding to the passe...
NoteList findNotesWithSearchQuery(const NoteSearchQuery ¬eSearchQuery, const GetNoteOptions options, ErrorString &errorDescription) const
findNotesWithSearchQuery attempts to find notes corresponding to the passed in NoteSearchQuery object...
bool expungeEnResource(Resource &resource, ErrorString &errorDescription)
expungeResource permanently deletes resource from the local storage database.
QList< SharedNotebook > listSharedNotebooksPerNotebookGuid(const QString ¬ebookGuid, ErrorString &errorDescription) const
listSharedNotebooksPerNotebookGuid - attempts to list all shared notebooks per given notebook's remot...
ListNotebooksOrder
The ListNotebooksOrder allows to specify the results ordering for methods listing notebooks from the ...
Definition LocalStorageManager.h:509
QList< Tag > listAllTags(ErrorString &errorDescription, const size_t limit=0, const size_t offset=0, const ListTagsOrder order=ListTagsOrder::NoOrder, const OrderDirection orderDirection=OrderDirection::Ascending, const QString &linkedNotebookGuid=QString()) const
listAllTags lists all tags within the current user's account.
bool noteCountsPerAllTags(QHash< QString, int > ¬eCountsPerTagLocalUid, ErrorString &errorDescription, const NoteCountOptions options=NoteCountOption::IncludeNonDeletedNotes) const
noteCountsPerAllTags returns the number of notes currently stored in local storage database labeled w...
QList< LinkedNotebook > listLinkedNotebooks(const ListObjectsOptions flag, ErrorString &errorDescription, const size_t limit=0, const size_t offset=0, const ListLinkedNotebooksOrder order=ListLinkedNotebooksOrder::NoOrder, const OrderDirection orderDirection=OrderDirection::Ascending) const
listLinkedNotebooks attempts to list linked notebooks within the account according to the specified i...
bool expungeUser(const User &user, ErrorString &errorDescription)
expungeUser permanently deletes the user from the local storage database
bool expungeNotelessTagsFromLinkedNotebooks(ErrorString &errorDescription)
expungeNotelessTagsFromLinkedNotebooks permanently deletes from the local storage database those tags...
NoteCountOption
The NoteCountOption enum is a QFlags enum which allows to specify some options for methods returning ...
Definition LocalStorageManager.h:829
QList< std::pair< Tag, QStringList > > listTagsWithNoteLocalUids(const ListObjectsOptions flag, ErrorString &errorDescription, const size_t limit=0, const size_t offset=0, const ListTagsOrder &order=ListTagsOrder::NoOrder, const OrderDirection orderDirection=OrderDirection::Ascending, const QString &linkedNotebookGuid=QString()) const
listTagsWithNoteLocalUids attempts to list tags and their corresponding local uids within the account...
bool findDefaultOrLastUsedNotebook(Notebook ¬ebook, ErrorString &errorDescription) const
findDefaultOrLastUsedNotebook attempts to find either the default or the last used notebook in the lo...
bool addNote(Note ¬e, ErrorString &errorDescription)
addNote adds passed in Note to the local storage database.
bool findDefaultNotebook(Notebook ¬ebook, ErrorString &errorDescription) const
findDefaultNotebook attempts to find the default notebook in the local storage database.
bool deleteUser(const User &user, ErrorString &errorDescription)
deleteUser marks the user as deleted in local storage
bool updateLinkedNotebook(const LinkedNotebook &linkedNotebook, ErrorString &errorDescription)
updateLinkedNotebook updates passd in LinkedNotebook in the local storage database; LinkedNotebook mu...
QList< LinkedNotebook > listAllLinkedNotebooks(ErrorString &errorDescription, const size_t limit=0, const size_t offset=0, const ListLinkedNotebooksOrder order=ListLinkedNotebooksOrder::NoOrder, const OrderDirection orderDirection=OrderDirection::Ascending) const
listAllLinkedNotebooks - attempts to list all linked notebooks within the account.
bool updateTag(Tag &tag, ErrorString &errorDescription)
updateTag updates passed in Tag in the local storage database.
int noteCountPerNotebooksAndTags(const QStringList ¬ebookLocalUids, const QStringList &tagLocalUids, ErrorString &errorDescription, const NoteCountOptions options=NoteCountOption::IncludeNonDeletedNotes) const
noteCountPerNotebooksAndTags returns the number of notes currently stored in local storage database b...
bool findUser(User &user, ErrorString &errorDescription) const
findUser attempts to find and fill the fields of the passed in User object which must have "id" field...
bool addSavedSearch(SavedSearch &search, ErrorString &errorDescription)
addSavedSearch adds passed in SavedSearch to the local storage database; if search has "remote" Evern...
bool addLinkedNotebook(const LinkedNotebook &linkedNotebook, ErrorString &errorDescription)
addLinkedNotebook adds passed in LinkedNotebook to the local storage database; LinkedNotebook must ha...
QList< Tag > listAllTagsPerNote(const Note ¬e, ErrorString &errorDescription, const ListObjectsOptions &flag=ListObjectsOption::ListAll, const size_t limit=0, const size_t offset=0, const ListTagsOrder &order=ListTagsOrder::NoOrder, const OrderDirection &orderDirection=OrderDirection::Ascending) const
listAllTagsPerNote lists all tags per given note
bool findEnResource(Resource &resource, const GetResourceOptions options, ErrorString &errorDescription) const
findEnResource method attempts to find resource in the local storage database
int linkedNotebookCount(ErrorString &errorDescription) const
linkedNotebookCount returns the number of linked notebooks stored in the local storage database.
ListObjectsOption
The ListObjectsOption enum is a QFlags enum which allows to specify the desired local storage element...
Definition LocalStorageManager.h:144
int tagCount(ErrorString &errorDescription) const
tagCount returns the number of non-deleted tags currently stored in the local storage database.
ListLinkedNotebooksOrder
The ListLinkedNotebooksOrder enum allows to specify the results ordering for methods listing linked n...
Definition LocalStorageManager.h:727
QVector< std::shared_ptr< ILocalStoragePatch > > requiredLocalStoragePatches()
QList< Note > listNotesByLocalUids(const QStringList ¬eLocalUids, const GetNoteOptions options, ErrorString &errorDescription, const ListObjectsOptions &flag=ListObjectsOption::ListAll, const size_t limit=0, const size_t offset=0, const ListNotesOrder &order=ListNotesOrder::NoOrder, const OrderDirection &orderDirection=OrderDirection::Ascending) const
listNotesByLocalUids attempts to list notes given their local uids
Definition NoteSearchQuery.h:31
Definition SavedSearch.h:33