annotate plugins/signals-test.c @ 6929:906567be99b2

[gaim-migrate @ 7476] Popup notification when moving data dir committer: Tailor Script <tailor@pidgin.im>
author Herman Bloggs <hermanator12002@yahoo.com>
date Wed, 24 Sep 2003 02:21:44 +0000
parents e74e378e86bf
children d77e99c55b40
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
6485
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
1 /*
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
2 * Signals test plugin.
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
3 *
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
4 * Copyright (C) 2003 Christian Hammond.
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
5 *
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
6 * This program is free software; you can redistribute it and/or
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
7 * modify it under the terms of the GNU General Public License as
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
8 * published by the Free Software Foundation; either version 2 of the
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
9 * License, or (at your option) any later version.
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
10 *
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
11 * This program is distributed in the hope that it will be useful, but
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
12 * WITHOUT ANY WARRANTY; without even the implied warranty of
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
14 * General Public License for more details.
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
15 *
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
16 * You should have received a copy of the GNU General Public License
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
17 * along with this program; if not, write to the Free Software
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
18 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
19 * 02111-1307, USA.
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
20 */
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
21 #define SIGNAL_TEST_PLUGIN_ID "core-signals-test"
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
22
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
23 #include <stdio.h>
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
24
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
25 #include "internal.h"
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
26 #include "connection.h"
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
27 #include "conversation.h"
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
28 #include "core.h"
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
29 #include "debug.h"
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
30 #include "signals.h"
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
31
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
32 /**************************************************************************
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
33 * Account subsystem signal callbacks
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
34 **************************************************************************/
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
35 static void
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
36 account_connecting_cb(GaimAccount *account, void *data)
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
37 {
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
38 gaim_debug(GAIM_DEBUG_MISC, "signals test", "account-connecting (%s)\n",
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
39 gaim_account_get_username(account));
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
40 }
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
41
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
42 static void
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
43 account_away_cb(GaimAccount *account, const char *state,
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
44 const char *message, void *data)
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
45 {
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
46 gaim_debug(GAIM_DEBUG_MISC, "signals test",
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
47 "account-away (%s, %s, %s)\n",
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
48 gaim_account_get_username(account), state, message);
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
49 }
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
50
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
51 static void
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
52 account_setting_info_cb(GaimAccount *account, const char *info, void *data)
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
53 {
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
54 gaim_debug(GAIM_DEBUG_MISC, "signals test",
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
55 "account-setting-info (%s, %s)\n",
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
56 gaim_account_get_username(account), info);
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
57 }
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
58
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
59 static void
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
60 account_set_info_cb(GaimAccount *account, const char *info, void *data)
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
61 {
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
62 gaim_debug(GAIM_DEBUG_MISC, "signals test",
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
63 "account-set-info (%s, %s)\n",
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
64 gaim_account_get_username(account), info);
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
65 }
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
66
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
67 static void
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
68 account_warned_cb(GaimAccount *account, const char *warner, int level,
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
69 void *data)
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
70 {
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
71 gaim_debug(GAIM_DEBUG_MISC, "signals test",
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
72 "account-warned (%s, %s, %d)\n",
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
73 gaim_account_get_username(account), warner, level);
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
74 }
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
75
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
76 /**************************************************************************
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
77 * Buddy List subsystem signal callbacks
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
78 **************************************************************************/
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
79 static void
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
80 buddy_away_cb(struct buddy *buddy, void *data)
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
81 {
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
82 gaim_debug(GAIM_DEBUG_MISC, "signals test",
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
83 "buddy-away (%s)\n", buddy->name);
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
84 }
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
85
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
86 static void
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
87 buddy_back_cb(struct buddy *buddy, void *data)
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
88 {
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
89 gaim_debug(GAIM_DEBUG_MISC, "signals test",
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
90 "buddy-back (%s)\n", buddy->name);
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
91 }
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
92
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
93 static void
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
94 buddy_idle_cb(struct buddy *buddy, void *data)
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
95 {
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
96 gaim_debug(GAIM_DEBUG_MISC, "signals test",
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
97 "buddy-idle (%s)\n", buddy->name);
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
98 }
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
99
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
100 static void
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
101 buddy_unidle_cb(struct buddy *buddy, void *data)
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
102 {
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
103 gaim_debug(GAIM_DEBUG_MISC, "signals test",
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
104 "buddy-unidle (%s)\n", buddy->name);
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
105 }
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
106
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
107 static void
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
108 buddy_signed_on_cb(struct buddy *buddy, void *data)
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
109 {
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
110 gaim_debug(GAIM_DEBUG_MISC, "signals test",
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
111 "buddy-signed-on (%s)\n", buddy->name);
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
112 }
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
113
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
114 static void
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
115 buddy_signed_off_cb(struct buddy *buddy, void *data)
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
116 {
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
117 gaim_debug(GAIM_DEBUG_MISC, "signals test",
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
118 "buddy-signed-off (%s)\n", buddy->name);
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
119 }
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
120
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
121 /**************************************************************************
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
122 * Connection subsystem signal callbacks
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
123 **************************************************************************/
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
124 static void
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
125 signing_on_cb(GaimConnection *gc, void *data)
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
126 {
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
127 gaim_debug(GAIM_DEBUG_MISC, "signals test",
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
128 "signing-on (%s)\n",
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
129 gaim_account_get_username(gaim_connection_get_account(gc)));
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
130 }
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
131
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
132 static void
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
133 signed_on_cb(GaimConnection *gc, void *data)
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
134 {
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
135 gaim_debug(GAIM_DEBUG_MISC, "signals test",
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
136 "signed-on (%s)\n",
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
137 gaim_account_get_username(gaim_connection_get_account(gc)));
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
138 }
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
139
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
140 static void
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
141 signing_off_cb(GaimConnection *gc, void *data)
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
142 {
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
143 gaim_debug(GAIM_DEBUG_MISC, "signals test",
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
144 "signing-off (%s)\n",
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
145 gaim_account_get_username(gaim_connection_get_account(gc)));
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
146 }
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
147
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
148 static void
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
149 signed_off_cb(GaimConnection *gc, void *data)
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
150 {
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
151 gaim_debug(GAIM_DEBUG_MISC, "signals test",
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
152 "signed-off (%s)\n",
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
153 gaim_account_get_username(gaim_connection_get_account(gc)));
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
154 }
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
155
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
156 /**************************************************************************
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
157 * Conversation subsystem signal callbacks
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
158 **************************************************************************/
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
159 static gboolean
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
160 displaying_im_msg_cb(GaimConversation *conv, char **buffer, void *data)
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
161 {
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
162 gaim_debug(GAIM_DEBUG_MISC, "signals test",
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
163 "displaying-im-msg (%s, %s)\n",
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
164 gaim_conversation_get_name(conv), *buffer);
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
165
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
166 return FALSE;
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
167 }
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
168
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
169 static void
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
170 displayed_im_msg_cb(GaimConversation *conv, const char *buffer, void *data)
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
171 {
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
172 gaim_debug(GAIM_DEBUG_MISC, "signals test",
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
173 "displayed-im-msg (%s, %s)\n",
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
174 gaim_conversation_get_name(conv), buffer);
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
175 }
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
176
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
177 static gboolean
6509
e74e378e86bf [gaim-migrate @ 7026]
Ethan Blanton <elb@pidgin.im>
parents: 6489
diff changeset
178 sending_im_msg_cb(GaimAccount *account, char *recipient, char **buffer, void *data)
6485
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
179 {
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
180 gaim_debug(GAIM_DEBUG_MISC, "signals test",
6509
e74e378e86bf [gaim-migrate @ 7026]
Ethan Blanton <elb@pidgin.im>
parents: 6489
diff changeset
181 "sending-im-msg (%s, %s, %s)\n",
e74e378e86bf [gaim-migrate @ 7026]
Ethan Blanton <elb@pidgin.im>
parents: 6489
diff changeset
182 gaim_account_get_username(account), recipient,
e74e378e86bf [gaim-migrate @ 7026]
Ethan Blanton <elb@pidgin.im>
parents: 6489
diff changeset
183 *buffer);
6485
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
184
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
185 return FALSE;
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
186 }
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
187
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
188 static void
6509
e74e378e86bf [gaim-migrate @ 7026]
Ethan Blanton <elb@pidgin.im>
parents: 6489
diff changeset
189 sent_im_msg_cb(GaimAccount *account, const char *recipient, const char *buffer, void *data)
6485
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
190 {
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
191 gaim_debug(GAIM_DEBUG_MISC, "signals test",
6509
e74e378e86bf [gaim-migrate @ 7026]
Ethan Blanton <elb@pidgin.im>
parents: 6489
diff changeset
192 "sent-im-msg (%s, %s, %s)\n",
e74e378e86bf [gaim-migrate @ 7026]
Ethan Blanton <elb@pidgin.im>
parents: 6489
diff changeset
193 gaim_account_get_username(account),
e74e378e86bf [gaim-migrate @ 7026]
Ethan Blanton <elb@pidgin.im>
parents: 6489
diff changeset
194 recipient, buffer);
6485
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
195 }
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
196
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
197 static gboolean
6509
e74e378e86bf [gaim-migrate @ 7026]
Ethan Blanton <elb@pidgin.im>
parents: 6489
diff changeset
198 received_im_msg_cb(GaimAccount *account, char **sender, char **buffer,
e74e378e86bf [gaim-migrate @ 7026]
Ethan Blanton <elb@pidgin.im>
parents: 6489
diff changeset
199 int *flags, void *data)
6485
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
200 {
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
201 gaim_debug(GAIM_DEBUG_MISC, "signals test",
6509
e74e378e86bf [gaim-migrate @ 7026]
Ethan Blanton <elb@pidgin.im>
parents: 6489
diff changeset
202 "received-im-msg (%s, %s, %s, %d)\n",
e74e378e86bf [gaim-migrate @ 7026]
Ethan Blanton <elb@pidgin.im>
parents: 6489
diff changeset
203 gaim_account_get_username(account), *sender, *buffer, *flags);
6485
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
204
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
205 return FALSE;
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
206 }
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
207
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
208 static gboolean
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
209 displaying_chat_msg_cb(GaimConversation *conv, char **buffer, void *data)
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
210 {
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
211 gaim_debug(GAIM_DEBUG_MISC, "signals test",
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
212 "displaying-chat-msg (%s, %s)\n",
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
213 gaim_conversation_get_name(conv), *buffer);
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
214
6486
fab81e4b885c [gaim-migrate @ 7000]
Christian Hammond <chipx86@chipx86.com>
parents: 6485
diff changeset
215 return FALSE;
6485
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
216 }
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
217
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
218 static void
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
219 displayed_chat_msg_cb(GaimConversation *conv, const char *buffer, void *data)
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
220 {
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
221 gaim_debug(GAIM_DEBUG_MISC, "signals test",
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
222 "displayed-chat-msg (%s, %s)\n",
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
223 gaim_conversation_get_name(conv), buffer);
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
224 }
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
225
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
226 static gboolean
6509
e74e378e86bf [gaim-migrate @ 7026]
Ethan Blanton <elb@pidgin.im>
parents: 6489
diff changeset
227 sending_chat_msg_cb(GaimAccount *account, char **buffer, int id, void *data)
6485
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
228 {
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
229 gaim_debug(GAIM_DEBUG_MISC, "signals test",
6509
e74e378e86bf [gaim-migrate @ 7026]
Ethan Blanton <elb@pidgin.im>
parents: 6489
diff changeset
230 "sending-chat-msg (%s, %s, %d)\n",
e74e378e86bf [gaim-migrate @ 7026]
Ethan Blanton <elb@pidgin.im>
parents: 6489
diff changeset
231 gaim_account_get_username(account), *buffer, id);
6485
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
232
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
233 return FALSE;
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
234 }
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
235
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
236 static void
6509
e74e378e86bf [gaim-migrate @ 7026]
Ethan Blanton <elb@pidgin.im>
parents: 6489
diff changeset
237 sent_chat_msg_cb(GaimAccount *account, const char *buffer, int id, void *data)
6485
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
238 {
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
239 gaim_debug(GAIM_DEBUG_MISC, "signals test",
6509
e74e378e86bf [gaim-migrate @ 7026]
Ethan Blanton <elb@pidgin.im>
parents: 6489
diff changeset
240 "sent-chat-msg (%s, %s, %d)\n",
e74e378e86bf [gaim-migrate @ 7026]
Ethan Blanton <elb@pidgin.im>
parents: 6489
diff changeset
241 gaim_account_get_username(account), buffer, id);
6485
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
242 }
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
243
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
244 static gboolean
6509
e74e378e86bf [gaim-migrate @ 7026]
Ethan Blanton <elb@pidgin.im>
parents: 6489
diff changeset
245 received_chat_msg_cb(GaimAccount *account, char **sender, char **buffer,
e74e378e86bf [gaim-migrate @ 7026]
Ethan Blanton <elb@pidgin.im>
parents: 6489
diff changeset
246 int id, void *data)
6485
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
247 {
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
248 gaim_debug(GAIM_DEBUG_MISC, "signals test",
6509
e74e378e86bf [gaim-migrate @ 7026]
Ethan Blanton <elb@pidgin.im>
parents: 6489
diff changeset
249 "received-chat-msg (%s, %s, %s, %s, %d)\n",
e74e378e86bf [gaim-migrate @ 7026]
Ethan Blanton <elb@pidgin.im>
parents: 6489
diff changeset
250 gaim_account_get_username(account), *sender, *buffer, id);
6485
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
251
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
252 return FALSE;
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
253 }
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
254
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
255 static void
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
256 conversation_switching_cb(GaimConversation *old_conv,
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
257 GaimConversation *new_conv, void *data)
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
258 {
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
259 gaim_debug(GAIM_DEBUG_MISC, "signals test",
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
260 "conversation-switching (%s, %s)\n",
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
261 gaim_conversation_get_name(old_conv),
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
262 gaim_conversation_get_name(new_conv));
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
263 }
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
264
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
265 static void
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
266 conversation_switched_cb(GaimConversation *old_conv,
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
267 GaimConversation *new_conv, void *data)
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
268 {
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
269 gaim_debug(GAIM_DEBUG_MISC, "signals test",
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
270 "conversation-switched (%s, %s)\n",
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
271 gaim_conversation_get_name(old_conv),
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
272 gaim_conversation_get_name(new_conv));
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
273 }
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
274
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
275 static void
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
276 conversation_created_cb(GaimConversation *conv, void *data)
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
277 {
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
278 gaim_debug(GAIM_DEBUG_MISC, "signals test",
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
279 "conversation-created (%s)\n",
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
280 gaim_conversation_get_name(conv));
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
281 }
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
282
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
283 static void
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
284 deleting_conversation_cb(GaimConversation *conv, void *data)
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
285 {
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
286 gaim_debug(GAIM_DEBUG_MISC, "signals test",
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
287 "deleting-conversation (%s)\n",
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
288 gaim_conversation_get_name(conv));
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
289 }
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
290
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
291 static void
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
292 buddy_typing_cb(GaimConversation *conv, void *data)
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
293 {
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
294 gaim_debug(GAIM_DEBUG_MISC, "signals test",
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
295 "buddy-typing (%s)\n",
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
296 gaim_conversation_get_name(conv));
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
297 }
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
298
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
299 static void
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
300 chat_buddy_joining_cb(GaimConversation *conv, const char *user, void *data)
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
301 {
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
302 gaim_debug(GAIM_DEBUG_MISC, "signals test",
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
303 "chat-buddy-joining (%s, %s)\n",
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
304 gaim_conversation_get_name(conv), user);
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
305 }
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
306
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
307 static void
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
308 chat_buddy_joined_cb(GaimConversation *conv, const char *user, void *data)
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
309 {
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
310 gaim_debug(GAIM_DEBUG_MISC, "signals test",
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
311 "chat-buddy-joined (%s, %s)\n",
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
312 gaim_conversation_get_name(conv), user);
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
313 }
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
314
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
315 static void
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
316 chat_buddy_leaving_cb(GaimConversation *conv, const char *user,
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
317 const char *reason, void *data)
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
318 {
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
319 gaim_debug(GAIM_DEBUG_MISC, "signals test",
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
320 "chat-buddy-leaving (%s, %s, %s)\n",
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
321 gaim_conversation_get_name(conv), user, reason);
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
322 }
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
323
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
324 static void
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
325 chat_buddy_left_cb(GaimConversation *conv, const char *user,
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
326 const char *reason, void *data)
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
327 {
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
328 gaim_debug(GAIM_DEBUG_MISC, "signals test",
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
329 "chat-buddy-left (%s, %s, %s)\n",
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
330 gaim_conversation_get_name(conv), user, reason);
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
331 }
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
332
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
333 static void
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
334 chat_inviting_user_cb(GaimConversation *conv, const char *name,
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
335 const char *reason, void *data)
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
336 {
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
337 gaim_debug(GAIM_DEBUG_MISC, "signals test",
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
338 "chat-inviting-user (%s, %s, %s)\n",
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
339 gaim_conversation_get_name(conv), name, reason);
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
340 }
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
341
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
342 static void
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
343 chat_invited_user_cb(GaimConversation *conv, const char *name,
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
344 const char *reason, void *data)
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
345 {
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
346 gaim_debug(GAIM_DEBUG_MISC, "signals test",
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
347 "chat-invited-user (%s, %s, %s)\n",
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
348 gaim_conversation_get_name(conv), name, reason);
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
349 }
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
350
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
351 static void
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
352 chat_invited_cb(GaimAccount *account, const char *inviter,
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
353 const char *room_name, const char *message, void *data)
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
354 {
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
355 gaim_debug(GAIM_DEBUG_MISC, "signals test",
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
356 "chat-invited (%s, %s, %s, %s)\n",
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
357 gaim_account_get_username(account), inviter,
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
358 room_name, message);
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
359 }
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
360
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
361 static void
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
362 chat_joined_cb(GaimConversation *conv, void *data)
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
363 {
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
364 gaim_debug(GAIM_DEBUG_MISC, "signals test",
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
365 "chat-joined (%s)\n",
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
366 gaim_conversation_get_name(conv));
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
367 }
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
368
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
369 static void
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
370 chat_left_cb(GaimConversation *conv, void *data)
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
371 {
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
372 gaim_debug(GAIM_DEBUG_MISC, "signals test",
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
373 "chat-left (%s)\n",
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
374 gaim_conversation_get_name(conv));
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
375 }
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
376
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
377 /**************************************************************************
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
378 * Core signal callbacks
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
379 **************************************************************************/
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
380 static void
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
381 quitting_cb(void *data)
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
382 {
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
383 gaim_debug(GAIM_DEBUG_MISC, "signals test",
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
384 "quitting ()\n");
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
385 }
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
386
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
387 /**************************************************************************
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
388 * Plugin stuff
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
389 **************************************************************************/
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
390 static gboolean
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
391 plugin_load(GaimPlugin *plugin)
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
392 {
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
393 void *core_handle = gaim_get_core();
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
394 void *blist_handle = gaim_blist_get_handle();
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
395 void *conn_handle = gaim_connections_get_handle();
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
396 void *conv_handle = gaim_conversations_get_handle();
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
397 void *accounts_handle = gaim_accounts_get_handle();
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
398
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
399 /* Accounts subsystem signals */
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
400 gaim_signal_connect(accounts_handle, "account-connecting",
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
401 plugin, GAIM_CALLBACK(account_connecting_cb), NULL);
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
402 gaim_signal_connect(accounts_handle, "account-away",
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
403 plugin, GAIM_CALLBACK(account_away_cb), NULL);
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
404 gaim_signal_connect(accounts_handle, "account-setting-info",
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
405 plugin, GAIM_CALLBACK(account_setting_info_cb), NULL);
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
406 gaim_signal_connect(accounts_handle, "account-set-info",
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
407 plugin, GAIM_CALLBACK(account_set_info_cb), NULL);
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
408 gaim_signal_connect(accounts_handle, "account-warned",
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
409 plugin, GAIM_CALLBACK(account_warned_cb), NULL);
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
410
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
411 /* Buddy List subsystem signals */
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
412 gaim_signal_connect(blist_handle, "buddy-away",
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
413 plugin, GAIM_CALLBACK(buddy_away_cb), NULL);
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
414 gaim_signal_connect(blist_handle, "buddy-back",
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
415 plugin, GAIM_CALLBACK(buddy_back_cb), NULL);
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
416 gaim_signal_connect(blist_handle, "buddy-idle",
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
417 plugin, GAIM_CALLBACK(buddy_idle_cb), NULL);
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
418 gaim_signal_connect(blist_handle, "buddy-unidle",
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
419 plugin, GAIM_CALLBACK(buddy_unidle_cb), NULL);
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
420 gaim_signal_connect(blist_handle, "buddy-signed-on",
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
421 plugin, GAIM_CALLBACK(buddy_signed_on_cb), NULL);
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
422 gaim_signal_connect(blist_handle, "buddy-signed-off",
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
423 plugin, GAIM_CALLBACK(buddy_signed_off_cb), NULL);
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
424
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
425 /* Connection subsystem signals */
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
426 gaim_signal_connect(conn_handle, "signing-on",
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
427 plugin, GAIM_CALLBACK(signing_on_cb), NULL);
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
428 gaim_signal_connect(conn_handle, "signed-on",
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
429 plugin, GAIM_CALLBACK(signed_on_cb), NULL);
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
430 gaim_signal_connect(conn_handle, "signing-off",
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
431 plugin, GAIM_CALLBACK(signing_off_cb), NULL);
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
432 gaim_signal_connect(conn_handle, "signed-off",
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
433 plugin, GAIM_CALLBACK(signed_off_cb), NULL);
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
434
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
435 /* Conversations subsystem signals */
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
436 gaim_signal_connect(conv_handle, "displaying-im-msg",
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
437 plugin, GAIM_CALLBACK(displaying_im_msg_cb), NULL);
6489
aefe4067d3a3 [gaim-migrate @ 7003]
Nathan Walp <nwalp@pidgin.im>
parents: 6486
diff changeset
438 gaim_signal_connect(conv_handle, "displayed-im-msg",
6485
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
439 plugin, GAIM_CALLBACK(displayed_im_msg_cb), NULL);
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
440 gaim_signal_connect(conv_handle, "sending-im-msg",
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
441 plugin, GAIM_CALLBACK(sending_im_msg_cb), NULL);
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
442 gaim_signal_connect(conv_handle, "sent-im-msg",
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
443 plugin, GAIM_CALLBACK(sent_im_msg_cb), NULL);
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
444 gaim_signal_connect(conv_handle, "received-im-msg",
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
445 plugin, GAIM_CALLBACK(received_im_msg_cb), NULL);
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
446 gaim_signal_connect(conv_handle, "displaying-chat-msg",
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
447 plugin, GAIM_CALLBACK(displaying_chat_msg_cb), NULL);
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
448 gaim_signal_connect(conv_handle, "displayed-chat-msg",
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
449 plugin, GAIM_CALLBACK(displayed_chat_msg_cb), NULL);
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
450 gaim_signal_connect(conv_handle, "sending-chat-msg",
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
451 plugin, GAIM_CALLBACK(sending_chat_msg_cb), NULL);
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
452 gaim_signal_connect(conv_handle, "sent-chat-msg",
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
453 plugin, GAIM_CALLBACK(sent_chat_msg_cb), NULL);
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
454 gaim_signal_connect(conv_handle, "received-chat-msg",
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
455 plugin, GAIM_CALLBACK(received_chat_msg_cb), NULL);
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
456 gaim_signal_connect(conv_handle, "conversation-switching",
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
457 plugin, GAIM_CALLBACK(conversation_switching_cb), NULL);
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
458 gaim_signal_connect(conv_handle, "conversation-switched",
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
459 plugin, GAIM_CALLBACK(conversation_switched_cb), NULL);
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
460 gaim_signal_connect(conv_handle, "conversation-created",
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
461 plugin, GAIM_CALLBACK(conversation_created_cb), NULL);
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
462 gaim_signal_connect(conv_handle, "deleting-conversation",
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
463 plugin, GAIM_CALLBACK(deleting_conversation_cb), NULL);
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
464 gaim_signal_connect(conv_handle, "buddy-typing",
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
465 plugin, GAIM_CALLBACK(buddy_typing_cb), NULL);
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
466 gaim_signal_connect(conv_handle, "chat-buddy-joining",
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
467 plugin, GAIM_CALLBACK(chat_buddy_joining_cb), NULL);
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
468 gaim_signal_connect(conv_handle, "chat-buddy-joined",
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
469 plugin, GAIM_CALLBACK(chat_buddy_joined_cb), NULL);
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
470 gaim_signal_connect(conv_handle, "chat-buddy-leaving",
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
471 plugin, GAIM_CALLBACK(chat_buddy_leaving_cb), NULL);
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
472 gaim_signal_connect(conv_handle, "chat-buddy-left",
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
473 plugin, GAIM_CALLBACK(chat_buddy_left_cb), NULL);
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
474 gaim_signal_connect(conv_handle, "chat-inviting-user",
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
475 plugin, GAIM_CALLBACK(chat_inviting_user_cb), NULL);
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
476 gaim_signal_connect(conv_handle, "chat-invited-user",
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
477 plugin, GAIM_CALLBACK(chat_invited_user_cb), NULL);
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
478 gaim_signal_connect(conv_handle, "chat-invited",
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
479 plugin, GAIM_CALLBACK(chat_invited_cb), NULL);
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
480 gaim_signal_connect(conv_handle, "chat-joined",
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
481 plugin, GAIM_CALLBACK(chat_joined_cb), NULL);
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
482 gaim_signal_connect(conv_handle, "chat-left",
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
483 plugin, GAIM_CALLBACK(chat_left_cb), NULL);
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
484
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
485 /* Core signals */
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
486 gaim_signal_connect(core_handle, "quitting",
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
487 plugin, GAIM_CALLBACK(quitting_cb), NULL);
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
488
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
489 return TRUE;
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
490 }
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
491
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
492 static GaimPluginInfo info =
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
493 {
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
494 2, /**< api_version */
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
495 GAIM_PLUGIN_STANDARD, /**< type */
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
496 NULL, /**< ui_requirement */
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
497 0, /**< flags */
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
498 NULL, /**< dependencies */
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
499 GAIM_PRIORITY_DEFAULT, /**< priority */
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
500
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
501 SIGNAL_TEST_PLUGIN_ID, /**< id */
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
502 N_("Signals Test"), /**< name */
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
503 VERSION, /**< version */
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
504 /** summary */
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
505 N_("Test to see that all signals are working properly."),
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
506 /** description */
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
507 N_("Test to see that all signals are working properly."),
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
508 "Christian Hammond <chipx86@gnupdate.org>", /**< author */
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
509 GAIM_WEBSITE, /**< homepage */
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
510
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
511 plugin_load, /**< load */
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
512 NULL, /**< unload */
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
513 NULL, /**< destroy */
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
514
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
515 NULL, /**< ui_info */
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
516 NULL /**< extra_info */
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
517 };
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
518
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
519 static void
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
520 init_plugin(GaimPlugin *plugin)
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
521 {
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
522 }
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
523
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
524 GAIM_INIT_PLUGIN(signalstest, init_plugin, info)