1593
|
1 /*
|
|
2 * aim_internal.h -- prototypes/structs for the guts of libfaim
|
|
3 *
|
|
4 */
|
|
5
|
|
6 #ifdef FAIM_INTERNAL
|
|
7 #ifndef __AIM_INTERNAL_H__
|
|
8 #define __AIM_INTERNAL_H__ 1
|
|
9
|
|
10 faim_internal unsigned long aim_genericreq_n(struct aim_session_t *, struct aim_conn_t *conn, u_short family, u_short subtype);
|
|
11 faim_internal unsigned long aim_genericreq_l(struct aim_session_t *, struct aim_conn_t *conn, u_short family, u_short subtype, u_long *);
|
|
12 faim_internal unsigned long aim_genericreq_s(struct aim_session_t *, struct aim_conn_t *conn, u_short family, u_short subtype, u_short *);
|
|
13
|
|
14 faim_internal int aim_authkeyparse(struct aim_session_t *sess, struct command_rx_struct *command);
|
|
15 faim_internal void aim_rxqueue_cleanbyconn(struct aim_session_t *sess, struct aim_conn_t *conn);
|
|
16 faim_internal int aim_recv(int fd, void *buf, size_t count);
|
|
17
|
|
18 faim_internal int aim_parse_unknown(struct aim_session_t *, struct command_rx_struct *command, ...);
|
|
19 faim_internal int aim_get_command_rendezvous(struct aim_session_t *sess, struct aim_conn_t *conn);
|
|
20
|
|
21 faim_internal int aim_tx_sendframe(struct aim_session_t *sess, struct command_tx_struct *cur);
|
|
22 faim_internal unsigned int aim_get_next_txseqnum(struct aim_conn_t *);
|
|
23 faim_internal struct command_tx_struct *aim_tx_new(struct aim_session_t *sess, struct aim_conn_t *conn, unsigned char framing, int chan, int datalen);
|
|
24 faim_internal int aim_tx_enqueue(struct aim_session_t *, struct command_tx_struct *);
|
|
25 faim_internal int aim_tx_printqueue(struct aim_session_t *);
|
|
26 faim_internal int aim_parse_hostonline(struct aim_session_t *sess, struct command_rx_struct *command, ...);
|
|
27 faim_internal int aim_parse_hostversions(struct aim_session_t *sess, struct command_rx_struct *command, ...);
|
|
28 faim_internal int aim_parse_accountconfirm(struct aim_session_t *sess, struct command_rx_struct *command);
|
|
29 faim_internal int aim_parse_infochange(struct aim_session_t *sess, struct command_rx_struct *command);
|
|
30 faim_internal int aim_tx_cleanqueue(struct aim_session_t *, struct aim_conn_t *);
|
|
31
|
|
32 faim_internal rxcallback_t aim_callhandler(struct aim_session_t *sess, struct aim_conn_t *conn, u_short family, u_short type);
|
|
33
|
|
34 /*
|
|
35 * Generic SNAC structure. Rarely if ever used.
|
|
36 */
|
|
37 struct aim_snac_t {
|
|
38 u_long id;
|
|
39 u_short family;
|
|
40 u_short type;
|
|
41 u_short flags;
|
|
42 void *data;
|
|
43 time_t issuetime;
|
|
44 struct aim_snac_t *next;
|
|
45 };
|
|
46 faim_internal void aim_initsnachash(struct aim_session_t *sess);
|
|
47 faim_internal unsigned long aim_newsnac(struct aim_session_t *, struct aim_snac_t *newsnac);
|
|
48 faim_internal unsigned long aim_cachesnac(struct aim_session_t *sess, const unsigned short family, const unsigned short type, const unsigned short flags, const void *data, const int datalen);
|
|
49 faim_internal struct aim_snac_t *aim_remsnac(struct aim_session_t *, u_long id);
|
|
50 faim_internal int aim_cleansnacs(struct aim_session_t *, int maxage);
|
|
51 faim_internal int aim_putsnac(u_char *, int, int, int, u_long);
|
|
52
|
|
53 faim_internal void aim_connrst(struct aim_session_t *);
|
|
54 faim_internal struct aim_conn_t *aim_conn_getnext(struct aim_session_t *);
|
|
55 faim_internal struct aim_conn_t *aim_cloneconn(struct aim_session_t *sess, struct aim_conn_t *src);
|
|
56
|
|
57 faim_internal int aim_oft_buildheader(unsigned char *,struct aim_fileheader_t *);
|
|
58 faim_internal int aim_listenestablish(u_short);
|
|
59 faim_internal int aim_tx_destroy(struct command_tx_struct *);
|
|
60
|
|
61 faim_internal int aim_authparse(struct aim_session_t *, struct command_rx_struct *);
|
|
62 faim_internal int aim_handleredirect_middle(struct aim_session_t *, struct command_rx_struct *, ...);
|
|
63 faim_internal int aim_parse_unknown(struct aim_session_t *, struct command_rx_struct *, ...);
|
|
64 faim_internal int aim_parse_generalerrs(struct aim_session_t *, struct command_rx_struct *command, ...);
|
|
65 faim_internal int aim_parsemotd_middle(struct aim_session_t *sess, struct command_rx_struct *command, ...);
|
|
66
|
|
67 /* these are used by aim_*_clientready */
|
|
68 #define AIM_TOOL_JAVA 0x0001
|
|
69 #define AIM_TOOL_MAC 0x0002
|
|
70 #define AIM_TOOL_WIN16 0x0003
|
|
71 #define AIM_TOOL_WIN32 0x0004
|
|
72 #define AIM_TOOL_MAC68K 0x0005
|
|
73 #define AIM_TOOL_MACPPC 0x0006
|
|
74 #define AIM_TOOL_NEWWIN 0x0010
|
|
75 struct aim_tool_version {
|
|
76 unsigned short group;
|
|
77 unsigned short version;
|
|
78 unsigned short tool;
|
|
79 unsigned short toolversion;
|
|
80 };
|
|
81
|
|
82 faim_internal int aim_parse_ratechange_middle(struct aim_session_t *sess, struct command_rx_struct *command);
|
|
83
|
|
84 faim_internal int aim_parse_evilnotify_middle(struct aim_session_t *sess, struct command_rx_struct *command);
|
|
85 faim_internal int aim_parse_msgack_middle(struct aim_session_t *sess, struct command_rx_struct *command);
|
|
86
|
|
87 faim_internal int aim_parse_incoming_im_middle(struct aim_session_t *, struct command_rx_struct *);
|
|
88 faim_internal int aim_parse_outgoing_im_middle(struct aim_session_t *, struct command_rx_struct *);
|
|
89 faim_internal int aim_parse_msgerror_middle(struct aim_session_t *, struct command_rx_struct *);
|
|
90 faim_internal int aim_negchan_middle(struct aim_session_t *sess, struct command_rx_struct *command);
|
|
91 faim_internal int aim_parse_bosrights(struct aim_session_t *sess, struct command_rx_struct *command, ...);
|
|
92 faim_internal int aim_parse_missedcall(struct aim_session_t *sess, struct command_rx_struct *command);
|
|
93
|
|
94 extern u_char aim_caps[8][16];
|
|
95 faim_internal unsigned short aim_getcap(struct aim_session_t *sess, unsigned char *capblock, int buflen);
|
|
96 faim_internal int aim_putcap(unsigned char *capblock, int buflen, u_short caps);
|
|
97
|
|
98 faim_internal int aim_cachecookie(struct aim_session_t *sess, struct aim_msgcookie_t *cookie);
|
|
99 faim_internal struct aim_msgcookie_t *aim_uncachecookie(struct aim_session_t *sess, unsigned char *cookie, int type);
|
|
100 faim_internal struct aim_msgcookie_t *aim_mkcookie(unsigned char *, int, void *);
|
|
101 faim_internal struct aim_msgcookie_t *aim_checkcookie(struct aim_session_t *, const unsigned char *, const int);
|
|
102 faim_internal int aim_freecookie(struct aim_session_t *sess, struct aim_msgcookie_t *cookie);
|
|
103 faim_internal int aim_msgcookie_gettype(int reqclass);
|
|
104 faim_internal int aim_cookie_free(struct aim_session_t *sess, struct aim_msgcookie_t *cookie);
|
|
105
|
|
106 faim_internal int aim_extractuserinfo(struct aim_session_t *sess, unsigned char *, struct aim_userinfo_s *);
|
|
107 faim_internal int aim_parse_userinfo_middle(struct aim_session_t *, struct command_rx_struct *);
|
|
108 faim_internal int aim_parse_oncoming_middle(struct aim_session_t *, struct command_rx_struct *);
|
|
109 faim_internal int aim_parse_offgoing_middle(struct aim_session_t *, struct command_rx_struct *);
|
|
110 faim_internal int aim_putuserinfo(u_char *buf, int buflen, struct aim_userinfo_s *info);
|
|
111 faim_internal int aim_parse_locateerr(struct aim_session_t *sess, struct command_rx_struct *command);
|
|
112
|
|
113 faim_internal int aim_parse_buddyrights(struct aim_session_t *sess, struct command_rx_struct *command, ...);
|
|
114
|
|
115 faim_internal unsigned long aim_parse_searcherror(struct aim_session_t *, struct command_rx_struct *);
|
|
116 faim_internal unsigned long aim_parse_searchreply(struct aim_session_t *, struct command_rx_struct *);
|
|
117
|
|
118 faim_internal int aim_chat_readroominfo(u_char *buf, struct aim_chat_roominfo *outinfo);
|
|
119 faim_internal int aim_chat_parse_infoupdate(struct aim_session_t *sess, struct command_rx_struct *command);
|
|
120 faim_internal int aim_chat_parse_joined(struct aim_session_t *sess, struct command_rx_struct *command);
|
|
121 faim_internal int aim_chat_parse_leave(struct aim_session_t *sess, struct command_rx_struct *command);
|
|
122 faim_internal int aim_chat_parse_incoming(struct aim_session_t *sess, struct command_rx_struct *command);
|
|
123 faim_internal int aim_chatnav_parse_info(struct aim_session_t *sess, struct command_rx_struct *command);
|
|
124
|
|
125 faim_internal void faimdprintf(struct aim_session_t *sess, int dlevel, const char *format, ...);
|
|
126
|
|
127 /* why the hell wont cpp let you use #error inside #define's? */
|
|
128 /* isn't it single-pass? so the #error would get passed to the compiler --jbm */
|
|
129 #define printf() printf called inside libfaim
|
|
130 #define sprintf() unbounded sprintf used inside libfaim
|
|
131
|
|
132 #endif /* __AIM_INTERNAL_H__ */
|
|
133 #endif /* FAIM_INTERNAL */
|