Home · All Classes · All Namespaces · Modules · Functions · Files |
#include <TelepathyQt/_gen/svc-connection.h>
Inherits Tp::AbstractAdaptor.
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 |
Adaptor class providing a 1:1 mapping of the D-Bus interface "org.freedesktop.Telepathy.Connection.Interface.ContactGroups".
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.
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.
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.
Groups
.
|
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() .
contact | The contact to alter. |
groups | The set of groups which the contact should be in. |
|
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() .
group | The group to alter. |
members | The set of members for the group. If this set is empty, this method MAY remove the group. |
|
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() .
group | The group to alter. |
members | The set of members to include in the group. |
|
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() .
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. |
|
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() .
group | The group to remove. |
|
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() .
oldName | The group to rename. |
newName | The new name for the group. |
|
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.
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. |
|
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.
names | The names of the new groups. |
|
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.
oldName | The old name of the group. |
newName | The new name of the group. |
|
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.
names | The names of the groups. |
Copyright © 2008-2011 Collabora Ltd. and Nokia Corporation | Telepathy-Qt 0.9.7 |