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 {
32#if USE_HTCP
34#endif
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 &os, ProtocolType const &p)
Definition: ProtocolType.h:52
ProtocolType
Definition: ProtocolType.h:23
@ PROTO_NONE
Definition: ProtocolType.h:24
@ PROTO_HTTPS
Definition: ProtocolType.h:27
@ PROTO_UNKNOWN
Definition: ProtocolType.h:41
@ PROTO_HTCP
Definition: ProtocolType.h:33
@ PROTO_TLS
Definition: ProtocolType.h:38
@ PROTO_AUTHORITY_FORM
Definition: ProtocolType.h:40
@ PROTO_ICY
Definition: ProtocolType.h:37
@ PROTO_HTTP
Definition: ProtocolType.h:25
@ PROTO_COAP
Definition: ProtocolType.h:28
@ PROTO_FTP
Definition: ProtocolType.h:26
@ PROTO_WHOIS
Definition: ProtocolType.h:36
@ PROTO_MAX
Definition: ProtocolType.h:42
@ PROTO_SSL
Definition: ProtocolType.h:39
@ PROTO_COAPS
Definition: ProtocolType.h:29
@ PROTO_ICP
Definition: ProtocolType.h:31
@ PROTO_URN
Definition: ProtocolType.h:35
@ PROTO_WAIS
Definition: ProtocolType.h:30

 

Introduction

Documentation

Support

Miscellaneous

Web Site Translations

Mirrors