1 | /* |
2 | Author: (2013) Christian Mollekopf <mollekopf@kolabsys.com> |
3 | |
4 | This library is free software; you can redistribute it and/or modify it |
5 | under the terms of the GNU Library General Public License as published by |
6 | the Free Software Foundation; either version 2 of the License, or (at your |
7 | option) any later version. |
8 | |
9 | This library is distributed in the hope that it will be useful, but WITHOUT |
10 | ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or |
11 | FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public |
12 | License for more details. |
13 | |
14 | You should have received a copy of the GNU Library General Public License |
15 | along with this library; see the file COPYING.LIB. If not, write to the |
16 | Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA |
17 | 02110-1301, USA. |
18 | */ |
19 | |
20 | #ifndef GIDEXTRACTORINTERFACE_H |
21 | #define GIDEXTRACTORINTERFACE_H |
22 | |
23 | #include <QtCore/QObject> |
24 | |
25 | namespace Akonadi { |
26 | |
27 | class Item; |
28 | |
29 | /** |
30 | * @short An interface to extract the GID of an object contained in an akonadi item. |
31 | * |
32 | * @author Christian Mollekopf <mollekopf@kolabsys.com> |
33 | * @since 4.11 |
34 | */ |
35 | class |
36 | { |
37 | public: |
38 | /** |
39 | * Destructor. |
40 | */ |
41 | virtual () {} |
42 | /** |
43 | * Extracts the globally unique id of @p item |
44 | * |
45 | * If you want to clear the gid from the database return QString(""). |
46 | */ |
47 | virtual QString (const Item &item) const = 0; |
48 | }; |
49 | |
50 | } |
51 | |
52 | Q_DECLARE_INTERFACE(Akonadi::GidExtractorInterface, "org.freedesktop.Akonadi.GidExtractorInterface/1.0" ) |
53 | |
54 | #endif |
55 | |