Mercurial > pidgin
comparison src/gaim.h @ 5872:059d95c67cda
[gaim-migrate @ 6304]
The legendary Header File Cleanup! Files now only include what they need.
This should reduce the number of files that must recompile when a header
file changes. It's a lot nicer. Trust me on it. I also added a couple new
header files. I hope I didn't break TOO much!
committer: Tailor Script <tailor@pidgin.im>
author | Christian Hammond <chipx86@chipx86.com> |
---|---|
date | Sat, 14 Jun 2003 23:21:02 +0000 |
parents | dbed8c87f750 |
children | 80e5258226f3 |
comparison
equal
deleted
inserted
replaced
5871:508adf90fbb9 | 5872:059d95c67cda |
---|---|
20 */ | 20 */ |
21 | 21 |
22 #ifndef _GAIM_H_ | 22 #ifndef _GAIM_H_ |
23 #define _GAIM_H_ | 23 #define _GAIM_H_ |
24 | 24 |
25 #ifdef HAVE_CONFIG_H | |
26 #include <config.h> | |
27 #endif | |
28 | |
29 #include "core.h" | |
30 #include "blist.h" | |
31 #include "ui.h" | |
32 #include "util.h" | |
33 | |
34 #define XPATCH BAD /* Because Kalla Said So */ | 25 #define XPATCH BAD /* Because Kalla Said So */ |
35 | 26 |
36 /* XXX CUI: when this is done being split, the only things below should be things | 27 #include "connection.h" |
37 * both the core and the uis depend on e.g. the protocol definitions, etc, and | |
38 * it won't include core.h or ui.h (i.e. it'll mostly be #define's) */ | |
39 | |
40 /* this is the basis of the CUI protocol. */ | |
41 #define CUI_TYPE_META 1 | |
42 #define CUI_TYPE_PLUGIN 2 | |
43 #define CUI_TYPE_USER 3 | |
44 #define CUI_TYPE_CONN 4 | |
45 #define CUI_TYPE_BUDDY 5 /* BUDDY_LIST, i.e., both groups and buddies */ | |
46 #define CUI_TYPE_MESSAGE 6 | |
47 #define CUI_TYPE_CHAT 7 | |
48 #define CUI_TYPE_REMOTE 8 | |
49 /* This is used to send commands to other UI's, | |
50 * like "Open new conversation" or "send IM". | |
51 * Even though there's much redundancy with the | |
52 * other CUI_TYPES, we're better keeping this stuff | |
53 * seperate because it's intended use is so different */ | |
54 | |
55 #define CUI_META_LIST 1 | |
56 /* 1 is always list; this is ignored by the core. | |
57 If we move to TCP this can be a keepalive */ | |
58 #define CUI_META_QUIT 2 | |
59 #define CUI_META_DETACH 3 | |
60 /* you don't need to send this, you can just close | |
61 the socket. the core will understand. */ | |
62 #define CUI_META_PING 4 | |
63 #define CUI_META_ACK 5 | |
64 | |
65 #define CUI_PLUGIN_LIST 1 | |
66 #define CUI_PLUGIN_LOAD 2 | |
67 #define CUI_PLUGIN_UNLOAD 3 | |
68 | |
69 #define CUI_USER_LIST 1 | |
70 #define CUI_USER_ADD 2 | |
71 #define CUI_USER_REMOVE 3 | |
72 #define CUI_USER_MODIFY 4 /* this handles moving them in the list too */ | |
73 #define CUI_USER_SIGNON 5 | |
74 | |
75 #define CUI_CONN_LIST 1 | |
76 #define CUI_CONN_PROGRESS 2 | |
77 #define CUI_CONN_ONLINE 3 | |
78 #define CUI_CONN_OFFLINE 4 /* this may send a "reason" for why it was killed */ | |
79 | |
80 #define CUI_BUDDY_LIST 1 | |
81 #define CUI_BUDDY_STATE 2 | |
82 /* notifies the UI of state changes; UI can use it to | |
83 request the current status from the core */ | |
84 #define CUI_BUDDY_ADD 3 | |
85 #define CUI_BUDDY_REMOVE 4 | |
86 #define CUI_BUDDY_MODIFY 5 | |
87 | |
88 #define CUI_MESSAGE_LIST 1 /* no idea */ | |
89 #define CUI_MESSAGE_SEND 2 | |
90 #define CUI_MESSAGE_RECV 3 | |
91 | |
92 #define CUI_CHAT_LIST 1 | |
93 #define CUI_CHAT_HISTORY 2 /* is this necessary? should we have one for IMs? */ | |
94 #define CUI_CHAT_JOIN 3 /* handles other people joining/parting too */ | |
95 #define CUI_CHAT_PART 4 | |
96 #define CUI_CHAT_SEND 5 | |
97 #define CUI_CHAT_RECV 6 | |
98 | |
99 #define CUI_REMOTE_CONNECTIONS 2 /* Get a list of gaim_connections */ | |
100 #define CUI_REMOTE_URI 3 /* Have the core handle aim:// URI's */ | |
101 #define CUI_REMOTE_BLIST 4 /* Return a copy of the buddy list */ | |
102 #define CUI_REMOTE_STATE 5 /* Given a buddy, return his presence. */ | |
103 #define CUI_REMOTE_NEW_CONVO 6 /* Must give a user, can give an optional message */ | |
104 #define CUI_REMOTE_SEND 7 /* Sends a message, a 'quiet' flag determines whether | |
105 * a convo window is displayed or not. */ | |
106 #define CUI_REMOTE_ADD_BUDDY 8 /* Adds buddy to list */ | |
107 #define CUI_REMOTE_REMOVE_BUDDY 9 /* Removes buddy from list */ | |
108 #define CUI_REMOTE_JOIN_CHAT 10 /* Joins a chat. */ | |
109 /* What else?? */ | |
110 | |
111 | |
112 #define IM_FLAG_AWAY 0x01 | |
113 #define IM_FLAG_CHECKBOX 0x02 | |
114 #define IM_FLAG_GAIMUSER 0x04 | |
115 | |
116 #define PERMIT_ALL 1 | |
117 #define PERMIT_NONE 2 | |
118 #define PERMIT_SOME 3 | |
119 #define DENY_SOME 4 | |
120 | |
121 #define NOT_TYPING 0 | |
122 #define TYPING 1 | |
123 #define TYPED 2 | |
124 | |
125 #define WFLAG_SEND 0x01 | |
126 #define WFLAG_RECV 0x02 | |
127 #define WFLAG_AUTO 0x04 | |
128 #define WFLAG_WHISPER 0x08 | |
129 #define WFLAG_FILERECV 0x10 | |
130 #define WFLAG_SYSTEM 0x20 | |
131 #define WFLAG_NICK 0x40 | |
132 #define WFLAG_NOLOG 0x80 | |
133 #define WFLAG_COLORIZE 0x100 | |
134 | |
135 #define AUTO_RESPONSE "<AUTO-REPLY> : " | |
136 | |
137 #define WEBSITE "http://gaim.sourceforge.net/" | |
138 | |
139 #ifdef ENABLE_NLS | |
140 # include <libintl.h> | |
141 # define _(x) gettext(x) | |
142 # ifdef gettext_noop | |
143 # define N_(String) gettext_noop (String) | |
144 # else | |
145 # define N_(String) (String) | |
146 # endif | |
147 #else | |
148 # define N_(String) (String) | |
149 # define _(x) (x) | |
150 #endif | |
151 | |
152 #define DEFAULT_INFO "Visit the Gaim website at <A HREF=\"http://gaim.sourceforge.net/\">http://gaim.sourceforge.net/</A>." | |
153 | |
154 enum log_event { | |
155 log_signon = 0, | |
156 log_signoff, | |
157 log_away, | |
158 log_back, | |
159 log_idle, | |
160 log_unidle, | |
161 log_quit | |
162 }; | |
163 | |
164 #define OPT_POUNCE_POPUP 0x001 | |
165 #define OPT_POUNCE_SEND_IM 0x002 | |
166 #define OPT_POUNCE_COMMAND 0x004 | |
167 #define OPT_POUNCE_SOUND 0x008 | |
168 | |
169 #define OPT_POUNCE_SIGNON 0x010 | |
170 #define OPT_POUNCE_UNAWAY 0x020 | |
171 #define OPT_POUNCE_UNIDLE 0x040 | |
172 #define OPT_POUNCE_TYPING 0x080 | |
173 #define OPT_POUNCE_SAVE 0x100 | |
174 | |
175 #define OPT_POUNCE_NOTIFY 0x200 | |
176 | |
177 /* These should all be runtime selectable */ | |
178 | |
179 #define MSG_LEN 2048 | |
180 /* The above should normally be the same as BUF_LEN, | |
181 * but just so we're explictly asking for the max message | |
182 * length. */ | |
183 #define BUF_LEN MSG_LEN | |
184 #define BUF_LONG BUF_LEN * 2 | |
185 | 28 |
186 /* Globals in main.c */ | 29 /* Globals in main.c */ |
187 extern int opt_away; | 30 extern int opt_away; |
188 extern char *opt_away_arg; | 31 extern char *opt_away_arg; |
189 extern char *opt_rcfile_arg; | 32 extern char *opt_rcfile_arg; |
223 struct g_url *parse_url(char *url); | 66 struct g_url *parse_url(char *url); |
224 | 67 |
225 /* Functions in idle.c */ | 68 /* Functions in idle.c */ |
226 extern gint check_idle(gpointer); | 69 extern gint check_idle(gpointer); |
227 | 70 |
228 /* Functions in server.c */ | |
229 /* input to serv */ | |
230 extern void serv_login(GaimAccount *); | |
231 extern void serv_close(GaimConnection *); | |
232 extern void serv_touch_idle(GaimConnection *); | |
233 extern int serv_send_im(GaimConnection *, char *, char *, int, int); | |
234 extern void serv_get_info(GaimConnection *, char *); | |
235 extern void serv_get_dir(GaimConnection *, char *); | |
236 extern void serv_set_idle(GaimConnection *, int); | |
237 extern void serv_set_info(GaimConnection *, char *); | |
238 extern void serv_set_away(GaimConnection *, char *, char *); | |
239 extern void serv_set_away_all(char *); | |
240 extern int serv_send_typing(GaimConnection *, char *, int); | |
241 extern void serv_change_passwd(GaimConnection *, const char *, const char *); | |
242 extern void serv_add_buddy(GaimConnection *, const char *); | |
243 extern void serv_add_buddies(GaimConnection *, GList *); | |
244 extern void serv_remove_buddy(GaimConnection *, char *, char *); | |
245 extern void serv_remove_buddies(GaimConnection *, GList *, char *); | |
246 extern void serv_add_permit(GaimConnection *, const char *); | |
247 extern void serv_add_deny(GaimConnection *, const char *); | |
248 extern void serv_rem_permit(GaimConnection *, const char *); | |
249 extern void serv_rem_deny(GaimConnection *, const char *); | |
250 extern void serv_set_permit_deny(GaimConnection *); | |
251 extern void serv_warn(GaimConnection *, char *, int); | |
252 extern void serv_set_dir(GaimConnection *, const char *, const char *, const char *, const char *, const char *, const char *, const char *, int); | |
253 extern void serv_dir_search(GaimConnection *, const char *, const char *, const char *, const char *, const char *, const char *, const char *, const char *); | |
254 extern void serv_join_chat(GaimConnection *, GHashTable *); | |
255 extern void serv_chat_invite(GaimConnection *, int, const char *, const char *); | |
256 extern void serv_chat_leave(GaimConnection *, int); | |
257 extern void serv_chat_whisper(GaimConnection *, int, char *, char *); | |
258 extern int serv_chat_send(GaimConnection *, int, char *); | |
259 extern void serv_got_popup(char *, char *, int, int); | |
260 extern void serv_get_away(GaimConnection *, const char *); | |
261 extern void serv_alias_buddy(struct buddy *); | |
262 extern void serv_move_buddy(struct buddy *, struct group *, struct group *); | |
263 extern void serv_rename_group(GaimConnection *, struct group *, const char *); | |
264 extern void serv_set_buddyicon(GaimConnection *, const char *); | |
265 | |
266 /* Functions in log.h */ | |
267 extern FILE *open_log_file (const char *, int); | |
268 extern void system_log(enum log_event, GaimConnection *, struct buddy *, int); | |
269 extern void rm_log(struct log_conversation *); | |
270 extern struct log_conversation *find_log_info(const char *); | |
271 extern void update_log_convs(); | |
272 extern void save_convo(GtkWidget *save, GaimConversation *c); | |
273 extern char *html_logize(const char *p); | |
274 | 71 |
275 /*------------------------------------------------------------------------*/ | 72 /*------------------------------------------------------------------------*/ |
276 /* Multi-Entry dialog and vCard dialog support */ | 73 /* Multi-Entry dialog and vCard dialog support */ |
277 /*------------------------------------------------------------------------*/ | 74 /*------------------------------------------------------------------------*/ |
278 | 75 |