TelepathyQt4: ChannelInterfaceGroupInterface Class Reference

| Home · All Classes · All Namespaces · Modules · Functions · Files

# ChannelInterfaceGroupInterface Class Reference
[Channel proxies]

`#include <TelepathyQt4/Channel>`

Inherits Tp::AbstractInterface.

List of all members.

## Public Slots

- QDBusPendingReply AddMembers (const Tp::UIntList &contacts, const QString &message)
- QDBusPendingReply
  < Tp::UIntList, Tp::UIntList,
  Tp::UIntList > GetAllMembers ()
- QDBusPendingReply< uint > GetGroupFlags ()
- QDBusPendingReply< Tp::UIntList > GetHandleOwners (const Tp::UIntList &handles)
- QDBusPendingReply< Tp::UIntList > GetLocalPendingMembers ()
- QDBusPendingReply
  < Tp::LocalPendingInfoList > GetLocalPendingMembersWithInfo ()
- QDBusPendingReply< Tp::UIntList > GetMembers ()
- QDBusPendingReply< Tp::UIntList > GetRemotePendingMembers ()
- QDBusPendingReply< uint > GetSelfHandle ()
- QDBusPendingReply RemoveMembers (const Tp::UIntList &contacts, const QString &message)
- QDBusPendingReply RemoveMembersWithReason (const Tp::UIntList &contacts, const QString &message, uint reason)

## Signals

- void HandleOwnersChanged (const Tp::HandleOwnerMap &added, const Tp::UIntList &removed)
- void SelfHandleChanged (uint selfHandle)
- void GroupFlagsChanged (uint added, uint removed)
- void MembersChanged (const QString &message, const Tp::UIntList &added, const Tp::UIntList &removed, const Tp::UIntList &localPending, const Tp::UIntList &remotePending, uint actor, uint reason)
- void MembersChangedDetailed (const Tp::UIntList &added, const Tp::UIntList &removed, const Tp::UIntList &localPending, const Tp::UIntList &remotePending, const QVariantMap &details)

## Public Member Functions

- ChannelInterfaceGroupInterface (const QString &busName, const QString &objectPath, QObject *parent=0)
- ChannelInterfaceGroupInterface (const QDBusConnection &connection, const QString &busName, const QString &objectPath, QObject *parent=0)
- ChannelInterfaceGroupInterface (Tp::DBusProxy *proxy)
- ChannelInterfaceGroupInterface (const Tp::Client::ChannelInterface &mainInterface)
- ChannelInterfaceGroupInterface (const Tp::Client::ChannelInterface &mainInterface, QObject *parent)
- uint GroupFlags () const TELEPATHY_GNUC_DEPRECATED
- Tp::HandleOwnerMap HandleOwners () const TELEPATHY_GNUC_DEPRECATED
- Tp::LocalPendingInfoList LocalPendingMembers () const TELEPATHY_GNUC_DEPRECATED
- Tp::UIntList Members () const TELEPATHY_GNUC_DEPRECATED
- Tp::UIntList RemotePendingMembers () const TELEPATHY_GNUC_DEPRECATED
- uint SelfHandle () const TELEPATHY_GNUC_DEPRECATED

## Static Public Member Functions

- static const char * staticInterfaceName ()

## Protected Member Functions

- virtual void invalidate (Tp::DBusProxy *, const QString &, const QString &)

## Properties

- uint GroupFlags
- Tp::HandleOwnerMap HandleOwners
- Tp::LocalPendingInfoList LocalPendingMembers
- Tp::UIntList Members
- Tp::UIntList RemotePendingMembers
- uint SelfHandle

## Detailed Description

Proxy class providing a 1:1 mapping of the D-Bus interface "org.freedesktop.Telepathy.Channel.Interface.Group."

## Constructor & Destructor Documentation

ChannelInterfaceGroupInterface | ( | const QString & | busName,
|  | const QString & | objectPath,
|  | QObject * | parent = `0` |
| ) |  |  |

Creates a ChannelInterfaceGroupInterface associated with the given object on the session bus.

Parameters:

  | busName | Name of the service the object is on.
  | objectPath | Path to the object on the service.
  | parent | Passed to the parent class constructor.

ChannelInterfaceGroupInterface | ( | const QDBusConnection & | connection,
|  | const QString & | busName,
|  | const QString & | objectPath,
|  | QObject * | parent = `0` |
| ) |  |  |

Creates a ChannelInterfaceGroupInterface associated with the given object on the given bus.

Parameters:

  | connection | The bus via which the object can be reached.
  | busName | Name of the service the object is on.
  | objectPath | Path to the object on the service.
  | parent | Passed to the parent class constructor.

ChannelInterfaceGroupInterface | ( | Tp::DBusProxy * | proxy | ) |

Creates a ChannelInterfaceGroupInterface associated with the same object as the given proxy.

Parameters:

  | proxy | The proxy to use. It will also be the QObject::parent() for this object.

ChannelInterfaceGroupInterface | ( | const Tp::Client::ChannelInterface & | mainInterface | ) | `[explicit]`

Creates a ChannelInterfaceGroupInterface associated with the same object as the given proxy. Additionally, the created proxy will have the same parent as the given proxy.

Parameters:

  | mainInterface | The proxy to use.

ChannelInterfaceGroupInterface | ( | const Tp::Client::ChannelInterface & | mainInterface,
|  | QObject * | parent |
| ) |  |  |

Creates a ChannelInterfaceGroupInterface associated with the same object as the given proxy. However, a different parent object can be specified.

Parameters:

  | mainInterface | The proxy to use.
  | parent | Passed to the parent class constructor.

## Member Function Documentation

static const char* staticInterfaceName | ( |  | ) | `[inline, static]`

Returns the name of the interface "org.freedesktop.Telepathy.Channel.Interface.Group", which this class represents.

Returns:
  The D-Bus interface name.

uint GroupFlags | ( |  | ) | const`[inline]`

Getter for the remote object property "GroupFlags".

Don't use this: it blocks the main loop.

Returns:
  The value of the property, or a default-constructed value if the property is not readable.

Tp::HandleOwnerMap HandleOwners | ( |  | ) | const`[inline]`

Getter for the remote object property "HandleOwners".

Don't use this: it blocks the main loop.

Returns:
  The value of the property, or a default-constructed value if the property is not readable.

Tp::LocalPendingInfoList LocalPendingMembers | ( |  | ) | const`[inline]`

Getter for the remote object property "LocalPendingMembers".

Don't use this: it blocks the main loop.

Returns:
  The value of the property, or a default-constructed value if the property is not readable.

Tp::UIntList Members | ( |  | ) | const`[inline]`

Getter for the remote object property "Members".

Don't use this: it blocks the main loop.

Returns:
  The value of the property, or a default-constructed value if the property is not readable.

Tp::UIntList RemotePendingMembers | ( |  | ) | const`[inline]`

Getter for the remote object property "RemotePendingMembers".

Don't use this: it blocks the main loop.

Returns:
  The value of the property, or a default-constructed value if the property is not readable.

uint SelfHandle | ( |  | ) | const`[inline]`

Getter for the remote object property "SelfHandle".

Don't use this: it blocks the main loop.

Returns:
  The value of the property, or a default-constructed value if the property is not readable.

QDBusPendingReply AddMembers | ( | const Tp::UIntList & | contacts,
|  | const QString & | message |
| ) |  |  | `[inline, slot]`

Begins a call to the D-Bus method "AddMembers" on the remote object.

Invite all the given contacts into the channel, or accept requests for channel membership for contacts on the pending local list.

A message may be provided along with the request, which will be sent to the server if supported. See the CHANNEL_GROUP_FLAG_MESSAGE_ADD and CHANNEL_GROUP_FLAG_MESSAGE_ACCEPT <tp:member-ref>GroupFlags</tp:member-ref> to see in which cases this message should be provided.

Attempting to add contacts who are already members is allowed; connection managers must silently accept this, without error.

Parameters:

  | contacts | An array of contact handles to invite to the channel
  | message | A string message, which can be blank if desired

QDBusPendingReply<Tp::UIntList, Tp::UIntList, Tp::UIntList> GetAllMembers | ( |  | ) | `[inline, slot]`

Begins a call to the D-Bus method "GetAllMembers" on the remote object.

Returns arrays of all current, local and remote pending channel members.

Returns:

array of handles of current members

Returns:

array of handles of local pending members

Returns:

array of handles of remote pending members

QDBusPendingReply<uint> GetGroupFlags | ( |  | ) | `[inline, slot]`

Begins a call to the D-Bus method "GetGroupFlags" on the remote object.

Returns the value of the GroupFlags property.

Returns:

The value of the GroupFlags property

QDBusPendingReply<Tp::UIntList> GetHandleOwners | ( | const Tp::UIntList & | handles | ) | `[inline, slot]`

Begins a call to the D-Bus method "GetHandleOwners" on the remote object.

If the CHANNEL_GROUP_FLAG_CHANNEL_SPECIFIC_HANDLES flag is set on the channel, then the handles of the group members are specific to this channel, and are not meaningful in a connection-wide context such as contact lists. This method allows you to find the owner of the handle if it can be discovered in this channel, or 0 if the owner is not available.

Parameters:

  | handles | A list of integer handles representing members of the channel

Returns:

An array of integer handles representing the owner handles of the given room members, in the same order, or 0 if the owner is not available

QDBusPendingReply<Tp::UIntList> GetLocalPendingMembers | ( |  | ) | `[inline, slot]`

Begins a call to the D-Bus method "GetLocalPendingMembers" on the remote object.

Returns the To_Be_Added handle (only) for each structure in the LocalPendingMembers property.

QDBusPendingReply<Tp::LocalPendingInfoList> GetLocalPendingMembersWithInfo | ( |  | ) | `[inline, slot]`

Begins a call to the D-Bus method "GetLocalPendingMembersWithInfo" on the remote object.

Returns the LocalPendingMembers property.

Returns:

An array of structs containing: A handle representing the contact requesting channel membership A handle representing the contact making the request, or 0 if unknown The reason for the request: one of the values of Channel_Group_Change_Reason A string message containing the reason for the request if any (or blank if none)

QDBusPendingReply<Tp::UIntList> GetMembers | ( |  | ) | `[inline, slot]`

Begins a call to the D-Bus method "GetMembers" on the remote object.

Returns the Members property.

QDBusPendingReply<Tp::UIntList> GetRemotePendingMembers | ( |  | ) | `[inline, slot]`

Begins a call to the D-Bus method "GetRemotePendingMembers" on the remote object.

Returns an array of handles representing contacts who have been invited to the channel and are awaiting remote approval.

QDBusPendingReply<uint> GetSelfHandle | ( |  | ) | `[inline, slot]`

Begins a call to the D-Bus method "GetSelfHandle" on the remote object.

Returns the value of the SelfHandle property.

QDBusPendingReply RemoveMembers | ( | const Tp::UIntList & | contacts,
|  | const QString & | message |
| ) |  |  | `[inline, slot]`

Begins a call to the D-Bus method "RemoveMembers" on the remote object.

Requests the removal of contacts from a channel, reject their request for channel membership on the pending local list, or rescind their invitation on the pending remote list.

If the <tp:member-ref>SelfHandle</tp:member-ref> is in a Group, it can be removed via this method, in order to leave the group gracefully. This is the recommended way to leave a chatroom, close or reject a <tp:dbus-ref namespace="org.freedesktop.Telepathy.Channel.Type">StreamedMedia</tp:dbus-ref> call, and so on.

Accordingly, connection managers SHOULD support doing this, regardless of the value of <tp:member-ref>GroupFlags</tp:member-ref>. If doing so fails with PermissionDenied, this is considered to a bug in the connection manager, but clients MUST recover by falling back to closing the channel with the <tp:dbus-ref namespace="org.freedesktop.Telepathy.Channel">Close</tp:dbus-ref> method.

Removing any contact from the local pending list is always allowed. Removing contacts other than the <tp:member-ref>SelfHandle</tp:member-ref> from the channel's members is allowed if and only if Channel_Group_Flag_Can_Remove is in the <tp:member-ref>GroupFlags</tp:member-ref>, while removing contacts other than the <tp:member-ref>SelfHandle</tp:member-ref> from the remote pending list is allowed if and only if Channel_Group_Flag_Can_Rescind is in the <tp:member-ref>GroupFlags</tp:member-ref>.

A message may be provided along with the request, which will be sent to the server if supported. See the Channel_Group_Flag_Message_Remove, Channel_Group_Flag_Message_Depart, Channel_Group_Flag_Message_Reject and Channel_Group_Flag_Message_Rescind <tp:member-ref>GroupFlags</tp:member-ref> to see in which cases this message should be provided.

Parameters:

  | contacts | An array of contact handles to remove from the channel
  | message | A string message, which can be blank if desired

QDBusPendingReply RemoveMembersWithReason | ( | const Tp::UIntList & | contacts,
|  | const QString & | message,
|  | uint | reason |
| ) |  |  | `[inline, slot]`

Begins a call to the D-Bus method "RemoveMembersWithReason" on the remote object.

As RemoveMembers, but a reason code may be provided where appropriate. The reason code may be ignored if the underlying protocol is unable to represent the given reason.

Parameters:

  | contacts | An array of contact handles to remove from the channel
  | message | A string message, which can be blank if desired
  | reason | A reason for the change

void HandleOwnersChanged | ( | const Tp::HandleOwnerMap & | added,
|  | const Tp::UIntList & | removed |
| ) |  |  | `[signal]`

Represents the signal "HandleOwnersChanged" on the remote object.

Emitted whenever the HandleOwners property changes.

Parameters:

  | added | A map from channel-specific handles to their owners, in which the keys include all the handles that were added to the keys of the HandleOwners property, and all the handles in that property whose owner has changed
  | removed | The channel-specific handles that were removed from the keys of the HandleOwners property, as a result of the contact leaving this group in a previous MembersChanged signal

void SelfHandleChanged | ( | uint | selfHandle | ) | `[signal]`

Represents the signal "SelfHandleChanged" on the remote object.

Emitted whenever the SelfHandle property changes.

Parameters:

  | selfHandle | The new value of the SelfHandle property.

void GroupFlagsChanged | ( | uint | added,
|  | uint | removed |
| ) |  |  | `[signal]`

Represents the signal "GroupFlagsChanged" on the remote object.

Emitted when the flags as returned by GetGroupFlags are changed. The user interface should be updated as appropriate.

Parameters:

  | added | A bitwise OR of the flags which have been set
  | removed | A bitwise OR of the flags which have been cleared

void MembersChanged | ( | const QString & | message,
|  | const Tp::UIntList & | added,
|  | const Tp::UIntList & | removed,
|  | const Tp::UIntList & | localPending,
|  | const Tp::UIntList & | remotePending,
|  | uint | actor,
|  | uint | reason |
| ) |  |  | `[signal]`

Represents the signal "MembersChanged" on the remote object.

Emitted when contacts join any of the three lists (members, local pending or remote pending) or when they leave any of the three lists. There may also be a message from the server regarding this change, which may be displayed to the user if desired.

All channel-specific handles that are mentioned in this signal MUST be represented in the value of the <tp:member-ref>HandleOwners</tp:member-ref> property. In practice, this will mean that <tp:member-ref>HandleOwnersChanged</tp:member-ref> is emitted before emitting a MembersChanged signal in which channel-specific handles are added, but that it is emitted after emitting a MembersChanged signal in which channel-specific handles are removed.

Parameters:

  | message | A string message from the server, or blank if not
  | added | A list of members added to the channel
  | removed | A list of members removed from the channel
  | localPending | A list of members who are pending local approval
  | remotePending | A list of members who are pending remote approval
  | actor | The contact handle of the person who made the change, or 0 if not known
  | reason | A reason for the change

void MembersChangedDetailed | ( | const Tp::UIntList & | added,
|  | const Tp::UIntList & | removed,
|  | const Tp::UIntList & | localPending,
|  | const Tp::UIntList & | remotePending,
|  | const QVariantMap & | details |
| ) |  |  | `[signal]`

Represents the signal "MembersChangedDetailed" on the remote object.

Emitted when contacts join any of the three lists (members, local pending or remote pending) or when they leave any of the three lists. This signal provides a superset of the information provided by <tp:member-ref>MembersChanged</tp:member-ref>; if the channel's <tp:member-ref>GroupFlags</tp:member-ref> contains Members_Changed_Detailed, then clients may listen exclusively to this signal in preference to that signal.

All channel-specific handles that are mentioned in this signal MUST be represented in the value of the <tp:member-ref>HandleOwners</tp:member-ref> property. In practice, this will mean that <tp:member-ref>HandleOwnersChanged</tp:member-ref> is emitted before emitting a MembersChangedDetailed signal in which channel-specific handles are added, but that it is emitted after emitting a MembersChangedDetailed signal in which channel-specific handles are removed.

Parameters:

  | added | A list of members added to the channel
  | removed | A list of members removed from the channel
  | localPending | A list of members who are pending local approval
  | remotePending | A list of members who are pending remote approval
  | details |

Information about the change, which may include the following well-known keys:

actor (u — <tp:type>Contact_Handle</tp:type>)

  The contact handle of the person who made the change; 0 or omitted if unknown or not applicable.

change-reason (u — <tp:type>Channel_Group_Change_Reason</tp:type>)

  A reason for the change.

contact-ids (a{us} — <tp:type>Handle_Identifier_Map</tp:type>)

  The string identifiers for handles mentioned in this signal, to give clients the minimal information necessary to react to the event without waiting for round-trips. Connection managers SHOULD include the identifiers for members added to the group and for the actor (if any); they MAY omit the identifiers for handles which have been removed from the group.

  <tp:rationale>

  On IRC, an event such as a netsplit could cause the vast majority of a channel to leave. Given that clients should already know the identifiers of a channel's members, including potentially hundreds of strings in the netsplit signal is unnecessary. </tp:rationale>

  Clients MUST NOT assume that the presence or absence of a handle in this mapping is meaningful. This mapping is merely an optimization for round-trip reduction, and connection managers MAY add additional handles, omit some handles, or omit the mapping completely.

message (s)

  A string message from the server regarding the change

error (s — <tp:type>DBus_Error_Name</tp:type>)

  A (possibly implementation-specific) DBus error describing the change, providing more specific information than the <tp:type>Channel_Group_Change_Reason</tp:type> enum allows. This MUST only be present if it is strictly more informative than 'change-reason'; if present, 'change-reason' MUST be set to the closest available reason.

  <tp:rationale> A SIP connection manager might want to signal "402 Payment required" as something more specific than Error or Permission_Denied so that a SIP-aware UI could handle it specially; including a namespaced error permits this to be done without <tp:type>Channel_Group_Change_Reason</tp:type> being extended to encompass every error any CM ever wants to report. </tp:rationale>

debug-message (s)
  Debugging information on the change. SHOULD NOT be shown to users in normal circumstances.

virtual void invalidate | ( | Tp::DBusProxy * | ,
|  | const QString & | ,
|  | const QString & |  |
| ) |  |  | `[protected, virtual]`

## Property Documentation

uint GroupFlags`[read]`

Represents property "GroupFlags" on the remote object.

An integer representing the bitwise-OR of flags on this channel. The user interface can use this to present information about which operations are currently valid. Change notification is via the GroupFlagsChanged signal.

Tp::HandleOwnerMap HandleOwners`[read]`

Represents property "HandleOwners" on the remote object.

A map from channel-specific handles to their owners, including at least all of the channel-specific handles in this channel's members, local-pending or 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, MUST appear in this mapping with 0 as owner. Change notification is via the HandleOwnersChanged signal.

Tp::LocalPendingInfoList LocalPendingMembers`[read]`

Represents property "LocalPendingMembers" on the remote object.

An array of structs containing handles representing contacts requesting channel membership and awaiting local approval with AddMembers.

Tp::UIntList Members`[read]`

Represents property "Members" on the remote object.

The members of this channel.

Tp::UIntList RemotePendingMembers`[read]`

Represents property "RemotePendingMembers" on the remote object.

An array of handles representing contacts who have been invited to the channel and are awaiting remote approval.

uint SelfHandle`[read]`

Represents property "SelfHandle" on the remote object.

The handle for the user on this channel (which can also be a local or remote pending member), or 0 if the user is not a member at all (which is likely to be the case, for instance, on ContactList channels). Note that this is different from the result of Connection.GetSelfHandle on some protocols, so the value of this handle should always be used with the methods of this interface.