Squid Web Cache v8/master
Loading...
Searching...
No Matches
ProtocolType.h
Go to the documentation of this file.
1/*
2 * Copyright (C) 1996-2025 The Squid Software Foundation and contributors
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
9#ifndef SQUID_SRC_ANYP_PROTOCOLTYPE_H
10#define SQUID_SRC_ANYP_PROTOCOLTYPE_H
11
12#include <ostream>
13
14namespace AnyP
15{
16
17// TODO order by current protocol popularity (eg HTTPS before FTP)
44
45extern const char *ProtocolType_str[];
46
51inline std::ostream &
52operator <<(std::ostream &os, ProtocolType const &p)
53{
54 if (PROTO_NONE <= p && p < PROTO_MAX)
55 os << ProtocolType_str[p];
56 else
57 os << static_cast<int>(p);
58 return os;
59}
60
61} // namespace AnyP
62
63#endif /* SQUID_SRC_ANYP_PROTOCOLTYPE_H */
64
Definition forward.h:15
const char * ProtocolType_str[]
std::ostream & operator<<(std::ostream &, const Host &)
Definition Host.cc:80
@ PROTO_NONE
@ PROTO_HTTPS
@ PROTO_UNKNOWN
@ PROTO_HTCP
@ PROTO_TLS
@ PROTO_AUTHORITY_FORM
@ PROTO_ICY
@ PROTO_HTTP
@ PROTO_COAP
@ PROTO_FTP
@ PROTO_WHOIS
@ PROTO_MAX
@ PROTO_SSL
@ PROTO_COAPS
@ PROTO_ICP
@ PROTO_URN
@ PROTO_WAIS