]>
Commit | Line | Data |
---|---|---|
b562f484 | 1 | #ifndef __FAIMTEST_H__ |
2 | #define __FAIMTEST_H__ | |
3 | ||
4 | #include <aim.h> | |
5 | ||
6 | extern int keepgoing; | |
d410cf58 | 7 | extern aim_session_t aimsess; |
d2587300 | 8 | |
d410cf58 | 9 | /* This is kept in the aim_session_t and accessible by handlers. */ |
10 | struct faimtest_priv { | |
11 | char *aimbinarypath; | |
12 | char *screenname; | |
13 | char *password; | |
14 | char *server; | |
15 | char *proxy; | |
16 | char *proxyusername; | |
17 | char *proxypass; | |
18 | char *ohcaptainmycaptain; | |
19 | int connected; | |
b562f484 | 20 | |
d410cf58 | 21 | FILE *listingfile; |
22 | char *listingpath; | |
23 | ||
24 | fu8_t *buddyicon; | |
25 | int buddyiconlen; | |
26 | time_t buddyiconstamp; | |
27 | fu16_t buddyiconsum; | |
28 | }; | |
29 | ||
30 | /* login.c */ | |
31 | int login(aim_session_t *sess, const char *sn, const char *passwd); | |
32 | int logout(aim_session_t *sess); | |
33 | ||
34 | /* commands.c */ | |
b562f484 | 35 | void cmd_init(void); |
36 | void cmd_gotkey(void); | |
37 | void cmd_uninit(void); | |
38 | ||
d410cf58 | 39 | /* faimtest.c */ |
40 | int faimtest_parse_connerr(aim_session_t *sess, aim_frame_t *fr, ...); | |
41 | int faimtest_handleredirect(aim_session_t *sess, aim_frame_t *fr, ...); | |
42 | int faimtest_serverready(aim_session_t *sess, aim_frame_t *fr, ...); | |
43 | int faimtest_conncomplete(aim_session_t *sess, aim_frame_t *fr, ...); | |
44 | int faimtest_flapversion(aim_session_t *sess, aim_frame_t *fr, ...); | |
45 | int faimtest_init(void); | |
46 | char *dprintf_ctime(void); | |
47 | void addcb_bos(aim_session_t *sess, aim_conn_t *bosconn); | |
48 | ||
49 | /* ft.c */ | |
50 | void getfile_start(aim_session_t *sess, aim_conn_t *conn, const char *sn); | |
51 | void getfile_requested(aim_session_t *sess, aim_conn_t *conn, struct aim_userinfo_s *userinfo, struct aim_incomingim_ch2_args *args); | |
52 | void directim_start(aim_session_t *sess, aim_conn_t *conn, const char *sn); | |
53 | void directim_requested(aim_session_t *sess, aim_conn_t *conn, struct aim_userinfo_s *userinfo, struct aim_incomingim_ch2_args *args); | |
54 | ||
55 | /* chat.c */ | |
56 | void chatnav_redirect(aim_session_t *sess, const char *ip, const fu8_t *cookie); | |
57 | void chat_redirect(aim_session_t *sess, const char *ip, const fu8_t *cookie, const char *roomname, fu16_t exchange); | |
58 | ||
59 | #define DPRINTF_OUTSTREAM stdout | |
60 | #define dprintf(x) { \ | |
61 | fprintf(DPRINTF_OUTSTREAM, "%s %s: " x, dprintf_ctime(), "faimtest"); \ | |
62 | fflush(DPRINTF_OUTSTREAM); \ | |
63 | } | |
64 | #define dvprintf(x, y...) { \ | |
65 | fprintf(DPRINTF_OUTSTREAM, "%s %s: " x, dprintf_ctime(), "faimtest", y); \ | |
66 | fflush(DPRINTF_OUTSTREAM); \ | |
67 | } | |
68 | #define dinlineprintf(x) { \ | |
69 | fprintf(DPRINTF_OUTSTREAM, x); \ | |
70 | fflush(DPRINTF_OUTSTREAM); \ | |
71 | } | |
72 | #define dvinlineprintf(x, y...) { \ | |
73 | fprintf(DPRINTF_OUTSTREAM, x, y); \ | |
74 | fflush(DPRINTF_OUTSTREAM); \ | |
75 | } | |
76 | #define dperror(x) dvprintf("%s: %s\n", x, strerror(errno)); | |
77 | ||
78 | ||
b562f484 | 79 | #endif /* __FAIMTEST_H__ */ |