diff options
Diffstat (limited to 'common/domain/event.h')
-rw-r--r-- | common/domain/event.h | 19 |
1 files changed, 15 insertions, 4 deletions
diff --git a/common/domain/event.h b/common/domain/event.h index 4cb0d34..d4ce20e 100644 --- a/common/domain/event.h +++ b/common/domain/event.h | |||
@@ -23,23 +23,34 @@ | |||
23 | class ResultSet; | 23 | class ResultSet; |
24 | class QByteArray; | 24 | class QByteArray; |
25 | 25 | ||
26 | template<typename T> | ||
27 | class ReadPropertyMapper; | ||
28 | template<typename T> | ||
29 | class WritePropertyMapper; | ||
30 | |||
26 | namespace Akonadi2 { | 31 | namespace Akonadi2 { |
27 | class Query; | 32 | class Query; |
28 | 33 | ||
29 | namespace ApplicationDomain { | 34 | namespace ApplicationDomain { |
35 | namespace Buffer { | ||
36 | class Event; | ||
37 | class EventBuilder; | ||
38 | } | ||
30 | 39 | ||
31 | /** | 40 | /** |
32 | * Implements all type-specific code such as updating and querying indexes. | 41 | * Implements all type-specific code such as updating and querying indexes. |
33 | */ | 42 | */ |
34 | namespace EventImplementation { | 43 | template<> |
35 | typedef Event DomainType; | 44 | struct TypeImplementation<Akonadi2::ApplicationDomain::Event> { |
36 | /** | 45 | /** |
37 | * Returns the potential result set based on the indexes. | 46 | * Returns the potential result set based on the indexes. |
38 | * | 47 | * |
39 | * An empty result set indicates that a full scan is required. | 48 | * An empty result set indicates that a full scan is required. |
40 | */ | 49 | */ |
41 | ResultSet queryIndexes(const Akonadi2::Query &query, const QByteArray &resourceInstanceIdentifier); | 50 | static ResultSet queryIndexes(const Akonadi2::Query &query, const QByteArray &resourceInstanceIdentifier); |
42 | void index(const Event &type); | 51 | static void index(const Event &type); |
52 | static QSharedPointer<ReadPropertyMapper<Akonadi2::ApplicationDomain::Buffer::Event> > initializeReadPropertyMapper(); | ||
53 | static QSharedPointer<WritePropertyMapper<Akonadi2::ApplicationDomain::Buffer::EventBuilder> > initializeWritePropertyMapper(); | ||
43 | }; | 54 | }; |
44 | 55 | ||
45 | } | 56 | } |