Home · All Classes · All Namespaces · Modules · Functions · Files
Public Slots | Signals | Public Member Functions | Static Public Member Functions | Protected Member Functions | List of all members
Tp::Client::ConnectionInterfaceContactGroupsInterface Class Reference

#include <TelepathyQt/Connection>

Inheritance diagram for Tp::Client::ConnectionInterfaceContactGroupsInterface:
Inheritance graph
[legend]

Public Slots

QDBusPendingReply SetContactGroups (uint contact, const QStringList &groups, int timeout=-1)
 
QDBusPendingReply SetGroupMembers (const QString &group, const Tp::UIntList &members, int timeout=-1)
 
QDBusPendingReply AddToGroup (const QString &group, const Tp::UIntList &members, int timeout=-1)
 
QDBusPendingReply RemoveFromGroup (const QString &group, const Tp::UIntList &members, int timeout=-1)
 
QDBusPendingReply RemoveGroup (const QString &group, int timeout=-1)
 
QDBusPendingReply RenameGroup (const QString &oldName, const QString &newName, int timeout=-1)
 

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)
 
- Signals inherited from Tp::AbstractInterface
void propertiesChanged (const QVariantMap &changedProperties, const QStringList &invalidatedProperties)
 

Public Member Functions

 ConnectionInterfaceContactGroupsInterface (const QString &busName, const QString &objectPath, QObject *parent=0)
 
 ConnectionInterfaceContactGroupsInterface (const QDBusConnection &connection, const QString &busName, const QString &objectPath, QObject *parent=0)
 
 ConnectionInterfaceContactGroupsInterface (Tp::DBusProxy *proxy)
 
 ConnectionInterfaceContactGroupsInterface (const Tp::Client::ConnectionInterface &mainInterface)
 
 ConnectionInterfaceContactGroupsInterface (const Tp::Client::ConnectionInterface &mainInterface, QObject *parent)
 
Tp::PendingVariantrequestPropertyDisjointGroups () const
 
Tp::PendingVariantrequestPropertyGroupStorage () const
 
Tp::PendingVariantrequestPropertyGroups () const
 
Tp::PendingVariantMaprequestAllProperties () const
 
- Public Member Functions inherited from Tp::AbstractInterface
virtual ~AbstractInterface ()
 
bool isValid () const
 
QString invalidationReason () const
 
QString invalidationMessage () const
 
void setMonitorProperties (bool monitorProperties)
 
bool isMonitoringProperties () const
 
- Public Member Functions inherited from QDBusAbstractInterface
virtual ~QDBusAbstractInterface ()
 
bool isValid () const
 
QDBusConnection connection () const
 
QString service () const
 
QString path () const
 
QString interface () const
 
QDBusError lastError () const
 
void setTimeout (int timeout)
 
int timeout () const
 
QDBusMessage call (const QString &method, const QVariant &arg1, const QVariant &arg2, const QVariant &arg3, const QVariant &arg4, const QVariant &arg5, const QVariant &arg6, const QVariant &arg7, const QVariant &arg8)
 
QDBusMessage call (QDBus::CallMode mode, const QString &method, const QVariant &arg1, const QVariant &arg2, const QVariant &arg3, const QVariant &arg4, const QVariant &arg5, const QVariant &arg6, const QVariant &arg7, const QVariant &arg8)
 
QDBusMessage callWithArgumentList (QDBus::CallMode mode, const QString &method, const QList< QVariant > &args)
 
bool callWithCallback (const QString &method, const QList< QVariant > &args, QObject *receiver, const char *returnMethod, const char *errorMethod)
 
bool callWithCallback (const QString &method, const QList< QVariant > &args, QObject *receiver, const char *slot)
 
QDBusPendingCall asyncCall (const QString &method, const QVariant &arg1, const QVariant &arg2, const QVariant &arg3, const QVariant &arg4, const QVariant &arg5, const QVariant &arg6, const QVariant &arg7, const QVariant &arg8)
 
QDBusPendingCall asyncCallWithArgumentList (const QString &method, const QList< QVariant > &args)
 
- 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 QMetaObjectmetaObject () const
 
QString objectName () const
 
void setObjectName (const QString &name)
 
bool isWidgetType () const
 
bool signalsBlocked () const
 
bool blockSignals (bool block)
 
QThreadthread () const
 
void moveToThread (QThread *targetThread)
 
int startTimer (int interval)
 
void killTimer (int id)
 
findChild (const QString &name) const
 
QList< T > findChildren (const QString &name) const
 
QList< T > findChildren (const QRegExp &regExp) const
 
QObjectchild (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< QByteArraydynamicPropertyNames () const
 
void destroyed (QObject *obj)
 
QObjectparent () 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)
 

Static Public Member Functions

static QLatin1String staticInterfaceName ()
 
- 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

virtual void invalidate (Tp::DBusProxy *, const QString &, const QString &)
 
- Protected Member Functions inherited from Tp::AbstractInterface
 AbstractInterface (DBusProxy *proxy, const QLatin1String &interface)
 
 AbstractInterface (const QString &busName, const QString &path, const QLatin1String &interface, const QDBusConnection &connection, QObject *parent)
 
PendingVariantinternalRequestProperty (const QString &name) const
 
PendingOperationinternalSetProperty (const QString &name, const QVariant &newValue)
 
PendingVariantMapinternalRequestAllProperties () const
 
- Protected Member Functions inherited from QObject
QObjectsender () 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)
 

Additional Inherited Members

- Protected Slots inherited from Tp::AbstractInterface
- Static Protected Member Functions inherited from QObject
QByteArray normalizeSignalSlot (const char *signalSlot)
 
- Properties inherited from QObject
 objectName
 

Detailed Description

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

Constructor & Destructor Documentation

◆ ConnectionInterfaceContactGroupsInterface() [1/5]

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
busNameName of the service the object is on.
objectPathPath to the object on the service.
parentPassed to the parent class constructor.

◆ ConnectionInterfaceContactGroupsInterface() [2/5]

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
connectionThe bus via which the object can be reached.
busNameName of the service the object is on.
objectPathPath to the object on the service.
parentPassed to the parent class constructor.

◆ ConnectionInterfaceContactGroupsInterface() [3/5]

Tp::Client::ConnectionInterfaceContactGroupsInterface::ConnectionInterfaceContactGroupsInterface ( Tp::DBusProxy proxy)

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

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

◆ ConnectionInterfaceContactGroupsInterface() [4/5]

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
mainInterfaceThe proxy to use.

◆ ConnectionInterfaceContactGroupsInterface() [5/5]

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
mainInterfaceThe proxy to use.
parentPassed to the parent class constructor.

Member Function Documentation

◆ staticInterfaceName()

static QLatin1String Tp::Client::ConnectionInterfaceContactGroupsInterface::staticInterfaceName ( )
inlinestatic

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

Returns
The D-Bus interface name.

◆ requestPropertyDisjointGroups()

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.

◆ requestPropertyGroupStorage()

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.

◆ requestPropertyGroups()

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 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
A pending variant which will emit finished when the property has been retrieved.

◆ requestAllProperties()

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.

◆ SetContactGroups

QDBusPendingReply Tp::Client::ConnectionInterfaceContactGroupsInterface::SetContactGroups ( uint  contact,
const QStringList groups,
int  timeout = -1 
)
inlineslot

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.

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() .

Note that timeout is ignored as of now. It will be used once http://bugreports.qt.nokia.com/browse/QTBUG-11775 is fixed.

Parameters
contact
The contact to alter.
groups
The set of groups which the contact should be in.
timeoutThe timeout in milliseconds.

◆ SetGroupMembers

QDBusPendingReply Tp::Client::ConnectionInterfaceContactGroupsInterface::SetGroupMembers ( const QString group,
const Tp::UIntList members,
int  timeout = -1 
)
inlineslot

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.

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() .

Note that timeout is ignored as of now. It will be used once http://bugreports.qt.nokia.com/browse/QTBUG-11775 is fixed.

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.
timeoutThe timeout in milliseconds.

◆ AddToGroup

QDBusPendingReply Tp::Client::ConnectionInterfaceContactGroupsInterface::AddToGroup ( const QString group,
const Tp::UIntList members,
int  timeout = -1 
)
inlineslot

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 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() .

Note that timeout is ignored as of now. It will be used once http://bugreports.qt.nokia.com/browse/QTBUG-11775 is fixed.

Parameters
group
The group to alter.
members
The set of members to include in the group.
timeoutThe timeout in milliseconds.

◆ RemoveFromGroup

QDBusPendingReply Tp::Client::ConnectionInterfaceContactGroupsInterface::RemoveFromGroup ( const QString group,
const Tp::UIntList members,
int  timeout = -1 
)
inlineslot

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

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() .

Note that timeout is ignored as of now. It will be used once http://bugreports.qt.nokia.com/browse/QTBUG-11775 is fixed.

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.
timeoutThe timeout in milliseconds.

◆ RemoveGroup

QDBusPendingReply Tp::Client::ConnectionInterfaceContactGroupsInterface::RemoveGroup ( const QString group,
int  timeout = -1 
)
inlineslot

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 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() .

Note that timeout is ignored as of now. It will be used once http://bugreports.qt.nokia.com/browse/QTBUG-11775 is fixed.

Parameters
group
The group to remove.
timeoutThe timeout in milliseconds.

◆ RenameGroup

QDBusPendingReply Tp::Client::ConnectionInterfaceContactGroupsInterface::RenameGroup ( const QString oldName,
const QString newName,
int  timeout = -1 
)
inlineslot

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.

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() .

Note that timeout is ignored as of now. It will be used once http://bugreports.qt.nokia.com/browse/QTBUG-11775 is fixed.

Parameters
oldName
The group to rename.
newName
The new name for the group.
timeoutThe timeout in milliseconds.

◆ GroupsChanged

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.

◆ GroupsCreated

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.

◆ GroupRenamed

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, GroupsCreated() MUST signal the creation of a group with the new name, and GroupsRemoved() MUST signal the removal of a group with the old name.

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.

If the group was not empty, immediately after those signals are emitted, GroupsChanged() 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 GroupsCreated() , GroupsRemoved() and GroupsChanged() signals, instead of emitting this signal.

On protocols like XMPP, another resource "renaming a group" is indistinguishable from changing contacts' groups individually.

Parameters
oldName
The old name of the group.
newName
The new name of the group.

◆ GroupsRemoved

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, GroupsChanged() MUST signal that their members were removed.

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 GroupsRemoved() and rely on the GroupsChanged() 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 GroupsRemoved() and use it to disambiguate.

Parameters
names
The names of the groups.

◆ invalidate()

void Tp::Client::ConnectionInterfaceContactGroupsInterface::invalidate ( Tp::DBusProxy proxy,
const QString error,
const QString message 
)
protectedvirtual

Reimplemented from Tp::AbstractInterface.


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