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

 

Introduction

Documentation

Support

Miscellaneous

Web Site Translations

Mirrors