/***************************************************************************
 *   Copyright (C) 2010 by Volker Lanz <vl@fidra.de>                       *
 *                                                                         *
 *   This program is free software; you can redistribute it and/or modify  *
 *   it under the terms of the GNU General Public License as published by  *
 *   the Free Software Foundation; either version 2 of the License, or     *
 *   (at your option) any later version.                                   *
 *                                                                         *
 *   This program is distributed in the hope that it will be useful,       *
 *   but WITHOUT ANY WARRANTY; without even the implied warranty of        *
 *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the         *
 *   GNU General Public License for more details.                          *
 *                                                                         *
 *   You should have received a copy of the GNU General Public License     *
 *   along with this program; if not, write to the                         *
 *   Free Software Foundation, Inc.,                                       *
 *   51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA            *
 ***************************************************************************/

#if !defined(IMPORTER__H)

#define IMPORTER__H

#include "core/types.h"

#include <QThread>
#include <QStringList>

class QString;
class QStringList;

class Importer : public QThread
{
	Q_OBJECT

	public:
		Importer(const QStringList& fileNames_);
		~Importer();

	signals:
		void totalSteps(int i);
		void progress(int i);

	public:
		Activities& activities() { return m_Activities; }
		const QStringList errorFileNames() const { return m_ErrorFileNames; }

		static QStringList supportedFileFormats();

	protected:
		virtual void run();

	private:
		const QStringList m_FileNames;
		Activities m_Activities;
		ImporterInterfaces m_Importers;
		ImporterInterface* m_RunningImporter;
		QStringList m_ErrorFileNames;
};

#endif
