#ifndef COPYDIALOG_H
#define COPYDIALOG_H
//
#include <QDialog>
#include <QNetworkAccessManager>
#include <QNetworkReply>
#include <QNetworkRequest>
#include <QMessageBox>
#include <QDataStream>
#include <QTime>
#include <QFile>
#include "ui_copydialog.h"
//
class copydialog : public QDialog, public Ui::copydialog
{
Q_OBJECT
public:
	copydialog(QWidget * parent = 0, QString source = "", QString destination = "",bool * = 0);
private:
	QString					  sourceFilename;
	QString 				  destinationFilename;
	QString					  errorMessage;
	bool					  headerFound;
	bool					  errorFlag;
	bool					* globalOK;
	bool					  redirectFlag;
	long int 				  blocksRead;
	long int				  direction;
	long int				  position;
	long int				  buffersize;
	int						  rc2;
	QNetworkAccessManager	* manager;
	QNetworkRequest			  request;
	QNetworkReply			* reply;
	QDataStream				* stream;
	char					* buffer;
	QUrl					  redirect;
	QTime					* time;
	QFile					  output;
	QString msToString(long int);
	QString valueToString(long int);
private slots:
	void slot_abortButtonClicked();
	void slot_readyRead();
	void slot_error(QNetworkReply::NetworkError);
	void slot_finished(QNetworkReply *);
};
#endif
