Home · Modules · All Classes · All Namespaces
Public Member Functions | List of all members
Tp::PendingStreamTubeConnection Class Reference

The PendingStreamTubeConnection class represents an asynchronous operation for accepting an incoming stream tube. More...

#include <TelepathyQt/PendingStreamTubeConnection>

Inherits Tp::PendingOperation.

Public Member Functions

virtual ~PendingStreamTubeConnection ()
 
SocketAddressType addressType () const
 
QPair< QHostAddress, quint16 > ipAddress () const
 
QString localAddress () const
 
bool requiresCredentials () const
 
uchar credentialByte () const
 
- Public Member Functions inherited from Tp::PendingOperation
virtual ~PendingOperation ()
 
bool isFinished () const
 
bool isValid () const
 
bool isError () const
 
QString errorName () const
 
QString errorMessage () const
 

Additional Inherited Members

- Signals inherited from Tp::PendingOperation
void finished (Tp::PendingOperation *operation)
 
- Protected Slots inherited from Tp::PendingOperation
void setFinished ()
 
void setFinishedWithError (const QString &name, const QString &message)
 
void setFinishedWithError (const QDBusError &error)
 
- Protected Member Functions inherited from Tp::PendingOperation
 PendingOperation (const SharedPtr< RefCounted > &object)
 
SharedPtr< RefCountedobject () const
 

Detailed Description

The PendingStreamTubeConnection class represents an asynchronous operation for accepting an incoming stream tube.

See Asynchronous Object Model

Constructor & Destructor Documentation

◆ ~PendingStreamTubeConnection()

Tp::PendingStreamTubeConnection::~PendingStreamTubeConnection ( )
virtual

Class destructor.

Member Function Documentation

◆ addressType()

SocketAddressType Tp::PendingStreamTubeConnection::addressType ( ) const

Return the type of the opened stream tube socket.

Returns
The socket type as SocketAddressType.
See also
localAddress(), ipAddress()

◆ ipAddress()

QPair< QHostAddress, quint16 > Tp::PendingStreamTubeConnection::ipAddress ( ) const

Return the IP address/port combination of the opened stream tube socket.

This method will return a meaningful value only if the incoming stream tube was accepted as a TCP socket.

Returns
Pair of IP address as QHostAddress and port if using a TCP socket, or an undefined value otherwise.
See also
addressType(), localAddress()

◆ localAddress()

QString Tp::PendingStreamTubeConnection::localAddress ( ) const

Return the local address of the opened stream tube socket.

This method will return a meaningful value only if the incoming stream tube was accepted as an Unix socket.

Returns
Unix socket address if using an Unix socket, or an undefined value otherwise.
See also
addressType(), ipAddress()

◆ requiresCredentials()

bool Tp::PendingStreamTubeConnection::requiresCredentials ( ) const

Return whether sending a credential byte once connecting to the socket is required.

Note that if this method returns true, one should send a SCM_CREDS or SCM_CREDENTIALS and the credentialByte() once connected. If SCM_CREDS or SCM_CREDENTIALS cannot be sent, the credentialByte() should still be sent.

Returns
true if sending credentials is required, false otherwise.
See also
credentialByte()

◆ credentialByte()

uchar Tp::PendingStreamTubeConnection::credentialByte ( ) const

Return the credential byte to send once connecting to the socket if requiresCredentials() is true.

Returns
The credential byte.
See also
requiresCredentials()