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

ChannelDispatchOperation Class Reference
[ChannelDispatchOperation proxies]

#include <TelepathyQt4/ChannelDispatchOperation>

Inherits Tp::StatefulDBusProxy, OptionalInterfaceFactory< ChannelDispatchOperation >, Tp::ReadyObject, and Tp::RefCounted.

List of all members.

Signals

Public Member Functions

Static Public Member Functions

Static Public Attributes

Protected Member Functions


Detailed Description

High-level proxy object for accessing remote Telepathy ChannelDispatchOperation objects.

One of the channel dispatcher's functions is to offer incoming channels to Approver clients for approval. An approver should generally ask the user whether they want to participate in the requested communication channels (join the chat or chatroom, answer the call, accept the file transfer, or whatever is appropriate). A collection of channels offered in this way is represented by a ChannelDispatchOperation object.

If the user wishes to accept the communication channels, the approver should call handleWith() to indicate the user's or approver's preferred handler for the channels (the empty string indicates no particular preference, and will cause any suitable handler to be used).

If the user wishes to reject the communication channels, or if the user accepts the channels and the approver will handle them itself, the approver should call claim(). If the resulting PendingOperation succeeds, the approver immediately has control over the channels as their primary handler, and may do anything with them (in particular, it may close them in whatever way seems most appropriate).

There are various situations in which the channel dispatch operation will be closed, causing the DBusProxy::invalidated() signal to be emitted. If this happens, the approver should stop prompting the user.

Because all approvers are launched simultaneously, the user might respond to another approver; if this happens, the invalidated signal will be emitted with the error code TELEPATHY_QT4_ERROR_OBJECT_REMOVED.

If a channel closes, the signal channelLost() is emitted. If all channels close, there is nothing more to dispatch, so the invalidated signal will be emitted with the error code TELEPATHY_QT4_ERROR_OBJECT_REMOVED.

If the channel dispatcher crashes or exits, the invalidated signal will be emitted with the error code TELEPATHY_DBUS_ERROR_NAME_HAS_NO_OWNER. In a high-quality implementation, the dispatcher should be restarted, at which point it will create new channel dispatch operations for any undispatched channels, and the approver will be notified again.


Constructor & Destructor Documentation

~ChannelDispatchOperation (  )  [virtual]

Class destructor.

ChannelDispatchOperation ( const QDBusConnection &  bus,
const QString &  objectPath,
const QVariantMap &  immutableProperties 
) [protected]


Member Function Documentation

ChannelDispatchOperationPtr create ( const QString &  objectPath,
const QVariantMap &  immutableProperties 
) [static]

ChannelDispatchOperationPtr create ( const QDBusConnection &  bus,
const QString &  objectPath,
const QVariantMap &  immutableProperties 
) [static]

ConnectionPtr connection (  )  const

AccountPtr account (  )  const

QList< ChannelPtr > channels (  )  const

QStringList possibleHandlers (  )  const

PendingOperation * handleWith ( const QString &  handler  ) 

PendingOperation * claim (  ) 

Client::DBus::PropertiesInterface* propertiesInterface (  )  const [inline]

void channelLost ( const ChannelPtr channel,
const QString &  errorName,
const QString &  errorMessage 
) [signal]

Client::ChannelDispatchOperationInterface * baseInterface (  )  const [protected]

Get the ChannelDispatchOperationInterface for this ChannelDispatchOperation class. This method is protected since the convenience methods provided by this class should always be used instead of the interface by users of the class.

Returns:
A pointer to the existing ChannelDispatchOperationInterface for this ChannelDispatchOperation


Member Data Documentation

const Feature FeatureCore [static]


Copyright © 2009 Collabora Ltd. and Nokia Corporation
Telepathy-Qt4 0.1.10