Mercurial > pidgin
annotate src/core.c @ 6643:0dfe02111e20
[gaim-migrate @ 7168]
since it seems i cannot get Silvestrij's patch in for this release,
bjoernv writes:
" I found a number of bugs in src/gaim-remote.c.
My patch contains:
- parameter processing fix in gaim-remote
(gaim-remote no longer segfaults on "gaim-remote uri")
- gaim-remote now has correct error messages and return
codes, if connection to gaim fails
(gaim-remote is not longer silent, if
gaim-remote uri
'aim:goim?screenname=Penguin&message=hello+world'
failes, because gaim is not running)"
committer: Tailor Script <tailor@pidgin.im>
author | Luke Schierer <lschiere@pidgin.im> |
---|---|
date | Thu, 28 Aug 2003 14:39:27 +0000 |
parents | 0f78db521e70 |
children | b7e113a59b51 |
rev | line source |
---|---|
6179
16e384bb7fbf
[gaim-migrate @ 6664]
Christian Hammond <chipx86@chipx86.com>
parents:
6168
diff
changeset
|
1 /** |
16e384bb7fbf
[gaim-migrate @ 6664]
Christian Hammond <chipx86@chipx86.com>
parents:
6168
diff
changeset
|
2 * @file core.c Gaim Core API |
16e384bb7fbf
[gaim-migrate @ 6664]
Christian Hammond <chipx86@chipx86.com>
parents:
6168
diff
changeset
|
3 * @ingroup core |
16e384bb7fbf
[gaim-migrate @ 6664]
Christian Hammond <chipx86@chipx86.com>
parents:
6168
diff
changeset
|
4 * |
2416 | 5 * gaim |
6 * | |
6179
16e384bb7fbf
[gaim-migrate @ 6664]
Christian Hammond <chipx86@chipx86.com>
parents:
6168
diff
changeset
|
7 * Copyright (C) 2003 Christian Hammond <chipx86@gnupdate.org> |
2416 | 8 * |
9 * This program is free software; you can redistribute it and/or modify | |
10 * it under the terms of the GNU General Public License as published by | |
11 * the Free Software Foundation; either version 2 of the License, or | |
12 * (at your option) any later version. | |
13 * | |
14 * This program is distributed in the hope that it will be useful, | |
15 * but WITHOUT ANY WARRANTY; without even the implied warranty of | |
16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
17 * GNU General Public License for more details. | |
18 * | |
19 * You should have received a copy of the GNU General Public License | |
20 * along with this program; if not, write to the Free Software | |
21 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | |
22 */ | |
6179
16e384bb7fbf
[gaim-migrate @ 6664]
Christian Hammond <chipx86@chipx86.com>
parents:
6168
diff
changeset
|
23 #include "internal.h" |
16e384bb7fbf
[gaim-migrate @ 6664]
Christian Hammond <chipx86@chipx86.com>
parents:
6168
diff
changeset
|
24 #include "connection.h" |
16e384bb7fbf
[gaim-migrate @ 6664]
Christian Hammond <chipx86@chipx86.com>
parents:
6168
diff
changeset
|
25 #include "conversation.h" |
16e384bb7fbf
[gaim-migrate @ 6664]
Christian Hammond <chipx86@chipx86.com>
parents:
6168
diff
changeset
|
26 #include "core.h" |
16e384bb7fbf
[gaim-migrate @ 6664]
Christian Hammond <chipx86@chipx86.com>
parents:
6168
diff
changeset
|
27 #include "debug.h" |
6241
9ce44a7f9ae7
[gaim-migrate @ 6735]
Christian Hammond <chipx86@chipx86.com>
parents:
6207
diff
changeset
|
28 #include "ft.h" |
6179
16e384bb7fbf
[gaim-migrate @ 6664]
Christian Hammond <chipx86@chipx86.com>
parents:
6168
diff
changeset
|
29 #include "plugin.h" |
16e384bb7fbf
[gaim-migrate @ 6664]
Christian Hammond <chipx86@chipx86.com>
parents:
6168
diff
changeset
|
30 #include "pounce.h" |
16e384bb7fbf
[gaim-migrate @ 6664]
Christian Hammond <chipx86@chipx86.com>
parents:
6168
diff
changeset
|
31 #include "prefs.h" |
6371
8f94cce8faa5
[gaim-migrate @ 6876]
Christian Hammond <chipx86@chipx86.com>
parents:
6266
diff
changeset
|
32 #include "privacy.h" |
6179
16e384bb7fbf
[gaim-migrate @ 6664]
Christian Hammond <chipx86@chipx86.com>
parents:
6168
diff
changeset
|
33 #include "proxy.h" |
6485
70d5122bc3ff
[gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
6371
diff
changeset
|
34 #include "signals.h" |
6179
16e384bb7fbf
[gaim-migrate @ 6664]
Christian Hammond <chipx86@chipx86.com>
parents:
6168
diff
changeset
|
35 #include "sound.h" |
2416 | 36 |
6179
16e384bb7fbf
[gaim-migrate @ 6664]
Christian Hammond <chipx86@chipx86.com>
parents:
6168
diff
changeset
|
37 struct GaimCore |
16e384bb7fbf
[gaim-migrate @ 6664]
Christian Hammond <chipx86@chipx86.com>
parents:
6168
diff
changeset
|
38 { |
16e384bb7fbf
[gaim-migrate @ 6664]
Christian Hammond <chipx86@chipx86.com>
parents:
6168
diff
changeset
|
39 char *ui; |
16e384bb7fbf
[gaim-migrate @ 6664]
Christian Hammond <chipx86@chipx86.com>
parents:
6168
diff
changeset
|
40 |
16e384bb7fbf
[gaim-migrate @ 6664]
Christian Hammond <chipx86@chipx86.com>
parents:
6168
diff
changeset
|
41 void *reserved; |
16e384bb7fbf
[gaim-migrate @ 6664]
Christian Hammond <chipx86@chipx86.com>
parents:
6168
diff
changeset
|
42 }; |
16e384bb7fbf
[gaim-migrate @ 6664]
Christian Hammond <chipx86@chipx86.com>
parents:
6168
diff
changeset
|
43 |
16e384bb7fbf
[gaim-migrate @ 6664]
Christian Hammond <chipx86@chipx86.com>
parents:
6168
diff
changeset
|
44 static GaimCoreUiOps *_ops = NULL; |
16e384bb7fbf
[gaim-migrate @ 6664]
Christian Hammond <chipx86@chipx86.com>
parents:
6168
diff
changeset
|
45 static GaimCore *_core = NULL; |
16e384bb7fbf
[gaim-migrate @ 6664]
Christian Hammond <chipx86@chipx86.com>
parents:
6168
diff
changeset
|
46 |
16e384bb7fbf
[gaim-migrate @ 6664]
Christian Hammond <chipx86@chipx86.com>
parents:
6168
diff
changeset
|
47 STATIC_PROTO_INIT |
16e384bb7fbf
[gaim-migrate @ 6664]
Christian Hammond <chipx86@chipx86.com>
parents:
6168
diff
changeset
|
48 |
16e384bb7fbf
[gaim-migrate @ 6664]
Christian Hammond <chipx86@chipx86.com>
parents:
6168
diff
changeset
|
49 gboolean |
16e384bb7fbf
[gaim-migrate @ 6664]
Christian Hammond <chipx86@chipx86.com>
parents:
6168
diff
changeset
|
50 gaim_core_init(const char *ui) |
16e384bb7fbf
[gaim-migrate @ 6664]
Christian Hammond <chipx86@chipx86.com>
parents:
6168
diff
changeset
|
51 { |
16e384bb7fbf
[gaim-migrate @ 6664]
Christian Hammond <chipx86@chipx86.com>
parents:
6168
diff
changeset
|
52 GaimCoreUiOps *ops; |
16e384bb7fbf
[gaim-migrate @ 6664]
Christian Hammond <chipx86@chipx86.com>
parents:
6168
diff
changeset
|
53 GaimCore *core; |
16e384bb7fbf
[gaim-migrate @ 6664]
Christian Hammond <chipx86@chipx86.com>
parents:
6168
diff
changeset
|
54 |
16e384bb7fbf
[gaim-migrate @ 6664]
Christian Hammond <chipx86@chipx86.com>
parents:
6168
diff
changeset
|
55 g_return_val_if_fail(ui != NULL, FALSE); |
16e384bb7fbf
[gaim-migrate @ 6664]
Christian Hammond <chipx86@chipx86.com>
parents:
6168
diff
changeset
|
56 g_return_val_if_fail(gaim_get_core() == NULL, FALSE); |
16e384bb7fbf
[gaim-migrate @ 6664]
Christian Hammond <chipx86@chipx86.com>
parents:
6168
diff
changeset
|
57 |
16e384bb7fbf
[gaim-migrate @ 6664]
Christian Hammond <chipx86@chipx86.com>
parents:
6168
diff
changeset
|
58 _core = core = g_new0(GaimCore, 1); |
16e384bb7fbf
[gaim-migrate @ 6664]
Christian Hammond <chipx86@chipx86.com>
parents:
6168
diff
changeset
|
59 core->ui = g_strdup(ui); |
16e384bb7fbf
[gaim-migrate @ 6664]
Christian Hammond <chipx86@chipx86.com>
parents:
6168
diff
changeset
|
60 core->reserved = NULL; |
16e384bb7fbf
[gaim-migrate @ 6664]
Christian Hammond <chipx86@chipx86.com>
parents:
6168
diff
changeset
|
61 |
16e384bb7fbf
[gaim-migrate @ 6664]
Christian Hammond <chipx86@chipx86.com>
parents:
6168
diff
changeset
|
62 ops = gaim_get_core_ui_ops(); |
16e384bb7fbf
[gaim-migrate @ 6664]
Christian Hammond <chipx86@chipx86.com>
parents:
6168
diff
changeset
|
63 |
6485
70d5122bc3ff
[gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
6371
diff
changeset
|
64 /* The signals subsystem is important and should be first. */ |
70d5122bc3ff
[gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
6371
diff
changeset
|
65 gaim_signals_init(); |
70d5122bc3ff
[gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
6371
diff
changeset
|
66 |
6564
800ef4a51096
[gaim-migrate @ 7086]
Christian Hammond <chipx86@chipx86.com>
parents:
6485
diff
changeset
|
67 gaim_signal_register(core, "quitting", gaim_marshal_VOID, NULL, 0); |
6485
70d5122bc3ff
[gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
6371
diff
changeset
|
68 |
6179
16e384bb7fbf
[gaim-migrate @ 6664]
Christian Hammond <chipx86@chipx86.com>
parents:
6168
diff
changeset
|
69 /* Initialize all static protocols. */ |
16e384bb7fbf
[gaim-migrate @ 6664]
Christian Hammond <chipx86@chipx86.com>
parents:
6168
diff
changeset
|
70 static_proto_init(); |
16e384bb7fbf
[gaim-migrate @ 6664]
Christian Hammond <chipx86@chipx86.com>
parents:
6168
diff
changeset
|
71 |
16e384bb7fbf
[gaim-migrate @ 6664]
Christian Hammond <chipx86@chipx86.com>
parents:
6168
diff
changeset
|
72 gaim_prefs_init(); |
16e384bb7fbf
[gaim-migrate @ 6664]
Christian Hammond <chipx86@chipx86.com>
parents:
6168
diff
changeset
|
73 |
16e384bb7fbf
[gaim-migrate @ 6664]
Christian Hammond <chipx86@chipx86.com>
parents:
6168
diff
changeset
|
74 if (ops != NULL) { |
16e384bb7fbf
[gaim-migrate @ 6664]
Christian Hammond <chipx86@chipx86.com>
parents:
6168
diff
changeset
|
75 if (ops->ui_prefs_init != NULL) |
16e384bb7fbf
[gaim-migrate @ 6664]
Christian Hammond <chipx86@chipx86.com>
parents:
6168
diff
changeset
|
76 ops->ui_prefs_init(); |
16e384bb7fbf
[gaim-migrate @ 6664]
Christian Hammond <chipx86@chipx86.com>
parents:
6168
diff
changeset
|
77 |
16e384bb7fbf
[gaim-migrate @ 6664]
Christian Hammond <chipx86@chipx86.com>
parents:
6168
diff
changeset
|
78 if (ops->debug_ui_init != NULL) |
16e384bb7fbf
[gaim-migrate @ 6664]
Christian Hammond <chipx86@chipx86.com>
parents:
6168
diff
changeset
|
79 ops->debug_ui_init(); |
16e384bb7fbf
[gaim-migrate @ 6664]
Christian Hammond <chipx86@chipx86.com>
parents:
6168
diff
changeset
|
80 } |
16e384bb7fbf
[gaim-migrate @ 6664]
Christian Hammond <chipx86@chipx86.com>
parents:
6168
diff
changeset
|
81 |
6485
70d5122bc3ff
[gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
6371
diff
changeset
|
82 gaim_accounts_init(); |
70d5122bc3ff
[gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
6371
diff
changeset
|
83 gaim_connections_init(); |
70d5122bc3ff
[gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
6371
diff
changeset
|
84 gaim_conversations_init(); |
70d5122bc3ff
[gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
6371
diff
changeset
|
85 gaim_blist_init(); |
6371
8f94cce8faa5
[gaim-migrate @ 6876]
Christian Hammond <chipx86@chipx86.com>
parents:
6266
diff
changeset
|
86 gaim_privacy_init(); |
8f94cce8faa5
[gaim-migrate @ 6876]
Christian Hammond <chipx86@chipx86.com>
parents:
6266
diff
changeset
|
87 gaim_pounces_init(); |
6179
16e384bb7fbf
[gaim-migrate @ 6664]
Christian Hammond <chipx86@chipx86.com>
parents:
6168
diff
changeset
|
88 gaim_proxy_init(); |
16e384bb7fbf
[gaim-migrate @ 6664]
Christian Hammond <chipx86@chipx86.com>
parents:
6168
diff
changeset
|
89 gaim_sound_init(); |
6266
57d1630ff885
[gaim-migrate @ 6763]
Christian Hammond <chipx86@chipx86.com>
parents:
6241
diff
changeset
|
90 gaim_xfers_init(); |
6179
16e384bb7fbf
[gaim-migrate @ 6664]
Christian Hammond <chipx86@chipx86.com>
parents:
6168
diff
changeset
|
91 |
16e384bb7fbf
[gaim-migrate @ 6664]
Christian Hammond <chipx86@chipx86.com>
parents:
6168
diff
changeset
|
92 if (ops != NULL && ops->ui_init != NULL) |
16e384bb7fbf
[gaim-migrate @ 6664]
Christian Hammond <chipx86@chipx86.com>
parents:
6168
diff
changeset
|
93 ops->ui_init(); |
16e384bb7fbf
[gaim-migrate @ 6664]
Christian Hammond <chipx86@chipx86.com>
parents:
6168
diff
changeset
|
94 |
16e384bb7fbf
[gaim-migrate @ 6664]
Christian Hammond <chipx86@chipx86.com>
parents:
6168
diff
changeset
|
95 return TRUE; |
16e384bb7fbf
[gaim-migrate @ 6664]
Christian Hammond <chipx86@chipx86.com>
parents:
6168
diff
changeset
|
96 } |
16e384bb7fbf
[gaim-migrate @ 6664]
Christian Hammond <chipx86@chipx86.com>
parents:
6168
diff
changeset
|
97 |
16e384bb7fbf
[gaim-migrate @ 6664]
Christian Hammond <chipx86@chipx86.com>
parents:
6168
diff
changeset
|
98 void |
16e384bb7fbf
[gaim-migrate @ 6664]
Christian Hammond <chipx86@chipx86.com>
parents:
6168
diff
changeset
|
99 gaim_core_quit(void) |
16e384bb7fbf
[gaim-migrate @ 6664]
Christian Hammond <chipx86@chipx86.com>
parents:
6168
diff
changeset
|
100 { |
16e384bb7fbf
[gaim-migrate @ 6664]
Christian Hammond <chipx86@chipx86.com>
parents:
6168
diff
changeset
|
101 GaimCoreUiOps *ops; |
16e384bb7fbf
[gaim-migrate @ 6664]
Christian Hammond <chipx86@chipx86.com>
parents:
6168
diff
changeset
|
102 GaimCore *core = gaim_get_core(); |
16e384bb7fbf
[gaim-migrate @ 6664]
Christian Hammond <chipx86@chipx86.com>
parents:
6168
diff
changeset
|
103 |
16e384bb7fbf
[gaim-migrate @ 6664]
Christian Hammond <chipx86@chipx86.com>
parents:
6168
diff
changeset
|
104 g_return_if_fail(core != NULL); |
16e384bb7fbf
[gaim-migrate @ 6664]
Christian Hammond <chipx86@chipx86.com>
parents:
6168
diff
changeset
|
105 |
16e384bb7fbf
[gaim-migrate @ 6664]
Christian Hammond <chipx86@chipx86.com>
parents:
6168
diff
changeset
|
106 ops = gaim_get_core_ui_ops(); |
16e384bb7fbf
[gaim-migrate @ 6664]
Christian Hammond <chipx86@chipx86.com>
parents:
6168
diff
changeset
|
107 |
16e384bb7fbf
[gaim-migrate @ 6664]
Christian Hammond <chipx86@chipx86.com>
parents:
6168
diff
changeset
|
108 if (ops != NULL && ops->quit != NULL) |
16e384bb7fbf
[gaim-migrate @ 6664]
Christian Hammond <chipx86@chipx86.com>
parents:
6168
diff
changeset
|
109 ops->quit(); |
16e384bb7fbf
[gaim-migrate @ 6664]
Christian Hammond <chipx86@chipx86.com>
parents:
6168
diff
changeset
|
110 |
16e384bb7fbf
[gaim-migrate @ 6664]
Christian Hammond <chipx86@chipx86.com>
parents:
6168
diff
changeset
|
111 /* The self destruct sequence has been initiated */ |
6485
70d5122bc3ff
[gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
6371
diff
changeset
|
112 gaim_signal_emit(gaim_get_core(), "quitting"); |
6179
16e384bb7fbf
[gaim-migrate @ 6664]
Christian Hammond <chipx86@chipx86.com>
parents:
6168
diff
changeset
|
113 |
16e384bb7fbf
[gaim-migrate @ 6664]
Christian Hammond <chipx86@chipx86.com>
parents:
6168
diff
changeset
|
114 /* Transmission ends */ |
16e384bb7fbf
[gaim-migrate @ 6664]
Christian Hammond <chipx86@chipx86.com>
parents:
6168
diff
changeset
|
115 gaim_connections_disconnect_all(); |
16e384bb7fbf
[gaim-migrate @ 6664]
Christian Hammond <chipx86@chipx86.com>
parents:
6168
diff
changeset
|
116 |
16e384bb7fbf
[gaim-migrate @ 6664]
Christian Hammond <chipx86@chipx86.com>
parents:
6168
diff
changeset
|
117 /* Record what we have before we blow it away... */ |
16e384bb7fbf
[gaim-migrate @ 6664]
Christian Hammond <chipx86@chipx86.com>
parents:
6168
diff
changeset
|
118 gaim_prefs_sync(); |
16e384bb7fbf
[gaim-migrate @ 6664]
Christian Hammond <chipx86@chipx86.com>
parents:
6168
diff
changeset
|
119 gaim_accounts_sync(); |
16e384bb7fbf
[gaim-migrate @ 6664]
Christian Hammond <chipx86@chipx86.com>
parents:
6168
diff
changeset
|
120 |
16e384bb7fbf
[gaim-migrate @ 6664]
Christian Hammond <chipx86@chipx86.com>
parents:
6168
diff
changeset
|
121 gaim_debug(GAIM_DEBUG_INFO, "main", "Unloading all plugins\n"); |
16e384bb7fbf
[gaim-migrate @ 6664]
Christian Hammond <chipx86@chipx86.com>
parents:
6168
diff
changeset
|
122 gaim_plugins_destroy_all(); |
16e384bb7fbf
[gaim-migrate @ 6664]
Christian Hammond <chipx86@chipx86.com>
parents:
6168
diff
changeset
|
123 |
6485
70d5122bc3ff
[gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
6371
diff
changeset
|
124 gaim_blist_uninit(); |
70d5122bc3ff
[gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
6371
diff
changeset
|
125 gaim_conversations_uninit(); |
70d5122bc3ff
[gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
6371
diff
changeset
|
126 gaim_connections_uninit(); |
70d5122bc3ff
[gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
6371
diff
changeset
|
127 gaim_accounts_uninit(); |
70d5122bc3ff
[gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
6371
diff
changeset
|
128 |
70d5122bc3ff
[gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
6371
diff
changeset
|
129 gaim_signals_uninit(); |
70d5122bc3ff
[gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
6371
diff
changeset
|
130 |
6179
16e384bb7fbf
[gaim-migrate @ 6664]
Christian Hammond <chipx86@chipx86.com>
parents:
6168
diff
changeset
|
131 if (core->ui != NULL) { |
16e384bb7fbf
[gaim-migrate @ 6664]
Christian Hammond <chipx86@chipx86.com>
parents:
6168
diff
changeset
|
132 g_free(core->ui); |
16e384bb7fbf
[gaim-migrate @ 6664]
Christian Hammond <chipx86@chipx86.com>
parents:
6168
diff
changeset
|
133 core->ui = NULL; |
16e384bb7fbf
[gaim-migrate @ 6664]
Christian Hammond <chipx86@chipx86.com>
parents:
6168
diff
changeset
|
134 } |
16e384bb7fbf
[gaim-migrate @ 6664]
Christian Hammond <chipx86@chipx86.com>
parents:
6168
diff
changeset
|
135 |
16e384bb7fbf
[gaim-migrate @ 6664]
Christian Hammond <chipx86@chipx86.com>
parents:
6168
diff
changeset
|
136 g_free(core); |
16e384bb7fbf
[gaim-migrate @ 6664]
Christian Hammond <chipx86@chipx86.com>
parents:
6168
diff
changeset
|
137 |
16e384bb7fbf
[gaim-migrate @ 6664]
Christian Hammond <chipx86@chipx86.com>
parents:
6168
diff
changeset
|
138 _core = NULL; |
16e384bb7fbf
[gaim-migrate @ 6664]
Christian Hammond <chipx86@chipx86.com>
parents:
6168
diff
changeset
|
139 } |
16e384bb7fbf
[gaim-migrate @ 6664]
Christian Hammond <chipx86@chipx86.com>
parents:
6168
diff
changeset
|
140 |
6612
0f78db521e70
[gaim-migrate @ 7136]
Christian Hammond <chipx86@chipx86.com>
parents:
6564
diff
changeset
|
141 const char * |
0f78db521e70
[gaim-migrate @ 7136]
Christian Hammond <chipx86@chipx86.com>
parents:
6564
diff
changeset
|
142 gaim_core_get_version(void) |
0f78db521e70
[gaim-migrate @ 7136]
Christian Hammond <chipx86@chipx86.com>
parents:
6564
diff
changeset
|
143 { |
0f78db521e70
[gaim-migrate @ 7136]
Christian Hammond <chipx86@chipx86.com>
parents:
6564
diff
changeset
|
144 return VERSION; |
0f78db521e70
[gaim-migrate @ 7136]
Christian Hammond <chipx86@chipx86.com>
parents:
6564
diff
changeset
|
145 } |
0f78db521e70
[gaim-migrate @ 7136]
Christian Hammond <chipx86@chipx86.com>
parents:
6564
diff
changeset
|
146 |
6182
0342af6a8b36
[gaim-migrate @ 6668]
Christian Hammond <chipx86@chipx86.com>
parents:
6179
diff
changeset
|
147 void |
0342af6a8b36
[gaim-migrate @ 6668]
Christian Hammond <chipx86@chipx86.com>
parents:
6179
diff
changeset
|
148 gaim_core_mainloop_iteration(void) |
0342af6a8b36
[gaim-migrate @ 6668]
Christian Hammond <chipx86@chipx86.com>
parents:
6179
diff
changeset
|
149 { |
0342af6a8b36
[gaim-migrate @ 6668]
Christian Hammond <chipx86@chipx86.com>
parents:
6179
diff
changeset
|
150 g_main_context_iteration(g_main_context_default(), FALSE); |
0342af6a8b36
[gaim-migrate @ 6668]
Christian Hammond <chipx86@chipx86.com>
parents:
6179
diff
changeset
|
151 } |
0342af6a8b36
[gaim-migrate @ 6668]
Christian Hammond <chipx86@chipx86.com>
parents:
6179
diff
changeset
|
152 |
6179
16e384bb7fbf
[gaim-migrate @ 6664]
Christian Hammond <chipx86@chipx86.com>
parents:
6168
diff
changeset
|
153 const char * |
16e384bb7fbf
[gaim-migrate @ 6664]
Christian Hammond <chipx86@chipx86.com>
parents:
6168
diff
changeset
|
154 gaim_core_get_ui(void) |
16e384bb7fbf
[gaim-migrate @ 6664]
Christian Hammond <chipx86@chipx86.com>
parents:
6168
diff
changeset
|
155 { |
16e384bb7fbf
[gaim-migrate @ 6664]
Christian Hammond <chipx86@chipx86.com>
parents:
6168
diff
changeset
|
156 GaimCore *core = gaim_get_core(); |
16e384bb7fbf
[gaim-migrate @ 6664]
Christian Hammond <chipx86@chipx86.com>
parents:
6168
diff
changeset
|
157 |
16e384bb7fbf
[gaim-migrate @ 6664]
Christian Hammond <chipx86@chipx86.com>
parents:
6168
diff
changeset
|
158 g_return_val_if_fail(core != NULL, NULL); |
16e384bb7fbf
[gaim-migrate @ 6664]
Christian Hammond <chipx86@chipx86.com>
parents:
6168
diff
changeset
|
159 |
16e384bb7fbf
[gaim-migrate @ 6664]
Christian Hammond <chipx86@chipx86.com>
parents:
6168
diff
changeset
|
160 return core->ui; |
16e384bb7fbf
[gaim-migrate @ 6664]
Christian Hammond <chipx86@chipx86.com>
parents:
6168
diff
changeset
|
161 } |
16e384bb7fbf
[gaim-migrate @ 6664]
Christian Hammond <chipx86@chipx86.com>
parents:
6168
diff
changeset
|
162 |
16e384bb7fbf
[gaim-migrate @ 6664]
Christian Hammond <chipx86@chipx86.com>
parents:
6168
diff
changeset
|
163 GaimCore * |
16e384bb7fbf
[gaim-migrate @ 6664]
Christian Hammond <chipx86@chipx86.com>
parents:
6168
diff
changeset
|
164 gaim_get_core(void) |
16e384bb7fbf
[gaim-migrate @ 6664]
Christian Hammond <chipx86@chipx86.com>
parents:
6168
diff
changeset
|
165 { |
16e384bb7fbf
[gaim-migrate @ 6664]
Christian Hammond <chipx86@chipx86.com>
parents:
6168
diff
changeset
|
166 return _core; |
16e384bb7fbf
[gaim-migrate @ 6664]
Christian Hammond <chipx86@chipx86.com>
parents:
6168
diff
changeset
|
167 } |
16e384bb7fbf
[gaim-migrate @ 6664]
Christian Hammond <chipx86@chipx86.com>
parents:
6168
diff
changeset
|
168 |
16e384bb7fbf
[gaim-migrate @ 6664]
Christian Hammond <chipx86@chipx86.com>
parents:
6168
diff
changeset
|
169 void |
16e384bb7fbf
[gaim-migrate @ 6664]
Christian Hammond <chipx86@chipx86.com>
parents:
6168
diff
changeset
|
170 gaim_set_core_ui_ops(GaimCoreUiOps *ops) |
16e384bb7fbf
[gaim-migrate @ 6664]
Christian Hammond <chipx86@chipx86.com>
parents:
6168
diff
changeset
|
171 { |
16e384bb7fbf
[gaim-migrate @ 6664]
Christian Hammond <chipx86@chipx86.com>
parents:
6168
diff
changeset
|
172 _ops = ops; |
16e384bb7fbf
[gaim-migrate @ 6664]
Christian Hammond <chipx86@chipx86.com>
parents:
6168
diff
changeset
|
173 } |
16e384bb7fbf
[gaim-migrate @ 6664]
Christian Hammond <chipx86@chipx86.com>
parents:
6168
diff
changeset
|
174 |
16e384bb7fbf
[gaim-migrate @ 6664]
Christian Hammond <chipx86@chipx86.com>
parents:
6168
diff
changeset
|
175 GaimCoreUiOps * |
16e384bb7fbf
[gaim-migrate @ 6664]
Christian Hammond <chipx86@chipx86.com>
parents:
6168
diff
changeset
|
176 gaim_get_core_ui_ops(void) |
16e384bb7fbf
[gaim-migrate @ 6664]
Christian Hammond <chipx86@chipx86.com>
parents:
6168
diff
changeset
|
177 { |
16e384bb7fbf
[gaim-migrate @ 6664]
Christian Hammond <chipx86@chipx86.com>
parents:
6168
diff
changeset
|
178 return _ops; |
16e384bb7fbf
[gaim-migrate @ 6664]
Christian Hammond <chipx86@chipx86.com>
parents:
6168
diff
changeset
|
179 } |