]> git.ipfire.org Git - thirdparty/squid.git/blob - src/acl/ServerName.h
Update Packable API to implement vappendf() method
[thirdparty/squid.git] / src / acl / ServerName.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_ACLSERVERNAME_H
10 #define SQUID_ACLSERVERNAME_H
11
12 #include "acl/Acl.h"
13 #include "acl/Checklist.h"
14 #include "acl/Data.h"
15 #include "acl/DomainData.h"
16 #include "acl/Strategised.h"
17
18 class ACLServerNameData : public ACLDomainData {
19 MEMPROXY_CLASS(ACLServerNameData);
20 public:
21 ACLServerNameData() : ACLDomainData() {}
22 virtual bool match(const char *);
23 virtual ACLData<char const *> *clone() const;
24 };
25
26 class ACLServerNameStrategy : public ACLStrategy<char const *>
27 {
28
29 public:
30 virtual int match (ACLData<MatchType> * &, ACLFilledChecklist *, ACLFlags &);
31 static ACLServerNameStrategy *Instance();
32 virtual bool requiresRequest() const {return true;}
33
34 /**
35 * Not implemented to prevent copies of the instance.
36 \par
37 * Not private to prevent brain dead g+++ warnings about
38 * private constructors with no friends
39 */
40 ACLServerNameStrategy(ACLServerNameStrategy const &);
41
42 private:
43 static ACLServerNameStrategy Instance_;
44 ACLServerNameStrategy() {}
45
46 ACLServerNameStrategy&operator=(ACLServerNameStrategy const &);
47 };
48
49 class ACLServerName
50 {
51
52 private:
53 static ACL::Prototype LiteralRegistryProtoype;
54 static ACLStrategised<char const *> LiteralRegistryEntry_;
55 static ACL::Prototype RegexRegistryProtoype;
56 static ACLStrategised<char const *> RegexRegistryEntry_;
57 };
58
59 #endif /* SQUID_ACLSERVERNAME_H */
60