Home · Modules · All Classes · All Namespaces |
#include <TelepathyQt/_gen/svc-connection.h>
Inherits Tp::AbstractAdaptor.
Public Slots | |
void | SetPresence (const QString &status, const QString &statusMessage, const QDBusMessage &dbusMessage) |
Tp::SimpleContactPresences | GetPresences (const Tp::UIntList &contacts, const QDBusMessage &dbusMessage) |
Signals | |
void | PresencesChanged (const Tp::SimpleContactPresences &presence) |
Public Member Functions | |
Tp::SimpleStatusSpecMap | Statuses () const |
uint | MaximumStatusMessageLength () 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.SimplePresence".
Tp::SimpleStatusSpecMap Tp::Service::ConnectionInterfaceSimplePresenceAdaptor::Statuses | ( | ) | const |
Return the value of the exported D-Bus object property Statuses
of type Tp::SimpleStatusSpecMap
.
Adaptees should export this property as a Qt property named 'statuses' with type Tp::SimpleStatusSpecMap.
A dictionary where the keys are the presence statuses that are available on this connection, and the values are the corresponding presence types.
While the connection is in the DISCONNECTED state, it contains the set of presence statuses allowed to be set before connecting. The connection manager will attempt to set the appropriate status when the connection becomes connected, but cannot necessarily guarantee it. The available statuses cannot change until the connection status changes, so there is no change notification.
While the connection is in the CONNECTED state, this property contains the set of presence statuses which are actually available on this protocol. This set is constant for the remaining lifetime of the connection, so again, there is no change notification.
While the connection is in the CONNECTING state, the value of this property is undefined and SHOULD NOT be used. It can change at any time without notification (in particular, any cached values from when the connection was in the DISCONNECTED or CONNECTING state MUST NOT be assumed to still be correct when the state has become CONNECTED).
This property MUST include the special statuses "unknown" and "error" if and only if the connection manager can emit them as a contact's status.
Statuses
. uint Tp::Service::ConnectionInterfaceSimplePresenceAdaptor::MaximumStatusMessageLength | ( | ) | const |
Return the value of the exported D-Bus object property MaximumStatusMessageLength
of type uint
.
Adaptees should export this property as a Qt property named 'maximumStatusMessageLength' with type uint.
The maximum length in characters for any individual status message, or 0 if there is no limit.
While the connection is in the DISCONNECTED state, this property will be 0. The connection manager will attempt to set the appropriate value when the connection becomes connected, but cannot necessarily guarantee it. The maximum length cannot change until the connection status changes, so there is no change notification.
While the connection is in the CONNECTED state, this property contains the maximum length in characters for any individual status message which is actually allowed on this protocol. This value is constant for the remaining lifetime of the connection, so again, there is no change notification.
While the connection is in the CONNECTING state, the value of this property is undefined and SHOULD NOT be used. It can change at any time without notification (in particular, any cached values from when the connection was in the DISCONNECTED or CONNECTING state MUST NOT be assumed to still be correct when the state has become CONNECTED).
If a message passed to SetPresence() is longer than allowed by this property, the connection manager MUST truncate the supplied message; when emitting PresencesChanged() , the truncated version of the message MUST be used.
Some XMPP servers, like Google Talk, define a maximum length for status messages. Whether the user's server is one of these cannot be detected until quite late in the connection process.
MaximumStatusMessageLength
.
|
slot |
Begins a call to the exported D-Bus method SetPresence
on this object.
Adaptees should export this method as a Qt slot with the following signature: void setPresence(const QString& status, const QString& statusMessage, const Tp::Service::ConnectionInterfaceSimplePresenceAdaptor::SetPresenceContextPtr &context);
Implementations should call MethodInvocationContext::setFinished (or setFinishedWithError accordingly) on the received context object once the method has finished processing.
Request that the presence status and status message are published for the connection. Changes will be indicated by PresencesChanged() signals being emitted.
This method may be called on a newly-created connection while it is still in the DISCONNECTED state, to request that when the connection connects, it will do so with the selected status.
In DISCONNECTED state the Statuses property will indicate which statuses are allowed to be set while DISCONNECTED (none, if the Connection Manager doesn't allow this). This value MUST NOT be cached, as the set of allowed presences might change upon connecting.
status |
The string identifier of the desired status. Possible status identifiers are defined in the \\\ \\link requestPropertyStatuses() Statuses \\endlink \\htmlonly property. |
Clients MUST NOT set a status whose string value they do not recognise, even if its presence type in Statuses matches what the user requested.
Statuses whose <tp:type>Connection_Presence_Type</tp:type> is Offline, Error or Unknown MUST NOT be passed to this function. Connection managers SHOULD reject these statuses.
statusMessage | The status message associated with the current status. |
|
slot |
Begins a call to the exported D-Bus method GetPresences
on this object.
Adaptees should export this method as a Qt slot with the following signature: void getPresences(const Tp::UIntList& contacts, const Tp::Service::ConnectionInterfaceSimplePresenceAdaptor::GetPresencesContextPtr &context);
Implementations should call MethodInvocationContext::setFinished (or setFinishedWithError accordingly) on the received context object once the method has finished processing.
Get presence previously emitted by PresencesChanged for the given contacts. Data is returned in the same structure as the PresencesChanged signal; no additional network requests are made.
contacts | An array of the contacts whose presence should be obtained. |
Presence information in the same format as for the \\\ PresencesChanged() \\htmlonly signal. The returned mapping MUST include an entry for each contact in the method's argument.
The definition of the connection presence types Unknown and Offline means that if a connection manager will return Unknown for contacts not on the subscribe list, it MUST delay the reply to this method call until it has found out which contacts are, in fact, on the subscribe list.
|
signal |
Represents the exported D-Bus signal PresencesChanged
on this object.
Adaptees should export this signal as a Qt signal with the following signature: void presencesChanged(const Tp::SimpleContactPresences& presence);
The adaptee signal will be automatically relayed as a D-Bus signal once emitted.
presence | A dictionary of contact handles mapped to the status, presence type and status message. |
TelepathyQt 0.9.8 | Generated by 1.8.15 |