19#ifndef LIB_QUENTIER_LOCAL_STORAGE_LOCAL_STORAGE_CACHE_MANAGER_H
20#define LIB_QUENTIER_LOCAL_STORAGE_LOCAL_STORAGE_CACHE_MANAGER_H
22#include <quentier/utility/Printable.h>
29QT_FORWARD_DECLARE_CLASS(
Note)
33QT_FORWARD_DECLARE_CLASS(
Tag)
37QT_FORWARD_DECLARE_CLASS(LocalStorageCacheManagerPrivate)
38class QUENTIER_EXPORT LocalStorageCacheManager : public Printable
41 LocalStorageCacheManager();
42 virtual ~LocalStorageCacheManager();
54 size_t numCachedNotes()
const;
55 void cacheNote(
const Note & note);
56 void expungeNote(
const Note & note);
58 const Note * findNote(
const QString & uid,
const WhichUid whichUid)
const;
63 size_t numCachedResources()
const;
64 void cacheResource(
const Resource & resource);
65 void expungeResource(
const Resource & resource);
68 const QString &
id,
const WhichUid whichUid)
const;
70 void clearAllResources();
73 size_t numCachedNotebooks()
const;
74 void cacheNotebook(
const Notebook & notebook);
75 void expungeNotebook(
const Notebook & notebook);
78 const QString & uid,
const WhichUid whichUid)
const;
80 const Notebook * findNotebookByName(
const QString & name)
const;
81 void clearAllNotebooks();
84 size_t numCachedTags()
const;
85 void cacheTag(
const Tag & tag);
86 void expungeTag(
const Tag & tag);
87 const Tag * findTag(
const QString & uid,
const WhichUid whichUid)
const;
88 const Tag * findTagByName(
const QString & name)
const;
92 size_t numCachedLinkedNotebooks()
const;
95 const LinkedNotebook * findLinkedNotebook(
const QString & guid)
const;
96 void clearAllLinkedNotebooks();
99 size_t numCachedSavedSearches()
const;
100 void cacheSavedSearch(
const SavedSearch & savedSearch);
101 void expungeSavedSearch(
const SavedSearch & savedSearch);
104 const QString & uid,
const WhichUid whichUid)
const;
106 const SavedSearch * findSavedSearchByName(
const QString & name)
const;
107 void clearAllSavedSearches();
109 void installCacheExpiryFunction(
112 virtual QTextStream & print(QTextStream & strm)
const override;
115 Q_DISABLE_COPY(LocalStorageCacheManager)
117 LocalStorageCacheManagerPrivate *
const d_ptr;
118 Q_DECLARE_PRIVATE(LocalStorageCacheManager)
The ILocalStorageCacheExpiryChecker class represents the interface for cache expiry checker used by L...
Definition ILocalStorageCacheExpiryChecker.h:35
Definition LinkedNotebook.h:33
Definition SavedSearch.h:33