]> git.ipfire.org Git - thirdparty/squid.git/blobdiff - src/adaptation/AccessRule.h
Source Format Enforcement (#763)
[thirdparty/squid.git] / src / adaptation / AccessRule.h
index edc9645dd2da6a10ed74858cf5faabb286ed364e..7fad34321a320aa02164361e0d20e3ff3b954dd2 100644 (file)
@@ -1,26 +1,38 @@
+/*
+ * Copyright (C) 1996-2021 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_ADAPTATION__ACCESS_RULE_H
 #define SQUID_ADAPTATION__ACCESS_RULE_H
 
-#include "SquidString.h"
+#include "acl/forward.h"
 #include "adaptation/forward.h"
+#include "SquidString.h"
+
+#include <vector>
 
-class acl_access;
 class ConfigParser;
 
-namespace Adaptation {
+namespace Adaptation
+{
 
 // manages adaptation_access configuration by associating an acl with
 // an adaptation service group
-class AccessRule {
+class AccessRule
+{
 public:
-    AccessRule();
+    AccessRule(const String &groupId);
     ~AccessRule();
 
     void parse(ConfigParser &parser);
     void finalize();
 
     // service group consisting of one or more services
-    ServiceGroup *group();
+    ServiceGroupPointer group();
 
 public:
     typedef int Id;
@@ -32,10 +44,12 @@ private:
     static Id LastId;
 };
 
-typedef Vector<Adaptation::AccessRule*> AccessRules;
-extern AccessRules &AllRules();
-extern AccessRule *FindRule(const AccessRule::Id &id);
+typedef std::vector<Adaptation::AccessRule*> AccessRules;
+AccessRules &AllRules();
+AccessRule *FindRule(const AccessRule::Id &id);
+AccessRule *FindRuleByGroupId(const String &groupId);
 
 } // namespace Adaptation
 
 #endif /* SQUID_ADAPTATION__ACCESS_RULE_H */
+