]> git.ipfire.org Git - thirdparty/squid.git/blobdiff - src/acl/RequestMimeType.h
Maintenance: automate header guards 2/3 (#1655)
[thirdparty/squid.git] / src / acl / RequestMimeType.h
index 12d17cf9801b4961ecf093ea2eab3f12c8e2045f..1bedc749eeb11588d08d67489eb86522bed540fb 100644 (file)
@@ -1,42 +1,33 @@
 /*
- * Copyright (C) 1996-2015 The Squid Software Foundation and contributors
+ * Copyright (C) 1996-2023 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_ACLREQUESTMIMETYPE_H
-#define SQUID_ACLREQUESTMIMETYPE_H
+#ifndef SQUID_SRC_ACL_REQUESTMIMETYPE_H
+#define SQUID_SRC_ACL_REQUESTMIMETYPE_H
 
-#include "acl/Acl.h"
-#include "acl/Strategised.h"
-
-class ACLRequestMIMEType
-{
-
-private:
-    static ACL::Prototype RegistryProtoype;
-    static ACLStrategised<char const *> RegistryEntry_;
-};
-
-/* partial specialisation */
-
-#include "acl/Checklist.h"
 #include "acl/Data.h"
+#include "acl/FilledChecklist.h"
 #include "acl/RequestHeaderStrategy.h"
 
+/* partial specialisation */
+
 template <>
 inline int
-ACLRequestHeaderStrategy<Http::HdrType::CONTENT_TYPE>::match (ACLData<char const *> * &data, ACLFilledChecklist *checklist, ACLFlags &)
+Acl::RequestHeaderCheck<Http::HdrType::CONTENT_TYPE>::match(ACLChecklist * const ch)
 {
+    const auto checklist = Filled(ch);
+
     char const *theHeader = checklist->request->header.getStr(Http::HdrType::CONTENT_TYPE);
 
-    if (NULL == theHeader)
+    if (nullptr == theHeader)
         theHeader = "";
 
     return data->match(theHeader);
 }
 
-#endif /* SQUID_ACLREQUESTMIMETYPE_H */
+#endif /* SQUID_SRC_ACL_REQUESTMIMETYPE_H */