Mercurial > pidgin.yaz
diff src/prpl.c @ 981:7e231bc0018a
[gaim-migrate @ 991]
I think I need a Pepsi.
committer: Tailor Script <tailor@pidgin.im>
author | Eric Warmenhoven <eric@warmenhoven.org> |
---|---|
date | Fri, 13 Oct 2000 07:24:40 +0000 |
parents | |
children | 91b7377e7b45 |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/prpl.c Fri Oct 13 07:24:40 2000 +0000 @@ -0,0 +1,49 @@ +/* + * gaim + * + * Copyright (C) 1998-1999, Mark Spencer <markster@marko.net> + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * + */ + +#include "prpl.h" +extern struct prpl *toc_init(); +extern struct prpl *oscar_init(); + +GSList *protocols = NULL; + +struct prpl *find_prpl(int prot) +{ + GSList *e = protocols; + struct prpl *r; + + while (e) { + r = (struct prpl *)e->data; + if (r->protocol == prot) + return r; + e = e->next; + } + + return NULL; +} + +void static_proto_init() +{ + protocols = g_slist_append(protocols, toc_init()); +#ifndef DYNAMIC_OSCAR + protocols = g_slist_append(protocols, oscar_init()); +#endif +}