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

The Connection::ErrorDetails class represents the details of a connection error. More...

#include <TelepathyQt/Connection>

Public Member Functions

 ErrorDetails ()
 
 ErrorDetails (const QVariantMap &details)
 
 ErrorDetails (const ErrorDetails &other)
 
 ~ErrorDetails ()
 
ErrorDetailsoperator= (const ErrorDetails &other)
 
bool isValid () const
 
bool hasDebugMessage () const
 
QString debugMessage () const
 
bool hasServerMessage () const
 
QString serverMessage () const
 
bool hasUserRequested () const
 
bool userRequested () const
 
bool hasExpectedHostname () const
 
QString expectedHostname () const
 
bool hasCertificateHostname () const
 
QString certificateHostname () const
 
QVariantMap allDetails () const
 

Detailed Description

The Connection::ErrorDetails class represents the details of a connection error.

It contains detailed information about the reason for the connection going invalidated().

Some services may provide additional error information in the ConnectionError D-Bus signal, when a Connection is disconnected / has become unusable. If the service didn't provide any, or has not been invalidated yet, the instance will be invalid, as returned by isValid().

The information provided by invalidationReason() and this class should always be used in error handling in preference to statusReason(). The status reason can be used as a fallback, however, if the client doesn't understand what a particular value returned by invalidationReason() means, as it may be domain-specific with some services.

Connection::errorDetails() can be used to return the instance containing the details for invalidating that connection after invalidated() has been emitted.

Constructor & Destructor Documentation

◆ ErrorDetails() [1/3]

Tp::Connection::ErrorDetails::ErrorDetails ( )

Constructs a new invalid ErrorDetails instance.

◆ ErrorDetails() [2/3]

Tp::Connection::ErrorDetails::ErrorDetails ( const QVariantMap &  details)

Construct a error details instance with the given details. The instance will indicate that it is valid.

◆ ErrorDetails() [3/3]

Tp::Connection::ErrorDetails::ErrorDetails ( const ErrorDetails other)

Copy constructor.

◆ ~ErrorDetails()

Tp::Connection::ErrorDetails::~ErrorDetails ( )

Class destructor.

Member Function Documentation

◆ operator=()

Connection::ErrorDetails & Tp::Connection::ErrorDetails::operator= ( const ErrorDetails other)

Assigns all information (validity, details) from other to this.

◆ isValid()

bool Tp::Connection::ErrorDetails::isValid ( ) const
inline

Return whether or not the details are valid (have actually been received from the service).

Returns
true if valid, false otherwise.

◆ hasDebugMessage()

bool Tp::Connection::ErrorDetails::hasDebugMessage ( ) const
inline

Return whether or not the details specify a debug message.

If present, the debug message will likely be the same string as the one returned by invalidationMessage().

The debug message is purely informational, offered for display for bug reporting purposes, and should not be attempted to be parsed.

Returns
true if debug message is present, false otherwise.
See also
debugMessage()

◆ debugMessage()

QString Tp::Connection::ErrorDetails::debugMessage ( ) const
inline

Return the debug message specified by the details, if any.

If present, the debug message will likely be the same string as the one returned by invalidationMessage().

The debug message is purely informational, offered for display for bug reporting purposes, and should not be attempted to be parsed.

Returns
The debug message, or an empty string if there is none.
See also
hasDebugMessage()

◆ hasServerMessage()

bool Tp::Connection::ErrorDetails::hasServerMessage ( ) const
inline

◆ serverMessage()

QString Tp::Connection::ErrorDetails::serverMessage ( ) const
inline

◆ hasUserRequested()

bool Tp::Connection::ErrorDetails::hasUserRequested ( ) const
inline

◆ userRequested()

bool Tp::Connection::ErrorDetails::userRequested ( ) const
inline

◆ hasExpectedHostname()

bool Tp::Connection::ErrorDetails::hasExpectedHostname ( ) const
inline

◆ expectedHostname()

QString Tp::Connection::ErrorDetails::expectedHostname ( ) const
inline

◆ hasCertificateHostname()

bool Tp::Connection::ErrorDetails::hasCertificateHostname ( ) const
inline

◆ certificateHostname()

QString Tp::Connection::ErrorDetails::certificateHostname ( ) const
inline

◆ allDetails()

QVariantMap Tp::Connection::ErrorDetails::allDetails ( ) const

Return a map containing all details given in the low-level ConnectionError signal.

This is useful for accessing domain-specific additional details.

Returns
The details of the connection error as QVariantMap.