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

Public Member Functions
Tp::PendingChannel Class Reference
Channel proxies

The PendingChannel class represents the parameters of and the reply to an asynchronous channel request. More...

`#include <TelepathyQt/PendingChannel>`

Inherits Tp::PendingOperation.

List of all members.

## Public Member Functions

- ~PendingChannel ()
- ConnectionPtr connection () const
- bool yours () const
- const QString & channelType () const
- uint targetHandleType () const
- uint targetHandle () const
- QVariantMap immutableProperties () const
- ChannelPtr channel () const
- HandledChannelNotifier * handledChannelNotifier () const

## Detailed Description

The PendingChannel class represents the parameters of and the reply to an asynchronous channel request.

Instances of this class cannot be constructed directly; the only way to get one is trough Connection or Account.

See Asynchronous Object Model

## Constructor & Destructor Documentation

Tp::PendingChannel::~PendingChannel | ( |  | ) |

Class destructor.

## Member Function Documentation

ConnectionPtr Tp::PendingChannel::connection | ( |  | ) | const

Return the connection through which the channel request was made.

Note that if this channel request was created through Account, a null ConnectionPtr will be returned.

Returns:
  A pointer to the Connection object.

bool Tp::PendingChannel::yours | ( |  | ) | const

Return whether this channel belongs to this process.

If `false`, the caller must assume that some other process is handling this channel; if `true`, the caller should handle it themselves or delegate it to another client.

Returns:
  `true` if it belongs, `false` otherwise.

const QString & Tp::PendingChannel::channelType | ( |  | ) | const

Return the channel type specified in the channel request.

Returns:
  The D-Bus interface name for the type of the channel.

uint Tp::PendingChannel::targetHandleType | ( |  | ) | const

If the channel request has finished, return the handle type of the resulting channel. Otherwise, return the handle type that was requested.

(One example of a request producing a different target handle type is that on protocols like MSN, one-to-one conversations don't really exist, and if you request a text channel with handle type HandleTypeContact, what you will actually get is a text channel with handle type HandleTypeNone, with the requested contact as a member.)

Returns:
  The target handle type as HandleType.

See also:
  targetHandle()

uint Tp::PendingChannel::targetHandle | ( |  | ) | const

If the channel request has finished, return the target handle of the resulting channel. Otherwise, return the target handle that was requested (which might be different in some situations - see targetHandleType()).

Returns:
  An integer representing the target handle, which is of the type targetHandleType() indicates.

See also:
  targetHandleType()

QVariantMap Tp::PendingChannel::immutableProperties | ( |  | ) | const

If this channel request has finished, return the immutable properties of the resulting channel. Otherwise, return an empty map.

The keys and values in this map are defined by the Telepathy specification, or by third-party extensions to that specification. These are the properties that cannot change over the lifetime of the channel; they're announced in the result of the request, for efficiency. This map should be passed to the constructor of Channel or its subclasses (such as TextChannel).

These properties can also be used to process channels in a way that does not require the creation of a Channel object - for instance, a ChannelDispatcher implementation should be able to classify and process channels based on their immutable properties, without needing to create Channel objects.

Returns:
  The immutable properties as QVariantMap.

ChannelPtr Tp::PendingChannel::channel | ( |  | ) | const

Return the channel resulting from the channel request.

Returns:
  A pointer to the Channel object.

HandledChannelNotifier * Tp::PendingChannel::handledChannelNotifier | ( |  | ) | const

If this channel request has finished and was created through Account, return a HandledChannelNotifier object that will keep track of channel() being re-requested.

Returns:
  A HandledChannelNotifier instance, or 0 if an error occurred.