]>
Commit | Line | Data |
---|---|---|
bbc27441 | 1 | /* |
5b74111a | 2 | * Copyright (C) 1996-2018 The Squid Software Foundation and contributors |
bbc27441 AJ |
3 | * |
4 | * Squid software is distributed under GPLv2+ license and includes | |
5 | * contributions from numerous individuals and organizations. | |
6 | * Please see the COPYING and CONTRIBUTORS files for details. | |
7 | */ | |
8 | ||
1ab04517 AR |
9 | #ifndef SQUID_FTP_ELEMENTS_H |
10 | #define SQUID_FTP_ELEMENTS_H | |
11 | ||
63df1d28 | 12 | #include "http/forward.h" |
43446566 | 13 | #include "http/StatusCode.h" |
92e8f3ad | 14 | #include "sbuf/forward.h" |
43446566 | 15 | |
ecb19f1a AR |
16 | namespace AnyP |
17 | { | |
18 | class ProtocolVersion; | |
19 | } | |
20 | ||
27c841f6 AR |
21 | namespace Ftp |
22 | { | |
1ab04517 | 23 | |
63df1d28 | 24 | /// Protocol version to use in Http::Message structures wrapping FTP messages. |
ecb19f1a AR |
25 | AnyP::ProtocolVersion ProtocolVersion(); |
26 | ||
43446566 AR |
27 | /// Create an internal HttpReply structure to house FTP control response info. |
28 | HttpReply *HttpReplyWrapper(const int ftpStatus, const char *ftpReason, const Http::StatusCode httpStatus, const int64_t clen); | |
29 | ||
1ab04517 AR |
30 | /* FTP Commands used by Squid. ALLCAPS case. Safe for static initializaton. */ |
31 | const SBuf &cmdAppe(); | |
32 | const SBuf &cmdAuth(); | |
33 | const SBuf &cmdCwd(); | |
34 | const SBuf &cmdDele(); | |
35 | const SBuf &cmdEprt(); | |
36 | const SBuf &cmdEpsv(); | |
37 | const SBuf &cmdList(); | |
38 | const SBuf &cmdMkd(); | |
39 | const SBuf &cmdMlsd(); | |
40 | const SBuf &cmdMlst(); | |
41 | const SBuf &cmdNlst(); | |
42 | const SBuf &cmdRetr(); | |
43 | const SBuf &cmdRmd(); | |
44 | const SBuf &cmdRnfr(); | |
45 | const SBuf &cmdRnto(); | |
46 | const SBuf &cmdSmnt(); | |
47 | const SBuf &cmdStat(); | |
48 | const SBuf &cmdStor(); | |
49 | const SBuf &cmdStou(); | |
50 | const SBuf &cmdUser(); | |
51 | ||
4f1c93a7 EB |
52 | /// whether this is an informational 1xx response status code |
53 | inline bool Is1xx(const int sc) { return Http::scContinue <= sc && sc < Http::scOkay; } | |
54 | ||
1ab04517 AR |
55 | } // namespace Ftp |
56 | ||
57 | #endif /* SQUID_FTP_ELEMENTS_H */ | |
f53969cc | 58 |