#ifndef	_FILES_H
#define	_FILES_H

#define	FTP_READ	1	/* Read files */
#define	FTP_CREATE	2	/* Create new files */
#define	FTP_WRITE	4	/* Overwrite or delete existing files */
#define	AX25_CMD	8	/* AX.25 gateway operation allowed */
#define	TELNET_CMD	16	/* Telnet gateway operation allowed */
#define	NETROM_CMD	32	/* NET/ROM gateway operation allowed */
#define	SYSOP_CMD	64	/* Remote sysop access allowed */
#define	EXCLUDED_CMD	128	/* This user is banned from the BBS */
#define	PPP_ACCESS_PRIV	0x0100	/* Priv bit for PPP connection */
#define	PPP_PWD_LOOKUP	0x0200	/* Priv bit for peerID/pass lookup */
#define FILE_PATH_SIZE 128

/* External definitions for configuration-dependent file names set in
 * files.c
 */
extern char *Startup;	/* Initialization file */
extern char *Userfile;	/* Authorized FTP users and passwords */
extern char *Hostfile;	/* Remote FTP user and password */
extern char *Maillog;	/* mail log */
extern char *Mailspool;	/* Incoming mail */
extern char *Mailqdir;	/* Outgoing mail spool */
extern char *Mailqueue;	/* Outgoing mail work files */
extern char *Routeqdir;	/* queue for router */
extern char *Alias;	/* the alias file */
extern char *Group;	/* the group file */
extern char *Dfile;	/* Domain cache */
extern char *Fdir;	/* Finger info directory */
extern char *Fdbase;        /* Finger database file */
extern char *Quotes;		/* List of quotes of the day */
extern char *Tutor;		/* Tutorial Server directory */
extern char *Info;		/* Information Center directory */
extern char *News;		/* News Center directory */
extern char *UserCmds;		/* BBS CMD directory */
extern char *UCmdsHelp;		/* BBS CMD help file */
extern char *Spool;		/* Spool directory */
extern char *Arealist;		/* List of message areas */
extern char *AreaSlist;		/* List of message areas for sysops */
extern char *Helpdir;		/* Mailbox help file directory */
extern char *Rewritefile;	/* Address rewrite file */
extern char *Signature;		/* Mail signature file directory */
extern char *Popusers;		/* POP user and password file */
extern char *Newsdir;		/* News messages and NNTP data */
extern char *Forwardfile;	/* Mail forwarding file */
extern char *Historyfile;	/* Message ID history file */
extern char *UDefaults;     /* User preference file */
extern char *UDefbak;       /* Backup of preference file */
extern char *Netromfile;    /* Netrom node save file */
extern char *Onexit;        /* Cmds executed on exit */
extern char *Expirefile;    /* Message expiration control file */
extern char *ConfInfo;       /* Conference user info */
extern char *ConfHlp;        /* Conference Help File */
extern char *NetControlHlp;	/* Help file for Net Control functions */
extern char *EditorHelp;	/* Mini-Editor Help file */
extern char *FTPHelp;           /* FTP Help file */
extern char *Ftpmotd;		/* FTP message of the day */
extern char *MOTDfile;		/* Mbox MOTD file */
extern char *MOTDsysfile;	/* Mbox MOTD file for SYSOPs */
extern char *NEWUSERfile;	/* New Mbox User file */
extern char *WhitePagesBBS;	/* White Pages BBS log file */
extern char *WhitePages;	/* White Pages user log file */
extern char *Active;
extern char *Pointer;
extern char *NInfo;
extern char *Nhelp;
extern char *History;
extern char *Forward;
extern char *Poll;
extern char *MBOXHelp;		/* MBOX Help file */
extern char *CommandHelp;	/* Command Session Help file */
extern char *VersionFile;

#ifdef UNIX
/* Session manager defaults */
extern char *Trace_sessmgr;	/* Session manager for Trace session */
extern char *Command_sessmgr;	/* Session manager for Command session */

/* Colors */
extern char *trace_bg;
extern char *trace_port_fg;
extern char *trace_hdr_fg;
extern char *trace_data_fg;
extern char *command_bg;
extern char *command_prompt;
extern char *command_fg;
#endif

#ifdef DELEGATE
extern char *DelegateFile;	/* delegation data file */
#endif

void initroot __ARGS((char *root));
long userlogin __ARGS((char *name,char *pass,char **path,int len,int *pwdignore));
char *rootdircat __ARGS((char *filename));
char *userlookup __ARGS((char *username,char **password,char **directory,
			long *permission,int32 *ip_address));
int permcheck __ARGS((char *path,int perms,int op,char *file));

#endif	/* _FILES_H */

