| Home · All Classes · All Namespaces · Modules · Functions · Files

incoming-stream-tube-channel.h

    00001
    00022 #ifndef _TelepathyQt_incoming_stream_tube_channel_h_HEADER_GUARD_
    00023 #define _TelepathyQt_incoming_stream_tube_channel_h_HEADER_GUARD_
    00024
    00025 #ifndef IN_TP_QT_HEADER
    00026 #error IN_TP_QT_HEADER
    00027 #endif
    00028
    00029 #include <TelepathyQt/StreamTubeChannel>
    00030
    00031 #include <QtNetwork/QHostAddress>
    00032
    00033 class QIODevice;
    00034
    00035 namespace Tp
    00036 {
    00037
    00038 class PendingStreamTubeConnection;
    00039
    00040 class TP_QT_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 protected:
    00059     IncomingStreamTubeChannel(const ConnectionPtr &connection,
    00060             const QString &objectPath,
    00061             const QVariantMap &immutableProperties,
    00062             const Feature &coreFeature = IncomingStreamTubeChannel::FeatureCore);
    00063
    00064 private Q_SLOTS:
    00065     TP_QT_NO_EXPORT void onNewLocalConnection(uint connectionId);
    00066
    00067 private:
    00068     struct Private;
    00069     friend class PendingStreamTubeConnection;
    00070     friend struct Private;
    00071     Private *mPriv;
    00072 };
    00073
    00074 }
    00075
    00076 #endif