Getting data from signals

Kevin Macksamie kevin.macksamie at gmail.com
Fri Jun 11 10:56:57 EDT 2010


Hi,

I am trying to get the account information upon a connection and a received
IM, so I am trying to follow the tutorial here:
http://developer.pidgin.im/doxygen/dev/html/signal-howto.html

I am having trouble setting up the marshal function. The compiler keeps
telling me purple_marshal_VOID_POINTER is undeclared. I am including
signals.h. I'm sure I am not including some file, but I can't for the life
of me figure out which one.

Here's my code thus far:

    void *data_im, *data_conn;

    /* Register signals with callbacks */
    purple_signal_register(
        purple_plugins_get_handle(),
        "received-im-msg",
        purple_marshal_VOID_POINTER,
        NULL,
        1,
        purple_value_new(PURPLE_TYPE_SUBTYPE, PURPLE_SUBTYPE_ACCOUNT));

    /* Connect our signal handlers to specific signals we care about */
    purple_signal_connect(purple_connections_get_handle(), "signed-on",
        plugin, PURPLE_CALLBACK(signed_on), data_im);
    purple_signal_connect(purple_connections_get_handle(),
"received-im-msg",
        plugin, PURPLE_CALLBACK(received_msg), data_conn);
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://pidgin.im/pipermail/support/attachments/20100611/76381771/attachment.htm>


More information about the Support mailing list