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

incoming-stream-tube-channel.h

00001 
00022 #ifndef _TelepathyQt4_incoming_stream_tube_channel_h_HEADER_GUARD_
00023 #define _TelepathyQt4_incoming_stream_tube_channel_h_HEADER_GUARD_
00024 
00025 #ifndef IN_TELEPATHY_QT4_HEADER
00026 #error IN_TELEPATHY_QT4_HEADER
00027 #endif
00028 
00029 #include <TelepathyQt4/StreamTubeChannel>
00030 
00031 #include <QtNetwork/QHostAddress>
00032 
00033 class QIODevice;
00034 
00035 namespace Tp
00036 {
00037 
00038 class PendingStreamTubeConnection;
00039 
00040 class TELEPATHY_QT4_EXPORT IncomingStreamTubeChannel : public StreamTubeChannel
00041 {
00042     Q_OBJECT
00043     Q_DISABLE_COPY(IncomingStreamTubeChannel)
00044 
00045 public:
00046     static const Feature FeatureCore;
00047 
00048     static IncomingStreamTubeChannelPtr create(const ConnectionPtr &connection,
00049             const QString &objectPath, const QVariantMap &immutableProperties);
00050 
00051     virtual ~IncomingStreamTubeChannel();
00052 
00053     PendingStreamTubeConnection *acceptTubeAsTcpSocket();
00054     PendingStreamTubeConnection *acceptTubeAsTcpSocket(const QHostAddress &allowedAddress,
00055             quint16 allowedPort);
00056     PendingStreamTubeConnection *acceptTubeAsUnixSocket(bool requireCredentials = false);
00057 
00058     // FIXME: (API/ABI break) Remove ipAddress() and localAddress() (already in StreamTubeChannel)
00059     QPair<QHostAddress, quint16> ipAddress() const;
00060     QString localAddress() const;
00061 
00062 protected:
00063     IncomingStreamTubeChannel(const ConnectionPtr &connection,
00064             const QString &objectPath,
00065             const QVariantMap &immutableProperties,
00066             const Feature &coreFeature = IncomingStreamTubeChannel::FeatureCore);
00067 
00068 private Q_SLOTS:
00069     TELEPATHY_QT4_NO_EXPORT void onNewLocalConnection(uint connectionId);
00070 
00071 private:
00072     struct Private;
00073     friend class PendingStreamTubeConnection;
00074     friend struct Private;
00075     Private *mPriv;
00076 };
00077 
00078 }
00079 
00080 #endif

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