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>
27 #include <quentier/utility/Macros.h>
37 namespace qevercloud {
39 QT_FORWARD_DECLARE_STRUCT(Accounting)
40 QT_FORWARD_DECLARE_STRUCT(BusinessUserInfo)
41 QT_FORWARD_DECLARE_STRUCT(NoteAttributes)
42 QT_FORWARD_DECLARE_STRUCT(NotebookRestrictions)
43 QT_FORWARD_DECLARE_STRUCT(ResourceAttributes)
44 QT_FORWARD_DECLARE_STRUCT(PremiumInfo)
45 QT_FORWARD_DECLARE_STRUCT(SharedNotebook)
46 QT_FORWARD_DECLARE_STRUCT(UserAttributes)
52 QT_FORWARD_DECLARE_CLASS(ILocalStoragePatch)
53 QT_FORWARD_DECLARE_CLASS(LocalStorageManagerPrivate)
84 Q_DECLARE_FLAGS(StartupOptions, StartupOption)
86 friend QUENTIER_EXPORT QTextStream & operator<<(
87 QTextStream & strm,
const StartupOption option);
89 friend QUENTIER_EXPORT QDebug & operator<<(
90 QDebug & dbg,
const StartupOption option);
92 friend QUENTIER_EXPORT QTextStream & operator<<(
93 QTextStream & strm,
const StartupOptions options);
95 friend QUENTIER_EXPORT QDebug & operator<<(
96 QDebug & dbg,
const StartupOptions options);
110 const Account & account,
const StartupOptions options = 0,
111 QObject * parent =
nullptr);
143 ListElementsWithoutGuid = 4,
144 ListElementsWithGuid = 8,
147 ListFavoritedElements = 64,
148 ListNonFavoritedElements = 128
150 Q_DECLARE_FLAGS(ListObjectsOptions, ListObjectsOption)
152 friend QUENTIER_EXPORT QTextStream & operator<<(
153 QTextStream & strm,
const ListObjectsOption option);
155 friend QUENTIER_EXPORT QDebug & operator<<(
156 QDebug & dbg,
const ListObjectsOption option);
158 friend QUENTIER_EXPORT QTextStream & operator<<(
159 QTextStream & strm,
const ListObjectsOptions options);
161 friend QUENTIER_EXPORT QDebug & operator<<(
162 QDebug & dbg,
const ListObjectsOptions options);
486 friend QUENTIER_EXPORT QTextStream & operator<<(
487 QTextStream & strm,
const OrderDirection orderDirection);
489 friend QUENTIER_EXPORT QDebug & operator<<(
490 QDebug & dbg,
const OrderDirection orderDirection);
498 ByUpdateSequenceNumber = 0,
501 ByModificationTimestamp,
505 friend QUENTIER_EXPORT QTextStream & operator<<(
506 QTextStream & strm,
const ListNotebooksOrder order);
508 friend QUENTIER_EXPORT QDebug & operator<<(
509 QDebug & dbg,
const ListNotebooksOrder order);
546 const size_t limit = 0,
const size_t offset = 0,
549 const QString & linkedNotebookGuid = QString())
const;
585 const ListObjectsOptions flag,
587 const size_t limit = 0,
const size_t offset = 0,
590 const QString & linkedNotebookGuid = QString())
const;
624 const QString & notebookGuid,
ErrorString & errorDescription)
const;
717 ByUpdateSequenceNumber = 0,
723 friend QUENTIER_EXPORT QTextStream & operator<<(
724 QTextStream & strm,
const ListLinkedNotebooksOrder order);
726 friend QUENTIER_EXPORT QDebug & operator<<(
727 QDebug & strm,
const ListLinkedNotebooksOrder order);
754 const size_t limit = 0,
const size_t offset = 0,
756 const OrderDirection orderDirection = OrderDirection::Ascending)
const;
786 const ListObjectsOptions flag,
ErrorString & errorDescription,
787 const size_t limit = 0,
const size_t offset = 0,
789 const OrderDirection orderDirection = OrderDirection::Ascending)
const;
817 IncludeNonDeletedNotes = 1,
818 IncludeDeletedNotes = 2
820 Q_DECLARE_FLAGS(NoteCountOptions, NoteCountOption)
822 friend QUENTIER_EXPORT QTextStream & operator<<(
823 QTextStream & strm,
const NoteCountOption option);
825 friend QUENTIER_EXPORT QDebug & operator<<(
826 QDebug & dbg,
const NoteCountOption option);
828 friend QUENTIER_EXPORT QTextStream & operator<<(
829 QTextStream & strm,
const NoteCountOptions options);
831 friend QUENTIER_EXPORT QDebug & operator<<(
832 QDebug & strm,
const NoteCountOptions options);
848 const NoteCountOptions options =
849 NoteCountOption::IncludeNonDeletedNotes)
const;
870 const NoteCountOptions options =
871 NoteCountOption::IncludeNonDeletedNotes)
const;
891 const NoteCountOptions options =
892 NoteCountOption::IncludeNonDeletedNotes)
const;
912 QHash<QString, int> & noteCountsPerTagLocalUid,
914 const NoteCountOptions options =
915 NoteCountOption::IncludeNonDeletedNotes)
const;
936 const QStringList & notebookLocalUids,
937 const QStringList & tagLocalUids,
ErrorString & errorDescription,
938 const NoteCountOptions options =
939 NoteCountOption::IncludeNonDeletedNotes)
const;
976 UpdateResourceMetadata = 1,
983 UpdateResourceBinaryData = 2,
989 Q_DECLARE_FLAGS(UpdateNoteOptions, UpdateNoteOption)
991 friend QUENTIER_EXPORT QTextStream & operator<<(
992 QTextStream & strm,
const UpdateNoteOption option);
994 friend QUENTIER_EXPORT QDebug & operator<<(
995 QDebug & strm,
const UpdateNoteOption option);
997 friend QUENTIER_EXPORT QTextStream & operator<<(
998 QTextStream & strm,
const UpdateNoteOptions options);
1000 friend QUENTIER_EXPORT QDebug & operator<<(
1001 QDebug & strm,
const UpdateNoteOptions options);
1049 Note & note,
const UpdateNoteOptions options,
1070 WithResourceMetadata = 1,
1077 WithResourceBinaryData = 2
1079 Q_DECLARE_FLAGS(GetNoteOptions, GetNoteOption)
1081 friend QUENTIER_EXPORT QTextStream & operator<<(
1082 QTextStream & strm,
const GetNoteOption option);
1084 friend QUENTIER_EXPORT QDebug & operator<<(
1085 QDebug & dbg,
const GetNoteOption option);
1087 friend QUENTIER_EXPORT QTextStream & operator<<(
1088 QTextStream & strm,
const GetNoteOptions options);
1090 friend QUENTIER_EXPORT QDebug & operator<<(
1091 QDebug & strm,
const GetNoteOptions options);
1103 Note & note,
const GetNoteOptions options,
1112 ByUpdateSequenceNumber = 0,
1114 ByCreationTimestamp,
1115 ByModificationTimestamp,
1116 ByDeletionTimestamp,
1119 BySourceApplication,
1125 friend QUENTIER_EXPORT QTextStream & operator<<(
1126 QTextStream & strm,
const ListNotesOrder order);
1128 friend QUENTIER_EXPORT QDebug & operator<<(
1129 QDebug & strm,
const ListNotesOrder order);
1161 const GetNoteOptions options,
1163 const ListObjectsOptions & flag = ListObjectsOption::ListAll,
1164 const size_t limit = 0,
const size_t offset = 0,
1166 const OrderDirection & orderDirection = OrderDirection::Ascending)
const;
1196 const Tag & tag,
const GetNoteOptions options,
1198 const ListObjectsOptions & flag = ListObjectsOption::ListAll,
1199 const size_t limit = 0,
const size_t offset = 0,
1201 const OrderDirection & orderDirection = OrderDirection::Ascending)
const;
1234 const QStringList & notebookLocalUids,
1235 const QStringList & tagLocalUids,
1236 const GetNoteOptions options,
1238 const ListObjectsOptions & flag = ListObjectsOption::ListAll,
1239 const size_t limit = 0,
const size_t offset = 0,
1241 const OrderDirection & orderDirection = OrderDirection::Ascending)
const;
1275 const QStringList & noteLocalUids,
1276 const GetNoteOptions options,
1278 const ListObjectsOptions & flag = ListObjectsOption::ListAll,
1279 const size_t limit = 0,
const size_t offset = 0,
1281 const OrderDirection & orderDirection = OrderDirection::Ascending)
const;
1318 const ListObjectsOptions flag,
const GetNoteOptions options,
1320 const size_t limit = 0,
const size_t offset = 0,
1323 const QString & linkedNotebookGuid = QString())
const;
1357 const GetNoteOptions options,
ErrorString & errorDescription)
const;
1455 ByUpdateSequenceNumber,
1460 friend QUENTIER_EXPORT QTextStream & operator<<(
1461 QTextStream & strm,
const ListTagsOrder order);
1463 friend QUENTIER_EXPORT QDebug & operator<<(
1464 QDebug & strm,
const ListTagsOrder order);
1496 const ListObjectsOptions & flag = ListObjectsOption::ListAll,
1497 const size_t limit = 0,
const size_t offset = 0,
1499 const OrderDirection & orderDirection = OrderDirection::Ascending)
const;
1533 const size_t limit = 0,
const size_t offset = 0,
1536 const QString & linkedNotebookGuid = QString())
const;
1571 const ListObjectsOptions flag,
1573 const size_t limit = 0,
const size_t offset = 0,
1576 const QString & linkedNotebookGuid = QString())
const;
1617 const ListObjectsOptions flag,
ErrorString & errorDescription,
1618 const size_t limit = 0,
const size_t offset = 0,
1621 const QString & linkedNotebookGuid = QString())
const;
1648 Tag & tag, QStringList & expungedChildTagLocalUids,
1734 Q_DECLARE_FLAGS(GetResourceOptions, GetResourceOption)
1736 friend QUENTIER_EXPORT QTextStream & operator<<(
1737 QTextStream & strm,
const GetResourceOption option);
1739 friend QUENTIER_EXPORT QDebug & operator<<(
1740 QDebug & strm,
const GetResourceOption option);
1742 friend QUENTIER_EXPORT QTextStream & operator<<(
1743 QTextStream & strm,
const GetResourceOptions options);
1745 friend QUENTIER_EXPORT QDebug & operator<<(
1746 QDebug & strm,
const GetResourceOptions options);
1767 Resource & resource,
const GetResourceOptions options,
1861 ByUpdateSequenceNumber = 0,
1867 friend QUENTIER_EXPORT QTextStream & operator<<(
1868 QTextStream & strm,
const ListSavedSearchesOrder order);
1870 friend QUENTIER_EXPORT QDebug & operator<<(
1871 QDebug & strm,
const ListSavedSearchesOrder order);
1897 const size_t limit = 0,
const size_t offset = 0,
1899 const OrderDirection orderDirection = OrderDirection::Ascending)
const;
1931 const ListObjectsOptions flag,
ErrorString & errorDescription,
1932 const size_t limit = 0,
const size_t offset = 0,
1934 const OrderDirection orderDirection = OrderDirection::Ascending)
const;
1970 const QString & linkedNotebookGuid,
ErrorString & errorDescription);
1975 LocalStorageManagerPrivate *
const d_ptr;
1979 Q_DECLARE_OPERATORS_FOR_FLAGS(LocalStorageManager::GetNoteOptions)
1980 Q_DECLARE_OPERATORS_FOR_FLAGS(LocalStorageManager::ListObjectsOptions)
1981 Q_DECLARE_OPERATORS_FOR_FLAGS(LocalStorageManager::StartupOptions)
1982 Q_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:40
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:56
bool isLocalStorageVersionTooHigh(ErrorString &errorDescription)
bool localStorageRequiresUpgrade(ErrorString &errorDescription)
int noteCount(ErrorString &errorDescription, const NoteCountOptions options=NoteCountOption::IncludeNonDeletedNotes) const
noteCount returns the number of notes currently stored in the local storage database.
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 updateNotebook(Notebook ¬ebook, ErrorString &errorDescription)
updateNotebook updates the passed in Notebook in the local storage database
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 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
void switchUser(const Account &account, const StartupOptions options=0)
switchUser - switches to another local storage database file associated with the passed in account
qint32 localStorageVersion(ErrorString &errorDescription)
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.
void upgradeProgress(double progress)
LocalStorageManager is capable of performing automatic database upgrades if/when it is necessary.
GetResourceOption
The GetResourceOption enum is a QFlags enum which allows to specify which resource fields should be i...
Definition: LocalStorageManager.h:1727
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
QList< SharedNotebook > listAllSharedNotebooks(ErrorString &errorDescription) const
listAllSharedNotebooks attempts to list all shared notebooks within the account.
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
int userCount(ErrorString &errorDescription) const
userCount returns the number of non-deleted users currently stored in the local storage database
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 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
bool expungeSavedSearch(SavedSearch &search, ErrorString &errorDescription)
expungeSavedSearch permanently deletes saved search from 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
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:970
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:1860
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.
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.
QVector< std::shared_ptr< ILocalStoragePatch > > requiredLocalStoragePatches()
qint32 accountHighUsn(const QString &linkedNotebookGuid, ErrorString &errorDescription)
accountHighUsn returns the highest update sequence number within the data elements stored in the loca...
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.
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...
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...
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.
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
GetNoteOption
The GetNoteOption enum is a QFlags enum which allows to specify which note fields should be included ...
Definition: LocalStorageManager.h:1064
ListNotesOrder
The ListNotesOrder enum allows to specify the results ordering for methods listing notes from the loc...
Definition: LocalStorageManager.h:1111
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:65
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.
OrderDirection
The OrderDirection enum specifies the direction of ordering of the results for methods listing the ob...
Definition: LocalStorageManager.h:481
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:1454
bool findTag(Tag &tag, ErrorString &errorDescription) const
findTag attempts to find and fill the fields of passed in tag 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
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...
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 expungeEnResource(Resource &resource, ErrorString &errorDescription)
expungeResource permanently deletes resource from the local storage database.
ListNotebooksOrder
The ListNotebooksOrder allows to specify the results ordering for methods listing notebooks from the ...
Definition: LocalStorageManager.h:497
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...
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:816
bool findDefaultOrLastUsedNotebook(Notebook ¬ebook, ErrorString &errorDescription) const
findDefaultOrLastUsedNotebook attempts to find either the default or the last used notebook in the lo...
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...
bool addNote(Note ¬e, ErrorString &errorDescription)
addNote adds passed in Note to 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...
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...
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...
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:139
LocalStorageManager(const Account &account, const StartupOptions options=0, QObject *parent=nullptr)
LocalStorageManager - constructor. Takes in the account for which the LocalStorageManager instance is...
int tagCount(ErrorString &errorDescription) const
tagCount returns the number of non-deleted tags currently stored in the local storage database.
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.
ListLinkedNotebooksOrder
The ListLinkedNotebooksOrder enum allows to specify the results ordering for methods listing linked n...
Definition: LocalStorageManager.h:716
Definition: NoteSearchQuery.h:31
Definition: Notebook.h:35
Definition: Resource.h:30
Definition: SavedSearch.h:33