]> andersk Git - libfaim.git/blob - utils/faimtest/faimtest.h
- Wed Oct 3 11:07:22 PDT 2001
[libfaim.git] / utils / faimtest / faimtest.h
1 #ifndef __FAIMTEST_H__
2 #define __FAIMTEST_H__
3
4 #include <aim.h> 
5
6 extern int keepgoing;
7 extern aim_session_t aimsess;
8
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;
20
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 */
35 void cmd_init(void);
36 void cmd_gotkey(void);
37 void cmd_uninit(void);
38
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, aim_userinfo_t *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, aim_userinfo_t *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
79 #endif /* __FAIMTEST_H__ */
This page took 0.041401 seconds and 5 git commands to generate.