Mercurial > pidgin
changeset 779:1823a4af82d3
[gaim-migrate @ 789]
better test
committer: Tailor Script <tailor@pidgin.im>
author | Eric Warmenhoven <eric@warmenhoven.org> |
---|---|
date | Tue, 29 Aug 2000 02:57:48 +0000 |
parents | 035d3115c6fe |
children | c714def9cebb |
files | plugins/events.c |
diffstat | 1 files changed, 115 insertions(+), 29 deletions(-) [+] |
line wrap: on
line diff
--- a/plugins/events.c Tue Aug 29 01:07:42 2000 +0000 +++ b/plugins/events.c Tue Aug 29 02:57:48 2000 +0000 @@ -11,49 +11,135 @@ #define GAIM_PLUGINS #include "gaim.h" -void one_arg(void *m) +void evt_signon(void *data) +{ + printf("event_signon\n"); +} + +void evt_signoff(void *data) +{ + printf("event_signoff\n"); +} + +void evt_away(void *data) +{ + printf("event_away\n"); +} + +void evt_back(void *data) +{ + printf("event_back\n"); +} + +void evt_im_recv(char **who, char **what, void *data) { - printf("%d\n", m); + printf("event_im_recv: %s %s\n", *who, *what); +} + +void evt_im_send(char *who, char **what, void *data) +{ + printf("event_im_send: %s %s\n", who, *what); +} + +void evt_buddy_signon(char *who, void *data) +{ + printf("event_buddy_signon: %s\n", who); +} + +void evt_buddy_signoff(char *who, void *data) +{ + printf("event_buddy_signoff: %s\n", who); +} + +void evt_buddy_away(char *who, void *data) +{ + printf("event_buddy_away: %s\n", who); +} + +void evt_buddy_back(char *who, void *data) +{ + printf("event_buddy_back: %s\n", who); } -void two_arg(char *n, void *m) +void evt_blist_update(void *data) +{ + printf("event_blist_update\n"); +} + +void evt_chat_invited(char *who, char *room, char *message, void *data) +{ + printf("event_chat_invited: %s %s %s\n", who, room, message); +} + +void evt_chat_join(char *room, void *data) { - printf("%d\n", m); + printf("event_chat_join: %s\n", room); +} + +void evt_chat_leave(char *room, void *data) +{ + printf("event_chat_leave: %s\n", room); +} + +void evt_chat_buddy_join(char *room, char *who, void *data) +{ + printf("event_chat_buddy_join: %s %s\n", room, who); } -void three_arg(char *n, char *o, void *m) +void evt_chat_buddy_leave(char *room, char *who, void *data) { - printf("%d\n", m); + printf("event_chat_buddy_leave: %s %s\n", room, who); +} + +void evt_chat_recv(char *room, char *who, char *text, void *data) +{ + printf("event_chat_recv: %s %s %s\n", room, who, text); } -void four_arg(char *n, char *o, char *p, void *m) +void evt_chat_send(char *room, char **what, void *data) +{ + printf("event_chat_send: %s %s\n", room, *what); +} + +void evt_warned(char *who, int level, void *data) { - printf("%d\n", m); + printf("event_warned: %s %d\n", who, level); +} + +void evt_error(int error, void *data) +{ + printf("event_error: %d\n", error); +} + +void evt_quit(void *data) +{ + printf("event_quit\n"); } int gaim_plugin_init(void *h) { - gaim_signal_connect(h, event_signon, one_arg, (void *)0); - gaim_signal_connect(h, event_signoff, one_arg, (void *)1); - gaim_signal_connect(h, event_away, one_arg, (void *)2); - gaim_signal_connect(h, event_back, one_arg, (void *)3); - gaim_signal_connect(h, event_im_recv, three_arg, (void *)4); - gaim_signal_connect(h, event_im_send, three_arg, (void *)5); - gaim_signal_connect(h, event_buddy_signon, two_arg, (void *)6); - gaim_signal_connect(h, event_buddy_signoff, two_arg, (void *)7); - gaim_signal_connect(h, event_buddy_away, two_arg, (void *)8); - gaim_signal_connect(h, event_buddy_back, two_arg, (void *)9); - gaim_signal_connect(h, event_blist_update, one_arg, (void *)10); - gaim_signal_connect(h, event_chat_invited, four_arg, (void *)11); - gaim_signal_connect(h, event_chat_join, two_arg, (void *)12); - gaim_signal_connect(h, event_chat_leave, two_arg, (void *)13); - gaim_signal_connect(h, event_chat_buddy_join, three_arg, (void *)14); - gaim_signal_connect(h, event_chat_buddy_leave, three_arg, (void *)15); - gaim_signal_connect(h, event_chat_recv, four_arg, (void *)16); - gaim_signal_connect(h, event_chat_send, three_arg, (void *)17); - gaim_signal_connect(h, event_warned, three_arg, (void *)18); - gaim_signal_connect(h, event_error, two_arg, (void *)19); - gaim_signal_connect(h, event_quit, one_arg, (void *)20); + gaim_signal_connect(h, event_signon, evt_signon, NULL); + gaim_signal_connect(h, event_signoff, evt_signoff, NULL); + gaim_signal_connect(h, event_away, evt_away, NULL); + gaim_signal_connect(h, event_back, evt_back, NULL); + gaim_signal_connect(h, event_im_recv, evt_im_recv, NULL); + gaim_signal_connect(h, event_im_send, evt_im_send, NULL); + gaim_signal_connect(h, event_buddy_signon, evt_buddy_signon, NULL); + gaim_signal_connect(h, event_buddy_signoff, evt_buddy_signoff, NULL); + gaim_signal_connect(h, event_buddy_away, evt_buddy_away, NULL); + gaim_signal_connect(h, event_buddy_back, evt_buddy_back, NULL); + gaim_signal_connect(h, event_blist_update, evt_blist_update, NULL); + gaim_signal_connect(h, event_chat_invited, evt_chat_invited, NULL); + gaim_signal_connect(h, event_chat_join, evt_chat_join, NULL); + gaim_signal_connect(h, event_chat_leave, evt_chat_leave, NULL); + gaim_signal_connect(h, event_chat_buddy_join, evt_chat_buddy_join, NULL); + gaim_signal_connect(h, event_chat_buddy_leave, evt_chat_buddy_leave, NULL); + gaim_signal_connect(h, event_chat_recv, evt_chat_recv, NULL); + gaim_signal_connect(h, event_chat_send, evt_chat_send, NULL); + gaim_signal_connect(h, event_warned, evt_warned, NULL); + gaim_signal_connect(h, event_error, evt_error, NULL); + gaim_signal_connect(h, event_quit, evt_quit, NULL); + return 0; } char *name()