2 Copyright (c) 2013, 2014 Montel Laurent <montel@kde.org>
4 This program is free software; you can redistribute it and/or modify it
5 under the terms of the GNU General Public License, version 2, as
6 published by the Free Software Foundation.
8 This program is distributed in the hope that it will be useful, but
9 WITHOUT ANY WARRANTY; without even the implied warranty of
10 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
11 General Public License for more details.
13 You should have received a copy of the GNU General Public License along
14 with this program; if not, write to the Free Software Foundation, Inc.,
15 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
18 #ifndef FOLDERARCHIVEMANAGER_H
19 #define FOLDERARCHIVEMANAGER_H
30 class FolderArchiveAccountInfo
;
31 class FolderArchiveAgentJob
;
32 class FolderArchiveCache
;
34 class FolderArchiveManager
: public QObject
38 explicit FolderArchiveManager(QObject
*parent
= 0);
39 ~FolderArchiveManager();
42 void setArchiveItems(const QList
<Akonadi::Item
> &items
, const QString
&instanceName
);
43 void setArchiveItem(qlonglong itemId
);
45 void moveFailed(const QString
&msg
);
48 void collectionRemoved(const Akonadi::Collection
&collection
);
50 FolderArchiveCache
*folderArchiveCache() const;
54 void slotCollectionRemoved(const Akonadi::Collection
&collection
);
55 void slotInstanceRemoved(const Akonadi::AgentInstance
&instance
);
58 void slotFetchParentCollection(KJob
*job
);
59 void slotFetchCollection(KJob
*job
);
62 FolderArchiveAccountInfo
*infoFromInstanceName(const QString
&instanceName
) const;
64 void removeInfo(const QString
&instanceName
);
65 QQueue
<FolderArchiveAgentJob
*> mJobQueue
;
66 FolderArchiveAgentJob
*mCurrentJob
;
67 QList
<FolderArchiveAccountInfo
*> mListAccountInfo
;
68 FolderArchiveCache
*mFolderArchiveCache
;
71 #endif // FOLDERARCHIVEMANAGER_H