Mercurial > pidgin
comparison src/prpl.c @ 1000:91b7377e7b45
[gaim-migrate @ 1010]
Plugins work again, I think. There may still be some bugginess.
committer: Tailor Script <tailor@pidgin.im>
author | Eric Warmenhoven <eric@warmenhoven.org> |
---|---|
date | Mon, 16 Oct 2000 20:11:18 +0000 |
parents | 7e231bc0018a |
children | 17cea517fd90 |
comparison
equal
deleted
inserted
replaced
999:0b5db8cdd30f | 1000:91b7377e7b45 |
---|---|
18 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | 18 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
19 * | 19 * |
20 */ | 20 */ |
21 | 21 |
22 #include "prpl.h" | 22 #include "prpl.h" |
23 extern struct prpl *toc_init(); | 23 |
24 extern struct prpl *oscar_init(); | 24 extern void toc_init(struct prpl *); |
25 extern void oscar_init(struct prpl *); | |
25 | 26 |
26 GSList *protocols = NULL; | 27 GSList *protocols = NULL; |
27 | 28 |
28 struct prpl *find_prpl(int prot) | 29 struct prpl *find_prpl(int prot) |
29 { | 30 { |
38 } | 39 } |
39 | 40 |
40 return NULL; | 41 return NULL; |
41 } | 42 } |
42 | 43 |
44 void load_protocol(proto_init pi) | |
45 { | |
46 struct prpl *p = g_new0(struct prpl, 1); | |
47 pi(p); | |
48 if (find_prpl(p->protocol)) | |
49 g_free(p); | |
50 else | |
51 protocols = g_slist_append(protocols, p); | |
52 } | |
53 | |
43 void static_proto_init() | 54 void static_proto_init() |
44 { | 55 { |
45 protocols = g_slist_append(protocols, toc_init()); | 56 load_protocol(toc_init); |
46 #ifndef DYNAMIC_OSCAR | 57 #ifndef DYNAMIC_OSCAR |
47 protocols = g_slist_append(protocols, oscar_init()); | 58 load_protocol(oscar_init); |
48 #endif | 59 #endif |
49 } | 60 } |