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

stream-tube-channel.h

00001 
00022 #ifndef _TelepathyQt4_stream_tube_channel_h_HEADER_GUARD_
00023 #define _TelepathyQt4_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/TubeChannel>
00030 
00031 class QHostAddress;
00032 
00033 namespace Tp
00034 {
00035 
00036 class TELEPATHY_QT4_EXPORT StreamTubeChannel : public TubeChannel
00037 {
00038     Q_OBJECT
00039     Q_DISABLE_COPY(StreamTubeChannel)
00040 
00041 public:
00042     static const Feature FeatureStreamTube;
00043     static const Feature FeatureConnectionMonitoring;
00044 
00045     static StreamTubeChannelPtr create(const ConnectionPtr &connection,
00046             const QString &objectPath, const QVariantMap &immutableProperties);
00047 
00048     virtual ~StreamTubeChannel();
00049 
00050     QString service() const;
00051 
00052     bool supportsIPv4SocketsOnLocalhost() const;
00053     bool supportsIPv4SocketsWithSpecifiedAddress() const;
00054 
00055     bool supportsIPv6SocketsOnLocalhost() const;
00056     bool supportsIPv6SocketsWithSpecifiedAddress() const;
00057 
00058     bool supportsUnixSocketsOnLocalhost() const;
00059     bool supportsUnixSocketsWithCredentials() const;
00060 
00061     bool supportsAbstractUnixSocketsOnLocalhost() const;
00062     bool supportsAbstractUnixSocketsWithCredentials() const;
00063 
00064     UIntList connections() const;
00065 
00066     SocketAddressType addressType() const;
00067 
00068     QPair< QHostAddress, quint16 > ipAddress() const;
00069     QString localAddress() const;
00070 
00071 Q_SIGNALS:
00072     void newConnection(uint connectionId);
00073     void connectionClosed(uint connectionId, const QString &error,
00074             const QString &message);
00075 
00076 protected:
00077     StreamTubeChannel(const ConnectionPtr &connection, const QString &objectPath,
00078             const QVariantMap &immutableProperties,
00079             const Feature &coreFeature = StreamTubeChannel::FeatureStreamTube);
00080 
00081     void setBaseTubeType(uint type);
00082     void setAddressType(SocketAddressType type);
00083     void setConnections(UIntList connections);
00084     void setIpAddress(const QPair<QHostAddress, quint16> &address);
00085     void setLocalAddress(const QString &address);
00086 
00087 private Q_SLOTS:
00088     TELEPATHY_QT4_NO_EXPORT void gotStreamTubeProperties(QDBusPendingCallWatcher *watcher);
00089     TELEPATHY_QT4_NO_EXPORT void onConnectionClosed(uint connectionId, const QString &error, const QString &message);
00090 
00091 private:
00092     struct Private;
00093     friend struct Private;
00094     Private *mPriv;
00095 };
00096 
00097 }
00098 
00099 #endif


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