[Telepathy-commits] [telepathy-qt4/master] Channel: Moved docs to source file as is.
Andre Moreira Magalhaes (andrunko)
andre.magalhaes at collabora.co.uk
Tue Jan 27 12:55:52 PST 2009
---
TelepathyQt4/Client/channel.cpp | 615 +++++++++++++++++++++++++++++++++++++++
TelepathyQt4/Client/channel.h | 548 +----------------------------------
2 files changed, 617 insertions(+), 546 deletions(-)
diff --git a/TelepathyQt4/Client/channel.cpp b/TelepathyQt4/Client/channel.cpp
index 0c51947..567071b 100644
--- a/TelepathyQt4/Client/channel.cpp
+++ b/TelepathyQt4/Client/channel.cpp
@@ -31,6 +31,25 @@
#include <QQueue>
+/**
+ * \addtogroup clientsideproxies Client-side proxies
+ *
+ * Proxy objects representing remote service objects accessed via D-Bus.
+ *
+ * In addition to providing direct access to methods, signals and properties
+ * exported by the remote objects, some of these proxies offer features like
+ * automatic inspection of remote object capabilities, property tracking,
+ * backwards compatibility helpers for older services and other utilities.
+ */
+
+/**
+ * \defgroup clientchannel Channel proxies
+ * \ingroup clientsideproxies
+ *
+ * Proxy objects representing remote Telepathy Channels and their optional
+ * interfaces.
+ */
+
namespace Telepathy
{
namespace Client
@@ -399,6 +418,71 @@ struct Channel::Private
}
};
+/**
+ * \class Channel
+ * \ingroup clientchannel
+ * \headerfile TelepathyQt4/Client/channel.h <TelepathyQt4/Client/Channel>
+ *
+ * High-level proxy object for accessing remote %Telepathy %Channel objects.
+ *
+ * It adds the following features compared to using ChannelInterface directly:
+ * <ul>
+ * <li>Life cycle tracking</li>
+ * <li>Getting the channel type, handle type, handle and interfaces automatically</li>
+ * <li>Shared optional interface proxy instances</li>
+ * </ul>
+ *
+ * The remote object state accessor functions on this object (interfaces(),
+ * channelType(), targetHandleType(), targetHandle()) 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 has readiness #ReadinessFull, as returned by
+ * readiness() and indicated by emissions of the readinessChanged() signal.
+ *
+ * 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::readinessChanged) or is deleted, the Channel object
+ * will transition to ReadinessDead too.
+ */
+
+/**
+ * \enum Channel::Readiness
+ *
+ * Describes readiness of the Channel for usage. The readiness depends on
+ * the state of the remote object. In suitable states, an asynchronous
+ * introspection process is started, and the Channel becomes more ready when
+ * that process is completed.
+ *
+ * \value ReadinessJustCreated The object has just been created and introspection is still in
+ * progress. No functionality dependent on introspection is available.
+ * The readiness can change to any other state except ReadinessClosed
+ * depending on the result of the initial state query to the remote
+ * object.
+ *
+ * \value ReadinessFull The remote object is alive and all introspection has been completed.
+ * Most functionality is available.
+ * The readiness can change to ReadinessDead or ReadinessClosed.
+ * \value ReadinessDead The remote object has gone into a state where it can no longer be
+ * used in an unexpected way. No functionality is available.
+ * No further readiness changes are possible.
+ * \value ReadinessClosed The remote object has been closed and so can no longer be used.
+ * No functionality is available.
+ * No further readiness changes are possible.
+ */
+
+/**
+ * Creates a Channel associated with the given object on the same service as
+ * the given connection.
+ *
+ * \param connection Connection owning this Channel, and specifying the
+ * service.
+ * \param objectPath Path to the object on the service.
+ * \param parent Passed to the parent class constructor.
+ */
Channel::Channel(Connection* connection,
const QString& objectPath,
QObject* parent)
@@ -415,21 +499,39 @@ Channel::Channel(Connection* connection,
mPriv->continueIntrospection();
}
+/**
+ * Class destructor.
+ */
Channel::~Channel()
{
delete mPriv;
}
+/**
+ * Returns the owning Connection of the Channel.
+ *
+ * \return Pointer to the Connection.
+ */
Connection* Channel::connection() const
{
return mPriv->connection;
}
+/**
+ * Returns the current readiness of the Channel.
+ *
+ * \return The readiness, as defined in #Readiness.
+ */
Channel::Readiness Channel::readiness() const
{
return mPriv->readiness;
}
+/**
+ * Returns a list of optional interfaces implemented by the remote object.
+ *
+ * \return D-Bus names of the implemented optional interfaces.
+ */
QStringList Channel::interfaces() const
{
// Different check than the others, because the optional interface getters
@@ -445,6 +547,11 @@ QStringList Channel::interfaces() const
return mPriv->interfaces;
}
+/**
+ * Returns the type of this channel.
+ *
+ * \return D-Bus interface name for the type of the channel.
+ */
QString Channel::channelType() const
{
// Similarly, we don't want warnings triggered when using the type interface
@@ -461,6 +568,11 @@ QString Channel::channelType() const
return mPriv->channelType;
}
+/**
+ * Returns the type of the handle returned by #targetHandle().
+ *
+ * \return The type of the handle, as specified in #HandleType.
+ */
uint Channel::targetHandleType() const
{
if (mPriv->readiness != ReadinessFull)
@@ -469,6 +581,12 @@ uint Channel::targetHandleType() const
return mPriv->targetHandleType;
}
+/**
+ * Returns the handle of the remote party with which this channel
+ * communicates.
+ *
+ * \return The handle, which is of the type #targetHandleType() indicates.
+ */
uint Channel::targetHandle() const
{
if (mPriv->readiness != ReadinessFull)
@@ -477,6 +595,27 @@ uint Channel::targetHandle() const
return mPriv->targetHandle;
}
+/**
+ * Close the channel.
+ *
+ * When this method is used as a slot, it is fire-and-forget. If you want
+ * to know if an error occurs when closing the channel, then you should
+ * use the returned object.
+ *
+ * A channel can be closed if its Readiness is ReadinessJustCreated or
+ * ReadinessFull. It cannot be closed if its Readiness is ReadinessDead or
+ * ReadinessClosed. If this method is called on a channel which is already
+ * in either the ReadinessDead or ReadinessClosed state, a DBus error of type
+ * TELEPATHY_ERROR_NOT_AVAILABLE will be returned.
+ *
+ * If the introspection of a channel is not complete (ReadinessJustCreated)
+ * when close() is called, the channel readiness will change to ReadinessDead
+ * instead of ReadinessClosed, which results if the channel is closed after
+ * the introspection is complete (ReadinessFull).
+ *
+ * \return QDBusPendingReply object for the call to Close() on the Channel
+ * interface.
+ */
QDBusPendingReply<> Channel::close()
{
// Closing a channel does not make sense if it is already dead or closed.
@@ -491,6 +630,54 @@ QDBusPendingReply<> Channel::close()
TELEPATHY_ERROR_NOT_AVAILABLE, "Attempted to close an already dead or closed channel"));
}
+/**
+ * \fn void readinessChanged(uint newReadiness)
+ *
+ * Emitted whenever the readiness of the Channel changes. When the channel
+ * is closed, this signal will be emitted with readiness #ReadinessClosed.
+ *
+ * \param newReadiness The new readiness, as defined in #Readiness.
+ */
+
+/**
+ * \name Group interface
+ *
+ * Cached access to state of the group interface on the associated remote
+ * object, if the interface is present. All methods return undefined values
+ * if the list returned by interfaces() doesn't include
+ * #TELEPATHY_INTERFACE_CHANNEL_INTERFACE_GROUP or if the object doesn't have
+ * readiness #ReadinessFull.
+ *
+ * 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.
+ * However, the value being initially discovered by introspection is still
+ * signaled by a readiness change to #ReadinessFull.
+ *
+ * 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.
+ */
+
+//@{
+
+/**
+ * Returns a set of flags indicating the capabilities and behaviour of the
+ * group represented by the remote object.
+ *
+ * Change notification is via groupFlagsChanged().
+ *
+ * \return Bitfield combination of flags, as defined in #ChannelGroupFlag.
+ */
uint Channel::groupFlags() const
{
if (mPriv->readiness != ReadinessFull)
@@ -501,6 +688,11 @@ uint Channel::groupFlags() const
return mPriv->groupFlags;
}
+/**
+ * Returns the current members of the group.
+ *
+ * \return Set of handles representing the members.
+ */
QSet<uint> Channel::groupMembers() const
{
if (mPriv->readiness != ReadinessFull)
@@ -511,6 +703,25 @@ QSet<uint> Channel::groupMembers() const
return mPriv->groupMembers;
}
+/**
+ * Returns the contacts currently waiting for local approval to join the
+ * group.
+ *
+ * The returned value is a mapping from contact handles to
+ * GroupMemberChangeInfo objects. The key specifies a contact, with the
+ * value potentially including extendend information on the original request
+ * leading to the contact appearing in the local pending members.
+ *
+ * A info object as a value in the mapping, for which
+ * GroupMemberChangeInfo::isValid() returns <code>false</code> indicates a
+ * member for which no extended information has been received from the
+ * service. This will only happen for old services, for which neither the
+ * LocalPending property nor the GetLocalPendingMembersWithInfo method is
+ * usable.
+ *
+ * \returns A mapping from handles to info for the members waiting for local
+ * approval.
+ */
Channel::GroupMemberChangeInfoMap Channel::groupLocalPending() const
{
if (mPriv->readiness != ReadinessFull)
@@ -521,6 +732,12 @@ Channel::GroupMemberChangeInfoMap Channel::groupLocalPending() const
return mPriv->groupLocalPending;
}
+/**
+ * Returns the contacts currently waiting for remote approval to join the
+ * group.
+ *
+ * \returns Set of handles representing the contacts.
+ */
QSet<uint> Channel::groupRemotePending() const
{
if (mPriv->readiness != ReadinessFull)
@@ -531,6 +748,29 @@ QSet<uint> Channel::groupRemotePending() const
return mPriv->groupRemotePending;
}
+/**
+ * Returns 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:
+ * <ul>
+ * <li>The object has readiness #ReadinessFull
+ * <li>The list returned by interfaces() contains
+ * #TELEPATHY_INTERFACE_CHANNEL_INTERFACE_GROUP</li>
+ * <li>The set of flags returned by groupFlags() contains
+ * GroupFlagProperties and GroupFlagChannelSpecificHandles</li>
+ * </ul>
+ *
+ * If this function returns <code>false</code>, 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 spends having readiness #ReadinessFull, so no change
+ * notification is provided.
+ *
+ * \return If handle owner lookup functionality is available.
+ */
bool Channel::groupAreHandleOwnersAvailable() const
{
if (mPriv->readiness != ReadinessFull)
@@ -541,6 +781,18 @@ bool Channel::groupAreHandleOwnersAvailable() const
return mPriv->groupAreHandleOwnersAvailable;
}
+/**
+ * Returns 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.
+ *
+ * \return A mapping from group-specific handles to globally valid handles.
+ */
HandleOwnerMap Channel::groupHandleOwners() const
{
if (mPriv->readiness != ReadinessFull)
@@ -553,6 +805,15 @@ HandleOwnerMap Channel::groupHandleOwners() const
return mPriv->groupHandleOwners;
}
+/**
+ * Returns whether the value returned by groupSelfHandle() 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 handle changes can't be
+ * reliably tracked.
+ *
+ * \return Whether or not changes to the self handle are tracked.
+ */
bool Channel::groupIsSelfHandleTracked() const
{
if (mPriv->readiness != ReadinessFull)
@@ -563,6 +824,13 @@ bool Channel::groupIsSelfHandleTracked() const
return mPriv->groupIsSelfHandleTracked;
}
+/**
+ * Returns a handle representing the user in the group if the user is a
+ * member of the group, otherwise either a handle representing the user or
+ * 0.
+ *
+ * \return A contact handle representing the user, if possible.
+ */
uint Channel::groupSelfHandle() const
{
if (mPriv->readiness != ReadinessFull)
@@ -573,6 +841,25 @@ uint Channel::groupSelfHandle() const
return mPriv->groupSelfHandle;
}
+/**
+ * Returns 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
+ * GroupMemberChangeInfo::isValid() returns <code>false</code> is returned.
+ *
+ * This method only after the channel has gone into readiness
+ * #ReadinessClosed. This is useful for getting the
+ * remove information after missing the corresponding groupMembersChanged()
+ * (or groupLocalPendingChanged()/groupRemotePendingChanged()) signal, as
+ * the local user being removed usually causes the remote %Channel to be
+ * closed, and consequently the Channel object going into that readiness
+ * state.
+ *
+ * The returned information is not guaranteed to be correct if
+ * groupIsSelfHandleTracked() returns false and a self handle change has
+ * occurred on the remote object.
+ *
+ * \return The remove info in a GroupMemberChangeInfo object.
+ */
Channel::GroupMemberChangeInfo Channel::groupSelfRemoveInfo() const
{
if (mPriv->readiness != ReadinessClosed)
@@ -583,11 +870,279 @@ Channel::GroupMemberChangeInfo Channel::groupSelfRemoveInfo() const
return mPriv->groupSelfRemoveInfo;
}
+/**
+ * \fn void groupFlagsChanged(uint flags, uint added, uint removed)
+ *
+ * Emitted when the value returned by groupFlags() changes.
+ *
+ * \param flags The value which would now be returned by groupFlags().
+ * \param added Flags added compared to the previous value.
+ * \param removed Flags removed compared to the previous value.
+ */
+
+/**
+ * \fn void groupMembersChanged(const QSet<uint>& members, const Telepathy::UIntList& added, const Telepathy::UIntList& removed, uint actor, uint reason, const QString& message)
+ *
+ * Emitted when the value returned by groupMembers() changes.
+ *
+ * \param members The value which would now be returned by groupMembers().
+ * \param added Handles of the contacts which were added to the value.
+ * \param removed Handles of the contacts which were removed from the value.
+ * \param actor Handle of the contact requesting or causing the change.
+ * \param reason Reason of the change, as specified in
+ * #ChannelGroupChangeReason.
+ * \param message Message specified by the actor related to the change, such
+ * as the part message in IRC.
+ */
+
+/**
+ * \fn void groupLocalPendingChanged(const GroupMemberChangeInfoMap& localPending, const Telepathy::UIntList& added, const Telepathy::UIntList& removed, uint actor, uint reason, const QString& message)
+ *
+ * Emitted when the value returned by groupLocalPending() changes.
+ *
+ * The added and remove lists only specify the handles of the contacts added
+ * to or removed from the mapping, not the extended information pertaining
+ * to them. Local pending info never changes for a particular contact after
+ * the contact first appears in the mapping, so no change notification is
+ * necessary for the extended information itself.
+ *
+ * \param localPending The value which would now be returned by
+ * groupLocalPending().
+ * \param added Handles of the contacts which were added to the value.
+ * \param removed Handles of the contacts which were removed from the value.
+ * \param actor Handle of the contact requesting or causing the change.
+ * \param reason Reason of the change, as specified in
+ * #ChannelGroupChangeReason.
+ * \param message Message specified by the actor related to the change, such
+ * as the part message in IRC.
+ */
+
+/**
+ * \fn void groupRemotePendingChanged(const QSet<uint>& remotePending, const Telepathy::UIntList& added, const Telepathy::UIntList& removed, uint actor, uint reason, const QString& message)
+ *
+ * Emitted when the value returned by groupRemotePending() changes.
+ *
+ * \param remotePending The value which would now be returned by
+ * groupRemotePending().
+ * \param added Handles of the contacts which were added to the value.
+ * \param removed Handles of the contacts which were removed from the value.
+ * \param actor Handle of the contact requesting or causing the change.
+ * \param reason Reason of the change, as specified in
+ * #ChannelGroupChangeReason.
+ * \param message Message specified by the actor related to the change, such
+ * as the part message in IRC.
+ */
+
+/**
+ * \fn void groupHandleOwnersChanged(const HandleOwnerMap& owners, const Telepathy::UIntList& added, const Telepathy::UIntList& removed)
+ *
+ * Emitted when the value returned by groupHandleOwners() changes.
+ *
+ * \param owners The value which would now be returned by
+ * groupHandleOwners().
+ * \param added Handles which have been added to the mapping as keys, or
+ * existing handle keys for which the mapped-to value has changed.
+ * \param removed Handles which have been removed from the mapping.
+ */
+
+/**
+ * \fn void groupSelfHandleChanged(uint selfHandle)
+ *
+ * Emitted when the value returned by groupSelfHandle() changes.
+ *
+ * \param selfHandle The value which would now be returned by
+ * groupSelfHandle().
+ */
+
+//@}
+
+/**
+ * \name Optional interface proxy factory
+ *
+ * Factory functions fabricating proxies for optional %Channel interfaces and
+ * interfaces for specific channel types.
+ */
+
+//@{
+
+/**
+ * \fn template <class Interface> Interface* optionalInterface(InterfaceSupportedChecking check) const
+ *
+ * Returns 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 <code>0</code> is returned. This check can be
+ * bypassed by specifying #BypassInterfaceCheck for <code>check</code>, in
+ * which case a valid instance is always returned.
+ *
+ * If the object doesn't have readiness #ReadinessFull, 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 OptionalInterfaceFactory::interface
+ *
+ * \tparam Interface Class of the optional interface to get.
+ * \param check Should an instance be returned even if it can't be
+ * determined that the remote object supports the
+ * requested interface.
+ * \return Pointer to an instance of the interface class, or <code>0</code>.
+ */
+
+/**
+ * \fn ChannelInterfaceCallStateInterface* callStateInterface(InterfaceSupportedChecking check) const
+ *
+ * Convenience function for getting a CallState interface proxy.
+ *
+ * \param check Passed to optionalInterface()
+ * \return <code>optionalInterface<ChannelInterfaceCallStateInterface>(check)</code>
+ */
+
+/**
+ * \fn ChannelInterfaceChatStateInterface* chatStateInterface(InterfaceSupportedChecking check) const
+ *
+ * Convenience function for getting a ChatState interface proxy.
+ *
+ * \param check Passed to optionalInterface()
+ * \return <code>optionalInterface<ChannelInterfaceChatStateInterface>(check)</code>
+ */
+
+/**
+ * \fn ChannelInterfaceDTMFInterface* DTMFInterface(InterfaceSupportedChecking check) const
+ *
+ * Convenience function for getting a DTMF interface proxy.
+ *
+ * \param check Passed to optionalInterface()
+ * \return <code>optionalInterface<ChannelInterfaceDTMFInterface>(check)</code>
+ */
+
+/**
+ * \fn ChannelInterfaceGroupInterface* groupInterface(InterfaceSupportedChecking check) const
+ *
+ * Convenience function for getting a Group interface proxy.
+ *
+ * \param check Passed to optionalInterface()
+ * \return <code>optionalInterface<ChannelInterfaceGroupInterface>(check)</code>
+ */
+
+/**
+ * \fn ChannelInterfaceHoldInterface* holdInterface(InterfaceSupportedChecking check) const
+ *
+ * Convenience function for getting a Hold interface proxy.
+ *
+ * \param check Passed to optionalInterface()
+ * \return <code>optionalInterface<ChannelInterfaceHoldInterface>(check)</code>
+ */
+
+/**
+ * \fn ChannelInterfaceMediaSignallingInterface* mediaSignallingInterface(InterfaceSupportedChecking check) const
+ *
+ * Convenience function for getting a MediaSignalling interface proxy.
+ *
+ * \param check Passed to optionalInterface()
+ * \return <code>optionalInterface<ChannelInterfaceMediaSignallingInterface>(check)</code>
+ */
+
+/**
+ * \fn ChannelInterfacePasswordInterface* passwordInterface(InterfaceSupportedChecking check) const
+ *
+ * Convenience function for getting a Password interface proxy.
+ *
+ * \param check Passed to optionalInterface()
+ * \return <code>optionalInterface<ChannelInterfacePasswordInterface>(check)</code>
+ */
+
+/**
+ * \fn DBus::PropertiesInterface* propertiesInterface() const
+ *
+ * Convenience function for getting a Properties interface proxy. The
+ * Properties interface is not necessarily reported by the services, so a
+ * <code>check</code> parameter is not provided, and the interface is always
+ * assumed to be present.
+ *
+ * \return
+ * <code>optionalInterface<DBus::PropertiesInterface>(BypassInterfaceCheck)</code>
+ */
+
+/**
+ * \fn template <class Interface> Interface* typeInterface(InterfaceSupportedChecking check) const
+ *
+ * Returns 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 doesn't have readiness
+ * #ReadinessFull, <code>0</code> is returned. This check can be bypassed by
+ * specifying #BypassInterfaceCheck for <code>check</code>, 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 OptionalInterfaceFactory::interface
+ *
+ * \tparam Interface Class of the optional interface to get.
+ * \param check Should an instance be returned even if it can't be
+ * determined that the remote object is of the requested
+ * channel type.
+ * \return Pointer to an instance of the interface class, or <code>0</code>.
+ */
+
+/**
+ * \fn ChannelTypeRoomListInterface* roomListInterface(InterfaceSupportedChecking check) const
+ *
+ * Convenience function for getting a TypeRoomList interface proxy.
+ *
+ * \param check Passed to typeInterface()
+ * \return <code>typeInterface<ChannelTypeRoomListInterface>(check)</code>
+ */
+
+/**
+ * \fn ChannelTypeStreamedMediaInterface* streamedMediaInterface(InterfaceSupportedChecking check) const
+ *
+ * Convenience function for getting a TypeStreamedMedia interface proxy.
+ *
+ * \param check Passed to typeInterface()
+ * \return <code>typeInterface<ChannelTypeStreamedMediaInterface>(check)</code>
+ */
+
+/**
+ * \fn ChannelTypeTextInterface* textInterface(InterfaceSupportedChecking check) const
+ *
+ * Convenience function for getting a TypeText interface proxy.
+ *
+ * \param check Passed to typeInterface()
+ * \return <code>typeInterface<ChannelTypeTextInterface>(check)</code>
+ */
+
+/**
+ * \fn ChannelTypeTubesInterface* tubesInterface(InterfaceSupportedChecking check) const
+ *
+ * Convenience function for getting a TypeTubes interface proxy.
+ *
+ * \param check Passed to typeInterface()
+ * \return <code>typeInterface<ChannelTypeTubesInterface>(check)</code>
+ */
+
+/**
+ * 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.
+ *
+ * \return A pointer to the existing ChannelInterface for this Channel
+ */
ChannelInterface* Channel::baseInterface() const
{
return mPriv->baseInterface;
}
+//@}
+
void Channel::gotMainProperties(QDBusPendingCallWatcher* watcher)
{
QDBusPendingReply<QVariantMap> reply = *watcher;
@@ -932,5 +1487,65 @@ void Channel::onSelfHandleChanged(uint newSelfHandle)
}
}
+/**
+ * \class Channel::GroupMemberChangeInfo
+ * \ingroup clientchannel
+ * \headerfile TelepathyQt4/Client/channel.h <TelepathyQt4/Client/Channel>
+ *
+ * Class opaquely storing information on a group membership change for a
+ * single member.
+ *
+ * Extended information is not always available; this will be reflected by
+ * the return value of isValid().
+ */
+
+/**
+ * \fn GroupMemberChangeInfo()
+ *
+ * \internal
+ */
+
+/**
+ * \fn GroupMemberChangeInfo(uint actor, uint reason, const QString& message)
+ *
+ * \internal
+ */
+
+/**
+ * \fn bool isValid() const;
+ *
+ * Returns whether or not this object actually contains valid
+ * information received from the service. If the returned value is
+ * false, the values returned by the other methods for this object are
+ * undefined.
+ *
+ * \return Whether the information stored in this object is valid.
+ */
+
+/**
+ * \fn uint actor() const
+ *
+ * Returns the contact requesting or causing the change.
+ *
+ * \return The handle of the contact.
+ */
+
+/**
+ * \fn uint reason() const
+ *
+ * Returns the reason for the change.
+ *
+ * \return The reason, as specified in #ChannelGroupChangeReason.
+ */
+
+/**
+ * \fn const QString& message() const
+ * Returns a human-readable message from the contact represented by
+ * actor() pertaining to the change, or an empty string if there is no
+ * message.
+ *
+ * \return The message as a string.
+ */
+
}
}
diff --git a/TelepathyQt4/Client/channel.h b/TelepathyQt4/Client/channel.h
index 7b5a909..2b7df6d 100644
--- a/TelepathyQt4/Client/channel.h
+++ b/TelepathyQt4/Client/channel.h
@@ -26,25 +26,6 @@
#error IN_TELEPATHY_QT4_HEADER
#endif
-/**
- * \addtogroup clientsideproxies Client-side proxies
- *
- * Proxy objects representing remote service objects accessed via D-Bus.
- *
- * In addition to providing direct access to methods, signals and properties
- * exported by the remote objects, some of these proxies offer features like
- * automatic inspection of remote object capabilities, property tracking,
- * backwards compatibility helpers for older services and other utilities.
- */
-
-/**
- * \defgroup clientchannel Channel proxies
- * \ingroup clientsideproxies
- *
- * Proxy objects representing remote Telepathy Channels and their optional
- * interfaces.
- */
-
#include <TelepathyQt4/_gen/cli-channel.h>
#include <TelepathyQt4/Client/DBus>
@@ -62,36 +43,6 @@ namespace Client
class Connection;
-/**
- * \class Channel
- * \ingroup clientchannel
- * \headerfile TelepathyQt4/Client/channel.h <TelepathyQt4/Client/Channel>
- *
- * High-level proxy object for accessing remote %Telepathy %Channel objects.
- *
- * It adds the following features compared to using ChannelInterface directly:
- * <ul>
- * <li>Life cycle tracking</li>
- * <li>Getting the channel type, handle type, handle and interfaces automatically</li>
- * <li>Shared optional interface proxy instances</li>
- * </ul>
- *
- * The remote object state accessor functions on this object (interfaces(),
- * channelType(), targetHandleType(), targetHandle()) 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 has readiness #ReadinessFull, as returned by
- * readiness() and indicated by emissions of the readinessChanged() signal.
- *
- * 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::readinessChanged) or is deleted, the Channel object
- * will transition to ReadinessDead too.
- */
class Channel : public StatefulDBusProxy,
private OptionalInterfaceFactory<Channel>
{
@@ -100,247 +51,57 @@ class Channel : public StatefulDBusProxy,
Q_ENUMS(Readiness)
public:
- /**
- * Describes readiness of the Channel for usage. The readiness depends on
- * the state of the remote object. In suitable states, an asynchronous
- * introspection process is started, and the Channel becomes more ready when
- * that process is completed.
- */
enum Readiness {
- /**
- * The object has just been created and introspection is still in
- * progress. No functionality dependent on introspection is available.
- *
- * The readiness can change to any other state except ReadinessClosed
- * depending on the result of the initial state query to the remote
- * object.
- */
ReadinessJustCreated = 0,
-
- /**
- * The remote object is alive and all introspection has been completed.
- * Most functionality is available.
- *
- * The readiness can change to ReadinessDead or ReadinessClosed.
- */
ReadinessFull = 5,
-
- /**
- * The remote object has gone into a state where it can no longer be
- * used in an unexpected way. No functionality is available.
- *
- * No further readiness changes are possible.
- */
ReadinessDead = 10,
-
- /**
- * The remote object has been closed and so can no longer be used.
- * No functionality is available.
- *
- * No further readiness changes are possible.
- */
ReadinessClosed = 15,
-
_ReadinessInvalid = 0xffff
};
- /**
- * Creates a Channel associated with the given object on the same service as
- * the given connection.
- *
- * \param connection Connection owning this Channel, and specifying the
- * service.
- * \param objectPath Path to the object on the service.
- * \param parent Passed to the parent class constructor.
- */
Channel(Connection* connection,
const QString& objectPath,
QObject* parent = 0);
-
- /**
- * Class destructor.
- */
~Channel();
- /**
- * Returns the owning Connection of the Channel.
- *
- * \return Pointer to the Connection.
- */
Connection* connection() const;
- /**
- * Returns the current readiness of the Channel.
- *
- * \return The readiness, as defined in #Readiness.
- */
Readiness readiness() const;
- /**
- * Returns a list of optional interfaces implemented by the remote object.
- *
- * \return D-Bus names of the implemented optional interfaces.
- */
QStringList interfaces() const;
- /**
- * Returns the type of this channel.
- *
- * \return D-Bus interface name for the type of the channel.
- */
QString channelType() const;
- /**
- * Returns the type of the handle returned by #targetHandle().
- *
- * \return The type of the handle, as specified in #HandleType.
- */
uint targetHandleType() const;
- /**
- * Returns the handle of the remote party with which this channel
- * communicates.
- *
- * \return The handle, which is of the type #targetHandleType() indicates.
- */
uint targetHandle() const;
public Q_SLOTS:
- /**
- * Close the channel.
- *
- * When this method is used as a slot, it is fire-and-forget. If you want
- * to know if an error occurs when closing the channel, then you should
- * use the returned object.
- *
- * A channel can be closed if its Readiness is ReadinessJustCreated or
- * ReadinessFull. It cannot be closed if its Readiness is ReadinessDead or
- * ReadinessClosed. If this method is called on a channel which is already
- * in either the ReadinessDead or ReadinessClosed state, a DBus error of type
- * TELEPATHY_ERROR_NOT_AVAILABLE will be returned.
- *
- * If the introspection of a channel is not complete (ReadinessJustCreated)
- * when close() is called, the channel readiness will change to ReadinessDead
- * instead of ReadinessClosed, which results if the channel is closed after
- * the introspection is complete (ReadinessFull).
- *
- * \return QDBusPendingReply object for the call to Close() on the Channel
- * interface.
- */
QDBusPendingReply<> close();
Q_SIGNALS:
- /**
- * Emitted whenever the readiness of the Channel changes. When the channel
- * is closed, this signal will be emitted with readiness #ReadinessClosed.
- *
- * \param newReadiness The new readiness, as defined in #Readiness.
- */
void readinessChanged(uint newReadiness);
- /**
- * \name Group interface
- *
- * Cached access to state of the group interface on the associated remote
- * object, if the interface is present. All methods return undefined values
- * if the list returned by interfaces() doesn't include
- * #TELEPATHY_INTERFACE_CHANNEL_INTERFACE_GROUP or if the object doesn't have
- * readiness #ReadinessFull.
- *
- * 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.
- * However, the value being initially discovered by introspection is still
- * signaled by a readiness change to #ReadinessFull.
- *
- * 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.
- */
- //@{
-
public:
-
- /**
- * Returns a set of flags indicating the capabilities and behaviour of the
- * group represented by the remote object.
- *
- * Change notification is via groupFlagsChanged().
- *
- * \return Bitfield combination of flags, as defined in #ChannelGroupFlag.
- */
uint groupFlags() const;
- /**
- * Returns the current members of the group.
- *
- * \return Set of handles representing the members.
- */
QSet<uint> groupMembers() const;
- /**
- * Class opaquely storing information on a group membership change for a
- * single member.
- *
- * Extended information is not always available; this will be reflected by
- * the return value of isValid().
- */
class GroupMemberChangeInfo
{
public:
-
- /**
- * \internal
- */
GroupMemberChangeInfo()
: mActor(-1), mReason(0), mIsValid(false) {}
- /**
- * \internal
- */
GroupMemberChangeInfo(uint actor, uint reason, const QString& message)
: mActor(actor), mReason(reason), mMessage(message), mIsValid(true) {}
- /**
- * Returns whether or not this object actually contains valid
- * information received from the service. If the returned value is
- * false, the values returned by the other methods for this object are
- * undefined.
- *
- * \return Whether the information stored in this object is valid.
- */
bool isValid() const { return mIsValid; }
- /**
- * Returns the contact requesting or causing the change.
- *
- * \return The handle of the contact.
- */
uint actor() const { return mActor; }
- /**
- * Returns the reason for the change.
- *
- * \return The reason, as specified in #ChannelGroupChangeReason.
- */
uint reason() const { return mReason; }
- /**
- * Returns a human-readable message from the contact represented by
- * actor() pertaining to the change, or an empty string if there is no
- * message.
- *
- * \return The message as a string.
- */
const QString& message() const { return mMessage; }
private:
@@ -350,234 +111,36 @@ public:
bool mIsValid;
};
- /**
- * Mapping from contact handles to local pending contact information.
- */
typedef QMap<uint, GroupMemberChangeInfo> GroupMemberChangeInfoMap;
- /**
- * Returns the contacts currently waiting for local approval to join the
- * group.
- *
- * The returned value is a mapping from contact handles to
- * GroupMemberChangeInfo objects. The key specifies a contact, with the
- * value potentially including extendend information on the original request
- * leading to the contact appearing in the local pending members.
- *
- * A info object as a value in the mapping, for which
- * GroupMemberChangeInfo::isValid() returns <code>false</code> indicates a
- * member for which no extended information has been received from the
- * service. This will only happen for old services, for which neither the
- * LocalPending property nor the GetLocalPendingMembersWithInfo method is
- * usable.
- *
- * \returns A mapping from handles to info for the members waiting for local
- * approval.
- */
GroupMemberChangeInfoMap groupLocalPending() const;
- /**
- * Returns the contacts currently waiting for remote approval to join the
- * group.
- *
- * \returns Set of handles representing the contacts.
- */
QSet<uint> groupRemotePending() const;
- /**
- * Returns 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:
- * <ul>
- * <li>The object has readiness #ReadinessFull
- * <li>The list returned by interfaces() contains
- * #TELEPATHY_INTERFACE_CHANNEL_INTERFACE_GROUP</li>
- * <li>The set of flags returned by groupFlags() contains
- * GroupFlagProperties and GroupFlagChannelSpecificHandles</li>
- * </ul>
- *
- * If this function returns <code>false</code>, 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 spends having readiness #ReadinessFull, so no change
- * notification is provided.
- *
- * \return If handle owner lookup functionality is available.
- */
bool groupAreHandleOwnersAvailable() const;
- /**
- * Returns 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.
- *
- * \return A mapping from group-specific handles to globally valid handles.
- */
HandleOwnerMap groupHandleOwners() const;
- /**
- * Returns whether the value returned by groupSelfHandle() 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 handle changes can't be
- * reliably tracked.
- *
- * \return Whether or not changes to the self handle are tracked.
- */
bool groupIsSelfHandleTracked() const;
- /**
- * Returns a handle representing the user in the group if the user is a
- * member of the group, otherwise either a handle representing the user or
- * 0.
- *
- * \return A contact handle representing the user, if possible.
- */
uint groupSelfHandle() const;
- /**
- * Returns 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
- * GroupMemberChangeInfo::isValid() returns <code>false</code> is returned.
- *
- * This method only after the channel has gone into readiness
- * #ReadinessClosed. This is useful for getting the
- * remove information after missing the corresponding groupMembersChanged()
- * (or groupLocalPendingChanged()/groupRemotePendingChanged()) signal, as
- * the local user being removed usually causes the remote %Channel to be
- * closed, and consequently the Channel object going into that readiness
- * state.
- *
- * The returned information is not guaranteed to be correct if
- * groupIsSelfHandleTracked() returns false and a self handle change has
- * occurred on the remote object.
- *
- * \return The remove info in a GroupMemberChangeInfo object.
- */
GroupMemberChangeInfo groupSelfRemoveInfo() const;
Q_SIGNALS:
-
- /**
- * Emitted when the value returned by groupFlags() changes.
- *
- * \param flags The value which would now be returned by groupFlags().
- * \param added Flags added compared to the previous value.
- * \param removed Flags removed compared to the previous value.
- */
void groupFlagsChanged(uint flags, uint added, uint removed);
- /**
- * Emitted when the value returned by groupMembers() changes.
- *
- * \param members The value which would now be returned by groupMembers().
- * \param added Handles of the contacts which were added to the value.
- * \param removed Handles of the contacts which were removed from the value.
- * \param actor Handle of the contact requesting or causing the change.
- * \param reason Reason of the change, as specified in
- * #ChannelGroupChangeReason.
- * \param message Message specified by the actor related to the change, such
- * as the part message in IRC.
- */
void groupMembersChanged(const QSet<uint>& members, const Telepathy::UIntList& added, const Telepathy::UIntList& removed, uint actor, uint reason, const QString& message);
- /**
- * Emitted when the value returned by groupLocalPending() changes.
- *
- * The added and remove lists only specify the handles of the contacts added
- * to or removed from the mapping, not the extended information pertaining
- * to them. Local pending info never changes for a particular contact after
- * the contact first appears in the mapping, so no change notification is
- * necessary for the extended information itself.
- *
- * \param localPending The value which would now be returned by
- * groupLocalPending().
- * \param added Handles of the contacts which were added to the value.
- * \param removed Handles of the contacts which were removed from the value.
- * \param actor Handle of the contact requesting or causing the change.
- * \param reason Reason of the change, as specified in
- * #ChannelGroupChangeReason.
- * \param message Message specified by the actor related to the change, such
- * as the part message in IRC.
- */
void groupLocalPendingChanged(const GroupMemberChangeInfoMap& localPending, const Telepathy::UIntList& added, const Telepathy::UIntList& removed, uint actor, uint reason, const QString& message);
- /**
- * Emitted when the value returned by groupRemotePending() changes.
- *
- * \param remotePending The value which would now be returned by
- * groupRemotePending().
- * \param added Handles of the contacts which were added to the value.
- * \param removed Handles of the contacts which were removed from the value.
- * \param actor Handle of the contact requesting or causing the change.
- * \param reason Reason of the change, as specified in
- * #ChannelGroupChangeReason.
- * \param message Message specified by the actor related to the change, such
- * as the part message in IRC.
- */
void groupRemotePendingChanged(const QSet<uint>& remotePending, const Telepathy::UIntList& added, const Telepathy::UIntList& removed, uint actor, uint reason, const QString& message);
- /**
- * Emitted when the value returned by groupHandleOwners() changes.
- *
- * \param owners The value which would now be returned by
- * groupHandleOwners().
- * \param added Handles which have been added to the mapping as keys, or
- * existing handle keys for which the mapped-to value has changed.
- * \param removed Handles which have been removed from the mapping.
- */
void groupHandleOwnersChanged(const HandleOwnerMap& owners, const Telepathy::UIntList& added, const Telepathy::UIntList& removed);
- /**
- * Emitted when the value returned by groupSelfHandle() changes.
- *
- * \param selfHandle The value which would now be returned by
- * groupSelfHandle().
- */
void groupSelfHandleChanged(uint selfHandle);
- /**
- * \name Optional interface proxy factory
- *
- * Factory functions fabricating proxies for optional %Channel interfaces and
- * interfaces for specific channel types.
- */
- //@{
-
public:
-
- /**
- * Returns 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 <code>0</code> is returned. This check can be
- * bypassed by specifying #BypassInterfaceCheck for <code>check</code>, in
- * which case a valid instance is always returned.
- *
- * If the object doesn't have readiness #ReadinessFull, 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 OptionalInterfaceFactory::interface
- *
- * \tparam Interface Class of the optional interface to get.
- * \param check Should an instance be returned even if it can't be
- * determined that the remote object supports the
- * requested interface.
- * \return Pointer to an instance of the interface class, or <code>0</code>.
- */
template <class Interface>
inline Interface* optionalInterface(InterfaceSupportedChecking check = CheckInterfaceSupported) const
{
@@ -590,120 +153,46 @@ public:
return OptionalInterfaceFactory<Channel>::interface<Interface>();
}
- /**
- * Convenience function for getting a CallState interface proxy.
- *
- * \param check Passed to optionalInterface()
- * \return <code>optionalInterface<ChannelInterfaceCallStateInterface>(check)</code>
- */
inline ChannelInterfaceCallStateInterface* callStateInterface(InterfaceSupportedChecking check = CheckInterfaceSupported) const
{
return optionalInterface<ChannelInterfaceCallStateInterface>(check);
}
- /**
- * Convenience function for getting a ChatState interface proxy.
- *
- * \param check Passed to optionalInterface()
- * \return <code>optionalInterface<ChannelInterfaceChatStateInterface>(check)</code>
- */
inline ChannelInterfaceChatStateInterface* chatStateInterface(InterfaceSupportedChecking check = CheckInterfaceSupported) const
{
return optionalInterface<ChannelInterfaceChatStateInterface>(check);
}
- /**
- * Convenience function for getting a DTMF interface proxy.
- *
- * \param check Passed to optionalInterface()
- * \return <code>optionalInterface<ChannelInterfaceDTMFInterface>(check)</code>
- */
inline ChannelInterfaceDTMFInterface* DTMFInterface(InterfaceSupportedChecking check = CheckInterfaceSupported) const
{
return optionalInterface<ChannelInterfaceDTMFInterface>(check);
}
- /**
- * Convenience function for getting a Group interface proxy.
- *
- * \param check Passed to optionalInterface()
- * \return <code>optionalInterface<ChannelInterfaceGroupInterface>(check)</code>
- */
inline ChannelInterfaceGroupInterface* groupInterface(InterfaceSupportedChecking check = CheckInterfaceSupported) const
{
return optionalInterface<ChannelInterfaceGroupInterface>(check);
}
- /**
- * Convenience function for getting a Hold interface proxy.
- *
- * \param check Passed to optionalInterface()
- * \return <code>optionalInterface<ChannelInterfaceHoldInterface>(check)</code>
- */
inline ChannelInterfaceHoldInterface* holdInterface(InterfaceSupportedChecking check = CheckInterfaceSupported) const
{
return optionalInterface<ChannelInterfaceHoldInterface>(check);
}
- /**
- * Convenience function for getting a MediaSignalling interface proxy.
- *
- * \param check Passed to optionalInterface()
- * \return <code>optionalInterface<ChannelInterfaceMediaSignallingInterface>(check)</code>
- */
inline ChannelInterfaceMediaSignallingInterface* mediaSignallingInterface(InterfaceSupportedChecking check = CheckInterfaceSupported) const
{
return optionalInterface<ChannelInterfaceMediaSignallingInterface>(check);
}
- /**
- * Convenience function for getting a Password interface proxy.
- *
- * \param check Passed to optionalInterface()
- * \return <code>optionalInterface<ChannelInterfacePasswordInterface>(check)</code>
- */
inline ChannelInterfacePasswordInterface* passwordInterface(InterfaceSupportedChecking check = CheckInterfaceSupported) const
{
return optionalInterface<ChannelInterfacePasswordInterface>(check);
}
- /**
- * Convenience function for getting a Properties interface proxy. The
- * Properties interface is not necessarily reported by the services, so a
- * <code>check</code> parameter is not provided, and the interface is always
- * assumed to be present.
- *
- * \return
- * <code>optionalInterface<DBus::PropertiesInterface>(BypassInterfaceCheck)</code>
- */
inline DBus::PropertiesInterface* propertiesInterface() const
{
return optionalInterface<DBus::PropertiesInterface>(BypassInterfaceCheck);
}
- /**
- * Returns 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 doesn't have readiness
- * #ReadinessFull, <code>0</code> is returned. This check can be bypassed by
- * specifying #BypassInterfaceCheck for <code>check</code>, 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 OptionalInterfaceFactory::interface
- *
- * \tparam Interface Class of the optional interface to get.
- * \param check Should an instance be returned even if it can't be
- * determined that the remote object is of the requested
- * channel type.
- * \return Pointer to an instance of the interface class, or <code>0</code>.
- */
template <class Interface>
inline Interface* typeInterface(InterfaceSupportedChecking check = CheckInterfaceSupported) const
{
@@ -716,62 +205,29 @@ public:
return OptionalInterfaceFactory<Channel>::interface<Interface>();
}
- /**
- * Convenience function for getting a TypeRoomList interface proxy.
- *
- * \param check Passed to typeInterface()
- * \return <code>typeInterface<ChannelTypeRoomListInterface>(check)</code>
- */
inline ChannelTypeRoomListInterface* roomListInterface(InterfaceSupportedChecking check = CheckInterfaceSupported) const
{
return typeInterface<ChannelTypeRoomListInterface>(check);
}
- /**
- * Convenience function for getting a TypeStreamedMedia interface proxy.
- *
- * \param check Passed to typeInterface()
- * \return <code>typeInterface<ChannelTypeStreamedMediaInterface>(check)</code>
- */
inline ChannelTypeStreamedMediaInterface* streamedMediaInterface(InterfaceSupportedChecking check = CheckInterfaceSupported) const
{
return typeInterface<ChannelTypeStreamedMediaInterface>(check);
}
- /**
- * Convenience function for getting a TypeText interface proxy.
- *
- * \param check Passed to typeInterface()
- * \return <code>typeInterface<ChannelTypeTextInterface>(check)</code>
- */
inline ChannelTypeTextInterface* textInterface(InterfaceSupportedChecking check = CheckInterfaceSupported) const
{
return typeInterface<ChannelTypeTextInterface>(check);
}
- /**
- * Convenience function for getting a TypeTubes interface proxy.
- *
- * \param check Passed to typeInterface()
- * \return <code>typeInterface<ChannelTypeTubesInterface>(check)</code>
- */
inline ChannelTypeTubesInterface* tubesInterface(InterfaceSupportedChecking check = CheckInterfaceSupported) const
{
return typeInterface<ChannelTypeTubesInterface>(check);
}
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.
- *
- * \return A pointer to the existing ChannelInterface for this Channel
- */
ChannelInterface* baseInterface() const;
- //@}
-
private Q_SLOTS:
void gotMainProperties(QDBusPendingCallWatcher* watcher);
void gotChannelType(QDBusPendingCallWatcher* watcher);
@@ -798,8 +254,8 @@ private:
Private *mPriv;
};
-}
-}
+} // Telepathy::Client
+} // Telepathy
Q_DECLARE_METATYPE(Telepathy::Client::Channel::GroupMemberChangeInfo);
Q_DECLARE_METATYPE(Telepathy::Client::Channel::GroupMemberChangeInfoMap);
--
1.5.6.5
More information about the telepathy-commits
mailing list