2
filetransferhandler.h - File Transfer Handler
4
Copyright (c) 2008 by Roman Jarosz <kedgedev@centrum.cz>
5
Kopete (c) 2008 by the Kopete developers <kopete-devel@kde.org>
7
*************************************************************************
9
* This program is free software; you can redistribute it and/or modify *
10
* it under the terms of the GNU General Public License as published by *
11
* the Free Software Foundation; either version 2 of the License, or *
12
* (at your option) any later version. *
14
*************************************************************************
16
#ifndef FILETRANSFERHANDLER_H
17
#define FILETRANSFERHANDLER_H
19
#include <QtCore/QObject>
20
#include <QtCore/QPointer>
21
#include "oscartypes.h"
23
#include "liboscar_export.h"
25
class FileTransferTask;
27
class LIBOSCAR_EXPORT FileTransferHandler : public QObject
31
FileTransferHandler( FileTransferTask* fileTransferTask );
32
~FileTransferHandler();
36
QString internalId() const;
37
QString contact() const;
38
QString fileName() const;
39
Oscar::WORD fileCount() const;
40
Oscar::DWORD totalSize() const;
41
QString description() const;
45
void save( const QString &directory );
46
void saveAs( const QStringList &fileNames );
49
void transferCancelled();
50
void transferError( int errorCode, const QString &error );
51
void transferFinished();
52
void transferProcessed( unsigned int totalSent );
54
void transferNextFile( const QString& sourceFile, const QString& destinationFile );
55
void transferNextFile( const QString& fileName, unsigned int fileSize );
56
void transferFileProcessed(unsigned int bytesSent, unsigned int fileSize );
59
void emitTransferCancelled();
60
void emitTransferError( int errorCode, const QString &error );
61
void emitTransferFinished();
64
QPointer<FileTransferTask> mFileTransferTask;
65
bool mFileTransferDone;