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

Public Slots | Signals | Public Member Functions | List of all members
Tp::Service::ConnectionInterfaceRequestsAdaptor Class Reference
Connection service implementation

`#include <TelepathyQt/_gen/svc-connection.h>`

Inherits Tp::AbstractAdaptor.

## Public Slots

QDBusObjectPath | CreateChannel (const QVariantMap &request, const QDBusMessage &dbusMessage, QVariantMap &properties)
bool | EnsureChannel (const QVariantMap &request, const QDBusMessage &dbusMessage, QDBusObjectPath &channel, QVariantMap &properties)

## Signals

void | NewChannels (const Tp::ChannelDetailsList &channels)
void | ChannelClosed (const QDBusObjectPath &removed)

## Public Member Functions

Tp::ChannelDetailsList | Channels () const
Tp::RequestableChannelClassList | RequestableChannelClasses () const
Public Member Functions inherited from Tp::AbstractAdaptor
| AbstractAdaptor (const QDBusConnection &connection, QObject *adaptee, QObject *parent)
| ~AbstractAdaptor ()
QDBusConnection | dbusConnection () const
QObject * | adaptee () const

## Detailed Description

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

## Member Function Documentation

Tp::ChannelDetailsList Tp::Service::ConnectionInterfaceRequestsAdaptor::Channels | ( |  | ) | const

Return the value of the exported D-Bus object property `Channels` of type `Tp::ChannelDetailsList`.

Adaptees should export this property as a Qt property named 'channels' with type Tp::ChannelDetailsList.

A list of all the channels which currently exist on this connection. Change notification is via the NewChannels and ChannelClosed signals.

Returns
  The value of exported property `Channels`.

Tp::RequestableChannelClassList Tp::Service::ConnectionInterfaceRequestsAdaptor::RequestableChannelClasses | ( |  | ) | const

Return the value of the exported D-Bus object property `RequestableChannelClasses` of type `Tp::RequestableChannelClassList`.

Adaptees should export this property as a Qt property named 'requestableChannelClasses' with type Tp::RequestableChannelClassList.

The classes of channel that are expected to be available on this connection, i.e. those for which CreateChannel() can reasonably be expected to succeed. User interfaces can use this information to show or hide UI components.

This property cannot change after the connection has gone to state Connection_Status_Connected, so there is no change notification (if the connection has context-dependent capabilities, it SHOULD advertise support for all classes of channel that it might support during its lifetime). Before this state has been reached, the value of this property is undefined.

This is not on an optional interface, because connection managers can always offer some sort of clue about the channel classes they expect to support (at worst, they can announce support for everything for which they have code).

Returns
  The value of exported property `RequestableChannelClasses`.

QDBusObjectPath Tp::Service::ConnectionInterfaceRequestsAdaptor::CreateChannel | ( | const QVariantMap & | request,
|  | const QDBusMessage & | dbusMessage,
|  | QVariantMap & | properties
| ) |  |

slot

Begins a call to the exported D-Bus method `CreateChannel` on this object.

Adaptees should export this method as a Qt slot with the following signature: void createChannel(const QVariantMap& request, const Tp::Service::ConnectionInterfaceRequestsAdaptor::CreateChannelContextPtr &context);

Implementations should call MethodInvocationContext::setFinished (or setFinishedWithError accordingly) on the received context object once the method has finished processing.

Request that an entirely new channel is created.

There is deliberately no flag corresponding to the suppress_handler argument to ConnectionInterface::RequestChannel() , because passing a FALSE value for that argument is deprecated. Requests made using this interface always behave as though suppress_handler was TRUE.

Parameters

  request

  A dictionary containing desirable properties, which MUST include \\\ \\link ChannelInterface::requestPropertyChannelType() ChannelInterface::ChannelType \\endlink \\htmlonly . Some properties are defined such that only an exact match makes sense, and connection managers MUST NOT satisfy a request with a channel where that property does not match; some properties are defined such that the connection manager MAY treat the request as merely a hint, and make a best-effort attempt to satisfy it. This is documented separately for each property.

If this dictionary contains a property whose semantics are not known to the connection manager, this method MUST fail without side-effects (in particular it must not create a new channel).

This is necessary if we want to be able to invent properties in future that, when used in a request, are hard requirements rather than just hints. A connection manager that did not know the semantics of those properties could incorrectly return a new channel that did not satisfy the requirements.

The connection manager MUST NOT respond successfully, and SHOULD NOT create a new channel or cause any other side-effects, unless it can create a new channel that satisfies the client's requirements.

Properties that will be set by this argument need not have write access after the channel has been created - indeed, it is expected that most will be read-only.

Parameters

  properties | Output parameter

Properties of the channel that was produced, equivalent to the properties in Channel_Details. Connection managers MUST NOT include properties here whose values can change, for the same reasons as in Channel_Details.

Returns

The Channel object, which MUST NOT be signalled with \\\ NewChannels() \\htmlonly until after this method returns.

This allows the requester to alter its handling of NewChannels by knowing whether one of the channels satisfied a request it made.

bool Tp::Service::ConnectionInterfaceRequestsAdaptor::EnsureChannel | ( | const QVariantMap & | request,
|  | const QDBusMessage & | dbusMessage,
|  | QDBusObjectPath & | channel,
|  | QVariantMap & | properties
| ) |  |

slot

Begins a call to the exported D-Bus method `EnsureChannel` on this object.

Adaptees should export this method as a Qt slot with the following signature: void ensureChannel(const QVariantMap& request, const Tp::Service::ConnectionInterfaceRequestsAdaptor::EnsureChannelContextPtr &context);

Implementations should call MethodInvocationContext::setFinished (or setFinishedWithError accordingly) on the received context object once the method has finished processing.

Request that channels are ensured to exist.

The connection manager is in the best position to determine which existing channels could satisfy which requests.

Parameters

  request | A dictionary containing desirable properties, with the same semantics as the corresponding parameter to \\\ CreateChannel() \\htmlonly .

  channel

  Output parameter

      The Channel object. If it was created as a result of this method
      call, it MUST NOT be signalled by NewChannels until after this
      method returns. This allows the requester to alter its handling of
      NewChannels by knowing whether one of the channels satisfied a
      request it made.

  properties | Output parameter

Properties of the channel that was produced, equivalent to the properties in Channel_Details. Connection managers MUST NOT include properties here whose values can change, for the same reasons as in Channel_Details.

Returns

If false, the caller of EnsureChannel MUST assume that some other process is handling this channel; if true, the caller of EnsureChannel SHOULD handle it themselves or delegate it to another client.

If the creation of a channel makes several calls to EnsureChannel (and no other requests) successful, exactly one of those calls MUST return a true value for this argument.

If the creation of a channel makes other requests successful, the value returned for this argument MUST be such that exactly one of the clients making requests ends up responsible for the channel. In particular, if \\\ CreateChannel() \\htmlonly returns a channel C, any EnsureChannel calls that also return C MUST return a false value for this argument.

void Tp::Service::ConnectionInterfaceRequestsAdaptor::NewChannels | ( | const Tp::ChannelDetailsList & | channels | ) |

signal

Represents the exported D-Bus signal `NewChannels` on this object.

Adaptees should export this signal as a Qt signal with the following signature: void newChannels(const Tp::ChannelDetailsList& channels);

The adaptee signal will be automatically relayed as a D-Bus signal once emitted.

Parameters

  channels

      The channels and their details. All channels that are signalled
      together like this MUST have the same Bundle property, which may
      either refer to an existing bundle, or establish a new bundle.

void Tp::Service::ConnectionInterfaceRequestsAdaptor::ChannelClosed | ( | const QDBusObjectPath & | removed | ) |

signal

Represents the exported D-Bus signal `ChannelClosed` on this object.

Adaptees should export this signal as a Qt signal with the following signature: void channelClosed(const QDBusObjectPath& removed);

The adaptee signal will be automatically relayed as a D-Bus signal once emitted.

Parameters

  removed

      The channel which has been removed from the Channels property