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

stream-tube-channel.h
1
22 #ifndef _TelepathyQt_stream_tube_channel_h_HEADER_GUARD_
23 #define _TelepathyQt_stream_tube_channel_h_HEADER_GUARD_
24
25 #ifndef IN_TP_QT_HEADER
26 #error IN_TP_QT_HEADER
27 #endif
28
29 #include <TelepathyQt/TubeChannel>
30
31 class QHostAddress;
32
33 namespace Tp
34 {
35
36 class TP_QT_EXPORT StreamTubeChannel : public TubeChannel
37 {
38 Q_OBJECT
39 Q_DISABLE_COPY(StreamTubeChannel)
40
41 public:
42 static const Feature FeatureCore;
43 static const Feature FeatureConnectionMonitoring;
44
45 static StreamTubeChannelPtr create(const ConnectionPtr &connection,
46 const QString &objectPath, const QVariantMap &immutableProperties);
47
48 virtual ~StreamTubeChannel();
49
50 QString service() const;
51
52 bool supportsIPv4SocketsOnLocalhost() const;
53 bool supportsIPv4SocketsWithSpecifiedAddress() const;
54
55 bool supportsIPv6SocketsOnLocalhost() const;
56 bool supportsIPv6SocketsWithSpecifiedAddress() const;
57
58 bool supportsUnixSocketsOnLocalhost() const;
59 bool supportsUnixSocketsWithCredentials() const;
60
61 bool supportsAbstractUnixSocketsOnLocalhost() const;
62 bool supportsAbstractUnixSocketsWithCredentials() const;
63
64 QSet<uint> connections() const;
65
66 SocketAddressType addressType() const;
67
68 QPair< QHostAddress, quint16 > ipAddress() const;
69 QString localAddress() const;
70
71 Q_SIGNALS:
72 void newConnection(uint connectionId);
73 void connectionClosed(uint connectionId, const QString &errorName,
74 const QString &errorMessage);
75
76 protected:
77 StreamTubeChannel(const ConnectionPtr &connection, const QString &objectPath,
78 const QVariantMap &immutableProperties,
79 const Feature &coreFeature = StreamTubeChannel::FeatureCore);
80
81 void addConnection(uint connection);
82 void removeConnection(uint connection, const QString &error, const QString &message);
83 void setAddressType(SocketAddressType type);
84 SocketAccessControl accessControl() const;
85 void setAccessControl(SocketAccessControl accessControl);
86 void setIpAddress(const QPair<QHostAddress, quint16> &address);
87 void setLocalAddress(const QString &address);
88 bool isDroppingConnections() const;
89
90 private Q_SLOTS:
91 TP_QT_NO_EXPORT void gotStreamTubeProperties(Tp::PendingOperation *op);
92 TP_QT_NO_EXPORT void onConnectionClosed(uint, const QString &, const QString &);
93 TP_QT_NO_EXPORT void dropConnections();
94
95 private:
96 struct Private;
97 friend struct Private;
98 Private *mPriv;
99 };
100
101 }
102
103 #endif
Tp::StreamTubeChannel
The StreamTubeChannel class represents a Telepathy channel of type StreamTube.
Definition: stream-tube-channel.h:36
Tp::PendingOperation
The PendingOperation class is a base class for pending asynchronous operations.
Definition: pending-operation.h:45
QHostAddress
Tp
Definition: abstract-adaptor.cpp:31
Tp::TubeChannel
The TubeChannel class is a base class for all tube types.
Definition: tube-channel.h:34
QSet< uint >
Tp::Feature
The Feature class represents a feature that can be enabled on demand.
Definition: feature.h:41
QString
QPair< QHostAddress, quint16 >
Tp::StreamTubeChannel::FeatureCore
static const Feature FeatureCore
Definition: stream-tube-channel.h:42
Tp::SocketAddressType
SocketAddressType
Definition: obj-x86_64-linux-gnu/TelepathyQt/_gen/constants.h:3775
Tp::StreamTubeChannel::FeatureConnectionMonitoring
static const Feature FeatureConnectionMonitoring
Definition: stream-tube-channel.h:43
Tp::SocketAccessControl
SocketAccessControl
Definition: obj-x86_64-linux-gnu/TelepathyQt/_gen/constants.h:3822