| Home · All Classes · All Namespaces · Modules · Functions · Files

Classes | Signals | Public Member Functions | Static Public Member Functions
Tp::SimpleStreamTubeHandler Class Reference

`#include </home/andrunko/work/telepathy/telepathy-qt/TelepathyQt/simple-stream-tube-handler.h>`

Inherits QObject, and Tp::AbstractClientHandler.

List of all members.

## Classes

- struct InvocationData

## Signals

- void invokedForTube (const Tp::AccountPtr &account, const Tp::StreamTubeChannelPtr &tube, const QDateTime &userActionTime, const Tp::ChannelRequestHints &requestHints)
- void tubeInvalidated (const Tp::AccountPtr &account, const Tp::StreamTubeChannelPtr &tube, const QString &errorName, const QString &errorMessage)

## Public Member Functions

- ~SimpleStreamTubeHandler ()
- bool monitorsConnections () const
- bool bypassApproval () const
- void handleChannels (const MethodInvocationContextPtr<> &context, const AccountPtr &account, const ConnectionPtr &connection, const QList< ChannelPtr > &channels, const QList< ChannelRequestPtr > &requestsSatisfied, const QDateTime &userActionTime, const HandlerInfo &handlerInfo)

## Static Public Member Functions

- static SharedPtr
  < SimpleStreamTubeHandler > create (const QStringList &p2pServices, const QStringList &roomServices, bool requested, bool monitorConnections, bool bypassApproval=false)

## Constructor & Destructor Documentation

Tp::SimpleStreamTubeHandler::~SimpleStreamTubeHandler | ( |  | ) |

## Member Function Documentation

SharedPtr< SimpleStreamTubeHandler > Tp::SimpleStreamTubeHandler::create | ( | const QStringList & | p2pServices,
|  | const QStringList & | roomServices,
|  | bool | requested,
|  | bool | monitorConnections,
|  | bool | bypassApproval = `false`
| ) |  | `[static]`

bool Tp::SimpleStreamTubeHandler::monitorsConnections | ( |  | ) | const`[inline]`

bool Tp::SimpleStreamTubeHandler::bypassApproval | ( |  | ) | const`[inline, virtual]`

Return whether channels destined for this handler are automatically handled, without invoking approvers.

Returns:
  `true` if automatically handled, `false` otherwise.

Implements Tp::AbstractClientHandler.

void Tp::SimpleStreamTubeHandler::handleChannels | ( | const MethodInvocationContextPtr<> & | context,
|  | const AccountPtr & | account,
|  | const ConnectionPtr & | connection,
|  | const QList< ChannelPtr > & | channels,
|  | const QList< ChannelRequestPtr > & | requestsSatisfied,
|  | const QDateTime & | userActionTime,
|  | const HandlerInfo & | handlerInfo
| ) |  | `[virtual]`

Called by the channel dispatcher when this handler should handle these channels, or when this handler should present channels that it is already handling to the user (e.g. bring them into the foreground).

Clients are expected to know what channels they're already handling, and which channel object corresponds to which window or tab.

After handleChannels() replies successfully by calling MethodInvocationContext::setFinished(), the client process is considered to be responsible for the channel until it its unique name disappears from the bus.

If a process has multiple client bus names - some temporary and some long-lived - and drops one of the temporary bus names in order to reduce the set of channels that it will handle, any channels that it is already handling will remain unaffected.

The received context object should be stored until this method is finished processing and then MethodInvocationContext::setFinished() or MethodInvocationContext::setFinishedWithError() should be called on the received context object.

Specialized handlers must reimplement this method.

Parameters:

  context | A MethodInvocationContextPtr object that must be used to indicate whether this method finished processing.
  account | The account with which the channels are associated.
  connection | The connection with which the channels are associated.
  channels | The channels to be handled.
  dispatchOperation | The dispatch operation for these channels. The object will be invalid (DBusProxy::isValid() will be false) if there is no dispatch operation in place (because the channels were requested, not incoming).
  requestsSatisfied | The requests satisfied by these channels.
  userActionTime | The time at which user action occurred, or 0 if this channel is to be handled for some reason not involving user action. Handlers should use this for focus-stealing prevention, if applicable.
  handlerInfo | Additional information about these channels.

Implements Tp::AbstractClientHandler.

void Tp::SimpleStreamTubeHandler::invokedForTube | ( | const Tp::AccountPtr & | account,
|  | const Tp::StreamTubeChannelPtr & | tube,
|  | const QDateTime & | userActionTime,
|  | const Tp::ChannelRequestHints & | requestHints
| ) |  | `[signal]`

void Tp::SimpleStreamTubeHandler::tubeInvalidated | ( | const Tp::AccountPtr & | account,
|  | const Tp::StreamTubeChannelPtr & | tube,
|  | const QString & | errorName,
|  | const QString & | errorMessage
| ) |  | `[signal]`