MeeGo 1.2 Harmattan Developer Documentation Develop for the Nokia N9
   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 FeatureCore;
00043     // FIXME (API/ABI break) Remove FeatureStreamTube in favour of FeatureCore
00044     static const Feature FeatureStreamTube;
00045     static const Feature FeatureConnectionMonitoring;
00046 
00047     static StreamTubeChannelPtr create(const ConnectionPtr &connection,
00048             const QString &objectPath, const QVariantMap &immutableProperties);
00049 
00050     virtual ~StreamTubeChannel();
00051 
00052     QString service() const;
00053 
00054     bool supportsIPv4SocketsOnLocalhost() const;
00055     bool supportsIPv4SocketsWithSpecifiedAddress() const;
00056 
00057     bool supportsIPv6SocketsOnLocalhost() const;
00058     bool supportsIPv6SocketsWithSpecifiedAddress() const;
00059 
00060     bool supportsUnixSocketsOnLocalhost() const;
00061     bool supportsUnixSocketsWithCredentials() const;
00062 
00063     bool supportsAbstractUnixSocketsOnLocalhost() const;
00064     bool supportsAbstractUnixSocketsWithCredentials() const;
00065 
00066     UIntList connections() const;
00067 
00068     SocketAddressType addressType() const;
00069 
00070     QPair< QHostAddress, quint16 > ipAddress() const;
00071     QString localAddress() const;
00072 
00073 Q_SIGNALS:
00074     void newConnection(uint connectionId);
00075     void connectionClosed(uint connectionId, const QString &errorName,
00076             const QString &errorMessage);
00077 
00078 protected:
00079     StreamTubeChannel(const ConnectionPtr &connection, const QString &objectPath,
00080             const QVariantMap &immutableProperties,
00081             const Feature &coreFeature = StreamTubeChannel::FeatureCore);
00082 
00083     void setBaseTubeType(uint type);
00084     void setConnections(UIntList connections);
00085     void setAddressType(SocketAddressType type);
00086     SocketAccessControl accessControl() const;
00087     void setAccessControl(SocketAccessControl accessControl);
00088     void setIpAddress(const QPair<QHostAddress, quint16> &address);
00089     void setLocalAddress(const QString &address);
00090 
00091 private Q_SLOTS:
00092     TELEPATHY_QT4_NO_EXPORT void gotStreamTubeProperties(Tp::PendingOperation *op);
00093 
00094 private:
00095     struct Private;
00096     friend struct Private;
00097     Private *mPriv;
00098 };
00099 
00100 }
00101 
00102 #endif

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