Home · All Classes · All Namespaces · Modules · Functions · Files
Public Slots | Signals | Public Member Functions | Static Public Member Functions | Protected Member Functions
Tp::Client::ChannelDispatchOperationInterface Class Reference

#include <TelepathyQt4/ChannelDispatchOperation>

Inherits Tp::AbstractInterface.

List of all members.

Public Slots

Signals

Public Member Functions

Static Public Member Functions

Protected Member Functions


Detailed Description

Proxy class providing a 1:1 mapping of the D-Bus interface "org.freedesktop.Telepathy.ChannelDispatchOperation."


Constructor & Destructor Documentation

Tp::Client::ChannelDispatchOperationInterface::ChannelDispatchOperationInterface ( const QString busName,
const QString objectPath,
QObject parent = 0 
)

Creates a ChannelDispatchOperationInterface associated with the given object on the session bus.

Parameters:
busNameName of the service the object is on.
objectPathPath to the object on the service.
parentPassed to the parent class constructor.
Tp::Client::ChannelDispatchOperationInterface::ChannelDispatchOperationInterface ( const QDBusConnection connection,
const QString busName,
const QString objectPath,
QObject parent = 0 
)

Creates a ChannelDispatchOperationInterface associated with the given object on the given bus.

Parameters:
connectionThe bus via which the object can be reached.
busNameName of the service the object is on.
objectPathPath to the object on the service.
parentPassed to the parent class constructor.
Tp::Client::ChannelDispatchOperationInterface::ChannelDispatchOperationInterface ( Tp::DBusProxy proxy)

Creates a ChannelDispatchOperationInterface associated with the same object as the given proxy.

Parameters:
proxyThe proxy to use. It will also be the QObject::parent() for this object.

Member Function Documentation

static QLatin1String Tp::Client::ChannelDispatchOperationInterface::staticInterfaceName ( ) [inline, static]

Returns the name of the interface "org.freedesktop.Telepathy.ChannelDispatchOperation", which this class represents.

Returns:
The D-Bus interface name.
Tp::PendingVariant* Tp::Client::ChannelDispatchOperationInterface::requestPropertyInterfaces ( ) const [inline]

Asynchronous getter for the remote object property Interfaces of type QStringList.

A list of the extra interfaces provided by this channel dispatch operation. This property cannot change.

Returns:
A pending variant which will emit finished when the property has been retrieved.
Tp::PendingVariant* Tp::Client::ChannelDispatchOperationInterface::requestPropertyConnection ( ) const [inline]

Asynchronous getter for the remote object property Connection of type QDBusObjectPath.

The Connection with which the Channels are associated. The well-known bus name to use can be derived from this object path by removing the leading '/' and replacing all subsequent '/' by '.'. This property cannot change.

Returns:
A pending variant which will emit finished when the property has been retrieved.
Tp::PendingVariant* Tp::Client::ChannelDispatchOperationInterface::requestPropertyAccount ( ) const [inline]

Asynchronous getter for the remote object property Account of type QDBusObjectPath.

The Account with which the Connection and Channels are associated. This property cannot change.

Returns:
A pending variant which will emit finished when the property has been retrieved.
Tp::PendingVariant* Tp::Client::ChannelDispatchOperationInterface::requestPropertyChannels ( ) const [inline]

Asynchronous getter for the remote object property Channels of type Tp::ChannelDetailsList.

The Channels to be dispatched, and their properties. Change notification is via the ChannelLost signal (channels cannot be added to this property, only removed).

Returns:
A pending variant which will emit finished when the property has been retrieved.
Tp::PendingVariant* Tp::Client::ChannelDispatchOperationInterface::requestPropertyPossibleHandlers ( ) const [inline]

Asynchronous getter for the remote object property PossibleHandlers of type QStringList.

The well known bus names (starting with org.freedesktop.Telepathy.Client.) of the possible Handlers for these channels. The channel dispatcher MUST place the most preferred handlers first, according to some reasonable heuristic. As a result, approvers SHOULD use the first handler by default. The heuristic used to prioritize handlers SHOULD give a higher priority to handlers that are already running. If, for instance, Empathy and Kopete have similar functionality, and Empathy is running, we should prefer to send channels to it rather than launching Kopete via service activation.

Returns:
A pending variant which will emit finished when the property has been retrieved.
Tp::PendingVariantMap* Tp::Client::ChannelDispatchOperationInterface::requestAllProperties ( ) const [inline]

Request all of the DBus properties on the interface.

Returns:
A pending variant map which will emit finished when the properties have been retrieved.
QDBusPendingReply Tp::Client::ChannelDispatchOperationInterface::HandleWith ( const QString handler,
int  timeout = -1 
) [inline, slot]

Begins a call to the D-Bus method HandleWith on the remote object.

Called by an approver to accept a channel bundle and request that the given handler be used to handle it.

If successful, this method will cause the ChannelDispatchOperation object to disappear, emitting Finished() .

However, this method may fail because the dispatch has already been completed and the object has already gone. If this occurs, it indicates that another approver has asked for the bundle to be handled by a particular handler. The approver MUST NOT attempt to interact with the channels further in this case, unless it is separately invoked as the handler.

Approvers which are also channel handlers SHOULD use Claim() instead of HandleWith to request that they can handle a channel bundle themselves.

(FIXME: list some possible errors)

If the channel handler raises an error from ClientHandlerInterface::HandleChannels() , this method MAY respond by raising that same error, even if it is not specifically documented here.

Note that timeout is ignored as of now. It will be used once http://bugreports.qt.nokia.com/browse/QTBUG-11775 is fixed.

Parameters:
handler

The well-known bus name (starting with org.freedesktop.Telepathy.Client.) of the channel handler that should handle the channel, or the empty string if the client has no preferred channel handler.

timeoutThe timeout in milliseconds.
QDBusPendingReply Tp::Client::ChannelDispatchOperationInterface::Claim ( int  timeout = -1) [inline, slot]

Begins a call to the D-Bus method Claim on the remote object.

Called by an approver to claim channels for handling internally. If this method is called successfully, the process calling this method becomes the handler for the channel, but does not have the ClientHandlerInterface::HandleChannels() method called on it.

Clients that call Claim on channels but do not immediately close them SHOULD implement the Handler interface and its ClientHandlerInterface::HandledChannels property.

Approvers wishing to reject channels MUST call this method to claim ownership of them, and MUST NOT call ChannelInterface::Close() on the channels unless/until this method returns successfully.

The channel dispatcher can't know how best to close arbitrary channel types, so it leaves it up to the approver to do so. For instance, for Text channels it is necessary to acknowledge any messages that have already been displayed to the user first - ideally, the approver would display and then acknowledge the messages - or to call ChannelInterfaceDestroyableInterface::Destroy() if the destructive behaviour of that method is desired.

Similarly, an Approver for StreamedMedia channels can close the channel with a reason (e.g. "busy") if desired. The channel dispatcher, which is designed to have no specific knowledge of particular channel types, can't do that.

If successful, this method will cause the ChannelDispatchOperation object to disappear, emitting Finished() , in the same way as for HandleWith() .

This method may fail because the dispatch operation has already been completed. Again, see HandleWith for more details. The approver MUST NOT attempt to interact with the channels further in this case.

(FIXME: list some other possible errors)

Note that timeout is ignored as of now. It will be used once http://bugreports.qt.nokia.com/browse/QTBUG-11775 is fixed.

Parameters:
timeoutThe timeout in milliseconds.
QDBusPendingReply Tp::Client::ChannelDispatchOperationInterface::HandleWithTime ( const QString handler,
qlonglong  userActionTime,
int  timeout = -1 
) [inline, slot]

Begins a call to the D-Bus method HandleWithTime on the remote object.

A variant of HandleWith() allowing the approver to pass an user action time. This timestamp will be passed to the Handler when ClientHandlerInterface::HandleChannels() is called.

Note that timeout is ignored as of now. It will be used once http://bugreports.qt.nokia.com/browse/QTBUG-11775 is fixed.

Parameters:
handler

The well-known bus name (starting with org.freedesktop.Telepathy.Client.) of the channel handler that should handle the channel, or the empty string if the client has no preferred channel handler.

userActionTime

The time at which user action occurred.

timeoutThe timeout in milliseconds.
void Tp::Client::ChannelDispatchOperationInterface::ChannelLost ( const QDBusObjectPath channel,
const QString error,
const QString message 
) [signal]

Represents the signal ChannelLost on the remote object.

A channel has closed before it could be claimed or handled. If this is emitted for the last remaining channel in a channel dispatch operation, it MUST immediately be followed by Finished() .

This signal MUST NOT be emitted until all Approvers that were invoked have returned (successfully or with an error) from their ClientApproverInterface::AddDispatchOperation() method.

This means that Approvers can connect to the ChannelLost signal in a race-free way. Non-approver processes that discover a channel dispatch operation in some way (such as observers) will have to follow the usual "connect to signals then recover state" model - first connect to ChannelLost and Finished() , then download Channels (and on error, perhaps assume that the operation has already Finished).

Parameters:
channelThe Channel that closed.
error

The name of a D-Bus error indicating why the channel closed. If no better reason can be found, org.freedesktop.Telepathy.Error.NotAvailable MAY be used as a fallback; this means that this error SHOULD NOT be given any more specific meaning.

messageA string associated with the D-Bus error.
void Tp::Client::ChannelDispatchOperationInterface::Finished ( ) [signal]

Represents the signal Finished on the remote object.

Emitted when this dispatch operation finishes. The dispatch operation is no longer present and further methods must not be called on it.

Approvers that have a user interface SHOULD stop notifying the user about the channels in response to this signal; they MAY assume that on errors, they would have received ChannelLost() first.

Its object path SHOULD NOT be reused for a subsequent dispatch operation; the ChannelDispatcher MUST choose object paths in a way that avoids immediate re-use.

Otherwise, clients might accidentally call HandleWith() or Claim() on a new dispatch operation instead of the one they intended to handle.

This signal MUST NOT be emitted until all Approvers that were invoked have returned (successfully or with an error) from their ClientApproverInterface::AddDispatchOperation() method.

This means that Approvers can connect to the ChannelLost signal in a race-free way. Non-approver processes that discover a channel dispatch operation in some way (such as observers) will have to follow the usual "connect to signals then recover state" model - first connect to ChannelLost() and Finished, then download Channels (and on error, perhaps assume that the operation has already Finished).

void Tp::Client::ChannelDispatchOperationInterface::invalidate ( Tp::DBusProxy proxy,
const QString error,
const QString message 
) [protected, virtual]

Reimplemented from Tp::AbstractInterface.


Copyright © 2008-2011 Collabora Ltd. and Nokia Corporation
Telepathy-Qt4 0.8.0