diff options
author | Olli Salli <ollisal@gmail.com> | 2011-10-09 12:54:07 +0300 |
---|---|---|
committer | Olli Salli <ollisal@gmail.com> | 2011-10-10 19:17:43 +0300 |
commit | c88a8eb6ddc04156e39fe4060e8d6cd1c13fd70f (patch) | |
tree | c56a0a6578ffec36d1088b53be7928188572290c /qt4 | |
parent | b269ba736c5169a08bab06307c0b5845c4e3f021 (diff) |
Improve STC::TcpSrcAddrGen dox with a transcription of the original header comments
Diffstat (limited to 'qt4')
-rw-r--r-- | qt4/TelepathyQt4/stream-tube-client.cpp | 5 | ||||
-rw-r--r-- | qt4/TelepathyQt4/stream-tube-client.h | 9 |
2 files changed, 5 insertions, 9 deletions
diff --git a/qt4/TelepathyQt4/stream-tube-client.cpp b/qt4/TelepathyQt4/stream-tube-client.cpp index 124b4b5a0..0246cd133 100644 --- a/qt4/TelepathyQt4/stream-tube-client.cpp +++ b/qt4/TelepathyQt4/stream-tube-client.cpp @@ -68,9 +68,12 @@ namespace Tp * address on the local computer. This can be used on an tube-by-tube basis if for some tubes its * known that multiple connections need to be made, so a single source address doesn't suffice. * + * The \a account and \a tube parameters can be inspected to make the decision; typically by looking + * at the tube's service type, parameters and/or initiator contact. + * * The general pattern for implementing this method is: * <ol> - * <li>Determine whether \c tube needs to allow multiple connections, and if so, skip source address + * <li>Determine whether \a tube needs to allow multiple connections, and if so, skip source address * access control completely</li> * <li>Otherwise, create a socket and bind it to a free address</li> * <li>Return this socket's address</li> diff --git a/qt4/TelepathyQt4/stream-tube-client.h b/qt4/TelepathyQt4/stream-tube-client.h index 9b3924975..403366c75 100644 --- a/qt4/TelepathyQt4/stream-tube-client.h +++ b/qt4/TelepathyQt4/stream-tube-client.h @@ -47,17 +47,10 @@ class TELEPATHY_QT4_EXPORT StreamTubeClient : public QObject, public RefCounted public: - // A callback interface to allow using Port access control for incoming tubes, - // because there we need to know the address bound to the app socket connecting to the CM class TcpSourceAddressGenerator { public: - // Return qMakePair(QHostAddress::Any, 0) for "don't use Port AC for this tube", e.g. - // because you want to make multiple connections through it - // - // The tube param can be used to extract the service, initiator contact and other useful - // information for making the decision - virtual QPair<QHostAddress /* source interface address */, quint16 /* source port */> + virtual QPair<QHostAddress, quint16> nextSourceAddress(const AccountPtr &account, const IncomingStreamTubeChannelPtr &tube) = 0; protected: |