]> git.ipfire.org Git - thirdparty/squid.git/blobdiff - src/acl/Tree.h
SourceFormat Enforcement
[thirdparty/squid.git] / src / acl / Tree.h
index a372839192034912f9ee62880cea65dc462d7356..0bd9e15dfb46251ddd56d8671e1a3f29c80bdb85 100644 (file)
@@ -1,7 +1,16 @@
+/*
+ * Copyright (C) 1996-2015 The Squid Software Foundation and contributors
+ *
+ * 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_TREE_H
 #define SQUID_ACL_TREE_H
 
 #include "acl/BoolOps.h"
+#include "SBufList.h"
 
 namespace Acl
 {
@@ -10,11 +19,15 @@ namespace Acl
 /// unique properties: cbdata protection and optional rule actions.
 class Tree: public OrNode
 {
+    // XXX: We should use refcounting instead, but it requires making ACLs
+    // refcounted as well. Otherwise, async lookups will reach deleted ACLs.
+    CBDATA_CLASS(Tree);
+
 public:
     /// dumps <name, action, rule, new line> tuples
     /// action.kind is mapped to a string using the supplied conversion table
     typedef const char **ActionToString;
-    wordlist* treeDump(const char *name, const ActionToString &convert) const;
+    SBufList treeDump(const char *name, const ActionToString &convert) const;
 
     /// Returns the corresponding action after a successful tree match.
     allow_t winningAction() const;
@@ -32,13 +45,9 @@ protected:
     /// if not empty, contains actions corresponding to InnerNode::nodes
     typedef std::vector<allow_t> Actions;
     Actions actions;
-
-private:
-    // XXX: We should use refcounting instead, but it requires making ACLs
-    // refcounted as well. Otherwise, async lookups will reach deleted ACLs.
-    CBDATA_CLASS2(Tree);
 };
 
 } // namespace Acl
 
 #endif /* SQUID_ACL_TREE_H */
+