comparison src/multi.h @ 5563:9eb5b13fd412

[gaim-migrate @ 5965] Just a taste of what's coming. Standard "This won't compile" thing. Plugin authors, you're going to hate me, but that's okay, because I have friends too! It's really late. My brain resembles that of fish swimming in jello pudding with neon lights flying around chanting musicals. I'm not on drugs. I'm just that tired. committer: Tailor Script <tailor@pidgin.im>
author Christian Hammond <chipx86@chipx86.com>
date Fri, 30 May 2003 09:38:29 +0000
parents df653f6f2978
children 187c740f2a4e
comparison
equal deleted inserted replaced
5562:3c8d34574601 5563:9eb5b13fd412
20 */ 20 */
21 21
22 #ifndef _MULTI_H_ 22 #ifndef _MULTI_H_
23 #define _MULTI_H_ 23 #define _MULTI_H_
24 24
25 #include "account.h"
25 #include "core.h" 26 #include "core.h"
26 #include "plugin.h" 27 #include "plugin.h"
27 28
29 #if 0
28 /* ok. now the fun begins. first we create a connection structure */ 30 /* ok. now the fun begins. first we create a connection structure */
29 struct gaim_connection { 31 GaimConnection {
30 int edittype; /* XXX CUI: this is ui-specific and should be removed */ 32 int edittype; /* XXX CUI: this is ui-specific and should be removed */
31 33
32 /* we need to do either oscar or TOC */ 34 /* we need to do either oscar or TOC */
33 /* we make this as an int in case if we want to add more protocols later */ 35 /* we make this as an int in case if we want to add more protocols later */
34 int protocol; 36 int protocol;
45 GSList *buddy_chats; 47 GSList *buddy_chats;
46 48
47 /* each connection then can have its own protocol-specific data */ 49 /* each connection then can have its own protocol-specific data */
48 void *proto_data; 50 void *proto_data;
49 51
50 struct gaim_account *account; 52 GaimAccount *account;
51 53
52 char username[64]; 54 char username[64];
53 char displayname[128]; 55 char displayname[128];
54 char password[32]; 56 char password[32];
55 guint keepalive; 57 guint keepalive;
68 int is_auto_away; /* used by idle.c */ 70 int is_auto_away; /* used by idle.c */
69 71
70 int evil; /* warning level for AIM (why is this here?) */ 72 int evil; /* warning level for AIM (why is this here?) */
71 gboolean wants_to_die; /* defaults to FALSE */ 73 gboolean wants_to_die; /* defaults to FALSE */
72 }; 74 };
75 #endif
73 76
74 #define OPT_CONN_HTML 0x00000001 77 #define OPT_CONN_HTML 0x00000001
75 /* set this flag on a gc if you want serv_got_im to autoreply when away */ 78 /* set this flag on a gc if you want serv_got_im to autoreply when away */
76 #define OPT_CONN_AUTO_RESP 0x00000002 79 #define OPT_CONN_AUTO_RESP 0x00000002
77 80
87 int pos; 90 int pos;
88 }; 91 };
89 92
90 struct proto_actions_menu { 93 struct proto_actions_menu {
91 char *label; 94 char *label;
92 void (*callback)(struct gaim_connection *); 95 void (*callback)(GaimConnection *);
93 struct gaim_connection *gc; 96 GaimConnection *gc;
94 }; 97 };
95 98
96 struct proto_buddy_menu { 99 struct proto_buddy_menu {
97 char *label; 100 char *label;
98 void (*callback)(struct gaim_connection *, const char *); 101 void (*callback)(GaimConnection *, const char *);
99 struct gaim_connection *gc; 102 GaimConnection *gc;
100 }; 103 };
101 104
102 struct proto_chat_entry { 105 struct proto_chat_entry {
103 char *label; 106 char *label;
104 char *identifier; 107 char *identifier;
106 gboolean is_int; 109 gboolean is_int;
107 int min; 110 int min;
108 int max; 111 int max;
109 }; 112 };
110 113
111 /* now that we have our struct, we're going to need lots of them. Maybe even a list of them. */ 114 void set_login_progress(GaimConnection *, float, char *);
112 extern GSList *connections; 115 void hide_login_progress(GaimConnection *, char *);
113 116 void hide_login_progress_notice(GaimConnection *, char *);
114 /* number of accounts that are currently in the process of connecting */ 117 void hide_login_progress_error(GaimConnection *, char *);
115 extern int connecting_count;
116
117 struct gaim_account *gaim_account_new(const char *, int, int);
118 struct gaim_connection *new_gaim_conn(struct gaim_account *);
119 void destroy_gaim_conn(struct gaim_connection *);
120
121 void regenerate_user_list();
122
123 void account_online(struct gaim_connection *);
124 void account_offline(struct gaim_connection *);
125
126 void auto_login();
127
128 void set_login_progress(struct gaim_connection *, float, char *);
129 void hide_login_progress(struct gaim_connection *, char *);
130 void hide_login_progress_notice(struct gaim_connection *, char *);
131 void hide_login_progress_error(struct gaim_connection *, char *);
132 GSList *gaim_get_connections();
133 118
134 #endif /* _MULTI_H_ */ 119 #endif /* _MULTI_H_ */