Line data Source code
1 : /* SPDX-FileCopyrightText: Copyright 2026 Cozens Software Solutions Limited
2 : * SPDX-License-Identifier: PolyForm-Noncommercial-1.0.0 OR LicenseRef-PolyForm-Internal-Use-1.0.0 OR LicenseRef-COSOSO-Commercial
3 : */
4 :
5 : #ifndef SOLIDSYSLOGPOSIXFILEPRIVATE_H
6 : #define SOLIDSYSLOGPOSIXFILEPRIVATE_H
7 :
8 : #include <stdint.h>
9 :
10 : #include "SolidSyslogError.h"
11 : #include "SolidSyslogFileDefinition.h"
12 : #include "SolidSyslogPosixFileErrors.h"
13 : #include "SolidSyslogPrival.h"
14 :
15 : struct SolidSyslogPosixFile
16 : {
17 : struct SolidSyslogFile Base;
18 : int Fd;
19 : };
20 :
21 : void SolidSyslogPosixFile_Initialise(struct SolidSyslogFile* base);
22 : void SolidSyslogPosixFile_Cleanup(struct SolidSyslogFile* base);
23 :
24 12 : static inline void PosixFile_Report(
25 : enum SolidSyslogSeverity severity,
26 : uint16_t category,
27 : enum SolidSyslogFileErrors code
28 : )
29 : {
30 12 : SolidSyslog_Error(severity, &SolidSyslogPosixFileErrorSource, category, (int32_t) code);
31 12 : }
32 :
33 : #endif /* SOLIDSYSLOGPOSIXFILEPRIVATE_H */
|