]>
Commit | Line | Data |
---|---|---|
cb1b906f | 1 | /* |
bbc27441 | 2 | * Copyright (C) 1996-2014 The Squid Software Foundation and contributors |
cb1b906f | 3 | * |
bbc27441 AJ |
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. | |
cb1b906f AJ |
7 | */ |
8 | ||
9 | #ifndef SQUID_ACL_RANDOM_H | |
10 | #define SQUID_ACL_RANDOM_H | |
11 | ||
12 | #include "acl/Acl.h" | |
13 | #include "acl/Checklist.h" | |
14 | ||
15 | /// \ingroup ACLAPI | |
16 | class ACLRandom : public ACL | |
17 | { | |
18 | ||
19 | public: | |
20 | MEMPROXY_CLASS(ACLRandom); | |
21 | ||
22 | ACLRandom(char const *); | |
23 | ACLRandom(ACLRandom const &); | |
24 | ~ACLRandom(); | |
25 | ACLRandom&operator=(ACLRandom const &); | |
26 | ||
27 | virtual ACL *clone()const; | |
28 | virtual char const *typeString() const; | |
29 | virtual void parse(); | |
30 | virtual int match(ACLChecklist *checklist); | |
9b859d6f | 31 | virtual SBufList dump() const; |
cb1b906f | 32 | virtual bool empty () const; |
478a0611 | 33 | virtual bool valid() const; |
cb1b906f AJ |
34 | |
35 | protected: | |
36 | static Prototype RegistryProtoype; | |
37 | static ACLRandom RegistryEntry_; | |
38 | double data; // value to be exceeded before this ACL will match | |
39 | char pattern[256]; // pattern from config file. Used to generate 'data' | |
40 | char const *class_; | |
41 | }; | |
42 | ||
43 | MEMPROXY_CLASS_INLINE(ACLRandom); | |
44 | ||
45 | #endif /* SQUID_ACL_RANDOM_H */ |