1 /*
2  * ModSecurity, http://www.modsecurity.org/
3  * Copyright (c) 2015 - 2021 Trustwave Holdings, Inc. (http://www.trustwave.com/)
4  *
5  * You may not use this file except in compliance with
6  * the License.  You may obtain a copy of the License at
7  *
8  *     http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * If any of the files related to licensing are missing or if you have any
11  * other questions related to licensing please contact Trustwave Holdings, Inc.
12  * directly using the email address security@modsecurity.org.
13  *
14  */
15 #ifndef SRC_OPERATORS_IP_MATCH_FROM_FILE_H_
16 #define SRC_OPERATORS_IP_MATCH_FROM_FILE_H_
17 
18 #include <string>
19 #include <memory>
20 #include <utility>
21 
22 #include "src/operators/ip_match.h"
23 
24 namespace modsecurity {
25 namespace operators {
26 
27 class IpMatchFromFile : public IpMatch {
28  public:
29     /** @ingroup ModSecurity_Operator */
IpMatchFromFile(std::unique_ptr<RunTimeString> param)30     explicit IpMatchFromFile(std::unique_ptr<RunTimeString> param)
31         : IpMatch("IpMatchFromFile", std::move(param)) { }
IpMatchFromFile(const std::string & n,std::unique_ptr<RunTimeString> param)32     IpMatchFromFile(const std::string &n, std::unique_ptr<RunTimeString> param)
33         : IpMatch(n, std::move(param)) { }
34     bool init(const std::string& file, std::string *error) override;
35 };
36 
37 }  // namespace operators
38 }  // namespace modsecurity
39 
40 
41 #endif  // SRC_OPERATORS_IP_MATCH_FROM_FILE_H_
42