Home · All Classes · All Namespaces · Modules · Functions · Files
Public Member Functions | Protected Member Functions
Tp::StreamTubeServer::ParametersGenerator Class Reference

The StreamTubeServer::ParametersGenerator abstract interface allows sending a different set of parameters with each tube offer. More...

#include <TelepathyQt4/StreamTubeServer>

Inherited by Tp::FixedParametersGenerator.

List of all members.

Public Member Functions

Protected Member Functions


Detailed Description

The StreamTubeServer::ParametersGenerator abstract interface allows sending a different set of parameters with each tube offer.

Tube parameters are arbitrary data sent with the tube offer, which can be retrieved in the receiving end with IncomingStreamTubeChannel::parameters(). They can be used to transfer e.g. session identification information, authentication credentials or alike, for bootstrapping the protocol used for communicating over the tube.

For usecases where the parameters don't need to change between each tube, just passing a fixed set of parameters to a suitable StreamTubeServer::exportTcpSocket() overload is usually more convenient than implementing a ParametersGenerator. Note that StreamTubeServer::exportTcpSocket() can be called multiple times to change the parameters for future tubes when e.g. configuration settings have been changed, so a ParametersGenerator only needs to be implemented if each and every tube must have a different set of parameters.


Constructor & Destructor Documentation

Tp::StreamTubeServer::ParametersGenerator::~ParametersGenerator ( ) [inline, protected, virtual]

Class destructor. Protected, because StreamTubeServer never deletes a ParametersGenerator passed to it.


Member Function Documentation

QVariantMap Tp::StreamTubeServer::ParametersGenerator::nextParameters ( const AccountPtr &  account,
const OutgoingStreamTubeChannelPtr &  tube,
const ChannelRequestHints hints 
) [pure virtual]

Return the parameters to send when offering the given tube.

Parameters:
accountThe account from which the tube originates.
tubeThe tube channel which is going to be offered by the StreamTubeServer.
hintsThe hints associated with the request that led to the creation of this tube, if any.
Returns:
Parameters to send with the offer, or an empty QVariantMap if none are needed for this tube.


Copyright © 2008-2011 Collabora Ltd. and Nokia Corporation
Telepathy-Qt4 0.8.0