comparison src/gaim.h @ 1106:5bc8fdacd2cb

[gaim-migrate @ 1116] lots of changes. buddy.c: just in general tried to get things to work better. moving things in the edit list window and signing off should be handled better in the main buddy list window (watch out for flashes). gaim.h: removed toc-specific things and moved them to toc.c and rvous.c as needed. gtkhtml.c: possible fix for AOL 6.0 problems (I wasn't able to reproduce the problem before or after the fix, but i fixed what i think might have been causing the problem). multi.c: moved LOGIN_STEPS from gaim.h here and actually use it now oscar.c: moved an oscar-specific struct definition from gaim.h here and also handle problems better perl.c: fix for stupid problem rvous.c: first pass at attempt to be able to remove toc.c and rvous.c (though this will never happen; gaim will support toc as long as aol does) without cruft. gaim is now only dependent on toc.c and rvous.c for toc_build_config and parse_toc_buddy_list, which gaim needs to save and read its buddy list. toc.c: rewrote the signin process so that the read()'s won't block. it's not actually a non-blocking read; it's just that it won't ever get to the read until there's data to be read (thanks to the gdk_input watcher). this means the cancel button should work after it's connected, but it's still not a non-blocking connect. committer: Tailor Script <tailor@pidgin.im>
author Eric Warmenhoven <eric@warmenhoven.org>
date Mon, 20 Nov 2000 07:24:18 +0000
parents d7944415b1cc
children c73736fa0b7c
comparison
equal deleted inserted replaced
1105:c964df5b2a84 1106:5bc8fdacd2cb
44 3. toc_signon(); 44 3. toc_signon();
45 4. toc_wait_signon(); 45 4. toc_wait_signon();
46 5. toc_wait_config(); 46 5. toc_wait_config();
47 6. actually done.. 47 6. actually done..
48 */ 48 */
49
50 #define STATE_OFFLINE 0
51 #define STATE_FLAPON 1
52 #define STATE_SIGNON_REQUEST 2
53 #define STATE_SIGNON_ACK 3
54 #define STATE_CONFIG 4
55 #define STATE_ONLINE 5
56 49
57 #define BROWSER_NETSCAPE 0 50 #define BROWSER_NETSCAPE 0
58 #define BROWSER_KFM 1 51 #define BROWSER_KFM 1
59 #define BROWSER_MANUAL 2 52 #define BROWSER_MANUAL 2
60 /*#define BROWSER_INTERNAL 3*/ 53 /*#define BROWSER_INTERNAL 3*/
265 }; 258 };
266 259
267 struct chat_room { 260 struct chat_room {
268 char name[128]; 261 char name[128];
269 int exchange; 262 int exchange;
270 };
271
272 struct chat_connection {
273 char *name;
274 int fd; /* this is redundant since we have the conn below */
275 struct aim_conn_t *conn;
276 int inpa;
277 }; 263 };
278 264
279 struct debug_window { 265 struct debug_window {
280 GtkWidget *window; 266 GtkWidget *window;
281 GtkWidget *entry; 267 GtkWidget *entry;
338 324
339 /* something to distinguish */ 325 /* something to distinguish */
340 gboolean is_chat; 326 gboolean is_chat;
341 }; 327 };
342 328
343 struct file_header {
344 char magic[4]; /* 0 */
345 short hdrlen; /* 4 */
346 short hdrtype; /* 6 */
347 char bcookie[8]; /* 8 */
348 short encrypt; /* 16 */
349 short compress; /* 18 */
350 short totfiles; /* 20 */
351 short filesleft; /* 22 */
352 short totparts; /* 24 */
353 short partsleft; /* 26 */
354 long totsize; /* 28 */
355 long size; /* 32 */
356 long modtime; /* 36 */
357 long checksum; /* 40 */
358 long rfrcsum; /* 44 */
359 long rfsize; /* 48 */
360 long cretime; /* 52 */
361 long rfcsum; /* 56 */
362 long nrecvd; /* 60 */
363 long recvcsum; /* 64 */
364 char idstring[32]; /* 68 */
365 char flags; /* 100 */
366 char lnameoffset; /* 101 */
367 char lsizeoffset; /* 102 */
368 char dummy[69]; /* 103 */
369 char macfileinfo[16]; /* 172 */
370 short nencode; /* 188 */
371 short nlanguage; /* 190 */
372 char name[64]; /* 192 */
373 /* 256 */
374 };
375
376 struct file_transfer { 329 struct file_transfer {
377 GtkWidget *window; 330 GtkWidget *window;
378 char *cookie; 331 char *cookie;
379 char *ip; 332 char *ip;
380 char *message; 333 char *message;
388 int fd; 341 int fd;
389 char UID[2048]; 342 char UID[2048];
390 struct gaim_connection *gc; 343 struct gaim_connection *gc;
391 }; 344 };
392 345
393 struct sflap_hdr {
394 unsigned char ast;
395 unsigned char type;
396 unsigned short seqno;
397 unsigned short len;
398 };
399
400 struct signon {
401 unsigned int ver;
402 unsigned short tag;
403 unsigned short namelen;
404 char username[80];
405 };
406
407 #define LOGIN_STEPS 5
408
409 #define CONVERSATION_TITLE "Gaim - Conversation with %s" 346 #define CONVERSATION_TITLE "Gaim - Conversation with %s"
410 #define LOG_CONVERSATION_TITLE "Gaim - Conversation with %s (logged)" 347 #define LOG_CONVERSATION_TITLE "Gaim - Conversation with %s (logged)"
411 348
412 #define VOICE_UID "09461341-4C7F-11D1-8222-444553540000" 349 #define VOICE_UID "09461341-4C7F-11D1-8222-444553540000"
413 #define FILE_SEND_UID "09461343-4C7F-11D1-8222-444553540000" 350 #define FILE_SEND_UID "09461343-4C7F-11D1-8222-444553540000"
416 #define FILE_GET_UID "09461348-4C7F-11D1-8222-444553540000" 353 #define FILE_GET_UID "09461348-4C7F-11D1-8222-444553540000"
417 354
418 #define AOL_SRCHSTR "/community/aimcheck.adp/url=" 355 #define AOL_SRCHSTR "/community/aimcheck.adp/url="
419 356
420 /* These should all be runtime selectable */ 357 /* These should all be runtime selectable */
421
422 #define TOC_HOST "toc.oscar.aol.com"
423 #define TOC_PORT 9898
424 #define AUTH_HOST "login.oscar.aol.com"
425 #define AUTH_PORT 5190
426 #define LANGUAGE "english"
427 358
428 #define MSG_LEN 2048 359 #define MSG_LEN 2048
429 /* The above should normally be the same as BUF_LEN, 360 /* The above should normally be the same as BUF_LEN,
430 * but just so we're explictly asking for the max message 361 * but just so we're explictly asking for the max message
431 * length. */ 362 * length. */
432 #define BUF_LEN MSG_LEN 363 #define BUF_LEN MSG_LEN
433 #define BUF_LONG BUF_LEN * 2 364 #define BUF_LONG BUF_LEN * 2
434
435
436 #define TYPE_SIGNON 1
437 #define TYPE_DATA 2
438 #define TYPE_ERROR 3
439 #define TYPE_SIGNOFF 4
440 #define TYPE_KEEPALIVE 5
441
442 #define FLAPON "FLAPON\r\n\r\n"
443
444 #define ROAST "Tic/Toc"
445 365
446 366
447 #define BUDDY_ARRIVE 0 367 #define BUDDY_ARRIVE 0
448 #define BUDDY_LEAVE 1 368 #define BUDDY_LEAVE 1
449 #define RECEIVE 2 369 #define RECEIVE 2
463 /* Globals in dialog.c */ 383 /* Globals in dialog.c */
464 extern char fontface[64]; 384 extern char fontface[64];
465 extern GdkColor bgcolor; 385 extern GdkColor bgcolor;
466 extern GdkColor fgcolor; 386 extern GdkColor fgcolor;
467 extern int smiley_array[FACE_TOTAL]; 387 extern int smiley_array[FACE_TOTAL];
468
469 /* Globals in network.c */
470
471 /* Globals in toc.c */
472 388
473 /* Globals in aim.c */ 389 /* Globals in aim.c */
474 extern GList *log_conversations; 390 extern GList *log_conversations;
475 extern GList *buddy_pounces; 391 extern GList *buddy_pounces;
476 extern GSList *away_messages; 392 extern GSList *away_messages;
655 extern void serv_join_chat(struct gaim_connection *, int, char *); 571 extern void serv_join_chat(struct gaim_connection *, int, char *);
656 extern void serv_chat_invite(struct gaim_connection *, int, char *, char *); 572 extern void serv_chat_invite(struct gaim_connection *, int, char *, char *);
657 extern void serv_chat_leave(struct gaim_connection *, int); 573 extern void serv_chat_leave(struct gaim_connection *, int);
658 extern void serv_chat_whisper(struct gaim_connection *, int, char *, char *); 574 extern void serv_chat_whisper(struct gaim_connection *, int, char *, char *);
659 extern void serv_chat_send(struct gaim_connection *, int, char *); 575 extern void serv_chat_send(struct gaim_connection *, int, char *);
576 extern void update_keepalive(struct gaim_connection *, gboolean);
660 577
661 /* output from serv */ 578 /* output from serv */
662 extern void serv_got_update(struct gaim_connection *, char *, int, int, time_t, time_t, int, gushort); 579 extern void serv_got_update(struct gaim_connection *, char *, int, int, time_t, time_t, int, gushort);
663 extern void serv_got_im(struct gaim_connection *, char *, char *, int); 580 extern void serv_got_im(struct gaim_connection *, char *, char *, int);
664 extern void serv_got_eviled(struct gaim_connection *, char *, int); 581 extern void serv_got_eviled(struct gaim_connection *, char *, int);
693 extern void do_normal(GtkWidget *, GtkWidget *); 610 extern void do_normal(GtkWidget *, GtkWidget *);
694 extern void do_big(GtkWidget *, GtkWidget *); 611 extern void do_big(GtkWidget *, GtkWidget *);
695 extern void set_font_face(char *, struct conversation *); 612 extern void set_font_face(char *, struct conversation *);
696 extern void redo_convo_menus(); 613 extern void redo_convo_menus();
697 614
698 /* Functions in network.c */
699 extern unsigned int *get_address(char *);
700 extern int connect_address(unsigned int, unsigned short);
701
702 /* Functions in oscar.c */
703 extern void oscar_login(struct aim_user *);
704 extern void oscar_close(struct gaim_connection *);
705 extern struct chat_connection *find_oscar_chat(struct gaim_connection *, char *name);
706 extern void update_keepalive(struct gaim_connection *, gboolean);
707
708 /* Functions in toc.c */ 615 /* Functions in toc.c */
709 extern void toc_close();
710 extern void toc_login(struct aim_user *);
711 extern int toc_wait_signon(struct gaim_connection *);
712 extern char *toc_wait_config(struct gaim_connection *);
713 extern int sflap_send(struct gaim_connection *, char *, int , int );
714 extern void parse_toc_buddy_list(struct gaim_connection *, char *, int); 616 extern void parse_toc_buddy_list(struct gaim_connection *, char *, int);
715
716 617
717 /* Functions in buddy.c */ 618 /* Functions in buddy.c */
718 extern void destroy_buddy(); 619 extern void destroy_buddy();
719 extern void update_button_pix(); 620 extern void update_button_pix();
720 extern void toggle_show_empty_groups(); 621 extern void toggle_show_empty_groups();