00001
00022 #ifndef _TelepathyQt4_pending_stream_tube_connection_h_HEADER_GUARD_
00023 #define _TelepathyQt4_pending_stream_tube_connection_h_HEADER_GUARD_
00024
00025 #ifndef IN_TELEPATHY_QT4_HEADER
00026 #error IN_TELEPATHY_QT4_HEADER
00027 #endif
00028
00029 #include <TelepathyQt4/Constants>
00030 #include <TelepathyQt4/PendingOperation>
00031 #include <TelepathyQt4/Types>
00032
00033 #include <QPair>
00034
00035 class QHostAddress;
00036
00037 namespace Tp
00038 {
00039
00040 class PendingVariant;
00041 class IncomingStreamTubeChannel;
00042
00043 class TELEPATHY_QT4_EXPORT PendingStreamTubeConnection : public PendingOperation
00044 {
00045 Q_OBJECT
00046 Q_DISABLE_COPY(PendingStreamTubeConnection)
00047
00048 public:
00049 virtual ~PendingStreamTubeConnection();
00050
00051 SocketAddressType addressType() const;
00052
00053 QPair<QHostAddress, quint16> ipAddress() const;
00054 QString localAddress() const;
00055
00056 bool requiresCredentials() const;
00057 uchar credentialByte() const;
00058
00059 private Q_SLOTS:
00060 TELEPATHY_QT4_NO_EXPORT void onChannelInvalidated(Tp::DBusProxy *proxy,
00061 const QString &errorName, const QString &errorMessage);
00062 TELEPATHY_QT4_NO_EXPORT void onAcceptFinished(Tp::PendingOperation *op);
00063 TELEPATHY_QT4_NO_EXPORT void onTubeStateChanged(Tp::TubeChannelState state);
00064
00065 private:
00066 TELEPATHY_QT4_NO_EXPORT PendingStreamTubeConnection(PendingVariant *acceptOperation,
00067 SocketAddressType type, bool requiresCredentials, uchar credentialByte,
00068 const IncomingStreamTubeChannelPtr &channel);
00069 TELEPATHY_QT4_NO_EXPORT PendingStreamTubeConnection(
00070 const QString &errorName, const QString &errorMessage,
00071 const IncomingStreamTubeChannelPtr &channel);
00072
00073 struct Private;
00074 friend class IncomingStreamTubeChannel;
00075 friend struct Private;
00076 Private *mPriv;
00077 };
00078
00079 }
00080
00081 #endif // TP_PENDING_STREAM_TUBE_CONNECTION_H