Mercurial > pidgin.yaz
annotate libpurple/plugins/signals-test.c @ 23717:e3f30a73a793
Remove various opaque UiOps functions from the perl loader as they aren't useable.
author | Daniel Atallah <daniel.atallah@gmail.com> |
---|---|
date | Thu, 07 Aug 2008 04:26:02 +0000 |
parents | 38cc722159ff |
children | 0d0088b03745 |
rev | line source |
---|---|
15374
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
1 /* |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
2 * Signals test plugin. |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
3 * |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
4 * Copyright (C) 2003 Christian Hammond. |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
5 * |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
6 * This program is free software; you can redistribute it and/or |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
7 * modify it under the terms of the GNU General Public License as |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
8 * published by the Free Software Foundation; either version 2 of the |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
9 * License, or (at your option) any later version. |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
10 * |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
11 * This program is distributed in the hope that it will be useful, but |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
12 * WITHOUT ANY WARRANTY; without even the implied warranty of |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
14 * General Public License for more details. |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
15 * |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
16 * You should have received a copy of the GNU General Public License |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
17 * along with this program; if not, write to the Free Software |
19680
44b4e8bd759b
The FSF changed its address a while ago; our files were out of date.
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
18675
diff
changeset
|
18 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA |
44b4e8bd759b
The FSF changed its address a while ago; our files were out of date.
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
18675
diff
changeset
|
19 * 02111-1301, USA. |
15374
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
20 */ |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
21 #define SIGNAL_TEST_PLUGIN_ID "core-signals-test" |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
22 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
23 #include <stdio.h> |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
24 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
25 #include "internal.h" |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
26 #include "cipher.h" |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
27 #include "connection.h" |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
28 #include "conversation.h" |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
29 #include "core.h" |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
30 #include "debug.h" |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
31 #include "ft.h" |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
32 #include "signals.h" |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
33 #include "version.h" |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
34 #include "status.h" |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
35 #include "sound.h" |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
36 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
37 /************************************************************************** |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
38 * Account subsystem signal callbacks |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
39 **************************************************************************/ |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
40 static void |
15823 | 41 account_connecting_cb(PurpleAccount *account, void *data) |
15374
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
42 { |
15823 | 43 purple_debug_misc("signals test", "account-connecting (%s)\n", |
44 purple_account_get_username(account)); | |
15374
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
45 } |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
46 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
47 static void |
15823 | 48 account_setting_info_cb(PurpleAccount *account, const char *info, void *data) |
15374
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
49 { |
15823 | 50 purple_debug_misc("signals test", "account-setting-info (%s, %s)\n", |
51 purple_account_get_username(account), info); | |
15374
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
52 } |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
53 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
54 static void |
15823 | 55 account_set_info_cb(PurpleAccount *account, const char *info, void *data) |
15374
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
56 { |
15823 | 57 purple_debug_misc("signals test", "account-set-info (%s, %s)\n", |
58 purple_account_get_username(account), info); | |
15374
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
59 } |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
60 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
61 static void |
15823 | 62 account_status_changed(PurpleAccount *account, PurpleStatus *old, PurpleStatus *new, |
15374
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
63 gpointer data) |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
64 { |
15823 | 65 purple_debug_misc("signals test", "account-status-changed (%s, %s, %s)\n", |
66 purple_account_get_username(account), | |
67 purple_status_get_name(old), | |
68 purple_status_get_name(new)); | |
15374
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
69 } |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
70 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
71 static void |
15823 | 72 account_alias_changed(PurpleAccount *account, const char *old, gpointer data) |
15374
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
73 { |
15823 | 74 purple_debug_misc("signals test", "account-alias-changed (%s, %s, %s)\n", |
75 purple_account_get_username(account), | |
76 old, purple_account_get_alias(account)); | |
15374
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
77 } |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
78 |
20178
8e3ef71c4362
Authorization signals. Modified patch from cockroach. Closes #1061.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
19680
diff
changeset
|
79 static int |
8e3ef71c4362
Authorization signals. Modified patch from cockroach. Closes #1061.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
19680
diff
changeset
|
80 account_authorization_requested_cb(PurpleAccount *account, const char *user, gpointer data) |
8e3ef71c4362
Authorization signals. Modified patch from cockroach. Closes #1061.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
19680
diff
changeset
|
81 { |
8e3ef71c4362
Authorization signals. Modified patch from cockroach. Closes #1061.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
19680
diff
changeset
|
82 purple_debug_misc("signals test", "account-authorization-requested (%s, %s)\n", |
8e3ef71c4362
Authorization signals. Modified patch from cockroach. Closes #1061.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
19680
diff
changeset
|
83 purple_account_get_username(account), user); |
8e3ef71c4362
Authorization signals. Modified patch from cockroach. Closes #1061.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
19680
diff
changeset
|
84 return 0; |
8e3ef71c4362
Authorization signals. Modified patch from cockroach. Closes #1061.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
19680
diff
changeset
|
85 } |
8e3ef71c4362
Authorization signals. Modified patch from cockroach. Closes #1061.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
19680
diff
changeset
|
86 |
8e3ef71c4362
Authorization signals. Modified patch from cockroach. Closes #1061.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
19680
diff
changeset
|
87 static void |
8e3ef71c4362
Authorization signals. Modified patch from cockroach. Closes #1061.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
19680
diff
changeset
|
88 account_authorization_granted_cb(PurpleAccount *account, const char *user, gpointer data) |
8e3ef71c4362
Authorization signals. Modified patch from cockroach. Closes #1061.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
19680
diff
changeset
|
89 { |
8e3ef71c4362
Authorization signals. Modified patch from cockroach. Closes #1061.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
19680
diff
changeset
|
90 purple_debug_misc("signals test", "account-authorization-granted (%s, %s)\n", |
8e3ef71c4362
Authorization signals. Modified patch from cockroach. Closes #1061.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
19680
diff
changeset
|
91 purple_account_get_username(account), user); |
8e3ef71c4362
Authorization signals. Modified patch from cockroach. Closes #1061.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
19680
diff
changeset
|
92 } |
8e3ef71c4362
Authorization signals. Modified patch from cockroach. Closes #1061.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
19680
diff
changeset
|
93 |
8e3ef71c4362
Authorization signals. Modified patch from cockroach. Closes #1061.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
19680
diff
changeset
|
94 static void |
8e3ef71c4362
Authorization signals. Modified patch from cockroach. Closes #1061.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
19680
diff
changeset
|
95 account_authorization_denied_cb(PurpleAccount *account, const char *user, gpointer data) |
8e3ef71c4362
Authorization signals. Modified patch from cockroach. Closes #1061.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
19680
diff
changeset
|
96 { |
8e3ef71c4362
Authorization signals. Modified patch from cockroach. Closes #1061.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
19680
diff
changeset
|
97 purple_debug_misc("signals test", "account-authorization-denied (%s, %s)\n", |
8e3ef71c4362
Authorization signals. Modified patch from cockroach. Closes #1061.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
19680
diff
changeset
|
98 purple_account_get_username(account), user); |
8e3ef71c4362
Authorization signals. Modified patch from cockroach. Closes #1061.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
19680
diff
changeset
|
99 } |
8e3ef71c4362
Authorization signals. Modified patch from cockroach. Closes #1061.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
19680
diff
changeset
|
100 |
15374
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
101 /************************************************************************** |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
102 * Buddy Icons signal callbacks |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
103 **************************************************************************/ |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
104 static void |
15823 | 105 buddy_icon_changed_cb(PurpleBuddy *buddy) |
15374
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
106 { |
15823 | 107 purple_debug_misc("signals test", "buddy icon changed (%s)\n", |
108 purple_buddy_get_name(buddy)); | |
15374
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
109 } |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
110 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
111 /************************************************************************** |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
112 * Buddy List subsystem signal callbacks |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
113 **************************************************************************/ |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
114 static void |
15823 | 115 buddy_status_changed_cb(PurpleBuddy *buddy, PurpleStatus *old_status, |
116 PurpleStatus *status, void *data) | |
15374
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
117 { |
15823 | 118 purple_debug_misc("signals test", "buddy-status-changed (%s %s to %s)\n", |
119 buddy->name, purple_status_get_id(old_status), | |
120 purple_status_get_id(status)); | |
15374
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
121 } |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
122 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
123 static void |
15823 | 124 buddy_idle_changed_cb(PurpleBuddy *buddy, gboolean old_idle, gboolean idle, |
15374
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
125 void *data) |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
126 { |
15823 | 127 purple_debug_misc("signals test", "buddy-idle-changed (%s %s)\n", |
15374
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
128 buddy->name, old_idle ? "unidled" : "idled"); |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
129 } |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
130 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
131 static void |
15823 | 132 buddy_signed_on_cb(PurpleBuddy *buddy, void *data) |
15374
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
133 { |
15823 | 134 purple_debug_misc("signals test", "buddy-signed-on (%s)\n", buddy->name); |
15374
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
135 } |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
136 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
137 static void |
15823 | 138 buddy_signed_off_cb(PurpleBuddy *buddy, void *data) |
15374
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
139 { |
15823 | 140 purple_debug_misc("signals test", "buddy-signed-off (%s)\n", buddy->name); |
15374
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
141 } |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
142 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
143 static void |
15823 | 144 buddy_added_cb(PurpleBuddy *buddy, void *data) |
15374
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
145 { |
15823 | 146 purple_debug_misc("signals test", "buddy_added_cb (%s)\n", purple_buddy_get_name(buddy)); |
15374
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
147 } |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
148 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
149 static void |
15823 | 150 buddy_removed_cb(PurpleBuddy *buddy, void *data) |
15374
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
151 { |
15823 | 152 purple_debug_misc("signals test", "buddy_removed_cb (%s)\n", purple_buddy_get_name(buddy)); |
15374
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
153 } |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
154 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
155 static void |
15823 | 156 blist_node_aliased(PurpleBlistNode *node, const char *old_alias) |
15374
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
157 { |
15823 | 158 PurpleContact *p = (PurpleContact *)node; |
159 PurpleBuddy *b = (PurpleBuddy *)node; | |
160 PurpleChat *c = (PurpleChat *)node; | |
161 PurpleGroup *g = (PurpleGroup *)node; | |
15374
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
162 |
15823 | 163 if (PURPLE_BLIST_NODE_IS_CONTACT(node)) |
164 purple_debug_misc("signals test", "blist-node-aliased (Contact: %s, %s)\n", p->alias, old_alias); | |
165 else if (PURPLE_BLIST_NODE_IS_BUDDY(node)) | |
166 purple_debug_misc("signals test", "blist-node-aliased (Buddy: %s, %s)\n", b->name, old_alias); | |
167 else if (PURPLE_BLIST_NODE_IS_CHAT(node)) | |
168 purple_debug_misc("signals test", "blist-node-aliased (Chat: %s, %s)\n", c->alias, old_alias); | |
169 else if (PURPLE_BLIST_NODE_IS_GROUP(node)) | |
170 purple_debug_misc("signals test", "blist-node-aliased (Group: %s, %s)\n", g->name, old_alias); | |
15374
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
171 else |
15823 | 172 purple_debug_misc("signals test", "blist-node-aliased (UNKNOWN: %d, %s)\n", node->type, old_alias); |
15374
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
173 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
174 } |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
175 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
176 static void |
15823 | 177 blist_node_extended_menu_cb(PurpleBlistNode *node, void *data) |
15374
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
178 { |
15823 | 179 PurpleContact *p = (PurpleContact *)node; |
180 PurpleBuddy *b = (PurpleBuddy *)node; | |
181 PurpleChat *c = (PurpleChat *)node; | |
182 PurpleGroup *g = (PurpleGroup *)node; | |
15374
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
183 |
15823 | 184 if (PURPLE_BLIST_NODE_IS_CONTACT(node)) |
185 purple_debug_misc("signals test", "blist-node-extended-menu (Contact: %s)\n", p->alias); | |
186 else if (PURPLE_BLIST_NODE_IS_BUDDY(node)) | |
187 purple_debug_misc("signals test", "blist-node-extended-menu (Buddy: %s)\n", b->name); | |
188 else if (PURPLE_BLIST_NODE_IS_CHAT(node)) | |
189 purple_debug_misc("signals test", "blist-node-extended-menu (Chat: %s)\n", c->alias); | |
190 else if (PURPLE_BLIST_NODE_IS_GROUP(node)) | |
191 purple_debug_misc("signals test", "blist-node-extended-menu (Group: %s)\n", g->name); | |
15374
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
192 else |
15823 | 193 purple_debug_misc("signals test", "blist-node-extended-menu (UNKNOWN: %d)\n", node->type); |
15374
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
194 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
195 } |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
196 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
197 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
198 /************************************************************************** |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
199 * Connection subsystem signal callbacks |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
200 **************************************************************************/ |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
201 static void |
15823 | 202 signing_on_cb(PurpleConnection *gc, void *data) |
15374
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
203 { |
15823 | 204 purple_debug_misc("signals test", "signing-on (%s)\n", |
205 purple_account_get_username(purple_connection_get_account(gc))); | |
15374
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
206 } |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
207 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
208 static void |
15823 | 209 signed_on_cb(PurpleConnection *gc, void *data) |
15374
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
210 { |
15823 | 211 purple_debug_misc("signals test", "signed-on (%s)\n", |
212 purple_account_get_username(purple_connection_get_account(gc))); | |
15374
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
213 } |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
214 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
215 static void |
15823 | 216 signing_off_cb(PurpleConnection *gc, void *data) |
15374
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
217 { |
15823 | 218 purple_debug_misc("signals test", "signing-off (%s)\n", |
219 purple_account_get_username(purple_connection_get_account(gc))); | |
15374
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
220 } |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
221 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
222 static void |
15823 | 223 signed_off_cb(PurpleConnection *gc, void *data) |
15374
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
224 { |
15823 | 225 purple_debug_misc("signals test", "signed-off (%s)\n", |
226 purple_account_get_username(purple_connection_get_account(gc))); | |
15374
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
227 } |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
228 |
21364
5a7202fa43a0
I figured a signal firing on a connection error would be useful.
Will Thompson <will.thompson@collabora.co.uk>
parents:
20178
diff
changeset
|
229 static void |
5a7202fa43a0
I figured a signal firing on a connection error would be useful.
Will Thompson <will.thompson@collabora.co.uk>
parents:
20178
diff
changeset
|
230 connection_error_cb(PurpleConnection *gc, |
5a7202fa43a0
I figured a signal firing on a connection error would be useful.
Will Thompson <will.thompson@collabora.co.uk>
parents:
20178
diff
changeset
|
231 PurpleConnectionError err, |
5a7202fa43a0
I figured a signal firing on a connection error would be useful.
Will Thompson <will.thompson@collabora.co.uk>
parents:
20178
diff
changeset
|
232 const gchar *desc, |
5a7202fa43a0
I figured a signal firing on a connection error would be useful.
Will Thompson <will.thompson@collabora.co.uk>
parents:
20178
diff
changeset
|
233 void *data) |
5a7202fa43a0
I figured a signal firing on a connection error would be useful.
Will Thompson <will.thompson@collabora.co.uk>
parents:
20178
diff
changeset
|
234 { |
5a7202fa43a0
I figured a signal firing on a connection error would be useful.
Will Thompson <will.thompson@collabora.co.uk>
parents:
20178
diff
changeset
|
235 const gchar *username = |
5a7202fa43a0
I figured a signal firing on a connection error would be useful.
Will Thompson <will.thompson@collabora.co.uk>
parents:
20178
diff
changeset
|
236 purple_account_get_username(purple_connection_get_account(gc)); |
5a7202fa43a0
I figured a signal firing on a connection error would be useful.
Will Thompson <will.thompson@collabora.co.uk>
parents:
20178
diff
changeset
|
237 purple_debug_misc("signals test", "connection-error (%s, %u, %s)\n", |
5a7202fa43a0
I figured a signal firing on a connection error would be useful.
Will Thompson <will.thompson@collabora.co.uk>
parents:
20178
diff
changeset
|
238 username, err, desc); |
5a7202fa43a0
I figured a signal firing on a connection error would be useful.
Will Thompson <will.thompson@collabora.co.uk>
parents:
20178
diff
changeset
|
239 } |
5a7202fa43a0
I figured a signal firing on a connection error would be useful.
Will Thompson <will.thompson@collabora.co.uk>
parents:
20178
diff
changeset
|
240 |
15374
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
241 /************************************************************************** |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
242 * Conversation subsystem signal callbacks |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
243 **************************************************************************/ |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
244 static gboolean |
15823 | 245 writing_im_msg_cb(PurpleAccount *account, const char *who, char **buffer, |
246 PurpleConversation *conv, PurpleMessageFlags flags, void *data) | |
15374
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
247 { |
15823 | 248 purple_debug_misc("signals test", "writing-im-msg (%s, %s, %s)\n", |
249 purple_account_get_username(account), purple_conversation_get_name(conv), *buffer); | |
15374
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
250 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
251 return FALSE; |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
252 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
253 } |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
254 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
255 static void |
15823 | 256 wrote_im_msg_cb(PurpleAccount *account, const char *who, const char *buffer, |
257 PurpleConversation *conv, PurpleMessageFlags flags, void *data) | |
15374
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
258 { |
15823 | 259 purple_debug_misc("signals test", "wrote-im-msg (%s, %s, %s)\n", |
260 purple_account_get_username(account), purple_conversation_get_name(conv), buffer); | |
15374
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
261 } |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
262 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
263 static void |
15823 | 264 sending_im_msg_cb(PurpleAccount *account, char *recipient, char **buffer, void *data) |
15374
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
265 { |
15823 | 266 purple_debug_misc("signals test", "sending-im-msg (%s, %s, %s)\n", |
267 purple_account_get_username(account), recipient, *buffer); | |
15374
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
268 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
269 } |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
270 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
271 static void |
15823 | 272 sent_im_msg_cb(PurpleAccount *account, const char *recipient, const char *buffer, void *data) |
15374
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
273 { |
15823 | 274 purple_debug_misc("signals test", "sent-im-msg (%s, %s, %s)\n", |
275 purple_account_get_username(account), recipient, buffer); | |
15374
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
276 } |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
277 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
278 static gboolean |
15823 | 279 receiving_im_msg_cb(PurpleAccount *account, char **sender, char **buffer, |
280 PurpleConversation *conv, PurpleMessageFlags *flags, void *data) | |
15374
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
281 { |
15823 | 282 purple_debug_misc("signals test", "receiving-im-msg (%s, %s, %s, %s, %d)\n", |
283 purple_account_get_username(account), *sender, *buffer, | |
284 (conv != NULL) ? purple_conversation_get_name(conv) : "(null)", *flags); | |
15374
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
285 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
286 return FALSE; |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
287 } |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
288 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
289 static void |
15823 | 290 received_im_msg_cb(PurpleAccount *account, char *sender, char *buffer, |
291 PurpleConversation *conv, PurpleMessageFlags flags, void *data) | |
15374
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
292 { |
15823 | 293 purple_debug_misc("signals test", "received-im-msg (%s, %s, %s, %s, %d)\n", |
294 purple_account_get_username(account), sender, buffer, | |
295 (conv != NULL) ? purple_conversation_get_name(conv) : "(null)", flags); | |
15374
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
296 } |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
297 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
298 static gboolean |
15823 | 299 writing_chat_msg_cb(PurpleAccount *account, const char *who, char **buffer, |
300 PurpleConversation *conv, PurpleMessageFlags flags, void *data) | |
15374
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
301 { |
15823 | 302 purple_debug_misc("signals test", "writing-chat-msg (%s, %s)\n", |
303 purple_conversation_get_name(conv), *buffer); | |
15374
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
304 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
305 return FALSE; |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
306 } |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
307 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
308 static void |
15823 | 309 wrote_chat_msg_cb(PurpleAccount *account, const char *who, const char *buffer, |
310 PurpleConversation *conv, PurpleMessageFlags flags, void *data) | |
15374
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
311 { |
15823 | 312 purple_debug_misc("signals test", "wrote-chat-msg (%s, %s)\n", |
313 purple_conversation_get_name(conv), buffer); | |
15374
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
314 } |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
315 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
316 static gboolean |
15823 | 317 sending_chat_msg_cb(PurpleAccount *account, char **buffer, int id, void *data) |
15374
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
318 { |
15823 | 319 purple_debug_misc("signals test", "sending-chat-msg (%s, %s, %d)\n", |
320 purple_account_get_username(account), *buffer, id); | |
15374
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
321 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
322 return FALSE; |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
323 } |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
324 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
325 static void |
15823 | 326 sent_chat_msg_cb(PurpleAccount *account, const char *buffer, int id, void *data) |
15374
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
327 { |
15823 | 328 purple_debug_misc("signals test", "sent-chat-msg (%s, %s, %d)\n", |
329 purple_account_get_username(account), buffer, id); | |
15374
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
330 } |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
331 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
332 static gboolean |
15823 | 333 receiving_chat_msg_cb(PurpleAccount *account, char **sender, char **buffer, |
334 PurpleConversation *chat, PurpleMessageFlags *flags, void *data) | |
15374
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
335 { |
15823 | 336 purple_debug_misc("signals test", |
15374
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
337 "receiving-chat-msg (%s, %s, %s, %s, %d)\n", |
15823 | 338 purple_account_get_username(account), *sender, *buffer, |
339 purple_conversation_get_name(chat), *flags); | |
15374
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
340 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
341 return FALSE; |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
342 } |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
343 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
344 static void |
15823 | 345 received_chat_msg_cb(PurpleAccount *account, char *sender, char *buffer, |
346 PurpleConversation *chat, PurpleMessageFlags flags, void *data) | |
15374
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
347 { |
15823 | 348 purple_debug_misc("signals test", |
15374
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
349 "received-chat-msg (%s, %s, %s, %s, %d)\n", |
15823 | 350 purple_account_get_username(account), sender, buffer, |
351 purple_conversation_get_name(chat), flags); | |
15374
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
352 } |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
353 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
354 static void |
15823 | 355 conversation_created_cb(PurpleConversation *conv, void *data) |
15374
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
356 { |
15823 | 357 purple_debug_misc("signals test", "conversation-created (%s)\n", |
358 purple_conversation_get_name(conv)); | |
15374
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
359 } |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
360 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
361 static void |
15823 | 362 deleting_conversation_cb(PurpleConversation *conv, void *data) |
15374
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
363 { |
15823 | 364 purple_debug_misc("signals test", "deleting-conversation (%s)\n", |
365 purple_conversation_get_name(conv)); | |
15374
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
366 } |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
367 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
368 static void |
15823 | 369 buddy_typing_cb(PurpleAccount *account, const char *name, void *data) |
15374
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
370 { |
15823 | 371 purple_debug_misc("signals test", "buddy-typing (%s, %s)\n", |
372 purple_account_get_username(account), name); | |
15374
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
373 } |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
374 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
375 static void |
15823 | 376 buddy_typing_stopped_cb(PurpleAccount *account, const char *name, void *data) |
15374
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
377 { |
15823 | 378 purple_debug_misc("signals test", "buddy-typing-stopped (%s, %s)\n", |
379 purple_account_get_username(account), name); | |
15374
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
380 } |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
381 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
382 static gboolean |
15823 | 383 chat_buddy_joining_cb(PurpleConversation *conv, const char *user, |
384 PurpleConvChatBuddyFlags flags, void *data) | |
15374
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
385 { |
15823 | 386 purple_debug_misc("signals test", "chat-buddy-joining (%s, %s, %d)\n", |
387 purple_conversation_get_name(conv), user, flags); | |
15374
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
388 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
389 return FALSE; |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
390 } |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
391 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
392 static void |
15823 | 393 chat_buddy_joined_cb(PurpleConversation *conv, const char *user, |
394 PurpleConvChatBuddyFlags flags, gboolean new_arrival, void *data) | |
15374
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
395 { |
15823 | 396 purple_debug_misc("signals test", "chat-buddy-joined (%s, %s, %d, %d)\n", |
397 purple_conversation_get_name(conv), user, flags, new_arrival); | |
15374
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
398 } |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
399 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
400 static void |
15823 | 401 chat_buddy_flags_cb(PurpleConversation *conv, const char *user, |
402 PurpleConvChatBuddyFlags oldflags, PurpleConvChatBuddyFlags newflags, void *data) | |
15374
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
403 { |
15823 | 404 purple_debug_misc("signals test", "chat-buddy-flags (%s, %s, %d, %d)\n", |
405 purple_conversation_get_name(conv), user, oldflags, newflags); | |
15374
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
406 } |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
407 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
408 static gboolean |
15823 | 409 chat_buddy_leaving_cb(PurpleConversation *conv, const char *user, |
15374
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
410 const char *reason, void *data) |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
411 { |
15823 | 412 purple_debug_misc("signals test", "chat-buddy-leaving (%s, %s, %s)\n", |
413 purple_conversation_get_name(conv), user, reason); | |
15374
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
414 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
415 return FALSE; |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
416 } |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
417 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
418 static void |
15823 | 419 chat_buddy_left_cb(PurpleConversation *conv, const char *user, |
15374
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
420 const char *reason, void *data) |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
421 { |
15823 | 422 purple_debug_misc("signals test", "chat-buddy-left (%s, %s, %s)\n", |
423 purple_conversation_get_name(conv), user, reason); | |
15374
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
424 } |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
425 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
426 static void |
15823 | 427 chat_inviting_user_cb(PurpleConversation *conv, const char *name, |
15374
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
428 char **reason, void *data) |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
429 { |
15823 | 430 purple_debug_misc("signals test", "chat-inviting-user (%s, %s, %s)\n", |
431 purple_conversation_get_name(conv), name, *reason); | |
15374
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
432 } |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
433 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
434 static void |
15823 | 435 chat_invited_user_cb(PurpleConversation *conv, const char *name, |
15374
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
436 const char *reason, void *data) |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
437 { |
15823 | 438 purple_debug_misc("signals test", "chat-invited-user (%s, %s, %s)\n", |
439 purple_conversation_get_name(conv), name, reason); | |
15374
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
440 } |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
441 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
442 static gint |
15823 | 443 chat_invited_cb(PurpleAccount *account, const char *inviter, |
15374
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
444 const char *room_name, const char *message, |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
445 const GHashTable *components, void *data) |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
446 { |
15823 | 447 purple_debug_misc("signals test", "chat-invited (%s, %s, %s, %s)\n", |
448 purple_account_get_username(account), inviter, | |
15374
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
449 room_name, message); |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
450 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
451 return 0; |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
452 } |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
453 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
454 static void |
15823 | 455 chat_joined_cb(PurpleConversation *conv, void *data) |
15374
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
456 { |
15823 | 457 purple_debug_misc("signals test", "chat-joined (%s)\n", |
458 purple_conversation_get_name(conv)); | |
15374
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
459 } |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
460 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
461 static void |
15823 | 462 chat_left_cb(PurpleConversation *conv, void *data) |
15374
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
463 { |
15823 | 464 purple_debug_misc("signals test", "chat-left (%s)\n", |
465 purple_conversation_get_name(conv)); | |
15374
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
466 } |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
467 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
468 static void |
15823 | 469 chat_topic_changed_cb(PurpleConversation *conv, const char *who, |
15374
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
470 const char *topic, void *data) |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
471 { |
15823 | 472 purple_debug_misc("signals test", |
15374
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
473 "chat-topic-changed (%s topic changed to: \"%s\" by %s)\n", |
15823 | 474 purple_conversation_get_name(conv), topic, |
15374
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
475 (who) ? who : "unknown"); |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
476 } |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
477 /************************************************************************** |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
478 * Ciphers signal callbacks |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
479 **************************************************************************/ |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
480 static void |
15823 | 481 cipher_added_cb(PurpleCipher *cipher, void *data) { |
482 purple_debug_misc("signals test", "cipher %s added\n", | |
483 purple_cipher_get_name(cipher)); | |
15374
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
484 } |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
485 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
486 static void |
15823 | 487 cipher_removed_cb(PurpleCipher *cipher, void *data) { |
488 purple_debug_misc("signals test", "cipher %s removed\n", | |
489 purple_cipher_get_name(cipher)); | |
15374
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
490 } |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
491 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
492 /************************************************************************** |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
493 * Core signal callbacks |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
494 **************************************************************************/ |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
495 static void |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
496 quitting_cb(void *data) |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
497 { |
15823 | 498 purple_debug_misc("signals test", "quitting ()\n"); |
15374
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
499 } |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
500 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
501 /************************************************************************** |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
502 * File transfer signal callbacks |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
503 **************************************************************************/ |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
504 static void |
15823 | 505 ft_recv_accept_cb(PurpleXfer *xfer, gpointer data) { |
506 purple_debug_misc("signals test", "file receive accepted\n"); | |
15374
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
507 } |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
508 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
509 static void |
15823 | 510 ft_send_accept_cb(PurpleXfer *xfer, gpointer data) { |
511 purple_debug_misc("signals test", "file send accepted\n"); | |
15374
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
512 } |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
513 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
514 static void |
15823 | 515 ft_recv_start_cb(PurpleXfer *xfer, gpointer data) { |
516 purple_debug_misc("signals test", "file receive started\n"); | |
15374
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
517 } |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
518 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
519 static void |
15823 | 520 ft_send_start_cb(PurpleXfer *xfer, gpointer data) { |
521 purple_debug_misc("signals test", "file send started\n"); | |
15374
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
522 } |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
523 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
524 static void |
15823 | 525 ft_recv_cancel_cb(PurpleXfer *xfer, gpointer data) { |
526 purple_debug_misc("signals test", "file receive canceled\n"); | |
15374
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
527 } |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
528 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
529 static void |
15823 | 530 ft_send_cancel_cb(PurpleXfer *xfer, gpointer data) { |
531 purple_debug_misc("signals test", "file send canceled\n"); | |
15374
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
532 } |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
533 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
534 static void |
15823 | 535 ft_recv_complete_cb(PurpleXfer *xfer, gpointer data) { |
536 purple_debug_misc("signals test", "file receive completed\n"); | |
15374
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
537 } |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
538 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
539 static void |
15823 | 540 ft_send_complete_cb(PurpleXfer *xfer, gpointer data) { |
541 purple_debug_misc("signals test", "file send completed\n"); | |
15374
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
542 } |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
543 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
544 /************************************************************************** |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
545 * Sound signal callbacks |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
546 **************************************************************************/ |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
547 static int |
15823 | 548 sound_playing_event_cb(PurpleSoundEventID event, const PurpleAccount *account) { |
15374
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
549 if (account != NULL) |
15823 | 550 purple_debug_misc("signals test", "sound playing event: %d for account: %s\n", |
551 event, purple_account_get_username(account)); | |
15374
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
552 else |
15823 | 553 purple_debug_misc("signals test", "sound playing event: %d\n", event); |
15374
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
554 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
555 return 0; |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
556 } |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
557 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
558 /************************************************************************** |
18675
cb91bb07eeff
Email notification signals from charkins. Fixes #1324
Sean Egan <seanegan@gmail.com>
parents:
16719
diff
changeset
|
559 * Notify signals callbacks |
cb91bb07eeff
Email notification signals from charkins. Fixes #1324
Sean Egan <seanegan@gmail.com>
parents:
16719
diff
changeset
|
560 **************************************************************************/ |
cb91bb07eeff
Email notification signals from charkins. Fixes #1324
Sean Egan <seanegan@gmail.com>
parents:
16719
diff
changeset
|
561 static void |
cb91bb07eeff
Email notification signals from charkins. Fixes #1324
Sean Egan <seanegan@gmail.com>
parents:
16719
diff
changeset
|
562 notify_email_cb(char *subject, char *from, char *to, char *url) { |
cb91bb07eeff
Email notification signals from charkins. Fixes #1324
Sean Egan <seanegan@gmail.com>
parents:
16719
diff
changeset
|
563 purple_debug_misc("signals test", "notify email: subject=%s, from=%s, to=%s, url=%s\n", |
cb91bb07eeff
Email notification signals from charkins. Fixes #1324
Sean Egan <seanegan@gmail.com>
parents:
16719
diff
changeset
|
564 subject, from, to, url); |
cb91bb07eeff
Email notification signals from charkins. Fixes #1324
Sean Egan <seanegan@gmail.com>
parents:
16719
diff
changeset
|
565 } |
cb91bb07eeff
Email notification signals from charkins. Fixes #1324
Sean Egan <seanegan@gmail.com>
parents:
16719
diff
changeset
|
566 |
cb91bb07eeff
Email notification signals from charkins. Fixes #1324
Sean Egan <seanegan@gmail.com>
parents:
16719
diff
changeset
|
567 static void |
cb91bb07eeff
Email notification signals from charkins. Fixes #1324
Sean Egan <seanegan@gmail.com>
parents:
16719
diff
changeset
|
568 notify_emails_cb(char **subjects, char **froms, char **tos, char **urls, guint count) { |
cb91bb07eeff
Email notification signals from charkins. Fixes #1324
Sean Egan <seanegan@gmail.com>
parents:
16719
diff
changeset
|
569 int i; |
cb91bb07eeff
Email notification signals from charkins. Fixes #1324
Sean Egan <seanegan@gmail.com>
parents:
16719
diff
changeset
|
570 purple_debug_misc("signals test", "notify emails: count=%d\n", count); |
cb91bb07eeff
Email notification signals from charkins. Fixes #1324
Sean Egan <seanegan@gmail.com>
parents:
16719
diff
changeset
|
571 for(i=0; i<count && i<5; i++) { |
cb91bb07eeff
Email notification signals from charkins. Fixes #1324
Sean Egan <seanegan@gmail.com>
parents:
16719
diff
changeset
|
572 if(subjects[i]==NULL || froms[i]==NULL || tos[i]==NULL || urls[i]==NULL) continue; |
cb91bb07eeff
Email notification signals from charkins. Fixes #1324
Sean Egan <seanegan@gmail.com>
parents:
16719
diff
changeset
|
573 purple_debug_misc("signals test", "notify emails[%d]: subject=%s, from=%s, to=%s, url=%s\n", |
cb91bb07eeff
Email notification signals from charkins. Fixes #1324
Sean Egan <seanegan@gmail.com>
parents:
16719
diff
changeset
|
574 i, subjects[i], froms[i], tos[i], urls[i]); |
cb91bb07eeff
Email notification signals from charkins. Fixes #1324
Sean Egan <seanegan@gmail.com>
parents:
16719
diff
changeset
|
575 } |
cb91bb07eeff
Email notification signals from charkins. Fixes #1324
Sean Egan <seanegan@gmail.com>
parents:
16719
diff
changeset
|
576 } |
cb91bb07eeff
Email notification signals from charkins. Fixes #1324
Sean Egan <seanegan@gmail.com>
parents:
16719
diff
changeset
|
577 |
cb91bb07eeff
Email notification signals from charkins. Fixes #1324
Sean Egan <seanegan@gmail.com>
parents:
16719
diff
changeset
|
578 /************************************************************************** |
15374
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
579 * Plugin stuff |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
580 **************************************************************************/ |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
581 static gboolean |
15823 | 582 plugin_load(PurplePlugin *plugin) |
15374
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
583 { |
15823 | 584 void *core_handle = purple_get_core(); |
585 void *blist_handle = purple_blist_get_handle(); | |
586 void *conn_handle = purple_connections_get_handle(); | |
587 void *conv_handle = purple_conversations_get_handle(); | |
588 void *accounts_handle = purple_accounts_get_handle(); | |
589 void *ciphers_handle = purple_ciphers_get_handle(); | |
590 void *ft_handle = purple_xfers_get_handle(); | |
591 void *sound_handle = purple_sounds_get_handle(); | |
18675
cb91bb07eeff
Email notification signals from charkins. Fixes #1324
Sean Egan <seanegan@gmail.com>
parents:
16719
diff
changeset
|
592 void *notify_handle = purple_notify_get_handle(); |
15374
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
593 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
594 /* Accounts subsystem signals */ |
15823 | 595 purple_signal_connect(accounts_handle, "account-connecting", |
596 plugin, PURPLE_CALLBACK(account_connecting_cb), NULL); | |
597 purple_signal_connect(accounts_handle, "account-setting-info", | |
598 plugin, PURPLE_CALLBACK(account_setting_info_cb), NULL); | |
599 purple_signal_connect(accounts_handle, "account-set-info", | |
600 plugin, PURPLE_CALLBACK(account_set_info_cb), NULL); | |
601 purple_signal_connect(accounts_handle, "account-status-changed", | |
602 plugin, PURPLE_CALLBACK(account_status_changed), NULL); | |
603 purple_signal_connect(accounts_handle, "account-alias-changed", | |
604 plugin, PURPLE_CALLBACK(account_alias_changed), NULL); | |
20178
8e3ef71c4362
Authorization signals. Modified patch from cockroach. Closes #1061.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
19680
diff
changeset
|
605 purple_signal_connect(accounts_handle, "account-authorization-requested", |
8e3ef71c4362
Authorization signals. Modified patch from cockroach. Closes #1061.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
19680
diff
changeset
|
606 plugin, PURPLE_CALLBACK(account_authorization_requested_cb), NULL); |
8e3ef71c4362
Authorization signals. Modified patch from cockroach. Closes #1061.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
19680
diff
changeset
|
607 purple_signal_connect(accounts_handle, "account-authorization-denied", |
8e3ef71c4362
Authorization signals. Modified patch from cockroach. Closes #1061.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
19680
diff
changeset
|
608 plugin, PURPLE_CALLBACK(account_authorization_denied_cb), NULL); |
8e3ef71c4362
Authorization signals. Modified patch from cockroach. Closes #1061.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
19680
diff
changeset
|
609 purple_signal_connect(accounts_handle, "account-authorization-granted", |
8e3ef71c4362
Authorization signals. Modified patch from cockroach. Closes #1061.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
19680
diff
changeset
|
610 plugin, PURPLE_CALLBACK(account_authorization_granted_cb), NULL); |
15374
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
611 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
612 /* Buddy List subsystem signals */ |
15823 | 613 purple_signal_connect(blist_handle, "buddy-status-changed", |
614 plugin, PURPLE_CALLBACK(buddy_status_changed_cb), NULL); | |
615 purple_signal_connect(blist_handle, "buddy-idle-changed", | |
616 plugin, PURPLE_CALLBACK(buddy_idle_changed_cb), NULL); | |
617 purple_signal_connect(blist_handle, "buddy-signed-on", | |
618 plugin, PURPLE_CALLBACK(buddy_signed_on_cb), NULL); | |
619 purple_signal_connect(blist_handle, "buddy-signed-off", | |
620 plugin, PURPLE_CALLBACK(buddy_signed_off_cb), NULL); | |
621 purple_signal_connect(blist_handle, "buddy-added", | |
622 plugin, PURPLE_CALLBACK(buddy_added_cb), NULL); | |
623 purple_signal_connect(blist_handle, "buddy-removed", | |
624 plugin, PURPLE_CALLBACK(buddy_removed_cb), NULL); | |
625 purple_signal_connect(blist_handle, "buddy-icon-changed", | |
626 plugin, PURPLE_CALLBACK(buddy_icon_changed_cb), NULL); | |
627 purple_signal_connect(blist_handle, "blist-node-aliased", | |
628 plugin, PURPLE_CALLBACK(blist_node_aliased), NULL); | |
629 purple_signal_connect(blist_handle, "blist-node-extended-menu", | |
630 plugin, PURPLE_CALLBACK(blist_node_extended_menu_cb), NULL); | |
15374
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
631 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
632 /* Connection subsystem signals */ |
15823 | 633 purple_signal_connect(conn_handle, "signing-on", |
634 plugin, PURPLE_CALLBACK(signing_on_cb), NULL); | |
635 purple_signal_connect(conn_handle, "signed-on", | |
636 plugin, PURPLE_CALLBACK(signed_on_cb), NULL); | |
637 purple_signal_connect(conn_handle, "signing-off", | |
638 plugin, PURPLE_CALLBACK(signing_off_cb), NULL); | |
639 purple_signal_connect(conn_handle, "signed-off", | |
640 plugin, PURPLE_CALLBACK(signed_off_cb), NULL); | |
21364
5a7202fa43a0
I figured a signal firing on a connection error would be useful.
Will Thompson <will.thompson@collabora.co.uk>
parents:
20178
diff
changeset
|
641 purple_signal_connect(conn_handle, "connection-error", |
5a7202fa43a0
I figured a signal firing on a connection error would be useful.
Will Thompson <will.thompson@collabora.co.uk>
parents:
20178
diff
changeset
|
642 plugin, PURPLE_CALLBACK(connection_error_cb), NULL); |
15374
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
643 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
644 /* Conversations subsystem signals */ |
15823 | 645 purple_signal_connect(conv_handle, "writing-im-msg", |
646 plugin, PURPLE_CALLBACK(writing_im_msg_cb), NULL); | |
647 purple_signal_connect(conv_handle, "wrote-im-msg", | |
648 plugin, PURPLE_CALLBACK(wrote_im_msg_cb), NULL); | |
649 purple_signal_connect(conv_handle, "sending-im-msg", | |
650 plugin, PURPLE_CALLBACK(sending_im_msg_cb), NULL); | |
651 purple_signal_connect(conv_handle, "sent-im-msg", | |
652 plugin, PURPLE_CALLBACK(sent_im_msg_cb), NULL); | |
653 purple_signal_connect(conv_handle, "receiving-im-msg", | |
654 plugin, PURPLE_CALLBACK(receiving_im_msg_cb), NULL); | |
655 purple_signal_connect(conv_handle, "received-im-msg", | |
656 plugin, PURPLE_CALLBACK(received_im_msg_cb), NULL); | |
657 purple_signal_connect(conv_handle, "writing-chat-msg", | |
658 plugin, PURPLE_CALLBACK(writing_chat_msg_cb), NULL); | |
659 purple_signal_connect(conv_handle, "wrote-chat-msg", | |
660 plugin, PURPLE_CALLBACK(wrote_chat_msg_cb), NULL); | |
661 purple_signal_connect(conv_handle, "sending-chat-msg", | |
662 plugin, PURPLE_CALLBACK(sending_chat_msg_cb), NULL); | |
663 purple_signal_connect(conv_handle, "sent-chat-msg", | |
664 plugin, PURPLE_CALLBACK(sent_chat_msg_cb), NULL); | |
665 purple_signal_connect(conv_handle, "receiving-chat-msg", | |
666 plugin, PURPLE_CALLBACK(receiving_chat_msg_cb), NULL); | |
667 purple_signal_connect(conv_handle, "received-chat-msg", | |
668 plugin, PURPLE_CALLBACK(received_chat_msg_cb), NULL); | |
669 purple_signal_connect(conv_handle, "conversation-created", | |
670 plugin, PURPLE_CALLBACK(conversation_created_cb), NULL); | |
671 purple_signal_connect(conv_handle, "deleting-conversation", | |
672 plugin, PURPLE_CALLBACK(deleting_conversation_cb), NULL); | |
673 purple_signal_connect(conv_handle, "buddy-typing", | |
674 plugin, PURPLE_CALLBACK(buddy_typing_cb), NULL); | |
675 purple_signal_connect(conv_handle, "buddy-typing-stopped", | |
676 plugin, PURPLE_CALLBACK(buddy_typing_stopped_cb), NULL); | |
677 purple_signal_connect(conv_handle, "chat-buddy-joining", | |
678 plugin, PURPLE_CALLBACK(chat_buddy_joining_cb), NULL); | |
679 purple_signal_connect(conv_handle, "chat-buddy-joined", | |
680 plugin, PURPLE_CALLBACK(chat_buddy_joined_cb), NULL); | |
681 purple_signal_connect(conv_handle, "chat-buddy-flags", | |
682 plugin, PURPLE_CALLBACK(chat_buddy_flags_cb), NULL); | |
683 purple_signal_connect(conv_handle, "chat-buddy-leaving", | |
684 plugin, PURPLE_CALLBACK(chat_buddy_leaving_cb), NULL); | |
685 purple_signal_connect(conv_handle, "chat-buddy-left", | |
686 plugin, PURPLE_CALLBACK(chat_buddy_left_cb), NULL); | |
687 purple_signal_connect(conv_handle, "chat-inviting-user", | |
688 plugin, PURPLE_CALLBACK(chat_inviting_user_cb), NULL); | |
689 purple_signal_connect(conv_handle, "chat-invited-user", | |
690 plugin, PURPLE_CALLBACK(chat_invited_user_cb), NULL); | |
691 purple_signal_connect(conv_handle, "chat-invited", | |
692 plugin, PURPLE_CALLBACK(chat_invited_cb), NULL); | |
693 purple_signal_connect(conv_handle, "chat-joined", | |
694 plugin, PURPLE_CALLBACK(chat_joined_cb), NULL); | |
695 purple_signal_connect(conv_handle, "chat-left", | |
696 plugin, PURPLE_CALLBACK(chat_left_cb), NULL); | |
697 purple_signal_connect(conv_handle, "chat-topic-changed", | |
698 plugin, PURPLE_CALLBACK(chat_topic_changed_cb), NULL); | |
15374
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
699 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
700 /* Ciphers signals */ |
15823 | 701 purple_signal_connect(ciphers_handle, "cipher-added", |
702 plugin, PURPLE_CALLBACK(cipher_added_cb), NULL); | |
703 purple_signal_connect(ciphers_handle, "cipher-removed", | |
704 plugin, PURPLE_CALLBACK(cipher_removed_cb), NULL); | |
15374
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
705 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
706 /* Core signals */ |
15823 | 707 purple_signal_connect(core_handle, "quitting", |
708 plugin, PURPLE_CALLBACK(quitting_cb), NULL); | |
15374
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
709 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
710 /* File transfer signals */ |
15823 | 711 purple_signal_connect(ft_handle, "file-recv-accept", |
712 plugin, PURPLE_CALLBACK(ft_recv_accept_cb), NULL); | |
713 purple_signal_connect(ft_handle, "file-recv-start", | |
714 plugin, PURPLE_CALLBACK(ft_recv_start_cb), NULL); | |
715 purple_signal_connect(ft_handle, "file-recv-cancel", | |
716 plugin, PURPLE_CALLBACK(ft_recv_cancel_cb), NULL); | |
717 purple_signal_connect(ft_handle, "file-recv-complete", | |
718 plugin, PURPLE_CALLBACK(ft_recv_complete_cb), NULL); | |
719 purple_signal_connect(ft_handle, "file-send-accept", | |
720 plugin, PURPLE_CALLBACK(ft_send_accept_cb), NULL); | |
721 purple_signal_connect(ft_handle, "file-send-start", | |
722 plugin, PURPLE_CALLBACK(ft_send_start_cb), NULL); | |
723 purple_signal_connect(ft_handle, "file-send-cancel", | |
724 plugin, PURPLE_CALLBACK(ft_send_cancel_cb), NULL); | |
725 purple_signal_connect(ft_handle, "file-send-complete", | |
726 plugin, PURPLE_CALLBACK(ft_send_complete_cb), NULL); | |
15374
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
727 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
728 /* Sound signals */ |
15823 | 729 purple_signal_connect(sound_handle, "playing-sound-event", plugin, |
730 PURPLE_CALLBACK(sound_playing_event_cb), NULL); | |
15374
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
731 |
18675
cb91bb07eeff
Email notification signals from charkins. Fixes #1324
Sean Egan <seanegan@gmail.com>
parents:
16719
diff
changeset
|
732 /* Notify signals */ |
cb91bb07eeff
Email notification signals from charkins. Fixes #1324
Sean Egan <seanegan@gmail.com>
parents:
16719
diff
changeset
|
733 purple_signal_connect(notify_handle, "displaying-email-notification", |
cb91bb07eeff
Email notification signals from charkins. Fixes #1324
Sean Egan <seanegan@gmail.com>
parents:
16719
diff
changeset
|
734 plugin, PURPLE_CALLBACK(notify_email_cb), NULL); |
cb91bb07eeff
Email notification signals from charkins. Fixes #1324
Sean Egan <seanegan@gmail.com>
parents:
16719
diff
changeset
|
735 purple_signal_connect(notify_handle, "displaying-emails-notification", |
cb91bb07eeff
Email notification signals from charkins. Fixes #1324
Sean Egan <seanegan@gmail.com>
parents:
16719
diff
changeset
|
736 plugin, PURPLE_CALLBACK(notify_emails_cb), NULL); |
cb91bb07eeff
Email notification signals from charkins. Fixes #1324
Sean Egan <seanegan@gmail.com>
parents:
16719
diff
changeset
|
737 |
15374
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
738 return TRUE; |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
739 } |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
740 |
15823 | 741 static PurplePluginInfo info = |
15374
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
742 { |
15823 | 743 PURPLE_PLUGIN_MAGIC, |
744 PURPLE_MAJOR_VERSION, | |
745 PURPLE_MINOR_VERSION, | |
746 PURPLE_PLUGIN_STANDARD, /**< type */ | |
15374
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
747 NULL, /**< ui_requirement */ |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
748 0, /**< flags */ |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
749 NULL, /**< dependencies */ |
15823 | 750 PURPLE_PRIORITY_DEFAULT, /**< priority */ |
15374
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
751 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
752 SIGNAL_TEST_PLUGIN_ID, /**< id */ |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
753 N_("Signals Test"), /**< name */ |
21030
3cc856ca2338
Add a --with-extraversion option to ./configure so packagers can fine tune
Stu Tomlinson <stu@nosnilmot.com>
parents:
19680
diff
changeset
|
754 DISPLAY_VERSION, /**< version */ |
15374
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
755 /** summary */ |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
756 N_("Test to see that all signals are working properly."), |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
757 /** description */ |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
758 N_("Test to see that all signals are working properly."), |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
759 "Christian Hammond <chipx86@gnupdate.org>", /**< author */ |
15823 | 760 PURPLE_WEBSITE, /**< homepage */ |
15374
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
761 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
762 plugin_load, /**< load */ |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
763 NULL, /**< unload */ |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
764 NULL, /**< destroy */ |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
765 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
766 NULL, /**< ui_info */ |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
767 NULL, /**< extra_info */ |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
768 NULL, |
16719
d638845509fd
Add padding to structs as necessary to silence compiler warnings
Stu Tomlinson <stu@nosnilmot.com>
parents:
15823
diff
changeset
|
769 NULL, |
d638845509fd
Add padding to structs as necessary to silence compiler warnings
Stu Tomlinson <stu@nosnilmot.com>
parents:
15823
diff
changeset
|
770 /* Padding */ |
d638845509fd
Add padding to structs as necessary to silence compiler warnings
Stu Tomlinson <stu@nosnilmot.com>
parents:
15823
diff
changeset
|
771 NULL, |
d638845509fd
Add padding to structs as necessary to silence compiler warnings
Stu Tomlinson <stu@nosnilmot.com>
parents:
15823
diff
changeset
|
772 NULL, |
d638845509fd
Add padding to structs as necessary to silence compiler warnings
Stu Tomlinson <stu@nosnilmot.com>
parents:
15823
diff
changeset
|
773 NULL, |
15374
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
774 NULL |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
775 }; |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
776 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
777 static void |
15823 | 778 init_plugin(PurplePlugin *plugin) |
15374
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
779 { |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
780 } |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
781 |
15823 | 782 PURPLE_INIT_PLUGIN(signalstest, init_plugin, info) |