Questions about MySpaceIMPlugging msim_import_friends

Mark Doliner mark at kingant.net
Wed Mar 25 21:26:18 EDT 2009


FYI it is possible to access msim_import_friends without changing
libpurple (although it's not the prettiest thing in the world):

    GList *actions = PURPLE_PLUGIN_ACTIONS(gc->prpl, gc);
    for (GList *l = actions; l != NULL; l = l->next)
    {
        PurplePluginAction *action = (PurplePluginAction *)l->data;
        if (g_str_equal(action->label, _("Add friends from MySpace.com"))) {
            action->context = gc;
            action->callback(action);
            break;
        }
    }
    while (actions != NULL)
    {
        purple_plugin_action_free((PurplePluginAction *)actions->data);
        actions = g_list_delete_link(actions, actions);
    }

-Mark

2009/3/25  <cjimenez16 at gmail.com>:
> MySpaceIM feched the list, but I am tring to import the buddies from the
> myspace.com server.
> I manage to fix my problem. The problem was that msim_import_friends was
> only hooked up in an action and was not accessible from purple.
> I hook msim_import_friends to a protocol info method and was abble to access
> it.
> No big deal
> Thanks
> CJC
>
> On Mar 25, 2009 1:16pm, Etan Reisner <pidgin at unreliablesource.net> wrote:
>> On Wed, Mar 25, 2009 at 05:03:08AM +0000, cjimenez16 at gmail.com wrote:
>>
>> > Thanks for the responce.
>>
>> > I guess I will need to modify myspace.c to accomplish what I need.
>>
>> > Thanks again
>>
>> > CJC
>>
>>
>>
>> What are you trying to do exactly? The MySpace plugin fetches the buddy
>>
>> list from the server already, are you simply trying to get access to that
>>
>> data? Are you writing a client or are you trying to use libpurple more as
>>
>> a data source?
>>
>>
>>
>>    -Etan
>>
> _______________________________________________
> Devel mailing list
> Devel at pidgin.im
> http://pidgin.im/cgi-bin/mailman/listinfo/devel
>
>




More information about the Devel mailing list