]> git.ipfire.org Git - thirdparty/squid.git/blob - src/acl/Random.h
SourceFormat Enforcement
[thirdparty/squid.git] / src / acl / Random.h
1 /*
2 * Copyright (C) 1996-2015 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_ACL_RANDOM_H
10 #define SQUID_ACL_RANDOM_H
11
12 #include "acl/Acl.h"
13 #include "acl/Checklist.h"
14
15 class ACLRandom : public ACL
16 {
17 MEMPROXY_CLASS(ACLRandom);
18
19 public:
20 ACLRandom(char const *);
21 ACLRandom(ACLRandom const &);
22 ~ACLRandom();
23 ACLRandom&operator=(ACLRandom const &);
24
25 virtual ACL *clone()const;
26 virtual char const *typeString() const;
27 virtual void parse();
28 virtual int match(ACLChecklist *checklist);
29 virtual SBufList dump() const;
30 virtual bool empty () const;
31 virtual bool valid() const;
32
33 protected:
34 static Prototype RegistryProtoype;
35 static ACLRandom RegistryEntry_;
36 double data; // value to be exceeded before this ACL will match
37 char pattern[256]; // pattern from config file. Used to generate 'data'
38 char const *class_;
39 };
40
41 #endif /* SQUID_ACL_RANDOM_H */
42