From 3601ee575f833bf204540f4fac41d87a0d977a79 Mon Sep 17 00:00:00 2001 From: Christian Mollekopf Date: Mon, 25 May 2015 23:14:57 +0200 Subject: Centralized type specific code. --- common/domain/event.h | 46 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 46 insertions(+) create mode 100644 common/domain/event.h (limited to 'common/domain/event.h') 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 @@ +/* + * Copyright (C) 2014 Christian Mollekopf + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the + * Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + */ +#pragma once + +#include "../clientapi.h" + +class ResultSet; +class QByteArray; + +namespace Akonadi2 { + class Query; + +namespace ApplicationDomain { + +/** + * Implements all type-specific code such as updating and querying indexes. + */ +namespace EventImplementation { + typedef Event DomainType; + /** + * Returns the potential result set based on the indexes. + * + * An empty result set indicates that a full scan is required. + */ + ResultSet queryIndexes(const Akonadi2::Query &query, const QByteArray &resourceInstanceIdentifier); + void index(const Event &type); +}; + +} +} -- cgit v1.2.3