comparison src/core.h @ 2417:5473c8c5378d

[gaim-migrate @ 2430] boo-yah! committer: Tailor Script <tailor@pidgin.im>
author Eric Warmenhoven <eric@warmenhoven.org>
date Wed, 03 Oct 2001 09:48:33 +0000
parents
children b4f2a53c0ee5
comparison
equal deleted inserted replaced
2416:61b816a7b467 2417:5473c8c5378d
1 /*
2 * gaim
3 *
4 * Copyright (C) 1998-1999, Mark Spencer <markster@marko.net>
5 *
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.
10 *
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.
15 *
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
19 *
20 */
21
22 #ifndef _CORE_H_
23 #define _CORE_H_
24
25 #ifdef HAVE_CONFIG_H
26 #include <config.h>
27 #endif
28
29 #include <stdio.h>
30 #include <time.h>
31 #include <glib.h>
32 #ifdef GAIM_PLUGINS
33 #include <gmodule.h>
34 #endif
35
36 #include "multi.h"
37
38 enum gaim_event {
39 event_signon = 0,
40 event_signoff,
41 event_away,
42 event_back,
43 event_im_recv,
44 event_im_send,
45 event_buddy_signon,
46 event_buddy_signoff,
47 event_buddy_away,
48 event_buddy_back,
49 event_buddy_idle,
50 event_buddy_unidle,
51 event_blist_update,
52 event_chat_invited,
53 event_chat_join,
54 event_chat_leave,
55 event_chat_buddy_join,
56 event_chat_buddy_leave,
57 event_chat_recv,
58 event_chat_send,
59 event_warned,
60 event_error,
61 event_quit,
62 event_new_conversation,
63 event_set_info,
64 event_draw_menu,
65 event_im_displayed_sent,
66 event_im_displayed_rcvd,
67 event_chat_send_invite,
68 /* any others? it's easy to add... */
69 };
70
71 #ifdef GAIM_PLUGINS
72
73 struct gaim_plugin {
74 GModule *handle;
75 char *name;
76 char *description;
77 };
78
79 struct gaim_callback {
80 GModule *handle;
81 enum gaim_event event;
82 void *function;
83 void *data;
84 };
85
86 extern GList *plugins;
87 extern GList *callbacks;
88 #endif
89
90 struct buddy {
91 int edittype; /* CUI: this is really a GUI function and we need to put this in ui.h */
92 char name[80];
93 char show[80];
94 int present;
95 int evil;
96 time_t signon;
97 time_t idle;
98 int uc;
99 gushort caps; /* woohoo! */
100 void *proto_data; /* what a hack */
101 struct gaim_connection *gc; /* the connection it belongs to */
102 };
103
104 struct group {
105 int edittype; /* CUI: this is really a GUI function and we need to put this in ui.h */
106 char name[80];
107 GSList *members;
108 struct gaim_connection *gc; /* the connection it belongs to */
109 };
110
111 /* Functions in buddy.c */
112 extern struct buddy *find_buddy(struct gaim_connection *, char *);
113 extern struct group *find_group(struct gaim_connection *, char *);
114 extern struct group *find_group_by_buddy(struct gaim_connection *, char *);
115 extern struct buddy *add_buddy(struct gaim_connection *, char *, char *, char *);
116 extern void remove_buddy(struct gaim_connection *, struct group *, struct buddy *);
117 extern struct group *add_group(struct gaim_connection *, char *);
118 extern void remove_group(struct gaim_connection *, struct group *);
119 extern void do_export(struct gaim_connection *);
120 extern void do_import(struct gaim_connection *, char *);
121 extern int bud_list_cache_exists(struct gaim_connection *);
122
123 /* Functions in server.c */
124 extern void serv_got_update(struct gaim_connection *, char *, int, int, time_t, time_t, int, gushort);
125 extern void serv_got_im(struct gaim_connection *, char *, char *, guint32, time_t);
126 extern void serv_got_eviled(struct gaim_connection *, char *, int);
127 extern void serv_got_chat_invite(struct gaim_connection *, char *, char *, char *, GList *);
128 extern struct conversation *serv_got_joined_chat(struct gaim_connection *, int, char *);
129 extern void serv_got_chat_left(struct gaim_connection *, int);
130 extern void serv_got_chat_in(struct gaim_connection *, int, char *, int, char *, time_t);
131 extern void serv_finish_login();
132
133 #endif /* _CORE_H_ */