2 Copyright (c) 2012-2013 Montel Laurent <montel.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
17 #ifndef ARCHIVEMAILINFO_H
18 #define ARCHIVEMAILINFO_H
20 #include "mailcommon/backupjob.h"
21 #include <KConfigGroup>
22 #include <Akonadi/Collection>
30 explicit ArchiveMailInfo();
31 explicit ArchiveMailInfo(const KConfigGroup
& config
);
41 KUrl
realUrl(const QString
&folderName
) const;
45 Akonadi::Collection::Id
saveCollectionId() const;
46 void setSaveCollectionId(Akonadi::Collection::Id collectionId
);
48 void setSaveSubCollection(bool b
);
49 bool saveSubCollection() const;
51 void setUrl(const KUrl
& url
);
54 void readConfig(const KConfigGroup
& config
);
55 void writeConfig(KConfigGroup
& config
);
57 void setArchiveType( MailCommon::BackupJob::ArchiveType type
);
58 MailCommon::BackupJob::ArchiveType
archiveType() const;
60 void setArchiveUnit( ArchiveMailInfo::ArchiveUnit unit
);
61 ArchiveMailInfo::ArchiveUnit
archiveUnit() const;
63 void setArchiveAge( int age
);
64 int archiveAge() const;
66 void setLastDateSaved( const QDate
& date
);
67 QDate
lastDateSaved() const;
69 int maximumArchiveCount() const;
70 void setMaximumArchiveCount( int max
);
72 QStringList
listOfArchive(const QString
& foldername
) const;
75 QString
dirArchive() const;
78 MailCommon::BackupJob::ArchiveType mArchiveType
;
79 ArchiveUnit mArchiveUnit
;
80 Akonadi::Collection::Id mSaveCollectionId
;
82 int mMaximumArchiveCount
;
83 bool mSaveSubCollection
;
86 #endif // ARCHIVEMAILINFO_H