comparison libfaim/faim/aim.h @ 715:58106806ac2b

[gaim-migrate @ 725] yay committer: Tailor Script <tailor@pidgin.im>
author Eric Warmenhoven <eric@warmenhoven.org>
date Fri, 18 Aug 2000 00:21:53 +0000
parents 525c566741da
children 8e7ad10b5f26
comparison
equal deleted inserted replaced
714:d7557252bfb1 715:58106806ac2b
38 #endif 38 #endif
39 39
40 #ifdef FAIM_USEPTHREADS 40 #ifdef FAIM_USEPTHREADS
41 #include <pthread.h> 41 #include <pthread.h>
42 #define faim_mutex_t pthread_mutex_t 42 #define faim_mutex_t pthread_mutex_t
43 #define faim_mutex_init pthread_mutex_init 43 #define faim_mutex_init(x) pthread_mutex_init(x, NULL)
44 #define faim_mutex_lock pthread_mutex_lock 44 #define faim_mutex_lock(x) pthread_mutex_lock(x)
45 #define faim_mutex_unlock pthread_mutex_unlock 45 #define faim_mutex_unlock(x) pthread_mutex_unlock(x)
46 #define faim_mutex_destroy pthread_mutex_destroy 46 #define faim_mutex_destroy(x) pthread_mutex_destroy(x)
47 #elif defined(FAIM_USEFAKELOCKS) 47 #elif defined(FAIM_USEFAKELOCKS)
48 /* 48 /*
49 * For platforms without pthreads, we also assume 49 * For platforms without pthreads, we also assume
50 * we're not linking against a threaded app. Which 50 * we're not linking against a threaded app. Which
51 * means we don't have to do real locking. The 51 * means we don't have to do real locking. The
304 304
305 /* 305 /*
306 * Outstanding snac handling 306 * Outstanding snac handling
307 * 307 *
308 * XXX: Should these be per-connection? -mid 308 * XXX: Should these be per-connection? -mid
309 **/ 309 */
310 struct aim_snac_t *outstanding_snacs; 310 struct aim_snac_t *snac_hash[FAIM_SNAC_HASH_SIZE];
311 faim_mutex_t snac_hash_locks[FAIM_SNAC_HASH_SIZE];
311 u_long snac_nextid; 312 u_long snac_nextid;
312 313
313 struct aim_msgcookie_t *msgcookies; 314 struct aim_msgcookie_t *msgcookies;
314 }; 315 };
315 316
455 u_short flags; 456 u_short flags;
456 void *data; 457 void *data;
457 time_t issuetime; 458 time_t issuetime;
458 struct aim_snac_t *next; 459 struct aim_snac_t *next;
459 }; 460 };
461 void aim_initsnachash(struct aim_session_t *sess);
460 u_long aim_newsnac(struct aim_session_t *, struct aim_snac_t *newsnac); 462 u_long aim_newsnac(struct aim_session_t *, struct aim_snac_t *newsnac);
461 struct aim_snac_t *aim_remsnac(struct aim_session_t *, u_long id); 463 struct aim_snac_t *aim_remsnac(struct aim_session_t *, u_long id);
462 int aim_cleansnacs(struct aim_session_t *, int maxage); 464 int aim_cleansnacs(struct aim_session_t *, int maxage);
463 int aim_putsnac(u_char *, int, int, int, u_long); 465 int aim_putsnac(u_char *, int, int, int, u_long);
464 466
508 int aim_handleredirect_middle(struct aim_session_t *, struct command_rx_struct *, ...); 510 int aim_handleredirect_middle(struct aim_session_t *, struct command_rx_struct *, ...);
509 int aim_parse_unknown(struct aim_session_t *, struct command_rx_struct *, ...); 511 int aim_parse_unknown(struct aim_session_t *, struct command_rx_struct *, ...);
510 int aim_parse_last_bad(struct aim_session_t *, struct command_rx_struct *, ...); 512 int aim_parse_last_bad(struct aim_session_t *, struct command_rx_struct *, ...);
511 int aim_parse_generalerrs(struct aim_session_t *, struct command_rx_struct *command, ...); 513 int aim_parse_generalerrs(struct aim_session_t *, struct command_rx_struct *command, ...);
512 int aim_parsemotd_middle(struct aim_session_t *sess, struct command_rx_struct *command, ...); 514 int aim_parsemotd_middle(struct aim_session_t *sess, struct command_rx_struct *command, ...);
515 int aim_parse_ratechange_middle(struct aim_session_t *sess, struct command_rx_struct *command);
516 int aim_parse_msgack_middle(struct aim_session_t *sess, struct command_rx_struct *command);
513 517
514 /* aim_im.c */ 518 /* aim_im.c */
515 struct aim_directim_priv { 519 struct aim_directim_priv {
516 unsigned char cookie[8]; 520 unsigned char cookie[8];
517 char sn[MAXSNLEN+1]; 521 char sn[MAXSNLEN+1];