diff options
Diffstat (limited to 'common/domain/event.h')
-rw-r--r-- | common/domain/event.h | 46 |
1 files changed, 46 insertions, 0 deletions
diff --git a/common/domain/event.h b/common/domain/event.h new file mode 100644 index 0000000..4cb0d34 --- /dev/null +++ b/common/domain/event.h | |||
@@ -0,0 +1,46 @@ | |||
1 | /* | ||
2 | * Copyright (C) 2014 Christian Mollekopf <chrigi_1@fastmail.fm> | ||
3 | * | ||
4 | * This program is free software; you can redistribute it and/or modify | ||
5 | * it under the terms of the GNU General Public License as published by | ||
6 | * the Free Software Foundation; either version 2 of the License, or | ||
7 | * (at your option) any later version. | ||
8 | * | ||
9 | * This program is distributed in the hope that it will be useful, | ||
10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
12 | * GNU General Public License for more details. | ||
13 | * | ||
14 | * You should have received a copy of the GNU General Public License | ||
15 | * along with this program; if not, write to the | ||
16 | * Free Software Foundation, Inc., | ||
17 | * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. | ||
18 | */ | ||
19 | #pragma once | ||
20 | |||
21 | #include "../clientapi.h" | ||
22 | |||
23 | class ResultSet; | ||
24 | class QByteArray; | ||
25 | |||
26 | namespace Akonadi2 { | ||
27 | class Query; | ||
28 | |||
29 | namespace ApplicationDomain { | ||
30 | |||
31 | /** | ||
32 | * Implements all type-specific code such as updating and querying indexes. | ||
33 | */ | ||
34 | namespace EventImplementation { | ||
35 | typedef Event DomainType; | ||
36 | /** | ||
37 | * Returns the potential result set based on the indexes. | ||
38 | * | ||
39 | * An empty result set indicates that a full scan is required. | ||
40 | */ | ||
41 | ResultSet queryIndexes(const Akonadi2::Query &query, const QByteArray &resourceInstanceIdentifier); | ||
42 | void index(const Event &type); | ||
43 | }; | ||
44 | |||
45 | } | ||
46 | } | ||