1 | /* |
2 | * Copyright (C) 2007, 2008, 2009, 2010 Ivan Cukic <ivan.cukic(at)kde.org> |
3 | * |
4 | * This program is free software; you can redistribute it and/or modify |
5 | * it under the terms of the GNU Lesser/Library General Public License version 2, |
6 | * or (at your option) any later version, as published by the Free |
7 | * Software Foundation |
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 Lesser/Library General Public License for more details |
13 | * |
14 | * You should have received a copy of the GNU Lesser/Library General Public |
15 | * License 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 | |
20 | #include "MessagesKmail.h" |
21 | #include <QHash> |
22 | #include <KIcon> |
23 | #include <KJob> |
24 | |
25 | #include "config-lancelot-datamodels.h" |
26 | |
27 | #ifdef LANCELOT_DATAMODELS_HAS_PIMLIBS |
28 | #include <Akonadi/Entity> |
29 | #include <Akonadi/Monitor> |
30 | #include <Akonadi/Collection> |
31 | #include <Akonadi/CollectionFetchJob> |
32 | #include <Akonadi/CollectionFetchScope> |
33 | #include <Akonadi/ServerManager> |
34 | #endif |
35 | |
36 | namespace Lancelot { |
37 | namespace Models { |
38 | |
39 | class MessagesKmail::Private: public QObject { |
40 | Q_OBJECT |
41 | |
42 | public: |
43 | Private(MessagesKmail * parent); |
44 | |
45 | #ifdef LANCELOT_DATAMODELS_HAS_PIMLIBS |
46 | QHash < KJob *, Akonadi::Collection > collectionJobs; |
47 | Akonadi::Monitor * monitor; |
48 | int unread; |
49 | |
50 | KIcon entityIcon(const Akonadi::Collection & collection) const; |
51 | |
52 | public Q_SLOTS: |
53 | void fetchEmailCollectionsDone(KJob * job); |
54 | |
55 | #endif |
56 | |
57 | private: |
58 | MessagesKmail * const q; |
59 | }; |
60 | |
61 | } |
62 | } |
63 | |