MeeGo 1.2 Harmattan Developer Documentation Develop for the Nokia N9
   Home · All Classes · All Namespaces · Modules · Functions · Files

outgoing-file-transfer-channel.h

00001 
00023 #ifndef _TelepathyQt4_outgoing_file_transfer_channel_h_HEADER_GUARD_
00024 #define _TelepathyQt4_outgoing_file_transfer_channel_h_HEADER_GUARD_
00025 
00026 #ifndef IN_TELEPATHY_QT4_HEADER
00027 #error IN_TELEPATHY_QT4_HEADER
00028 #endif
00029 
00030 #include <TelepathyQt4/FileTransferChannel>
00031 
00032 #include <QAbstractSocket>
00033 
00034 namespace Tp
00035 {
00036 
00037 class TELEPATHY_QT4_EXPORT OutgoingFileTransferChannel : public FileTransferChannel
00038 {
00039     Q_OBJECT
00040     Q_DISABLE_COPY(OutgoingFileTransferChannel)
00041 
00042 public:
00043     static const Feature FeatureCore;
00044 
00045     static OutgoingFileTransferChannelPtr create(const ConnectionPtr &connection,
00046             const QString &objectPath, const QVariantMap &immutableProperties);
00047 
00048     virtual ~OutgoingFileTransferChannel();
00049 
00050     PendingOperation *provideFile(QIODevice *input);
00051 
00052 protected:
00053     OutgoingFileTransferChannel(const ConnectionPtr &connection,
00054             const QString &objectPath,
00055             const QVariantMap &immutableProperties,
00056             const Feature &coreFeature = OutgoingFileTransferChannel::FeatureCore);
00057 
00058 private Q_SLOTS:
00059     TELEPATHY_QT4_NO_EXPORT void onProvideFileFinished(Tp::PendingOperation *op);
00060 
00061     TELEPATHY_QT4_NO_EXPORT void onSocketConnected();
00062     TELEPATHY_QT4_NO_EXPORT void onSocketDisconnected();
00063     TELEPATHY_QT4_NO_EXPORT void onSocketError(QAbstractSocket::SocketError error);
00064     TELEPATHY_QT4_NO_EXPORT void onInputAboutToClose();
00065     TELEPATHY_QT4_NO_EXPORT void doTransfer();
00066 
00067 private:
00068     TELEPATHY_QT4_NO_EXPORT void connectToHost();
00069     TELEPATHY_QT4_NO_EXPORT void setFinished();
00070 
00071     struct Private;
00072     friend struct Private;
00073     Private *mPriv;
00074 };
00075 
00076 } // Tp
00077 
00078 #endif

Copyright © 2008-2011 Collabora Ltd. and Nokia Corporation
Telepathy-Qt4 0.6.5