Home · All Classes · All Namespaces · Modules · Functions · Files
Public Slots | Signals | Public Member Functions | Static Public Member Functions | Protected Member Functions | Properties

Tp::Client::ConnectionInterfaceContactGroupsInterface Class Reference
[Connection proxies]

#include <TelepathyQt4/Connection>

Inherits Tp::AbstractInterface.

List of all members.

Public Slots

Signals

Public Member Functions

Static Public Member Functions

Protected Member Functions

Properties


Detailed Description

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


Constructor & Destructor Documentation

Tp::Client::ConnectionInterfaceContactGroupsInterface::ConnectionInterfaceContactGroupsInterface ( const QString &  busName,
const QString &  objectPath,
QObject *  parent = 0 
)

Creates a ConnectionInterfaceContactGroupsInterface 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.
Tp::Client::ConnectionInterfaceContactGroupsInterface::ConnectionInterfaceContactGroupsInterface ( const QDBusConnection &  connection,
const QString &  busName,
const QString &  objectPath,
QObject *  parent = 0 
)

Creates a ConnectionInterfaceContactGroupsInterface 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.
Tp::Client::ConnectionInterfaceContactGroupsInterface::ConnectionInterfaceContactGroupsInterface ( Tp::DBusProxy proxy  ) 

Creates a ConnectionInterfaceContactGroupsInterface 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.
Tp::Client::ConnectionInterfaceContactGroupsInterface::ConnectionInterfaceContactGroupsInterface ( const Tp::Client::ConnectionInterface mainInterface  )  [explicit]

Creates a ConnectionInterfaceContactGroupsInterface 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.
Tp::Client::ConnectionInterfaceContactGroupsInterface::ConnectionInterfaceContactGroupsInterface ( const Tp::Client::ConnectionInterface mainInterface,
QObject *  parent 
)

Creates a ConnectionInterfaceContactGroupsInterface 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* Tp::Client::ConnectionInterfaceContactGroupsInterface::staticInterfaceName (  )  [inline, static]

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

Returns:
The D-Bus interface name.
TELEPATHY_QT4_DEPRECATED bool Tp::Client::ConnectionInterfaceContactGroupsInterface::DisjointGroups (  )  const [inline]

Getter for the remote object property "DisjointGroups".

Don't use this: it blocks the main loop. Use the asynchronous requestPropertyDisjointGroups() instead.

Returns:
The value of the property, or a default-constructed value if the property is not readable.
Tp::PendingVariant* Tp::Client::ConnectionInterfaceContactGroupsInterface::requestPropertyDisjointGroups (  )  const [inline]

Asynchronous getter for the remote object property "DisjointGroups" of type bool.

True if each contact can be in at most one group; false if each contact can be in many groups.

This property cannot change after the connection has moved to the Connected state. Until then, its value is undefined, and it may change at any time, without notification.

Returns:
A pending variant which will emit finished when the property has been retrieved.
TELEPATHY_QT4_DEPRECATED uint Tp::Client::ConnectionInterfaceContactGroupsInterface::GroupStorage (  )  const [inline]

Getter for the remote object property "GroupStorage".

Don't use this: it blocks the main loop. Use the asynchronous requestPropertyGroupStorage() instead.

Returns:
The value of the property, or a default-constructed value if the property is not readable.
Tp::PendingVariant* Tp::Client::ConnectionInterfaceContactGroupsInterface::requestPropertyGroupStorage (  )  const [inline]

Asynchronous getter for the remote object property "GroupStorage" of type uint.

Indicates the extent to which contacts' groups can be set and stored. This property cannot change after the connection has moved to the Connected state. Until then, its value is undefined, and it may change at any time, without notification.

Returns:
A pending variant which will emit finished when the property has been retrieved.
TELEPATHY_QT4_DEPRECATED QStringList Tp::Client::ConnectionInterfaceContactGroupsInterface::Groups (  )  const [inline]

Getter for the remote object property "Groups".

Don't use this: it blocks the main loop. Use the asynchronous requestPropertyGroups() instead.

Returns:
The value of the property, or a default-constructed value if the property is not readable.
Tp::PendingVariant* Tp::Client::ConnectionInterfaceContactGroupsInterface::requestPropertyGroups (  )  const [inline]

Asynchronous getter for the remote object property "Groups" of type QStringList.

The names of all groups that currently exist. This may be a larger set than the union of all contacts' groups contact attributes, if the connection allows groups to be empty.

Change notification is via <tp:member-ref>GroupsCreated</tp:member-ref> and <tp:member-ref>GroupsRemoved</tp:member-ref>; clients can also distinguish between a create/remove pair and a renamed group by receiving <tp:member-ref>GroupRenamed</tp:member-ref>.

This property's value is not meaningful until the <tp:dbus-ref namespace="ofdT.Connection.Interface.ContactList">ContactListState</tp:dbus-ref> has become Success.

Returns:
A pending variant which will emit finished when the property has been retrieved.
Tp::PendingVariantMap* Tp::Client::ConnectionInterfaceContactGroupsInterface::requestAllProperties (  )  const [inline]

Request all of the DBus properties on the interface.

Returns:
A pending variant map which will emit finished when the properties have been retrieved.
QDBusPendingReply Tp::Client::ConnectionInterfaceContactGroupsInterface::SetContactGroups ( uint  contact,
const QStringList &  groups 
) [inline, slot]

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

Add the given contact to the given groups (creating new groups if necessary), and remove them from all other groups.

<tp:rationale>

This is the easiest and most correct way to implement user interfaces that display a single contact with a list of groups, resulting in a user expectation that when they apply the changes, the contact's set of groups will become exactly what was displayed. </tp:rationale>

If the user is removed from a group of which they were the only member, the group MAY be removed automatically.

<tp:rationale>

In protocols like XMPP where groups behave like tags, a group with no members has no protocol representation. </tp:rationale>

Any <tp:member-ref>GroupsCreated</tp:member-ref>, <tp:member-ref>GroupsChanged</tp:member-ref> and <tp:member-ref>GroupsRemoved</tp:member-ref> signals that result from this method call MUST be emitted before the method returns.

This method SHOULD NOT be called until the <tp:dbus-ref namespace="ofdT.Connection.Interface.ContactList">ContactListState</tp:dbus-ref> changes to Success. If the ContactListState is Failure, this method SHOULD raise the same error as <tp:dbus-ref namespace="ofdT.Connection.Interface.ContactList">GetContactListAttributes</tp:dbus-ref>.

Parameters:
contact The contact to alter.
groups The set of groups which the contact should be in.
QDBusPendingReply Tp::Client::ConnectionInterfaceContactGroupsInterface::SetGroupMembers ( const QString &  group,
const Tp::UIntList members 
) [inline, slot]

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

Add the given members to the given group (creating it if necessary), and remove all other members.

<tp:rationale>

This is the easiest and most correct way to implement user interfaces that display a single group with a list of contacts, resulting in a user expectation that when they apply the changes, the groups's set of members will become exactly what was displayed. </tp:rationale>

If <tp:member-ref>DisjointGroups</tp:member-ref> is true, this will also remove each member from their previous group.

If the user is removed from a group of which they were the only member, the group MAY be removed automatically.

Any <tp:member-ref>GroupsCreated</tp:member-ref>, <tp:member-ref>GroupsChanged</tp:member-ref> and <tp:member-ref>GroupsRemoved</tp:member-ref> signals that result from this method call MUST be emitted before the method returns.

This method SHOULD NOT be called until the <tp:dbus-ref namespace="ofdT.Connection.Interface.ContactList">ContactListState</tp:dbus-ref> changes to Success. If the ContactListState is Failure, this method SHOULD raise the same error as <tp:dbus-ref namespace="ofdT.Connection.Interface.ContactList">GetContactListAttributes</tp:dbus-ref>.

Parameters:
group The group to alter.
members The set of members for the group. If this set is empty, this method MAY remove the group.
QDBusPendingReply Tp::Client::ConnectionInterfaceContactGroupsInterface::AddToGroup ( const QString &  group,
const Tp::UIntList members 
) [inline, slot]

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

Add the given members to the given group, creating it if necessary.

If <tp:member-ref>DisjointGroups</tp:member-ref> is true, this will also remove each member from their previous group.

<tp:rationale>

This is good for user interfaces in which you can edit groups via drag-and-drop. </tp:rationale>

Any <tp:member-ref>GroupsCreated</tp:member-ref>, <tp:member-ref>GroupsChanged</tp:member-ref> and <tp:member-ref>GroupsRemoved</tp:member-ref> signals that result from this method call MUST be emitted before the method returns.

This method SHOULD NOT be called until the <tp:dbus-ref namespace="ofdT.Connection.Interface.ContactList">ContactListState</tp:dbus-ref> changes to Success. If the ContactListState is Failure, this method SHOULD raise the same error as <tp:dbus-ref namespace="ofdT.Connection.Interface.ContactList">GetContactListAttributes</tp:dbus-ref>.

Parameters:
group The group to alter.
members The set of members to include in the group.
QDBusPendingReply Tp::Client::ConnectionInterfaceContactGroupsInterface::RemoveFromGroup ( const QString &  group,
const Tp::UIntList members 
) [inline, slot]

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

Remove the given members from the given group.

<tp:rationale>

This is good for user interfaces in which you can edit groups via drag-and-drop. </tp:rationale>

Any <tp:member-ref>GroupsChanged</tp:member-ref> or <tp:member-ref>GroupsRemoved</tp:member-ref> signals that result from this method call MUST be emitted before the method returns.

This method SHOULD NOT be called until the <tp:dbus-ref namespace="ofdT.Connection.Interface.ContactList">ContactListState</tp:dbus-ref> changes to Success. If the ContactListState is Failure, this method SHOULD raise the same error as <tp:dbus-ref namespace="ofdT.Connection.Interface.ContactList">GetContactListAttributes</tp:dbus-ref>.

Parameters:
group The group to alter. If it does not exist, then it has no members by definition, so this method SHOULD return successfully.
members The set of members to remove from the group. It is not an error to remove members who are already not in the group. If there are no members left in the group afterwards, the group MAY itself be removed.
QDBusPendingReply Tp::Client::ConnectionInterfaceContactGroupsInterface::RemoveGroup ( const QString &  group  )  [inline, slot]

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

Remove all members from the given group, then remove the group itself. If the group already does not exist, this method SHOULD return successfully.

Any <tp:member-ref>GroupsChanged</tp:member-ref> or <tp:member-ref>GroupsRemoved</tp:member-ref> signals that result from this method call MUST be emitted before the method returns.

This method SHOULD NOT be called until the <tp:dbus-ref namespace="ofdT.Connection.Interface.ContactList">ContactListState</tp:dbus-ref> changes to Success. If the ContactListState is Failure, this method SHOULD raise the same error as <tp:dbus-ref namespace="ofdT.Connection.Interface.ContactList">GetContactListAttributes</tp:dbus-ref>.

Parameters:
group The group to remove.
QDBusPendingReply Tp::Client::ConnectionInterfaceContactGroupsInterface::RenameGroup ( const QString &  oldName,
const QString &  newName 
) [inline, slot]

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

Rename the given group.

On protocols where groups behave like tags, this is an API short-cut for adding all of the group's members to a group with the new name, then removing the old group.

<tp:rationale>

Otherwise, clients can't perform this operation atomically, even if the connection could. </tp:rationale>

Any <tp:member-ref>GroupRenamed</tp:member-ref> or <tp:member-ref>GroupsRemoved</tp:member-ref> signals that result from this method call MUST be emitted before the method returns.

This method SHOULD NOT be called until the <tp:dbus-ref namespace="ofdT.Connection.Interface.ContactList">ContactListState</tp:dbus-ref> changes to Success. If the ContactListState is Failure, this method SHOULD raise the same error as <tp:dbus-ref namespace="ofdT.Connection.Interface.ContactList">GetContactListAttributes</tp:dbus-ref>.

Parameters:
oldName The group to rename.
newName The new name for the group.
void Tp::Client::ConnectionInterfaceContactGroupsInterface::GroupsChanged ( const Tp::UIntList contact,
const QStringList &  added,
const QStringList &  removed 
) [signal]

Represents the signal "GroupsChanged" on the remote object.

Emitted when contacts' groups change.

Parameters:
contact The relevant contacts.
added The names of groups to which the contacts were added.
removed The names of groups from which the contacts were removed.
void Tp::Client::ConnectionInterfaceContactGroupsInterface::GroupsCreated ( const QStringList &  names  )  [signal]

Represents the signal "GroupsCreated" on the remote object.

Emitted when new, empty groups are created. This will often be followed by GroupsChanged signals that add some members.

Parameters:
names The names of the new groups.
void Tp::Client::ConnectionInterfaceContactGroupsInterface::GroupRenamed ( const QString &  oldName,
const QString &  newName 
) [signal]

Represents the signal "GroupRenamed" on the remote object.

Emitted when a group is renamed, in protocols where this can be distinguished from group creation, removal and membership changes.

Immediately after this signal is emitted, <tp:member-ref>GroupsCreated</tp:member-ref> MUST signal the creation of a group with the new name, and <tp:member-ref>GroupsRemoved</tp:member-ref> MUST signal the removal of a group with the old name.

<tp:rationale>

Emitting these extra signals, in this order, means that clients that are interested in the set of groups that exist (but treat a rename and a create/remove pair identically) can ignore the GroupRenamed signal entirely. </tp:rationale>

If the group was not empty, immediately after those signals are emitted, <tp:member-ref>GroupsChanged</tp:member-ref> MUST signal that the members of that group were removed from the old name and added to the new name.

On connection managers where groups behave like tags, renaming a group MAY be signalled as a set of <tp:member-ref>GroupsCreated</tp:member-ref>, <tp:member-ref>GroupsRemoved</tp:member-ref> and <tp:member-ref>GroupsChanged</tp:member-ref> signals, instead of emitting this signal.

<tp:rationale>

On protocols like XMPP, another resource "renaming a group" is indistinguishable from changing contacts' groups individually. </tp:rationale>

Parameters:
oldName The old name of the group.
newName The new name of the group.
void Tp::Client::ConnectionInterfaceContactGroupsInterface::GroupsRemoved ( const QStringList &  names  )  [signal]

Represents the signal "GroupsRemoved" on the remote object.

Emitted when one or more groups are removed. If they had members at the time that they were removed, then immediately after this signal is emitted, <tp:member-ref>GroupsChanged</tp:member-ref> MUST signal that their members were removed.

<tp:rationale>

Emitting the signals in this order allows for two modes of operation. A client interested only in a contact's set of groups can ignore <tp:member-ref>GroupsRemoved</tp:member-ref> and rely on the <tp:member-ref>GroupsChanged</tp:member-ref> signal that will follow; a more elaborate client wishing to distinguish between all of a group's members being removed, and the group itself being removed, can additionally watch for <tp:member-ref>GroupsRemoved</tp:member-ref> and use it to disambiguate. </tp:rationale>

Parameters:
names The names of the groups.
void Tp::Client::ConnectionInterfaceContactGroupsInterface::invalidate ( Tp::DBusProxy proxy,
const QString &  error,
const QString &  message 
) [protected, virtual]

Reimplemented from Tp::AbstractInterface.


Property Documentation

bool Tp::Client::ConnectionInterfaceContactGroupsInterface::DisjointGroups [read]

Represents property "DisjointGroups" on the remote object.

True if each contact can be in at most one group; false if each contact can be in many groups.

This property cannot change after the connection has moved to the Connected state. Until then, its value is undefined, and it may change at any time, without notification.

uint Tp::Client::ConnectionInterfaceContactGroupsInterface::GroupStorage [read]

Represents property "GroupStorage" on the remote object.

Indicates the extent to which contacts' groups can be set and stored. This property cannot change after the connection has moved to the Connected state. Until then, its value is undefined, and it may change at any time, without notification.

QStringList Tp::Client::ConnectionInterfaceContactGroupsInterface::Groups [read]

Represents property "Groups" on the remote object.

The names of all groups that currently exist. This may be a larger set than the union of all contacts' groups contact attributes, if the connection allows groups to be empty.

Change notification is via <tp:member-ref>GroupsCreated</tp:member-ref> and <tp:member-ref>GroupsRemoved</tp:member-ref>; clients can also distinguish between a create/remove pair and a renamed group by receiving <tp:member-ref>GroupRenamed</tp:member-ref>.

This property's value is not meaningful until the <tp:dbus-ref namespace="ofdT.Connection.Interface.ContactList">ContactListState</tp:dbus-ref> has become Success.


Copyright © 2008-2010 Collabora Ltd. and Nokia Corporation
Telepathy-Qt4 0.4.4