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 SOLIDSYSLOGPLUSTCPTCPSTREAMPRIVATE_H
6 : #define SOLIDSYSLOGPLUSTCPTCPSTREAMPRIVATE_H
7 :
8 : #include <stdint.h>
9 : #include "SolidSyslogError.h"
10 : #include "SolidSyslogPrival.h"
11 : #include "SolidSyslogPlusTcpTcpStreamErrors.h"
12 :
13 : #include "FreeRTOS.h"
14 : #include "FreeRTOS_Sockets.h"
15 :
16 : #include "SolidSyslogPlusTcpTcpStream.h"
17 : #include "SolidSyslogStreamDefinition.h"
18 : #include "SolidSyslogStreamOpenHealth.h"
19 :
20 : struct SolidSyslogPlusTcpTcpStream
21 : {
22 : struct SolidSyslogStream Base;
23 : struct SolidSyslogPlusTcpTcpStreamConfig Config;
24 : Socket_t Socket;
25 : struct SolidSyslogStreamOpenHealth OpenHealth;
26 : };
27 :
28 : void SolidSyslogPlusTcpTcpStream_Initialise(
29 : struct SolidSyslogStream* base,
30 : const struct SolidSyslogPlusTcpTcpStreamConfig* config
31 : );
32 : void SolidSyslogPlusTcpTcpStream_Cleanup(struct SolidSyslogStream* base);
33 :
34 13 : static inline void PlusTcpTcpStream_Report(
35 : enum SolidSyslogSeverity severity,
36 : uint16_t category,
37 : enum SolidSyslogTcpStreamErrors code
38 : )
39 : {
40 13 : SolidSyslog_Error(severity, &SolidSyslogPlusTcpTcpStreamErrorSource, category, (int32_t) code);
41 13 : }
42 :
43 : #endif /* SOLIDSYSLOGPLUSTCPTCPSTREAMPRIVATE_H */
|