2
* This file is part of TelepathyQt
4
* @copyright Copyright (C) 2009 Collabora Ltd. <http://www.collabora.co.uk/>
5
* @copyright Copyright (C) 2009 Nokia Corporation
8
* This library is free software; you can redistribute it and/or
9
* modify it under the terms of the GNU Lesser General Public
10
* License as published by the Free Software Foundation; either
11
* version 2.1 of the License, or (at your option) any later version.
13
* This library is distributed in the hope that it will be useful,
14
* but WITHOUT ANY WARRANTY; without even the implied warranty of
15
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16
* Lesser General Public License for more details.
18
* You should have received a copy of the GNU Lesser General Public
19
* License along with this library; if not, write to the Free Software
20
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
23
#ifndef _TelepathyQt_incoming_file_transfer_channel_h_HEADER_GUARD_
24
#define _TelepathyQt_incoming_file_transfer_channel_h_HEADER_GUARD_
26
#ifndef IN_TP_QT_HEADER
27
#error IN_TP_QT_HEADER
30
#include <TelepathyQt/FileTransferChannel>
32
#include <QAbstractSocket>
37
class TP_QT_EXPORT IncomingFileTransferChannel : public FileTransferChannel
40
Q_DISABLE_COPY(IncomingFileTransferChannel)
43
static const Feature FeatureCore;
45
static IncomingFileTransferChannelPtr create(const ConnectionPtr &connection,
46
const QString &objectPath, const QVariantMap &immutableProperties);
48
virtual ~IncomingFileTransferChannel();
50
PendingOperation *setUri(const QString& uri);
51
PendingOperation *acceptFile(qulonglong offset, QIODevice *output);
54
void uriDefined(const QString &uri);
57
IncomingFileTransferChannel(const ConnectionPtr &connection,
58
const QString &objectPath,
59
const QVariantMap &immutableProperties,
60
const Feature &coreFeature = IncomingFileTransferChannel::FeatureCore);
63
TP_QT_NO_EXPORT void onAcceptFileFinished(Tp::PendingOperation *op);
65
TP_QT_NO_EXPORT void onSocketConnected();
66
TP_QT_NO_EXPORT void onSocketDisconnected();
67
TP_QT_NO_EXPORT void onSocketError(QAbstractSocket::SocketError error);
68
TP_QT_NO_EXPORT void doTransfer();
71
TP_QT_NO_EXPORT void connectToHost();
72
TP_QT_NO_EXPORT void setFinished();
75
friend struct Private;