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

#include <TelepathyQt/simple-stream-tube-handler.h>

Inherits QObject, and Tp::AbstractClientHandler.

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)
 
- Public Member Functions inherited from Tp::AbstractClientHandler
virtual ~AbstractClientHandler ()
 
ChannelClassSpecList handlerFilter () const
 
Capabilities handlerCapabilities () const
 
bool wantsRequestNotification () const
 
virtual void addRequest (const ChannelRequestPtr &request)
 
virtual void removeRequest (const ChannelRequestPtr &request, const QString &errorName, const QString &errorMessage)
 
- Public Member Functions inherited from Tp::AbstractClient
 AbstractClient ()
 
virtual ~AbstractClient ()
 
bool isRegistered () const
 
- Public Member Functions inherited from Tp::RefCounted
 RefCounted ()
 
virtual ~RefCounted ()
 

Static Public Member Functions

static SharedPtr< SimpleStreamTubeHandlercreate (const QStringList &p2pServices, const QStringList &roomServices, bool requested, bool monitorConnections, bool bypassApproval=false)
 

Additional Inherited Members

- Protected Member Functions inherited from Tp::AbstractClientHandler
 AbstractClientHandler (const ChannelClassSpecList &channelFilter, const Capabilities &capabilities=Capabilities(), bool wantsRequestNotification=false)
 

Constructor & Destructor Documentation

◆ ~SimpleStreamTubeHandler()

Tp::SimpleStreamTubeHandler::~SimpleStreamTubeHandler ( )

Member Function Documentation

◆ create()

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

◆ monitorsConnections()

bool Tp::SimpleStreamTubeHandler::monitorsConnections ( ) const
inline

◆ bypassApproval()

bool Tp::SimpleStreamTubeHandler::bypassApproval ( ) const
inlinevirtual

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

Returns
true if automatically handled, false otherwise.

Implements Tp::AbstractClientHandler.

◆ handleChannels()

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
contextA MethodInvocationContextPtr object that must be used to indicate whether this method finished processing.
accountThe account with which the channels are associated.
connectionThe connection with which the channels are associated.
channelsThe channels to be handled.
requestsSatisfiedThe requests satisfied by these channels.
userActionTimeThe 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.
handlerInfoAdditional information about these channels.

Implements Tp::AbstractClientHandler.

◆ invokedForTube

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

◆ tubeInvalidated

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