Home · All Classes · All Namespaces · Modules · Functions · Files
Public Slots | Signals | Public Member Functions
Tp::Service::ConnectionInterfaceContactGroupsAdaptor Class Reference

#include <TelepathyQt/_gen/svc-connection.h>

Inherits Tp::AbstractAdaptor.

List of all members.

Public Slots

Signals

Public Member Functions


Detailed Description

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


Member Function Documentation

Return the value of the exported D-Bus object property DisjointGroups of type bool.

Adaptees should export this property as a Qt property named 'disjointGroups' with 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:
The value of exported property DisjointGroups.

Return the value of the exported D-Bus object property GroupStorage of type uint.

Adaptees should export this property as a Qt property named 'groupStorage' with 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:
The value of exported property GroupStorage.

Return the value of the exported D-Bus object property Groups of type QStringList.

Adaptees should export this property as a Qt property named 'groups' with 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 GroupsCreated() and GroupsRemoved() ; clients can also distinguish between a create/remove pair and a renamed group by receiving GroupRenamed() .

This property's value is not meaningful until the ConnectionInterfaceContactListInterface::ContactListState has become Success.

Returns:
The value of exported property Groups.
void Tp::Service::ConnectionInterfaceContactGroupsAdaptor::SetContactGroups ( uint  contact,
const QStringList &  groups,
const QDBusMessage &  dbusMessage 
) [slot]

Begins a call to the exported D-Bus method SetContactGroups on this object.

Adaptees should export this method as a Qt slot with the following signature: void setContactGroups(uint contact, const QStringList& groups, const Tp::Service::ConnectionInterfaceContactGroupsAdaptor::SetContactGroupsContextPtr &context);

Implementations should call MethodInvocationContext::setFinished (or setFinishedWithError accordingly) on the received context object once the method has finished processing.

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

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.

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

In protocols like XMPP where groups behave like tags, a group with no members has no protocol representation.

Any GroupsCreated() , GroupsChanged() and GroupsRemoved() signals that result from this method call MUST be emitted before the method returns.

This method SHOULD NOT be called until the ConnectionInterfaceContactListInterface::ContactListState changes to Success. If the ContactListState is Failure, this method SHOULD raise the same error as ConnectionInterfaceContactListInterface::GetContactListAttributes() .

Parameters:
contactThe contact to alter.
groupsThe set of groups which the contact should be in.
void Tp::Service::ConnectionInterfaceContactGroupsAdaptor::SetGroupMembers ( const QString &  group,
const Tp::UIntList members,
const QDBusMessage &  dbusMessage 
) [slot]

Begins a call to the exported D-Bus method SetGroupMembers on this object.

Adaptees should export this method as a Qt slot with the following signature: void setGroupMembers(const QString& group, const Tp::UIntList& members, const Tp::Service::ConnectionInterfaceContactGroupsAdaptor::SetGroupMembersContextPtr &context);

Implementations should call MethodInvocationContext::setFinished (or setFinishedWithError accordingly) on the received context object once the method has finished processing.

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

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.

If DisjointGroups 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 GroupsCreated() , GroupsChanged() and GroupsRemoved() signals that result from this method call MUST be emitted before the method returns.

This method SHOULD NOT be called until the ConnectionInterfaceContactListInterface::ContactListState changes to Success. If the ContactListState is Failure, this method SHOULD raise the same error as ConnectionInterfaceContactListInterface::GetContactListAttributes() .

Parameters:
groupThe group to alter.
membersThe set of members for the group. If this set is empty, this method MAY remove the group.
void Tp::Service::ConnectionInterfaceContactGroupsAdaptor::AddToGroup ( const QString &  group,
const Tp::UIntList members,
const QDBusMessage &  dbusMessage 
) [slot]

Begins a call to the exported D-Bus method AddToGroup on this object.

Adaptees should export this method as a Qt slot with the following signature: void addToGroup(const QString& group, const Tp::UIntList& members, const Tp::Service::ConnectionInterfaceContactGroupsAdaptor::AddToGroupContextPtr &context);

Implementations should call MethodInvocationContext::setFinished (or setFinishedWithError accordingly) on the received context object once the method has finished processing.

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

If DisjointGroups is true, this will also remove each member from their previous group.

This is good for user interfaces in which you can edit groups via drag-and-drop.

Any GroupsCreated() , GroupsChanged() and GroupsRemoved() signals that result from this method call MUST be emitted before the method returns.

This method SHOULD NOT be called until the ConnectionInterfaceContactListInterface::ContactListState changes to Success. If the ContactListState is Failure, this method SHOULD raise the same error as ConnectionInterfaceContactListInterface::GetContactListAttributes() .

Parameters:
groupThe group to alter.
membersThe set of members to include in the group.
void Tp::Service::ConnectionInterfaceContactGroupsAdaptor::RemoveFromGroup ( const QString &  group,
const Tp::UIntList members,
const QDBusMessage &  dbusMessage 
) [slot]

Begins a call to the exported D-Bus method RemoveFromGroup on this object.

Adaptees should export this method as a Qt slot with the following signature: void removeFromGroup(const QString& group, const Tp::UIntList& members, const Tp::Service::ConnectionInterfaceContactGroupsAdaptor::RemoveFromGroupContextPtr &context);

Implementations should call MethodInvocationContext::setFinished (or setFinishedWithError accordingly) on the received context object once the method has finished processing.

Remove the given members from the given group.

This is good for user interfaces in which you can edit groups via drag-and-drop.

Any GroupsChanged() or GroupsRemoved() signals that result from this method call MUST be emitted before the method returns.

This method SHOULD NOT be called until the ConnectionInterfaceContactListInterface::ContactListState changes to Success. If the ContactListState is Failure, this method SHOULD raise the same error as ConnectionInterfaceContactListInterface::GetContactListAttributes() .

Parameters:
groupThe group to alter. If it does not exist, then it has no members by definition, so this method SHOULD return successfully.
membersThe 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.
void Tp::Service::ConnectionInterfaceContactGroupsAdaptor::RemoveGroup ( const QString &  group,
const QDBusMessage &  dbusMessage 
) [slot]

Begins a call to the exported D-Bus method RemoveGroup on this object.

Adaptees should export this method as a Qt slot with the following signature: void removeGroup(const QString& group, const Tp::Service::ConnectionInterfaceContactGroupsAdaptor::RemoveGroupContextPtr &context);

Implementations should call MethodInvocationContext::setFinished (or setFinishedWithError accordingly) on the received context object once the method has finished processing.

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 GroupsChanged() or GroupsRemoved() signals that result from this method call MUST be emitted before the method returns.

This method SHOULD NOT be called until the ConnectionInterfaceContactListInterface::ContactListState changes to Success. If the ContactListState is Failure, this method SHOULD raise the same error as ConnectionInterfaceContactListInterface::GetContactListAttributes() .

Parameters:
groupThe group to remove.
void Tp::Service::ConnectionInterfaceContactGroupsAdaptor::RenameGroup ( const QString &  oldName,
const QString &  newName,
const QDBusMessage &  dbusMessage 
) [slot]

Begins a call to the exported D-Bus method RenameGroup on this object.

Adaptees should export this method as a Qt slot with the following signature: void renameGroup(const QString& oldName, const QString& newName, const Tp::Service::ConnectionInterfaceContactGroupsAdaptor::RenameGroupContextPtr &context);

Implementations should call MethodInvocationContext::setFinished (or setFinishedWithError accordingly) on the received context object once the method has finished processing.

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.

Otherwise, clients can't perform this operation atomically, even if the connection could.

Any GroupRenamed() or GroupsRemoved() signals that result from this method call MUST be emitted before the method returns.

This method SHOULD NOT be called until the ConnectionInterfaceContactListInterface::ContactListState changes to Success. If the ContactListState is Failure, this method SHOULD raise the same error as ConnectionInterfaceContactListInterface::GetContactListAttributes() .

Parameters:
oldNameThe group to rename.
newNameThe new name for the group.
void Tp::Service::ConnectionInterfaceContactGroupsAdaptor::GroupsChanged ( const Tp::UIntList contact,
const QStringList &  added,
const QStringList &  removed 
) [signal]

Represents the exported D-Bus signal GroupsChanged on this object.

Adaptees should export this signal as a Qt signal with the following signature: void groupsChanged(const Tp::UIntList& contact, const QStringList& added, const QStringList& removed);

The adaptee signal will be automatically relayed as a D-Bus signal once emitted.

Parameters:
contactThe relevant contacts.
addedThe names of groups to which the contacts were added.
removedThe names of groups from which the contacts were removed.
void Tp::Service::ConnectionInterfaceContactGroupsAdaptor::GroupsCreated ( const QStringList &  names) [signal]

Represents the exported D-Bus signal GroupsCreated on this object.

Adaptees should export this signal as a Qt signal with the following signature: void groupsCreated(const QStringList& names);

The adaptee signal will be automatically relayed as a D-Bus signal once emitted.

Parameters:
namesThe names of the new groups.
void Tp::Service::ConnectionInterfaceContactGroupsAdaptor::GroupRenamed ( const QString &  oldName,
const QString &  newName 
) [signal]

Represents the exported D-Bus signal GroupRenamed on this object.

Adaptees should export this signal as a Qt signal with the following signature: void groupRenamed(const QString& oldName, const QString& newName);

The adaptee signal will be automatically relayed as a D-Bus signal once emitted.

Parameters:
oldNameThe old name of the group.
newNameThe new name of the group.
void Tp::Service::ConnectionInterfaceContactGroupsAdaptor::GroupsRemoved ( const QStringList &  names) [signal]

Represents the exported D-Bus signal GroupsRemoved on this object.

Adaptees should export this signal as a Qt signal with the following signature: void groupsRemoved(const QStringList& names);

The adaptee signal will be automatically relayed as a D-Bus signal once emitted.

Parameters:
namesThe names of the groups.


Copyright © 2008-2011 Collabora Ltd. and Nokia Corporation
Telepathy-Qt 0.9.6.1