Re-request Authorization with libpurple?

Paul Aurich paul at darkrain42.org
Wed Aug 12 03:52:26 EDT 2009


On Aug 12, 2009, at 00:39, michaelcbrook at msn.com wrote:
> Thinking this was another casting issue, I tried casting the type for
> the callback to PurpleCallback, since that looks like the correct type
> in libpurple's source code, but I still get the same error that  
> there's
> too many arguments:
>
> ((PurpleCallback)menu_action->callback)((PurpleBlistNode *)buddy);


It doesn't look like it's documented anywhere, but the function  
prototype that you want to be matching is:
	void callback(PurpleBlistNode*, gpointer cb_data)

See, for example, gtkutils.c:menu_action_cb:
	static void
	menu_action_cb(GtkMenuItem *item, gpointer object)
	{
	    gpointer data;
	    void (*callback)(gpointer, gpointer);

	    callback = g_object_get_data(G_OBJECT(item), "purplecallback");
	    data = g_object_get_data(G_OBJECT(item), "purplecallbackdata");

	    if (callback)
	        callback(object, data);
	}

(in your case, you'd have (PurpleBlistNode*)buddy and menu_action->data)

~Paul




More information about the Support mailing list