Squid Web Cache
master
Loading...
Searching...
No Matches
AdaptationService.cc
Go to the documentation of this file.
1
/*
2
* Copyright (C) 1996-2025 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
#include "
squid.h
"
10
#include "
acl/AdaptationService.h
"
11
#include "
acl/FilledChecklist.h
"
12
#include "
adaptation/History.h
"
13
#include "
HttpRequest.h
"
14
15
int
16
Acl::AdaptationServiceCheck::match
(
ACLChecklist
*
const
ch)
17
{
18
const
auto
checklist =
Filled
(ch);
19
20
HttpRequest::Pointer
request = checklist->request;
21
if
(request ==
nullptr
)
22
return
0;
23
Adaptation::History::Pointer
ah = request->
adaptHistory
();
24
if
(ah ==
nullptr
)
25
return
0;
26
27
Adaptation::History::AdaptationServices::iterator it;
28
for
(it = ah->
theAdaptationServices
.begin(); it != ah->
theAdaptationServices
.end(); ++it) {
29
if
(
data
->match(it->c_str()))
30
return
1;
31
}
32
33
return
0;
34
}
35
AdaptationService.h
FilledChecklist.h
Filled
ACLFilledChecklist * Filled(ACLChecklist *checklist)
convenience and safety wrapper for dynamic_cast<ACLFilledChecklist*>
Definition
FilledChecklist.h:146
History.h
HttpRequest.h
ACLChecklist
Definition
Checklist.h:31
Acl::AdaptationServiceCheck::match
int match(ACLChecklist *) override
Matches the actual data in checklist against this Acl::Node.
Definition
AdaptationService.cc:16
Acl::ParameterizedNode< ACLData< const char * > >::data
std::unique_ptr< Parameters > data
Definition
ParameterizedNode.h:43
Adaptation::History::theAdaptationServices
AdaptationServices theAdaptationServices
The service groups used.
Definition
History.h:69
HttpRequest::adaptHistory
Adaptation::History::Pointer adaptHistory(bool createIfNone=false) const
Returns possibly nil history, creating it if requested.
Definition
HttpRequest.cc:401
RefCount< HttpRequest >
squid.h
squid
src
acl
AdaptationService.cc
Generated by
1.9.8