ErrorDetailManager.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 1996-2017 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_SSL_ERRORDETAILMANAGER_H
10 #define _SQUID_SSL_ERRORDETAILMANAGER_H
11 
12 #include "base/RefCount.h"
13 #include "HttpRequest.h"
14 #include "SquidString.h"
15 #include "ssl/support.h"
16 
17 #include <map>
18 #include <string>
19 
20 class HttpRequest;
21 
22 namespace Ssl
23 {
24 
26 {
27 public:
32 };
33 
39 {
40 public:
47  const char *getErrorDescr(Security::ErrorCode value);
48  const char *getErrorDetail(Security::ErrorCode value);
49 
51  typedef std::map<Security::ErrorCode, ErrorDetailEntry> ErrorDetails;
53 };
54 
60 {
61 public:
63 
65  static void Shutdown();
66 
77  const char *getDefaultErrorDescr(Security::ErrorCode value);
78  const char *getDefaultErrorDetail(Security::ErrorCode value);
79 
80 private:
84  void cacheDetails(ErrorDetailsList::Pointer &errorDetails);
85 
86  typedef std::map<std::string, ErrorDetailsList::Pointer> Cache;
89 
92 };
93 
95 void errorDetailClean();
96 } //namespace Ssl
97 #endif
98 
std::map< Security::ErrorCode, ErrorDetailEntry > ErrorDetails
String detail
for error page D macro expansion; may contain macros
bool getRecord(Security::ErrorCode value, ErrorDetailEntry &entry)
static void Shutdown()
reset the ErrorDetailsManager instance
static ErrorDetailsManager & GetInstance()
Instance class.
struct _request * request(char *urlin)
Definition: tcp-banger2.c:291
void cacheDetails(ErrorDetailsList::Pointer &errorDetails)
cache the given error details list.
const char * getDefaultErrorDetail(Security::ErrorCode value)
the default error details for a given error
bool getErrorDetail(Security::ErrorCode value, const HttpRequest::Pointer &request, ErrorDetailEntry &entry)
ErrorDetails theList
The list of error details entries.
String errLanguage
The language of the error-details.txt template, if any.
int ErrorCode
Squid defined error code (<0), an error code returned by X.509 API, or SSL_ERROR_NONE.
Definition: forward.h:116
std::map< std::string, ErrorDetailsList::Pointer > Cache
const char * getErrorDetail(Security::ErrorCode value)
an error details for an error if exist in list.
RefCount< ErrorDetailsList > Pointer
void errorDetailClean()
Security::ErrorCode error_no
The SSL error code.
String descr
short error description (for use in debug messages or error pages)
ErrorDetailsList::Pointer getCachedDetails(const char *lang)
Return cached error details list for a given language if exist.
void errorDetailInitialize()
const char * getDefaultErrorDescr(Security::ErrorCode value)
the default error description for a given error
ErrorDetailsList::Pointer theDefaultErrorDetails
the default error details list
Cache cache
the error details list cache
static ErrorDetailsManager * TheDetailsManager
An instance of ErrorDetailsManager to be used by squid (ssl/ErrorDetails.*)
String name
a name for the error
const char * getErrorDescr(Security::ErrorCode value)
an error description for an error if exist in list.

 

Introduction

Documentation

Support

Miscellaneous

Web Site Translations

Mirrors