| 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::ChannelDispatchOperationInterface Class Reference
Client-side proxies » ChannelDispatchOperation proxies

`#include <TelepathyQt/ChannelDispatchOperation>`

Inheritance diagram for Tp::Client::ChannelDispatchOperationInterface:
[legend]

## Public Slots

QDBusPendingReply | HandleWith (const QString &handler, int timeout=-1)
QDBusPendingReply | Claim (int timeout=-1)
QDBusPendingReply | HandleWithTime (const QString &handler, qlonglong userActionTime, int timeout=-1)

## Signals

void | ChannelLost (const QDBusObjectPath &channel, const QString &error, const QString &message)
void | Finished ()
Signals inherited from Tp::AbstractInterface
void | propertiesChanged (const QVariantMap &changedProperties, const QStringList &invalidatedProperties)

## Public Member Functions

| ChannelDispatchOperationInterface (const QString &busName, const QString &objectPath, QObject *parent=0)
| ChannelDispatchOperationInterface (const QDBusConnection &connection, const QString &busName, const QString &objectPath, QObject *parent=0)
| ChannelDispatchOperationInterface (Tp::DBusProxy *proxy)
Tp::PendingVariant * | requestPropertyInterfaces () const
Tp::PendingVariant * | requestPropertyConnection () const
Tp::PendingVariant * | requestPropertyAccount () const
Tp::PendingVariant * | requestPropertyChannels () const
Tp::PendingVariant * | requestPropertyPossibleHandlers () const
Tp::PendingVariantMap * | requestAllProperties () 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 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)

## 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)
PendingVariant * | internalRequestProperty (const QString &name) const
PendingOperation * | internalSetProperty (const QString &name, const QVariant &newValue)
PendingVariantMap * | internalRequestAllProperties () 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)

## 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.ChannelDispatchOperation".

## Constructor & Destructor Documentation

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

Creates a ChannelDispatchOperationInterface associated with the given object on the session bus.

Parameters

  busName | Name of the service the object is on.
  objectPath | Path to the object on the service.
  parent | Passed to the parent class constructor.

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

Creates a ChannelDispatchOperationInterface associated with the given object on the given bus.

Parameters

  connection | The bus via which the object can be reached.
  busName | Name of the service the object is on.
  objectPath | Path to the object on the service.
  parent | Passed to the parent class constructor.

Tp::Client::ChannelDispatchOperationInterface::ChannelDispatchOperationInterface | ( | Tp::DBusProxy * | proxy | ) |

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

Parameters

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

## Member Function Documentation

static QLatin1String Tp::Client::ChannelDispatchOperationInterface::staticInterfaceName | ( |  | ) |

inline static

Returns the name of the interface "org.freedesktop.Telepathy.ChannelDispatchOperation", which this class represents.

Returns
  The D-Bus interface name.

Tp::PendingVariant* Tp::Client::ChannelDispatchOperationInterface::requestPropertyInterfaces | ( |  | ) | const

inline

Asynchronous getter for the remote object property `Interfaces` of type `QStringList`.

A list of the extra interfaces provided by this channel dispatch operation. This property cannot change.

Returns
  A pending variant which will emit finished when the property has been retrieved.

Tp::PendingVariant* Tp::Client::ChannelDispatchOperationInterface::requestPropertyConnection | ( |  | ) | const

inline

Asynchronous getter for the remote object property `Connection` of type `QDBusObjectPath`.

The Connection with which the Channels are associated. The well-known bus name to use can be derived from this object path by removing the leading '/' and replacing all subsequent '/' by '.'. This property cannot change.

Returns
  A pending variant which will emit finished when the property has been retrieved.

Tp::PendingVariant* Tp::Client::ChannelDispatchOperationInterface::requestPropertyAccount | ( |  | ) | const

inline

Asynchronous getter for the remote object property `Account` of type `QDBusObjectPath`.

The Account with which the Connection and Channels are associated. This property cannot change.

Returns
  A pending variant which will emit finished when the property has been retrieved.

Tp::PendingVariant* Tp::Client::ChannelDispatchOperationInterface::requestPropertyChannels | ( |  | ) | const

inline

Asynchronous getter for the remote object property `Channels` of type `Tp::ChannelDetailsList`.

The Channels to be dispatched, and their properties. Change notification is via the ChannelLost signal (channels cannot be added to this property, only removed).

Returns
  A pending variant which will emit finished when the property has been retrieved.

Tp::PendingVariant* Tp::Client::ChannelDispatchOperationInterface::requestPropertyPossibleHandlers | ( |  | ) | const

inline

Asynchronous getter for the remote object property `PossibleHandlers` of type `QStringList`.

The well known bus names (starting with org.freedesktop.Telepathy.Client.) of the possible Handlers for these channels. The channel dispatcher MUST place the most preferred handlers first, according to some reasonable heuristic. As a result, approvers SHOULD use the first handler by default. The heuristic used to prioritize handlers SHOULD give a higher priority to handlers that are already running. If, for instance, Empathy and Kopete have similar functionality, and Empathy is running, we should prefer to send channels to it rather than launching Kopete via service activation.

Returns
  A pending variant which will emit finished when the property has been retrieved.

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

QDBusPendingReply Tp::Client::ChannelDispatchOperationInterface::HandleWith | ( | const QString & | handler,
|  | int | timeout = `-1`
| ) |  |

inline slot

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

Called by an approver to accept a channel bundle and request that the given handler be used to handle it.

If successful, this method will cause the ChannelDispatchOperation object to disappear, emitting Finished() .

However, this method may fail because the dispatch has already been completed and the object has already gone. If this occurs, it indicates that another approver has asked for the bundle to be handled by a particular handler. The approver MUST NOT attempt to interact with the channels further in this case, unless it is separately invoked as the handler.

Approvers which are also channel handlers SHOULD use Claim() instead of HandleWith to request that they can handle a channel bundle themselves.

(FIXME: list some possible errors)

If the channel handler raises an error from ClientHandlerInterface::HandleChannels() , this method MAY respond by raising that same error, even if it is not specifically documented here.

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

Parameters

  handler | The well-known bus name (starting with `org.freedesktop.Telepathy.Client.`) of the channel handler that should handle the channel, or the empty string if the client has no preferred channel handler.
  timeout | The timeout in milliseconds.

QDBusPendingReply Tp::Client::ChannelDispatchOperationInterface::Claim | ( | int | timeout = `-1` | ) |

inline slot

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

Called by an approver to claim channels for handling internally. If this method is called successfully, the process calling this method becomes the handler for the channel, but does not have the ClientHandlerInterface::HandleChannels() method called on it.

Clients that call Claim on channels but do not immediately close them SHOULD implement the Handler interface and its ClientHandlerInterface::HandledChannels property.

Approvers wishing to reject channels MUST call this method to claim ownership of them, and MUST NOT call ChannelInterface::Close() on the channels unless/until this method returns successfully.

The channel dispatcher can't know how best to close arbitrary channel types, so it leaves it up to the approver to do so. For instance, for Text channels it is necessary to acknowledge any messages that have already been displayed to the user first - ideally, the approver would display and then acknowledge the messages - or to call ChannelInterfaceDestroyableInterface::Destroy() if the destructive behaviour of that method is desired.

Similarly, an Approver for StreamedMedia channels can close the channel with a reason (e.g. "busy") if desired. The channel dispatcher, which is designed to have no specific knowledge of particular channel types, can't do that.

If successful, this method will cause the ChannelDispatchOperation object to disappear, emitting Finished() , in the same way as for HandleWith() .

This method may fail because the dispatch operation has already been completed. Again, see HandleWith for more details. The approver MUST NOT attempt to interact with the channels further in this case.

(FIXME: list some other possible errors)

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

Parameters

  timeout | The timeout in milliseconds.

QDBusPendingReply Tp::Client::ChannelDispatchOperationInterface::HandleWithTime | ( | const QString & | handler,
|  | qlonglong | userActionTime,
|  | int | timeout = `-1`
| ) |  |

inline slot

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

A variant of HandleWith() allowing the approver to pass an user action time. This timestamp will be passed to the Handler when ClientHandlerInterface::HandleChannels() is called.

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

Parameters

  handler | The well-known bus name (starting with `org.freedesktop.Telepathy.Client.`) of the channel handler that should handle the channel, or the empty string if the client has no preferred channel handler.
  userActionTime | The time at which user action occurred.
  timeout | The timeout in milliseconds.

void Tp::Client::ChannelDispatchOperationInterface::ChannelLost | ( | const QDBusObjectPath & | channel,
|  | const QString & | error,
|  | const QString & | message
| ) |  |

signal

Represents the signal `ChannelLost` on the remote object.

A channel has closed before it could be claimed or handled. If this is emitted for the last remaining channel in a channel dispatch operation, it MUST immediately be followed by Finished() .

This signal MUST NOT be emitted until all Approvers that were invoked have returned (successfully or with an error) from their ClientApproverInterface::AddDispatchOperation() method.

This means that Approvers can connect to the ChannelLost signal in a race-free way. Non-approver processes that discover a channel dispatch operation in some way (such as observers) will have to follow the usual "connect to signals then recover state" model - first connect to ChannelLost and Finished() , then download Channels (and on error, perhaps assume that the operation has already Finished).

Parameters

  channel

      The Channel that closed.

  error | The name of a D-Bus error indicating why the channel closed. If no better reason can be found, `org.freedesktop.Telepathy.Error.NotAvailable` MAY be used as a fallback; this means that this error SHOULD NOT be given any more specific meaning.

  message

      A string associated with the D-Bus error.

void Tp::Client::ChannelDispatchOperationInterface::Finished | ( |  | ) |

signal

Represents the signal `Finished` on the remote object.

Emitted when this dispatch operation finishes. The dispatch operation is no longer present and further methods must not be called on it.

Approvers that have a user interface SHOULD stop notifying the user about the channels in response to this signal; they MAY assume that on errors, they would have received ChannelLost() first.

Its object path SHOULD NOT be reused for a subsequent dispatch operation; the ChannelDispatcher MUST choose object paths in a way that avoids immediate re-use.

Otherwise, clients might accidentally call HandleWith() or Claim() on a new dispatch operation instead of the one they intended to handle.

This signal MUST NOT be emitted until all Approvers that were invoked have returned (successfully or with an error) from their ClientApproverInterface::AddDispatchOperation() method.

This means that Approvers can connect to the ChannelLost signal in a race-free way. Non-approver processes that discover a channel dispatch operation in some way (such as observers) will have to follow the usual "connect to signals then recover state" model - first connect to ChannelLost() and Finished, then download Channels (and on error, perhaps assume that the operation has already Finished).

void Tp::Client::ChannelDispatchOperationInterface::invalidate | ( | Tp::DBusProxy * | proxy,
|  | const QString & | error,
|  | const QString & | message
| ) |  |

protected virtual

Reimplemented from Tp::AbstractInterface.