[maemo-developers] Using address-book api on Fremantle to generate and maintain up-to-date list of online contacts

From: Simon Pickering S.G.Pickering at bath.ac.uk
Date: Fri Oct 16 01:53:58 EEST 2009
Hi all,

I would like to be able to query the addressbook and return a list of
all contacts who are online (in one form or another). I would also like
to keep this list up-to-date as my app runs. I understand this should be
possible from reading the api docs, but working out how to put the
pieces together is quite confusing (for me at least).

So there's a thing called an OssoABookGroup which I can create with
osso_abook_profile_group_get(), which should then contain the online
contacts. I see that groups have signals for "refilter-group" and
"refilter-contact", so I guess these are emitted when one of the
contacts changes their on/offline status. All good so far (assuming my
assumptions are correct).

The only thing I can see to do with a group is to generate an
OssoABookListStore from it using osso_abook_group_get_model().

Am I right in thinking that this list store is static, and that I'll
need to listen for the "refilter-contact" signals and add/remove items
from it to keep it up-to-date?

If so, all's well and good, I can work out how to do all of that. But
what should I use for the McProfile used to generate the OssoABookGroup
in the first place. I can't make head nor tails of those docs. 

On the other hand, I may be doing this completely the wrong way, and
perhaps I should be creating EBookViews and doing some magic with those?

Any help appreciated.



More information about the maemo-developers mailing list