New 3.0.0 feature: getting public buddy alias while adding to blist

Tomasz Wasilczyk tomasz at
Mon Aug 20 04:02:16 EDT 2012


I wanted to implement another feature, that requires some API changes:
alias field in buddy adding dialog could be automatically filled while
adding buddy.

Example scenario:
1. user opens buddy add dialog, fills in username field and move focus out of it
2. server is requested for public alias of specified user
3. server answers with public alias, so alias field is filled with it
(only, if user didn't typed anything into it) and selected (to allow
the user to easily type in another alias)

Proposed method for prpl API:

typedef void (*PurpleGetBuddyPublicAliasSuccessCallback)(const char
*alias, gpointer user_data);
typedef void (*PurpleGetBuddyPublicAliasFailureCallback)(const char
*error, gpointer user_data);

struct _PurplePluginProtocolInfo
    void (*get_public_alias)(PurpleConnection *gc, const char *who,
PurpleGetBuddyPublicAliasSuccessCallback success_cb,
PurpleGetBuddyPublicAliasFailureCallback failure_cb);

Waiting for comments, as always,

More information about the Devel mailing list