]> git.ipfire.org Git - thirdparty/squid.git/blob - src/ident/AclIdent.h
Boilerplate: update copyright blurbs on src/
[thirdparty/squid.git] / src / ident / AclIdent.h
1 /*
2 * Copyright (C) 1996-2014 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_IDENT_ACLIDENT_H
10 #define SQUID_IDENT_ACLIDENT_H
11
12 #if USE_IDENT
13
14 #include "acl/Checklist.h"
15
16 /// \ingroup ACLAPI
17 class IdentLookup : public ACLChecklist::AsyncState
18 {
19
20 public:
21 static IdentLookup *Instance();
22 virtual void checkForAsync(ACLChecklist *)const;
23
24 private:
25 static IdentLookup instance_;
26 static void LookupDone(const char *ident, void *data);
27 };
28
29 #include "acl/Acl.h"
30 #include "acl/Data.h"
31
32 /// \ingroup ACLAPI
33 class ACLIdent : public ACL
34 {
35
36 public:
37 MEMPROXY_CLASS(ACLIdent);
38
39 ACLIdent(ACLData<char const *> *newData, char const *);
40 ACLIdent (ACLIdent const &old);
41 ACLIdent & operator= (ACLIdent const &rhs);
42 ~ACLIdent();
43
44 virtual char const *typeString() const;
45 virtual void parse();
46 virtual bool isProxyAuth() const {return true;}
47
48 virtual int match(ACLChecklist *checklist);
49 virtual SBufList dump() const;
50 virtual bool empty () const;
51 virtual ACL *clone()const;
52
53 private:
54 static Prototype UserRegistryProtoype;
55 static ACLIdent UserRegistryEntry_;
56 static Prototype RegexRegistryProtoype;
57 static ACLIdent RegexRegistryEntry_;
58 ACLData<char const *> *data;
59 char const *type_;
60 };
61
62 MEMPROXY_CLASS_INLINE(ACLIdent);
63
64 #endif /* USE_IDENT */
65 #endif /* SQUID_IDENT_ACLIDENT_H */