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

 

Introduction

Documentation

Support

Miscellaneous

Web Site Translations

Mirrors