TelepathyQt4: ClientInterfaceRequestsInterface Class Reference

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

# ClientInterfaceRequestsInterface Class Reference

`#include <TelepathyQt4/Client>`

Inherits Tp::AbstractInterface.

List of all members.

## Public Slots

- QDBusPendingReply AddRequest (const QDBusObjectPath &request, const QVariantMap &properties)
- QDBusPendingReply RemoveRequest (const QDBusObjectPath &request, const QString &error, const QString &message)

## Public Member Functions

- ClientInterfaceRequestsInterface (const QString &busName, const QString &objectPath, QObject *parent=0)
- ClientInterfaceRequestsInterface (const QDBusConnection &connection, const QString &busName, const QString &objectPath, QObject *parent=0)
- ClientInterfaceRequestsInterface (Tp::DBusProxy *proxy)
- ClientInterfaceRequestsInterface (const Tp::Client::ClientInterface &mainInterface)
- ClientInterfaceRequestsInterface (const Tp::Client::ClientInterface &mainInterface, QObject *parent)

## Static Public Member Functions

- static const char * staticInterfaceName ()

## Protected Member Functions

- virtual void invalidate (Tp::DBusProxy *, const QString &, const QString &)

## Detailed Description

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

## Constructor & Destructor Documentation

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.

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.

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.

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.

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* 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.

QDBusPendingReply 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 and UserActionTime MUST be included.

QDBusPendingReply 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.

virtual void invalidate | ( | Tp::DBusProxy * | ,
|  | const QString & | ,
|  | const QString & |  |
| ) |  |  | `[protected, virtual]`