/*
+ * Copyright (C) 1996-2015 The Squid Software Foundation and contributors
*
- * SQUID Web Proxy Cache http://www.squid-cache.org/
- * ----------------------------------------------------------
- *
- * Squid is the result of efforts by numerous individuals from
- * the Internet community; see the CONTRIBUTORS file for full
- * details. Many organizations have provided support for Squid's
- * development; see the SPONSORS file for full details. Squid is
- * Copyrighted (C) 2001 by the Regents of the University of
- * California; see the COPYRIGHT file for full details. Squid
- * incorporates software developed and/or copyrighted by other
- * sources; see the CREDITS file for full details.
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111, USA.
- *
- *
- * Copyright (c) 2003, Robert Collins <robertc@squid-cache.org>
+ * Squid software is distributed under GPLv2+ license and includes
+ * contributions from numerous individuals and organizations.
+ * Please see the COPYING and CONTRIBUTORS files for details.
*/
#ifndef SQUID_ACL_H
#include "cbdata.h"
#include "defines.h"
#include "dlink.h"
-#include "MemPool.h"
+#include "SBufList.h"
-#if HAVE_OSTREAM
#include <ostream>
-#endif
-#if HAVE_STRING
#include <string>
-#endif
#include <vector>
class ConfigParser;
ACLFlags() : flags_(0) {}
bool supported(const ACLFlag f) const; ///< True if the given flag supported
void makeSet(const ACLFlag f) { flags_ |= flagToInt(f); } ///< Set the given flag
+ void makeUnSet(const ACLFlag f) { flags_ &= ~flagToInt(f); } ///< Unset the given flag
/// Return true if the given flag is set
bool isSet(const ACLFlag f) const { return flags_ & flagToInt(f);}
/// Parse optional flags given in the form -[A..Z|a..z]
static ACL *FindByName(const char *name);
ACL();
- explicit ACL(const ACLFlag flgs[]) : cfgline(NULL), next(NULL), flags(flgs) { memset(name, '\0', sizeof(name)); }
+ explicit ACL(const ACLFlag flgs[]) : cfgline(NULL), next(NULL), flags(flgs), registered(false) {
+ *name = 0;
+ }
virtual ~ACL();
/// sets user-specified ACL name and squid.conf context
virtual void parse() = 0;
virtual char const *typeString() const = 0;
virtual bool isProxyAuth() const;
- virtual wordlist *dump() const = 0;
+ virtual SBufList dump() const = 0;
virtual bool empty() const = 0;
virtual bool valid() const;
/// \ingroup ACLAPI
class acl_proxy_auth_match_cache
{
+ MEMPROXY_CLASS(acl_proxy_auth_match_cache);
public:
- MEMPROXY_CLASS(acl_proxy_auth_match_cache);
dlink_node link;
int matchrv;
void *acl_data;
};
-MEMPROXY_CLASS_INLINE(acl_proxy_auth_match_cache);
-
/// \ingroup ACLAPI
/// XXX: find a way to remove or at least use a refcounted ACL pointer
-extern const char *AclMatchedName; /* NULL */
+extern const char *AclMatchedName; /* NULL */
#endif /* SQUID_ACL_H */
+