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
27 /* ok. now the fun begins. first we create a connection structure */
28 struct gaim_connection
{
29 int edittype
; /* XXX CUI: this is ui-specific and should be removed */
31 /* we need to do either oscar or TOC */
32 /* we make this as an int in case if we want to add more protocols later */
40 /* all connections need an input watcher */
43 /* all connections need a list of chats, even if they don't have chat */
46 /* each connection then can have its own protocol-specific data */
49 struct gaim_account
*account
;
52 char displayname
[128];
56 /* stuff needed for per-connection idle times */
59 time_t login_time_official
;
63 char *away
; /* set by protos, is NULL when not away, or set *
64 * to "" or a custom message when away */
65 char *away_state
; /* updated by serv_set_away, keeps the last set *
67 int is_auto_away
; /* used by idle.c */
69 int evil
; /* warning level for AIM (why is this here?) */
70 gboolean wants_to_die
; /* defaults to FALSE */
73 #define OPT_CONN_HTML 0x00000001
74 /* set this flag on a gc if you want serv_got_im to autoreply when away */
75 #define OPT_CONN_AUTO_RESP 0x00000002
77 struct proto_user_opt
{
83 struct proto_actions_menu
{
85 void (*callback
)(struct gaim_connection
*);
86 struct gaim_connection
*gc
;
89 struct proto_buddy_menu
{
91 void (*callback
)(struct gaim_connection
*, char *);
92 struct gaim_connection
*gc
;
95 struct proto_chat_entry
{
103 /* now that we have our struct, we're going to need lots of them. Maybe even a list of them. */
104 extern GSList
*connections
;
106 /* number of accounts that are currently in the process of connecting */
107 extern int connecting_count
;
109 struct gaim_account
*gaim_account_new(const char *, int, int);
110 struct gaim_connection
*new_gaim_conn(struct gaim_account
*);
111 void destroy_gaim_conn(struct gaim_connection
*);
113 void regenerate_user_list();
115 void account_online(struct gaim_connection
*);
116 void account_offline(struct gaim_connection
*);
120 void set_login_progress(struct gaim_connection
*, float, char *);
121 void hide_login_progress(struct gaim_connection
*, char *);
122 void hide_login_progress_notice(struct gaim_connection
*, char *);
123 void hide_login_progress_error(struct gaim_connection
*, char *);
125 #endif /* _MULTI_H_ */