]> git.ipfire.org Git - thirdparty/squid.git/blame - src/ACLMaxUserIP.h
Synced #includes after moving files around.
[thirdparty/squid.git] / src / ACLMaxUserIP.h
CommitLineData
5dee515e 1/*
262a0e14 2 * $Id$
5dee515e 3 *
4 *
5 * SQUID Web Proxy Cache http://www.squid-cache.org/
6 * ----------------------------------------------------------
7 *
8 * Squid is the result of efforts by numerous individuals from
9 * the Internet community; see the CONTRIBUTORS file for full
10 * details. Many organizations have provided support for Squid's
11 * development; see the SPONSORS file for full details. Squid is
12 * Copyrighted (C) 2001 by the Regents of the University of
13 * California; see the COPYRIGHT file for full details. Squid
14 * incorporates software developed and/or copyrighted by other
15 * sources; see the CREDITS file for full details.
16 *
17 * This program is free software; you can redistribute it and/or modify
18 * it under the terms of the GNU General Public License as published by
19 * the Free Software Foundation; either version 2 of the License, or
20 * (at your option) any later version.
26ac0430 21 *
5dee515e 22 * This program is distributed in the hope that it will be useful,
23 * but WITHOUT ANY WARRANTY; without even the implied warranty of
24 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
25 * GNU General Public License for more details.
26ac0430 26 *
5dee515e 27 * You should have received a copy of the GNU General Public License
28 * along with this program; if not, write to the Free Software
29 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111, USA.
30 *
31 *
32 * Copyright (c) 2003, Robert Collins <robertc@squid-cache.org>
33 */
34
b0dd28ba 35#ifndef SQUID_ACLMAXUSERIP_H
36#define SQUID_ACLMAXUSERIP_H
63be0a78 37
5dee515e 38#include "ACL.h"
b0dd28ba 39#include "ACLChecklist.h"
5dee515e 40
63be0a78 41/// \ingroup ACLAPI
b0dd28ba 42class ACLMaxUserIP : public ACL
62e76326 43{
44
45public:
b001e822 46 MEMPROXY_CLASS(ACLMaxUserIP);
b0dd28ba 47
48 ACLMaxUserIP(char const *);
49 ACLMaxUserIP(ACLMaxUserIP const &);
50 ~ACLMaxUserIP();
51 ACLMaxUserIP&operator=(ACLMaxUserIP const &);
52
53 virtual ACL *clone()const;
54 virtual char const *typeString() const;
55 virtual void parse();
56 virtual int match(ACLChecklist *checklist);
57 virtual wordlist *dump() const;
94e13b6c 58 virtual bool empty () const;
b0dd28ba 59 virtual bool valid () const;
60 virtual bool requiresRequest() const {return true;}
61
d295d770 62 int getMaximum() const {return maximum;}
63
64 int getStrict() const {return flags.strict;}
65
b0dd28ba 66private:
b0dd28ba 67 static Prototype RegistryProtoype;
68 static ACLMaxUserIP RegistryEntry_;
69
ad61a2b4 70 int match(AuthUserRequest *, IpAddress const &);
b0dd28ba 71 char const *class_;
4b0f5de8 72 int maximum;
b0dd28ba 73
26ac0430
AJ
74 struct Flags {
75 Flags() : strict(0) {}
62e76326 76
3d0ac046
HN
77 unsigned int strict:1;
78 } flags;
b0dd28ba 79};
5dee515e 80
63be0a78 81MEMPROXY_CLASS_INLINE(ACLMaxUserIP) /**DOCS_NOSEMI*/
b001e822 82
b0dd28ba 83#endif /* SQUID_ACLMAXUSERIP_H */