]>
git.ipfire.org Git - thirdparty/squid.git/blob - src/ftp/Elements.h
645d41cd68695a9b582cf2a920b665d6239ce5d6
2 * Copyright (C) 1996-2020 The Squid Software Foundation and contributors
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.
9 #ifndef SQUID_FTP_ELEMENTS_H
10 #define SQUID_FTP_ELEMENTS_H
12 #include "http/forward.h"
13 #include "http/StatusCode.h"
14 #include "sbuf/forward.h"
18 class ProtocolVersion
;
24 /// Protocol version to use in Http::Message structures wrapping FTP messages.
25 AnyP::ProtocolVersion
ProtocolVersion();
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
);
30 /* FTP Commands used by Squid. ALLCAPS case. Safe for static initializaton. */
31 const SBuf
&cmdAppe();
32 const SBuf
&cmdAuth();
34 const SBuf
&cmdDele();
35 const SBuf
&cmdEprt();
36 const SBuf
&cmdEpsv();
37 const SBuf
&cmdList();
39 const SBuf
&cmdMlsd();
40 const SBuf
&cmdMlst();
41 const SBuf
&cmdNlst();
42 const SBuf
&cmdRetr();
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();
52 /// whether this is an informational 1xx response status code
53 inline bool Is1xx(const int sc
) { return Http::scContinue
<= sc
&& sc
< Http::scOkay
; }
57 #endif /* SQUID_FTP_ELEMENTS_H */