ProtocolType.h
Go to the documentation of this file.
1/*
2 * Copyright (C) 1996-2023 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)
23typedef enum {
33#if USE_HTCP
35#endif
45
46extern const char *ProtocolType_str[];
47
52inline std::ostream &
53operator <<(std::ostream &os, ProtocolType const &p)
54{
55 if (PROTO_NONE <= p && p < PROTO_MAX)
56 os << ProtocolType_str[p];
57 else
58 os << static_cast<int>(p);
59 return os;
60}
61
62} // namespace AnyP
63
64#endif /* _SQUID_SRC_ANYP_PROTOCOLTYPE_H */
65
Definition: forward.h:15
const char * ProtocolType_str[]
std::ostream & operator<<(std::ostream &os, ProtocolType const &p)
Definition: ProtocolType.h:53
ProtocolType
Definition: ProtocolType.h:23
@ PROTO_NONE
Definition: ProtocolType.h:24
@ PROTO_HTTPS
Definition: ProtocolType.h:27
@ PROTO_UNKNOWN
Definition: ProtocolType.h:42
@ PROTO_HTCP
Definition: ProtocolType.h:34
@ PROTO_TLS
Definition: ProtocolType.h:39
@ PROTO_AUTHORITY_FORM
Definition: ProtocolType.h:41
@ PROTO_ICY
Definition: ProtocolType.h:38
@ PROTO_HTTP
Definition: ProtocolType.h:25
@ PROTO_COAP
Definition: ProtocolType.h:28
@ PROTO_FTP
Definition: ProtocolType.h:26
@ PROTO_WHOIS
Definition: ProtocolType.h:37
@ PROTO_MAX
Definition: ProtocolType.h:43
@ PROTO_SSL
Definition: ProtocolType.h:40
@ PROTO_CACHE_OBJECT
Definition: ProtocolType.h:31
@ PROTO_COAPS
Definition: ProtocolType.h:29
@ PROTO_ICP
Definition: ProtocolType.h:32
@ PROTO_URN
Definition: ProtocolType.h:36
@ PROTO_WAIS
Definition: ProtocolType.h:30

 

Introduction

Documentation

Support

Miscellaneous

Web Site Translations

Mirrors