From 802155fe01ea0cfdd3102f4688094a3925b6a4e6 Mon Sep 17 00:00:00 2001 From: "Matthias P. Braendli" Date: Mon, 22 Dec 2025 18:10:42 +0100 Subject: Adapt ManagementServer json --- src/ManagementServer.h | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'src/ManagementServer.h') diff --git a/src/ManagementServer.h b/src/ManagementServer.h index c018088..a721550 100644 --- a/src/ManagementServer.h +++ b/src/ManagementServer.h @@ -46,6 +46,7 @@ #pragma once +#include "Json.h" #ifdef HAVE_CONFIG_H # include "config.h" #endif @@ -105,7 +106,7 @@ class InputStat void notifyUnderrun(); void notifyOverrun(); void notifyVersion(const std::string& version, uint32_t uptime_s); - std::string encodeValuesJSON(); + json::map_t encodeValues(); input_state_t determineState(); private: @@ -218,15 +219,15 @@ class ManagementServer * * returns: a JSON encoded configuration */ - std::string get_input_config_json(); + json::map_t get_input_config_json(); /* Return the values for the statistics as defined in the configuration * * returns: JSON encoded statistics */ - std::string get_input_values_json() const; + json::map_t get_input_values() const; - std::string get_output_values_json() const; + json::map_t get_output_values() const; // mutex for accessing the map mutable std::mutex m_statsmutex; -- cgit v1.2.3