Home · All Classes · All Namespaces · Modules · Functions · Files
Public Slots | Signals | Public Member Functions | Static Public Member Functions | Protected Member Functions | Properties

Tp::Client::ChannelDispatchOperationInterface Class Reference
[ChannelDispatchOperation proxies]

#include <TelepathyQt4/ChannelDispatchOperation>

Inherits Tp::AbstractInterface.

List of all members.

Public Slots

Signals

Public Member Functions

Static Public Member Functions

Protected Member Functions

Properties


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:
busName Name of the service the object is on.
objectPath Path to the object on the service.
parent Passed 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:
connection The bus via which the object can be reached.
busName Name of the service the object is on.
objectPath Path to the object on the service.
parent Passed 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:
proxy The proxy to use. It will also be the QObject::parent() for this object.

Member Function Documentation

static const char* 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.
TELEPATHY_QT4_DEPRECATED QStringList Tp::Client::ChannelDispatchOperationInterface::Interfaces (  )  const [inline]

Getter for the remote object property "Interfaces".

Don't use this: it blocks the main loop. Use the asynchronous requestPropertyInterfaces() instead.

Returns:
The value of the property, or a default-constructed value if the property is not readable.
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.
TELEPATHY_QT4_DEPRECATED QDBusObjectPath Tp::Client::ChannelDispatchOperationInterface::Connection (  )  const [inline]

Getter for the remote object property "Connection".

Don't use this: it blocks the main loop. Use the asynchronous requestPropertyConnection() instead.

Returns:
The value of the property, or a default-constructed value if the property is not readable.
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.
TELEPATHY_QT4_DEPRECATED QDBusObjectPath Tp::Client::ChannelDispatchOperationInterface::Account (  )  const [inline]

Getter for the remote object property "Account".

Don't use this: it blocks the main loop. Use the asynchronous requestPropertyAccount() instead.

Returns:
The value of the property, or a default-constructed value if the property is not readable.
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.
TELEPATHY_QT4_DEPRECATED Tp::ChannelDetailsList Tp::Client::ChannelDispatchOperationInterface::Channels (  )  const [inline]

Getter for the remote object property "Channels".

Don't use this: it blocks the main loop. Use the asynchronous requestPropertyChannels() instead.

Returns:
The value of the property, or a default-constructed value if the property is not readable.
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.
TELEPATHY_QT4_DEPRECATED QStringList Tp::Client::ChannelDispatchOperationInterface::PossibleHandlers (  )  const [inline]

Getter for the remote object property "PossibleHandlers".

Don't use this: it blocks the main loop. Use the asynchronous requestPropertyPossibleHandlers() instead.

Returns:
The value of the property, or a default-constructed value if the property is not readable.
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  )  [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 <tp:member-ref>Finished</tp:member-ref>.

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 <tp:member-ref>Claim</tp:member-ref> 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 <tp:dbus-ref namespace="org.freedesktop.Telepathy.Client.Handler">HandleChannels</tp:dbus-ref>, this method MAY respond by raising that same error, even if it is not specifically documented here.

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.

QDBusPendingReply Tp::Client::ChannelDispatchOperationInterface::Claim (  )  [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 <tp:dbus-ref namespace="org.freedesktop.Telepathy.Client.Handler">HandleChannels</tp:dbus-ref> method called on it.

Clients that call Claim on channels but do not immediately close them SHOULD implement the Handler interface and its <tp:dbus-ref namespace="org.freedesktop.Telepathy.Client.Handler">HandledChannels</tp:dbus-ref> property.

Approvers wishing to reject channels MUST call this method to claim ownership of them, and MUST NOT call <tp:dbus-ref namespace="org.freedesktop.Telepathy.Channel">Close</tp:dbus-ref> on the channels unless/until this method returns successfully.

<tp:rationale>

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 <tp:dbus-ref namespace="org.freedesktop.Telepathy">Channel.Interface.Destroyable.Destroy</tp:dbus-ref> 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. </tp:rationale>

If successful, this method will cause the ChannelDispatchOperation object to disappear, emitting <tp:member-ref>Finished</tp:member-ref>, in the same way as for <tp:member-ref>HandleWith</tp:member-ref>.

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)

QDBusPendingReply Tp::Client::ChannelDispatchOperationInterface::HandleWithTime ( const QString &  handler,
qlonglong  userActionTime 
) [inline, slot]

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

A variant of <tp:member-ref>HandleWith</tp:member-ref> allowing the approver to pass an user action time. This timestamp will be passed to the Handler when <tp:dbus-ref namespace="org.freedesktop.Telepathy.Client.Handler">HandleChannels</tp:dbus-ref> is called.

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.

Parameters:
userActionTime 

The time at which user action occurred.

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 <tp:member-ref>Finished</tp:member-ref>.

This signal MUST NOT be emitted until all Approvers that were invoked have returned (successfully or with an error) from their <tp:dbus-ref namespace="org.freedesktop.Telepathy.Client.Approver">AddDispatchOperation</tp:dbus-ref> method.

<tp:rationale>

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 <tp:member-ref>Finished</tp:member-ref>, then download <tp:member-ref>Channels</tp:member-ref> (and on error, perhaps assume that the operation has already Finished). </tp:rationale>

Parameters:
channel The 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.

Parameters:
message A 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 <tp:member-ref>ChannelLost</tp:member-ref> 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.

<tp:rationale>

Otherwise, clients might accidentally call <tp:member-ref>HandleWith</tp:member-ref> or <tp:member-ref>Claim</tp:member-ref> on a new dispatch operation instead of the one they intended to handle. </tp:rationale>

This signal MUST NOT be emitted until all Approvers that were invoked have returned (successfully or with an error) from their <tp:dbus-ref namespace="org.freedesktop.Telepathy.Client.Approver">AddDispatchOperation</tp:dbus-ref> method.

<tp:rationale>

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 <tp:member-ref>ChannelLost</tp:member-ref> and Finished, then download <tp:member-ref>Channels</tp:member-ref> (and on error, perhaps assume that the operation has already Finished). </tp:rationale>

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

Reimplemented from Tp::AbstractInterface.


Property Documentation

QStringList Tp::Client::ChannelDispatchOperationInterface::Interfaces [read]

Represents property "Interfaces" on the remote object.

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

QDBusObjectPath Tp::Client::ChannelDispatchOperationInterface::Connection [read]

Represents property "Connection" on the remote object.

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.

QDBusObjectPath Tp::Client::ChannelDispatchOperationInterface::Account [read]

Represents property "Account" on the remote object.

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

Tp::ChannelDetailsList Tp::Client::ChannelDispatchOperationInterface::Channels [read]

Represents property "Channels" on the remote object.

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

QStringList Tp::Client::ChannelDispatchOperationInterface::PossibleHandlers [read]

Represents property "PossibleHandlers" on the remote object.

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.


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