#include <TelepathyQt4/Client/DBusProxy>
Public Types | |
enum | InterfaceSupportedChecking { CheckInterfaceSupported, BypassInterfaceCheck } |
Signals | |
void | invalidated (Telepathy::Client::DBusProxy *proxy, const QString &errorName, const QString &errorMessage) |
Public Member Functions | |
DBusProxy (const QDBusConnection &dbusConnection, const QString &busName, const QString &objectPath, QObject *parent=0) | |
virtual | ~DBusProxy () |
QDBusConnection | dbusConnection () const |
QString | busName () const |
QString | objectPath () const |
bool | isValid () const |
QString | invalidationReason () const |
QString | invalidationMessage () const |
Protected Member Functions | |
void | setBusName (const QString &busName) |
void | invalidate (const QString &reason, const QString &message) |
void | invalidate (const QDBusError &error) |
Friends | |
class | Private |
Base class representing a remote object available over D-Bus.
All TelepathyQt4 client convenience classes that wrap Telepathy interfaces inherit from this class in order to provide basic D-Bus interface information.
Specifies if the interface being supported by the remote object should be checked by optionalInterface() and the convenience functions for it.
Telepathy::Client::DBusProxy::DBusProxy | ( | const QDBusConnection & | dbusConnection, | |
const QString & | busName, | |||
const QString & | path, | |||
QObject * | parent = 0 | |||
) |
Constructor
References invalidate().
Telepathy::Client::DBusProxy::~DBusProxy | ( | ) | [virtual] |
Destructor
QString Telepathy::Client::DBusProxy::busName | ( | ) | const |
Returns the D-Bus bus name (either a unique name or a well-known name) of the service that provides the remote object.
Referenced by Telepathy::Client::ConnectionManager::ConnectionManager::Private::Private().
QDBusConnection Telepathy::Client::DBusProxy::dbusConnection | ( | ) | const |
Returns the D-Bus connection through which the remote object is accessed.
Referenced by Telepathy::Client::Account::connection().
void Telepathy::Client::DBusProxy::invalidate | ( | const QDBusError & | error | ) | [protected] |
References invalidate().
void Telepathy::Client::DBusProxy::invalidate | ( | const QString & | reason, | |
const QString & | message | |||
) | [protected] |
Called by subclasses when the DBusProxy should become invalid.
This method takes care of setting the invalidationReason, invalidationMessage, and emitting the invalidated signal.
reason | A D-Bus error name (a string in a subset of ASCII, prefixed with a reversed domain name) | |
message | A debugging message associated with the error |
References Telepathy::debug(), and isValid().
Referenced by DBusProxy(), invalidate(), and Telepathy::Client::StatefulDBusProxy::StatefulDBusProxy().
void Telepathy::Client::DBusProxy::invalidated | ( | Telepathy::Client::DBusProxy * | proxy, | |
const QString & | errorName, | |||
const QString & | errorMessage | |||
) | [signal] |
Emitted when this object is no longer usable.
After this signal is emitted, any D-Bus method calls on the object will fail, but it may be possible to retrieve information that has already been retrieved and cached.
proxy | This proxy | |
errorName | A D-Bus error name (a string in a subset of ASCII, prefixed with a reversed domain name) | |
errorMessage | A debugging message associated with the error |
QString Telepathy::Client::DBusProxy::invalidationMessage | ( | ) | const |
If this object is no longer usable (has emitted invalidated()), returns a debugging message indicating the reason it became invalid. Otherwise, returns a null QString.
Referenced by Telepathy::Client::TextChannel::becomeReady().
QString Telepathy::Client::DBusProxy::invalidationReason | ( | ) | const |
If this object is no longer usable (has emitted invalidated()), returns the error name indicating the reason it became invalid in a machine-readable way. Otherwise, returns a null QString.
Referenced by Telepathy::Client::TextChannel::becomeReady().
bool Telepathy::Client::DBusProxy::isValid | ( | ) | const |
If this object is usable (has not emitted invalidated()), returns true
. Otherwise returns false
.
true
if this object is still fully usable Referenced by Telepathy::Client::TextChannel::becomeReady(), Telepathy::Client::Channel::becomeReady(), Telepathy::Client::Channel::Channel(), Telepathy::Client::Channel::channelType(), Telepathy::Client::Channel::interfaces(), invalidate(), and Telepathy::Client::Channel::requestClose().
QString Telepathy::Client::DBusProxy::objectPath | ( | ) | const |
Returns the D-Bus object path of the remote object within the service.
Referenced by Telepathy::Client::Account::connection(), and Telepathy::Client::Account::uniqueIdentifier().
void Telepathy::Client::DBusProxy::setBusName | ( | const QString & | busName | ) | [protected] |
Sets the D-Bus bus name. This is used by subclasses after converting well-known names to unique names.
Referenced by Telepathy::Client::StatefulDBusProxy::StatefulDBusProxy().
friend class Private [friend] |
Reimplemented in Telepathy::Client::AccountManager, Telepathy::Client::Account, Telepathy::Client::Channel, Telepathy::Client::ConnectionManager, Telepathy::Client::Connection, Telepathy::Client::StatelessDBusProxy, Telepathy::Client::StatefulDBusProxy, Telepathy::Client::FileTransfer, Telepathy::Client::RoomList, Telepathy::Client::StreamedMediaChannel, and Telepathy::Client::TextChannel.