annotate plugins/events.c @ 5280:c9116905a08c

[gaim-migrate @ 5652] Miloslav Trmac (trmac) updated the Czech translation. on a semi-random note, why is Czech .cz buts its translations cs.po? committer: Tailor Script <tailor@pidgin.im>
author Luke Schierer <lschiere@pidgin.im>
date Fri, 02 May 2003 01:43:34 +0000
parents c0baa01cdeda
children dae79aefac8d
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
5255
c0baa01cdeda [gaim-migrate @ 5627]
Luke Schierer <lschiere@pidgin.im>
parents: 5205
diff changeset
1 /* events.c
534
d7cdcd9e28f4 [gaim-migrate @ 544]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
2 *
d7cdcd9e28f4 [gaim-migrate @ 544]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
3 * test every callback, print to stdout
d7cdcd9e28f4 [gaim-migrate @ 544]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
4 *
2130
50c7a704ee56 [gaim-migrate @ 2140]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1404
diff changeset
5 * by EW
534
d7cdcd9e28f4 [gaim-migrate @ 544]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
6 *
d7cdcd9e28f4 [gaim-migrate @ 544]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
7 * GPL and all that jazz
d7cdcd9e28f4 [gaim-migrate @ 544]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
8 *
d7cdcd9e28f4 [gaim-migrate @ 544]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
9 */
d7cdcd9e28f4 [gaim-migrate @ 544]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
10
5255
c0baa01cdeda [gaim-migrate @ 5627]
Luke Schierer <lschiere@pidgin.im>
parents: 5205
diff changeset
11 #define EVENTTEST_PLUGIN_ID "core-eventtest"
534
d7cdcd9e28f4 [gaim-migrate @ 544]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
12 #include "gaim.h"
d7cdcd9e28f4 [gaim-migrate @ 544]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
13
1047
ece2d1543b20 [gaim-migrate @ 1057]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 808
diff changeset
14 static void evt_signon(struct gaim_connection *gc, void *data)
779
1823a4af82d3 [gaim-migrate @ 789]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 534
diff changeset
15 {
1823a4af82d3 [gaim-migrate @ 789]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 534
diff changeset
16 printf("event_signon\n");
1823a4af82d3 [gaim-migrate @ 789]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 534
diff changeset
17 }
1823a4af82d3 [gaim-migrate @ 789]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 534
diff changeset
18
1047
ece2d1543b20 [gaim-migrate @ 1057]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 808
diff changeset
19 static void evt_signoff(struct gaim_connection *gc, void *data)
779
1823a4af82d3 [gaim-migrate @ 789]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 534
diff changeset
20 {
1823a4af82d3 [gaim-migrate @ 789]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 534
diff changeset
21 printf("event_signoff\n");
1823a4af82d3 [gaim-migrate @ 789]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 534
diff changeset
22 }
1823a4af82d3 [gaim-migrate @ 789]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 534
diff changeset
23
1404
96e93119268d [gaim-migrate @ 1414]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1047
diff changeset
24 static void evt_away(struct gaim_connection *gc, char *state, char *message, void *data)
779
1823a4af82d3 [gaim-migrate @ 789]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 534
diff changeset
25 {
1404
96e93119268d [gaim-migrate @ 1414]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1047
diff changeset
26 printf("event_away: %s %s %s\n", gc->username, state, message);
779
1823a4af82d3 [gaim-migrate @ 789]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 534
diff changeset
27 }
1823a4af82d3 [gaim-migrate @ 789]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 534
diff changeset
28
1047
ece2d1543b20 [gaim-migrate @ 1057]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 808
diff changeset
29 static void evt_back(void *data)
779
1823a4af82d3 [gaim-migrate @ 789]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 534
diff changeset
30 {
1823a4af82d3 [gaim-migrate @ 789]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 534
diff changeset
31 printf("event_back\n");
1823a4af82d3 [gaim-migrate @ 789]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 534
diff changeset
32 }
1823a4af82d3 [gaim-migrate @ 789]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 534
diff changeset
33
5090
4596276f5b12 [gaim-migrate @ 5452]
Luke Schierer <lschiere@pidgin.im>
parents: 3551
diff changeset
34 static void evt_im_recv(struct gaim_connection *gc, char **who, char **what, guint *flags, void *data)
534
d7cdcd9e28f4 [gaim-migrate @ 544]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
35 {
779
1823a4af82d3 [gaim-migrate @ 789]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 534
diff changeset
36 printf("event_im_recv: %s %s\n", *who, *what);
1823a4af82d3 [gaim-migrate @ 789]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 534
diff changeset
37 }
1823a4af82d3 [gaim-migrate @ 789]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 534
diff changeset
38
1047
ece2d1543b20 [gaim-migrate @ 1057]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 808
diff changeset
39 static void evt_im_send(struct gaim_connection *gc, char *who, char **what, void *data)
779
1823a4af82d3 [gaim-migrate @ 789]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 534
diff changeset
40 {
1823a4af82d3 [gaim-migrate @ 789]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 534
diff changeset
41 printf("event_im_send: %s %s\n", who, *what);
1823a4af82d3 [gaim-migrate @ 789]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 534
diff changeset
42 }
1823a4af82d3 [gaim-migrate @ 789]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 534
diff changeset
43
1047
ece2d1543b20 [gaim-migrate @ 1057]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 808
diff changeset
44 static void evt_buddy_signon(struct gaim_connection *gc, char *who, void *data)
779
1823a4af82d3 [gaim-migrate @ 789]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 534
diff changeset
45 {
1823a4af82d3 [gaim-migrate @ 789]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 534
diff changeset
46 printf("event_buddy_signon: %s\n", who);
1823a4af82d3 [gaim-migrate @ 789]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 534
diff changeset
47 }
1823a4af82d3 [gaim-migrate @ 789]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 534
diff changeset
48
1047
ece2d1543b20 [gaim-migrate @ 1057]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 808
diff changeset
49 static void evt_buddy_signoff(struct gaim_connection *gc, char *who, void *data)
779
1823a4af82d3 [gaim-migrate @ 789]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 534
diff changeset
50 {
1823a4af82d3 [gaim-migrate @ 789]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 534
diff changeset
51 printf("event_buddy_signoff: %s\n", who);
1823a4af82d3 [gaim-migrate @ 789]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 534
diff changeset
52 }
1823a4af82d3 [gaim-migrate @ 789]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 534
diff changeset
53
1047
ece2d1543b20 [gaim-migrate @ 1057]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 808
diff changeset
54 static void evt_buddy_away(struct gaim_connection *gc, char *who, void *data)
779
1823a4af82d3 [gaim-migrate @ 789]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 534
diff changeset
55 {
1823a4af82d3 [gaim-migrate @ 789]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 534
diff changeset
56 printf("event_buddy_away: %s\n", who);
1823a4af82d3 [gaim-migrate @ 789]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 534
diff changeset
57 }
1823a4af82d3 [gaim-migrate @ 789]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 534
diff changeset
58
1047
ece2d1543b20 [gaim-migrate @ 1057]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 808
diff changeset
59 static void evt_buddy_back(struct gaim_connection *gc, char *who, void *data)
779
1823a4af82d3 [gaim-migrate @ 789]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 534
diff changeset
60 {
1823a4af82d3 [gaim-migrate @ 789]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 534
diff changeset
61 printf("event_buddy_back: %s\n", who);
534
d7cdcd9e28f4 [gaim-migrate @ 544]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
62 }
d7cdcd9e28f4 [gaim-migrate @ 544]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
63
5090
4596276f5b12 [gaim-migrate @ 5452]
Luke Schierer <lschiere@pidgin.im>
parents: 3551
diff changeset
64 static void evt_buddy_idle(struct gaim_connection *gc, char *who, void *data)
4596276f5b12 [gaim-migrate @ 5452]
Luke Schierer <lschiere@pidgin.im>
parents: 3551
diff changeset
65 {
4596276f5b12 [gaim-migrate @ 5452]
Luke Schierer <lschiere@pidgin.im>
parents: 3551
diff changeset
66 printf("event_buddy_idle: %s\n", who);
4596276f5b12 [gaim-migrate @ 5452]
Luke Schierer <lschiere@pidgin.im>
parents: 3551
diff changeset
67 }
4596276f5b12 [gaim-migrate @ 5452]
Luke Schierer <lschiere@pidgin.im>
parents: 3551
diff changeset
68
4596276f5b12 [gaim-migrate @ 5452]
Luke Schierer <lschiere@pidgin.im>
parents: 3551
diff changeset
69 static void evt_buddy_unidle(struct gaim_connection *gc, char *who, void *data)
4596276f5b12 [gaim-migrate @ 5452]
Luke Schierer <lschiere@pidgin.im>
parents: 3551
diff changeset
70 {
4596276f5b12 [gaim-migrate @ 5452]
Luke Schierer <lschiere@pidgin.im>
parents: 3551
diff changeset
71 printf("event_buddy_unidle: %s\n", who);
4596276f5b12 [gaim-migrate @ 5452]
Luke Schierer <lschiere@pidgin.im>
parents: 3551
diff changeset
72 }
4596276f5b12 [gaim-migrate @ 5452]
Luke Schierer <lschiere@pidgin.im>
parents: 3551
diff changeset
73
4596276f5b12 [gaim-migrate @ 5452]
Luke Schierer <lschiere@pidgin.im>
parents: 3551
diff changeset
74 static void evt_blist_update(void *data)
4596276f5b12 [gaim-migrate @ 5452]
Luke Schierer <lschiere@pidgin.im>
parents: 3551
diff changeset
75 {
4596276f5b12 [gaim-migrate @ 5452]
Luke Schierer <lschiere@pidgin.im>
parents: 3551
diff changeset
76 printf("event_blist_update\n");
4596276f5b12 [gaim-migrate @ 5452]
Luke Schierer <lschiere@pidgin.im>
parents: 3551
diff changeset
77 }
4596276f5b12 [gaim-migrate @ 5452]
Luke Schierer <lschiere@pidgin.im>
parents: 3551
diff changeset
78
1047
ece2d1543b20 [gaim-migrate @ 1057]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 808
diff changeset
79 static void evt_chat_invited(struct gaim_connection *gc, char *who, char *room, char *message, void *data)
779
1823a4af82d3 [gaim-migrate @ 789]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 534
diff changeset
80 {
1823a4af82d3 [gaim-migrate @ 789]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 534
diff changeset
81 printf("event_chat_invited: %s %s %s\n", who, room, message);
1823a4af82d3 [gaim-migrate @ 789]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 534
diff changeset
82 }
1823a4af82d3 [gaim-migrate @ 789]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 534
diff changeset
83
5090
4596276f5b12 [gaim-migrate @ 5452]
Luke Schierer <lschiere@pidgin.im>
parents: 3551
diff changeset
84 static void evt_chat_join(struct gaim_connection *gc, int id, void *data)
534
d7cdcd9e28f4 [gaim-migrate @ 544]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
85 {
5090
4596276f5b12 [gaim-migrate @ 5452]
Luke Schierer <lschiere@pidgin.im>
parents: 3551
diff changeset
86 printf("event_chat_join: %d\n", id);
779
1823a4af82d3 [gaim-migrate @ 789]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 534
diff changeset
87 }
1823a4af82d3 [gaim-migrate @ 789]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 534
diff changeset
88
5090
4596276f5b12 [gaim-migrate @ 5452]
Luke Schierer <lschiere@pidgin.im>
parents: 3551
diff changeset
89 static void evt_chat_leave(struct gaim_connection *gc, int id, void *data)
779
1823a4af82d3 [gaim-migrate @ 789]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 534
diff changeset
90 {
5090
4596276f5b12 [gaim-migrate @ 5452]
Luke Schierer <lschiere@pidgin.im>
parents: 3551
diff changeset
91 printf("event_chat_leave: %d\n", id);
779
1823a4af82d3 [gaim-migrate @ 789]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 534
diff changeset
92 }
1823a4af82d3 [gaim-migrate @ 789]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 534
diff changeset
93
5090
4596276f5b12 [gaim-migrate @ 5452]
Luke Schierer <lschiere@pidgin.im>
parents: 3551
diff changeset
94 static void evt_chat_buddy_join(struct gaim_connection *gc, int id, char *who, void *data)
779
1823a4af82d3 [gaim-migrate @ 789]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 534
diff changeset
95 {
5090
4596276f5b12 [gaim-migrate @ 5452]
Luke Schierer <lschiere@pidgin.im>
parents: 3551
diff changeset
96 printf("event_chat_buddy_join: %d %s\n", id, who);
534
d7cdcd9e28f4 [gaim-migrate @ 544]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
97 }
d7cdcd9e28f4 [gaim-migrate @ 544]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
98
5090
4596276f5b12 [gaim-migrate @ 5452]
Luke Schierer <lschiere@pidgin.im>
parents: 3551
diff changeset
99 static void evt_chat_buddy_leave(struct gaim_connection *gc, int id, char *who, void *data)
534
d7cdcd9e28f4 [gaim-migrate @ 544]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
100 {
5090
4596276f5b12 [gaim-migrate @ 5452]
Luke Schierer <lschiere@pidgin.im>
parents: 3551
diff changeset
101 printf("event_chat_buddy_leave: %d %s\n", id, who);
779
1823a4af82d3 [gaim-migrate @ 789]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 534
diff changeset
102 }
1823a4af82d3 [gaim-migrate @ 789]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 534
diff changeset
103
5090
4596276f5b12 [gaim-migrate @ 5452]
Luke Schierer <lschiere@pidgin.im>
parents: 3551
diff changeset
104 static void evt_chat_recv(struct gaim_connection *gc, int id, char *who, char *text, void *data)
779
1823a4af82d3 [gaim-migrate @ 789]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 534
diff changeset
105 {
5090
4596276f5b12 [gaim-migrate @ 5452]
Luke Schierer <lschiere@pidgin.im>
parents: 3551
diff changeset
106 printf("event_chat_recv: %d %s %s\n", id, who, text);
534
d7cdcd9e28f4 [gaim-migrate @ 544]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
107 }
d7cdcd9e28f4 [gaim-migrate @ 544]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
108
5090
4596276f5b12 [gaim-migrate @ 5452]
Luke Schierer <lschiere@pidgin.im>
parents: 3551
diff changeset
109 static void evt_chat_send(struct gaim_connection *gc, int id, char **what, void *data)
779
1823a4af82d3 [gaim-migrate @ 789]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 534
diff changeset
110 {
5090
4596276f5b12 [gaim-migrate @ 5452]
Luke Schierer <lschiere@pidgin.im>
parents: 3551
diff changeset
111 printf("event_chat_send: %d %s\n", id, *what);
779
1823a4af82d3 [gaim-migrate @ 789]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 534
diff changeset
112 }
1823a4af82d3 [gaim-migrate @ 789]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 534
diff changeset
113
1047
ece2d1543b20 [gaim-migrate @ 1057]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 808
diff changeset
114 static void evt_warned(struct gaim_connection *gc, char *who, int level, void *data)
534
d7cdcd9e28f4 [gaim-migrate @ 544]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
115 {
779
1823a4af82d3 [gaim-migrate @ 789]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 534
diff changeset
116 printf("event_warned: %s %d\n", who, level);
1823a4af82d3 [gaim-migrate @ 789]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 534
diff changeset
117 }
1823a4af82d3 [gaim-migrate @ 789]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 534
diff changeset
118
1047
ece2d1543b20 [gaim-migrate @ 1057]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 808
diff changeset
119 static void evt_error(int error, void *data)
779
1823a4af82d3 [gaim-migrate @ 789]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 534
diff changeset
120 {
1823a4af82d3 [gaim-migrate @ 789]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 534
diff changeset
121 printf("event_error: %d\n", error);
1823a4af82d3 [gaim-migrate @ 789]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 534
diff changeset
122 }
1823a4af82d3 [gaim-migrate @ 789]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 534
diff changeset
123
1047
ece2d1543b20 [gaim-migrate @ 1057]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 808
diff changeset
124 static void evt_quit(void *data)
779
1823a4af82d3 [gaim-migrate @ 789]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 534
diff changeset
125 {
1823a4af82d3 [gaim-migrate @ 789]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 534
diff changeset
126 printf("event_quit\n");
534
d7cdcd9e28f4 [gaim-migrate @ 544]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
127 }
d7cdcd9e28f4 [gaim-migrate @ 544]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
128
1047
ece2d1543b20 [gaim-migrate @ 1057]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 808
diff changeset
129 static void evt_new_conversation(char *who, void *data)
808
9d61f3d01046 [gaim-migrate @ 818]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 779
diff changeset
130 {
9d61f3d01046 [gaim-migrate @ 818]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 779
diff changeset
131 printf("event_new_conversation: %s\n", who);
9d61f3d01046 [gaim-migrate @ 818]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 779
diff changeset
132 }
9d61f3d01046 [gaim-migrate @ 818]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 779
diff changeset
133
5090
4596276f5b12 [gaim-migrate @ 5452]
Luke Schierer <lschiere@pidgin.im>
parents: 3551
diff changeset
134 static void evt_set_info(struct gaim_connection *gc, char *info, void *data)
4596276f5b12 [gaim-migrate @ 5452]
Luke Schierer <lschiere@pidgin.im>
parents: 3551
diff changeset
135 {
4596276f5b12 [gaim-migrate @ 5452]
Luke Schierer <lschiere@pidgin.im>
parents: 3551
diff changeset
136 printf("event_set_info: %s\n", info);
4596276f5b12 [gaim-migrate @ 5452]
Luke Schierer <lschiere@pidgin.im>
parents: 3551
diff changeset
137 }
4596276f5b12 [gaim-migrate @ 5452]
Luke Schierer <lschiere@pidgin.im>
parents: 3551
diff changeset
138
4596276f5b12 [gaim-migrate @ 5452]
Luke Schierer <lschiere@pidgin.im>
parents: 3551
diff changeset
139 static void evt_draw_menu(GtkWidget *menu, char *name, void *data)
4596276f5b12 [gaim-migrate @ 5452]
Luke Schierer <lschiere@pidgin.im>
parents: 3551
diff changeset
140 {
4596276f5b12 [gaim-migrate @ 5452]
Luke Schierer <lschiere@pidgin.im>
parents: 3551
diff changeset
141 printf("event_draw_menu: %s\n", name);
4596276f5b12 [gaim-migrate @ 5452]
Luke Schierer <lschiere@pidgin.im>
parents: 3551
diff changeset
142 }
4596276f5b12 [gaim-migrate @ 5452]
Luke Schierer <lschiere@pidgin.im>
parents: 3551
diff changeset
143
4596276f5b12 [gaim-migrate @ 5452]
Luke Schierer <lschiere@pidgin.im>
parents: 3551
diff changeset
144 static void evt_im_displayed_sent(struct gaim_connection *gc, char *who, char **what, void *data)
4596276f5b12 [gaim-migrate @ 5452]
Luke Schierer <lschiere@pidgin.im>
parents: 3551
diff changeset
145 {
4596276f5b12 [gaim-migrate @ 5452]
Luke Schierer <lschiere@pidgin.im>
parents: 3551
diff changeset
146 printf("event_im_displayed_sent: %s %s\n", who, *what);
4596276f5b12 [gaim-migrate @ 5452]
Luke Schierer <lschiere@pidgin.im>
parents: 3551
diff changeset
147 }
4596276f5b12 [gaim-migrate @ 5452]
Luke Schierer <lschiere@pidgin.im>
parents: 3551
diff changeset
148
4596276f5b12 [gaim-migrate @ 5452]
Luke Schierer <lschiere@pidgin.im>
parents: 3551
diff changeset
149 static void evt_im_displayed_rcvd(struct gaim_connection *gc, char *who, char *what, guint32 flags, time_t time, void *data)
4596276f5b12 [gaim-migrate @ 5452]
Luke Schierer <lschiere@pidgin.im>
parents: 3551
diff changeset
150 {
5255
c0baa01cdeda [gaim-migrate @ 5627]
Luke Schierer <lschiere@pidgin.im>
parents: 5205
diff changeset
151 printf("event_im_displayed_rcvd: %s %s %u %u\n", who, what, flags, time);
5090
4596276f5b12 [gaim-migrate @ 5452]
Luke Schierer <lschiere@pidgin.im>
parents: 3551
diff changeset
152 }
4596276f5b12 [gaim-migrate @ 5452]
Luke Schierer <lschiere@pidgin.im>
parents: 3551
diff changeset
153
4596276f5b12 [gaim-migrate @ 5452]
Luke Schierer <lschiere@pidgin.im>
parents: 3551
diff changeset
154 static void evt_chat_send_invite(struct gaim_connection *gc, int id, char *who, char **msg, void *data)
4596276f5b12 [gaim-migrate @ 5452]
Luke Schierer <lschiere@pidgin.im>
parents: 3551
diff changeset
155 {
4596276f5b12 [gaim-migrate @ 5452]
Luke Schierer <lschiere@pidgin.im>
parents: 3551
diff changeset
156 printf("event_chat_send_invite: %d %s %s\n", id, who, *msg);
4596276f5b12 [gaim-migrate @ 5452]
Luke Schierer <lschiere@pidgin.im>
parents: 3551
diff changeset
157 }
4596276f5b12 [gaim-migrate @ 5452]
Luke Schierer <lschiere@pidgin.im>
parents: 3551
diff changeset
158
4596276f5b12 [gaim-migrate @ 5452]
Luke Schierer <lschiere@pidgin.im>
parents: 3551
diff changeset
159 static evt_got_typing(struct gaim_connection *gc, char *who, void *data)
4596276f5b12 [gaim-migrate @ 5452]
Luke Schierer <lschiere@pidgin.im>
parents: 3551
diff changeset
160 {
4596276f5b12 [gaim-migrate @ 5452]
Luke Schierer <lschiere@pidgin.im>
parents: 3551
diff changeset
161 printf("event_got_typing: %s\n", who);
4596276f5b12 [gaim-migrate @ 5452]
Luke Schierer <lschiere@pidgin.im>
parents: 3551
diff changeset
162 }
4596276f5b12 [gaim-migrate @ 5452]
Luke Schierer <lschiere@pidgin.im>
parents: 3551
diff changeset
163
5255
c0baa01cdeda [gaim-migrate @ 5627]
Luke Schierer <lschiere@pidgin.im>
parents: 5205
diff changeset
164 static evt_del_conversation(struct gaim_conversation *c, void *data)
5090
4596276f5b12 [gaim-migrate @ 5452]
Luke Schierer <lschiere@pidgin.im>
parents: 3551
diff changeset
165 {
4596276f5b12 [gaim-migrate @ 5452]
Luke Schierer <lschiere@pidgin.im>
parents: 3551
diff changeset
166 printf("event_del_conversation\n");
4596276f5b12 [gaim-migrate @ 5452]
Luke Schierer <lschiere@pidgin.im>
parents: 3551
diff changeset
167 }
4596276f5b12 [gaim-migrate @ 5452]
Luke Schierer <lschiere@pidgin.im>
parents: 3551
diff changeset
168
4596276f5b12 [gaim-migrate @ 5452]
Luke Schierer <lschiere@pidgin.im>
parents: 3551
diff changeset
169 static evt_connecting(struct gaim_account *u, void *data)
4596276f5b12 [gaim-migrate @ 5452]
Luke Schierer <lschiere@pidgin.im>
parents: 3551
diff changeset
170 {
4596276f5b12 [gaim-migrate @ 5452]
Luke Schierer <lschiere@pidgin.im>
parents: 3551
diff changeset
171 printf("event_connecting\n");
4596276f5b12 [gaim-migrate @ 5452]
Luke Schierer <lschiere@pidgin.im>
parents: 3551
diff changeset
172 }
4596276f5b12 [gaim-migrate @ 5452]
Luke Schierer <lschiere@pidgin.im>
parents: 3551
diff changeset
173
5255
c0baa01cdeda [gaim-migrate @ 5627]
Luke Schierer <lschiere@pidgin.im>
parents: 5205
diff changeset
174
c0baa01cdeda [gaim-migrate @ 5627]
Luke Schierer <lschiere@pidgin.im>
parents: 5205
diff changeset
175 /*
c0baa01cdeda [gaim-migrate @ 5627]
Luke Schierer <lschiere@pidgin.im>
parents: 5205
diff changeset
176 * EXPORTED FUNCTIONS
c0baa01cdeda [gaim-migrate @ 5627]
Luke Schierer <lschiere@pidgin.im>
parents: 5205
diff changeset
177 */
c0baa01cdeda [gaim-migrate @ 5627]
Luke Schierer <lschiere@pidgin.im>
parents: 5205
diff changeset
178
c0baa01cdeda [gaim-migrate @ 5627]
Luke Schierer <lschiere@pidgin.im>
parents: 5205
diff changeset
179 static gboolean
c0baa01cdeda [gaim-migrate @ 5627]
Luke Schierer <lschiere@pidgin.im>
parents: 5205
diff changeset
180 plugin_load(GaimPlugin *plugin)
534
d7cdcd9e28f4 [gaim-migrate @ 544]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
181 {
5255
c0baa01cdeda [gaim-migrate @ 5627]
Luke Schierer <lschiere@pidgin.im>
parents: 5205
diff changeset
182 gaim_signal_connect(plugin, event_signon, evt_signon, NULL);
c0baa01cdeda [gaim-migrate @ 5627]
Luke Schierer <lschiere@pidgin.im>
parents: 5205
diff changeset
183 gaim_signal_connect(plugin, event_signoff, evt_signoff, NULL);
c0baa01cdeda [gaim-migrate @ 5627]
Luke Schierer <lschiere@pidgin.im>
parents: 5205
diff changeset
184 gaim_signal_connect(plugin, event_away, evt_away, NULL);
c0baa01cdeda [gaim-migrate @ 5627]
Luke Schierer <lschiere@pidgin.im>
parents: 5205
diff changeset
185 gaim_signal_connect(plugin, event_back, evt_back, NULL);
c0baa01cdeda [gaim-migrate @ 5627]
Luke Schierer <lschiere@pidgin.im>
parents: 5205
diff changeset
186 gaim_signal_connect(plugin, event_im_recv, evt_im_recv, NULL);
c0baa01cdeda [gaim-migrate @ 5627]
Luke Schierer <lschiere@pidgin.im>
parents: 5205
diff changeset
187 gaim_signal_connect(plugin, event_im_send, evt_im_send, NULL);
c0baa01cdeda [gaim-migrate @ 5627]
Luke Schierer <lschiere@pidgin.im>
parents: 5205
diff changeset
188 gaim_signal_connect(plugin, event_buddy_signon, evt_buddy_signon, NULL);
c0baa01cdeda [gaim-migrate @ 5627]
Luke Schierer <lschiere@pidgin.im>
parents: 5205
diff changeset
189 gaim_signal_connect(plugin, event_buddy_signoff, evt_buddy_signoff, NULL);
c0baa01cdeda [gaim-migrate @ 5627]
Luke Schierer <lschiere@pidgin.im>
parents: 5205
diff changeset
190 gaim_signal_connect(plugin, event_buddy_away, evt_buddy_away, NULL);
c0baa01cdeda [gaim-migrate @ 5627]
Luke Schierer <lschiere@pidgin.im>
parents: 5205
diff changeset
191 gaim_signal_connect(plugin, event_buddy_back, evt_buddy_back, NULL);
c0baa01cdeda [gaim-migrate @ 5627]
Luke Schierer <lschiere@pidgin.im>
parents: 5205
diff changeset
192 gaim_signal_connect(plugin, event_chat_invited, evt_chat_invited, NULL);
c0baa01cdeda [gaim-migrate @ 5627]
Luke Schierer <lschiere@pidgin.im>
parents: 5205
diff changeset
193 gaim_signal_connect(plugin, event_chat_join, evt_chat_join, NULL);
c0baa01cdeda [gaim-migrate @ 5627]
Luke Schierer <lschiere@pidgin.im>
parents: 5205
diff changeset
194 gaim_signal_connect(plugin, event_chat_leave, evt_chat_leave, NULL);
c0baa01cdeda [gaim-migrate @ 5627]
Luke Schierer <lschiere@pidgin.im>
parents: 5205
diff changeset
195 gaim_signal_connect(plugin, event_chat_buddy_join, evt_chat_buddy_join, NULL);
c0baa01cdeda [gaim-migrate @ 5627]
Luke Schierer <lschiere@pidgin.im>
parents: 5205
diff changeset
196 gaim_signal_connect(plugin, event_chat_buddy_leave, evt_chat_buddy_leave, NULL);
c0baa01cdeda [gaim-migrate @ 5627]
Luke Schierer <lschiere@pidgin.im>
parents: 5205
diff changeset
197 gaim_signal_connect(plugin, event_chat_recv, evt_chat_recv, NULL);
c0baa01cdeda [gaim-migrate @ 5627]
Luke Schierer <lschiere@pidgin.im>
parents: 5205
diff changeset
198 gaim_signal_connect(plugin, event_chat_send, evt_chat_send, NULL);
c0baa01cdeda [gaim-migrate @ 5627]
Luke Schierer <lschiere@pidgin.im>
parents: 5205
diff changeset
199 gaim_signal_connect(plugin, event_warned, evt_warned, NULL);
c0baa01cdeda [gaim-migrate @ 5627]
Luke Schierer <lschiere@pidgin.im>
parents: 5205
diff changeset
200 gaim_signal_connect(plugin, event_error, evt_error, NULL);
c0baa01cdeda [gaim-migrate @ 5627]
Luke Schierer <lschiere@pidgin.im>
parents: 5205
diff changeset
201 gaim_signal_connect(plugin, event_quit, evt_quit, NULL);
c0baa01cdeda [gaim-migrate @ 5627]
Luke Schierer <lschiere@pidgin.im>
parents: 5205
diff changeset
202 gaim_signal_connect(plugin, event_new_conversation, evt_new_conversation, NULL);
c0baa01cdeda [gaim-migrate @ 5627]
Luke Schierer <lschiere@pidgin.im>
parents: 5205
diff changeset
203 gaim_signal_connect(plugin, event_set_info, evt_set_info, NULL);
c0baa01cdeda [gaim-migrate @ 5627]
Luke Schierer <lschiere@pidgin.im>
parents: 5205
diff changeset
204 gaim_signal_connect(plugin, event_draw_menu, evt_draw_menu, NULL);
c0baa01cdeda [gaim-migrate @ 5627]
Luke Schierer <lschiere@pidgin.im>
parents: 5205
diff changeset
205 gaim_signal_connect(plugin, event_im_displayed_sent, evt_im_displayed_sent, NULL);
c0baa01cdeda [gaim-migrate @ 5627]
Luke Schierer <lschiere@pidgin.im>
parents: 5205
diff changeset
206 gaim_signal_connect(plugin, event_im_displayed_rcvd, evt_im_displayed_rcvd, NULL);
c0baa01cdeda [gaim-migrate @ 5627]
Luke Schierer <lschiere@pidgin.im>
parents: 5205
diff changeset
207 gaim_signal_connect(plugin, event_chat_send_invite, evt_chat_send_invite, NULL);
c0baa01cdeda [gaim-migrate @ 5627]
Luke Schierer <lschiere@pidgin.im>
parents: 5205
diff changeset
208 gaim_signal_connect(plugin, event_got_typing, evt_got_typing, NULL);
c0baa01cdeda [gaim-migrate @ 5627]
Luke Schierer <lschiere@pidgin.im>
parents: 5205
diff changeset
209 gaim_signal_connect(plugin, event_del_conversation, evt_del_conversation, NULL);
c0baa01cdeda [gaim-migrate @ 5627]
Luke Schierer <lschiere@pidgin.im>
parents: 5205
diff changeset
210 gaim_signal_connect(plugin, event_connecting, evt_connecting, NULL);
c0baa01cdeda [gaim-migrate @ 5627]
Luke Schierer <lschiere@pidgin.im>
parents: 5205
diff changeset
211
c0baa01cdeda [gaim-migrate @ 5627]
Luke Schierer <lschiere@pidgin.im>
parents: 5205
diff changeset
212 return TRUE;
534
d7cdcd9e28f4 [gaim-migrate @ 544]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
213 }
d7cdcd9e28f4 [gaim-migrate @ 544]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
214
5255
c0baa01cdeda [gaim-migrate @ 5627]
Luke Schierer <lschiere@pidgin.im>
parents: 5205
diff changeset
215 static GaimPluginInfo info =
c0baa01cdeda [gaim-migrate @ 5627]
Luke Schierer <lschiere@pidgin.im>
parents: 5205
diff changeset
216 {
c0baa01cdeda [gaim-migrate @ 5627]
Luke Schierer <lschiere@pidgin.im>
parents: 5205
diff changeset
217 2, /**< api_version */
c0baa01cdeda [gaim-migrate @ 5627]
Luke Schierer <lschiere@pidgin.im>
parents: 5205
diff changeset
218 GAIM_PLUGIN_STANDARD, /**< type */
c0baa01cdeda [gaim-migrate @ 5627]
Luke Schierer <lschiere@pidgin.im>
parents: 5205
diff changeset
219 NULL, /**< ui_requirement */
c0baa01cdeda [gaim-migrate @ 5627]
Luke Schierer <lschiere@pidgin.im>
parents: 5205
diff changeset
220 0, /**< flags */
c0baa01cdeda [gaim-migrate @ 5627]
Luke Schierer <lschiere@pidgin.im>
parents: 5205
diff changeset
221 NULL, /**< dependencies */
c0baa01cdeda [gaim-migrate @ 5627]
Luke Schierer <lschiere@pidgin.im>
parents: 5205
diff changeset
222 GAIM_PRIORITY_DEFAULT, /**< priority */
c0baa01cdeda [gaim-migrate @ 5627]
Luke Schierer <lschiere@pidgin.im>
parents: 5205
diff changeset
223
c0baa01cdeda [gaim-migrate @ 5627]
Luke Schierer <lschiere@pidgin.im>
parents: 5205
diff changeset
224 EVENTTEST_PLUGIN_ID, /**< id */
c0baa01cdeda [gaim-migrate @ 5627]
Luke Schierer <lschiere@pidgin.im>
parents: 5205
diff changeset
225 N_("Event Test"), /**< name */
c0baa01cdeda [gaim-migrate @ 5627]
Luke Schierer <lschiere@pidgin.im>
parents: 5205
diff changeset
226 VERSION, /**< version */
c0baa01cdeda [gaim-migrate @ 5627]
Luke Schierer <lschiere@pidgin.im>
parents: 5205
diff changeset
227 /** summary */
c0baa01cdeda [gaim-migrate @ 5627]
Luke Schierer <lschiere@pidgin.im>
parents: 5205
diff changeset
228 N_("Test to see that all events are working properly."),
c0baa01cdeda [gaim-migrate @ 5627]
Luke Schierer <lschiere@pidgin.im>
parents: 5205
diff changeset
229 /** description */
c0baa01cdeda [gaim-migrate @ 5627]
Luke Schierer <lschiere@pidgin.im>
parents: 5205
diff changeset
230 N_("Test to see that all events are working properly."),
c0baa01cdeda [gaim-migrate @ 5627]
Luke Schierer <lschiere@pidgin.im>
parents: 5205
diff changeset
231 "Eric Warmenhoven <eric@warmenhoven.org>", /**< author */
c0baa01cdeda [gaim-migrate @ 5627]
Luke Schierer <lschiere@pidgin.im>
parents: 5205
diff changeset
232 WEBSITE, /**< homepage */
c0baa01cdeda [gaim-migrate @ 5627]
Luke Schierer <lschiere@pidgin.im>
parents: 5205
diff changeset
233
c0baa01cdeda [gaim-migrate @ 5627]
Luke Schierer <lschiere@pidgin.im>
parents: 5205
diff changeset
234 plugin_load, /**< load */
c0baa01cdeda [gaim-migrate @ 5627]
Luke Schierer <lschiere@pidgin.im>
parents: 5205
diff changeset
235 NULL, /**< unload */
c0baa01cdeda [gaim-migrate @ 5627]
Luke Schierer <lschiere@pidgin.im>
parents: 5205
diff changeset
236 NULL, /**< destroy */
c0baa01cdeda [gaim-migrate @ 5627]
Luke Schierer <lschiere@pidgin.im>
parents: 5205
diff changeset
237
c0baa01cdeda [gaim-migrate @ 5627]
Luke Schierer <lschiere@pidgin.im>
parents: 5205
diff changeset
238 NULL, /**< ui_info */
c0baa01cdeda [gaim-migrate @ 5627]
Luke Schierer <lschiere@pidgin.im>
parents: 5205
diff changeset
239 NULL /**< extra_info */
c0baa01cdeda [gaim-migrate @ 5627]
Luke Schierer <lschiere@pidgin.im>
parents: 5205
diff changeset
240 };
c0baa01cdeda [gaim-migrate @ 5627]
Luke Schierer <lschiere@pidgin.im>
parents: 5205
diff changeset
241
c0baa01cdeda [gaim-migrate @ 5627]
Luke Schierer <lschiere@pidgin.im>
parents: 5205
diff changeset
242 static void
c0baa01cdeda [gaim-migrate @ 5627]
Luke Schierer <lschiere@pidgin.im>
parents: 5205
diff changeset
243 __init_plugin(GaimPlugin *plugin)
c0baa01cdeda [gaim-migrate @ 5627]
Luke Schierer <lschiere@pidgin.im>
parents: 5205
diff changeset
244 {
3551
cd938f18f3f8 [gaim-migrate @ 3626]
Sean Egan <seanegan@gmail.com>
parents: 2130
diff changeset
245 }
cd938f18f3f8 [gaim-migrate @ 3626]
Sean Egan <seanegan@gmail.com>
parents: 2130
diff changeset
246
5255
c0baa01cdeda [gaim-migrate @ 5627]
Luke Schierer <lschiere@pidgin.im>
parents: 5205
diff changeset
247 GAIM_INIT_PLUGIN(eventtester, __init_plugin, info);