comparison src/multi.h @ 960:fa681641643d

[gaim-migrate @ 970] *** MULTIPLE-CONNECTIONS *** committer: Tailor Script <tailor@pidgin.im>
author Eric Warmenhoven <eric@warmenhoven.org>
date Tue, 10 Oct 2000 00:02:02 +0000
parents
children 2cd7b73e2c9a
comparison
equal deleted inserted replaced
959:034d5d1d53eb 960:fa681641643d
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 _GAIMMULTI_H_
23 #define _GAIMMULTI_H_
24
25 #include <gtk/gtk.h>
26 #include "gaim.h"
27 #include "aim.h"
28
29 #define PROTO_TOC 0
30 #define PROTO_OSCAR 1
31
32 /* ok. now the fun begins. first we create a connection structure */
33 struct gaim_connection {
34 /* we need to do either oscar or TOC */
35 /* we make this as an int in case if we want to add more protocols later */
36 int protocol;
37
38 /* let's do the oscar-specific stuff first since i know it better */
39 struct aim_session_t *oscar_sess;
40 struct aim_conn_t *oscar_conn; /* we don't particularly need this since it
41 will be in oscar_sess, but it's useful to
42 still keep our own reference to it */
43 int inpa; /* do we really need this? it's for the BOS conn */
44 int cnpa; /* chat nav input watcher */
45 int paspa; /* for changing passwords, which doesn't work yet */
46
47 int create_exchange;
48 char *create_name;
49
50 GSList *oscar_chats;
51
52 /* that's all we need for oscar. now then, on to TOC.... */
53 int toc_fd;
54 int seqno;
55 int state;
56 /* int inpa; input watcher, dual-declared for oscar as well */
57
58 /* now we'll do stuff that both of them need */
59 char username[64];
60 char password[32];
61 char user_info[2048];
62 char g_screenname[64];
63 int options; /* same as aim_user options */
64 int keepalive;
65 /* stuff needed for per-connection idle times */
66 int idle_timer;
67 time_t login_time;
68 time_t lastsent;
69 int is_idle;
70 };
71
72 /* now that we have our struct, we're going to need lots of them. Maybe even a list of them. */
73 extern GSList *connections;
74
75 struct gaim_connection *new_gaim_conn(int, char *, char *);
76 void destroy_gaim_conn(struct gaim_connection *);
77
78 struct gaim_connection *find_gaim_conn_by_name(char *);
79
80 void account_editor(GtkWidget *, GtkWidget *);
81
82 void account_online(struct gaim_connection *);
83 void account_offline(struct gaim_connection *);
84
85 void auto_login();
86
87 #endif /* _GAIMMULTI_H_ */