Sample Plugin

Eric Polino aluink at
Wed Jul 18 08:24:18 EDT 2007

On 7/18/07, Markus Zuercher <zuerchermarkus at> wrote:
> > You may have figured this out already, but are you changing accounts.xml and
> > then you want Pidgin to reload it?  If so, that's not really a good idea.  You
> > should just tell Pidgin to create a new account (or modify an existing
> > account, or whatever) and let Pidgin take care of writing it to accounts.xml.
> I'd love to, but I don't know yet how to use the libpurple functions.

> In buddyicon.h, I found the following function:
> purple_buddy_icons_set_for_user(PurpleAccount *account, const char *username,
>                                 void *icon_data, size_t icon_len,
>                                 const char *checksum);

I'm assuming you've already fgrep'ed the source for
purple_buddy_iscons_set_for_user and read the docs found at [1].  In
that case I would figure out how the buddy icons work from how they
are set originally.

> Can anyone pls give me an example so I can understand how it's made? I
> don't know what *account is, I thought it was like
> "mymsnaccount at", but why the username?

If you don't understand why *account isn't "mymsnaccount at".
then you need to take a quick trip to a C tutorial.  The declaration
for *account is 'PurpleAccount *account', making it a pointer to a
PurpleAccount, not a string.

> _______________________________________________
> Devel mailing list
> Devel at


"...indexable arrays, which may be thought of as functions whose
domains are isomorphic to contiguous subsets of the integers."
--Haskell 98 Library Report

More information about the Devel mailing list