#include <TelepathyQt4/Client/PendingChannel>
Public Member Functions | |
~PendingChannel () | |
Connection * | connection () const |
bool | yours () const |
const QString & | channelType () const |
uint | handleType () const |
uint | handle () const |
QVariantMap | immutableProperties () const |
QSharedPointer< Channel > | channel () const |
Friends | |
class | Connection |
struct | Private |
Telepathy::Client::PendingChannel::~PendingChannel | ( | ) |
Class destructor.
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.
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.
Referenced by channel().
Connection * Telepathy::Client::PendingChannel::connection | ( | ) | const |
Return the Connection object through which the channel request was made.
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).
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.)
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.
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.
References Telepathy::Client::PendingOperation::isFinished(), Telepathy::Client::PendingOperation::isValid(), and Telepathy::warning().
friend class Connection [friend] |
friend struct Private [friend] |