/********************************************************************
 * lindner
 * 3.2
 * 1993/09/21 04:16:15
 * /home/mudhoney/GopherSrc/CVS/gopher+/gopherd/ftp.h,v
 * Exp
 *
 * Paul Lindner, University of Minnesota CIS.
 *
 * Copyright 1991, 1992 by the Regents of the University of Minnesota
 * see the file "Copyright" in the distribution for conditions of use.
 *********************************************************************
 * MODULE: ftp.h
 * Declartions for Routines to translate gopher protocol to ftp protocol.
 *********************************************************************
 * Revision History:
 * ftp.h,v
 * Revision 3.2  1993/09/21  04:16:15  lindner
 * Fix for macro declarations
 *
 *
 *********************************************************************/


struct FTP_struct {
     int  control_sock;
     int  data_sock;
     char mode;
     int  Ftptype;
};

typedef struct FTP_struct FTP;

/** Control socket access routines **/
#define FTPsetControl(ftp,num) ((ftp)->control_sock=(num))
#define FTPgetControl(ftp)     ((ftp)->control_sock)

/** Data socket access routines **/
#define FTPsetData(ftp,num)    ((ftp)->data_sock=(num))
#define FTPgetData(ftp)        ((ftp)->data_sock)


/** Ftp type access routines **/
#define FTPsetType(ftp,num)    ((ftp)->Ftptype=(num))
#define FTPgetType(ftp)        ((ftp)->Ftptype)

#define FTP_UNKNOWN 0
#define FTP_VMS     1
#define FTP_NOVELL  2
#define FTP_UNIX    3
#define FTP_MTS     4
#define FTP_WINNT   5
#define FTP_MACOS   6


/** Type command **/
#define FTPtype(ftp,type)      FTPcommand(ftp,"TYPE %c",type,201)
#define FTPbinary(ftp)         FTPtype(ftp,'I')
#define FTPascii(ftp)          FTPtype(ftp,'A')


/** Chdir **/
#define FTPchdir(ftp,dir)         FTPcommand(ftp,"CWD %s",dir,299)

void FTPcleanup();
void FTPerrorMessage();
void FTPinfoMessage();
void FTPcloseData();
