/***************************************************************************
                          dcfiletool.h  -  description
                             -------------------
    begin                : Die Mär 26 2002
    copyright            : (C) 2002 by Mathias Küster
    email                : mathen@users.berlios.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.                                   *
 *                                                                         *
 ***************************************************************************/

#ifndef DCFILETOOL_H
#define DCFILETOOL_H

/**
  *@author Mathias Küster
  */

#include <QString>

#include <dclib/dcobject.h>

enum eRepairType {
	ertNONE=0,
	ertBYTES,
	ertSECTORS
};

class QWidget;

class DCFileTool {

public: 
	/** construtor - does nothing */
	DCFileTool();
	/** destructor - does nothing */
	~DCFileTool();

	/** */
	static bool SelectFileSource( QWidget * parent, ulonglong size, QString tth, QString & file, QString & localrootpath, QString & localpath );
	/** */
	static bool AddFileSource( QWidget * parent, CString nick, CString hubname, CString hubhost,
				CString remotename, CString localname,
				CString localpath, CString localrootpath,
				eltMedium medium, ulonglong size, CString tth );
	/** */
	static bool CheckFile( QWidget * parent, CString nick, CString hubname, CString hubhost,
				CString remotename, CString localname,
				CString localpath, CString localrootpath,
				eltMedium medium, ulonglong size,
				CString hash,
				bool usermulti = false,
				eRepairType repair = ertNONE );
};

#endif
