Traslated some chmod mgs related (for win32 support? not shure)
[midnight-commander.git] / vfs / ftpfs.h
blobddfb1f0790c85f880a1e100c1fe937ec22945bf6
1 /* ftpfs.h */
3 /* $Id$ */
5 #if !defined(__FTPFS_H)
6 #define __FTPFS_H
8 #include "xdirentry.h"
10 struct direntry
12 char *name;
13 int count;
14 char *linkname;
15 char *local_filename, *remote_filename;
16 int local_is_temp:1;
17 int freshly_created:1;
18 struct stat local_stat;
19 struct stat s;
20 struct stat *l_stat;
21 struct connection *bucket;
23 int data_sock; /* For linear_ operations */
24 int linear_state;
25 #define LS_NONLIN 0 /* Not using linear access at all */
26 #define LS_LINEAR_CLOSED 1 /* Using linear access, but not open, yet */
27 #define LS_LINEAR_OPEN 2 /* Using linear access, open */
30 struct dir
32 int count;
33 struct timeval timestamp;
34 char *remote_path;
35 struct linklist *file_list;
36 int symlink_status;
39 /* valid values for dir->symlink_status */
40 #define FTPFS_NO_SYMLINKS 0
41 #define FTPFS_UNRESOLVED_SYMLINKS 1
42 #define FTPFS_RESOLVED_SYMLINKS 2
43 #define FTPFS_RESOLVING_SYMLINKS 3
45 struct connection {
46 char *host;
47 char *user;
48 char *current_directory;
49 char *home;
50 char *updir;
51 char *password;
52 int port;
53 int sock;
54 struct linklist *dcache;
55 ino_t __inode_counter;
56 int lock;
57 int failed_on_login; /* used to pass the failure reason to upper levels */
58 int use_proxy; /* use a proxy server */
59 int use_source_route;
60 int use_passive_connection;
61 int remote_is_amiga; /* No leading slash allowed for AmiTCP (Amiga) */
62 int isbinary;
63 int cwd_defered; /* current_directory was changed but CWD command hasn't
64 been sent yet */
65 int strict_rfc959_list_cmd; /* ftp server doesn't understand
66 "LIST -la <path>"; use "CWD <path>"/
67 "LIST" instead */
70 #define qhost(b) (b)->host
71 #define quser(b) (b)->user
72 #define qcdir(b) (b)->current_directory
73 #define qport(b) (b)->port
74 #define qsock(b) (b)->sock
75 #define qlock(b) (b)->lock
76 #define qdcache(b) (b)->dcache
77 #define qhome(b) (b)->home
78 #define qupdir(b) (b)->updir
79 #define qproxy(b) (b)->use_proxy
81 /* Increased since now we may use C-r to reread the contents */
82 #define FTPFS_DIRECTORY_TIMEOUT 30 * 60
84 #define DO_RESOLVE_SYMLINK 1
85 #define DO_OPEN 2
86 #define DO_FREE_RESOURCE 4
88 extern char *ftpfs_anonymous_passwd;
89 extern char *ftpfs_proxy_host;
90 extern int ftpfs_directory_timeout;
91 extern int ftpfs_always_use_proxy;
93 extern int use_netrc;
94 extern int ftpfs_retry_seconds;
95 extern int ftpfs_use_passive_connections;
96 extern int ftpfs_use_unix_list_options;
97 extern int ftpfs_first_cd_then_ls;
99 void ftpfs_init_passwd (void);
101 #define OPT_FLUSH 1
102 #define OPT_IGNORE_ERROR 2
104 #endif