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 
16 #ifdef __cplusplus
17 #include <iostream>
18 #include <fstream>
19 #include <string>
20 #endif
21 
22 #ifndef SRC_AUDIT_LOG_WRITER_SERIAL_H_
23 #define SRC_AUDIT_LOG_WRITER_SERIAL_H_
24 
25 #include "src/audit_log/writer/writer.h"
26 #include "src/utils/shared_files.h"
27 #include "modsecurity/transaction.h"
28 #include "modsecurity/audit_log.h"
29 #include "modsecurity/rules_set.h"
30 
31 #ifdef __cplusplus
32 
33 namespace modsecurity {
34 namespace audit_log {
35 namespace writer {
36 
37 
38 /** @ingroup ModSecurity_CPP_API */
39 class Serial : public Writer {
40  public:
Serial(audit_log::AuditLog * audit)41     explicit Serial(audit_log::AuditLog *audit)
42         : audit_log::writer::Writer(audit) { }
43 
44     ~Serial() override;
45 
46 
47     bool init(std::string *error) override;
48     bool write(Transaction *transaction, int parts,
49         std::string *error) override;
50 };
51 
52 }  // namespace writer
53 }  // namespace audit_log
54 }  // namespace modsecurity
55 #endif
56 
57 #endif  // SRC_AUDIT_LOG_WRITER_SERIAL_H_
58