[Telepathy] add contacts

Daniel Pocock daniel at pocock.pro
Sun May 22 18:21:41 UTC 2016



On 22/05/16 19:35, Mateus Bellomo wrote:
>> For now, you can write a class to keep the buddy list in a vector.  When
> the application loads, it should load the vector from a file and each
> time you add or remove a buddy it should write the complete list out to
> file again.
> 
> I'm doing that but I got a little confused about the variables mHandles
> and mIdentifiers at [1] line 84,85. Isn't that variables suppose to hold
> the friends of the contact already?
> 
> [1]
> https://github.com/MateusBellomo/resiprocate/blob/master/apps/telepathy/Connection.hxx
> 

Those hash maps (mHandles and mIdentifiers) are specific to the
telepathy-resiprocate implementation, they basically cache the handles
(unsigned integers) used by Telepathy.

If you like, you can use them and persist them to disk without creating
another class for them.  Keep in mind that when you do start supporting
a server-side buddy list, you would need to download the list of
contacts from the server and use it to initialize those maps each time
the user logs in

Please also see the comments I just added to the README about padsp, you
may find it helpful

Regards,

Daniel


More information about the telepathy mailing list