Home · All Classes · All Namespaces · Modules · Functions · Files |
The StreamTubeChannel class represents a Telepathy channel of type StreamTube. More...
#include <TelepathyQt/StreamTubeChannel>
Inherits Tp::TubeChannel.
Inherited by Tp::IncomingStreamTubeChannel, and Tp::OutgoingStreamTubeChannel.
Signals | |
void | newConnection (uint connectionId) |
void | connectionClosed (uint connectionId, const QString &errorName, const QString &errorMessage) |
Signals inherited from Tp::TubeChannel | |
void | stateChanged (Tp::TubeChannelState state) |
Signals inherited from Tp::Channel | |
void | groupFlagsChanged (Tp::ChannelGroupFlags flags, Tp::ChannelGroupFlags added, Tp::ChannelGroupFlags removed) |
void | groupCanAddContactsChanged (bool canAddContacts) |
void | groupCanRemoveContactsChanged (bool canRemoveContacts) |
void | groupCanRescindContactsChanged (bool canRescindContacts) |
void | groupMembersChanged (const Tp::Contacts &groupMembersAdded, const Tp::Contacts &groupLocalPendingMembersAdded, const Tp::Contacts &groupRemotePendingMembersAdded, const Tp::Contacts &groupMembersRemoved, const Tp::Channel::GroupMemberChangeDetails &details) |
void | groupHandleOwnersChanged (const Tp::HandleOwnerMap &owners, const Tp::UIntList &added, const Tp::UIntList &removed) |
void | groupSelfContactChanged () |
void | conferenceChannelMerged (const Tp::ChannelPtr &channel) |
void | conferenceChannelRemoved (const Tp::ChannelPtr &channel, const Tp::Channel::GroupMemberChangeDetails &details) |
Signals inherited from Tp::DBusProxy | |
void | invalidated (Tp::DBusProxy *proxy, const QString &errorName, const QString &errorMessage) |
Signals inherited from Tp::Object | |
void | propertyChanged (const QString &propertyName) |
Static Public Member Functions | |
static StreamTubeChannelPtr | create (const ConnectionPtr &connection, const QString &objectPath, const QVariantMap &immutableProperties) |
Static Public Member Functions inherited from Tp::TubeChannel | |
static TubeChannelPtr | create (const ConnectionPtr &connection, const QString &objectPath, const QVariantMap &immutableProperties) |
Static Public Member Functions inherited from Tp::Channel | |
static ChannelPtr | create (const ConnectionPtr &connection, const QString &objectPath, const QVariantMap &immutableProperties) |
Static Public Member Functions inherited from Tp::StatefulDBusProxy | |
static QString | uniqueNameFrom (const QDBusConnection &bus, const QString &wellKnownOrUnique) |
static QString | uniqueNameFrom (const QDBusConnection &bus, const QString &wellKnownOrUnique, QString &error, QString &message) |
Static Public Attributes | |
static const Feature | FeatureCore |
static const Feature | FeatureConnectionMonitoring |
Static Public Attributes inherited from Tp::TubeChannel | |
static const Feature | FeatureCore |
Static Public Attributes inherited from Tp::Channel | |
static const Feature | FeatureCore |
static const Feature | FeatureConferenceInitialInviteeContacts |
Protected Member Functions | |
StreamTubeChannel (const ConnectionPtr &connection, const QString &objectPath, const QVariantMap &immutableProperties, const Feature &coreFeature=StreamTubeChannel::FeatureCore) | |
void | addConnection (uint connection) |
void | removeConnection (uint connection, const QString &error, const QString &message) |
void | setAddressType (SocketAddressType type) |
SocketAccessControl | accessControl () const |
void | setAccessControl (SocketAccessControl accessControl) |
void | setIpAddress (const QPair< QHostAddress, quint16 > &address) |
void | setLocalAddress (const QString &address) |
bool | isDroppingConnections () const |
Protected Member Functions inherited from Tp::TubeChannel | |
TubeChannel (const ConnectionPtr &connection, const QString &objectPath, const QVariantMap &immutableProperties, const Feature &coreFeature=TubeChannel::FeatureCore) | |
void | setParameters (const QVariantMap ¶meters) |
Protected Member Functions inherited from Tp::Channel | |
Channel (const ConnectionPtr &connection, const QString &objectPath, const QVariantMap &immutableProperties, const Feature &coreFeature) | |
Client::ChannelInterface * | baseInterface () const |
bool | groupSelfHandleIsLocalPending () const |
Protected Member Functions inherited from Tp::DBusProxy | |
void | setBusName (const QString &busName) |
void | invalidate (const QString &reason, const QString &message) |
void | invalidate (const QDBusError &error) |
Protected Member Functions inherited from Tp::Object | |
Object () | |
void | notify (const char *propertyName) |
Protected Member Functions inherited from Tp::ReadyObject | |
ReadinessHelper * | readinessHelper () const |
Protected Member Functions inherited from Tp::OptionalInterfaceFactory< Channel > | |
void | setInterfaces (const QStringList &interfaces) |
Additional Inherited Members | |
Public Types inherited from Tp::OptionalInterfaceFactory< Channel > | |
enum | InterfaceSupportedChecking |
Protected Slots inherited from Tp::Channel | |
PendingOperation * | groupAddSelfHandle () |
The StreamTubeChannel class represents a Telepathy channel of type StreamTube.
It provides a transport for reliable and ordered data transfer, similar to SOCK_STREAM sockets.
StreamTubeChannel is an intermediate base class; OutgoingStreamTubeChannel and IncomingStreamTubeChannel are the specialized classes used for locally and remotely initiated tubes respectively.
For more details, please refer to Telepathy specification.
|
virtual |
Class destructor.
|
protected |
Construct a new StreamTubeChannel object.
connection | Connection owning this channel, and specifying the service. |
objectPath | The channel object path. |
immutableProperties | The channel immutable properties. |
coreFeature | The core feature of the channel type, if any. The corresponding introspectable should depend on StreamTubeChannel::FeatureCore. |
|
static |
Create a new StreamTubeChannel channel.
connection | Connection owning this channel, and specifying the service. |
objectPath | The channel object path. |
immutableProperties | The channel immutable properties. |
QString Tp::StreamTubeChannel::service | ( | ) | const |
Return the service name which will be used over this stream tube. This should be a well-known TCP service name, for instance "rsync" or "daap".
This method requires StreamTubeChannel::FeatureCore to be ready.
bool Tp::StreamTubeChannel::supportsIPv4SocketsOnLocalhost | ( | ) | const |
Return whether this stream tube is capable to accept or offer an IPv4 socket accepting all incoming connections coming from localhost.
Note that the Telepathy specification implies that any connection manager, if capable of providing stream tubes, must at least support IPv4 sockets with localhost access control. For this reason, this method should always return true
.
This method requires StreamTubeChannel::FeatureCore to be ready.
true
if the stream tube is capable to accept or offer an IPv4 socket accepting all incoming connections coming from localhost, false
otherwise. bool Tp::StreamTubeChannel::supportsIPv4SocketsWithSpecifiedAddress | ( | ) | const |
Return whether this stream tube is capable to accept an IPv4 socket accepting all incoming connections coming from a specific address for incoming tubes or whether this stream tube is capable of mapping connections to the socket's source address for outgoing tubes.
For incoming tubes, when this capability is available, the stream tube can be accepted specifying an IPv4 address. Every connection coming from any other address than the specified one will be rejected.
For outgoing tubes, when this capability is available, one can keep track of incoming connections by enabling StreamTubeChannel::FeatureConnectionMonitoring (possibly before opening the stream tube itself), and checking OutgoingStreamTubeChannel::contactsForConnections() or OutgoingStreamTubeChannel::connectionsForSourceAddresses().
Note that it is strongly advised to call this method before attempting to call IncomingStreamTubeChannel::acceptTubeAsTcpSocket() or OutgoingStreamTubeChannel::offerTcpSocket() with a specified address to prevent failures, as the spec implies this feature is not compulsory for connection managers.
This method requires StreamTubeChannel::FeatureCore to be ready.
true
if the stream tube is capable to accept an IPv4 socket accepting all incoming connections coming from a specific address for incoming tubes or the stream tube is capable of mapping connections to the socket's source address for outgoing tubes, false
otherwise. bool Tp::StreamTubeChannel::supportsIPv6SocketsOnLocalhost | ( | ) | const |
Return whether this stream tube is capable to accept or offer an IPv6 socket accepting all incoming connections coming from localhost.
Note that it is strongly advised to call this method before attempting to call IncomingStreamTubeChannel::acceptTubeAsTcpSocket() or OutgoingStreamTubeChannel::offerTcpSocket() with a specified address to prevent failures, as the spec implies this feature is not compulsory for connection managers.
This method requires StreamTubeChannel::FeatureCore to be ready.
true
if the stream tube is capable to accept or offer an IPv6 socket accepting all incoming connections coming from localhost, false
otherwise. bool Tp::StreamTubeChannel::supportsIPv6SocketsWithSpecifiedAddress | ( | ) | const |
Return whether this stream tube is capable to accept an IPv6 socket accepting all incoming connections coming from a specific address for incoming tubes or whether this stream tube is capable of mapping connections to the socket's source address for outgoing tubes.
For incoming tubes, when this capability is available, the stream tube can be accepted specifying an IPv6 address. Every connection coming from any other address than the specified one will be rejected.
For outgoing tubes, when this capability is available, one can keep track of incoming connections by enabling StreamTubeChannel::FeatureConnectionMonitoring (possibly before opening the stream tube itself), and checking OutgoingStreamTubeChannel::contactsForConnections() or OutgoingStreamTubeChannel::connectionsForSourceAddresses().
Note that it is strongly advised to call this method before attempting to call IncomingStreamTubeChannel::acceptTubeAsTcpSocket() or OutgoingStreamTubeChannel::offerTcpSocket() with a specified address to prevent failures, as the spec implies this feature is not compulsory for connection managers.
This method requires StreamTubeChannel::FeatureCore to be ready.
true
if the stream tube is capable to accept an IPv6 socket accepting all incoming connections coming from a specific address for incoming tubes or the stream tube is capable of mapping connections to the socket's source address for outgoing tubes, false
otherwise. bool Tp::StreamTubeChannel::supportsUnixSocketsOnLocalhost | ( | ) | const |
Return whether this stream tube is capable to accept or offer an Unix socket accepting all incoming connections coming from localhost.
Note that it is strongly advised to call this method before attempting to call IncomingStreamTubeChannel::acceptTubeAsUnixSocket() or OutgoingStreamTubeChannel::offerUnixSocket() without credentials enabled, as the spec implies this feature is not compulsory for connection managers.
This method requires StreamTubeChannel::FeatureCore to be ready.
true
if the stream tube is capable to accept or offer an Unix socket accepting all incoming connections coming from localhost, false
otherwise. bool Tp::StreamTubeChannel::supportsUnixSocketsWithCredentials | ( | ) | const |
Return whether this stream tube is capable to accept or offer an Unix socket which will require credentials upon connection.
When this capability is available and enabled, the connecting process must send a byte when it first connects, which is not considered to be part of the data stream. If the operating system uses sendmsg() with SCM_CREDS or SCM_CREDENTIALS to pass credentials over sockets, the connecting process must do so if possible; if not, it must still send the byte.
The listening process will disconnect the connection unless it can determine by OS-specific means that the connecting process has the same user ID as the listening process.
Note that it is strongly advised to call this method before attempting to call IncomingStreamTubeChannel::acceptTubeAsUnixSocket() or OutgoingStreamTubeChannel::offerUnixSocket() with credentials enabled, as the spec implies this feature is not compulsory for connection managers.
This method requires StreamTubeChannel::FeatureCore to be ready.
true
if the stream tube is capable to accept or offer an Unix socket which will require credentials upon connection, false
otherwise. bool Tp::StreamTubeChannel::supportsAbstractUnixSocketsOnLocalhost | ( | ) | const |
Return whether this stream tube is capable to accept or offer an abstract Unix socket accepting all incoming connections coming from localhost.
Note that it is strongly advised to call this method before attempting to call IncomingStreamTubeChannel::acceptTubeAsUnixSocket() or OutgoingStreamTubeChannel::offerUnixSocket() without credentials enabled, as the spec implies this feature is not compulsory for connection managers.
This method requires StreamTubeChannel::FeatureCore to be ready.
true
if the stream tube is capable to accept or offer an abstract Unix socket accepting all incoming connections coming from localhost, false
otherwise. bool Tp::StreamTubeChannel::supportsAbstractUnixSocketsWithCredentials | ( | ) | const |
Return whether this stream tube is capable to accept or offer an abstract Unix socket which will require credentials upon connection.
When this capability is available and enabled, the connecting process must send a byte when it first connects, which is not considered to be part of the data stream. If the operating system uses sendmsg() with SCM_CREDS or SCM_CREDENTIALS to pass credentials over sockets, the connecting process must do so if possible; if not, it must still send the byte.
The listening process will disconnect the connection unless it can determine by OS-specific means that the connecting process has the same user ID as the listening process.
Note that it is strongly advised to call this method before attempting to call IncomingStreamTubeChannel::acceptTubeAsUnixSocket() or OutgoingStreamTubeChannel::offerUnixSocket() with credentials enabled, as the spec implies this feature is not compulsory for connection managers.
This method requires StreamTubeChannel::FeatureCore to be ready.
true
if the stream tube is capable to accept or offer an abstract Unix socket which will require credentials upon connection, false
otherwise. QSet< uint > Tp::StreamTubeChannel::connections | ( | ) | const |
Return all the known active connections since StreamTubeChannel::FeatureConnectionMonitoring has been enabled.
For this method to return all known connections, you need to make StreamTubeChannel::FeatureConnectionMonitoring ready before accepting or offering the stream tube.
This method requires StreamTubeChannel::FeatureConnectionMonitoring to be ready.
SocketAddressType Tp::StreamTubeChannel::addressType | ( | ) | const |
Return the type of the tube's local endpoint socket.
Note that this function will return a valid value only after state() has gone TubeStateOpen.
QPair< QHostAddress, quint16 > Tp::StreamTubeChannel::ipAddress | ( | ) | const |
Return the IP address/port combination used by this stream tube.
This method will return a meaningful value only if the local endpoint socket for the tube is a TCP socket, i.e. addressType() is SocketAddressTypeIPv4 or SocketAddressTypeIPv6.
Note that this function will return a valid value only after state() has gone TubeStateOpen.
QString Tp::StreamTubeChannel::localAddress | ( | ) | const |
Return the local address used by this stream tube.
This method will return a meaningful value only if the local endpoint socket for the tube is an UNIX socket, i.e. addressType() is SocketAddressTypeUnix or SocketAddressTypeAbstractUnix.
Note that this function will return a valid value only after state() has gone TubeStateOpen.
|
signal |
|
signal |
Emitted when a connection on this stream tube has been closed.
connectionId | The unique ID associated with the connection that was closed. |
errorName | The name of a D-Bus error describing the error that occurred. |
errorMessage | A debugging message associated with the error. |
|
protected |
|
protected |
|
protected |
|
protected |
Return the access control used by this stream tube.
Note that this function will only return a valid value after state() has gone TubeStateOpen.
|
protected |
|
protected |
|
protected |
|
protected |
|
static |
Feature representing the core that needs to become ready to make the StreamTubeChannel object usable.
Note that this feature must be enabled in order to use most StreamTubeChannel methods. See specific methods documentation for more details.
|
static |
Feature used in order to monitor connections to this stream tube.
See connection monitoring specific methods' documentation for more details.
Copyright © 2008-2011 Collabora Ltd. and Nokia Corporation | Telepathy-Qt 0.9.7 |