annotate plugins/signals-test.c @ 7859:e873d0bd0e6c

[gaim-migrate @ 8513] I changed some stuff with conversation menus. Stuff is renamed, moved around, not grayed out, grayed out, visible, somewhat works for chats, etc. Ima finish this tomorrow because it's 6 o'freaking clock. It shouldn't make anything worse, and might make some things better. committer: Tailor Script <tailor@pidgin.im>
author Mark Doliner <mark@kingant.net>
date Sun, 14 Dec 2003 11:03:54 +0000
parents 767d3db53e17
children d7b8eb1f0a18
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 {
7517
767d3db53e17 [gaim-migrate @ 8130]
Christian Hammond <chipx86@chipx86.com>
parents: 7516
diff changeset
38 gaim_debug_misc("signals test", "account-connecting (%s)\n",
767d3db53e17 [gaim-migrate @ 8130]
Christian Hammond <chipx86@chipx86.com>
parents: 7516
diff changeset
39 gaim_account_get_username(account));
6485
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 {
7517
767d3db53e17 [gaim-migrate @ 8130]
Christian Hammond <chipx86@chipx86.com>
parents: 7516
diff changeset
46 gaim_debug_misc("signals test", "account-away (%s, %s, %s)\n",
767d3db53e17 [gaim-migrate @ 8130]
Christian Hammond <chipx86@chipx86.com>
parents: 7516
diff changeset
47 gaim_account_get_username(account), state, message);
6485
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
48 }
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 static void
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
51 account_setting_info_cb(GaimAccount *account, const char *info, void *data)
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
52 {
7517
767d3db53e17 [gaim-migrate @ 8130]
Christian Hammond <chipx86@chipx86.com>
parents: 7516
diff changeset
53 gaim_debug_misc("signals test", "account-setting-info (%s, %s)\n",
767d3db53e17 [gaim-migrate @ 8130]
Christian Hammond <chipx86@chipx86.com>
parents: 7516
diff changeset
54 gaim_account_get_username(account), info);
6485
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
55 }
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
56
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
57 static void
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
58 account_set_info_cb(GaimAccount *account, const char *info, void *data)
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
59 {
7517
767d3db53e17 [gaim-migrate @ 8130]
Christian Hammond <chipx86@chipx86.com>
parents: 7516
diff changeset
60 gaim_debug_misc("signals test", "account-set-info (%s, %s)\n",
767d3db53e17 [gaim-migrate @ 8130]
Christian Hammond <chipx86@chipx86.com>
parents: 7516
diff changeset
61 gaim_account_get_username(account), info);
6485
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
62 }
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
63
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
64 static void
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
65 account_warned_cb(GaimAccount *account, const char *warner, int level,
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
66 void *data)
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
67 {
7517
767d3db53e17 [gaim-migrate @ 8130]
Christian Hammond <chipx86@chipx86.com>
parents: 7516
diff changeset
68 gaim_debug_misc("signals test", "account-warned (%s, %s, %d)\n",
767d3db53e17 [gaim-migrate @ 8130]
Christian Hammond <chipx86@chipx86.com>
parents: 7516
diff changeset
69 gaim_account_get_username(account), warner, level);
6485
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
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
72 /**************************************************************************
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
73 * Buddy List subsystem signal callbacks
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 static void
7009
d77e99c55b40 [gaim-migrate @ 7568]
Christian Hammond <chipx86@chipx86.com>
parents: 6509
diff changeset
76 buddy_away_cb(GaimBuddy *buddy, void *data)
6485
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
77 {
7517
767d3db53e17 [gaim-migrate @ 8130]
Christian Hammond <chipx86@chipx86.com>
parents: 7516
diff changeset
78 gaim_debug_misc("signals test", "buddy-away (%s)\n", buddy->name);
6485
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
79 }
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
80
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
81 static void
7009
d77e99c55b40 [gaim-migrate @ 7568]
Christian Hammond <chipx86@chipx86.com>
parents: 6509
diff changeset
82 buddy_back_cb(GaimBuddy *buddy, void *data)
6485
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
83 {
7517
767d3db53e17 [gaim-migrate @ 8130]
Christian Hammond <chipx86@chipx86.com>
parents: 7516
diff changeset
84 gaim_debug_misc("signals test", "buddy-back (%s)\n", buddy->name);
6485
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
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
87 static void
7009
d77e99c55b40 [gaim-migrate @ 7568]
Christian Hammond <chipx86@chipx86.com>
parents: 6509
diff changeset
88 buddy_idle_cb(GaimBuddy *buddy, void *data)
6485
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
89 {
7517
767d3db53e17 [gaim-migrate @ 8130]
Christian Hammond <chipx86@chipx86.com>
parents: 7516
diff changeset
90 gaim_debug_misc("signals test", "buddy-idle (%s)\n", buddy->name);
6485
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
7009
d77e99c55b40 [gaim-migrate @ 7568]
Christian Hammond <chipx86@chipx86.com>
parents: 6509
diff changeset
94 buddy_unidle_cb(GaimBuddy *buddy, void *data)
6485
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
95 {
7517
767d3db53e17 [gaim-migrate @ 8130]
Christian Hammond <chipx86@chipx86.com>
parents: 7516
diff changeset
96 gaim_debug_misc("signals test", "buddy-unidle (%s)\n", buddy->name);
6485
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
97 }
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 static void
7009
d77e99c55b40 [gaim-migrate @ 7568]
Christian Hammond <chipx86@chipx86.com>
parents: 6509
diff changeset
100 buddy_signed_on_cb(GaimBuddy *buddy, void *data)
6485
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
101 {
7517
767d3db53e17 [gaim-migrate @ 8130]
Christian Hammond <chipx86@chipx86.com>
parents: 7516
diff changeset
102 gaim_debug_misc("signals test", "buddy-signed-on (%s)\n", buddy->name);
6485
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
103 }
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
104
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
105 static void
7009
d77e99c55b40 [gaim-migrate @ 7568]
Christian Hammond <chipx86@chipx86.com>
parents: 6509
diff changeset
106 buddy_signed_off_cb(GaimBuddy *buddy, void *data)
6485
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
107 {
7517
767d3db53e17 [gaim-migrate @ 8130]
Christian Hammond <chipx86@chipx86.com>
parents: 7516
diff changeset
108 gaim_debug_misc("signals test", "buddy-signed-off (%s)\n", buddy->name);
6485
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
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
111 /**************************************************************************
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
112 * Connection subsystem signal callbacks
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 signing_on_cb(GaimConnection *gc, void *data)
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
116 {
7517
767d3db53e17 [gaim-migrate @ 8130]
Christian Hammond <chipx86@chipx86.com>
parents: 7516
diff changeset
117 gaim_debug_misc("signals test", "signing-on (%s)\n",
767d3db53e17 [gaim-migrate @ 8130]
Christian Hammond <chipx86@chipx86.com>
parents: 7516
diff changeset
118 gaim_account_get_username(gaim_connection_get_account(gc)));
6485
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 static void
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
122 signed_on_cb(GaimConnection *gc, void *data)
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
123 {
7517
767d3db53e17 [gaim-migrate @ 8130]
Christian Hammond <chipx86@chipx86.com>
parents: 7516
diff changeset
124 gaim_debug_misc("signals test", "signed-on (%s)\n",
767d3db53e17 [gaim-migrate @ 8130]
Christian Hammond <chipx86@chipx86.com>
parents: 7516
diff changeset
125 gaim_account_get_username(gaim_connection_get_account(gc)));
6485
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
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
128 static void
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
129 signing_off_cb(GaimConnection *gc, void *data)
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
130 {
7517
767d3db53e17 [gaim-migrate @ 8130]
Christian Hammond <chipx86@chipx86.com>
parents: 7516
diff changeset
131 gaim_debug_misc("signals test", "signing-off (%s)\n",
767d3db53e17 [gaim-migrate @ 8130]
Christian Hammond <chipx86@chipx86.com>
parents: 7516
diff changeset
132 gaim_account_get_username(gaim_connection_get_account(gc)));
6485
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
133 }
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 static void
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
136 signed_off_cb(GaimConnection *gc, void *data)
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
137 {
7517
767d3db53e17 [gaim-migrate @ 8130]
Christian Hammond <chipx86@chipx86.com>
parents: 7516
diff changeset
138 gaim_debug_misc("signals test", "signed-off (%s)\n",
767d3db53e17 [gaim-migrate @ 8130]
Christian Hammond <chipx86@chipx86.com>
parents: 7516
diff changeset
139 gaim_account_get_username(gaim_connection_get_account(gc)));
6485
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
140 }
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
141
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 * Conversation subsystem signal callbacks
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
144 **************************************************************************/
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
145 static gboolean
7503
798e5dbb072f [gaim-migrate @ 8116]
Luke Schierer <lschiere@pidgin.im>
parents: 7009
diff changeset
146 displaying_im_msg_cb(GaimAccount *account, GaimConversation *conv,
798e5dbb072f [gaim-migrate @ 8116]
Luke Schierer <lschiere@pidgin.im>
parents: 7009
diff changeset
147 char **buffer, void *data)
6485
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
148 {
7517
767d3db53e17 [gaim-migrate @ 8130]
Christian Hammond <chipx86@chipx86.com>
parents: 7516
diff changeset
149 gaim_debug_misc("signals test", "displaying-im-msg (%s, %s)\n",
767d3db53e17 [gaim-migrate @ 8130]
Christian Hammond <chipx86@chipx86.com>
parents: 7516
diff changeset
150 gaim_conversation_get_name(conv), *buffer);
6485
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
151
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
152 return FALSE;
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
153 }
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 static void
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
156 displayed_im_msg_cb(GaimConversation *conv, const char *buffer, void *data)
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
157 {
7517
767d3db53e17 [gaim-migrate @ 8130]
Christian Hammond <chipx86@chipx86.com>
parents: 7516
diff changeset
158 gaim_debug_misc("signals test", "displayed-im-msg (%s, %s)\n",
767d3db53e17 [gaim-migrate @ 8130]
Christian Hammond <chipx86@chipx86.com>
parents: 7516
diff changeset
159 gaim_conversation_get_name(conv), buffer);
6485
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
160 }
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
161
7503
798e5dbb072f [gaim-migrate @ 8116]
Luke Schierer <lschiere@pidgin.im>
parents: 7009
diff changeset
162 static void
6509
e74e378e86bf [gaim-migrate @ 7026]
Ethan Blanton <elb@pidgin.im>
parents: 6489
diff changeset
163 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
164 {
7517
767d3db53e17 [gaim-migrate @ 8130]
Christian Hammond <chipx86@chipx86.com>
parents: 7516
diff changeset
165 gaim_debug_misc("signals test", "sending-im-msg (%s, %s, %s)\n",
767d3db53e17 [gaim-migrate @ 8130]
Christian Hammond <chipx86@chipx86.com>
parents: 7516
diff changeset
166 gaim_account_get_username(account), recipient, *buffer);
6485
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
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
170 static void
6509
e74e378e86bf [gaim-migrate @ 7026]
Ethan Blanton <elb@pidgin.im>
parents: 6489
diff changeset
171 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
172 {
7517
767d3db53e17 [gaim-migrate @ 8130]
Christian Hammond <chipx86@chipx86.com>
parents: 7516
diff changeset
173 gaim_debug_misc("signals test", "sent-im-msg (%s, %s, %s)\n",
767d3db53e17 [gaim-migrate @ 8130]
Christian Hammond <chipx86@chipx86.com>
parents: 7516
diff changeset
174 gaim_account_get_username(account), recipient, buffer);
6485
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 received_im_msg_cb(GaimAccount *account, char **sender, char **buffer,
e74e378e86bf [gaim-migrate @ 7026]
Ethan Blanton <elb@pidgin.im>
parents: 6489
diff changeset
179 int *flags, void *data)
6485
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
180 {
7517
767d3db53e17 [gaim-migrate @ 8130]
Christian Hammond <chipx86@chipx86.com>
parents: 7516
diff changeset
181 gaim_debug_misc("signals test", "received-im-msg (%s, %s, %s, %d)\n",
767d3db53e17 [gaim-migrate @ 8130]
Christian Hammond <chipx86@chipx86.com>
parents: 7516
diff changeset
182 gaim_account_get_username(account), *sender, *buffer,
767d3db53e17 [gaim-migrate @ 8130]
Christian Hammond <chipx86@chipx86.com>
parents: 7516
diff changeset
183 *flags);
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 gboolean
7503
798e5dbb072f [gaim-migrate @ 8116]
Luke Schierer <lschiere@pidgin.im>
parents: 7009
diff changeset
189 displaying_chat_msg_cb(GaimAccount *account, GaimConversation *conv,
798e5dbb072f [gaim-migrate @ 8116]
Luke Schierer <lschiere@pidgin.im>
parents: 7009
diff changeset
190 char **buffer, void *data)
6485
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
191 {
7517
767d3db53e17 [gaim-migrate @ 8130]
Christian Hammond <chipx86@chipx86.com>
parents: 7516
diff changeset
192 gaim_debug_misc("signals test", "displaying-chat-msg (%s, %s)\n",
767d3db53e17 [gaim-migrate @ 8130]
Christian Hammond <chipx86@chipx86.com>
parents: 7516
diff changeset
193 gaim_conversation_get_name(conv), *buffer);
6485
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
194
6486
fab81e4b885c [gaim-migrate @ 7000]
Christian Hammond <chipx86@chipx86.com>
parents: 6485
diff changeset
195 return FALSE;
6485
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
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
198 static void
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
199 displayed_chat_msg_cb(GaimConversation *conv, const char *buffer, void *data)
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
200 {
7517
767d3db53e17 [gaim-migrate @ 8130]
Christian Hammond <chipx86@chipx86.com>
parents: 7516
diff changeset
201 gaim_debug_misc("signals test", "displayed-chat-msg (%s, %s)\n",
767d3db53e17 [gaim-migrate @ 8130]
Christian Hammond <chipx86@chipx86.com>
parents: 7516
diff changeset
202 gaim_conversation_get_name(conv), buffer);
6485
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
203 }
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 static gboolean
6509
e74e378e86bf [gaim-migrate @ 7026]
Ethan Blanton <elb@pidgin.im>
parents: 6489
diff changeset
206 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
207 {
7517
767d3db53e17 [gaim-migrate @ 8130]
Christian Hammond <chipx86@chipx86.com>
parents: 7516
diff changeset
208 gaim_debug_misc("signals test", "sending-chat-msg (%s, %s, %d)\n",
767d3db53e17 [gaim-migrate @ 8130]
Christian Hammond <chipx86@chipx86.com>
parents: 7516
diff changeset
209 gaim_account_get_username(account), *buffer, id);
6485
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 return FALSE;
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
212 }
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
213
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
214 static void
6509
e74e378e86bf [gaim-migrate @ 7026]
Ethan Blanton <elb@pidgin.im>
parents: 6489
diff changeset
215 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
216 {
7517
767d3db53e17 [gaim-migrate @ 8130]
Christian Hammond <chipx86@chipx86.com>
parents: 7516
diff changeset
217 gaim_debug_misc("signals test", "sent-chat-msg (%s, %s, %d)\n",
767d3db53e17 [gaim-migrate @ 8130]
Christian Hammond <chipx86@chipx86.com>
parents: 7516
diff changeset
218 gaim_account_get_username(account), buffer, id);
6485
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
219 }
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 static gboolean
6509
e74e378e86bf [gaim-migrate @ 7026]
Ethan Blanton <elb@pidgin.im>
parents: 6489
diff changeset
222 received_chat_msg_cb(GaimAccount *account, char **sender, char **buffer,
7516
4749299f199a [gaim-migrate @ 8129]
Christian Hammond <chipx86@chipx86.com>
parents: 7503
diff changeset
223 GaimConversation *chat, void *data)
6485
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
224 {
7517
767d3db53e17 [gaim-migrate @ 8130]
Christian Hammond <chipx86@chipx86.com>
parents: 7516
diff changeset
225 gaim_debug_misc("signals test",
767d3db53e17 [gaim-migrate @ 8130]
Christian Hammond <chipx86@chipx86.com>
parents: 7516
diff changeset
226 "received-chat-msg (%s, %s, %s, %s, %s)\n",
767d3db53e17 [gaim-migrate @ 8130]
Christian Hammond <chipx86@chipx86.com>
parents: 7516
diff changeset
227 gaim_account_get_username(account), *sender, *buffer,
767d3db53e17 [gaim-migrate @ 8130]
Christian Hammond <chipx86@chipx86.com>
parents: 7516
diff changeset
228 gaim_conversation_get_name(chat));
6485
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
229
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
230 return FALSE;
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
231 }
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 static void
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
234 conversation_switching_cb(GaimConversation *old_conv,
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
235 GaimConversation *new_conv, void *data)
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
236 {
7517
767d3db53e17 [gaim-migrate @ 8130]
Christian Hammond <chipx86@chipx86.com>
parents: 7516
diff changeset
237 gaim_debug_misc("signals test", "conversation-switching (%s, %s)\n",
767d3db53e17 [gaim-migrate @ 8130]
Christian Hammond <chipx86@chipx86.com>
parents: 7516
diff changeset
238 gaim_conversation_get_name(old_conv),
767d3db53e17 [gaim-migrate @ 8130]
Christian Hammond <chipx86@chipx86.com>
parents: 7516
diff changeset
239 gaim_conversation_get_name(new_conv));
6485
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
240 }
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
241
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
242 static void
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
243 conversation_switched_cb(GaimConversation *old_conv,
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
244 GaimConversation *new_conv, void *data)
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
245 {
7517
767d3db53e17 [gaim-migrate @ 8130]
Christian Hammond <chipx86@chipx86.com>
parents: 7516
diff changeset
246 gaim_debug_misc("signals test", "conversation-switched (%s, %s)\n",
767d3db53e17 [gaim-migrate @ 8130]
Christian Hammond <chipx86@chipx86.com>
parents: 7516
diff changeset
247 gaim_conversation_get_name(old_conv),
767d3db53e17 [gaim-migrate @ 8130]
Christian Hammond <chipx86@chipx86.com>
parents: 7516
diff changeset
248 gaim_conversation_get_name(new_conv));
6485
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
249 }
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
250
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
251 static void
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
252 conversation_created_cb(GaimConversation *conv, void *data)
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
253 {
7517
767d3db53e17 [gaim-migrate @ 8130]
Christian Hammond <chipx86@chipx86.com>
parents: 7516
diff changeset
254 gaim_debug_misc("signals test", "conversation-created (%s)\n",
767d3db53e17 [gaim-migrate @ 8130]
Christian Hammond <chipx86@chipx86.com>
parents: 7516
diff changeset
255 gaim_conversation_get_name(conv));
6485
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
256 }
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
257
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
258 static void
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
259 deleting_conversation_cb(GaimConversation *conv, void *data)
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
260 {
7517
767d3db53e17 [gaim-migrate @ 8130]
Christian Hammond <chipx86@chipx86.com>
parents: 7516
diff changeset
261 gaim_debug_misc("signals test", "deleting-conversation (%s)\n",
767d3db53e17 [gaim-migrate @ 8130]
Christian Hammond <chipx86@chipx86.com>
parents: 7516
diff changeset
262 gaim_conversation_get_name(conv));
6485
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 buddy_typing_cb(GaimConversation *conv, void *data)
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
267 {
7517
767d3db53e17 [gaim-migrate @ 8130]
Christian Hammond <chipx86@chipx86.com>
parents: 7516
diff changeset
268 gaim_debug_misc("signals test", "buddy-typing (%s)\n",
767d3db53e17 [gaim-migrate @ 8130]
Christian Hammond <chipx86@chipx86.com>
parents: 7516
diff changeset
269 gaim_conversation_get_name(conv));
6485
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
270 }
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
271
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
272 static void
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
273 chat_buddy_joining_cb(GaimConversation *conv, const char *user, void *data)
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
274 {
7517
767d3db53e17 [gaim-migrate @ 8130]
Christian Hammond <chipx86@chipx86.com>
parents: 7516
diff changeset
275 gaim_debug_misc("signals test", "chat-buddy-joining (%s, %s)\n",
767d3db53e17 [gaim-migrate @ 8130]
Christian Hammond <chipx86@chipx86.com>
parents: 7516
diff changeset
276 gaim_conversation_get_name(conv), user);
6485
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
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
279 static void
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
280 chat_buddy_joined_cb(GaimConversation *conv, const char *user, void *data)
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
281 {
7517
767d3db53e17 [gaim-migrate @ 8130]
Christian Hammond <chipx86@chipx86.com>
parents: 7516
diff changeset
282 gaim_debug_misc("signals test", "chat-buddy-joined (%s, %s)\n",
767d3db53e17 [gaim-migrate @ 8130]
Christian Hammond <chipx86@chipx86.com>
parents: 7516
diff changeset
283 gaim_conversation_get_name(conv), user);
6485
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
284 }
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 static void
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
287 chat_buddy_leaving_cb(GaimConversation *conv, const char *user,
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
288 const char *reason, void *data)
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
289 {
7517
767d3db53e17 [gaim-migrate @ 8130]
Christian Hammond <chipx86@chipx86.com>
parents: 7516
diff changeset
290 gaim_debug_misc("signals test", "chat-buddy-leaving (%s, %s, %s)\n",
767d3db53e17 [gaim-migrate @ 8130]
Christian Hammond <chipx86@chipx86.com>
parents: 7516
diff changeset
291 gaim_conversation_get_name(conv), user, reason);
6485
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
292 }
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 static void
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
295 chat_buddy_left_cb(GaimConversation *conv, const char *user,
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
296 const char *reason, void *data)
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
297 {
7517
767d3db53e17 [gaim-migrate @ 8130]
Christian Hammond <chipx86@chipx86.com>
parents: 7516
diff changeset
298 gaim_debug_misc("signals test", "chat-buddy-left (%s, %s, %s)\n",
767d3db53e17 [gaim-migrate @ 8130]
Christian Hammond <chipx86@chipx86.com>
parents: 7516
diff changeset
299 gaim_conversation_get_name(conv), user, reason);
6485
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
300 }
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 static void
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
303 chat_inviting_user_cb(GaimConversation *conv, const char *name,
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
304 const char *reason, void *data)
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
305 {
7517
767d3db53e17 [gaim-migrate @ 8130]
Christian Hammond <chipx86@chipx86.com>
parents: 7516
diff changeset
306 gaim_debug_misc("signals test", "chat-inviting-user (%s, %s, %s)\n",
767d3db53e17 [gaim-migrate @ 8130]
Christian Hammond <chipx86@chipx86.com>
parents: 7516
diff changeset
307 gaim_conversation_get_name(conv), name, reason);
6485
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
308 }
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 static void
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
311 chat_invited_user_cb(GaimConversation *conv, const char *name,
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
312 const char *reason, void *data)
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
313 {
7517
767d3db53e17 [gaim-migrate @ 8130]
Christian Hammond <chipx86@chipx86.com>
parents: 7516
diff changeset
314 gaim_debug_misc("signals test", "chat-invited-user (%s, %s, %s)\n",
767d3db53e17 [gaim-migrate @ 8130]
Christian Hammond <chipx86@chipx86.com>
parents: 7516
diff changeset
315 gaim_conversation_get_name(conv), name, reason);
6485
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
316 }
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
317
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
318 static void
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
319 chat_invited_cb(GaimAccount *account, const char *inviter,
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
320 const char *room_name, const char *message, void *data)
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
321 {
7517
767d3db53e17 [gaim-migrate @ 8130]
Christian Hammond <chipx86@chipx86.com>
parents: 7516
diff changeset
322 gaim_debug_misc("signals test", "chat-invited (%s, %s, %s, %s)\n",
767d3db53e17 [gaim-migrate @ 8130]
Christian Hammond <chipx86@chipx86.com>
parents: 7516
diff changeset
323 gaim_account_get_username(account), inviter,
767d3db53e17 [gaim-migrate @ 8130]
Christian Hammond <chipx86@chipx86.com>
parents: 7516
diff changeset
324 room_name, message);
6485
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
325 }
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
326
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
327 static void
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
328 chat_joined_cb(GaimConversation *conv, void *data)
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
329 {
7517
767d3db53e17 [gaim-migrate @ 8130]
Christian Hammond <chipx86@chipx86.com>
parents: 7516
diff changeset
330 gaim_debug_misc("signals test", "chat-joined (%s)\n",
767d3db53e17 [gaim-migrate @ 8130]
Christian Hammond <chipx86@chipx86.com>
parents: 7516
diff changeset
331 gaim_conversation_get_name(conv));
6485
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
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
334 static void
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
335 chat_left_cb(GaimConversation *conv, void *data)
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
336 {
7517
767d3db53e17 [gaim-migrate @ 8130]
Christian Hammond <chipx86@chipx86.com>
parents: 7516
diff changeset
337 gaim_debug_misc("signals test", "chat-left (%s)\n",
767d3db53e17 [gaim-migrate @ 8130]
Christian Hammond <chipx86@chipx86.com>
parents: 7516
diff changeset
338 gaim_conversation_get_name(conv));
6485
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
339 }
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 * Core signal callbacks
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
343 **************************************************************************/
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
344 static void
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
345 quitting_cb(void *data)
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
346 {
7517
767d3db53e17 [gaim-migrate @ 8130]
Christian Hammond <chipx86@chipx86.com>
parents: 7516
diff changeset
347 gaim_debug_misc("signals test", "quitting ()\n");
6485
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
348 }
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 * Plugin stuff
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
352 **************************************************************************/
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
353 static gboolean
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
354 plugin_load(GaimPlugin *plugin)
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
355 {
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
356 void *core_handle = gaim_get_core();
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
357 void *blist_handle = gaim_blist_get_handle();
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
358 void *conn_handle = gaim_connections_get_handle();
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
359 void *conv_handle = gaim_conversations_get_handle();
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
360 void *accounts_handle = gaim_accounts_get_handle();
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
361
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
362 /* Accounts subsystem signals */
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
363 gaim_signal_connect(accounts_handle, "account-connecting",
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
364 plugin, GAIM_CALLBACK(account_connecting_cb), NULL);
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
365 gaim_signal_connect(accounts_handle, "account-away",
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
366 plugin, GAIM_CALLBACK(account_away_cb), NULL);
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
367 gaim_signal_connect(accounts_handle, "account-setting-info",
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
368 plugin, GAIM_CALLBACK(account_setting_info_cb), NULL);
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
369 gaim_signal_connect(accounts_handle, "account-set-info",
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
370 plugin, GAIM_CALLBACK(account_set_info_cb), NULL);
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
371 gaim_signal_connect(accounts_handle, "account-warned",
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
372 plugin, GAIM_CALLBACK(account_warned_cb), NULL);
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
373
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
374 /* Buddy List subsystem signals */
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
375 gaim_signal_connect(blist_handle, "buddy-away",
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
376 plugin, GAIM_CALLBACK(buddy_away_cb), NULL);
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
377 gaim_signal_connect(blist_handle, "buddy-back",
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
378 plugin, GAIM_CALLBACK(buddy_back_cb), NULL);
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
379 gaim_signal_connect(blist_handle, "buddy-idle",
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
380 plugin, GAIM_CALLBACK(buddy_idle_cb), NULL);
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
381 gaim_signal_connect(blist_handle, "buddy-unidle",
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
382 plugin, GAIM_CALLBACK(buddy_unidle_cb), NULL);
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
383 gaim_signal_connect(blist_handle, "buddy-signed-on",
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
384 plugin, GAIM_CALLBACK(buddy_signed_on_cb), NULL);
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
385 gaim_signal_connect(blist_handle, "buddy-signed-off",
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
386 plugin, GAIM_CALLBACK(buddy_signed_off_cb), NULL);
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 /* Connection subsystem signals */
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
389 gaim_signal_connect(conn_handle, "signing-on",
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
390 plugin, GAIM_CALLBACK(signing_on_cb), NULL);
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
391 gaim_signal_connect(conn_handle, "signed-on",
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
392 plugin, GAIM_CALLBACK(signed_on_cb), NULL);
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
393 gaim_signal_connect(conn_handle, "signing-off",
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
394 plugin, GAIM_CALLBACK(signing_off_cb), NULL);
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
395 gaim_signal_connect(conn_handle, "signed-off",
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
396 plugin, GAIM_CALLBACK(signed_off_cb), NULL);
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
397
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
398 /* Conversations subsystem signals */
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
399 gaim_signal_connect(conv_handle, "displaying-im-msg",
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
400 plugin, GAIM_CALLBACK(displaying_im_msg_cb), NULL);
6489
aefe4067d3a3 [gaim-migrate @ 7003]
Nathan Walp <nwalp@pidgin.im>
parents: 6486
diff changeset
401 gaim_signal_connect(conv_handle, "displayed-im-msg",
6485
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
402 plugin, GAIM_CALLBACK(displayed_im_msg_cb), NULL);
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
403 gaim_signal_connect(conv_handle, "sending-im-msg",
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
404 plugin, GAIM_CALLBACK(sending_im_msg_cb), NULL);
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
405 gaim_signal_connect(conv_handle, "sent-im-msg",
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
406 plugin, GAIM_CALLBACK(sent_im_msg_cb), NULL);
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
407 gaim_signal_connect(conv_handle, "received-im-msg",
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
408 plugin, GAIM_CALLBACK(received_im_msg_cb), NULL);
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
409 gaim_signal_connect(conv_handle, "displaying-chat-msg",
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
410 plugin, GAIM_CALLBACK(displaying_chat_msg_cb), NULL);
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
411 gaim_signal_connect(conv_handle, "displayed-chat-msg",
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
412 plugin, GAIM_CALLBACK(displayed_chat_msg_cb), NULL);
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
413 gaim_signal_connect(conv_handle, "sending-chat-msg",
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
414 plugin, GAIM_CALLBACK(sending_chat_msg_cb), NULL);
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
415 gaim_signal_connect(conv_handle, "sent-chat-msg",
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
416 plugin, GAIM_CALLBACK(sent_chat_msg_cb), NULL);
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
417 gaim_signal_connect(conv_handle, "received-chat-msg",
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
418 plugin, GAIM_CALLBACK(received_chat_msg_cb), NULL);
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
419 gaim_signal_connect(conv_handle, "conversation-switching",
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
420 plugin, GAIM_CALLBACK(conversation_switching_cb), NULL);
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
421 gaim_signal_connect(conv_handle, "conversation-switched",
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
422 plugin, GAIM_CALLBACK(conversation_switched_cb), NULL);
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
423 gaim_signal_connect(conv_handle, "conversation-created",
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
424 plugin, GAIM_CALLBACK(conversation_created_cb), NULL);
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
425 gaim_signal_connect(conv_handle, "deleting-conversation",
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
426 plugin, GAIM_CALLBACK(deleting_conversation_cb), NULL);
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
427 gaim_signal_connect(conv_handle, "buddy-typing",
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
428 plugin, GAIM_CALLBACK(buddy_typing_cb), NULL);
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
429 gaim_signal_connect(conv_handle, "chat-buddy-joining",
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
430 plugin, GAIM_CALLBACK(chat_buddy_joining_cb), NULL);
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
431 gaim_signal_connect(conv_handle, "chat-buddy-joined",
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
432 plugin, GAIM_CALLBACK(chat_buddy_joined_cb), NULL);
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
433 gaim_signal_connect(conv_handle, "chat-buddy-leaving",
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
434 plugin, GAIM_CALLBACK(chat_buddy_leaving_cb), NULL);
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
435 gaim_signal_connect(conv_handle, "chat-buddy-left",
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
436 plugin, GAIM_CALLBACK(chat_buddy_left_cb), NULL);
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
437 gaim_signal_connect(conv_handle, "chat-inviting-user",
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
438 plugin, GAIM_CALLBACK(chat_inviting_user_cb), NULL);
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
439 gaim_signal_connect(conv_handle, "chat-invited-user",
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
440 plugin, GAIM_CALLBACK(chat_invited_user_cb), NULL);
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
441 gaim_signal_connect(conv_handle, "chat-invited",
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
442 plugin, GAIM_CALLBACK(chat_invited_cb), NULL);
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
443 gaim_signal_connect(conv_handle, "chat-joined",
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
444 plugin, GAIM_CALLBACK(chat_joined_cb), NULL);
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
445 gaim_signal_connect(conv_handle, "chat-left",
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
446 plugin, GAIM_CALLBACK(chat_left_cb), NULL);
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
447
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
448 /* Core signals */
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
449 gaim_signal_connect(core_handle, "quitting",
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
450 plugin, GAIM_CALLBACK(quitting_cb), NULL);
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
451
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
452 return TRUE;
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
453 }
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
454
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
455 static GaimPluginInfo info =
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
456 {
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
457 2, /**< api_version */
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
458 GAIM_PLUGIN_STANDARD, /**< type */
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
459 NULL, /**< ui_requirement */
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
460 0, /**< flags */
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
461 NULL, /**< dependencies */
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
462 GAIM_PRIORITY_DEFAULT, /**< priority */
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
463
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
464 SIGNAL_TEST_PLUGIN_ID, /**< id */
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
465 N_("Signals Test"), /**< name */
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
466 VERSION, /**< version */
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
467 /** summary */
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
468 N_("Test to see that all signals are working properly."),
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
469 /** description */
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
470 N_("Test to see that all signals are working properly."),
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
471 "Christian Hammond <chipx86@gnupdate.org>", /**< author */
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
472 GAIM_WEBSITE, /**< homepage */
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
473
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
474 plugin_load, /**< load */
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
475 NULL, /**< unload */
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
476 NULL, /**< destroy */
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
477
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
478 NULL, /**< ui_info */
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
479 NULL /**< extra_info */
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
480 };
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
481
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
482 static void
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
483 init_plugin(GaimPlugin *plugin)
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 }
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
486
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
487 GAIM_INIT_PLUGIN(signalstest, init_plugin, info)