How to access status_text method from purple??

Christopher Jiménez cjimenez16 at gmail.com
Sun Apr 5 20:08:46 EDT 2009


An update on this. I write this on my code.
const char *Status::getPurpleBuddyStatusMessage(void *purpleBuddy)
{
    PurpleBuddy *gBuddy = (PurpleBuddy *) purpleBuddy;
    PurpleAccount * gAccount = purple_buddy_get_account(gBuddy);
    PurplePluginProtocolInfo *prpl_info = NULL;
    PurpleConnection *gc = purple_account_get_connection(gAccount);
    PurplePlugin *prpl = NULL;

    if (gc != NULL)
            prpl = purple_connection_get_prpl(gc);

    if (prpl != NULL)
        prpl_info = PURPLE_PLUGIN_PROTOCOL_INFO(prpl);

    if (prpl_info != NULL && prpl_info->status_text != NULL)
        return prpl_info->status_text(gBuddy);

    return "";
}

I seems to work, the big questions that I have is that I don't know if I am
re-writing something that is already on purple.
Let me know





On Sun, Apr 5, 2009 at 4:45 PM, Christopher Jiménez <cjimenez16 at gmail.com>wrote:

> Hello,
> I am trying to find some info about this but I cant find any. I am very new
> to libpurple and its arquitecture.
> I am currently building chat client for school, and I need to get the
> messages that people put on their social network accounts. In all pluggins
> and protocols I see the function status_text defined, I am pretty sure that
> is the one that I am looking.
> But how can I access the function from purple?
> Is there an access method on blist.c that I can use? or maybe in status.c.?
> Or maybe something like purple_status_get_attr_string(PurpleStatus
> *status,"???ID??"). I was able to show name and alias because they can be
> access from the PurpleBuddy class, but I cant find how to access this info.
> Any help will be much appreciated
> Thanks
> CJC
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://pidgin.im/pipermail/devel/attachments/20090405/43eb400e/attachment.html>


More information about the Devel mailing list