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
21 #include "mailcommon/filter/filterimporterexporter.h"
25 namespace MailImporter
{
29 namespace MailCommon
{
31 class FilterImporterExporter
;
34 class AbstractImporter
37 enum TypeSupportedOption
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();
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
);
69 ImportWizard
*mImportWizard
;
73 #endif /* AbstractImporter_H */