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

# Tp::ChannelRequest Class Reference
[ChannelRequest proxies]

The ChannelRequest class provides an object representing a Telepathy channel request. More...

`#include <TelepathyQt4/ChannelRequest>`

Inherits Tp::StatefulDBusProxy, OptionalInterfaceFactory< ChannelRequest >, Tp::ReadyObject, and Tp::RefCounted.

List of all members.

## Signals

- void failed (const QString &errorName, const QString &errorMessage)
- void succeeded ()

## Public Member Functions

- virtual ~ChannelRequest ()
- AccountPtr account () const
- QDateTime userActionTime () const
- QString preferredHandler () const
- QualifiedPropertyValueMapList requests () const
- PendingOperation * cancel ()
- Client::DBus::PropertiesInterface * propertiesInterface () const

## Static Public Member Functions

- static ChannelRequestPtr create (const QString &objectPath, const QVariantMap &immutableProperties)
- static ChannelRequestPtr create (const QDBusConnection &bus, const QString &objectPath, const QVariantMap &immutableProperties)

## Static Public Attributes

- static const Feature FeatureCore

## Protected Member Functions

- ChannelRequest (const QDBusConnection &bus, const QString &objectPath, const QVariantMap &immutableProperties)
- Client::ChannelRequestInterface * baseInterface () const

## Detailed Description

The ChannelRequest class provides an object representing a Telepathy channel request.

A channel request is an object in the channel dispatcher representing an ongoing request for some channels to be created or found. There can be any number of channel request objects at the same time.

A channel request can be cancelled by any client (not just the one that requested it). This means that the channel dispatcher will close the resulting channel, or refrain from requesting it at all, rather than dispatching it to a handler.

## Constructor & Destructor Documentation

Tp::ChannelRequest::~ChannelRequest | ( |  | ) | `[virtual]`

Class destructor.

Tp::ChannelRequest::ChannelRequest | ( | const QDBusConnection & | bus,
|  | const QString & | objectPath,
|  | const QVariantMap & | immutableProperties |
| ) |  |  | `[protected]`

Construct a new channel request object using the given bus.

Parameters:

  | bus | QDBusConnection to use.
  | objectPath | The channel request object path.
  | immutableProperties | The immutable properties of the channel request.

Returns:
  A ChannelRequestPtr pointing to the newly created ChannelRequest.

## Member Function Documentation

ChannelRequestPtr Tp::ChannelRequest::create | ( | const QString & | objectPath,
|  | const QVariantMap & | immutableProperties |
| ) |  |  | `[static]`

Create a new channel request object using QDBusConnection::sessionBus().

Parameters:

  | objectPath | The channel request object path.
  | immutableProperties | The immutable properties of the channel request.

Returns:
  A ChannelRequestPtr pointing to the newly created ChannelRequest.

ChannelRequestPtr Tp::ChannelRequest::create | ( | const QDBusConnection & | bus,
|  | const QString & | objectPath,
|  | const QVariantMap & | immutableProperties |
| ) |  |  | `[static]`

Create a new channel request object using the given bus.

Parameters:

  | bus | QDBusConnection to use.
  | objectPath | The channel request object path.
  | immutableProperties | The immutable properties of the channel request.

Returns:
  A ChannelRequestPtr pointing to the newly created ChannelRequest.

AccountPtr Tp::ChannelRequest::account | ( |  | ) | const

Return the Account on which this request was made.

This method requires ChannelRequest::FeatureCore to be enabled.

Returns:
  The account on which this request was made.

QDateTime Tp::ChannelRequest::userActionTime | ( |  | ) | const

Return the time at which the user action occurred, or 0 if this channel request is for some reason not involving user action.

Unix developers: this corresponds to the _NET_WM_USER_TIME property in EWMH.

This property is set when the channel request is created, and can never change.

This method requires ChannelRequest::FeatureCore to be enabled.

Returns:
  The time at which the user action occurred.

QString Tp::ChannelRequest::preferredHandler | ( |  | ) | const

Return either the well-known bus name (starting with org.freedesktop.Telepathy.Client.) of the preferred handler for this channel, or an empty string to indicate that any handler would be acceptable.

This property is set when the channel request is created, and can never change.

This method requires ChannelRequest::FeatureCore to be enabled.

Returns:
  The preferred handler or an empty string if any handler would be acceptable.

QualifiedPropertyValueMapList Tp::ChannelRequest::requests | ( |  | ) | const

Return the desirable properties for the channel or channels to be created.

This property is set when the channel request is created, and can never change.

This method requires ChannelRequest::FeatureCore to be enabled.

Returns:
  The preferred handler or an empty string if any handler would be acceptable.

PendingOperation * Tp::ChannelRequest::cancel | ( |  | ) |

Cancel the channel request.

If failed() is emitted in response to this method, the error will be TELEPATHY_ERROR_CANCELLED.

If the channel has already been dispatched to a handler, then it's too late to call this method, and the channel request will no longer exist.

Returns:
  A PendingOperation which will emit PendingOperation::finished when the call has finished.

Client::DBus::PropertiesInterface * Tp::ChannelRequest::propertiesInterface | ( |  | ) | const`[inline]`

Convenience function for getting a PropertiesInterface interface proxy object for this account. The ChannelRequest interface relies on properties, so this interface is always assumed to be present.

Returns:
  A pointer to the existing Client::DBus::PropertiesInterface object for this ChannelRequest object.

void Tp::ChannelRequest::failed | ( | const QString & | errorName,
|  | const QString & | errorMessage |
| ) |  |  | `[signal]`

This signal is emitted when the channel request has failed. No further methods must not be called on it.

Parameters:

  | errorName | The name of a D-Bus error.
  | errorMessage | The error message.

void Tp::ChannelRequest::succeeded | ( |  | ) | `[signal]`

This signals is emitted when the channel request has succeeded. No further methods must not be called on it.

Client::ChannelRequestInterface * Tp::ChannelRequest::baseInterface | ( |  | ) | const`[protected]`

Return the ChannelRequestInterface for this ChannelRequest class. This method is protected since the convenience methods provided by this class should always be used instead of the interface by users of the class.

Returns:
  A pointer to the existing ChannelRequestInterface for this ChannelRequest

## Member Data Documentation

const Feature Tp::ChannelRequest::FeatureCore `[static]`

Feature representing the core that needs to become ready to make the ChannelRequest object usable.

Note that this feature must be enabled in order to use most ChannelRequest methods.

When calling isReady(), becomeReady(), this feature is implicitly added to the requested features.