Changeset View
Changeset View
Standalone View
Standalone View
src/akonadi/akonadicontextqueries.h
Show All 21 Lines | 1 | /* This file is part of Zanshin | |||
---|---|---|---|---|---|
22 | USA. | 22 | USA. | ||
23 | */ | 23 | */ | ||
24 | 24 | | |||
25 | #ifndef AKONADI_CONTEXTQUERIES_H | 25 | #ifndef AKONADI_CONTEXTQUERIES_H | ||
26 | #define AKONADI_CONTEXTQUERIES_H | 26 | #define AKONADI_CONTEXTQUERIES_H | ||
27 | 27 | | |||
28 | #include "domain/contextqueries.h" | 28 | #include "domain/contextqueries.h" | ||
29 | 29 | | |||
30 | #include "akonadi/akonadicache.h" | ||||
30 | #include "akonadi/akonadilivequeryhelpers.h" | 31 | #include "akonadi/akonadilivequeryhelpers.h" | ||
31 | #include "akonadi/akonadilivequeryintegrator.h" | 32 | #include "akonadi/akonadilivequeryintegrator.h" | ||
32 | 33 | | |||
33 | namespace Akonadi { | 34 | namespace Akonadi { | ||
34 | 35 | | |||
35 | class ContextQueries : public Domain::ContextQueries | 36 | class ContextQueries : public Domain::ContextQueries | ||
36 | { | 37 | { | ||
37 | public: | 38 | public: | ||
38 | typedef QSharedPointer<ContextQueries> Ptr; | 39 | typedef QSharedPointer<ContextQueries> Ptr; | ||
39 | 40 | | |||
40 | typedef Domain::LiveQueryInput<Akonadi::Item> ItemInputQuery; | 41 | typedef Domain::LiveQueryInput<Akonadi::Item> ItemInputQuery; | ||
41 | typedef Domain::LiveQueryOutput<Domain::Task::Ptr> TaskQueryOutput; | 42 | typedef Domain::LiveQueryOutput<Domain::Task::Ptr> TaskQueryOutput; | ||
42 | typedef Domain::QueryResult<Domain::Task::Ptr> TaskResult; | 43 | typedef Domain::QueryResult<Domain::Task::Ptr> TaskResult; | ||
43 | typedef Domain::QueryResultProvider<Domain::Task::Ptr> TaskProvider; | 44 | typedef Domain::QueryResultProvider<Domain::Task::Ptr> TaskProvider; | ||
44 | 45 | | |||
45 | typedef Domain::LiveQueryInput<Akonadi::Tag> TagInputQuery; | 46 | typedef Domain::LiveQueryInput<Akonadi::Tag> TagInputQuery; | ||
46 | typedef Domain::LiveQueryOutput<Domain::Context::Ptr> ContextQueryOutput; | 47 | typedef Domain::LiveQueryOutput<Domain::Context::Ptr> ContextQueryOutput; | ||
47 | typedef Domain::QueryResult<Domain::Context::Ptr> ContextResult; | 48 | typedef Domain::QueryResult<Domain::Context::Ptr> ContextResult; | ||
48 | typedef Domain::QueryResultProvider<Domain::Context::Ptr> ContextProvider; | 49 | typedef Domain::QueryResultProvider<Domain::Context::Ptr> ContextProvider; | ||
49 | 50 | | |||
50 | ContextQueries(const StorageInterface::Ptr &storage, | 51 | ContextQueries(const StorageInterface::Ptr &storage, | ||
51 | const SerializerInterface::Ptr &serializer, | 52 | const SerializerInterface::Ptr &serializer, | ||
52 | const MonitorInterface::Ptr &monitor); | 53 | const MonitorInterface::Ptr &monitor, | ||
54 | const Cache::Ptr &cache); | ||||
53 | 55 | | |||
54 | 56 | | |||
55 | ContextResult::Ptr findAll() const Q_DECL_OVERRIDE; | 57 | ContextResult::Ptr findAll() const Q_DECL_OVERRIDE; | ||
56 | TaskResult::Ptr findTopLevelTasks(Domain::Context::Ptr context) const Q_DECL_OVERRIDE; | 58 | TaskResult::Ptr findTopLevelTasks(Domain::Context::Ptr context) const Q_DECL_OVERRIDE; | ||
57 | 59 | | |||
58 | private: | 60 | private: | ||
59 | SerializerInterface::Ptr m_serializer; | 61 | SerializerInterface::Ptr m_serializer; | ||
62 | Cache::Ptr m_cache; | ||||
60 | LiveQueryHelpers::Ptr m_helpers; | 63 | LiveQueryHelpers::Ptr m_helpers; | ||
61 | LiveQueryIntegrator::Ptr m_integrator; | 64 | LiveQueryIntegrator::Ptr m_integrator; | ||
62 | 65 | | |||
63 | mutable ContextQueryOutput::Ptr m_findAll; | 66 | mutable ContextQueryOutput::Ptr m_findAll; | ||
64 | mutable QHash<Akonadi::Tag::Id, TaskQueryOutput::Ptr> m_findToplevel; | 67 | mutable QHash<Akonadi::Tag::Id, TaskQueryOutput::Ptr> m_findToplevel; | ||
65 | }; | 68 | }; | ||
66 | 69 | | |||
67 | } // akonadi namespace | 70 | } // akonadi namespace | ||
68 | 71 | | |||
69 | #endif // AKONADI_CONTEXTQUERIES_H | 72 | #endif // AKONADI_CONTEXTQUERIES_H |