How to load all buddies list for the specific account

Aliaksandr Kazlou aliaksandr.kazlou at gmail.com
Wed Sep 29 09:49:12 EDT 2010


Hello. I'm very new to libpurple development. And I've tried 
several days to extend nullclient.c to display all buddies list, 
I've read finch/libpurple/pidgin source code 
trying to understand how the same 
function works there. But still no success.
What I've tried to do:

purple_set_blist(purple_blist_new());
purple_blist_load();

But it seems it creates only empty PurpleBuddyList

I've also initialized PurpleBlistUiOps 
to setup my (*show) function and then call 
purple_blist_show() and my function is called, that's true, 
but PurpleBuddyList *list is empty.

I've tried to setup preferences to display offline buddies, 
but I think it doesn't make any sense, 
because there is PurplePresence member in 
PurpleBuddy struct.

I've tried to call purple_blist_add_account(account) before call
purple_blist_show(), but still no luck.

I see there are a lot of function in blist.h which 
work with PurpleBuddyList,
and all kind of *find* functions, but they all work with 
purplebuddylist which is initialized only 
in purple_set_blist() function.

What am I doing wrong? Whether at all I should to look 
the answer inside blist.h
file, or should I see another file? Really, what I want 
is the function which populate the newly created buddies list
(purple_set_blist(purple_blist_new()); -
finch and pidgin, they both have such line), 
but how this list is populated?

I need to complete at least this step, 
I think when this is done, I can easily
continue with other functions.

Many thanks.




More information about the Devel mailing list