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

Tp::Client::ClientInterfaceRequestsInterface Class Reference
[Client proxies]

#include <TelepathyQt4/Client>

Inherits Tp::AbstractInterface.

List of all members.

Public Slots

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.Client.Interface.Requests."


Constructor & Destructor Documentation

Tp::Client::ClientInterfaceRequestsInterface::ClientInterfaceRequestsInterface ( const QString &  busName,
const QString &  objectPath,
QObject *  parent = 0 
)

Creates a ClientInterfaceRequestsInterface 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::ClientInterfaceRequestsInterface::ClientInterfaceRequestsInterface ( const QDBusConnection &  connection,
const QString &  busName,
const QString &  objectPath,
QObject *  parent = 0 
)

Creates a ClientInterfaceRequestsInterface 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::ClientInterfaceRequestsInterface::ClientInterfaceRequestsInterface ( Tp::DBusProxy proxy  ) 

Creates a ClientInterfaceRequestsInterface 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.
Tp::Client::ClientInterfaceRequestsInterface::ClientInterfaceRequestsInterface ( const Tp::Client::ClientInterface mainInterface  )  [explicit]

Creates a ClientInterfaceRequestsInterface associated with the same object as the given proxy. Additionally, the created proxy will have the same parent as the given proxy.

Parameters:
mainInterface The proxy to use.
Tp::Client::ClientInterfaceRequestsInterface::ClientInterfaceRequestsInterface ( const Tp::Client::ClientInterface mainInterface,
QObject *  parent 
)

Creates a ClientInterfaceRequestsInterface associated with the same object as the given proxy. However, a different parent object can be specified.

Parameters:
mainInterface The proxy to use.
parent Passed to the parent class constructor.

Member Function Documentation

static const char* Tp::Client::ClientInterfaceRequestsInterface::staticInterfaceName (  )  [inline, static]

Returns the name of the interface "org.freedesktop.Telepathy.Client.Interface.Requests", which this class represents.

Returns:
The D-Bus interface name.
Tp::PendingVariantMap* Tp::Client::ClientInterfaceRequestsInterface::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::ClientInterfaceRequestsInterface::AddRequest ( const QDBusObjectPath &  request,
const QVariantMap &  properties 
) [inline, slot]

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

Called by the ChannelDispatcher to indicate that channels have been requested, and that if the request is successful, they will probably be handled by this Handler. The ChannelDispatcher SHOULD only call this method on one handler per request.

<tp:rationale>

This allows the UI to start preparing to handle the channels in advance (e.g. render a window with an "in progress" message), improving perceived responsiveness.

The use of "probably" is because you can't necessarily tell from a channel request which handler will handle particular channels. A reasonable heuristic would be to match the request against the <tp:dbus-ref namespace="org.freedesktop.Telepathy.Client.Handler">HandlerChannelFilter</tp:dbus-ref>, and respect the preferred handler (if any). </tp:rationale>

If the request succeeds and is given to the expected Handler, the Requests_Satisfied parameter to <tp:dbus-ref namespace="org.freedesktop.Telepathy.Client.Handler">HandleChannels</tp:dbus-ref> can be used to match the channel to a previous AddRequest call.

<tp:rationale>

This lets the UI direct the channels to the window that it already opened. </tp:rationale>

If the request fails, the expected handler is notified by the channel dispatcher calling its <tp:member-ref>RemoveRequest</tp:member-ref> method.

<tp:rationale>

This lets the UI close the window or display the error. </tp:rationale>

The channel dispatcher SHOULD remember which handler was notified, and if the channel request succeeds, it SHOULD dispatch the channels to the expected handler, unless the channels do not match that handler's <tp:dbus-ref namespace="org.freedesktop.Telepathy.Client.Handler">HandlerChannelFilter</tp:dbus-ref>. If the channels are not dispatched to the expected handler, the handler that was expected is notified by the channel dispatcher calling its <tp:member-ref>RemoveRequest</tp:member-ref> method with the NotYours error.

<tp:rationale>

Expected handling is for the UI to close the window it previously opened. </tp:rationale>

Handlers SHOULD NOT return an error from this method; errors returned from this method SHOULD NOT alter the channel dispatcher's behaviour.

<tp:rationale>

Calls to this method are merely a notification. </tp:rationale>

Parameters:
request The ChannelRequest object, which MUST have been returned by CreateChannel or EnsureChannel before this method is called. See those methods for the rationale of this ordering.
properties Some of the properties of the ChannelRequest. To avoid race conditions, this dictionary MUST NOT include properties whose values could subsequently change. It SHOULD include as many properties as possible, given that constraint. In particular, the properties Requests, UserActionTime and Account MUST be included, and Hints SHOULD be included if implemented.
QDBusPendingReply Tp::Client::ClientInterfaceRequestsInterface::RemoveRequest ( const QDBusObjectPath &  request,
const QString &  error,
const QString &  message 
) [inline, slot]

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

Called by the ChannelDispatcher to indicate that a request previously passed to <tp:member-ref>AddRequest</tp:member-ref> has failed and should be disregarded.

Handlers SHOULD NOT return an error from this method; errors returned from this method SHOULD NOT alter the channel dispatcher's behaviour.

<tp:rationale>

Calls to this method are merely a notification. </tp:rationale>

Parameters:
request The request that failed.
error 

The name of the D-Bus error with which the request failed.

If this is org.freedesktop.Telepathy.Error.NotYours, this indicates that the request succeeded, but all the resulting channels were given to some other handler.

Parameters:
message Any message supplied with the D-Bus error.
void Tp::Client::ClientInterfaceRequestsInterface::invalidate ( Tp::DBusProxy proxy,
const QString &  error,
const QString &  message 
) [protected, virtual]

Reimplemented from Tp::AbstractInterface.


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