Merge pull request #26244 from Hitcher/media_flag_border_fix
[xbmc.git] / xbmc / pvr / PVRSignalStatus.h
blob81aac9ea8b996ab05afbeca1593e5053b01250bf
1 /*
2 * Copyright (C) 2024 Team Kodi
3 * This file is part of Kodi - https://kodi.tv
5 * SPDX-License-Identifier: GPL-2.0-or-later
6 * See LICENSES/README.md for more information.
7 */
9 #pragma once
11 #include "addons/kodi-dev-kit/include/kodi/c-api/addon-instance/pvr/pvr_channels.h"
13 #include <string>
15 namespace PVR
18 class CPVRSignalStatus
20 public:
21 CPVRSignalStatus() = default;
23 CPVRSignalStatus(const std::string& adapterName, const std::string& adapterStatus)
24 : m_adapterName(adapterName), m_adapterStatus(adapterStatus)
28 explicit CPVRSignalStatus(const PVR_SIGNAL_STATUS& status)
29 : m_status(status),
30 m_adapterName(status.strAdapterName ? status.strAdapterName : ""),
31 m_adapterStatus(status.strAdapterStatus ? status.strAdapterStatus : ""),
32 m_serviceName(status.strServiceName ? status.strServiceName : ""),
33 m_providerName(status.strProviderName ? status.strProviderName : ""),
34 m_muxName(status.strMuxName ? status.strMuxName : "")
38 virtual ~CPVRSignalStatus() = default;
40 int Signal() const { return m_status.iSignal; }
41 int SNR() const { return m_status.iSNR; }
42 long UNC() const { return m_status.iUNC; }
43 long BER() const { return m_status.iBER; }
44 const std::string& AdapterName() const { return m_adapterName; }
45 const std::string& AdapterStatus() const { return m_adapterStatus; }
46 const std::string& ServiceName() const { return m_serviceName; }
47 const std::string& ProviderName() const { return m_providerName; }
48 const std::string& MuxName() const { return m_muxName; }
50 private:
51 PVR_SIGNAL_STATUS m_status{};
52 std::string m_adapterName;
53 std::string m_adapterStatus;
54 std::string m_serviceName;
55 std::string m_providerName;
56 std::string m_muxName;
59 } // namespace PVR