MeeGo 1.2 Harmattan Developer Documentation Develop for the Nokia N9
   Home · All Classes · All Namespaces · Modules · Functions · Files

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 QLatin1String 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,
int  timeout = -1  
) [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.

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 ClientHandlerInterface::HandlerChannelFilter , and respect the preferred handler (if any).

If the request succeeds and is given to the expected Handler, the Requests_Satisfied parameter to ClientHandlerInterface::HandleChannels() can be used to match the channel to a previous AddRequest call.

This lets the UI direct the channels to the window that it already opened.

If the request fails, the expected handler is notified by the channel dispatcher calling its RemoveRequest() method.

This lets the UI close the window or display the error.

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 ClientHandlerInterface::HandlerChannelFilter . If the channels are not dispatched to the expected handler, the handler that was expected is notified by the channel dispatcher calling its RemoveRequest() method with the NotYours error.

Expected handling is for the UI to close the window it previously opened.

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

Calls to this method are merely a notification.

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

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 MUST be included if implemented.
timeout  The timeout in milliseconds.
QDBusPendingReply Tp::Client::ClientInterfaceRequestsInterface::RemoveRequest ( const QDBusObjectPath request,
const QString error,
const QString message,
int  timeout = -1  
) [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 AddRequest() 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.

Calls to this method are merely a notification.

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

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.

message  Any message supplied with the D-Bus error.
timeout  The timeout in milliseconds.
void Tp::Client::ClientInterfaceRequestsInterface::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.6.5