Mercurial > pidgin
annotate src/multi.h @ 998:70c685de2be5
[gaim-migrate @ 1008]
this is going to make it easier to add more protocols. each protocol now sets up connections with protocol-specific data.
committer: Tailor Script <tailor@pidgin.im>
| author | Eric Warmenhoven <eric@warmenhoven.org> |
|---|---|
| date | Sun, 15 Oct 2000 03:50:32 +0000 |
| parents | 9523b772e546 |
| children | 1d8f05ea6bdf |
| rev | line source |
|---|---|
| 960 | 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; | |
|
981
7e231bc0018a
[gaim-migrate @ 991]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
964
diff
changeset
|
37 struct prpl *prpl; |
| 960 | 38 |
|
998
70c685de2be5
[gaim-migrate @ 1008]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
988
diff
changeset
|
39 /* all connections need an input watcher */ |
|
70c685de2be5
[gaim-migrate @ 1008]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
988
diff
changeset
|
40 int inpa; |
| 960 | 41 |
|
998
70c685de2be5
[gaim-migrate @ 1008]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
988
diff
changeset
|
42 /* all connections need a list of chats, even if they don't have chat */ |
|
964
2cd7b73e2c9a
[gaim-migrate @ 974]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
960
diff
changeset
|
43 GSList *buddy_chats; |
| 960 | 44 |
|
998
70c685de2be5
[gaim-migrate @ 1008]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
988
diff
changeset
|
45 /* each connection then can have its own protocol-specific data */ |
|
70c685de2be5
[gaim-migrate @ 1008]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
988
diff
changeset
|
46 void *proto_data; |
| 960 | 47 |
| 48 char username[64]; | |
| 49 char password[32]; | |
| 50 char user_info[2048]; | |
| 51 char g_screenname[64]; | |
| 52 int options; /* same as aim_user options */ | |
| 53 int keepalive; | |
| 54 /* stuff needed for per-connection idle times */ | |
| 55 int idle_timer; | |
| 56 time_t login_time; | |
| 57 time_t lastsent; | |
| 58 int is_idle; | |
|
988
9523b772e546
[gaim-migrate @ 998]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
981
diff
changeset
|
59 |
|
9523b772e546
[gaim-migrate @ 998]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
981
diff
changeset
|
60 /* stuff for a signin progress meter */ |
|
9523b772e546
[gaim-migrate @ 998]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
981
diff
changeset
|
61 GtkWidget *meter; |
|
9523b772e546
[gaim-migrate @ 998]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
981
diff
changeset
|
62 GtkWidget *progress; |
|
9523b772e546
[gaim-migrate @ 998]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
981
diff
changeset
|
63 GtkWidget *status; |
| 960 | 64 }; |
| 65 | |
| 66 /* now that we have our struct, we're going to need lots of them. Maybe even a list of them. */ | |
| 67 extern GSList *connections; | |
| 68 | |
| 69 struct gaim_connection *new_gaim_conn(int, char *, char *); | |
| 70 void destroy_gaim_conn(struct gaim_connection *); | |
| 71 | |
| 72 struct gaim_connection *find_gaim_conn_by_name(char *); | |
| 73 | |
| 74 void account_editor(GtkWidget *, GtkWidget *); | |
| 75 | |
| 76 void account_online(struct gaim_connection *); | |
| 77 void account_offline(struct gaim_connection *); | |
| 78 | |
| 79 void auto_login(); | |
| 80 | |
|
988
9523b772e546
[gaim-migrate @ 998]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
981
diff
changeset
|
81 void set_login_progress(struct gaim_connection *, float, char *); |
|
9523b772e546
[gaim-migrate @ 998]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
981
diff
changeset
|
82 void hide_login_progress(struct gaim_connection *, char *); |
|
9523b772e546
[gaim-migrate @ 998]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
981
diff
changeset
|
83 |
| 960 | 84 #endif /* _GAIMMULTI_H_ */ |
