Home · All Classes · All Namespaces · Modules · Functions · Files
Public Member Functions

Tp::Connection::ErrorDetails Class Reference
[Connection proxies]

#include <TelepathyQt4/Connection>

List of all members.

Public Member Functions


Detailed Description

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

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

Constructs a new invalid ErrorDetails instance.

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

Construct a error details instance with the given details. The instance will indicate it's valid.

This is primarily useful for wrapping lower-level APIs with, like presently Account::connectionErrorDetails() and Account::statusChanged(), neither of which we can compatibly change to return Connection::ErrorDetails yet.

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

Copy-constructs an ErrorDetails instance, with value copy semantics.

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

Destructs an ErrorDetails instance.


Member Function Documentation

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

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

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

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

Returns:
Validity of the details
bool Tp::Connection::ErrorDetails::hasDebugMessage (  )  const [inline]

Returns 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:
Whether there is a debug message or not.
QString Tp::Connection::ErrorDetails::debugMessage (  )  const [inline]

Returns 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.
QVariantMap Tp::Connection::ErrorDetails::allDetails (  )  const

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

This is useful for accessing domain-specific additional details.


Copyright © 2008-2010 Collabora Ltd. and Nokia Corporation
Telepathy-Qt4 0.4.4