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

#include <TelepathyQt/Connection>

Inherits Tp::AbstractInterface.

Public Slots

QDBusPendingReply AddStatus (const QString &status, const QVariantMap &parameters, int timeout=-1)
 
QDBusPendingReply ClearStatus (int timeout=-1)
 
QDBusPendingReply< Tp::ContactPresencesGetPresence (const Tp::UIntList &contacts, int timeout=-1)
 
QDBusPendingReply< Tp::StatusSpecMapGetStatuses (int timeout=-1)
 
QDBusPendingReply RemoveStatus (const QString &status, int timeout=-1)
 
QDBusPendingReply RequestPresence (const Tp::UIntList &contacts, int timeout=-1)
 
QDBusPendingReply SetLastActivityTime (uint time, int timeout=-1)
 
QDBusPendingReply SetStatus (const Tp::MultipleStatusMap &statuses, int timeout=-1)
 

Signals

void PresenceUpdate (const Tp::ContactPresences &presence)
 
- Signals inherited from Tp::AbstractInterface
void propertiesChanged (const QVariantMap &changedProperties, const QStringList &invalidatedProperties)
 

Public Member Functions

 ConnectionInterfacePresenceInterface (const QString &busName, const QString &objectPath, QObject *parent=0)
 
 ConnectionInterfacePresenceInterface (const QDBusConnection &connection, const QString &busName, const QString &objectPath, QObject *parent=0)
 
 ConnectionInterfacePresenceInterface (Tp::DBusProxy *proxy)
 
 ConnectionInterfacePresenceInterface (const Tp::Client::ConnectionInterface &mainInterface)
 
 ConnectionInterfacePresenceInterface (const Tp::Client::ConnectionInterface &mainInterface, QObject *parent)
 
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
 

Static Public Member Functions

static QLatin1String staticInterfaceName ()
 

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
 

Additional Inherited Members

- Protected Slots inherited from Tp::AbstractInterface

Detailed Description

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

Constructor & Destructor Documentation

◆ ConnectionInterfacePresenceInterface() [1/5]

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

Creates a ConnectionInterfacePresenceInterface 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.

◆ ConnectionInterfacePresenceInterface() [2/5]

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

Creates a ConnectionInterfacePresenceInterface 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.

◆ ConnectionInterfacePresenceInterface() [3/5]

Tp::Client::ConnectionInterfacePresenceInterface::ConnectionInterfacePresenceInterface ( Tp::DBusProxy proxy)

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

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

◆ ConnectionInterfacePresenceInterface() [4/5]

Tp::Client::ConnectionInterfacePresenceInterface::ConnectionInterfacePresenceInterface ( const Tp::Client::ConnectionInterface mainInterface)
explicit

Creates a ConnectionInterfacePresenceInterface 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.

◆ ConnectionInterfacePresenceInterface() [5/5]

Tp::Client::ConnectionInterfacePresenceInterface::ConnectionInterfacePresenceInterface ( const Tp::Client::ConnectionInterface mainInterface,
QObject *  parent 
)

Creates a ConnectionInterfacePresenceInterface 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::ConnectionInterfacePresenceInterface::staticInterfaceName ( )
inlinestatic

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

Returns
The D-Bus interface name.

◆ requestAllProperties()

Tp::PendingVariantMap* Tp::Client::ConnectionInterfacePresenceInterface::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.

◆ AddStatus

QDBusPendingReply Tp::Client::ConnectionInterfacePresenceInterface::AddStatus ( const QString &  status,
const QVariantMap &  parameters,
int  timeout = -1 
)
inlineslot

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

Request that a single presence status is published for the user, along with any desired parameters. Changes will be indicated by PresenceUpdate signals being emitted.

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

Parameters
status
The string identifier of the desired status
parameters
A dictionary of optional parameter names mapped to their 
variant-boxed values
timeoutThe timeout in milliseconds.

◆ ClearStatus

QDBusPendingReply Tp::Client::ConnectionInterfacePresenceInterface::ClearStatus ( int  timeout = -1)
inlineslot

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

Request that all of a user's presence statuses be removed. Be aware that this request may simply result in the statuses being replaced by a default available status. Changes will be indicated by PresenceUpdate signals being emitted.

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

Parameters
timeoutThe timeout in milliseconds.

◆ GetPresence

QDBusPendingReply<Tp::ContactPresences> Tp::Client::ConnectionInterfacePresenceInterface::GetPresence ( const Tp::UIntList contacts,
int  timeout = -1 
)
inlineslot

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

Get presence previously emitted by PresenceUpdate for the given contacts. Data is returned in the same structure as the PresenceUpdate signal. Using this method in favour of RequestPresence has the advantage that it will not wake up each client connected to the PresenceUpdate signal.

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

Parameters
contacts
An array of the contacts whose presence should be obtained
timeoutThe timeout in milliseconds.
Returns
Presence information in the same format as for the PresenceUpdate 
signal

◆ GetStatuses

QDBusPendingReply<Tp::StatusSpecMap> Tp::Client::ConnectionInterfacePresenceInterface::GetStatuses ( int  timeout = -1)
inlineslot

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

Get a dictionary of the valid presence statuses for this connection. This is only available when online because only some statuses will be available on some servers.

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

Parameters
timeoutThe timeout in milliseconds.
Returns
A dictionary of string identifiers mapped to a struct for each 
status, containing: a type value from one of the values above a 
boolean to indicate if this status may be set on yourself a boolean 
to indicate if this is an exclusive status which you may not set 
alongside any other a dictionary of valid optional string argument 
names mapped to their types

◆ RemoveStatus

QDBusPendingReply Tp::Client::ConnectionInterfacePresenceInterface::RemoveStatus ( const QString &  status,
int  timeout = -1 
)
inlineslot

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

Request that the given presence status is no longer published for the user. Changes will be indicated by PresenceUpdate signals being emitted. As with ClearStatus, removing a status may actually result in it being replaced by a default available status.

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

Parameters
status
The string identifier of the status not to publish anymore for the 
user
timeoutThe timeout in milliseconds.

◆ RequestPresence

QDBusPendingReply Tp::Client::ConnectionInterfacePresenceInterface::RequestPresence ( const Tp::UIntList contacts,
int  timeout = -1 
)
inlineslot

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

Request the presence for contacts on this connection. A PresenceUpdate signal will be emitted when they are received. This is not the same as subscribing to the presence of a contact, which must be done using the 'subscription' ContactList, and on some protocols presence information may not be available unless a subscription exists.

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

Parameters
contacts
An array of the contacts whose presence should be obtained
timeoutThe timeout in milliseconds.

◆ SetLastActivityTime

QDBusPendingReply Tp::Client::ConnectionInterfacePresenceInterface::SetLastActivityTime ( uint  time,
int  timeout = -1 
)
inlineslot

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

Request that the recorded last activity time for the user be updated on the server.

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

Parameters
time
A UNIX timestamp of the user&apos;s last activity time (in UTC)
timeoutThe timeout in milliseconds.

◆ SetStatus

QDBusPendingReply Tp::Client::ConnectionInterfacePresenceInterface::SetStatus ( const Tp::MultipleStatusMap statuses,
int  timeout = -1 
)
inlineslot

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

Request that the user's presence be changed to the given statuses and desired parameters. Changes will be reflected by PresenceUpdate() signals being emitted.

Statuses whose Connection_Presence_Type is Offline, Error or Unknown MUST NOT be passed to this function. Connection managers SHOULD reject these statuses.

On certain protocols, this method may be called on a newly-created connection which is still in the DISCONNECTED state, and will sign on with the requested status. If the requested status is not available after signing on, NotAvailable will be returned and the connection will remain offline, or if the protocol does not support signing on with a certain status, Disconnected will be returned.

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

Parameters
statuses
A dictionary mapping status identifiers to dictionaries, which map 
optional parameter names to their variant-boxed values
timeoutThe timeout in milliseconds.

◆ PresenceUpdate

void Tp::Client::ConnectionInterfacePresenceInterface::PresenceUpdate ( const Tp::ContactPresences presence)
signal

Represents the signal PresenceUpdate on the remote object.

This signal should be emitted when your own presence has been changed, or the presence of the member of any of the connection's channels has been changed, or when the presence requested by RequestPresence is available.

Parameters
presence
A dictionary of contact handles mapped to a struct containing a 
UNIX timestamp of the last activity time (in UTC), and a dictionary 
mapping the contact&apos;s current status identifiers to a 
dictionary of optional parameter names mapped to their 
variant-boxed values

◆ invalidate()

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

Reimplemented from Tp::AbstractInterface.