Need help ! how to get all the buddies according one MSN account?

sirtoozee sirtoozee at gmail.com
Fri Nov 23 04:44:38 EST 2007


I changed some code in the ./libpurple/example/nullclient.c

/* Get buddy list account. */
static void
bsKeyValue(gpointer key, gpointer value, gpointer user_data)
{
        PurpleAccount *account;

        account = key;
        printf("DEBUG BUDDY LIST ACCOUNT %s\n",
purple_account_get_username(account));
}

static void
signed_on(PurpleConnection *gc, gpointer null)
{
        PurpleAccount *account = purple_connection_get_account(gc);
        PurpleBuddyList *blist;
        GHashTable *bs;

        blist = purple_get_blist();
        bs = blist->buddies;
        g_hash_table_foreach(bs, bsKeyValue, NULL);

        printf("Account connected: %s %s\n", account->username,
account->protocol_id);
}

You should download a Glib manual to have a look at the GHashTable.

sirtoozee

2007/11/23, Hogan Yu <hogan.yu at icebreakersoftware.com>:
>
> hi, ALL:
>   I have a MSN account and want to get all my buddies in my software by
> using libpurple, I dont know which method can finished this job. I check the
> API and dont find the method. how can do this?
>
> BR
>
> Hogan Yu
> _______________________________________________
> Devel mailing list
> Devel at pidgin.im
> http://pidgin.im/cgi-bin/mailman/listinfo/devel
>
>


-- 
An individual human existence should be like a river - small at first,
narrowly contained within its banks, and rushing passionately past
boulders and over waterfalls. Gradually the river grows wider, the
banks recede, the waters flow more quietly, and in the end, without
any visible break, they become merged in the sea, and painlessly lose
their individual being.




More information about the Devel mailing list