source: FTPfs/curlftpfs-0.9.1/ftpfs.h @ 192

Last change on this file since 192 was 10, checked in by zsjheng, 17 years ago
File size: 1.7 KB
Line 
1#ifndef __CURLFTPFS_FTPFS_H__
2#define __CURLFTPFS_FTPFS_H__
3
4/*
5    FTP file system
6    Copyright (C) 2006 Robson Braga Araujo <robsonbraga@gmail.com>
7
8    This program can be distributed under the terms of the GNU GPL.
9    See the file COPYING.
10*/
11
12#include <curl/curl.h>
13#include <curl/easy.h>
14#include <pthread.h>
15#include <glib.h>
16#include <pthread.h>
17
18struct ftpfs {
19  char* host;
20  char* mountpoint;
21  pthread_mutex_t lock;
22  CURL* connection;
23  CURLM* multi;
24  struct ftpfs_file* current_fh;
25  unsigned blksize;
26  GHashTable *filetab; 
27  int verbose;
28  int debug;
29  int transform_symlinks;
30  int disable_epsv;
31  int skip_pasv_ip;
32  int tcp_nodelay;
33  char* ftp_port;
34  int disable_eprt;
35  int connect_timeout;
36  int use_ssl;
37  int no_verify_hostname;
38  int no_verify_peer;
39  char* cert;
40  char* cert_type;
41  char* key;
42  char* key_type;
43  char* key_password;
44  char* engine;
45  char* cacert;
46  char* capath;
47  char* ciphers;
48  char* interface;
49  char* krb4;
50  char* proxy;
51  int proxytunnel;
52  int proxyanyauth;
53  int proxybasic;
54  int proxydigest;
55  int proxyntlm;
56  int proxytype;
57  char* user;
58  char* proxy_user;
59  int ssl_version;
60  int ip_version;
61  char symlink_prefix[PATH_MAX+1];
62  size_t symlink_prefix_len;
63  curl_version_info_data* curl_version;
64  int safe_nobody;
65  int tryutf8;
66  char *codepage;
67  char *iocharset;
68};
69
70extern struct ftpfs ftpfs;
71
72#define DEBUG(level, args...) \
73        do { if (level <= ftpfs.debug) {\
74               int i = 0; \
75               while (++i < level) fprintf(stderr, " "); \
76               fprintf(stderr, "%ld ", time(NULL));\
77               fprintf(stderr, __FILE__ ":%d ", __LINE__);\
78               fprintf(stderr, args);\
79             }\
80           } while(0)
81
82#endif   /* __CURLFTPFS_FTPFS_H__ */
Note: See TracBrowser for help on using the repository browser.