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

Public Slots | Signals | Public Member Functions | List of all members
Tp::Service::ConnectionInterfaceContactGroupsAdaptor Class Reference
Service-side implementation » Connection service implementation

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

Inheritance diagram for Tp::Service::ConnectionInterfaceContactGroupsAdaptor:
[legend]

## Public Slots

void | SetContactGroups (uint contact, const QStringList &groups, const QDBusMessage &dbusMessage)
void | SetGroupMembers (const QString &group, const Tp::UIntList &members, const QDBusMessage &dbusMessage)
void | AddToGroup (const QString &group, const Tp::UIntList &members, const QDBusMessage &dbusMessage)
void | RemoveFromGroup (const QString &group, const Tp::UIntList &members, const QDBusMessage &dbusMessage)
void | RemoveGroup (const QString &group, const QDBusMessage &dbusMessage)
void | RenameGroup (const QString &oldName, const QString &newName, const QDBusMessage &dbusMessage)

## Signals

void | GroupsChanged (const Tp::UIntList &contact, const QStringList &added, const QStringList &removed)
void | GroupsCreated (const QStringList &names)
void | GroupRenamed (const QString &oldName, const QString &newName)
void | GroupsRemoved (const QStringList &names)

## Public Member Functions

bool | DisjointGroups () const
uint | GroupStorage () const
QStringList | Groups () const
Public Member Functions inherited from Tp::AbstractAdaptor
| AbstractAdaptor (const QDBusConnection &connection, QObject *adaptee, QObject *parent)
| ~AbstractAdaptor ()
QDBusConnection | dbusConnection () const
QObject * | adaptee () const
Public Member Functions inherited from QDBusAbstractAdaptor
| ~QDBusAbstractAdaptor ()
Public Member Functions inherited from QObject
| QObject (QObject *parent)
virtual | ~QObject ()
virtual bool | event (QEvent *e)
virtual bool | eventFilter (QObject *watched, QEvent *event)
virtual const QMetaObject * | metaObject () const
QString | objectName () const
void | setObjectName (const QString &name)
bool | isWidgetType () const
bool | signalsBlocked () const
bool | blockSignals (bool block)
QThread * | thread () const
void | moveToThread (QThread *targetThread)
int | startTimer (int interval)
void | killTimer (int id)
T | findChild (const QString &name) const
QList< T > | findChildren (const QString &name) const
QList< T > | findChildren (const QRegExp &regExp) const
QObject * | child (const char *objName, const char *inheritsClass, bool recursiveSearch) const
const QObjectList & | children () const
void | setParent (QObject *parent)
void | installEventFilter (QObject *filterObj)
void | removeEventFilter (QObject *obj)
bool | connect (const QObject *sender, const char *signal, const char *method, Qt::ConnectionType type) const
bool | disconnect (const char *signal, const QObject *receiver, const char *method)
bool | disconnect (const QObject *receiver, const char *method)
void | dumpObjectTree ()
void | dumpObjectInfo ()
bool | setProperty (const char *name, const QVariant &value)
QVariant | property (const char *name) const
QList< QByteArray > | dynamicPropertyNames () const
void | destroyed (QObject *obj)
QObject * | parent () const
bool | inherits (const char *className) const
void | deleteLater ()
| QObject (QObject *parent, const char *name)
void | insertChild (QObject *object)
void | removeChild (QObject *object)
bool | isA (const char *className) const
const char * | className () const
const char * | name () const
const char * | name (const char *defaultName) const
void | setName (const char *name)

## Additional Inherited Members

Static Public Member Functions inherited from QObject
QString | tr (const char *sourceText, const char *disambiguation, int n)
QString | trUtf8 (const char *sourceText, const char *disambiguation, int n)
bool | connect (const QObject *sender, const char *signal, const QObject *receiver, const char *method, Qt::ConnectionType type)
bool | connect (const QObject *sender, const QMetaMethod &signal, const QObject *receiver, const QMetaMethod &method, Qt::ConnectionType type)
bool | disconnect (const QObject *sender, const char *signal, const QObject *receiver, const char *method)
bool | disconnect (const QObject *sender, const QMetaMethod &signal, const QObject *receiver, const QMetaMethod &method)
Protected Member Functions inherited from QDBusAbstractAdaptor
| QDBusAbstractAdaptor (QObject *obj)
void | setAutoRelaySignals (bool enable)
bool | autoRelaySignals () const
Protected Member Functions inherited from QObject
QObject * | sender () const
int | senderSignalIndex () const
int | receivers (const char *signal) const
virtual void | timerEvent (QTimerEvent *event)
virtual void | childEvent (QChildEvent *event)
virtual void | customEvent (QEvent *event)
virtual void | connectNotify (const char *signal)
virtual void | disconnectNotify (const char *signal)
bool | checkConnectArgs (const char *signal, const QObject *object, const char *method)
Static Protected Member Functions inherited from QObject
QByteArray | normalizeSignalSlot (const char *signalSlot)
Properties inherited from QObject
| objectName

## Detailed Description

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

## Member Function Documentation

bool Tp::Service::ConnectionInterfaceContactGroupsAdaptor::DisjointGroups | ( |  | ) | const

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`.

uint Tp::Service::ConnectionInterfaceContactGroupsAdaptor::GroupStorage | ( |  | ) | const

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`.

QStringList Tp::Service::ConnectionInterfaceContactGroupsAdaptor::Groups | ( |  | ) | const

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

  contact

      The contact to alter.

  groups

      The 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

  group

      The group to alter.

  members

      The 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

  group

      The group to alter.

  members

      The 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

  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.

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

  group

      The 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

  oldName

      The group to rename.

  newName

      The 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

  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::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

  names

      The 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

  oldName

      The old name of the group.

  newName

      The 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

  names

      The names of the groups.