Fri, 21 May 2004 14:33:32 +0000
[gaim-migrate @ 9774]
" This patch renames the existing received-*-msg signals
to receiving-*msg to fit the naming of other signals
where a pointer to the message is passed (writing,
sending, displaying)
It adds new received-*-msg signals which are emitted
after the receiving signals, in line with the other
conversation signals (wrote, sent, displayed)
This is necessary to allow plugins which depend on the
final received message to work alongside plugins which
may modify the message.
One known example of this is festival-gaim alongside
gaim-encryption - festival-gaim would try to "speak"
the encrypted text:
http://sf.net/tracker/?func=detail&aid=943216&group_id=89763&atid=591320
I've tested this with gaim-encryption and festival-gaim
(locally modified so gaim-encryption uses the receiving
signal and festival uses the received signal)
All in-tree users of received-*-msg are updated to use
receiving-*-msg if they do modify the message, the
conversation-signals documentation is updated, the
signals-test.c & signal-test.tcl plugins are also updated." --Stu Tomlinson
committer: Luke Schierer <lschiere@pidgin.im>
|
6179
4df73df94250
[gaim-migrate @ 6664]
Christian Hammond <chipx86@chipx86.com>
parents:
6168
diff
changeset
|
1 | /** |
|
4df73df94250
[gaim-migrate @ 6664]
Christian Hammond <chipx86@chipx86.com>
parents:
6168
diff
changeset
|
2 | * @file core.c Gaim Core API |
|
4df73df94250
[gaim-migrate @ 6664]
Christian Hammond <chipx86@chipx86.com>
parents:
6168
diff
changeset
|
3 | * @ingroup core |
|
4df73df94250
[gaim-migrate @ 6664]
Christian Hammond <chipx86@chipx86.com>
parents:
6168
diff
changeset
|
4 | * |
| 2416 | 5 | * gaim |
| 6 | * | |
| 8046 | 7 | * Gaim is the legal property of its developers, whose names are too numerous |
| 8 | * to list here. Please refer to the COPYRIGHT file distributed with this | |
| 9 | * source distribution. | |
| 2416 | 10 | * |
| 11 | * This program is free software; you can redistribute it and/or modify | |
| 12 | * it under the terms of the GNU General Public License as published by | |
| 13 | * the Free Software Foundation; either version 2 of the License, or | |
| 14 | * (at your option) any later version. | |
| 15 | * | |
| 16 | * This program is distributed in the hope that it will be useful, | |
| 17 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | |
| 18 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
| 19 | * GNU General Public License for more details. | |
| 20 | * | |
| 21 | * You should have received a copy of the GNU General Public License | |
| 22 | * along with this program; if not, write to the Free Software | |
| 23 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | |
| 24 | */ | |
|
6179
4df73df94250
[gaim-migrate @ 6664]
Christian Hammond <chipx86@chipx86.com>
parents:
6168
diff
changeset
|
25 | #include "internal.h" |
|
4df73df94250
[gaim-migrate @ 6664]
Christian Hammond <chipx86@chipx86.com>
parents:
6168
diff
changeset
|
26 | #include "connection.h" |
|
4df73df94250
[gaim-migrate @ 6664]
Christian Hammond <chipx86@chipx86.com>
parents:
6168
diff
changeset
|
27 | #include "conversation.h" |
|
4df73df94250
[gaim-migrate @ 6664]
Christian Hammond <chipx86@chipx86.com>
parents:
6168
diff
changeset
|
28 | #include "core.h" |
|
4df73df94250
[gaim-migrate @ 6664]
Christian Hammond <chipx86@chipx86.com>
parents:
6168
diff
changeset
|
29 | #include "debug.h" |
| 8231 | 30 | #include "network.h" |
|
6179
4df73df94250
[gaim-migrate @ 6664]
Christian Hammond <chipx86@chipx86.com>
parents:
6168
diff
changeset
|
31 | #include "plugin.h" |
|
4df73df94250
[gaim-migrate @ 6664]
Christian Hammond <chipx86@chipx86.com>
parents:
6168
diff
changeset
|
32 | #include "pounce.h" |
|
4df73df94250
[gaim-migrate @ 6664]
Christian Hammond <chipx86@chipx86.com>
parents:
6168
diff
changeset
|
33 | #include "prefs.h" |
|
6371
e92b66ee5518
[gaim-migrate @ 6876]
Christian Hammond <chipx86@chipx86.com>
parents:
6266
diff
changeset
|
34 | #include "privacy.h" |
|
6179
4df73df94250
[gaim-migrate @ 6664]
Christian Hammond <chipx86@chipx86.com>
parents:
6168
diff
changeset
|
35 | #include "proxy.h" |
|
6485
3c7ba18e32f1
[gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
6371
diff
changeset
|
36 | #include "signals.h" |
|
6701
7e2db9273748
[gaim-migrate @ 7227]
Christian Hammond <chipx86@chipx86.com>
parents:
6612
diff
changeset
|
37 | #include "sslconn.h" |
|
6179
4df73df94250
[gaim-migrate @ 6664]
Christian Hammond <chipx86@chipx86.com>
parents:
6168
diff
changeset
|
38 | #include "sound.h" |
| 2416 | 39 | |
|
6179
4df73df94250
[gaim-migrate @ 6664]
Christian Hammond <chipx86@chipx86.com>
parents:
6168
diff
changeset
|
40 | struct GaimCore |
|
4df73df94250
[gaim-migrate @ 6664]
Christian Hammond <chipx86@chipx86.com>
parents:
6168
diff
changeset
|
41 | { |
|
4df73df94250
[gaim-migrate @ 6664]
Christian Hammond <chipx86@chipx86.com>
parents:
6168
diff
changeset
|
42 | char *ui; |
|
4df73df94250
[gaim-migrate @ 6664]
Christian Hammond <chipx86@chipx86.com>
parents:
6168
diff
changeset
|
43 | |
|
4df73df94250
[gaim-migrate @ 6664]
Christian Hammond <chipx86@chipx86.com>
parents:
6168
diff
changeset
|
44 | void *reserved; |
|
4df73df94250
[gaim-migrate @ 6664]
Christian Hammond <chipx86@chipx86.com>
parents:
6168
diff
changeset
|
45 | }; |
|
4df73df94250
[gaim-migrate @ 6664]
Christian Hammond <chipx86@chipx86.com>
parents:
6168
diff
changeset
|
46 | |
|
4df73df94250
[gaim-migrate @ 6664]
Christian Hammond <chipx86@chipx86.com>
parents:
6168
diff
changeset
|
47 | static GaimCoreUiOps *_ops = NULL; |
|
4df73df94250
[gaim-migrate @ 6664]
Christian Hammond <chipx86@chipx86.com>
parents:
6168
diff
changeset
|
48 | static GaimCore *_core = NULL; |
|
4df73df94250
[gaim-migrate @ 6664]
Christian Hammond <chipx86@chipx86.com>
parents:
6168
diff
changeset
|
49 | |
|
4df73df94250
[gaim-migrate @ 6664]
Christian Hammond <chipx86@chipx86.com>
parents:
6168
diff
changeset
|
50 | STATIC_PROTO_INIT |
|
4df73df94250
[gaim-migrate @ 6664]
Christian Hammond <chipx86@chipx86.com>
parents:
6168
diff
changeset
|
51 | |
|
4df73df94250
[gaim-migrate @ 6664]
Christian Hammond <chipx86@chipx86.com>
parents:
6168
diff
changeset
|
52 | gboolean |
|
4df73df94250
[gaim-migrate @ 6664]
Christian Hammond <chipx86@chipx86.com>
parents:
6168
diff
changeset
|
53 | gaim_core_init(const char *ui) |
|
4df73df94250
[gaim-migrate @ 6664]
Christian Hammond <chipx86@chipx86.com>
parents:
6168
diff
changeset
|
54 | { |
|
4df73df94250
[gaim-migrate @ 6664]
Christian Hammond <chipx86@chipx86.com>
parents:
6168
diff
changeset
|
55 | GaimCoreUiOps *ops; |
|
4df73df94250
[gaim-migrate @ 6664]
Christian Hammond <chipx86@chipx86.com>
parents:
6168
diff
changeset
|
56 | GaimCore *core; |
|
4df73df94250
[gaim-migrate @ 6664]
Christian Hammond <chipx86@chipx86.com>
parents:
6168
diff
changeset
|
57 | |
|
4df73df94250
[gaim-migrate @ 6664]
Christian Hammond <chipx86@chipx86.com>
parents:
6168
diff
changeset
|
58 | g_return_val_if_fail(ui != NULL, FALSE); |
|
4df73df94250
[gaim-migrate @ 6664]
Christian Hammond <chipx86@chipx86.com>
parents:
6168
diff
changeset
|
59 | g_return_val_if_fail(gaim_get_core() == NULL, FALSE); |
|
4df73df94250
[gaim-migrate @ 6664]
Christian Hammond <chipx86@chipx86.com>
parents:
6168
diff
changeset
|
60 | |
|
4df73df94250
[gaim-migrate @ 6664]
Christian Hammond <chipx86@chipx86.com>
parents:
6168
diff
changeset
|
61 | _core = core = g_new0(GaimCore, 1); |
|
4df73df94250
[gaim-migrate @ 6664]
Christian Hammond <chipx86@chipx86.com>
parents:
6168
diff
changeset
|
62 | core->ui = g_strdup(ui); |
|
4df73df94250
[gaim-migrate @ 6664]
Christian Hammond <chipx86@chipx86.com>
parents:
6168
diff
changeset
|
63 | core->reserved = NULL; |
|
4df73df94250
[gaim-migrate @ 6664]
Christian Hammond <chipx86@chipx86.com>
parents:
6168
diff
changeset
|
64 | |
|
7035
76bca80cd91d
[gaim-migrate @ 7598]
Christian Hammond <chipx86@chipx86.com>
parents:
6846
diff
changeset
|
65 | ops = gaim_core_get_ui_ops(); |
|
6179
4df73df94250
[gaim-migrate @ 6664]
Christian Hammond <chipx86@chipx86.com>
parents:
6168
diff
changeset
|
66 | |
|
6485
3c7ba18e32f1
[gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
6371
diff
changeset
|
67 | /* The signals subsystem is important and should be first. */ |
|
3c7ba18e32f1
[gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
6371
diff
changeset
|
68 | gaim_signals_init(); |
|
3c7ba18e32f1
[gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
6371
diff
changeset
|
69 | |
|
6564
a7a2c1927544
[gaim-migrate @ 7086]
Christian Hammond <chipx86@chipx86.com>
parents:
6485
diff
changeset
|
70 | gaim_signal_register(core, "quitting", gaim_marshal_VOID, NULL, 0); |
|
6485
3c7ba18e32f1
[gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
6371
diff
changeset
|
71 | |
|
6179
4df73df94250
[gaim-migrate @ 6664]
Christian Hammond <chipx86@chipx86.com>
parents:
6168
diff
changeset
|
72 | /* Initialize all static protocols. */ |
|
4df73df94250
[gaim-migrate @ 6664]
Christian Hammond <chipx86@chipx86.com>
parents:
6168
diff
changeset
|
73 | static_proto_init(); |
|
4df73df94250
[gaim-migrate @ 6664]
Christian Hammond <chipx86@chipx86.com>
parents:
6168
diff
changeset
|
74 | |
|
4df73df94250
[gaim-migrate @ 6664]
Christian Hammond <chipx86@chipx86.com>
parents:
6168
diff
changeset
|
75 | gaim_prefs_init(); |
|
4df73df94250
[gaim-migrate @ 6664]
Christian Hammond <chipx86@chipx86.com>
parents:
6168
diff
changeset
|
76 | |
|
4df73df94250
[gaim-migrate @ 6664]
Christian Hammond <chipx86@chipx86.com>
parents:
6168
diff
changeset
|
77 | if (ops != NULL) { |
|
4df73df94250
[gaim-migrate @ 6664]
Christian Hammond <chipx86@chipx86.com>
parents:
6168
diff
changeset
|
78 | if (ops->ui_prefs_init != NULL) |
|
4df73df94250
[gaim-migrate @ 6664]
Christian Hammond <chipx86@chipx86.com>
parents:
6168
diff
changeset
|
79 | ops->ui_prefs_init(); |
|
4df73df94250
[gaim-migrate @ 6664]
Christian Hammond <chipx86@chipx86.com>
parents:
6168
diff
changeset
|
80 | |
|
4df73df94250
[gaim-migrate @ 6664]
Christian Hammond <chipx86@chipx86.com>
parents:
6168
diff
changeset
|
81 | if (ops->debug_ui_init != NULL) |
|
4df73df94250
[gaim-migrate @ 6664]
Christian Hammond <chipx86@chipx86.com>
parents:
6168
diff
changeset
|
82 | ops->debug_ui_init(); |
|
4df73df94250
[gaim-migrate @ 6664]
Christian Hammond <chipx86@chipx86.com>
parents:
6168
diff
changeset
|
83 | } |
|
4df73df94250
[gaim-migrate @ 6664]
Christian Hammond <chipx86@chipx86.com>
parents:
6168
diff
changeset
|
84 | |
|
6485
3c7ba18e32f1
[gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
6371
diff
changeset
|
85 | gaim_accounts_init(); |
|
3c7ba18e32f1
[gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
6371
diff
changeset
|
86 | gaim_connections_init(); |
|
3c7ba18e32f1
[gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
6371
diff
changeset
|
87 | gaim_conversations_init(); |
|
3c7ba18e32f1
[gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
6371
diff
changeset
|
88 | gaim_blist_init(); |
| 7431 | 89 | gaim_log_init(); |
|
6846
f814f02dca87
[gaim-migrate @ 7391]
Christian Hammond <chipx86@chipx86.com>
parents:
6837
diff
changeset
|
90 | gaim_buddy_icons_init(); |
| 8231 | 91 | gaim_network_init(); |
|
6371
e92b66ee5518
[gaim-migrate @ 6876]
Christian Hammond <chipx86@chipx86.com>
parents:
6266
diff
changeset
|
92 | gaim_privacy_init(); |
|
e92b66ee5518
[gaim-migrate @ 6876]
Christian Hammond <chipx86@chipx86.com>
parents:
6266
diff
changeset
|
93 | gaim_pounces_init(); |
|
6179
4df73df94250
[gaim-migrate @ 6664]
Christian Hammond <chipx86@chipx86.com>
parents:
6168
diff
changeset
|
94 | gaim_proxy_init(); |
|
4df73df94250
[gaim-migrate @ 6664]
Christian Hammond <chipx86@chipx86.com>
parents:
6168
diff
changeset
|
95 | gaim_sound_init(); |
|
6701
7e2db9273748
[gaim-migrate @ 7227]
Christian Hammond <chipx86@chipx86.com>
parents:
6612
diff
changeset
|
96 | gaim_ssl_init(); |
|
6179
4df73df94250
[gaim-migrate @ 6664]
Christian Hammond <chipx86@chipx86.com>
parents:
6168
diff
changeset
|
97 | |
|
4df73df94250
[gaim-migrate @ 6664]
Christian Hammond <chipx86@chipx86.com>
parents:
6168
diff
changeset
|
98 | if (ops != NULL && ops->ui_init != NULL) |
|
4df73df94250
[gaim-migrate @ 6664]
Christian Hammond <chipx86@chipx86.com>
parents:
6168
diff
changeset
|
99 | ops->ui_init(); |
|
4df73df94250
[gaim-migrate @ 6664]
Christian Hammond <chipx86@chipx86.com>
parents:
6168
diff
changeset
|
100 | |
|
4df73df94250
[gaim-migrate @ 6664]
Christian Hammond <chipx86@chipx86.com>
parents:
6168
diff
changeset
|
101 | return TRUE; |
|
4df73df94250
[gaim-migrate @ 6664]
Christian Hammond <chipx86@chipx86.com>
parents:
6168
diff
changeset
|
102 | } |
|
4df73df94250
[gaim-migrate @ 6664]
Christian Hammond <chipx86@chipx86.com>
parents:
6168
diff
changeset
|
103 | |
|
4df73df94250
[gaim-migrate @ 6664]
Christian Hammond <chipx86@chipx86.com>
parents:
6168
diff
changeset
|
104 | void |
|
4df73df94250
[gaim-migrate @ 6664]
Christian Hammond <chipx86@chipx86.com>
parents:
6168
diff
changeset
|
105 | gaim_core_quit(void) |
|
4df73df94250
[gaim-migrate @ 6664]
Christian Hammond <chipx86@chipx86.com>
parents:
6168
diff
changeset
|
106 | { |
|
4df73df94250
[gaim-migrate @ 6664]
Christian Hammond <chipx86@chipx86.com>
parents:
6168
diff
changeset
|
107 | GaimCoreUiOps *ops; |
|
4df73df94250
[gaim-migrate @ 6664]
Christian Hammond <chipx86@chipx86.com>
parents:
6168
diff
changeset
|
108 | GaimCore *core = gaim_get_core(); |
|
4df73df94250
[gaim-migrate @ 6664]
Christian Hammond <chipx86@chipx86.com>
parents:
6168
diff
changeset
|
109 | |
|
4df73df94250
[gaim-migrate @ 6664]
Christian Hammond <chipx86@chipx86.com>
parents:
6168
diff
changeset
|
110 | g_return_if_fail(core != NULL); |
|
4df73df94250
[gaim-migrate @ 6664]
Christian Hammond <chipx86@chipx86.com>
parents:
6168
diff
changeset
|
111 | |
|
7035
76bca80cd91d
[gaim-migrate @ 7598]
Christian Hammond <chipx86@chipx86.com>
parents:
6846
diff
changeset
|
112 | ops = gaim_core_get_ui_ops(); |
|
6179
4df73df94250
[gaim-migrate @ 6664]
Christian Hammond <chipx86@chipx86.com>
parents:
6168
diff
changeset
|
113 | |
|
4df73df94250
[gaim-migrate @ 6664]
Christian Hammond <chipx86@chipx86.com>
parents:
6168
diff
changeset
|
114 | if (ops != NULL && ops->quit != NULL) |
|
4df73df94250
[gaim-migrate @ 6664]
Christian Hammond <chipx86@chipx86.com>
parents:
6168
diff
changeset
|
115 | ops->quit(); |
|
4df73df94250
[gaim-migrate @ 6664]
Christian Hammond <chipx86@chipx86.com>
parents:
6168
diff
changeset
|
116 | |
|
4df73df94250
[gaim-migrate @ 6664]
Christian Hammond <chipx86@chipx86.com>
parents:
6168
diff
changeset
|
117 | /* The self destruct sequence has been initiated */ |
|
6485
3c7ba18e32f1
[gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
6371
diff
changeset
|
118 | gaim_signal_emit(gaim_get_core(), "quitting"); |
|
6179
4df73df94250
[gaim-migrate @ 6664]
Christian Hammond <chipx86@chipx86.com>
parents:
6168
diff
changeset
|
119 | |
|
4df73df94250
[gaim-migrate @ 6664]
Christian Hammond <chipx86@chipx86.com>
parents:
6168
diff
changeset
|
120 | /* Transmission ends */ |
|
4df73df94250
[gaim-migrate @ 6664]
Christian Hammond <chipx86@chipx86.com>
parents:
6168
diff
changeset
|
121 | gaim_connections_disconnect_all(); |
|
4df73df94250
[gaim-migrate @ 6664]
Christian Hammond <chipx86@chipx86.com>
parents:
6168
diff
changeset
|
122 | |
|
4df73df94250
[gaim-migrate @ 6664]
Christian Hammond <chipx86@chipx86.com>
parents:
6168
diff
changeset
|
123 | gaim_debug(GAIM_DEBUG_INFO, "main", "Unloading all plugins\n"); |
|
4df73df94250
[gaim-migrate @ 6664]
Christian Hammond <chipx86@chipx86.com>
parents:
6168
diff
changeset
|
124 | gaim_plugins_destroy_all(); |
|
4df73df94250
[gaim-migrate @ 6664]
Christian Hammond <chipx86@chipx86.com>
parents:
6168
diff
changeset
|
125 | |
| 8235 | 126 | /* Save .xml files, remove signals, etc. */ |
|
6701
7e2db9273748
[gaim-migrate @ 7227]
Christian Hammond <chipx86@chipx86.com>
parents:
6612
diff
changeset
|
127 | gaim_ssl_uninit(); |
|
6837
7c0a9bac0f3f
[gaim-migrate @ 7382]
Christian Hammond <chipx86@chipx86.com>
parents:
6701
diff
changeset
|
128 | gaim_pounces_uninit(); |
|
6485
3c7ba18e32f1
[gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
6371
diff
changeset
|
129 | gaim_blist_uninit(); |
|
3c7ba18e32f1
[gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
6371
diff
changeset
|
130 | gaim_conversations_uninit(); |
|
3c7ba18e32f1
[gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
6371
diff
changeset
|
131 | gaim_connections_uninit(); |
|
6846
f814f02dca87
[gaim-migrate @ 7391]
Christian Hammond <chipx86@chipx86.com>
parents:
6837
diff
changeset
|
132 | gaim_buddy_icons_uninit(); |
|
6485
3c7ba18e32f1
[gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
6371
diff
changeset
|
133 | gaim_accounts_uninit(); |
| 8235 | 134 | gaim_prefs_uninit(); |
|
6485
3c7ba18e32f1
[gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
6371
diff
changeset
|
135 | |
|
3c7ba18e32f1
[gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
6371
diff
changeset
|
136 | gaim_signals_uninit(); |
|
3c7ba18e32f1
[gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
6371
diff
changeset
|
137 | |
|
6179
4df73df94250
[gaim-migrate @ 6664]
Christian Hammond <chipx86@chipx86.com>
parents:
6168
diff
changeset
|
138 | if (core->ui != NULL) { |
|
4df73df94250
[gaim-migrate @ 6664]
Christian Hammond <chipx86@chipx86.com>
parents:
6168
diff
changeset
|
139 | g_free(core->ui); |
|
4df73df94250
[gaim-migrate @ 6664]
Christian Hammond <chipx86@chipx86.com>
parents:
6168
diff
changeset
|
140 | core->ui = NULL; |
|
4df73df94250
[gaim-migrate @ 6664]
Christian Hammond <chipx86@chipx86.com>
parents:
6168
diff
changeset
|
141 | } |
|
4df73df94250
[gaim-migrate @ 6664]
Christian Hammond <chipx86@chipx86.com>
parents:
6168
diff
changeset
|
142 | |
|
4df73df94250
[gaim-migrate @ 6664]
Christian Hammond <chipx86@chipx86.com>
parents:
6168
diff
changeset
|
143 | g_free(core); |
|
4df73df94250
[gaim-migrate @ 6664]
Christian Hammond <chipx86@chipx86.com>
parents:
6168
diff
changeset
|
144 | |
|
4df73df94250
[gaim-migrate @ 6664]
Christian Hammond <chipx86@chipx86.com>
parents:
6168
diff
changeset
|
145 | _core = NULL; |
|
4df73df94250
[gaim-migrate @ 6664]
Christian Hammond <chipx86@chipx86.com>
parents:
6168
diff
changeset
|
146 | } |
|
4df73df94250
[gaim-migrate @ 6664]
Christian Hammond <chipx86@chipx86.com>
parents:
6168
diff
changeset
|
147 | |
|
7646
6806a6893ac0
[gaim-migrate @ 8289]
Mark Doliner <markdoliner@pidgin.im>
parents:
7431
diff
changeset
|
148 | gboolean |
|
6806a6893ac0
[gaim-migrate @ 8289]
Mark Doliner <markdoliner@pidgin.im>
parents:
7431
diff
changeset
|
149 | gaim_core_quit_cb(gpointer unused) |
|
6806a6893ac0
[gaim-migrate @ 8289]
Mark Doliner <markdoliner@pidgin.im>
parents:
7431
diff
changeset
|
150 | { |
|
6806a6893ac0
[gaim-migrate @ 8289]
Mark Doliner <markdoliner@pidgin.im>
parents:
7431
diff
changeset
|
151 | gaim_core_quit(); |
|
6806a6893ac0
[gaim-migrate @ 8289]
Mark Doliner <markdoliner@pidgin.im>
parents:
7431
diff
changeset
|
152 | |
|
6806a6893ac0
[gaim-migrate @ 8289]
Mark Doliner <markdoliner@pidgin.im>
parents:
7431
diff
changeset
|
153 | return FALSE; |
|
6806a6893ac0
[gaim-migrate @ 8289]
Mark Doliner <markdoliner@pidgin.im>
parents:
7431
diff
changeset
|
154 | } |
|
6806a6893ac0
[gaim-migrate @ 8289]
Mark Doliner <markdoliner@pidgin.im>
parents:
7431
diff
changeset
|
155 | |
|
6612
aac6af649208
[gaim-migrate @ 7136]
Christian Hammond <chipx86@chipx86.com>
parents:
6564
diff
changeset
|
156 | const char * |
|
aac6af649208
[gaim-migrate @ 7136]
Christian Hammond <chipx86@chipx86.com>
parents:
6564
diff
changeset
|
157 | gaim_core_get_version(void) |
|
aac6af649208
[gaim-migrate @ 7136]
Christian Hammond <chipx86@chipx86.com>
parents:
6564
diff
changeset
|
158 | { |
|
aac6af649208
[gaim-migrate @ 7136]
Christian Hammond <chipx86@chipx86.com>
parents:
6564
diff
changeset
|
159 | return VERSION; |
|
aac6af649208
[gaim-migrate @ 7136]
Christian Hammond <chipx86@chipx86.com>
parents:
6564
diff
changeset
|
160 | } |
|
aac6af649208
[gaim-migrate @ 7136]
Christian Hammond <chipx86@chipx86.com>
parents:
6564
diff
changeset
|
161 | |
|
6179
4df73df94250
[gaim-migrate @ 6664]
Christian Hammond <chipx86@chipx86.com>
parents:
6168
diff
changeset
|
162 | const char * |
|
4df73df94250
[gaim-migrate @ 6664]
Christian Hammond <chipx86@chipx86.com>
parents:
6168
diff
changeset
|
163 | gaim_core_get_ui(void) |
|
4df73df94250
[gaim-migrate @ 6664]
Christian Hammond <chipx86@chipx86.com>
parents:
6168
diff
changeset
|
164 | { |
|
4df73df94250
[gaim-migrate @ 6664]
Christian Hammond <chipx86@chipx86.com>
parents:
6168
diff
changeset
|
165 | GaimCore *core = gaim_get_core(); |
|
4df73df94250
[gaim-migrate @ 6664]
Christian Hammond <chipx86@chipx86.com>
parents:
6168
diff
changeset
|
166 | |
|
4df73df94250
[gaim-migrate @ 6664]
Christian Hammond <chipx86@chipx86.com>
parents:
6168
diff
changeset
|
167 | g_return_val_if_fail(core != NULL, NULL); |
|
4df73df94250
[gaim-migrate @ 6664]
Christian Hammond <chipx86@chipx86.com>
parents:
6168
diff
changeset
|
168 | |
|
4df73df94250
[gaim-migrate @ 6664]
Christian Hammond <chipx86@chipx86.com>
parents:
6168
diff
changeset
|
169 | return core->ui; |
|
4df73df94250
[gaim-migrate @ 6664]
Christian Hammond <chipx86@chipx86.com>
parents:
6168
diff
changeset
|
170 | } |
|
4df73df94250
[gaim-migrate @ 6664]
Christian Hammond <chipx86@chipx86.com>
parents:
6168
diff
changeset
|
171 | |
|
4df73df94250
[gaim-migrate @ 6664]
Christian Hammond <chipx86@chipx86.com>
parents:
6168
diff
changeset
|
172 | GaimCore * |
|
4df73df94250
[gaim-migrate @ 6664]
Christian Hammond <chipx86@chipx86.com>
parents:
6168
diff
changeset
|
173 | gaim_get_core(void) |
|
4df73df94250
[gaim-migrate @ 6664]
Christian Hammond <chipx86@chipx86.com>
parents:
6168
diff
changeset
|
174 | { |
|
4df73df94250
[gaim-migrate @ 6664]
Christian Hammond <chipx86@chipx86.com>
parents:
6168
diff
changeset
|
175 | return _core; |
|
4df73df94250
[gaim-migrate @ 6664]
Christian Hammond <chipx86@chipx86.com>
parents:
6168
diff
changeset
|
176 | } |
|
4df73df94250
[gaim-migrate @ 6664]
Christian Hammond <chipx86@chipx86.com>
parents:
6168
diff
changeset
|
177 | |
|
4df73df94250
[gaim-migrate @ 6664]
Christian Hammond <chipx86@chipx86.com>
parents:
6168
diff
changeset
|
178 | void |
|
7035
76bca80cd91d
[gaim-migrate @ 7598]
Christian Hammond <chipx86@chipx86.com>
parents:
6846
diff
changeset
|
179 | gaim_core_set_ui_ops(GaimCoreUiOps *ops) |
|
6179
4df73df94250
[gaim-migrate @ 6664]
Christian Hammond <chipx86@chipx86.com>
parents:
6168
diff
changeset
|
180 | { |
|
4df73df94250
[gaim-migrate @ 6664]
Christian Hammond <chipx86@chipx86.com>
parents:
6168
diff
changeset
|
181 | _ops = ops; |
|
4df73df94250
[gaim-migrate @ 6664]
Christian Hammond <chipx86@chipx86.com>
parents:
6168
diff
changeset
|
182 | } |
|
4df73df94250
[gaim-migrate @ 6664]
Christian Hammond <chipx86@chipx86.com>
parents:
6168
diff
changeset
|
183 | |
|
4df73df94250
[gaim-migrate @ 6664]
Christian Hammond <chipx86@chipx86.com>
parents:
6168
diff
changeset
|
184 | GaimCoreUiOps * |
|
7035
76bca80cd91d
[gaim-migrate @ 7598]
Christian Hammond <chipx86@chipx86.com>
parents:
6846
diff
changeset
|
185 | gaim_core_get_ui_ops(void) |
|
6179
4df73df94250
[gaim-migrate @ 6664]
Christian Hammond <chipx86@chipx86.com>
parents:
6168
diff
changeset
|
186 | { |
|
4df73df94250
[gaim-migrate @ 6664]
Christian Hammond <chipx86@chipx86.com>
parents:
6168
diff
changeset
|
187 | return _ops; |
|
4df73df94250
[gaim-migrate @ 6664]
Christian Hammond <chipx86@chipx86.com>
parents:
6168
diff
changeset
|
188 | } |