Home · All Classes · All Namespaces · Modules · Functions · Files |
The StreamTubeServer::ParametersGenerator abstract interface allows sending a different set of parameters with each tube offer. More...
#include <TelepathyQt/StreamTubeServer>
Inherited by Tp::FixedParametersGenerator.
Public Member Functions | |
virtual QVariantMap | nextParameters (const AccountPtr &account, const OutgoingStreamTubeChannelPtr &tube, const ChannelRequestHints &hints)=0 |
Protected Member Functions | |
virtual | ~ParametersGenerator () |
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.
|
inlineprotectedvirtual |
Class destructor. Protected, because StreamTubeServer never deletes a ParametersGenerator passed to it.
|
pure virtual |
Return the parameters to send when offering the given tube.
account | The account from which the tube originates. |
tube | The tube channel which is going to be offered by the StreamTubeServer. |
hints | The hints associated with the request that led to the creation of this tube, if any. |
Copyright © 2008-2011 Collabora Ltd. and Nokia Corporation | Telepathy-Qt 0.9.7 |