[Telepathy] add contacts

Daniel Pocock daniel at pocock.pro
Sun May 22 06:10:05 UTC 2016



On 21/05/16 23:10, Mateus Bellomo wrote:
> Hello,
> 
> I'm implementing adding contact method in resiprocate and I'm using
> telepathy-morse [1] as model. I would like to know what is the
> resiprocate equivalent of CTelegramCore found at [2] line 133.
> 
> The reason I'm asking that is because there is a function call to
> addContacts() in line 594 at [3] in the end of function
> requestSubscription() and I was wondering where actually the contact is
> being added to.
>



The underlying APIs (e.g. Telegram, reSIProcate) won't be exactly the same

For example, XMPP stores contacts in the XMPP server-side account and
maybe Telegram is doing that too (I'm not familiar with the Telegram API)

For SIP, you can add the buddy to a resource list on a resource list
server (RLS) or you can store it locally in a file.

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.

When you are looking for how to do something with the reSIProcate API, I
would recommend looking at the unit tests, e.g. look at resip/dum/test
for the basicClient, basicMessage, basicPublication, rls*


> 
> 
> [1] https://github.com/TelepathyQt/telepathy-morse
> [2]
> https://github.com/TelepathyQt/telepathy-morse/blob/master/connection.hpp
> [3]
> https://github.com/TelepathyQt/telepathy-morse/blob/master/connection.cpp
> 
> 
> _______________________________________________
> telepathy mailing list
> telepathy at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/telepathy
> 


More information about the telepathy mailing list