Better english
[kdepim.git] / importwizard / abstractimporter.h
blob0e18d4daa0d9ba5a7b4be70403ae060ebc9bcc21
1 /*
2 Copyright (c) 2012 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 AbstractImporter_H
19 #define AbstractImporter_H
20 #include <QObject>
21 #include "mailcommon/filter/filterimporterexporter.h"
23 class ImportWizard;
25 namespace MailImporter {
26 class FilterInfo;
29 namespace MailCommon {
30 class MailFilter;
31 class FilterImporterExporter;
34 class AbstractImporter
36 public:
37 enum TypeSupportedOption
39 None = 0,
40 Mails = 1,
41 Settings = 2,
42 Filters = 4,
43 AddressBook = 8
46 Q_DECLARE_FLAGS(TypeSupportedOptions, TypeSupportedOption )
48 explicit AbstractImporter(ImportWizard *parent);
49 virtual ~AbstractImporter();
51 virtual bool foundMailer() const= 0;
53 virtual TypeSupportedOptions supportedOption() = 0;
54 virtual QString name() const = 0;
55 virtual bool importSettings();
56 virtual bool importMails();
57 virtual bool importFilters();
58 virtual bool importAddressBook();
60 protected:
61 void appendFilters( const QList<MailCommon::MailFilter*>& filters );
62 MailImporter::FilterInfo* initializeInfo();
63 void addFilterImportInfo( const QString& log );
64 void addFilterImportError( const QString& log );
65 bool addFilters( const QString& filterPath, MailCommon::FilterImporterExporter::FilterType type );
68 QString mPath;
69 ImportWizard *mImportWizard;
73 #endif /* AbstractImporter_H */