Telepathy::Client::PendingChannel Class Reference
[Connection proxies]

#include <TelepathyQt4/Client/PendingChannel>

Inheritance diagram for Telepathy::Client::PendingChannel:

Inheritance graph
[legend]
Collaboration diagram for Telepathy::Client::PendingChannel:

Collaboration graph
[legend]

List of all members.

Public Member Functions

 ~PendingChannel ()
Connectionconnection () const
bool yours () const
const QString & channelType () const
uint handleType () const
uint handle () const
QVariantMap immutableProperties () const
QSharedPointer< Channelchannel () const

Friends

class Connection
struct Private


Detailed Description

Class containing 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.

Constructor & Destructor Documentation

Telepathy::Client::PendingChannel::~PendingChannel (  ) 

Class destructor.


Member Function Documentation

QSharedPointer< Channel > Telepathy::Client::PendingChannel::channel (  )  const

Returns a shared pointer to a Channel high-level proxy object associated with the remote channel resulting from the channel request. If isValid() returns false, the request has not (at least yet) completed successfully, and a null QSharedPointer will be returned.

Returns:
Shared pointer to the new Channel object, 0 if an error occurred.

References channelType(), connection(), Telepathy::Client::PendingOperation::isFinished(), Telepathy::Client::PendingOperation::isValid(), TELEPATHY_INTERFACE_CHANNEL_TYPE_ROOM_LIST, TELEPATHY_INTERFACE_CHANNEL_TYPE_STREAMED_MEDIA, TELEPATHY_INTERFACE_CHANNEL_TYPE_TEXT, and Telepathy::warning().

const QString & Telepathy::Client::PendingChannel::channelType (  )  const

Return the channel type specified in the channel request.

Returns:
The D-Bus interface name of the interface specific to the requested channel type.

Referenced by channel().

Connection * Telepathy::Client::PendingChannel::connection (  )  const

Return the Connection object through which the channel request was made.

Returns:
Pointer to the Connection.

Referenced by channel().

uint Telepathy::Client::PendingChannel::handle (  )  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 handleType).

Returns:
The handle.

uint Telepathy::Client::PendingChannel::handleType (  )  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 handle type, as specified in HandleType.

QVariantMap Telepathy::Client::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 D-Bus API 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:
A map in which the keys are D-Bus property names and the values are the corresponding values.

bool Telepathy::Client::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.

Note that the value is undefined until the operation finishes.

Returns:
Boolean indicating whether this channel belongs to this process.

References Telepathy::Client::PendingOperation::isFinished(), Telepathy::Client::PendingOperation::isValid(), and Telepathy::warning().


Friends And Related Function Documentation

friend class Connection [friend]

friend struct Private [friend]


Generated on Thu Mar 5 18:52:09 2009 for TelepathyQt4-0.1.1 by  doxygen 1.5.8