SolidSyslog coverage report
Current view: top level - Core/Source - SolidSyslogOriginSdPrivate.h (source / functions) Coverage Total Hit
Test: SolidSyslog Lines: 100.0 % 3 3
Test Date: 2026-11-12 23:14:35 Functions: 100.0 % 1 1

            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 SOLIDSYSLOGORIGINSDPRIVATE_H
       6              : #define SOLIDSYSLOGORIGINSDPRIVATE_H
       7              : 
       8              : #include <stdint.h>
       9              : 
      10              : #include "SolidSyslogError.h"
      11              : #include "SolidSyslogOriginSd.h"
      12              : #include "SolidSyslogOriginSdErrors.h"
      13              : #include "SolidSyslogPrival.h"
      14              : #include "SolidSyslogStructuredDataDefinition.h"
      15              : 
      16              : enum
      17              : {
      18              :     ORIGIN_SOFTWARE_MAX = 48,
      19              :     ORIGIN_SWVERSION_MAX = 32,
      20              :     ORIGIN_ENTERPRISE_ID_MAX = 64
      21              : };
      22              : 
      23              : struct SolidSyslogOriginSd
      24              : {
      25              :     struct SolidSyslogStructuredData Base;
      26              :     const char* Software;
      27              :     const char* SwVersion;
      28              :     const char* EnterpriseId;
      29              :     SolidSyslogOriginIpCountFunction GetIpCount;
      30              :     SolidSyslogOriginIpAtFunction GetIpAt;
      31              :     void* IpContext;
      32              : };
      33              : 
      34              : void SolidSyslogOriginSd_Initialise(
      35              :     struct SolidSyslogStructuredData* base,
      36              :     const struct SolidSyslogOriginSdConfig* config
      37              : );
      38              : void SolidSyslogOriginSd_Cleanup(struct SolidSyslogStructuredData* base);
      39              : 
      40            5 : static inline void OriginSd_Report(
      41              :     enum SolidSyslogSeverity severity,
      42              :     uint16_t category,
      43              :     enum SolidSyslogOriginSdErrors code
      44              : )
      45              : {
      46            5 :     SolidSyslog_Error(severity, &SolidSyslogOriginSdErrorSource, category, (int32_t) code);
      47            5 : }
      48              : 
      49              : #endif /* SOLIDSYSLOGORIGINSDPRIVATE_H */
        

Generated by: LCOV version 2.0-1