4 * Copyright (C) 1998-1999, Mark Spencer <markster@marko.net>
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 2 of the License, or
9 * (at your option) any later version.
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
16 * You should have received a copy of the GNU General Public License
17 * along with this program; if not, write to the Free Software
18 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
38 /* Really user states are controlled by the PRPLs now. We just use this for event_away */
39 #define UC_UNAVAILABLE 1
47 /* prpls can use this to save information about the user,
48 * like which server to connect to, etc */
49 char proto_opt
[7][256];
54 struct gaim_connection
*gc
;
74 event_chat_buddy_join
,
75 event_chat_buddy_leave
,
81 event_new_conversation
,
84 event_im_displayed_sent
,
85 event_im_displayed_rcvd
,
86 event_chat_send_invite
,
88 /* any others? it's easy to add... */
104 struct gaim_callback
{
106 enum gaim_event event
;
113 #define BUDDY_ALIAS_MAXLEN 388 /* because MSN names can be 387 characters */
116 int edittype
; /* XXX CUI: this is really a GUI function and we need to put this in ui.h */
118 char show
[BUDDY_ALIAS_MAXLEN
];
124 guint caps
; /* woohoo! */
125 void *proto_data
; /* what a hack */
126 struct gaim_connection
*gc
; /* the connection it belongs to */
130 int edittype
; /* XXX CUI: this is really a GUI function and we need to put this in ui.h */
133 struct gaim_connection
*gc
; /* the connection it belongs to */
136 /* Globals in core.c */
139 /* Globals in plugins.c */
140 extern GList
*plugins
;
141 extern GList
*callbacks
;
143 /* Functions in buddy.c */
144 extern struct buddy
*find_buddy(struct gaim_connection
*, char *);
145 extern struct group
*find_group(struct gaim_connection
*, char *);
146 extern struct group
*find_group_by_buddy(struct gaim_connection
*, char *);
147 extern struct buddy
*add_buddy(struct gaim_connection
*, char *, char *, char *);
148 extern void remove_buddy(struct gaim_connection
*, struct group
*, struct buddy
*);
149 extern struct group
*add_group(struct gaim_connection
*, char *);
150 extern void remove_group(struct gaim_connection
*, struct group
*);
151 extern void do_export(struct gaim_connection
*);
152 extern void do_import(struct gaim_connection
*, char *);
153 extern int bud_list_cache_exists(struct gaim_connection
*);
154 extern void toc_build_config(struct gaim_connection
*, char *, int len
, gboolean
);
155 extern void parse_toc_buddy_list(struct gaim_connection
*, char *);
156 extern void signoff_blocked(struct gaim_connection
*);
158 /* Functions in core.c */
159 extern gint
UI_write(struct UI
*, guchar
*, int);
160 extern void UI_build_write(struct UI
*, guchar
, guchar
, ...);
161 extern void UI_broadcast(guchar
*data
, int);
162 extern void UI_build_broadcast(guchar
, guchar
, ...);
163 /* Don't ever use these; when gaim-core is done these will be
164 * merged into the core's main() and won't be called directly */
165 extern int core_main();
166 extern void core_quit();
168 /* Functions in gaimrc.c */
169 extern void load_prefs();
170 extern void save_prefs();
172 /* Functions in perl.c */
174 extern void perl_autoload();
175 extern void perl_end();
176 extern int perl_event(enum gaim_event
, void *, void *, void *, void *);
177 extern int perl_load_file(char *);
178 extern void unload_perl_scripts();
179 extern void list_perl_scripts();
182 /* Functions in plugins.c */
184 extern struct gaim_plugin
*load_plugin(char *);
185 extern void unload_plugin(struct gaim_plugin
*);
186 extern struct gaim_plugin
*reload_plugin(struct gaim_plugin
*);
187 extern void gaim_signal_connect(GModule
*, enum gaim_event
, void *, void *);
188 extern void gaim_signal_disconnect(GModule
*, enum gaim_event
, void *);
189 extern void gaim_plugin_unload(GModule
*);
190 extern void remove_all_plugins();
192 extern int plugin_event(enum gaim_event
, void *, void *, void *, void *);
193 extern char *event_name(enum gaim_event
);
195 /* Functions in server.c */
196 extern void serv_got_update(struct gaim_connection
*, char *, int, int, time_t, time_t, int, guint
);
197 extern void serv_got_im(struct gaim_connection
*, char *, char *, guint32
, time_t, gint
);
198 extern void serv_got_typing(struct gaim_connection
*, char *, int);
199 extern void serv_got_typing_stopped(struct gaim_connection
*, char *);
200 extern void serv_got_eviled(struct gaim_connection
*, char *, int);
201 extern void serv_got_chat_invite(struct gaim_connection
*, char *, char *, char *, GList
*);
202 extern struct conversation
*serv_got_joined_chat(struct gaim_connection
*, int, char *);
203 extern void serv_got_chat_left(struct gaim_connection
*, int);
204 extern void serv_got_chat_in(struct gaim_connection
*, int, char *, int, char *, time_t);
205 extern void serv_finish_login();
207 #endif /* _CORE_H_ */