Home · All Classes · All Namespaces · Modules · Functions · Files
Signals | Public Member Functions | Static Public Member Functions | Static Public Attributes | Protected Member Functions

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

Public Member Functions

Static Public Member Functions

Static Public Attributes

Protected Member Functions


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.

Deprecated:
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.
Tp::ChannelRequest::ChannelRequest ( const QDBusConnection &  bus,
const QString &  objectPath,
const QVariantMap &  immutableProperties,
const AccountFactoryConstPtr accountFactory,
const ConnectionFactoryConstPtr connectionFactory,
const ChannelFactoryConstPtr channelFactory,
const ContactFactoryConstPtr contactFactory 
) [protected]

Construct a new channel request object using the given bus and the given factories.

Parameters:
bus QDBusConnection to use.
objectPath The channel request object path.
accountFactory The account factory to use.
connectionFactory The connection factory to use.
channelFactory The channel factory to use.
contactFactory The contact factory to use.
immutableProperties The immutable properties of the channel request.
Returns:
A ChannelRequestPtr pointing to the newly created ChannelRequest.
Tp::ChannelRequest::ChannelRequest ( const AccountPtr account,
const QString &  objectPath,
const QVariantMap &  immutableProperties 
) [protected]

Construct a new channel request object using the given account.

The constructed instance will use the factories from the account.

Parameters:
account Account 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().

Deprecated:
Use other create() methods instead.
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.

Deprecated:
Use other create() methods instead.
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.
ChannelRequestPtr Tp::ChannelRequest::create ( const QDBusConnection &  bus,
const QString &  objectPath,
const QVariantMap &  immutableProperties,
const AccountFactoryConstPtr accountFactory,
const ConnectionFactoryConstPtr connectionFactory,
const ChannelFactoryConstPtr channelFactory,
const ContactFactoryConstPtr contactFactory 
) [static]

Create a new channel request object using the given bus and the given factories.

Parameters:
objectPath The channel request object path.
immutableProperties The immutable properties of the channel request.
accountFactory The account factory to use.
connectionFactory The connection factory to use.
channelFactory The channel factory to use.
contactFactory The contact factory to use.
Returns:
A ChannelRequestPtr pointing to the newly created ChannelRequest.
ChannelRequestPtr Tp::ChannelRequest::create ( const AccountPtr account,
const QString &  objectPath,
const QVariantMap &  immutableProperties 
) [static]

Create a new channel request object for the given account.

The returned instance will use factories from the account.

Parameters:
account The account that the request was made through.
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 can be used even before the ChannelRequest is ready, in which case the account object corresponding to the immutable properties is returned. In this case, the Account object is not necessarily ready either. This is useful for eg. matching ChannelRequests from ClientHandlerInterface::addRequest() with existing accounts in the application: either by object path, or if account factories are in use, even by object identity.

If the account is not provided in the immutable properties, this will only return a non-NULL AccountPtr once ChannelRequest::FeatureCore is ready on this object.

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 can be used even before the ChannelRequest is ready: in this case, the user action time from the immutable properties, if any, is returned.

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 can be used even before the ChannelRequest is ready: in this case, the preferred handler from the immutable properties, if any, is returned.

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, as specified when placing the request in the first place.

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

This method can be used even before the ChannelRequest is ready: in this case, the requested channel properties from the immutable properties, if any, are returned. This is useful for e.g. matching ChannelRequests from ClientHandlerInterface::addRequest() with existing requests in the application (by the target ID or handle, most likely).

Returns:
The requested desirable channel properties.
QVariantMap Tp::ChannelRequest::immutableProperties (  )  const

Return all of the immutable properties passed to this object when created.

This is useful for e.g. getting to domain-specific properties of channel requests.

Returns:
The immutable properties.
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

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.


Copyright © 2008-2010 Collabora Ltd. and Nokia Corporation
Telepathy-Qt4 0.4.4