annotate lib/gftp.h @ 930:f61550dba617

Updated Occitan translation
author ymarcheg
date Fri, 17 Aug 2007 15:38:07 +0000
parents 7b5aa0420fe2
children 5b681cba67b2
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
1
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
1 /*****************************************************************************/
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
2 /* gftp.h - include file for the whole ftp program */
122
76e2b58a9440 2003-4-5 Brian Masney <masneyb@gftp.org>
masneyb
parents: 102
diff changeset
3 /* Copyright (C) 1998-2003 Brian Masney <masneyb@gftp.org> */
1
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
4 /* */
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
5 /* This program is free software; you can redistribute it and/or modify */
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
6 /* it under the terms of the GNU General Public License as published by */
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
7 /* the Free Software Foundation; either version 2 of the License, or */
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
8 /* (at your option) any later version. */
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
9 /* */
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
10 /* This program is distributed in the hope that it will be useful, */
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
11 /* but WITHOUT ANY WARRANTY; without even the implied warranty of */
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
12 /* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the */
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
13 /* GNU General Public License for more details. */
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
14 /* */
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
15 /* You should have received a copy of the GNU General Public License */
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
16 /* along with this program; if not, write to the Free Software */
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
17 /* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
18 /*****************************************************************************/
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
19
33
c8ec7877432e 2002-10-06 Brian Masney <masneyb@gftp.org>
masneyb
parents: 26
diff changeset
20 /* $Id$ */
c8ec7877432e 2002-10-06 Brian Masney <masneyb@gftp.org>
masneyb
parents: 26
diff changeset
21
1
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
22 #ifndef __GFTP_H
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
23 #define __GFTP_H
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
24
548
73ff02592d35 2004-9-6 Brian Masney <masneyb@gftp.org>
masneyb
parents: 547
diff changeset
25 #ifndef _GNU_SOURCE
73ff02592d35 2004-9-6 Brian Masney <masneyb@gftp.org>
masneyb
parents: 547
diff changeset
26 #define _GNU_SOURCE
73ff02592d35 2004-9-6 Brian Masney <masneyb@gftp.org>
masneyb
parents: 547
diff changeset
27 #endif
73ff02592d35 2004-9-6 Brian Masney <masneyb@gftp.org>
masneyb
parents: 547
diff changeset
28
1
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
29 #ifdef HAVE_CONFIG_H
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
30 #include "config.h"
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
31 #endif
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
32
435
89097f3a4906 2004-3-18 Brian Masney <masneyb@gftp.org>
masneyb
parents: 429
diff changeset
33 /* *BSD include 64bit off_t but _LARGEFILE_SOURCE is not defined. */
89097f3a4906 2004-3-18 Brian Masney <masneyb@gftp.org>
masneyb
parents: 429
diff changeset
34 #if defined (SIZEOF_OFF_T) && SIZEOF_OFF_T > 4 && !defined (_LARGEFILE_SOURCE)
423
4cee2498761d 2004-3-15 Brian Masney <masneyb@gftp.org>
masneyb
parents: 422
diff changeset
35 #define _LARGEFILE_SOURCE 1
4cee2498761d 2004-3-15 Brian Masney <masneyb@gftp.org>
masneyb
parents: 422
diff changeset
36 #endif
4cee2498761d 2004-3-15 Brian Masney <masneyb@gftp.org>
masneyb
parents: 422
diff changeset
37
437
ef3ea9f70d8a 2004-3-19 Brian Masney <masneyb@gftp.org>
masneyb
parents: 435
diff changeset
38 #if defined (_LARGEFILE_SOURCE) && !defined (_LARGEFILE64_SOURCE)
ef3ea9f70d8a 2004-3-19 Brian Masney <masneyb@gftp.org>
masneyb
parents: 435
diff changeset
39 #define _LARGEFILE64_SOURCE 1
ef3ea9f70d8a 2004-3-19 Brian Masney <masneyb@gftp.org>
masneyb
parents: 435
diff changeset
40 #endif
ef3ea9f70d8a 2004-3-19 Brian Masney <masneyb@gftp.org>
masneyb
parents: 435
diff changeset
41
1
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
42 #include <sys/types.h>
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
43 #include <sys/stat.h>
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
44 #include <sys/socket.h>
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
45 #include <sys/time.h>
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
46 #ifndef TIOCGWINSZ
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
47 #include <sys/ioctl.h>
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
48 #endif
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
49 #include <sys/wait.h>
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
50 #include <sys/utsname.h>
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
51 #include <netinet/in.h>
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
52 #include <arpa/inet.h>
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
53 #include <glib.h>
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
54 #include <limits.h>
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
55 #include <netdb.h>
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
56 #include <stdio.h>
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
57 #include <stdarg.h>
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
58 #include <stdlib.h>
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
59 #include <errno.h>
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
60 #include <fcntl.h>
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
61 #include <unistd.h>
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
62 #include <ctype.h>
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
63 #include <time.h>
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
64 #include <utime.h>
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
65 #include <signal.h>
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
66 #include <termios.h>
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
67 #include <pwd.h>
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
68 #include <setjmp.h>
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
69 #include <dirent.h>
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
70 #include <grp.h>
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
71 #include <math.h>
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
72
325
0fcc6468a0af 2003-12-4 Brian Masney <masneyb@gftp.org>
masneyb
parents: 320
diff changeset
73 #ifdef HAVE_STDINT_H
0fcc6468a0af 2003-12-4 Brian Masney <masneyb@gftp.org>
masneyb
parents: 320
diff changeset
74 #include <stdint.h>
0fcc6468a0af 2003-12-4 Brian Masney <masneyb@gftp.org>
masneyb
parents: 320
diff changeset
75 #endif
0fcc6468a0af 2003-12-4 Brian Masney <masneyb@gftp.org>
masneyb
parents: 320
diff changeset
76
460
075f89b4395c 2004-4-14 Brian Masney <masneyb@gftp.org>
masneyb
parents: 458
diff changeset
77 #ifdef HAVE_INTTYPES_H
075f89b4395c 2004-4-14 Brian Masney <masneyb@gftp.org>
masneyb
parents: 458
diff changeset
78 #include <inttypes.h>
075f89b4395c 2004-4-14 Brian Masney <masneyb@gftp.org>
masneyb
parents: 458
diff changeset
79 #endif
075f89b4395c 2004-4-14 Brian Masney <masneyb@gftp.org>
masneyb
parents: 458
diff changeset
80
1
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
81 #ifdef HAVE_STRING_H
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
82 #include <string.h>
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
83 #else
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
84 #include <strings.h>
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
85 #endif
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
86
168
c505d9ba9d53 2003-6-6 Brian Masney <masneyb@gftp.org>
masneyb
parents: 151
diff changeset
87 #ifdef USE_SSL
c505d9ba9d53 2003-6-6 Brian Masney <masneyb@gftp.org>
masneyb
parents: 151
diff changeset
88 #include <openssl/bio.h>
c505d9ba9d53 2003-6-6 Brian Masney <masneyb@gftp.org>
masneyb
parents: 151
diff changeset
89 #include <openssl/err.h>
c505d9ba9d53 2003-6-6 Brian Masney <masneyb@gftp.org>
masneyb
parents: 151
diff changeset
90 #include <openssl/rand.h>
c505d9ba9d53 2003-6-6 Brian Masney <masneyb@gftp.org>
masneyb
parents: 151
diff changeset
91 #include <openssl/ssl.h>
c505d9ba9d53 2003-6-6 Brian Masney <masneyb@gftp.org>
masneyb
parents: 151
diff changeset
92 #include <openssl/x509v3.h>
c505d9ba9d53 2003-6-6 Brian Masney <masneyb@gftp.org>
masneyb
parents: 151
diff changeset
93 #endif
c505d9ba9d53 2003-6-6 Brian Masney <masneyb@gftp.org>
masneyb
parents: 151
diff changeset
94
1
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
95 #ifdef ENABLE_NLS
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
96 #include <libintl.h>
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
97 #include <locale.h>
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
98 #define _(String) gettext (String)
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
99 #else
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
100 #define _(String) String
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
101 #endif
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
102 #define N_(String) String
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
103
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
104 #ifndef AF_LOCAL
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
105 #define AF_LOCAL AF_UNIX
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
106 #endif
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
107
146
782f84694489 2003-4-25 Brian Masney <masneyb@gftp.org>
masneyb
parents: 139
diff changeset
108 #ifdef HAVE_GETADDRINFO
782f84694489 2003-4-25 Brian Masney <masneyb@gftp.org>
masneyb
parents: 139
diff changeset
109 #define HAVE_IPV6
516
fbb5a02beddb 2004-7-26 Brian Masney <masneyb@gftp.org>
masneyb
parents: 500
diff changeset
110 #define GFTP_GET_AI_FAMILY(request) ((request) != NULL && (request)->hostp != NULL ? (request)->hostp->ai_family : -1)
146
782f84694489 2003-4-25 Brian Masney <masneyb@gftp.org>
masneyb
parents: 139
diff changeset
111 #else
782f84694489 2003-4-25 Brian Masney <masneyb@gftp.org>
masneyb
parents: 139
diff changeset
112 #define GFTP_GET_AI_FAMILY(request) AF_INET
782f84694489 2003-4-25 Brian Masney <masneyb@gftp.org>
masneyb
parents: 139
diff changeset
113 #endif
782f84694489 2003-4-25 Brian Masney <masneyb@gftp.org>
masneyb
parents: 139
diff changeset
114
351
ae7f8b9bd2e4 2003-1-4 Brian Masney <masneyb@gftp.org>
masneyb
parents: 341
diff changeset
115 /* Solaris needs this included for major()/minor() */
ae7f8b9bd2e4 2003-1-4 Brian Masney <masneyb@gftp.org>
masneyb
parents: 341
diff changeset
116 #ifdef HAVE_SYS_MKDEV_H
ae7f8b9bd2e4 2003-1-4 Brian Masney <masneyb@gftp.org>
masneyb
parents: 341
diff changeset
117 #include <sys/mkdev.h>
ae7f8b9bd2e4 2003-1-4 Brian Masney <masneyb@gftp.org>
masneyb
parents: 341
diff changeset
118 #endif
ae7f8b9bd2e4 2003-1-4 Brian Masney <masneyb@gftp.org>
masneyb
parents: 341
diff changeset
119
48
e5f6054590b5 2002-11-5 Brian Masney <masneyb@gftp.org>
masneyb
parents: 47
diff changeset
120 /* We need the major() and minor() macros in the user interface. If they aren't
e5f6054590b5 2002-11-5 Brian Masney <masneyb@gftp.org>
masneyb
parents: 47
diff changeset
121 defined by the system, we'll just define them here. */
e5f6054590b5 2002-11-5 Brian Masney <masneyb@gftp.org>
masneyb
parents: 47
diff changeset
122 #ifndef major
e5f6054590b5 2002-11-5 Brian Masney <masneyb@gftp.org>
masneyb
parents: 47
diff changeset
123 #warning major macro was not defined by the system. Defining one that is probably wrong for your system
e5f6054590b5 2002-11-5 Brian Masney <masneyb@gftp.org>
masneyb
parents: 47
diff changeset
124 #define major(dev) (((dev) >> 8) & 0xff)
e5f6054590b5 2002-11-5 Brian Masney <masneyb@gftp.org>
masneyb
parents: 47
diff changeset
125 #endif
e5f6054590b5 2002-11-5 Brian Masney <masneyb@gftp.org>
masneyb
parents: 47
diff changeset
126
e5f6054590b5 2002-11-5 Brian Masney <masneyb@gftp.org>
masneyb
parents: 47
diff changeset
127 #ifndef minor
e5f6054590b5 2002-11-5 Brian Masney <masneyb@gftp.org>
masneyb
parents: 47
diff changeset
128 #warning minor macro was not defined by the system. Defining one that is probably wrong for your system
e5f6054590b5 2002-11-5 Brian Masney <masneyb@gftp.org>
masneyb
parents: 47
diff changeset
129 #define minor(dev) ((dev) & 0xff)
e5f6054590b5 2002-11-5 Brian Masney <masneyb@gftp.org>
masneyb
parents: 47
diff changeset
130 #endif
e5f6054590b5 2002-11-5 Brian Masney <masneyb@gftp.org>
masneyb
parents: 47
diff changeset
131
201
0098dae654a5 2003-6-25 Brian Masney <masneyb@gftp.org>
masneyb
parents: 199
diff changeset
132 #ifdef WITH_DMALLOC
0098dae654a5 2003-6-25 Brian Masney <masneyb@gftp.org>
masneyb
parents: 199
diff changeset
133
0098dae654a5 2003-6-25 Brian Masney <masneyb@gftp.org>
masneyb
parents: 199
diff changeset
134 #undef g_malloc
0098dae654a5 2003-6-25 Brian Masney <masneyb@gftp.org>
masneyb
parents: 199
diff changeset
135 #define g_malloc(size) \
0098dae654a5 2003-6-25 Brian Masney <masneyb@gftp.org>
masneyb
parents: 199
diff changeset
136 _malloc_leap(__FILE__, __LINE__, size)
0098dae654a5 2003-6-25 Brian Masney <masneyb@gftp.org>
masneyb
parents: 199
diff changeset
137
0098dae654a5 2003-6-25 Brian Masney <masneyb@gftp.org>
masneyb
parents: 199
diff changeset
138 #undef g_malloc0
0098dae654a5 2003-6-25 Brian Masney <masneyb@gftp.org>
masneyb
parents: 199
diff changeset
139 #define g_malloc0(size) \
0098dae654a5 2003-6-25 Brian Masney <masneyb@gftp.org>
masneyb
parents: 199
diff changeset
140 _calloc_leap(__FILE__, __LINE__, 1, size)
0098dae654a5 2003-6-25 Brian Masney <masneyb@gftp.org>
masneyb
parents: 199
diff changeset
141
0098dae654a5 2003-6-25 Brian Masney <masneyb@gftp.org>
masneyb
parents: 199
diff changeset
142 #undef g_realloc
0098dae654a5 2003-6-25 Brian Masney <masneyb@gftp.org>
masneyb
parents: 199
diff changeset
143 #define g_realloc(ptr, size) \
0098dae654a5 2003-6-25 Brian Masney <masneyb@gftp.org>
masneyb
parents: 199
diff changeset
144 _realloc_leap(__FILE__, __LINE__, ptr, size)
0098dae654a5 2003-6-25 Brian Masney <masneyb@gftp.org>
masneyb
parents: 199
diff changeset
145
0098dae654a5 2003-6-25 Brian Masney <masneyb@gftp.org>
masneyb
parents: 199
diff changeset
146 #undef g_strdup
0098dae654a5 2003-6-25 Brian Masney <masneyb@gftp.org>
masneyb
parents: 199
diff changeset
147 #define g_strdup(str) \
0098dae654a5 2003-6-25 Brian Masney <masneyb@gftp.org>
masneyb
parents: 199
diff changeset
148 _strdup_leap(__FILE__, __LINE__, str)
0098dae654a5 2003-6-25 Brian Masney <masneyb@gftp.org>
masneyb
parents: 199
diff changeset
149
0098dae654a5 2003-6-25 Brian Masney <masneyb@gftp.org>
masneyb
parents: 199
diff changeset
150 #undef g_free
0098dae654a5 2003-6-25 Brian Masney <masneyb@gftp.org>
masneyb
parents: 199
diff changeset
151 #define g_free(ptr) \
0098dae654a5 2003-6-25 Brian Masney <masneyb@gftp.org>
masneyb
parents: 199
diff changeset
152 _free_leap(__FILE__, __LINE__, ptr)
0098dae654a5 2003-6-25 Brian Masney <masneyb@gftp.org>
masneyb
parents: 199
diff changeset
153
1
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
154 #include <dmalloc.h>
201
0098dae654a5 2003-6-25 Brian Masney <masneyb@gftp.org>
masneyb
parents: 199
diff changeset
155
1
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
156 #endif
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
157
338
0f34108f27b7 2003-12-10 Brian Masney <masneyb@gftp.org>
masneyb
parents: 330
diff changeset
158 #ifdef __GNUC__
0f34108f27b7 2003-12-10 Brian Masney <masneyb@gftp.org>
masneyb
parents: 330
diff changeset
159 # define GFTP_LOG_FUNCTION_ATTRIBUTES __attribute__((format(printf, 3, 4)))
0f34108f27b7 2003-12-10 Brian Masney <masneyb@gftp.org>
masneyb
parents: 330
diff changeset
160 #else
0f34108f27b7 2003-12-10 Brian Masney <masneyb@gftp.org>
masneyb
parents: 330
diff changeset
161 # define GFTP_LOG_FUNCTION_ATTRIBUTES
0f34108f27b7 2003-12-10 Brian Masney <masneyb@gftp.org>
masneyb
parents: 330
diff changeset
162 #endif
0f34108f27b7 2003-12-10 Brian Masney <masneyb@gftp.org>
masneyb
parents: 330
diff changeset
163
649
eaede7f6c2f8 2004-12-31 Brian Masney <masneyb@gftp.org>
masneyb
parents: 641
diff changeset
164 #if defined (_LARGEFILE_SOURCE) && !defined (__hppa__) && !defined (__hppa)
532
bccfdbfaac00 2004-8-17 Brian Masney <masneyb@gftp.org>
masneyb
parents: 520
diff changeset
165 #define GFTP_OFF_T_HEX_PRINTF_MOD "%llx"
bccfdbfaac00 2004-8-17 Brian Masney <masneyb@gftp.org>
masneyb
parents: 520
diff changeset
166 #define GFTP_OFF_T_INTL_PRINTF_MOD "%'lld"
bccfdbfaac00 2004-8-17 Brian Masney <masneyb@gftp.org>
masneyb
parents: 520
diff changeset
167 #define GFTP_OFF_T_PRINTF_MOD "%lld"
bccfdbfaac00 2004-8-17 Brian Masney <masneyb@gftp.org>
masneyb
parents: 520
diff changeset
168 #define GFTP_OFF_T_11PRINTF_MOD "%11lld"
bccfdbfaac00 2004-8-17 Brian Masney <masneyb@gftp.org>
masneyb
parents: 520
diff changeset
169 #define gftp_parse_file_size(str) strtoll (str, NULL, 10)
926
7b5aa0420fe2 2007-6-13 Brian Masney <masneyb@gftp.org>
masneyb
parents: 916
diff changeset
170 #define GFTP_OFF_T_PRINTF_CONVERSION long long
516
fbb5a02beddb 2004-7-26 Brian Masney <masneyb@gftp.org>
masneyb
parents: 500
diff changeset
171 #else
532
bccfdbfaac00 2004-8-17 Brian Masney <masneyb@gftp.org>
masneyb
parents: 520
diff changeset
172 #define GFTP_OFF_T_HEX_PRINTF_MOD "%lx"
bccfdbfaac00 2004-8-17 Brian Masney <masneyb@gftp.org>
masneyb
parents: 520
diff changeset
173 #define GFTP_OFF_T_INTL_PRINTF_MOD "%'ld"
bccfdbfaac00 2004-8-17 Brian Masney <masneyb@gftp.org>
masneyb
parents: 520
diff changeset
174 #define GFTP_OFF_T_PRINTF_MOD "%ld"
bccfdbfaac00 2004-8-17 Brian Masney <masneyb@gftp.org>
masneyb
parents: 520
diff changeset
175 #define GFTP_OFF_T_11PRINTF_MOD "%11ld"
bccfdbfaac00 2004-8-17 Brian Masney <masneyb@gftp.org>
masneyb
parents: 520
diff changeset
176 #define gftp_parse_file_size(str) strtol (str, NULL, 10)
926
7b5aa0420fe2 2007-6-13 Brian Masney <masneyb@gftp.org>
masneyb
parents: 916
diff changeset
177 #define GFTP_OFF_T_PRINTF_CONVERSION off_t
516
fbb5a02beddb 2004-7-26 Brian Masney <masneyb@gftp.org>
masneyb
parents: 500
diff changeset
178 #endif
fbb5a02beddb 2004-7-26 Brian Masney <masneyb@gftp.org>
masneyb
parents: 500
diff changeset
179
91
8c37d73d3f1f 2003-1-21 Brian Masney <masneyb@gftp.org>
masneyb
parents: 87
diff changeset
180 /* Server types (used by FTP protocol from SYST command) */
122
76e2b58a9440 2003-4-5 Brian Masney <masneyb@gftp.org>
masneyb
parents: 102
diff changeset
181 #define GFTP_DIRTYPE_UNIX 1
76e2b58a9440 2003-4-5 Brian Masney <masneyb@gftp.org>
masneyb
parents: 102
diff changeset
182 #define GFTP_DIRTYPE_EPLF 2
76e2b58a9440 2003-4-5 Brian Masney <masneyb@gftp.org>
masneyb
parents: 102
diff changeset
183 #define GFTP_DIRTYPE_CRAY 3
76e2b58a9440 2003-4-5 Brian Masney <masneyb@gftp.org>
masneyb
parents: 102
diff changeset
184 #define GFTP_DIRTYPE_NOVELL 4
76e2b58a9440 2003-4-5 Brian Masney <masneyb@gftp.org>
masneyb
parents: 102
diff changeset
185 #define GFTP_DIRTYPE_DOS 5
76e2b58a9440 2003-4-5 Brian Masney <masneyb@gftp.org>
masneyb
parents: 102
diff changeset
186 #define GFTP_DIRTYPE_VMS 6
76e2b58a9440 2003-4-5 Brian Masney <masneyb@gftp.org>
masneyb
parents: 102
diff changeset
187 #define GFTP_DIRTYPE_OTHER 7
358
28a50fb598ed 2003-1-6 Brian Masney <masneyb@gftp.org>
masneyb
parents: 356
diff changeset
188 #define GFTP_DIRTYPE_MVS 8
91
8c37d73d3f1f 2003-1-21 Brian Masney <masneyb@gftp.org>
masneyb
parents: 87
diff changeset
189
84
7ef60ce2bdb2 2002-12-29 Brian Masney <masneyb@gftp.org>
masneyb
parents: 80
diff changeset
190 /* Error types */
341
eedc2c5727fa 2003-12-28 Brian Masney <masneyb@gftp.org>
masneyb
parents: 338
diff changeset
191 #define GFTP_ERETRYABLE -1 /* Temporary failure. The GUI
eedc2c5727fa 2003-12-28 Brian Masney <masneyb@gftp.org>
masneyb
parents: 338
diff changeset
192 should wait briefly */
eedc2c5727fa 2003-12-28 Brian Masney <masneyb@gftp.org>
masneyb
parents: 338
diff changeset
193 #define GFTP_EFATAL -2 /* Fatal error */
eedc2c5727fa 2003-12-28 Brian Masney <masneyb@gftp.org>
masneyb
parents: 338
diff changeset
194 #define GFTP_ERETRYABLE_NO_WAIT -3 /* Temporary failure. The GUI
eedc2c5727fa 2003-12-28 Brian Masney <masneyb@gftp.org>
masneyb
parents: 338
diff changeset
195 should not wait and should
eedc2c5727fa 2003-12-28 Brian Masney <masneyb@gftp.org>
masneyb
parents: 338
diff changeset
196 reconnect */
426
c5d14dca70c3 2004-3-16 Brian Masney <masneyb@gftp.org>
masneyb
parents: 423
diff changeset
197 #define GFTP_ENOTRANS -4 /* Custom error. This is
c5d14dca70c3 2004-3-16 Brian Masney <masneyb@gftp.org>
masneyb
parents: 423
diff changeset
198 returned when a FXP transfer
c5d14dca70c3 2004-3-16 Brian Masney <masneyb@gftp.org>
masneyb
parents: 423
diff changeset
199 is requested */
442
9d03253b00d0 2004-3-20 Brian Masney <masneyb@gftp.org>
masneyb
parents: 437
diff changeset
200 #define GFTP_ETIMEDOUT -5 /* Connected timed out */
84
7ef60ce2bdb2 2002-12-29 Brian Masney <masneyb@gftp.org>
masneyb
parents: 80
diff changeset
201
1
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
202 /* Some general settings */
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
203 #define BASE_CONF_DIR "~/.gftp"
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
204 #define CONFIG_FILE BASE_CONF_DIR "/gftprc"
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
205 #define BOOKMARKS_FILE BASE_CONF_DIR "/bookmarks"
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
206 #define LOG_FILE BASE_CONF_DIR "/gftp.log"
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
207 #define MAX_HIST_LEN 10
356
7cb3327f96f7 2003-1-5 Brian Masney <masneyb@gftp.org>
masneyb
parents: 354
diff changeset
208 #define GFTP_URL_USAGE "[[protocol://][user[:pass]@]site[:port][/directory]]"
1
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
209
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
210 typedef enum gftp_logging_level_tag
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
211 {
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
212 gftp_logging_send,
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
213 gftp_logging_recv,
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
214 gftp_logging_error,
354
2ea37b3c0158 2003-1-5 Brian Masney <masneyb@gftp.org>
masneyb
parents: 351
diff changeset
215 gftp_logging_misc,
2ea37b3c0158 2003-1-5 Brian Masney <masneyb@gftp.org>
masneyb
parents: 351
diff changeset
216 gftp_logging_misc_nolog /* Log to the screen, but don't log to disk */
1
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
217 } gftp_logging_level;
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
218
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
219 typedef struct gftp_file_tag gftp_file;
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
220
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
221 #define GFTP_TRANS_ACTION_OVERWRITE 1
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
222 #define GFTP_TRANS_ACTION_RESUME 2
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
223 #define GFTP_TRANS_ACTION_SKIP 3
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
224
16
ddb983d8574b * Improved directory sorting algorithm
masneyb
parents: 14
diff changeset
225 #define GFTP_SORT_COL_FILE 1
ddb983d8574b * Improved directory sorting algorithm
masneyb
parents: 14
diff changeset
226 #define GFTP_SORT_COL_SIZE 2
ddb983d8574b * Improved directory sorting algorithm
masneyb
parents: 14
diff changeset
227 #define GFTP_SORT_COL_USER 3
ddb983d8574b * Improved directory sorting algorithm
masneyb
parents: 14
diff changeset
228 #define GFTP_SORT_COL_GROUP 4
ddb983d8574b * Improved directory sorting algorithm
masneyb
parents: 14
diff changeset
229 #define GFTP_SORT_COL_DATETIME 5
ddb983d8574b * Improved directory sorting algorithm
masneyb
parents: 14
diff changeset
230 #define GFTP_SORT_COL_ATTRIBS 6
ddb983d8574b * Improved directory sorting algorithm
masneyb
parents: 14
diff changeset
231
499
39e9945288ea 2004-7-13 Brian Masney <masneyb@gftp.org>
masneyb
parents: 485
diff changeset
232 #define GFTP_IS_SPECIAL_DEVICE(mode) (S_ISBLK (mode) || S_ISCHR (mode))
39e9945288ea 2004-7-13 Brian Masney <masneyb@gftp.org>
masneyb
parents: 485
diff changeset
233
1
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
234 struct gftp_file_tag
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
235 {
765
d553d14a2565 2006-7-13 Brian Masney <masneyb@gftp.org>
masneyb
parents: 661
diff changeset
236 /*@null@*/ char *file, /* Our filename */
d553d14a2565 2006-7-13 Brian Masney <masneyb@gftp.org>
masneyb
parents: 661
diff changeset
237 *user, /* User that owns it */
d553d14a2565 2006-7-13 Brian Masney <masneyb@gftp.org>
masneyb
parents: 661
diff changeset
238 *group, /* Group that owns it */
d553d14a2565 2006-7-13 Brian Masney <masneyb@gftp.org>
masneyb
parents: 661
diff changeset
239 *destfile; /* Full pathname to the destination for the
1
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
240 file transfer */
122
76e2b58a9440 2003-4-5 Brian Masney <masneyb@gftp.org>
masneyb
parents: 102
diff changeset
241
76e2b58a9440 2003-4-5 Brian Masney <masneyb@gftp.org>
masneyb
parents: 102
diff changeset
242 int fd; /* Already open fd for this file */
76e2b58a9440 2003-4-5 Brian Masney <masneyb@gftp.org>
masneyb
parents: 102
diff changeset
243 /* FIXME - add fd_open function */
76e2b58a9440 2003-4-5 Brian Masney <masneyb@gftp.org>
masneyb
parents: 102
diff changeset
244
1
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
245 time_t datetime; /* File date and time */
14
83090328581e * More largefile support. Hopefully all that is left is the configure stuff
masneyb
parents: 1
diff changeset
246 off_t size, /* Size of the file */
83090328581e * More largefile support. Hopefully all that is left is the configure stuff
masneyb
parents: 1
diff changeset
247 startsize; /* Size to start the transfer at */
499
39e9945288ea 2004-7-13 Brian Masney <masneyb@gftp.org>
masneyb
parents: 485
diff changeset
248 mode_t st_mode; /* File attributes */
852
5e3005923374 2006-11-16 Brian Masney <masneyb@gftp.org>
masneyb
parents: 845
diff changeset
249
5e3005923374 2006-11-16 Brian Masney <masneyb@gftp.org>
masneyb
parents: 845
diff changeset
250 dev_t st_dev; /* The device and associated inode. These */
5e3005923374 2006-11-16 Brian Masney <masneyb@gftp.org>
masneyb
parents: 845
diff changeset
251 ino_t st_ino; /* two fields are used for detecting loops */
5e3005923374 2006-11-16 Brian Masney <masneyb@gftp.org>
masneyb
parents: 845
diff changeset
252 /* with symbolic links. */
5e3005923374 2006-11-16 Brian Masney <masneyb@gftp.org>
masneyb
parents: 845
diff changeset
253
499
39e9945288ea 2004-7-13 Brian Masney <masneyb@gftp.org>
masneyb
parents: 485
diff changeset
254 unsigned int selected : 1, /* Is this file selected? */
1
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
255 was_sel : 1, /* Was this file selected before */
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
256 shown : 1, /* Is this file shown? */
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
257 done_view : 1, /* View the file when done transfering? */
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
258 done_edit : 1, /* Edit the file when done transfering? */
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
259 done_rm : 1, /* Remove the file when done */
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
260 transfer_done : 1, /* Is current file transfer done? */
862
885038cb945b 2006-11-30 Brian Masney <masneyb@gftp.org>
masneyb
parents: 852
diff changeset
261 retry_transfer : 1, /* Is current file transfer done? */
916
936635b76f02 2007-4-26 Brian Masney <masneyb@gftp.org>
masneyb
parents: 899
diff changeset
262 exists_other_side : 1, /* The file exists on the other side
936635b76f02 2007-4-26 Brian Masney <masneyb@gftp.org>
masneyb
parents: 899
diff changeset
263 during the file transfer */
936635b76f02 2007-4-26 Brian Masney <masneyb@gftp.org>
masneyb
parents: 899
diff changeset
264 filename_utf8_encoded : 1; /* Is the filename properly UTF8
936635b76f02 2007-4-26 Brian Masney <masneyb@gftp.org>
masneyb
parents: 899
diff changeset
265 encoded? */
936635b76f02 2007-4-26 Brian Masney <masneyb@gftp.org>
masneyb
parents: 899
diff changeset
266
1
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
267 char transfer_action; /* See the GFTP_TRANS_ACTION_* vars above */
765
d553d14a2565 2006-7-13 Brian Masney <masneyb@gftp.org>
masneyb
parents: 661
diff changeset
268 /*@null@*/ void *user_data;
1
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
269 };
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
270
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
271
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
272 typedef struct gftp_proxy_hosts_tag
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
273 {
303
3b9d5797050f 2003-11-2 Brian Masney <masneyb@gftp.org>
masneyb
parents: 291
diff changeset
274 /* FIXME - add IPV6 stuff here */
122
76e2b58a9440 2003-4-5 Brian Masney <masneyb@gftp.org>
masneyb
parents: 102
diff changeset
275
76e2b58a9440 2003-4-5 Brian Masney <masneyb@gftp.org>
masneyb
parents: 102
diff changeset
276 gint32 ipv4_network_address,
1
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
277 ipv4_netmask;
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
278 char *domain;
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
279 } gftp_proxy_hosts;
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
280
136
84b3e69807a2 2003-4-18 Brian Masney <masneyb@gftp.org>
masneyb
parents: 131
diff changeset
281
84b3e69807a2 2003-4-18 Brian Masney <masneyb@gftp.org>
masneyb
parents: 131
diff changeset
282 /* Note, these numbers must match up to the index number in config_file.c
84b3e69807a2 2003-4-18 Brian Masney <masneyb@gftp.org>
masneyb
parents: 131
diff changeset
283 in the declaration of gftp_option_types */
84b3e69807a2 2003-4-18 Brian Masney <masneyb@gftp.org>
masneyb
parents: 131
diff changeset
284 typedef enum
84b3e69807a2 2003-4-18 Brian Masney <masneyb@gftp.org>
masneyb
parents: 131
diff changeset
285 {
84b3e69807a2 2003-4-18 Brian Masney <masneyb@gftp.org>
masneyb
parents: 131
diff changeset
286 gftp_option_type_text = 0,
84b3e69807a2 2003-4-18 Brian Masney <masneyb@gftp.org>
masneyb
parents: 131
diff changeset
287 gftp_option_type_textcombo = 1,
84b3e69807a2 2003-4-18 Brian Masney <masneyb@gftp.org>
masneyb
parents: 131
diff changeset
288 gftp_option_type_textcomboedt = 2,
84b3e69807a2 2003-4-18 Brian Masney <masneyb@gftp.org>
masneyb
parents: 131
diff changeset
289 gftp_option_type_hidetext = 3,
84b3e69807a2 2003-4-18 Brian Masney <masneyb@gftp.org>
masneyb
parents: 131
diff changeset
290 gftp_option_type_int = 4,
84b3e69807a2 2003-4-18 Brian Masney <masneyb@gftp.org>
masneyb
parents: 131
diff changeset
291 gftp_option_type_checkbox = 5,
84b3e69807a2 2003-4-18 Brian Masney <masneyb@gftp.org>
masneyb
parents: 131
diff changeset
292 gftp_option_type_intcombo = 6,
84b3e69807a2 2003-4-18 Brian Masney <masneyb@gftp.org>
masneyb
parents: 131
diff changeset
293 gftp_option_type_float = 7,
84b3e69807a2 2003-4-18 Brian Masney <masneyb@gftp.org>
masneyb
parents: 131
diff changeset
294 gftp_option_type_color = 8,
84b3e69807a2 2003-4-18 Brian Masney <masneyb@gftp.org>
masneyb
parents: 131
diff changeset
295 gftp_option_type_notebook = 9
84b3e69807a2 2003-4-18 Brian Masney <masneyb@gftp.org>
masneyb
parents: 131
diff changeset
296 } gftp_option_type_enum;
84b3e69807a2 2003-4-18 Brian Masney <masneyb@gftp.org>
masneyb
parents: 131
diff changeset
297
84b3e69807a2 2003-4-18 Brian Masney <masneyb@gftp.org>
masneyb
parents: 131
diff changeset
298
84b3e69807a2 2003-4-18 Brian Masney <masneyb@gftp.org>
masneyb
parents: 131
diff changeset
299 #define GFTP_PORT_GTK (1 << 1)
84b3e69807a2 2003-4-18 Brian Masney <masneyb@gftp.org>
masneyb
parents: 131
diff changeset
300 #define GFTP_PORT_TEXT (1 << 2)
84b3e69807a2 2003-4-18 Brian Masney <masneyb@gftp.org>
masneyb
parents: 131
diff changeset
301 #define GFTP_PORT_ALL (GFTP_PORT_GTK | GFTP_PORT_TEXT)
84b3e69807a2 2003-4-18 Brian Masney <masneyb@gftp.org>
masneyb
parents: 131
diff changeset
302
84b3e69807a2 2003-4-18 Brian Masney <masneyb@gftp.org>
masneyb
parents: 131
diff changeset
303
84b3e69807a2 2003-4-18 Brian Masney <masneyb@gftp.org>
masneyb
parents: 131
diff changeset
304 typedef struct gftp_config_list_vars_tag
84b3e69807a2 2003-4-18 Brian Masney <masneyb@gftp.org>
masneyb
parents: 131
diff changeset
305 {
84b3e69807a2 2003-4-18 Brian Masney <masneyb@gftp.org>
masneyb
parents: 131
diff changeset
306 char *key;
84b3e69807a2 2003-4-18 Brian Masney <masneyb@gftp.org>
masneyb
parents: 131
diff changeset
307 void * (*read_func) (char *buf, int line);
84b3e69807a2 2003-4-18 Brian Masney <masneyb@gftp.org>
masneyb
parents: 131
diff changeset
308 void (*write_func) (FILE *fd, void *data);
84b3e69807a2 2003-4-18 Brian Masney <masneyb@gftp.org>
masneyb
parents: 131
diff changeset
309 GList * list;
84b3e69807a2 2003-4-18 Brian Masney <masneyb@gftp.org>
masneyb
parents: 131
diff changeset
310 unsigned int num_items;
84b3e69807a2 2003-4-18 Brian Masney <masneyb@gftp.org>
masneyb
parents: 131
diff changeset
311 char *header;
84b3e69807a2 2003-4-18 Brian Masney <masneyb@gftp.org>
masneyb
parents: 131
diff changeset
312 } gftp_config_list_vars;
84b3e69807a2 2003-4-18 Brian Masney <masneyb@gftp.org>
masneyb
parents: 131
diff changeset
313
84b3e69807a2 2003-4-18 Brian Masney <masneyb@gftp.org>
masneyb
parents: 131
diff changeset
314
201
0098dae654a5 2003-6-25 Brian Masney <masneyb@gftp.org>
masneyb
parents: 199
diff changeset
315 #define GFTP_CVARS_FLAGS_DYNMEM (1 << 1)
0098dae654a5 2003-6-25 Brian Masney <masneyb@gftp.org>
masneyb
parents: 199
diff changeset
316 #define GFTP_CVARS_FLAGS_DYNLISTMEM (1 << 2)
227
a85a097bbb02 2003-7-20 Brian Masney <masneyb@gftp.org>
masneyb
parents: 218
diff changeset
317 #define GFTP_CVARS_FLAGS_SHOW_BOOKMARK (1 << 3)
136
84b3e69807a2 2003-4-18 Brian Masney <masneyb@gftp.org>
masneyb
parents: 131
diff changeset
318
84b3e69807a2 2003-4-18 Brian Masney <masneyb@gftp.org>
masneyb
parents: 131
diff changeset
319 typedef struct gftp_config_vars_tag
84b3e69807a2 2003-4-18 Brian Masney <masneyb@gftp.org>
masneyb
parents: 131
diff changeset
320 {
765
d553d14a2565 2006-7-13 Brian Masney <masneyb@gftp.org>
masneyb
parents: 661
diff changeset
321 /*@null@*/ char *key, /* variable name */
d553d14a2565 2006-7-13 Brian Masney <masneyb@gftp.org>
masneyb
parents: 661
diff changeset
322 *description; /* How this field will show up in the dialog */
136
84b3e69807a2 2003-4-18 Brian Masney <masneyb@gftp.org>
masneyb
parents: 131
diff changeset
323 int otype; /* Type of option this is */
765
d553d14a2565 2006-7-13 Brian Masney <masneyb@gftp.org>
masneyb
parents: 661
diff changeset
324 /*@null@*/ void *value;
d553d14a2565 2006-7-13 Brian Masney <masneyb@gftp.org>
masneyb
parents: 661
diff changeset
325 /*@null@*/ void *listdata; /* For options that have several different
136
84b3e69807a2 2003-4-18 Brian Masney <masneyb@gftp.org>
masneyb
parents: 131
diff changeset
326 options, this is a list of all the options.
84b3e69807a2 2003-4-18 Brian Masney <masneyb@gftp.org>
masneyb
parents: 131
diff changeset
327 Each option_type that uses this will use this
84b3e69807a2 2003-4-18 Brian Masney <masneyb@gftp.org>
masneyb
parents: 131
diff changeset
328 field differently */
84b3e69807a2 2003-4-18 Brian Masney <masneyb@gftp.org>
masneyb
parents: 131
diff changeset
329 int flags; /* See GFTP_CVARS_FLAGS_* above */
765
d553d14a2565 2006-7-13 Brian Masney <masneyb@gftp.org>
masneyb
parents: 661
diff changeset
330 /*@null@*/ char *comment; /* Comment to write out to the config file */
136
84b3e69807a2 2003-4-18 Brian Masney <masneyb@gftp.org>
masneyb
parents: 131
diff changeset
331 int ports_shown; /* What ports of gFTP is this option shown in */
765
d553d14a2565 2006-7-13 Brian Masney <masneyb@gftp.org>
masneyb
parents: 661
diff changeset
332 /*@null@*/ void *user_data; /* Data that the GUI can store here (Widget in gtk+) */
136
84b3e69807a2 2003-4-18 Brian Masney <masneyb@gftp.org>
masneyb
parents: 131
diff changeset
333 } gftp_config_vars;
84b3e69807a2 2003-4-18 Brian Masney <masneyb@gftp.org>
masneyb
parents: 131
diff changeset
334
84b3e69807a2 2003-4-18 Brian Masney <masneyb@gftp.org>
masneyb
parents: 131
diff changeset
335
84b3e69807a2 2003-4-18 Brian Masney <masneyb@gftp.org>
masneyb
parents: 131
diff changeset
336 typedef struct gftp_option_type_tag
84b3e69807a2 2003-4-18 Brian Masney <masneyb@gftp.org>
masneyb
parents: 131
diff changeset
337 {
84b3e69807a2 2003-4-18 Brian Masney <masneyb@gftp.org>
masneyb
parents: 131
diff changeset
338 int (*read_function) (char *str, gftp_config_vars * cv, int line);
765
d553d14a2565 2006-7-13 Brian Masney <masneyb@gftp.org>
masneyb
parents: 661
diff changeset
339 int (*write_function) (gftp_config_vars * cv, /*@out@*/ char *buf,
d553d14a2565 2006-7-13 Brian Masney <masneyb@gftp.org>
masneyb
parents: 661
diff changeset
340 size_t buflen, int to_config_file);
207
cf4098008615 2003-7-1 Brian Masney <masneyb@gftp.org>
masneyb
parents: 202
diff changeset
341 void (*copy_function) (gftp_config_vars * cv, gftp_config_vars * dest_cv);
227
a85a097bbb02 2003-7-20 Brian Masney <masneyb@gftp.org>
masneyb
parents: 218
diff changeset
342 int (*compare_function) (gftp_config_vars * cv1, gftp_config_vars * cv2);
229
35ae2e80962e 2003-7-22 Brian Masney <masneyb@gftp.org>
masneyb
parents: 227
diff changeset
343 void *(*ui_print_function) (gftp_config_vars * cv, void *user_data, void *value);
136
84b3e69807a2 2003-4-18 Brian Masney <masneyb@gftp.org>
masneyb
parents: 131
diff changeset
344 void (*ui_save_function) (gftp_config_vars * cv, void *user_data);
139
c363b08e0118 2003-4-21 Brian Masney <masneyb@gftp.org>
masneyb
parents: 136
diff changeset
345 void (*ui_cancel_function) (gftp_config_vars * cv, void *user_data);
136
84b3e69807a2 2003-4-18 Brian Masney <masneyb@gftp.org>
masneyb
parents: 131
diff changeset
346 void *user_data;
84b3e69807a2 2003-4-18 Brian Masney <masneyb@gftp.org>
masneyb
parents: 131
diff changeset
347 } gftp_option_type_var;
84b3e69807a2 2003-4-18 Brian Masney <masneyb@gftp.org>
masneyb
parents: 131
diff changeset
348
84b3e69807a2 2003-4-18 Brian Masney <masneyb@gftp.org>
masneyb
parents: 131
diff changeset
349
84b3e69807a2 2003-4-18 Brian Masney <masneyb@gftp.org>
masneyb
parents: 131
diff changeset
350 #define GFTP_TEXTCOMBOEDT_EDITABLE (1 << 0)
84b3e69807a2 2003-4-18 Brian Masney <masneyb@gftp.org>
masneyb
parents: 131
diff changeset
351
84b3e69807a2 2003-4-18 Brian Masney <masneyb@gftp.org>
masneyb
parents: 131
diff changeset
352 typedef struct gftp_textcomboedt_data_tag
84b3e69807a2 2003-4-18 Brian Masney <masneyb@gftp.org>
masneyb
parents: 131
diff changeset
353 {
765
d553d14a2565 2006-7-13 Brian Masney <masneyb@gftp.org>
masneyb
parents: 661
diff changeset
354 /*@null@*/ char *description,
d553d14a2565 2006-7-13 Brian Masney <masneyb@gftp.org>
masneyb
parents: 661
diff changeset
355 *text;
136
84b3e69807a2 2003-4-18 Brian Masney <masneyb@gftp.org>
masneyb
parents: 131
diff changeset
356 int flags;
84b3e69807a2 2003-4-18 Brian Masney <masneyb@gftp.org>
masneyb
parents: 131
diff changeset
357 } gftp_textcomboedt_data;
84b3e69807a2 2003-4-18 Brian Masney <masneyb@gftp.org>
masneyb
parents: 131
diff changeset
358
84b3e69807a2 2003-4-18 Brian Masney <masneyb@gftp.org>
masneyb
parents: 131
diff changeset
359
1
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
360 typedef struct gftp_request_tag gftp_request;
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
361
186
13ca1defdc75 2003-6-16 Brian Masney <masneyb@gftp.org>
masneyb
parents: 184
diff changeset
362 typedef void (*gftp_logging_func) ( gftp_logging_level level,
765
d553d14a2565 2006-7-13 Brian Masney <masneyb@gftp.org>
masneyb
parents: 661
diff changeset
363 /*@null@*/ gftp_request * request,
186
13ca1defdc75 2003-6-16 Brian Masney <masneyb@gftp.org>
masneyb
parents: 184
diff changeset
364 const char *string, ... );
13ca1defdc75 2003-6-16 Brian Masney <masneyb@gftp.org>
masneyb
parents: 184
diff changeset
365
570
447f40a61ee8 2004-9-29 Brian Masney <masneyb@gftp.org>
masneyb
parents: 555
diff changeset
366 #define GFTP_ANONYMOUS_USER "anonymous"
555
7f54d0c0edbc 2004-9-17 Brian Masney <masneyb@gftp.org>
masneyb
parents: 553
diff changeset
367 #define gftp_need_username(request) ((request)->need_username && ((request)->username == NULL || *(request)->username == '\0'))
570
447f40a61ee8 2004-9-29 Brian Masney <masneyb@gftp.org>
masneyb
parents: 555
diff changeset
368 #define gftp_need_password(request) ((request)->need_password && (request)->username != NULL && *(request)->username != '\0' && strcasecmp ((request)->username, GFTP_ANONYMOUS_USER) != 0 && ((request)->password == NULL || *(request)->password == '\0'))
553
b2b4f5fa8fc7 2004-9-14 Brian Masney <masneyb@gftp.org>
masneyb
parents: 548
diff changeset
369
1
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
370 struct gftp_request_tag
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
371 {
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
372 int protonum; /* Current number of the protocol this is
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
373 set to */
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
374 char *hostname, /* Hostname we will connect to */
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
375 *username, /* Username for host*/
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
376 *password, /* Password for host */
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
377 *account, /* Account for host (FTP only) */
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
378 *directory, /* Current working directory */
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
379 *url_prefix, /* URL Prefix (ex: ftp) */
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
380 *last_ftp_response, /* Last response from server */
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
381 *last_dir_entry; /* Last dir entry from server */
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
382 size_t last_dir_entry_len; /* Length of last_dir_entry */
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
383
122
76e2b58a9440 2003-4-5 Brian Masney <masneyb@gftp.org>
masneyb
parents: 102
diff changeset
384 unsigned int port; /* Port of remote site */
1
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
385
169
d40f9db52cdf 2003-6-8 Brian Masney <masneyb@gftp.org>
masneyb
parents: 168
diff changeset
386 int datafd, /* Data connection */
58
c01d91c10f6c 2002-11-20 Brian Masney <masneyb@gftp.org>
masneyb
parents: 56
diff changeset
387 cachefd; /* For the directory cache */
1
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
388 int wakeup_main_thread[2]; /* FD that gets written to by the threads
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
389 to wakeup the parent */
122
76e2b58a9440 2003-4-5 Brian Masney <masneyb@gftp.org>
masneyb
parents: 102
diff changeset
390
76e2b58a9440 2003-4-5 Brian Masney <masneyb@gftp.org>
masneyb
parents: 102
diff changeset
391 /* One of these are used to lookup the IP address of the host we are
76e2b58a9440 2003-4-5 Brian Masney <masneyb@gftp.org>
masneyb
parents: 102
diff changeset
392 connecting to */
1
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
393 #if defined (HAVE_GETADDRINFO) && defined (HAVE_GAI_STRERROR)
572
ce1e83470207 2004-9-29 Brian Masney <masneyb@gftp.org>
masneyb
parents: 570
diff changeset
394 struct addrinfo *hostp,
ce1e83470207 2004-9-29 Brian Masney <masneyb@gftp.org>
masneyb
parents: 570
diff changeset
395 *current_hostp;
1
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
396 #else
122
76e2b58a9440 2003-4-5 Brian Masney <masneyb@gftp.org>
masneyb
parents: 102
diff changeset
397 struct hostent host, *hostp;
641
efe90b739e98 2004-12-12 Brian Masney <masneyb@gftp.org>
masneyb
parents: 623
diff changeset
398 int curhost;
1
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
399 #endif
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
400
547
34a3f10d8bae 2004-9-6 Brian Masney <masneyb@gftp.org>
masneyb
parents: 542
diff changeset
401 int ai_family;
122
76e2b58a9440 2003-4-5 Brian Masney <masneyb@gftp.org>
masneyb
parents: 102
diff changeset
402 int server_type; /* The type of server we are connected to.
76e2b58a9440 2003-4-5 Brian Masney <masneyb@gftp.org>
masneyb
parents: 102
diff changeset
403 See GFTP_DIRTYPE_* above */
151
2f15b3000dbc 2003-4-27 Brian Masney <masneyb@gftp.org>
masneyb
parents: 146
diff changeset
404 unsigned int free_hostp : 1, /* Should we free the hostp structure
2f15b3000dbc 2003-4-27 Brian Masney <masneyb@gftp.org>
masneyb
parents: 146
diff changeset
405 in gftp_destroy_request() */
2f15b3000dbc 2003-4-27 Brian Masney <masneyb@gftp.org>
masneyb
parents: 146
diff changeset
406 use_proxy : 1,
1
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
407 always_connected : 1,
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
408 need_hostport : 1,
553
b2b4f5fa8fc7 2004-9-14 Brian Masney <masneyb@gftp.org>
masneyb
parents: 548
diff changeset
409 need_username : 1,
b2b4f5fa8fc7 2004-9-14 Brian Masney <masneyb@gftp.org>
masneyb
parents: 548
diff changeset
410 need_password : 1,
1
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
411 use_cache : 1, /* Enable or disable the cache */
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
412 cached : 1, /* Is this directory listing cached? */
41
4bcfaf6307b5 2002-10-29 Brian Masney <masneyb@gftp.org>
masneyb
parents: 40
diff changeset
413 cancel : 1, /* If a signal is received, should
4bcfaf6307b5 2002-10-29 Brian Masney <masneyb@gftp.org>
masneyb
parents: 40
diff changeset
414 we cancel this operation */
832
f2772ac00751 2006-10-19 Brian Masney <masneyb@gftp.org>
masneyb
parents: 830
diff changeset
415 stopable : 1,
879
a41a3590d696 2007-2-14 Brian Masney <masneyb@gftp.org>
masneyb
parents: 876
diff changeset
416 refreshing : 1,
832
f2772ac00751 2006-10-19 Brian Masney <masneyb@gftp.org>
masneyb
parents: 830
diff changeset
417 use_local_encoding : 1;
1
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
418
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
419 off_t gotbytes;
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
420
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
421 void *protocol_data;
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
422
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
423 gftp_logging_func logging_function;
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
424 void *user_data;
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
425
173
4c288d05b26a 2003-6-8 Brian Masney <masneyb@gftp.org>
masneyb
parents: 169
diff changeset
426 int (*init) ( gftp_request * request );
309
cc2eeb30b793 2003-11-7 Brian Masney <masneyb@gftp.org>
masneyb
parents: 305
diff changeset
427 void (*copy_param_options) ( gftp_request * dest_request,
cc2eeb30b793 2003-11-7 Brian Masney <masneyb@gftp.org>
masneyb
parents: 305
diff changeset
428 gftp_request * src_request );
168
c505d9ba9d53 2003-6-6 Brian Masney <masneyb@gftp.org>
masneyb
parents: 151
diff changeset
429 ssize_t (*read_function) ( gftp_request * request,
c505d9ba9d53 2003-6-6 Brian Masney <masneyb@gftp.org>
masneyb
parents: 151
diff changeset
430 void *ptr,
c505d9ba9d53 2003-6-6 Brian Masney <masneyb@gftp.org>
masneyb
parents: 151
diff changeset
431 size_t size,
c505d9ba9d53 2003-6-6 Brian Masney <masneyb@gftp.org>
masneyb
parents: 151
diff changeset
432 int fd );
c505d9ba9d53 2003-6-6 Brian Masney <masneyb@gftp.org>
masneyb
parents: 151
diff changeset
433 ssize_t (*write_function) ( gftp_request * request,
c505d9ba9d53 2003-6-6 Brian Masney <masneyb@gftp.org>
masneyb
parents: 151
diff changeset
434 const char *ptr,
c505d9ba9d53 2003-6-6 Brian Masney <masneyb@gftp.org>
masneyb
parents: 151
diff changeset
435 size_t size,
c505d9ba9d53 2003-6-6 Brian Masney <masneyb@gftp.org>
masneyb
parents: 151
diff changeset
436 int fd );
1
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
437 void (*destroy) ( gftp_request * request );
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
438 int (*connect) ( gftp_request * request );
168
c505d9ba9d53 2003-6-6 Brian Masney <masneyb@gftp.org>
masneyb
parents: 151
diff changeset
439 int (*post_connect) ( gftp_request * request );
1
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
440 void (*disconnect) ( gftp_request * request );
58
c01d91c10f6c 2002-11-20 Brian Masney <masneyb@gftp.org>
masneyb
parents: 56
diff changeset
441 off_t (*get_file) ( gftp_request * request,
1
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
442 const char *filename,
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
443 off_t startsize );
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
444 int (*put_file) ( gftp_request * request,
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
445 const char *filename,
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
446 off_t startsize,
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
447 off_t totalsize );
765
d553d14a2565 2006-7-13 Brian Masney <masneyb@gftp.org>
masneyb
parents: 661
diff changeset
448 off_t (*transfer_file) ( gftp_request * fromreq,
1
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
449 const char *fromfile,
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
450 off_t fromsize,
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
451 gftp_request * toreq,
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
452 const char *tofile,
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
453 off_t tosize );
58
c01d91c10f6c 2002-11-20 Brian Masney <masneyb@gftp.org>
masneyb
parents: 56
diff changeset
454 ssize_t (*get_next_file_chunk) ( gftp_request * request,
1
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
455 char *buf,
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
456 size_t size );
58
c01d91c10f6c 2002-11-20 Brian Masney <masneyb@gftp.org>
masneyb
parents: 56
diff changeset
457 ssize_t (*put_next_file_chunk) ( gftp_request * request,
1
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
458 char *buf,
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
459 size_t size );
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
460 int (*end_transfer) ( gftp_request * request );
40
66c064fd05bc 2002-10-17 Brian Masney <masneyb@gftp.org>
masneyb
parents: 37
diff changeset
461 int (*abort_transfer) ( gftp_request * request );
520
e67a52327b24 2004-7-27 Brian Masney <masneyb@gftp.org>
masneyb
parents: 516
diff changeset
462 int (*stat_filename) ( gftp_request * request,
e67a52327b24 2004-7-27 Brian Masney <masneyb@gftp.org>
masneyb
parents: 516
diff changeset
463 const char *filename,
787
3751478bb260 2006-7-27 Brian Masney <masneyb@gftp.org>
masneyb
parents: 765
diff changeset
464 mode_t * mode,
3751478bb260 2006-7-27 Brian Masney <masneyb@gftp.org>
masneyb
parents: 765
diff changeset
465 off_t * filesize );
1
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
466 int (*list_files) ( gftp_request * request );
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
467 int (*get_next_file) ( gftp_request * request,
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
468 gftp_file *fle,
58
c01d91c10f6c 2002-11-20 Brian Masney <masneyb@gftp.org>
masneyb
parents: 56
diff changeset
469 int fd );
485
7334a74db6f6 2004-6-15 Brian Masney <masneyb@gftp.org>
masneyb
parents: 484
diff changeset
470 ssize_t (*get_next_dirlist_line) ( gftp_request * request,
7334a74db6f6 2004-6-15 Brian Masney <masneyb@gftp.org>
masneyb
parents: 484
diff changeset
471 int fd,
7334a74db6f6 2004-6-15 Brian Masney <masneyb@gftp.org>
masneyb
parents: 484
diff changeset
472 char *buf,
7334a74db6f6 2004-6-15 Brian Masney <masneyb@gftp.org>
masneyb
parents: 484
diff changeset
473 size_t buflen );
1
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
474 off_t (*get_file_size) ( gftp_request * request,
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
475 const char *filename );
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
476 int (*chdir) ( gftp_request * request,
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
477 const char *directory );
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
478 int (*rmdir) ( gftp_request * request,
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
479 const char *directory );
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
480 int (*rmfile) ( gftp_request * request,
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
481 const char *filename );
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
482 int (*mkdir) ( gftp_request * request,
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
483 const char *directory );
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
484 int (*rename) ( gftp_request * request,
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
485 const char *oldname,
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
486 const char *newname );
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
487 int (*chmod) ( gftp_request * request,
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
488 const char *filename,
499
39e9945288ea 2004-7-13 Brian Masney <masneyb@gftp.org>
masneyb
parents: 485
diff changeset
489 mode_t mode );
1
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
490 int (*set_file_time) ( gftp_request * request,
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
491 const char *filename,
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
492 time_t datettime );
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
493 int (*site) ( gftp_request * request,
478
97fd5eb34be0 2004-6-6 Brian Masney <masneyb@gftp.org>
masneyb
parents: 469
diff changeset
494 int specify_site,
1
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
495 const char *filename );
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
496 int (*parse_url) ( gftp_request * request,
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
497 const char *url );
177
aec4b4541d3a 2003-6-9 Brian Masney <masneyb@gftp.org>
masneyb
parents: 174
diff changeset
498 int (*set_config_options) ( gftp_request * request );
63
41b71c4e5076 2002-11-2333 Brian Masney <masneyb@gftp.org>
masneyb
parents: 58
diff changeset
499 void (*swap_socks) ( gftp_request * dest,
41b71c4e5076 2002-11-2333 Brian Masney <masneyb@gftp.org>
masneyb
parents: 58
diff changeset
500 gftp_request * source );
1
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
501
136
84b3e69807a2 2003-4-18 Brian Masney <masneyb@gftp.org>
masneyb
parents: 131
diff changeset
502 gftp_config_vars * local_options_vars;
84b3e69807a2 2003-4-18 Brian Masney <masneyb@gftp.org>
masneyb
parents: 131
diff changeset
503 int num_local_options_vars;
84b3e69807a2 2003-4-18 Brian Masney <masneyb@gftp.org>
masneyb
parents: 131
diff changeset
504 GHashTable * local_options_hash;
168
c505d9ba9d53 2003-6-6 Brian Masney <masneyb@gftp.org>
masneyb
parents: 151
diff changeset
505 #ifdef USE_SSL
c505d9ba9d53 2003-6-6 Brian Masney <masneyb@gftp.org>
masneyb
parents: 151
diff changeset
506 SSL * ssl;
c505d9ba9d53 2003-6-6 Brian Masney <masneyb@gftp.org>
masneyb
parents: 151
diff changeset
507 #endif
184
65eb40fb4f03 2003-6-16 Brian Masney <masneyb@gftp.org>
masneyb
parents: 182
diff changeset
508
65eb40fb4f03 2003-6-16 Brian Masney <masneyb@gftp.org>
masneyb
parents: 182
diff changeset
509 #if GLIB_MAJOR_VERSION > 1
899
f716c8dbeaff 2007-3-22 Brian Masney <masneyb@gftp.org>
masneyb
parents: 895
diff changeset
510 GIConv iconv_to, iconv_from;
f716c8dbeaff 2007-3-22 Brian Masney <masneyb@gftp.org>
masneyb
parents: 895
diff changeset
511 unsigned int iconv_from_initialized : 1,
f716c8dbeaff 2007-3-22 Brian Masney <masneyb@gftp.org>
masneyb
parents: 895
diff changeset
512 iconv_to_initialized : 1;
842
0d6fba16c7db 2006-11-2 Brian Masney <masneyb@gftp.org>
masneyb
parents: 838
diff changeset
513 char *iconv_charset;
184
65eb40fb4f03 2003-6-16 Brian Masney <masneyb@gftp.org>
masneyb
parents: 182
diff changeset
514 #endif
1
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
515 };
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
516
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
517
136
84b3e69807a2 2003-4-18 Brian Masney <masneyb@gftp.org>
masneyb
parents: 131
diff changeset
518 typedef struct gftp_transfer_tag
1
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
519 {
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
520 gftp_request * fromreq,
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
521 * toreq;
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
522
305
6d180e6a8ba5 2003-11-3 Brian Masney <masneyb@gftp.org>
masneyb
parents: 303
diff changeset
523 unsigned int cancel : 1,
1
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
524 ready : 1,
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
525 started : 1,
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
526 done : 1,
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
527 show : 1,
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
528 stalled : 1,
303
3b9d5797050f 2003-11-2 Brian Masney <masneyb@gftp.org>
masneyb
parents: 291
diff changeset
529 conn_error_no_timeout : 1,
1
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
530 next_file : 1,
14
83090328581e * More largefile support. Hopefully all that is left is the configure stuff
masneyb
parents: 1
diff changeset
531 skip_file : 1;
1
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
532
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
533 struct timeval starttime,
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
534 lasttime;
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
535
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
536 double kbs;
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
537
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
538 GList * files,
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
539 * curfle,
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
540 * updfle;
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
541
19
3b2dcdefc7e9 2002-09-15 Brian Masney <masneyb@gftp.org>
masneyb
parents: 16
diff changeset
542 long numfiles,
3b2dcdefc7e9 2002-09-15 Brian Masney <masneyb@gftp.org>
masneyb
parents: 16
diff changeset
543 numdirs,
3b2dcdefc7e9 2002-09-15 Brian Masney <masneyb@gftp.org>
masneyb
parents: 16
diff changeset
544 current_file_number,
3b2dcdefc7e9 2002-09-15 Brian Masney <masneyb@gftp.org>
masneyb
parents: 16
diff changeset
545 current_file_retries;
1
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
546
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
547 off_t curtrans, /* Current transfered bytes for this file */
377
14da115b149b 2003-1-23 Brian Masney <masneyb@gftp.org>
masneyb
parents: 374
diff changeset
548 tot_file_trans, /* Total number of bytes in the file being
14da115b149b 2003-1-23 Brian Masney <masneyb@gftp.org>
masneyb
parents: 374
diff changeset
549 transferred */
1
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
550 curresumed, /* Resumed bytes for this file */
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
551 trans_bytes, /* Amount of data transfered for entire
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
552 transfer */
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
553 total_bytes, /* Grand total bytes for whole transfer */
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
554 resumed_bytes; /* Grand total of resumed bytes for whole
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
555 transfer */
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
556
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
557 void * fromwdata,
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
558 * towdata;
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
559
122
76e2b58a9440 2003-4-5 Brian Masney <masneyb@gftp.org>
masneyb
parents: 102
diff changeset
560 GStaticMutex statmutex,
76e2b58a9440 2003-4-5 Brian Masney <masneyb@gftp.org>
masneyb
parents: 102
diff changeset
561 structmutex;
76e2b58a9440 2003-4-5 Brian Masney <masneyb@gftp.org>
masneyb
parents: 102
diff changeset
562
125
b875de05c22d 2003-4-8 Brian Masney <masneyb@gftp.org>
masneyb
parents: 124
diff changeset
563 void *user_data;
876
2d4e6fca8e7c 2007-2-6 Brian Masney <masneyb@gftp.org>
masneyb
parents: 862
diff changeset
564 void *thread_id;
1
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
565 void *clist;
136
84b3e69807a2 2003-4-18 Brian Masney <masneyb@gftp.org>
masneyb
parents: 131
diff changeset
566 } gftp_transfer;
1
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
567
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
568
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
569 typedef struct gftp_log_tag
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
570 {
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
571 char *msg;
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
572 gftp_logging_level type;
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
573 } gftp_log;
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
574
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
575
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
576 typedef struct supported_gftp_protocols_tag
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
577 {
765
d553d14a2565 2006-7-13 Brian Masney <masneyb@gftp.org>
masneyb
parents: 661
diff changeset
578 /*@null@*/ char *name; /* Description of protocol */
d553d14a2565 2006-7-13 Brian Masney <masneyb@gftp.org>
masneyb
parents: 661
diff changeset
579 /*@null@*/ int (*init) (gftp_request * request); /* Init function */
d553d14a2565 2006-7-13 Brian Masney <masneyb@gftp.org>
masneyb
parents: 661
diff changeset
580 /*@null@*/ void (*register_options) (void); /* Protocol options */
d553d14a2565 2006-7-13 Brian Masney <masneyb@gftp.org>
masneyb
parents: 661
diff changeset
581 /*@null@*/ char *url_prefix; /* URL Prefix */
542
fd9ce7797984 2004-8-21 Brian Masney <masneyb@gftp.org>
masneyb
parents: 532
diff changeset
582 unsigned int default_port; /* Default port */
341
eedc2c5727fa 2003-12-28 Brian Masney <masneyb@gftp.org>
masneyb
parents: 338
diff changeset
583 unsigned int shown : 1, /* Whether this protocol is
122
76e2b58a9440 2003-4-5 Brian Masney <masneyb@gftp.org>
masneyb
parents: 102
diff changeset
584 shown or not to the user in
76e2b58a9440 2003-4-5 Brian Masney <masneyb@gftp.org>
masneyb
parents: 102
diff changeset
585 the protocol dropdown box */
341
eedc2c5727fa 2003-12-28 Brian Masney <masneyb@gftp.org>
masneyb
parents: 338
diff changeset
586 use_threads : 1; /* Whether or not operations in
eedc2c5727fa 2003-12-28 Brian Masney <masneyb@gftp.org>
masneyb
parents: 338
diff changeset
587 this protocol should use
eedc2c5727fa 2003-12-28 Brian Masney <masneyb@gftp.org>
masneyb
parents: 338
diff changeset
588 threads */
1
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
589 } supported_gftp_protocols;
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
590
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
591
122
76e2b58a9440 2003-4-5 Brian Masney <masneyb@gftp.org>
masneyb
parents: 102
diff changeset
592 typedef struct gftp_bookmarks_tag gftp_bookmarks_var;
1
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
593
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
594 struct gftp_bookmarks_tag
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
595 {
609
d97e985f5dbe 2004-11-3 Brian Masney <masneyb@gftp.org>
masneyb
parents: 598
diff changeset
596 char *path, /* Path */
d97e985f5dbe 2004-11-3 Brian Masney <masneyb@gftp.org>
masneyb
parents: 598
diff changeset
597 *oldpath, /* Old path name */
d97e985f5dbe 2004-11-3 Brian Masney <masneyb@gftp.org>
masneyb
parents: 598
diff changeset
598 *hostname, /* Our actual internet hostname */
1
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
599 *protocol, /* Protocol we will connect through */
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
600 *remote_dir, /* Initial directory */
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
601 *local_dir, /* Init local directory */
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
602 *user, /* Username to log in as */
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
603 *pass, /* Our password */
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
604 *acct; /* Account */
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
605
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
606 unsigned int port, /* The port we will connect to */
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
607 isfolder : 1, /* If this is set, then the children field can
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
608 be non-NULL */
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
609 save_password : 1; /* Save this password */
122
76e2b58a9440 2003-4-5 Brian Masney <masneyb@gftp.org>
masneyb
parents: 102
diff changeset
610 gftp_bookmarks_var *children, /* The children of this node. */
76e2b58a9440 2003-4-5 Brian Masney <masneyb@gftp.org>
masneyb
parents: 102
diff changeset
611 *prev, /* The parent of this node */
76e2b58a9440 2003-4-5 Brian Masney <masneyb@gftp.org>
masneyb
parents: 102
diff changeset
612 *next; /* The next sibling of this node */
1
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
613 gpointer cnode;
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
614
199
75eebb3b0592 2003-6-24 Brian Masney <masneyb@gftp.org>
masneyb
parents: 198
diff changeset
615 gftp_config_vars * local_options_vars;
75eebb3b0592 2003-6-24 Brian Masney <masneyb@gftp.org>
masneyb
parents: 198
diff changeset
616 int num_local_options_vars;
75eebb3b0592 2003-6-24 Brian Masney <masneyb@gftp.org>
masneyb
parents: 198
diff changeset
617 GHashTable * local_options_hash;
1
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
618 };
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
619
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
620
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
621 typedef struct gftp_file_extensions_tag
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
622 {
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
623 char *ext, /* The file extension to register */
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
624 *filename, /* The xpm file to display */
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
625 *view_program, /* The program used to view this file */
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
626 *ascii_binary; /* Is this a ASCII transfer or a BINARY transfer */
516
fbb5a02beddb 2004-7-26 Brian Masney <masneyb@gftp.org>
masneyb
parents: 500
diff changeset
627 unsigned int stlen; /* How long is the file extension. */
1
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
628 } gftp_file_extensions;
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
629
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
630
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
631 typedef struct gftp_color_tag
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
632 {
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
633 gushort red,
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
634 green,
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
635 blue;
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
636 } gftp_color;
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
637
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
638
58
c01d91c10f6c 2002-11-20 Brian Masney <masneyb@gftp.org>
masneyb
parents: 56
diff changeset
639 typedef struct gftp_getline_buffer_tag
c01d91c10f6c 2002-11-20 Brian Masney <masneyb@gftp.org>
masneyb
parents: 56
diff changeset
640 {
c01d91c10f6c 2002-11-20 Brian Masney <masneyb@gftp.org>
masneyb
parents: 56
diff changeset
641 char *buffer,
c01d91c10f6c 2002-11-20 Brian Masney <masneyb@gftp.org>
masneyb
parents: 56
diff changeset
642 *curpos;
c01d91c10f6c 2002-11-20 Brian Masney <masneyb@gftp.org>
masneyb
parents: 56
diff changeset
643 size_t max_bufsize,
c01d91c10f6c 2002-11-20 Brian Masney <masneyb@gftp.org>
masneyb
parents: 56
diff changeset
644 cur_bufsize;
179
8d933999bba6 2003-6-14 Brian Masney <masneyb@gftp.org>
masneyb
parents: 178
diff changeset
645 unsigned int eof : 1;
58
c01d91c10f6c 2002-11-20 Brian Masney <masneyb@gftp.org>
masneyb
parents: 56
diff changeset
646 } gftp_getline_buffer;
c01d91c10f6c 2002-11-20 Brian Masney <masneyb@gftp.org>
masneyb
parents: 56
diff changeset
647
126
1e65871fdfa1 2003-4-9 Brian Masney <masneyb@gftp.org>
masneyb
parents: 125
diff changeset
648
122
76e2b58a9440 2003-4-5 Brian Masney <masneyb@gftp.org>
masneyb
parents: 102
diff changeset
649 /* Global config options. These are defined in options.h */
765
d553d14a2565 2006-7-13 Brian Masney <masneyb@gftp.org>
masneyb
parents: 661
diff changeset
650 /*@null@*/ extern GList * gftp_file_transfers, * gftp_file_transfer_logs,
d553d14a2565 2006-7-13 Brian Masney <masneyb@gftp.org>
masneyb
parents: 661
diff changeset
651 * gftp_options_list;
d553d14a2565 2006-7-13 Brian Masney <masneyb@gftp.org>
masneyb
parents: 661
diff changeset
652 /*@null@*/ extern GHashTable * gftp_global_options_htable, * gftp_bookmarks_htable,
d553d14a2565 2006-7-13 Brian Masney <masneyb@gftp.org>
masneyb
parents: 661
diff changeset
653 * gftp_config_list_htable;
d553d14a2565 2006-7-13 Brian Masney <masneyb@gftp.org>
masneyb
parents: 661
diff changeset
654 /*@null@*/ extern gftp_bookmarks_var * gftp_bookmarks;
d553d14a2565 2006-7-13 Brian Masney <masneyb@gftp.org>
masneyb
parents: 661
diff changeset
655 /*@null@*/ extern FILE * gftp_logfd;
122
76e2b58a9440 2003-4-5 Brian Masney <masneyb@gftp.org>
masneyb
parents: 102
diff changeset
656 extern gftp_config_vars gftp_global_config_vars[];
1
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
657 extern supported_gftp_protocols gftp_protocols[];
122
76e2b58a9440 2003-4-5 Brian Masney <masneyb@gftp.org>
masneyb
parents: 102
diff changeset
658 extern char gftp_version[];
201
0098dae654a5 2003-6-25 Brian Masney <masneyb@gftp.org>
masneyb
parents: 199
diff changeset
659 extern int gftp_configuration_changed;
122
76e2b58a9440 2003-4-5 Brian Masney <masneyb@gftp.org>
masneyb
parents: 102
diff changeset
660
76e2b58a9440 2003-4-5 Brian Masney <masneyb@gftp.org>
masneyb
parents: 102
diff changeset
661 /* This is defined in config_file.c */
76e2b58a9440 2003-4-5 Brian Masney <masneyb@gftp.org>
masneyb
parents: 102
diff changeset
662
76e2b58a9440 2003-4-5 Brian Masney <masneyb@gftp.org>
masneyb
parents: 102
diff changeset
663 extern gftp_option_type_var gftp_option_types[];
1
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
664
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
665 /* cache.c */
182
33b394ebba68 2003-6-15 Brian Masney <masneyb@gftp.org>
masneyb
parents: 179
diff changeset
666 void gftp_generate_cache_description ( gftp_request * request,
765
d553d14a2565 2006-7-13 Brian Masney <masneyb@gftp.org>
masneyb
parents: 661
diff changeset
667 /*@out@*/ char *description,
182
33b394ebba68 2003-6-15 Brian Masney <masneyb@gftp.org>
masneyb
parents: 179
diff changeset
668 size_t len,
33b394ebba68 2003-6-15 Brian Masney <masneyb@gftp.org>
masneyb
parents: 179
diff changeset
669 int ignore_directory );
33b394ebba68 2003-6-15 Brian Masney <masneyb@gftp.org>
masneyb
parents: 179
diff changeset
670
58
c01d91c10f6c 2002-11-20 Brian Masney <masneyb@gftp.org>
masneyb
parents: 56
diff changeset
671 int gftp_new_cache_entry ( gftp_request * request );
1
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
672
58
c01d91c10f6c 2002-11-20 Brian Masney <masneyb@gftp.org>
masneyb
parents: 56
diff changeset
673 int gftp_find_cache_entry ( gftp_request * request );
1
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
674
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
675 void gftp_clear_cache_files ( void );
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
676
47
eec25f215772 2002-11-5 Brian Masney <masneyb@gftp.org>
masneyb
parents: 41
diff changeset
677 void gftp_delete_cache_entry ( gftp_request * request,
182
33b394ebba68 2003-6-15 Brian Masney <masneyb@gftp.org>
masneyb
parents: 179
diff changeset
678 char *descr,
47
eec25f215772 2002-11-5 Brian Masney <masneyb@gftp.org>
masneyb
parents: 41
diff changeset
679 int ignore_directory );
1
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
680
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
681 /* config_file.c */
198
8fea1b1a2ec6 2003-6-22 Brian Masney <masneyb@gftp.org>
masneyb
parents: 186
diff changeset
682 int gftp_config_parse_args ( char *str,
8fea1b1a2ec6 2003-6-22 Brian Masney <masneyb@gftp.org>
masneyb
parents: 186
diff changeset
683 int numargs,
8fea1b1a2ec6 2003-6-22 Brian Masney <masneyb@gftp.org>
masneyb
parents: 186
diff changeset
684 int lineno,
765
d553d14a2565 2006-7-13 Brian Masney <masneyb@gftp.org>
masneyb
parents: 661
diff changeset
685 /*@out@*/ char **first,
198
8fea1b1a2ec6 2003-6-22 Brian Masney <masneyb@gftp.org>
masneyb
parents: 186
diff changeset
686 ... );
8fea1b1a2ec6 2003-6-22 Brian Masney <masneyb@gftp.org>
masneyb
parents: 186
diff changeset
687
122
76e2b58a9440 2003-4-5 Brian Masney <masneyb@gftp.org>
masneyb
parents: 102
diff changeset
688 void gftp_add_bookmark ( gftp_bookmarks_var * newentry );
76e2b58a9440 2003-4-5 Brian Masney <masneyb@gftp.org>
masneyb
parents: 102
diff changeset
689
124
65048c959029 2003-4-6 Brian Masney <masneyb@gftp.org>
masneyb
parents: 122
diff changeset
690 void gftp_read_config_file ( char *global_data_path );
1
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
691
122
76e2b58a9440 2003-4-5 Brian Masney <masneyb@gftp.org>
masneyb
parents: 102
diff changeset
692 void gftp_write_bookmarks_file ( void );
1
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
693
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
694 void gftp_write_config_file ( void );
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
695
122
76e2b58a9440 2003-4-5 Brian Masney <masneyb@gftp.org>
masneyb
parents: 102
diff changeset
696 GHashTable * build_bookmarks_hash_table ( gftp_bookmarks_var * entry );
76e2b58a9440 2003-4-5 Brian Masney <masneyb@gftp.org>
masneyb
parents: 102
diff changeset
697
76e2b58a9440 2003-4-5 Brian Masney <masneyb@gftp.org>
masneyb
parents: 102
diff changeset
698 void print_bookmarks ( gftp_bookmarks_var * bookmarks );
76e2b58a9440 2003-4-5 Brian Masney <masneyb@gftp.org>
masneyb
parents: 102
diff changeset
699
374
d207b8241e96 2003-1-21 Brian Masney <masneyb@gftp.org>
masneyb
parents: 368
diff changeset
700 void gftp_lookup_global_option ( const char * key,
765
d553d14a2565 2006-7-13 Brian Masney <masneyb@gftp.org>
masneyb
parents: 661
diff changeset
701 /*@out@*/ void *value );
26
d74bfa342116 2002-09-24 gettextize <bug-gnu-gettext@gnu.org>
masneyb
parents: 19
diff changeset
702
122
76e2b58a9440 2003-4-5 Brian Masney <masneyb@gftp.org>
masneyb
parents: 102
diff changeset
703 void gftp_lookup_request_option ( gftp_request * request,
374
d207b8241e96 2003-1-21 Brian Masney <masneyb@gftp.org>
masneyb
parents: 368
diff changeset
704 const char * key,
765
d553d14a2565 2006-7-13 Brian Masney <masneyb@gftp.org>
masneyb
parents: 661
diff changeset
705 /*@out@*/ void *value );
d553d14a2565 2006-7-13 Brian Masney <masneyb@gftp.org>
masneyb
parents: 661
diff changeset
706
1
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
707
229
35ae2e80962e 2003-7-22 Brian Masney <masneyb@gftp.org>
masneyb
parents: 227
diff changeset
708 void gftp_lookup_bookmark_option ( gftp_bookmarks_var * bm,
374
d207b8241e96 2003-1-21 Brian Masney <masneyb@gftp.org>
masneyb
parents: 368
diff changeset
709 const char * key,
229
35ae2e80962e 2003-7-22 Brian Masney <masneyb@gftp.org>
masneyb
parents: 227
diff changeset
710 void *value );
35ae2e80962e 2003-7-22 Brian Masney <masneyb@gftp.org>
masneyb
parents: 227
diff changeset
711
374
d207b8241e96 2003-1-21 Brian Masney <masneyb@gftp.org>
masneyb
parents: 368
diff changeset
712 void gftp_set_global_option ( const char * key,
227
a85a097bbb02 2003-7-20 Brian Masney <masneyb@gftp.org>
masneyb
parents: 218
diff changeset
713 const void *value );
122
76e2b58a9440 2003-4-5 Brian Masney <masneyb@gftp.org>
masneyb
parents: 102
diff changeset
714
76e2b58a9440 2003-4-5 Brian Masney <masneyb@gftp.org>
masneyb
parents: 102
diff changeset
715 void gftp_set_request_option ( gftp_request * request,
374
d207b8241e96 2003-1-21 Brian Masney <masneyb@gftp.org>
masneyb
parents: 368
diff changeset
716 const char * key,
229
35ae2e80962e 2003-7-22 Brian Masney <masneyb@gftp.org>
masneyb
parents: 227
diff changeset
717 const void *value );
35ae2e80962e 2003-7-22 Brian Masney <masneyb@gftp.org>
masneyb
parents: 227
diff changeset
718
35ae2e80962e 2003-7-22 Brian Masney <masneyb@gftp.org>
masneyb
parents: 227
diff changeset
719 void gftp_set_bookmark_option ( gftp_bookmarks_var * bm,
374
d207b8241e96 2003-1-21 Brian Masney <masneyb@gftp.org>
masneyb
parents: 368
diff changeset
720 const char * key,
229
35ae2e80962e 2003-7-22 Brian Masney <masneyb@gftp.org>
masneyb
parents: 227
diff changeset
721 const void *value );
122
76e2b58a9440 2003-4-5 Brian Masney <masneyb@gftp.org>
masneyb
parents: 102
diff changeset
722
76e2b58a9440 2003-4-5 Brian Masney <masneyb@gftp.org>
masneyb
parents: 102
diff changeset
723 void gftp_register_config_vars ( gftp_config_vars *config_vars );
1
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
724
201
0098dae654a5 2003-6-25 Brian Masney <masneyb@gftp.org>
masneyb
parents: 199
diff changeset
725 void gftp_copy_local_options ( gftp_config_vars ** new_options_vars,
0098dae654a5 2003-6-25 Brian Masney <masneyb@gftp.org>
masneyb
parents: 199
diff changeset
726 GHashTable ** new_options_hash,
429
1d45758e5cf5 2004-3-17 Brian Masney <masneyb@gftp.org>
masneyb
parents: 426
diff changeset
727 int *new_num_local_options_vars,
201
0098dae654a5 2003-6-25 Brian Masney <masneyb@gftp.org>
masneyb
parents: 199
diff changeset
728 gftp_config_vars * orig_options,
0098dae654a5 2003-6-25 Brian Masney <masneyb@gftp.org>
masneyb
parents: 199
diff changeset
729 int num_local_options_vars );
0098dae654a5 2003-6-25 Brian Masney <masneyb@gftp.org>
masneyb
parents: 199
diff changeset
730
0098dae654a5 2003-6-25 Brian Masney <masneyb@gftp.org>
masneyb
parents: 199
diff changeset
731 void gftp_config_free_options ( gftp_config_vars * options_vars,
0098dae654a5 2003-6-25 Brian Masney <masneyb@gftp.org>
masneyb
parents: 199
diff changeset
732 GHashTable * options_hash,
0098dae654a5 2003-6-25 Brian Masney <masneyb@gftp.org>
masneyb
parents: 199
diff changeset
733 int num_options_vars );
0098dae654a5 2003-6-25 Brian Masney <masneyb@gftp.org>
masneyb
parents: 199
diff changeset
734
0098dae654a5 2003-6-25 Brian Masney <masneyb@gftp.org>
masneyb
parents: 199
diff changeset
735 void gftp_bookmarks_destroy ( gftp_bookmarks_var * bookmarks );
0098dae654a5 2003-6-25 Brian Masney <masneyb@gftp.org>
masneyb
parents: 199
diff changeset
736
218
de6a2e8e51cb 2003-7-9 Brian Masney <masneyb@gftp.org>
masneyb
parents: 210
diff changeset
737 void gftp_free_proxy_hosts ( GList * proxy_hosts );
de6a2e8e51cb 2003-7-9 Brian Masney <masneyb@gftp.org>
masneyb
parents: 210
diff changeset
738
de6a2e8e51cb 2003-7-9 Brian Masney <masneyb@gftp.org>
masneyb
parents: 210
diff changeset
739 GList * gftp_copy_proxy_hosts ( GList * proxy_hosts );
de6a2e8e51cb 2003-7-9 Brian Masney <masneyb@gftp.org>
masneyb
parents: 210
diff changeset
740
1
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
741 /* misc.c */
765
d553d14a2565 2006-7-13 Brian Masney <masneyb@gftp.org>
masneyb
parents: 661
diff changeset
742 /*@null@*/ char *insert_commas ( off_t number,
1
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
743 char *dest_str,
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
744 size_t dest_len );
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
745
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
746 char *alltrim ( char *str );
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
747
555
7f54d0c0edbc 2004-9-17 Brian Masney <masneyb@gftp.org>
masneyb
parents: 553
diff changeset
748 char *gftp_expand_path ( gftp_request * request,
7f54d0c0edbc 2004-9-17 Brian Masney <masneyb@gftp.org>
masneyb
parents: 553
diff changeset
749 const char *src );
1
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
750
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
751 void make_nonnull ( char **str );
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
752
821
b282e346bd25 2006-10-1 Brian Masney <masneyb@gftp.org>
masneyb
parents: 792
diff changeset
753 int gftp_match_filespec ( gftp_request * request,
b282e346bd25 2006-10-1 Brian Masney <masneyb@gftp.org>
masneyb
parents: 792
diff changeset
754 const char *filename,
374
d207b8241e96 2003-1-21 Brian Masney <masneyb@gftp.org>
masneyb
parents: 368
diff changeset
755 const char *filespec );
1
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
756
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
757 int gftp_parse_command_line ( int *argc,
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
758 char ***argv );
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
759
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
760 void gftp_usage ( void );
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
761
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
762 gint string_hash_compare ( gconstpointer path1,
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
763 gconstpointer path2 );
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
764
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
765 guint string_hash_function ( gconstpointer key );
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
766
852
5e3005923374 2006-11-16 Brian Masney <masneyb@gftp.org>
masneyb
parents: 845
diff changeset
767 gint uint_hash_compare ( gconstpointer path1,
5e3005923374 2006-11-16 Brian Masney <masneyb@gftp.org>
masneyb
parents: 845
diff changeset
768 gconstpointer path2 );
5e3005923374 2006-11-16 Brian Masney <masneyb@gftp.org>
masneyb
parents: 845
diff changeset
769
5e3005923374 2006-11-16 Brian Masney <masneyb@gftp.org>
masneyb
parents: 845
diff changeset
770 guint uint_hash_function ( gconstpointer key );
5e3005923374 2006-11-16 Brian Masney <masneyb@gftp.org>
masneyb
parents: 845
diff changeset
771
1
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
772 void free_file_list ( GList * filelist );
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
773
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
774 gftp_file * copy_fdata ( gftp_file * fle );
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
775
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
776 int compare_request ( gftp_request * request1,
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
777 gftp_request * request2,
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
778 int compare_dirs );
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
779
129
fe0b21c006f6 2003-4-13 Brian Masney <masneyb@gftp.org>
masneyb
parents: 126
diff changeset
780 gftp_transfer * gftp_tdata_new ( void );
fe0b21c006f6 2003-4-13 Brian Masney <masneyb@gftp.org>
masneyb
parents: 126
diff changeset
781
1
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
782 void free_tdata ( gftp_transfer * tdata );
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
783
368
af541d789f4c 2003-1-18 Brian Masney <masneyb@gftp.org>
masneyb
parents: 358
diff changeset
784 gftp_request * gftp_copy_request ( gftp_request * req );
1
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
785
16
ddb983d8574b * Improved directory sorting algorithm
masneyb
parents: 14
diff changeset
786 GList * gftp_sort_filelist ( GList * filelist,
ddb983d8574b * Improved directory sorting algorithm
masneyb
parents: 14
diff changeset
787 int column,
ddb983d8574b * Improved directory sorting algorithm
masneyb
parents: 14
diff changeset
788 int asds );
ddb983d8574b * Improved directory sorting algorithm
masneyb
parents: 14
diff changeset
789
830
afbe37351940 2006-10-19 Brian Masney <masneyb@gftp.org>
masneyb
parents: 821
diff changeset
790 char * gftp_gen_ls_string ( gftp_request * request,
afbe37351940 2006-10-19 Brian Masney <masneyb@gftp.org>
masneyb
parents: 821
diff changeset
791 gftp_file * fle,
131
c77f85763e28 2003-4-13 Brian Masney <masneyb@gftp.org>
masneyb
parents: 129
diff changeset
792 char *file_prefixstr,
c77f85763e28 2003-4-13 Brian Masney <masneyb@gftp.org>
masneyb
parents: 129
diff changeset
793 char *file_suffixstr );
c77f85763e28 2003-4-13 Brian Masney <masneyb@gftp.org>
masneyb
parents: 129
diff changeset
794
168
c505d9ba9d53 2003-6-6 Brian Masney <masneyb@gftp.org>
masneyb
parents: 151
diff changeset
795 char * base64_encode ( char *str );
c505d9ba9d53 2003-6-6 Brian Masney <masneyb@gftp.org>
masneyb
parents: 151
diff changeset
796
609
d97e985f5dbe 2004-11-3 Brian Masney <masneyb@gftp.org>
masneyb
parents: 598
diff changeset
797 void gftp_free_bookmark ( gftp_bookmarks_var * entry,
d97e985f5dbe 2004-11-3 Brian Masney <masneyb@gftp.org>
masneyb
parents: 598
diff changeset
798 int free_node );
199
75eebb3b0592 2003-6-24 Brian Masney <masneyb@gftp.org>
masneyb
parents: 198
diff changeset
799
201
0098dae654a5 2003-6-25 Brian Masney <masneyb@gftp.org>
masneyb
parents: 199
diff changeset
800 void gftp_shutdown ( void );
199
75eebb3b0592 2003-6-24 Brian Masney <masneyb@gftp.org>
masneyb
parents: 198
diff changeset
801
207
cf4098008615 2003-7-1 Brian Masney <masneyb@gftp.org>
masneyb
parents: 202
diff changeset
802 GList * get_next_selection ( GList * selection,
cf4098008615 2003-7-1 Brian Masney <masneyb@gftp.org>
masneyb
parents: 202
diff changeset
803 GList ** list,
cf4098008615 2003-7-1 Brian Masney <masneyb@gftp.org>
masneyb
parents: 202
diff changeset
804 int *curnum );
cf4098008615 2003-7-1 Brian Masney <masneyb@gftp.org>
masneyb
parents: 202
diff changeset
805
555
7f54d0c0edbc 2004-9-17 Brian Masney <masneyb@gftp.org>
masneyb
parents: 553
diff changeset
806 char * gftp_build_path ( gftp_request * request,
7f54d0c0edbc 2004-9-17 Brian Masney <masneyb@gftp.org>
masneyb
parents: 553
diff changeset
807 const char *first_element,
227
a85a097bbb02 2003-7-20 Brian Masney <masneyb@gftp.org>
masneyb
parents: 218
diff changeset
808 ... );
a85a097bbb02 2003-7-20 Brian Masney <masneyb@gftp.org>
masneyb
parents: 218
diff changeset
809
290
6e255984c0b0 2003-10-18 Brian Masney <masneyb@gftp.org>
masneyb
parents: 275
diff changeset
810 void gftp_locale_init ( void );
6e255984c0b0 2003-10-18 Brian Masney <masneyb@gftp.org>
masneyb
parents: 275
diff changeset
811
330
532eb171d5c2 2003-12-7 Brian Masney <masneyb@gftp.org>
masneyb
parents: 325
diff changeset
812 char * gftp_scramble_password ( const char *password );
532eb171d5c2 2003-12-7 Brian Masney <masneyb@gftp.org>
masneyb
parents: 325
diff changeset
813
532eb171d5c2 2003-12-7 Brian Masney <masneyb@gftp.org>
masneyb
parents: 325
diff changeset
814 char * gftp_descramble_password ( const char *password );
532eb171d5c2 2003-12-7 Brian Masney <masneyb@gftp.org>
masneyb
parents: 325
diff changeset
815
378
712d3810f4e1 2003-1-27 Brian Masney <masneyb@gftp.org>
masneyb
parents: 377
diff changeset
816 int gftp_get_transfer_action ( gftp_request * request,
712d3810f4e1 2003-1-27 Brian Masney <masneyb@gftp.org>
masneyb
parents: 377
diff changeset
817 gftp_file * fle );
712d3810f4e1 2003-1-27 Brian Masney <masneyb@gftp.org>
masneyb
parents: 377
diff changeset
818
483
4376ffeab64e 2004-6-13 Brian Masney <masneyb@gftp.org>
masneyb
parents: 478
diff changeset
819 char * gftp_get_share_dir ( void );
4376ffeab64e 2004-6-13 Brian Masney <masneyb@gftp.org>
masneyb
parents: 478
diff changeset
820
402
57087926bf03 2004-2-16 Brian Masney <masneyb@gftp.org>
masneyb
parents: 389
diff changeset
821 /* mkstemps.c */
57087926bf03 2004-2-16 Brian Masney <masneyb@gftp.org>
masneyb
parents: 389
diff changeset
822 int mkstemps ( char *template,
57087926bf03 2004-2-16 Brian Masney <masneyb@gftp.org>
masneyb
parents: 389
diff changeset
823 int suffix_len );
57087926bf03 2004-2-16 Brian Masney <masneyb@gftp.org>
masneyb
parents: 389
diff changeset
824
1
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
825 /* protocols.c */
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
826 #define GFTP_FTP_NUM 0
389
b39a312323ec 2003-2-3 Brian Masney <masneyb@gftp.org>
masneyb
parents: 387
diff changeset
827 #define GFTP_FTPS_NUM 1
b39a312323ec 2003-2-3 Brian Masney <masneyb@gftp.org>
masneyb
parents: 387
diff changeset
828 #define GFTP_HTTP_NUM 2
b39a312323ec 2003-2-3 Brian Masney <masneyb@gftp.org>
masneyb
parents: 387
diff changeset
829 #define GFTP_HTTPS_NUM 3
b39a312323ec 2003-2-3 Brian Masney <masneyb@gftp.org>
masneyb
parents: 387
diff changeset
830 #define GFTP_LOCAL_NUM 4
b39a312323ec 2003-2-3 Brian Masney <masneyb@gftp.org>
masneyb
parents: 387
diff changeset
831 #define GFTP_SSHV2_NUM 5
b39a312323ec 2003-2-3 Brian Masney <masneyb@gftp.org>
masneyb
parents: 387
diff changeset
832 #define GFTP_BOOKMARK_NUM 6
661
2e718fba351e 2005-1-16 Brian Masney <masneyb@gftp.org>
masneyb
parents: 649
diff changeset
833 #define GFTP_FSP_NUM 7
122
76e2b58a9440 2003-4-5 Brian Masney <masneyb@gftp.org>
masneyb
parents: 102
diff changeset
834
1
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
835 #define GFTP_IS_CONNECTED(request) ((request) != NULL && \
169
d40f9db52cdf 2003-6-8 Brian Masney <masneyb@gftp.org>
masneyb
parents: 168
diff changeset
836 ((request)->datafd > 0 || \
58
c01d91c10f6c 2002-11-20 Brian Masney <masneyb@gftp.org>
masneyb
parents: 56
diff changeset
837 (request)->cached || \
c01d91c10f6c 2002-11-20 Brian Masney <masneyb@gftp.org>
masneyb
parents: 56
diff changeset
838 (request)->always_connected))
1
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
839
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
840
173
4c288d05b26a 2003-6-8 Brian Masney <masneyb@gftp.org>
masneyb
parents: 169
diff changeset
841 int rfc959_init ( gftp_request * request );
1
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
842
122
76e2b58a9440 2003-4-5 Brian Masney <masneyb@gftp.org>
masneyb
parents: 102
diff changeset
843 void rfc959_register_module ( void );
76e2b58a9440 2003-4-5 Brian Masney <masneyb@gftp.org>
masneyb
parents: 102
diff changeset
844
1
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
845 int rfc959_get_next_file ( gftp_request * request,
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
846 gftp_file *fle,
58
c01d91c10f6c 2002-11-20 Brian Masney <masneyb@gftp.org>
masneyb
parents: 56
diff changeset
847 int fd );
1
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
848
451
83cfffb2878a 2004-3-26 Brian Masney <masneyb@gftp.org>
masneyb
parents: 442
diff changeset
849 int rfc959_connect ( gftp_request * request );
83cfffb2878a 2004-3-26 Brian Masney <masneyb@gftp.org>
masneyb
parents: 442
diff changeset
850
389
b39a312323ec 2003-2-3 Brian Masney <masneyb@gftp.org>
masneyb
parents: 387
diff changeset
851 int ftps_init ( gftp_request * request );
b39a312323ec 2003-2-3 Brian Masney <masneyb@gftp.org>
masneyb
parents: 387
diff changeset
852
b39a312323ec 2003-2-3 Brian Masney <masneyb@gftp.org>
masneyb
parents: 387
diff changeset
853 void ftps_register_module ( void );
b39a312323ec 2003-2-3 Brian Masney <masneyb@gftp.org>
masneyb
parents: 387
diff changeset
854
173
4c288d05b26a 2003-6-8 Brian Masney <masneyb@gftp.org>
masneyb
parents: 169
diff changeset
855 int rfc2068_init ( gftp_request * request );
1
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
856
122
76e2b58a9440 2003-4-5 Brian Masney <masneyb@gftp.org>
masneyb
parents: 102
diff changeset
857 void rfc2068_register_module ( void );
76e2b58a9440 2003-4-5 Brian Masney <masneyb@gftp.org>
masneyb
parents: 102
diff changeset
858
173
4c288d05b26a 2003-6-8 Brian Masney <masneyb@gftp.org>
masneyb
parents: 169
diff changeset
859 int https_init ( gftp_request * request );
168
c505d9ba9d53 2003-6-6 Brian Masney <masneyb@gftp.org>
masneyb
parents: 151
diff changeset
860
c505d9ba9d53 2003-6-6 Brian Masney <masneyb@gftp.org>
masneyb
parents: 151
diff changeset
861 void https_register_module ( void );
c505d9ba9d53 2003-6-6 Brian Masney <masneyb@gftp.org>
masneyb
parents: 151
diff changeset
862
173
4c288d05b26a 2003-6-8 Brian Masney <masneyb@gftp.org>
masneyb
parents: 169
diff changeset
863 int local_init ( gftp_request * request );
1
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
864
122
76e2b58a9440 2003-4-5 Brian Masney <masneyb@gftp.org>
masneyb
parents: 102
diff changeset
865 void local_register_module ( void );
76e2b58a9440 2003-4-5 Brian Masney <masneyb@gftp.org>
masneyb
parents: 102
diff changeset
866
173
4c288d05b26a 2003-6-8 Brian Masney <masneyb@gftp.org>
masneyb
parents: 169
diff changeset
867 int sshv2_init ( gftp_request * request );
1
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
868
122
76e2b58a9440 2003-4-5 Brian Masney <masneyb@gftp.org>
masneyb
parents: 102
diff changeset
869 void sshv2_register_module ( void );
76e2b58a9440 2003-4-5 Brian Masney <masneyb@gftp.org>
masneyb
parents: 102
diff changeset
870
174
e643d287fe32 2003-6-8 Brian Masney <masneyb@gftp.org>
masneyb
parents: 173
diff changeset
871 void ssl_register_module ( void );
e643d287fe32 2003-6-8 Brian Masney <masneyb@gftp.org>
masneyb
parents: 173
diff changeset
872
173
4c288d05b26a 2003-6-8 Brian Masney <masneyb@gftp.org>
masneyb
parents: 169
diff changeset
873 int bookmark_init ( gftp_request * request );
1
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
874
122
76e2b58a9440 2003-4-5 Brian Masney <masneyb@gftp.org>
masneyb
parents: 102
diff changeset
875 void bookmark_register_module ( void );
76e2b58a9440 2003-4-5 Brian Masney <masneyb@gftp.org>
masneyb
parents: 102
diff changeset
876
661
2e718fba351e 2005-1-16 Brian Masney <masneyb@gftp.org>
masneyb
parents: 649
diff changeset
877 int fsp_init ( gftp_request * request );
2e718fba351e 2005-1-16 Brian Masney <masneyb@gftp.org>
masneyb
parents: 649
diff changeset
878
2e718fba351e 2005-1-16 Brian Masney <masneyb@gftp.org>
masneyb
parents: 649
diff changeset
879 void fsp_register_module ( void );
2e718fba351e 2005-1-16 Brian Masney <masneyb@gftp.org>
masneyb
parents: 649
diff changeset
880
1
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
881 gftp_request *gftp_request_new ( void );
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
882
67
aa971a4bb16f 2002-11-27 Brian Masney <masneyb@gftp.org>
masneyb
parents: 63
diff changeset
883 void gftp_request_destroy ( gftp_request * request,
aa971a4bb16f 2002-11-27 Brian Masney <masneyb@gftp.org>
masneyb
parents: 63
diff changeset
884 int free_request );
1
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
885
309
cc2eeb30b793 2003-11-7 Brian Masney <masneyb@gftp.org>
masneyb
parents: 305
diff changeset
886 void gftp_copy_param_options ( gftp_request * dest_request,
cc2eeb30b793 2003-11-7 Brian Masney <masneyb@gftp.org>
masneyb
parents: 305
diff changeset
887 gftp_request * src_request );
cc2eeb30b793 2003-11-7 Brian Masney <masneyb@gftp.org>
masneyb
parents: 305
diff changeset
888
598
fa0838b22b14 2004-10-29 Brian Masney <masneyb@gftp.org>
masneyb
parents: 572
diff changeset
889 void gftp_file_destroy ( gftp_file *file,
fa0838b22b14 2004-10-29 Brian Masney <masneyb@gftp.org>
masneyb
parents: 572
diff changeset
890 int free_it );
1
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
891
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
892 int gftp_connect ( gftp_request * request );
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
893
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
894 void gftp_disconnect ( gftp_request * request );
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
895
58
c01d91c10f6c 2002-11-20 Brian Masney <masneyb@gftp.org>
masneyb
parents: 56
diff changeset
896 off_t gftp_get_file ( gftp_request * request,
1
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
897 const char *filename,
244
afbbc72b73e2 2003-8-3 Brian Masney <masneyb@gftp.org>
masneyb
parents: 243
diff changeset
898 off_t startsize );
1
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
899
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
900 int gftp_put_file ( gftp_request * request,
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
901 const char *filename,
244
afbbc72b73e2 2003-8-3 Brian Masney <masneyb@gftp.org>
masneyb
parents: 243
diff changeset
902 off_t startsize,
afbbc72b73e2 2003-8-3 Brian Masney <masneyb@gftp.org>
masneyb
parents: 243
diff changeset
903 off_t totalsize );
1
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
904
261
dbf13a10be13 2003-8-20 Brian Masney <masneyb@gftp.org>
masneyb
parents: 253
diff changeset
905 off_t gftp_transfer_file ( gftp_request *fromreq,
1
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
906 const char *fromfile,
244
afbbc72b73e2 2003-8-3 Brian Masney <masneyb@gftp.org>
masneyb
parents: 243
diff changeset
907 off_t fromsize,
1
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
908 gftp_request *toreq,
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
909 const char *tofile,
244
afbbc72b73e2 2003-8-3 Brian Masney <masneyb@gftp.org>
masneyb
parents: 243
diff changeset
910 off_t tosize );
1
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
911
58
c01d91c10f6c 2002-11-20 Brian Masney <masneyb@gftp.org>
masneyb
parents: 56
diff changeset
912 ssize_t gftp_get_next_file_chunk ( gftp_request * request,
1
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
913 char *buf,
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
914 size_t size );
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
915
58
c01d91c10f6c 2002-11-20 Brian Masney <masneyb@gftp.org>
masneyb
parents: 56
diff changeset
916 ssize_t gftp_put_next_file_chunk ( gftp_request * request,
1
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
917 char *buf,
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
918 size_t size );
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
919
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
920 int gftp_list_files ( gftp_request * request );
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
921
765
d553d14a2565 2006-7-13 Brian Masney <masneyb@gftp.org>
masneyb
parents: 661
diff changeset
922 /*@null@*/ char * gftp_string_to_utf8 ( gftp_request * request,
838
57aad6d4b304 2006-10-31 Brian Masney <masneyb@gftp.org>
masneyb
parents: 832
diff changeset
923 const char *str,
57aad6d4b304 2006-10-31 Brian Masney <masneyb@gftp.org>
masneyb
parents: 832
diff changeset
924 size_t *dest_len );
291
265244924868 2003-10-19 Brian Masney <masneyb@gftp.org>
masneyb
parents: 290
diff changeset
925
765
d553d14a2565 2006-7-13 Brian Masney <masneyb@gftp.org>
masneyb
parents: 661
diff changeset
926 /*@null@*/ char * gftp_string_from_utf8 ( gftp_request * request,
845
8263cc35c027 2006-11-2 Brian Masney <masneyb@gftp.org>
masneyb
parents: 842
diff changeset
927 int force_local,
8263cc35c027 2006-11-2 Brian Masney <masneyb@gftp.org>
masneyb
parents: 842
diff changeset
928 const char *str,
8263cc35c027 2006-11-2 Brian Masney <masneyb@gftp.org>
masneyb
parents: 842
diff changeset
929 size_t *dest_len );
8263cc35c027 2006-11-2 Brian Masney <masneyb@gftp.org>
masneyb
parents: 842
diff changeset
930
8263cc35c027 2006-11-2 Brian Masney <masneyb@gftp.org>
masneyb
parents: 842
diff changeset
931 /*@null@*/ char * gftp_filename_to_utf8 ( gftp_request * request,
8263cc35c027 2006-11-2 Brian Masney <masneyb@gftp.org>
masneyb
parents: 842
diff changeset
932 const char *str,
8263cc35c027 2006-11-2 Brian Masney <masneyb@gftp.org>
masneyb
parents: 842
diff changeset
933 size_t *dest_len );
8263cc35c027 2006-11-2 Brian Masney <masneyb@gftp.org>
masneyb
parents: 842
diff changeset
934
8263cc35c027 2006-11-2 Brian Masney <masneyb@gftp.org>
masneyb
parents: 842
diff changeset
935 /*@null@*/ char * gftp_filename_from_utf8 ( gftp_request * request,
838
57aad6d4b304 2006-10-31 Brian Masney <masneyb@gftp.org>
masneyb
parents: 832
diff changeset
936 const char *str,
57aad6d4b304 2006-10-31 Brian Masney <masneyb@gftp.org>
masneyb
parents: 832
diff changeset
937 size_t *dest_len );
186
13ca1defdc75 2003-6-16 Brian Masney <masneyb@gftp.org>
masneyb
parents: 184
diff changeset
938
87
6df043359b41 2003-1-11 Brian Masney <masneyb@gftp.org>
masneyb
parents: 86
diff changeset
939 int gftp_parse_bookmark ( gftp_request * request,
243
b42e7233533a 2003-7-31 Brian Masney <masneyb@gftp.org>
masneyb
parents: 235
diff changeset
940 gftp_request * local_request,
275
5810b0f97eee 2003-9-21 Brian Masney <masneyb@gftp.org>
masneyb
parents: 261
diff changeset
941 const char * bookmark,
5810b0f97eee 2003-9-21 Brian Masney <masneyb@gftp.org>
masneyb
parents: 261
diff changeset
942 int *refresh_local );
87
6df043359b41 2003-1-11 Brian Masney <masneyb@gftp.org>
masneyb
parents: 86
diff changeset
943
1
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
944 int gftp_parse_url ( gftp_request * request,
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
945 const char *url );
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
946
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
947 int gftp_get_next_file ( gftp_request * request,
377
14da115b149b 2003-1-23 Brian Masney <masneyb@gftp.org>
masneyb
parents: 374
diff changeset
948 const char *filespec,
1
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
949 gftp_file *fle );
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
950
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
951 int gftp_end_transfer ( gftp_request * request );
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
952
40
66c064fd05bc 2002-10-17 Brian Masney <masneyb@gftp.org>
masneyb
parents: 37
diff changeset
953 int gftp_abort_transfer ( gftp_request * request );
66c064fd05bc 2002-10-17 Brian Masney <masneyb@gftp.org>
masneyb
parents: 37
diff changeset
954
520
e67a52327b24 2004-7-27 Brian Masney <masneyb@gftp.org>
masneyb
parents: 516
diff changeset
955 int gftp_stat_filename ( gftp_request * request,
e67a52327b24 2004-7-27 Brian Masney <masneyb@gftp.org>
masneyb
parents: 516
diff changeset
956 const char *filename,
787
3751478bb260 2006-7-27 Brian Masney <masneyb@gftp.org>
masneyb
parents: 765
diff changeset
957 mode_t * mode,
3751478bb260 2006-7-27 Brian Masney <masneyb@gftp.org>
masneyb
parents: 765
diff changeset
958 off_t * filesize );
500
ba50a7085d93 2004-7-13 Brian Masney <masneyb@gftp.org>
masneyb
parents: 499
diff changeset
959
1
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
960 void gftp_set_hostname ( gftp_request * request,
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
961 const char *hostname );
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
962
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
963 void gftp_set_username ( gftp_request * request,
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
964 const char *username );
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
965
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
966 void gftp_set_password ( gftp_request * request,
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
967 const char *password );
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
968
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
969 void gftp_set_account ( gftp_request * request,
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
970 const char *account );
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
971
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
972 int gftp_set_directory ( gftp_request * request,
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
973 const char *directory );
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
974
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
975 void gftp_set_port ( gftp_request * request,
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
976 unsigned int port );
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
977
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
978 int gftp_remove_directory ( gftp_request * request,
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
979 const char *directory );
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
980
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
981 int gftp_remove_file ( gftp_request * request,
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
982 const char *file );
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
983
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
984 int gftp_make_directory ( gftp_request * request,
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
985 const char *directory );
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
986
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
987 int gftp_rename_file ( gftp_request * request,
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
988 const char *oldname,
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
989 const char *newname );
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
990
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
991 int gftp_chmod ( gftp_request * request,
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
992 const char *file,
499
39e9945288ea 2004-7-13 Brian Masney <masneyb@gftp.org>
masneyb
parents: 485
diff changeset
993 mode_t mode );
1
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
994
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
995 int gftp_set_file_time ( gftp_request * request,
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
996 const char *file,
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
997 time_t datetime );
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
998
765
d553d14a2565 2006-7-13 Brian Masney <masneyb@gftp.org>
masneyb
parents: 661
diff changeset
999 int gftp_site_cmd ( gftp_request * request,
478
97fd5eb34be0 2004-6-6 Brian Masney <masneyb@gftp.org>
masneyb
parents: 469
diff changeset
1000 int specify_site,
1
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
1001 const char *command );
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
1002
58
c01d91c10f6c 2002-11-20 Brian Masney <masneyb@gftp.org>
masneyb
parents: 56
diff changeset
1003 off_t gftp_get_file_size ( gftp_request * request,
1
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
1004 const char *filename );
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
1005
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
1006 void gftp_calc_kbs ( gftp_transfer * tdata,
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
1007 ssize_t num_read );
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
1008
102
3b573c8ef706 2003-2-6 Brian Masney <masneyb@gftp.org>
masneyb
parents: 101
diff changeset
1009 time_t parse_time ( char *str,
3b573c8ef706 2003-2-6 Brian Masney <masneyb@gftp.org>
masneyb
parents: 101
diff changeset
1010 char **endpos );
3b573c8ef706 2003-2-6 Brian Masney <masneyb@gftp.org>
masneyb
parents: 101
diff changeset
1011
91
8c37d73d3f1f 2003-1-21 Brian Masney <masneyb@gftp.org>
masneyb
parents: 87
diff changeset
1012 int gftp_parse_ls ( gftp_request * request,
8c37d73d3f1f 2003-1-21 Brian Masney <masneyb@gftp.org>
masneyb
parents: 87
diff changeset
1013 const char *lsoutput,
485
7334a74db6f6 2004-6-15 Brian Masney <masneyb@gftp.org>
masneyb
parents: 484
diff changeset
1014 gftp_file *fle,
7334a74db6f6 2004-6-15 Brian Masney <masneyb@gftp.org>
masneyb
parents: 484
diff changeset
1015 int fd );
1
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
1016
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
1017 int gftp_get_all_subdirs ( gftp_transfer * transfer,
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
1018 void (*update_func)
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
1019 ( gftp_transfer * transfer ));
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
1020
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
1021 int gftp_connect_server ( gftp_request * request,
122
76e2b58a9440 2003-4-5 Brian Masney <masneyb@gftp.org>
masneyb
parents: 102
diff changeset
1022 char *service,
76e2b58a9440 2003-4-5 Brian Masney <masneyb@gftp.org>
masneyb
parents: 102
diff changeset
1023 char *proxy_hostname,
516
fbb5a02beddb 2004-7-26 Brian Masney <masneyb@gftp.org>
masneyb
parents: 500
diff changeset
1024 unsigned int proxy_port );
1
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
1025
122
76e2b58a9440 2003-4-5 Brian Masney <masneyb@gftp.org>
masneyb
parents: 102
diff changeset
1026 #if !defined (HAVE_GETADDRINFO) || !defined (HAVE_GAI_STRERROR)
1
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
1027
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
1028 struct hostent *r_gethostbyname ( const char *name,
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
1029 struct hostent *result_buf,
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
1030 int *h_errnop );
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
1031
56
a12bcbc2fce4 2002-11-11 Brian Masney <masneyb@gftp.org>
masneyb
parents: 48
diff changeset
1032 #endif
a12bcbc2fce4 2002-11-11 Brian Masney <masneyb@gftp.org>
masneyb
parents: 48
diff changeset
1033
1
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
1034 struct servent *r_getservbyname ( const char *name,
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
1035 const char *proto,
765
d553d14a2565 2006-7-13 Brian Masney <masneyb@gftp.org>
masneyb
parents: 661
diff changeset
1036 /*@out@*/ struct servent *result_buf,
1
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
1037 int *h_errnop );
122
76e2b58a9440 2003-4-5 Brian Masney <masneyb@gftp.org>
masneyb
parents: 102
diff changeset
1038
177
aec4b4541d3a 2003-6-9 Brian Masney <masneyb@gftp.org>
masneyb
parents: 174
diff changeset
1039 int gftp_set_config_options ( gftp_request * request );
1
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
1040
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
1041 void print_file_list ( GList * list );
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
1042
201
0098dae654a5 2003-6-25 Brian Masney <masneyb@gftp.org>
masneyb
parents: 199
diff changeset
1043 void gftp_free_getline_buffer ( gftp_getline_buffer ** rbuf );
168
c505d9ba9d53 2003-6-6 Brian Masney <masneyb@gftp.org>
masneyb
parents: 151
diff changeset
1044
58
c01d91c10f6c 2002-11-20 Brian Masney <masneyb@gftp.org>
masneyb
parents: 56
diff changeset
1045 ssize_t gftp_get_line ( gftp_request * request,
765
d553d14a2565 2006-7-13 Brian Masney <masneyb@gftp.org>
masneyb
parents: 661
diff changeset
1046 /*@out@*/ gftp_getline_buffer ** rbuf,
d553d14a2565 2006-7-13 Brian Masney <masneyb@gftp.org>
masneyb
parents: 661
diff changeset
1047 /*@out@*/ char * str,
41
4bcfaf6307b5 2002-10-29 Brian Masney <masneyb@gftp.org>
masneyb
parents: 40
diff changeset
1048 size_t len,
58
c01d91c10f6c 2002-11-20 Brian Masney <masneyb@gftp.org>
masneyb
parents: 56
diff changeset
1049 int fd );
c01d91c10f6c 2002-11-20 Brian Masney <masneyb@gftp.org>
masneyb
parents: 56
diff changeset
1050
168
c505d9ba9d53 2003-6-6 Brian Masney <masneyb@gftp.org>
masneyb
parents: 151
diff changeset
1051 ssize_t gftp_fd_read ( gftp_request * request,
58
c01d91c10f6c 2002-11-20 Brian Masney <masneyb@gftp.org>
masneyb
parents: 56
diff changeset
1052 void *ptr,
c01d91c10f6c 2002-11-20 Brian Masney <masneyb@gftp.org>
masneyb
parents: 56
diff changeset
1053 size_t size,
c01d91c10f6c 2002-11-20 Brian Masney <masneyb@gftp.org>
masneyb
parents: 56
diff changeset
1054 int fd );
41
4bcfaf6307b5 2002-10-29 Brian Masney <masneyb@gftp.org>
masneyb
parents: 40
diff changeset
1055
168
c505d9ba9d53 2003-6-6 Brian Masney <masneyb@gftp.org>
masneyb
parents: 151
diff changeset
1056 ssize_t gftp_fd_write ( gftp_request * request,
58
c01d91c10f6c 2002-11-20 Brian Masney <masneyb@gftp.org>
masneyb
parents: 56
diff changeset
1057 const char *ptr,
41
4bcfaf6307b5 2002-10-29 Brian Masney <masneyb@gftp.org>
masneyb
parents: 40
diff changeset
1058 size_t size,
58
c01d91c10f6c 2002-11-20 Brian Masney <masneyb@gftp.org>
masneyb
parents: 56
diff changeset
1059 int fd );
c01d91c10f6c 2002-11-20 Brian Masney <masneyb@gftp.org>
masneyb
parents: 56
diff changeset
1060
c01d91c10f6c 2002-11-20 Brian Masney <masneyb@gftp.org>
masneyb
parents: 56
diff changeset
1061 ssize_t gftp_writefmt ( gftp_request * request,
c01d91c10f6c 2002-11-20 Brian Masney <masneyb@gftp.org>
masneyb
parents: 56
diff changeset
1062 int fd,
c01d91c10f6c 2002-11-20 Brian Masney <masneyb@gftp.org>
masneyb
parents: 56
diff changeset
1063 const char *fmt,
c01d91c10f6c 2002-11-20 Brian Masney <masneyb@gftp.org>
masneyb
parents: 56
diff changeset
1064 ... );
c01d91c10f6c 2002-11-20 Brian Masney <masneyb@gftp.org>
masneyb
parents: 56
diff changeset
1065
168
c505d9ba9d53 2003-6-6 Brian Masney <masneyb@gftp.org>
masneyb
parents: 151
diff changeset
1066 int gftp_fd_set_sockblocking ( gftp_request * request,
58
c01d91c10f6c 2002-11-20 Brian Masney <masneyb@gftp.org>
masneyb
parents: 56
diff changeset
1067 int fd,
c01d91c10f6c 2002-11-20 Brian Masney <masneyb@gftp.org>
masneyb
parents: 56
diff changeset
1068 int non_blocking );
41
4bcfaf6307b5 2002-10-29 Brian Masney <masneyb@gftp.org>
masneyb
parents: 40
diff changeset
1069
63
41b71c4e5076 2002-11-2333 Brian Masney <masneyb@gftp.org>
masneyb
parents: 58
diff changeset
1070 void gftp_swap_socks ( gftp_request * dest,
41b71c4e5076 2002-11-2333 Brian Masney <masneyb@gftp.org>
masneyb
parents: 58
diff changeset
1071 gftp_request * source );
41b71c4e5076 2002-11-2333 Brian Masney <masneyb@gftp.org>
masneyb
parents: 58
diff changeset
1072
122
76e2b58a9440 2003-4-5 Brian Masney <masneyb@gftp.org>
masneyb
parents: 102
diff changeset
1073 void gftp_calc_kbs ( gftp_transfer * tdata,
76e2b58a9440 2003-4-5 Brian Masney <masneyb@gftp.org>
masneyb
parents: 102
diff changeset
1074 ssize_t num_read );
76e2b58a9440 2003-4-5 Brian Masney <masneyb@gftp.org>
masneyb
parents: 102
diff changeset
1075
125
b875de05c22d 2003-4-8 Brian Masney <masneyb@gftp.org>
masneyb
parents: 124
diff changeset
1076 int gftp_get_transfer_status ( gftp_transfer * tdata,
b875de05c22d 2003-4-8 Brian Masney <masneyb@gftp.org>
masneyb
parents: 124
diff changeset
1077 ssize_t num_read );
b875de05c22d 2003-4-8 Brian Masney <masneyb@gftp.org>
masneyb
parents: 124
diff changeset
1078
182
33b394ebba68 2003-6-15 Brian Masney <masneyb@gftp.org>
masneyb
parents: 179
diff changeset
1079 int gftp_fd_open ( gftp_request * request,
33b394ebba68 2003-6-15 Brian Masney <masneyb@gftp.org>
masneyb
parents: 179
diff changeset
1080 const char *pathname,
33b394ebba68 2003-6-15 Brian Masney <masneyb@gftp.org>
masneyb
parents: 179
diff changeset
1081 int flags,
33b394ebba68 2003-6-15 Brian Masney <masneyb@gftp.org>
masneyb
parents: 179
diff changeset
1082 mode_t perms );
33b394ebba68 2003-6-15 Brian Masney <masneyb@gftp.org>
masneyb
parents: 179
diff changeset
1083
792
37bc51131e2d 2006-7-29 Brian Masney <masneyb@gftp.org>
masneyb
parents: 787
diff changeset
1084 void gftp_setup_startup_directory ( gftp_request * request,
37bc51131e2d 2006-7-29 Brian Masney <masneyb@gftp.org>
masneyb
parents: 787
diff changeset
1085 const char *option_name );
422
38bfc112ab46 2004-3-14 Brian Masney <masneyb@gftp.org>
masneyb
parents: 402
diff changeset
1086
542
fd9ce7797984 2004-8-21 Brian Masney <masneyb@gftp.org>
masneyb
parents: 532
diff changeset
1087 unsigned int gftp_protocol_default_port ( gftp_request * request );
fd9ce7797984 2004-8-21 Brian Masney <masneyb@gftp.org>
masneyb
parents: 532
diff changeset
1088
146
782f84694489 2003-4-25 Brian Masney <masneyb@gftp.org>
masneyb
parents: 139
diff changeset
1089 /* pty.c */
210
82ebd1b05345 2003-7-6 Brian Masney <masneyb@gftp.org>
masneyb
parents: 207
diff changeset
1090 char * gftp_get_pty_impl ( void );
179
8d933999bba6 2003-6-14 Brian Masney <masneyb@gftp.org>
masneyb
parents: 178
diff changeset
1091
458
656a0b3d1403 2004-4-10 Brian Masney <masneyb@gftp.org>
masneyb
parents: 451
diff changeset
1092 pid_t gftp_exec ( gftp_request * request,
656a0b3d1403 2004-4-10 Brian Masney <masneyb@gftp.org>
masneyb
parents: 451
diff changeset
1093 int *fdm,
656a0b3d1403 2004-4-10 Brian Masney <masneyb@gftp.org>
masneyb
parents: 451
diff changeset
1094 int *ptymfd,
210
82ebd1b05345 2003-7-6 Brian Masney <masneyb@gftp.org>
masneyb
parents: 207
diff changeset
1095 char **args );
146
782f84694489 2003-4-25 Brian Masney <masneyb@gftp.org>
masneyb
parents: 139
diff changeset
1096
499
39e9945288ea 2004-7-13 Brian Masney <masneyb@gftp.org>
masneyb
parents: 485
diff changeset
1097 char *gftp_convert_attributes_from_mode_t ( mode_t mode );
39e9945288ea 2004-7-13 Brian Masney <masneyb@gftp.org>
masneyb
parents: 485
diff changeset
1098
39e9945288ea 2004-7-13 Brian Masney <masneyb@gftp.org>
masneyb
parents: 485
diff changeset
1099 mode_t gftp_convert_attributes_to_mode_t ( char *attribs );
39e9945288ea 2004-7-13 Brian Masney <masneyb@gftp.org>
masneyb
parents: 485
diff changeset
1100
39e9945288ea 2004-7-13 Brian Masney <masneyb@gftp.org>
masneyb
parents: 485
diff changeset
1101
168
c505d9ba9d53 2003-6-6 Brian Masney <masneyb@gftp.org>
masneyb
parents: 151
diff changeset
1102 #ifdef USE_SSL
c505d9ba9d53 2003-6-6 Brian Masney <masneyb@gftp.org>
masneyb
parents: 151
diff changeset
1103 /* sslcommon.c */
c505d9ba9d53 2003-6-6 Brian Masney <masneyb@gftp.org>
masneyb
parents: 151
diff changeset
1104 int gftp_ssl_startup ( gftp_request * request );
c505d9ba9d53 2003-6-6 Brian Masney <masneyb@gftp.org>
masneyb
parents: 151
diff changeset
1105
c505d9ba9d53 2003-6-6 Brian Masney <masneyb@gftp.org>
masneyb
parents: 151
diff changeset
1106 int gftp_ssl_session_setup ( gftp_request * request );
c505d9ba9d53 2003-6-6 Brian Masney <masneyb@gftp.org>
masneyb
parents: 151
diff changeset
1107
c505d9ba9d53 2003-6-6 Brian Masney <masneyb@gftp.org>
masneyb
parents: 151
diff changeset
1108 void gftp_ssl_free ( gftp_request * request );
c505d9ba9d53 2003-6-6 Brian Masney <masneyb@gftp.org>
masneyb
parents: 151
diff changeset
1109
c505d9ba9d53 2003-6-6 Brian Masney <masneyb@gftp.org>
masneyb
parents: 151
diff changeset
1110 ssize_t gftp_ssl_read ( gftp_request * request,
c505d9ba9d53 2003-6-6 Brian Masney <masneyb@gftp.org>
masneyb
parents: 151
diff changeset
1111 void *ptr,
c505d9ba9d53 2003-6-6 Brian Masney <masneyb@gftp.org>
masneyb
parents: 151
diff changeset
1112 size_t size,
c505d9ba9d53 2003-6-6 Brian Masney <masneyb@gftp.org>
masneyb
parents: 151
diff changeset
1113 int fd );
c505d9ba9d53 2003-6-6 Brian Masney <masneyb@gftp.org>
masneyb
parents: 151
diff changeset
1114
c505d9ba9d53 2003-6-6 Brian Masney <masneyb@gftp.org>
masneyb
parents: 151
diff changeset
1115 ssize_t gftp_ssl_write ( gftp_request * request,
c505d9ba9d53 2003-6-6 Brian Masney <masneyb@gftp.org>
masneyb
parents: 151
diff changeset
1116 const char *ptr,
c505d9ba9d53 2003-6-6 Brian Masney <masneyb@gftp.org>
masneyb
parents: 151
diff changeset
1117 size_t size,
c505d9ba9d53 2003-6-6 Brian Masney <masneyb@gftp.org>
masneyb
parents: 151
diff changeset
1118 int fd );
c505d9ba9d53 2003-6-6 Brian Masney <masneyb@gftp.org>
masneyb
parents: 151
diff changeset
1119 #endif /* USE_SSL */
c505d9ba9d53 2003-6-6 Brian Masney <masneyb@gftp.org>
masneyb
parents: 151
diff changeset
1120
460
075f89b4395c 2004-4-14 Brian Masney <masneyb@gftp.org>
masneyb
parents: 458
diff changeset
1121 /* UI dependent functions that must be implemented */
075f89b4395c 2004-4-14 Brian Masney <masneyb@gftp.org>
masneyb
parents: 458
diff changeset
1122 int gftpui_protocol_ask_yes_no ( gftp_request * request,
075f89b4395c 2004-4-14 Brian Masney <masneyb@gftp.org>
masneyb
parents: 458
diff changeset
1123 char *title,
075f89b4395c 2004-4-14 Brian Masney <masneyb@gftp.org>
masneyb
parents: 458
diff changeset
1124 char *question );
075f89b4395c 2004-4-14 Brian Masney <masneyb@gftp.org>
masneyb
parents: 458
diff changeset
1125
484
632036c6e4a4 2004-6-15 Brian Masney <masneyb@gftp.org>
masneyb
parents: 483
diff changeset
1126 char *gftpui_protocol_ask_user_input ( gftp_request * request,
632036c6e4a4 2004-6-15 Brian Masney <masneyb@gftp.org>
masneyb
parents: 483
diff changeset
1127 char *title,
632036c6e4a4 2004-6-15 Brian Masney <masneyb@gftp.org>
masneyb
parents: 483
diff changeset
1128 char *question,
632036c6e4a4 2004-6-15 Brian Masney <masneyb@gftp.org>
masneyb
parents: 483
diff changeset
1129 int shown );
632036c6e4a4 2004-6-15 Brian Masney <masneyb@gftp.org>
masneyb
parents: 483
diff changeset
1130
469
2ad1916dc611 2004-5-16 Brian Masney <masneyb@gftp.org>
masneyb
parents: 460
diff changeset
1131 void gftpui_protocol_update_timeout ( gftp_request * request );
2ad1916dc611 2004-5-16 Brian Masney <masneyb@gftp.org>
masneyb
parents: 460
diff changeset
1132
1
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
1133 #endif
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
1134