Telepathy::Client::Channel Class Reference
[Channel proxies]

#include <TelepathyQt4/Client/Channel>

Inheritance diagram for Telepathy::Client::Channel:

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

Collaboration graph
[legend]

List of all members.

Classes

class  GroupMemberChangeDetails

Public Types

enum  Feature { _Paddding = 0xFFFFFFFF }

Signals

void groupCanAddContactsChanged (bool canAddContacts)
void groupCanRemoveContactsChanged (bool canRemoveContacts)
void groupCanRescindContactsChanged (bool canRescindContacts)

Public Member Functions

 Channel (Connection *connection, const QString &objectPath, const QVariantMap &immutableProperties, QObject *parent=0)
 ~Channel ()
Connectionconnection () const
QString channelType () const
QStringList interfaces () const
uint targetHandleType () const
uint targetHandle () const
bool isRequested () const
QSharedPointer< ContactinitiatorContact () const
bool isReady (Features features=0) const
PendingReadyChannelbecomeReady (Features features=0)
PendingOperationrequestClose ()
ChannelInterfaceMessagesInterfacemessagesInterface (InterfaceSupportedChecking check=CheckInterfaceSupported) const

Friends

struct Private

Group interface

Cached access to state of the group interface on the associated remote object, if the interface is present. Almost all methods return undefined values if the list returned by interfaces() doesn't include TELEPATHY_INTERFACE_CHANNEL_INTERFACE_GROUP or if the object is not ready.

Some methods can be used when targetHandleType() == HandleTypeContact, such as groupFlags(), groupCanAddContacts(), groupCanRemoveContacts(), groupSelfContact() and groupContacts().

As the Group interface state can change freely during the lifetime of the group due to events like new contacts joining the group, the cached state is automatically kept in sync with the remote object's state by hooking to the change notification signals present in the D-Bus interface.

As the cached value changes, change notification signals are emitted.

There is a change notification signal <attribute>Changed corresponding to each cached attribute. The first parameter for each of these signals is the new value of the attribute, which is suited for displaying the value of the attribute in a widget in a model-view fashion. The remaining arguments depend on the attribute, but in general include at least the delta from the previous state of the attribute to the new state.

Check the individual signals' descriptions for details.

uint groupFlags () const
bool groupCanAddContacts () const
PendingOperationgroupAddContacts (const QList< QSharedPointer< Contact > > &contacts, const QString &message=QString())
bool groupCanRescindContacts () const
bool groupCanRemoveContacts () const
PendingOperationgroupRemoveContacts (const QList< QSharedPointer< Contact > > &contacts, const QString &message=QString(), uint reason=Telepathy::ChannelGroupChangeReasonNone)
Contacts groupContacts () const
Contacts groupLocalPendingContacts () const
Contacts groupRemotePendingContacts () const
GroupMemberChangeDetails groupLocalPendingContactChangeInfo (const QSharedPointer< Contact > &contact) const
GroupMemberChangeDetails groupSelfContactRemoveInfo () const
bool groupAreHandleOwnersAvailable () const
HandleOwnerMap groupHandleOwners () const
bool groupIsSelfContactTracked () const
QSharedPointer< ContactgroupSelfContact () const
void groupFlagsChanged (uint flags, uint added, uint removed)
void groupMembersChanged (const Telepathy::Client::Contacts &groupMembersAdded, const Telepathy::Client::Contacts &groupLocalPendingMembersAdded, const Telepathy::Client::Contacts &groupRemotePendingMembersAdded, const Telepathy::Client::Contacts &groupMembersRemoved, const Telepathy::Client::Channel::GroupMemberChangeDetails &details)
void groupHandleOwnersChanged (const Telepathy::HandleOwnerMap &owners, const Telepathy::UIntList &added, const Telepathy::UIntList &removed)
void groupSelfContactChanged ()

Optional interface proxy factory

Factory functions fabricating proxies for optional Channel interfaces and interfaces for specific channel types.

template<class Interface >
Interface * optionalInterface (InterfaceSupportedChecking check=CheckInterfaceSupported) const
ChannelInterfaceCallStateInterfacecallStateInterface (InterfaceSupportedChecking check=CheckInterfaceSupported) const
ChannelInterfaceChatStateInterfacechatStateInterface (InterfaceSupportedChecking check=CheckInterfaceSupported) const
ChannelInterfaceDTMFInterfaceDTMFInterface (InterfaceSupportedChecking check=CheckInterfaceSupported) const
ChannelInterfaceHoldInterfaceholdInterface (InterfaceSupportedChecking check=CheckInterfaceSupported) const
ChannelInterfaceMediaSignallingInterfacemediaSignallingInterface (InterfaceSupportedChecking check=CheckInterfaceSupported) const
ChannelInterfacePasswordInterfacepasswordInterface (InterfaceSupportedChecking check=CheckInterfaceSupported) const
DBus::PropertiesInterfacepropertiesInterface () const
template<class Interface >
Interface * typeInterface (InterfaceSupportedChecking check=CheckInterfaceSupported) const
ChannelTypeRoomListInterfaceroomListInterface (InterfaceSupportedChecking check=CheckInterfaceSupported) const
ChannelTypeStreamedMediaInterfacestreamedMediaInterface (InterfaceSupportedChecking check=CheckInterfaceSupported) const
ChannelTypeTextInterfacetextInterface (InterfaceSupportedChecking check=CheckInterfaceSupported) const
ChannelTypeTubesInterfacetubesInterface (InterfaceSupportedChecking check=CheckInterfaceSupported) const
ChannelInterfacebaseInterface () const
ChannelInterfaceGroupInterfacegroupInterface (InterfaceSupportedChecking check=CheckInterfaceSupported) const


Detailed Description

High-level proxy object for accessing remote Telepathy Channel objects.

It adds the following features compared to using ChannelInterface directly:

The remote object state accessor functions on this object (interfaces(), channelType(), targetHandleType(), targetHandle(), requested(), initiatorContact(), etc) don't make any DBus calls; instead, they return values cached from a previous introspection run. The introspection process populates their values in the most efficient way possible based on what the service implements. However, their value is not defined unless the object is ready, as returned by isReady(). becomeReady should be used to make sure channel is ready.

Additionally, the state of the Group interface on the remote object (if present) will be cached in the introspection process, and also tracked for any changes.

Each Channel is owned by a Connection. If the Connection becomes dead (as signaled by Connection::statusChanged(Disconnected)) or is deleted, the Channel object will transition to closed too.


Member Enumeration Documentation

Enumerator:
_Paddding 

Reimplemented in Telepathy::Client::TextChannel.


Constructor & Destructor Documentation

Telepathy::Client::Channel::Channel ( Connection connection,
const QString &  objectPath,
const QVariantMap &  immutableProperties,
QObject *  parent = 0 
)

Construct a new Channel object.

Parameters:
connection Connection owning this Channel, and specifying the service.
objectPath Path to the object on the service.
immutableProperties The immutable properties of the channel, as signalled by NewChannels or returned by CreateChannel or EnsureChannel
parent Object parent.

References Telepathy::Client::DBusProxy::isValid().

Telepathy::Client::Channel::~Channel (  ) 

Class destructor.


Member Function Documentation

ChannelInterface * Telepathy::Client::Channel::baseInterface (  )  const [protected]

Get the ChannelInterface for this Channel 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 ChannelInterface for this Channel

PendingReadyChannel * Telepathy::Client::Channel::becomeReady ( Features  requestedFeatures = 0  ) 

Return a pending operation which will succeed when this object finishes its initial setup, or will fail if a fatal error occurs during this initial setup.

Parameters:
requestedFeatures The features which should be enabled
Returns:
A PendingReadyChannel object which will emit finished when this object has finished or failed initial setup for basic functionality plus the given features

References isReady(), Telepathy::Client::DBusProxy::isValid(), Telepathy::Client::PendingOperation::setFinished(), Telepathy::Client::PendingOperation::setFinishedWithError(), TELEPATHY_ERROR_INVALID_ARGUMENT, and TELEPATHY_ERROR_NOT_AVAILABLE.

ChannelInterfaceCallStateInterface * Telepathy::Client::Channel::callStateInterface ( InterfaceSupportedChecking  check = CheckInterfaceSupported  )  const [inline]

Convenience function for getting a CallState interface proxy.

Parameters:
check Passed to optionalInterface()
Returns:
optionalInterface<ChannelInterfaceCallStateInterface>(check)

QString Telepathy::Client::Channel::channelType (  )  const

Return the type of this channel.

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

References isReady(), Telepathy::Client::DBusProxy::isValid(), and Telepathy::warning().

Referenced by typeInterface().

ChannelInterfaceChatStateInterface * Telepathy::Client::Channel::chatStateInterface ( InterfaceSupportedChecking  check = CheckInterfaceSupported  )  const [inline]

Convenience function for getting a ChatState interface proxy.

Parameters:
check Passed to optionalInterface()
Returns:
optionalInterface<ChannelInterfaceChatStateInterface>(check)

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

Return the owning Connection of the Channel.

Returns:
A pointer to the Connection object that owns this Channel.

ChannelInterfaceDTMFInterface * Telepathy::Client::Channel::DTMFInterface ( InterfaceSupportedChecking  check = CheckInterfaceSupported  )  const [inline]

Convenience function for getting a DTMF interface proxy.

Parameters:
check Passed to optionalInterface()
Returns:
optionalInterface<ChannelInterfaceDTMFInterface>(check)

PendingOperation * Telepathy::Client::Channel::groupAddContacts ( const QList< QSharedPointer< Contact > > &  contacts,
const QString &  message = QString() 
)

Add contacts to this channel.

Note that Contacts on local pending list can always be added even if groupCanAddContacts() returns false.

Parameters:
contacts Contacts to be added.
message A string message, which can be blank if desired.
Returns:
A PendingOperation which will emit PendingOperation::finished when the call has finished.
See also:
groupCanAddContacts()

References isReady(), TELEPATHY_ERROR_INVALID_ARGUMENT, TELEPATHY_ERROR_NOT_AVAILABLE, TELEPATHY_ERROR_NOT_IMPLEMENTED, TELEPATHY_INTERFACE_CHANNEL_INTERFACE_GROUP, and Telepathy::warning().

Referenced by Telepathy::Client::TextChannel::inviteContacts().

bool Telepathy::Client::Channel::groupAreHandleOwnersAvailable (  )  const

Return whether globally valid handles can be looked up using the channel-specific handle on this channel using this object.

Handle owner lookup is only available if:

If this function Return false, the return value of groupHandleOwners() is undefined and groupHandleOwnersChanged() will never be emitted.

The value returned by this function will stay fixed for the entire time the object is ready, so no change notification is provided.

Returns:
If handle owner lookup functionality is available.

References isReady(), TELEPATHY_INTERFACE_CHANNEL_INTERFACE_GROUP, and Telepathy::warning().

Referenced by groupHandleOwners().

bool Telepathy::Client::Channel::groupCanAddContacts (  )  const

Return if contacts can be added or invited to this channel.

Returns:
true if contacts can be added, false otherwise.
See also:
groupAddContacts()

References Telepathy::ChannelGroupFlagCanAdd, isReady(), and Telepathy::warning().

Referenced by Telepathy::Client::TextChannel::canInviteContacts().

void Telepathy::Client::Channel::groupCanAddContactsChanged ( bool  canAddContacts  )  [signal]

bool Telepathy::Client::Channel::groupCanRemoveContacts (  )  const

Return if contacts in groupContacts() can be removed from this channel.

Note that contacts in local pending lists can always be removed from the channel.

Returns:
true if contacts can be removed, false otherwise.
See also:
groupRemoveContacts()

References Telepathy::ChannelGroupFlagCanRemove, isReady(), and Telepathy::warning().

void Telepathy::Client::Channel::groupCanRemoveContactsChanged ( bool  canRemoveContacts  )  [signal]

bool Telepathy::Client::Channel::groupCanRescindContacts (  )  const

Return if contacts in groupRemotePendingContacts() can be removed from this channel.

Returns:
true if contacts can be removed, false otherwise.
See also:
groupRemoveContacts()

References Telepathy::ChannelGroupFlagCanRescind, isReady(), and Telepathy::warning().

void Telepathy::Client::Channel::groupCanRescindContactsChanged ( bool  canRescindContacts  )  [signal]

Contacts Telepathy::Client::Channel::groupContacts (  )  const

Return the current contacts of the group.

Returns:
List of contact objects.

References isReady(), and Telepathy::warning().

uint Telepathy::Client::Channel::groupFlags (  )  const

Return a set of flags indicating the capabilities and behaviour of the group represented by the remote object.

Change notification is via groupFlagsChanged().

Returns:
Bitfield combination of flags, as defined in ChannelGroupFlag

References isReady(), and Telepathy::warning().

void Telepathy::Client::Channel::groupFlagsChanged ( uint  flags,
uint  added,
uint  removed 
) [signal]

Emitted when the value returned by groupFlags() changes.

Parameters:
flags The value which would now be returned by groupFlags().
added Flags added compared to the previous value.
removed Flags removed compared to the previous value.

HandleOwnerMap Telepathy::Client::Channel::groupHandleOwners (  )  const

Return a mapping of handles specific to this channel to globally valid handles.

The mapping includes at least all of the channel-specific handles in this channel's members, local-pending and remote-pending sets as keys. Any handle not in the keys of this mapping is not channel-specific in this channel. Handles which are channel-specific, but for which the owner is unknown, appear in this mapping with 0 as owner.

Returns:
A mapping from group-specific handles to globally valid handles.

References groupAreHandleOwnersAvailable(), isReady(), TELEPATHY_INTERFACE_CHANNEL_INTERFACE_GROUP, and Telepathy::warning().

void Telepathy::Client::Channel::groupHandleOwnersChanged ( const Telepathy::HandleOwnerMap owners,
const Telepathy::UIntList added,
const Telepathy::UIntList removed 
) [signal]

Emitted when the value returned by groupHandleOwners() changes.

Parameters:
owners The value which would now be returned by groupHandleOwners().
added Handles which have been added to the mapping as keys, or existing handle keys for which the mapped-to value has changed.
removed Handles which have been removed from the mapping.

ChannelInterfaceGroupInterface * Telepathy::Client::Channel::groupInterface ( InterfaceSupportedChecking  check = CheckInterfaceSupported  )  const [inline, protected]

Convenience function for getting a Group interface proxy.

Parameters:
check Passed to optionalInterface()
Returns:
optionalInterface<ChannelInterfaceGroupInterface>(check)

bool Telepathy::Client::Channel::groupIsSelfContactTracked (  )  const

Return whether the value returned by groupSelfContact() is guaranteed to stay synchronized with what groupInterface()->GetSelfHandle() would return. Older services not providing group properties don't necessarily emit the SelfHandleChanged signal either, so self contact changes can't be reliably tracked.

Returns:
Whether or not changes to the self contact are tracked.

References isReady(), TELEPATHY_INTERFACE_CHANNEL_INTERFACE_GROUP, and Telepathy::warning().

Channel::GroupMemberChangeDetails Telepathy::Client::Channel::groupLocalPendingContactChangeInfo ( const QSharedPointer< Contact > &  contact  )  const

Return information of a local pending contact change. If no information is available, an object for which GroupMemberChangeDetails::isValid() returns false is returned.

Parameters:
contact A Contact object that is on the local pending contacts list.
Returns:
The change info in a GroupMemberChangeDetails object.

References isReady(), TELEPATHY_INTERFACE_CHANNEL_INTERFACE_GROUP, and Telepathy::warning().

Contacts Telepathy::Client::Channel::groupLocalPendingContacts (  )  const

Return the contacts currently waiting for local approval to join the group.

Returns:
List of contacts.

References isReady(), TELEPATHY_INTERFACE_CHANNEL_INTERFACE_GROUP, and Telepathy::warning().

void Telepathy::Client::Channel::groupMembersChanged ( const Telepathy::Client::Contacts groupMembersAdded,
const Telepathy::Client::Contacts groupLocalPendingMembersAdded,
const Telepathy::Client::Contacts groupRemotePendingMembersAdded,
const Telepathy::Client::Contacts groupMembersRemoved,
const Telepathy::Client::Channel::GroupMemberChangeDetails details 
) [signal]

Emitted when the value returned by groupContacts(), groupLocalPendingContacts() or groupRemotePendingContacts() changes.

Parameters:
groupMembersAdded The contacts that were added to this channel.
groupLocalPendingMembersAdded The local pending contacts that were added to this channel.
groupRemotePendingMembersAdded The remote pending contacts that were added to this channel.
groupMembersRemoved The contacts removed from this channel.
details Additional details such as the contact requesting or causing the change.

Contacts Telepathy::Client::Channel::groupRemotePendingContacts (  )  const

Return the contacts currently waiting for remote approval to join the group.

Returns:
List of contacts.

References isReady(), TELEPATHY_INTERFACE_CHANNEL_INTERFACE_GROUP, and Telepathy::warning().

PendingOperation * Telepathy::Client::Channel::groupRemoveContacts ( const QList< QSharedPointer< Contact > > &  contacts,
const QString &  message = QString(),
uint  reason = Telepathy::ChannelGroupChangeReasonNone 
)

Remove contacts from this channel.

Parameters:
contacts Contacts to be removed.
message A string message, which can be blank if desired.
reason Reason of the change, as specified in ChannelGroupChangeReason
Returns:
A PendingOperation which will emit PendingOperation::finished when the call has finished.
See also:
groupCanRemoveContacts()

References isReady(), TELEPATHY_ERROR_INVALID_ARGUMENT, TELEPATHY_ERROR_NOT_AVAILABLE, TELEPATHY_ERROR_NOT_IMPLEMENTED, TELEPATHY_INTERFACE_CHANNEL_INTERFACE_GROUP, and Telepathy::warning().

QSharedPointer< Contact > Telepathy::Client::Channel::groupSelfContact (  )  const

Return a Contact object representing the user in the group if the user is a member of the group, otherwise either a Contact object representing the user or 0.

Returns:
A contact handle representing the user, if possible.

References isReady(), and Telepathy::warning().

void Telepathy::Client::Channel::groupSelfContactChanged (  )  [signal]

Emitted when the value returned by groupSelfContact() changes.

Channel::GroupMemberChangeDetails Telepathy::Client::Channel::groupSelfContactRemoveInfo (  )  const

Return information on the removal of the local user from the group. If the user hasn't been removed from the group, an object for which GroupMemberChangeDetails::isValid() Return false is returned.

This method should be called only after the channel has been closed. This is useful for getting the remove information after missing the corresponding groupMembersChanged() signal, as the local user being removed usually causes the remote Channel to be closed.

The returned information is not guaranteed to be correct if groupIsSelfHandleTracked() Return false and a self handle change has occurred on the remote object.

Returns:
The remove info in a GroupMemberChangeDetails object.

References isReady(), TELEPATHY_INTERFACE_CHANNEL_INTERFACE_GROUP, and Telepathy::warning().

ChannelInterfaceHoldInterface * Telepathy::Client::Channel::holdInterface ( InterfaceSupportedChecking  check = CheckInterfaceSupported  )  const [inline]

Convenience function for getting a Hold interface proxy.

Parameters:
check Passed to optionalInterface()
Returns:
optionalInterface<ChannelInterfaceHoldInterface>(check)

QSharedPointer< Contact > Telepathy::Client::Channel::initiatorContact (  )  const

Return the contact who initiated the channel.

Note that the value is undefined until the channel is ready.

Returns:
A Contact object representing the contact who initiated the channel, or QSharedPointer that points to null(0) if it can't be retrieved.

References isReady(), and Telepathy::warning().

QStringList Telepathy::Client::Channel::interfaces (  )  const

Return a list of optional interfaces implemented by the remote object.

Returns:
D-Bus names of the implemented optional interfaces.

References isReady(), Telepathy::Client::DBusProxy::isValid(), and Telepathy::warning().

Referenced by Telepathy::Client::TextChannel::hasMessagesInterface(), and optionalInterface().

bool Telepathy::Client::Channel::isReady ( Features  features = 0  )  const

Return whether this object has finished its initial setup.

This is mostly useful as a sanity check, in code that shouldn't be run until the object is ready. To wait for the object to be ready, call becomeReady() and connect to the finished signal on the result.

Parameters:
features The features which should be tested
Returns:
true if the object has finished its initial setup for basic functionality plus the given features

Referenced by becomeReady(), channelType(), groupAddContacts(), groupAreHandleOwnersAvailable(), groupCanAddContacts(), groupCanRemoveContacts(), groupCanRescindContacts(), groupContacts(), groupFlags(), groupHandleOwners(), groupIsSelfContactTracked(), groupLocalPendingContactChangeInfo(), groupLocalPendingContacts(), groupRemotePendingContacts(), groupRemoveContacts(), groupSelfContact(), groupSelfContactRemoveInfo(), initiatorContact(), interfaces(), isRequested(), targetHandle(), and targetHandleType().

bool Telepathy::Client::Channel::isRequested (  )  const

Return whether this channel was created in response to a local request.

Note that the value is undefined until the channel is ready.

Returns:
true if this channel was created in response to a local request, false otherwise.

References isReady(), and Telepathy::warning().

ChannelInterfaceMediaSignallingInterface * Telepathy::Client::Channel::mediaSignallingInterface ( InterfaceSupportedChecking  check = CheckInterfaceSupported  )  const [inline]

Convenience function for getting a MediaSignalling interface proxy.

Parameters:
check Passed to optionalInterface()
Returns:
optionalInterface<ChannelInterfaceMediaSignallingInterface>(check)

ChannelInterfaceMessagesInterface* Telepathy::Client::Channel::messagesInterface ( InterfaceSupportedChecking  check = CheckInterfaceSupported  )  const [inline]

template<class Interface >
template< class Interface > Interface * Telepathy::Client::Channel::optionalInterface ( InterfaceSupportedChecking  check = CheckInterfaceSupported  )  const [inline]

Return a pointer to a valid instance of a given Channel optional interface class, associated with the same remote object the Channel is associated with, and destroyed together with the Channel.

If the list returned by interfaces() doesn't contain the name of the interface requested 0 is returned. This check can be bypassed by specifying BypassInterfaceCheck for check, in which case a valid instance is always returned.

If the object is not ready, the list returned by interfaces() isn't guaranteed to yet represent the full set of interfaces supported by the remote object. Hence the check might fail even if the remote object actually supports the requested interface; using BypassInterfaceCheck is suggested when the channel is not fully ready.

See also:
OptionalInterfaceFactory::interface
Template Parameters:
Interface Class of the optional interface to get.
Parameters:
check Should an instance be returned even if it can't be determined that the remote object supports the requested interface.
Returns:
Pointer to an instance of the interface class, or 0.

References Telepathy::Client::DBusProxy::CheckInterfaceSupported, and interfaces().

ChannelInterfacePasswordInterface * Telepathy::Client::Channel::passwordInterface ( InterfaceSupportedChecking  check = CheckInterfaceSupported  )  const [inline]

Convenience function for getting a Password interface proxy.

Parameters:
check Passed to optionalInterface()
Returns:
optionalInterface<ChannelInterfacePasswordInterface>(check)

DBus::PropertiesInterface * Telepathy::Client::Channel::propertiesInterface (  )  const [inline]

Convenience function for getting a Properties interface proxy. The Properties interface is not necessarily reported by the services, so a check parameter is not provided, and the interface is always assumed to be present.

Returns:
optionalInterface<DBus::PropertiesInterface>(BypassInterfaceCheck)

References Telepathy::Client::DBusProxy::BypassInterfaceCheck.

PendingOperation * Telepathy::Client::Channel::requestClose (  ) 

Start an asynchronous request that the channel be closed. The returned PendingOperation object will signal the success or failure of this request; under normal circumstances, it can be expected to succeed.

Returns:
A PendingOperation, which will emit finished when the request finishes.

References Telepathy::Client::DBusProxy::isValid().

ChannelTypeRoomListInterface * Telepathy::Client::Channel::roomListInterface ( InterfaceSupportedChecking  check = CheckInterfaceSupported  )  const [inline]

Convenience function for getting a TypeRoomList interface proxy.

Parameters:
check Passed to typeInterface()
Returns:
typeInterface<ChannelTypeRoomListInterface>(check)

ChannelTypeStreamedMediaInterface * Telepathy::Client::Channel::streamedMediaInterface ( InterfaceSupportedChecking  check = CheckInterfaceSupported  )  const [inline]

Convenience function for getting a TypeStreamedMedia interface proxy.

Parameters:
check Passed to typeInterface()
Returns:
typeInterface<ChannelTypeStreamedMediaInterface>(check)

uint Telepathy::Client::Channel::targetHandle (  )  const

Return the handle of the remote party with which this channel communicates.

Returns:
The handle, which is of the type targetHandleType() indicates.

References isReady(), and Telepathy::warning().

uint Telepathy::Client::Channel::targetHandleType (  )  const

Return the type of the handle returned by targetHandle().

Returns:
The type of the handle, as specified in HandleType.

References isReady(), and Telepathy::warning().

ChannelTypeTextInterface * Telepathy::Client::Channel::textInterface ( InterfaceSupportedChecking  check = CheckInterfaceSupported  )  const [inline]

Convenience function for getting a TypeText interface proxy.

Parameters:
check Passed to typeInterface()
Returns:
typeInterface<ChannelTypeTextInterface>(check)

Referenced by Telepathy::Client::TextChannel::acknowledge(), and Telepathy::Client::TextChannel::send().

ChannelTypeTubesInterface * Telepathy::Client::Channel::tubesInterface ( InterfaceSupportedChecking  check = CheckInterfaceSupported  )  const [inline]

Convenience function for getting a TypeTubes interface proxy.

Parameters:
check Passed to typeInterface()
Returns:
typeInterface<ChannelTypeTubesInterface>(check)

template<class Interface >
template< class Interface > Interface * Telepathy::Client::Channel::typeInterface ( InterfaceSupportedChecking  check = CheckInterfaceSupported  )  const [inline]

Return a pointer to a valid instance of a given Channel type interface class, associated with the same remote object the Channel is associated with, and destroyed together with the Channel.

If the interface name returned by channelType() isn't equivalent to the name of the requested interface, or the Channel is not ready, 0 is returned. This check can be bypassed by specifying BypassInterfaceCheck for check, in which case a valid instance is always returned.

Convenience functions are provided for well-known channel types. However, there is no convenience getter for TypeContactList because the proxy for that interface doesn't actually have any functionality.

See also:
OptionalInterfaceFactory::interface
Template Parameters:
Interface Class of the optional interface to get.
Parameters:
check Should an instance be returned even if it can't be determined that the remote object is of the requested channel type.
Returns:
Pointer to an instance of the interface class, or 0.

References channelType(), and Telepathy::Client::DBusProxy::CheckInterfaceSupported.


Friends And Related Function Documentation

friend struct Private [friend]


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