1
/***************************************************************************
2
* This file is part of the KDE project *
4
* Copyright (C) 2010 Alejandro Fiestas Olivares <alex@ufocoders.com> *
5
* Copyright (C) 2010 UFO Coders <info@ufocoders.com> *
7
* This program is free software; you can redistribute it and/or modify *
8
* it under the terms of the GNU General Public License as published by *
9
* the Free Software Foundation; either version 2 of the License, or *
10
* (at your option) any later version. *
12
* This program is distributed in the hope that it will be useful, *
13
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
14
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
15
* GNU General Public License for more details. *
17
* You should have received a copy of the GNU General Public License *
18
* along with this program; if not, write to the *
19
* Free Software Foundation, Inc., *
20
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA *
21
***************************************************************************/
23
#ifndef SENDFILESJOB_H
24
#define SENDFILESJOB_H
26
#include <obex_transfer.h>
28
#include <QStringList>
30
#include <QDBusObjectPath>
32
#include <kcompositejob.h>
33
#include <KFileItemList>
40
using namespace BlueDevil;
42
class SendFilesJob : public KJob
46
SendFilesJob(KFileItemList list, BlueDevil::Device* device, ObexAgent* agent, QObject* parent = 0);
49
virtual bool doKill();
52
void nextJob(OrgOpenobexTransferInterface *transferObj);
53
void jobDone(QDBusObjectPath transfer);
54
void progress(QDBusObjectPath transfer, quint64 transferBytes);
55
void error(QDBusObjectPath transfer, const QString& error);
59
QStringList m_filesToSend;
60
QList <quint64> m_filesToSendSize;
62
QString m_currentFile;
63
QDBusObjectPath m_currentFileDBusPath;
66
quint64 m_currentFileProgress;
67
quint64 m_currentFileSize;
69
OrgOpenobexTransferInterface *m_currentTransferJob;
72
#endif // SENDFILESJOB_H