1 #ifndef proxy_h 2 #define proxy_h 3 4 /* 5 ** Copyright 2004 Double Precision, Inc. 6 ** See COPYING for distribution information. 7 */ 8 9 static const char proxy_h_rcsid[]="$Id: proxy.h,v 1.2 2004/10/30 20:47:56 mrsam Exp $"; 10 11 struct proxyinfo { 12 const char *host; 13 int port; 14 15 int (*connected_func)(int, const char *, void *); 16 void *void_arg; 17 }; 18 19 int connect_proxy(struct proxyinfo *); 20 void proxyloop(int); 21 22 struct proxybuf { 23 char buffer[256]; 24 char *bufptr; 25 size_t bufleft; 26 }; 27 28 int proxy_readline(int fd, struct proxybuf *pb, 29 char *linebuf, 30 size_t linebuflen, 31 int imapmode); 32 int proxy_write(int fd, const char *hostname, 33 const char *buf, size_t buf_len); 34 35 #endif 36