[Telepathy] API Draft for high level tubes in tp-qt4

Dario Freddi drf54321 at gmail.com
Thu Jun 3 00:10:00 PDT 2010


On Thursday 03 June 2010 06:51:20 you wrote:
> We talked this through over IRC, with the end result being that for
> connection tracking, we should have something like:
> 
> StreamTubeChannel::
> 
> UIntList connections(); // list of current connection ids
> 
> signal connectionAdded(uint connectionId);
> signal connectionClosed(uint connectionId, QString error, QString message);

Oh my. Definitely the two signals should be merged. Will do after your review.

> 
> OutgoingStreamTubeChannel:
> 
> ContactPtr contactForConnection(uint validConnectionId); // always
> available as long as connection tracking is enabled
> uint connectionForSourceAddress(QPair<QHostAddress, uint>
> addressAndPort); // available if
> supportsIP*SocketsWithAllowedAddress() is true, with the lib
> auto-specifying Port access control on offer() if available
> 
> I think having these mapping functions is better than returning a QHash,
> no?

Hmm, after all they're an implementation of an hash with lookups by key. I 
think returning a QHash is more sensible here: it does not clutter the API and 
still provides developers a more comfortable way for handling those. Anyway, 
have a look at how I implemented it.

> 
> IncomingStreamTubeChannel:
> 
> nothing :)

:)

> 
> Come to think of it, we should probably rename
> supportsIP*SocketsWithAllowedAddress to *WithSpecifiedAddress - fits
> more naturally into connectionForSourceAddress

Well, I am very bad at namings, so when you'll have a look at the code just 
confirm you want to change this, and I will :)

> 
> Will take a look at your latest commits (probably contradicting this
> recap because of some oversight of mine :)) today evening.

Awesome :)

-- 
-------------------

Dario Freddi
KDE Developer
GPG Key Signature: 511A9A3B
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: This is a digitally signed message part.
URL: <http://lists.freedesktop.org/archives/telepathy/attachments/20100603/14aeb3d8/attachment.pgp>


More information about the telepathy mailing list