]> sjero.net Git - wget/blobdiff - src/ftp.h
[svn] Removed ftpparse dependencies. New parser for VMS listings. MacOS
[wget] / src / ftp.h
index 064e6354fdc8940aa14f16d9b97c890d311d46e2..b7c4d254c6af379ae4060d1cefbcfb89b7ded143 100644 (file)
--- a/src/ftp.h
+++ b/src/ftp.h
@@ -1,5 +1,5 @@
 /* Declarations for FTP support.
-   Copyright (C) 1995, 1996, 1997 Free Software Foundation, Inc.
+   Copyright (C) 1995, 1996, 1997, 2000 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
 /* Need it for struct rbuf.  */
 #include "rbuf.h"
 
+/* System types. */
+enum stype
+{
+  ST_UNIX,
+  ST_VMS,
+  ST_WINNT,
+  ST_MACOS,
+  ST_OTHER
+};
+  
 uerr_t ftp_response PARAMS ((struct rbuf *, char **));
 uerr_t ftp_login PARAMS ((struct rbuf *, const char *, const char *));
 uerr_t ftp_port PARAMS ((struct rbuf *));
@@ -30,6 +40,8 @@ uerr_t ftp_cwd PARAMS ((struct rbuf *, const char *));
 uerr_t ftp_retr PARAMS ((struct rbuf *, const char *));
 uerr_t ftp_rest PARAMS ((struct rbuf *, long));
 uerr_t ftp_list PARAMS ((struct rbuf *, const char *));
+uerr_t ftp_syst PARAMS ((struct rbuf *, enum stype *));
+uerr_t ftp_pwd PARAMS ((struct rbuf *, char **));
 
 struct urlinfo;
 
@@ -63,7 +75,7 @@ struct fileinfo
 };
 
 /* Commands for FTP functions.  */
-enum command
+enum wget_ftp_command
 {
   DO_LOGIN      = 0x0001,      /* Connect and login to the server.  */
   DO_CWD        = 0x0002,      /* Change current directory.  */
@@ -72,7 +84,7 @@ enum command
   LEAVE_PENDING = 0x0010       /* Do not close the socket.  */
 };
 
-enum fstatus
+enum wget_ftp_fstatus
 {
   NOTHING       = 0x0000,      /* Nothing done yet.  */
   ON_YOUR_OWN   = 0x0001,      /* The ftp_loop_internal sets the
@@ -87,9 +99,11 @@ typedef struct
   int cmd;                     /* command code */
   struct rbuf rbuf;            /* control connection buffer */
   long dltime;                 /* time of the download */
+  enum stype rs;               /* remote system reported by ftp server */ 
+  char *id;                    /* initial directory */
 } ccon;
 
-struct fileinfo *ftp_parse_ls PARAMS ((const char *));
+struct fileinfo *ftp_parse_ls PARAMS ((const char *, enum stype));
 uerr_t ftp_loop PARAMS ((struct urlinfo *, int *));
 
 uerr_t ftp_index (const char *, struct urlinfo *, struct fileinfo *);