Files
qt5-legatus-legacy/Lts/Services/AudioVideoManagement/stream_name_mapping_publisher.h
T
2026-08-13 18:33:10 +02:00

77 lines
1.8 KiB
C++
Executable File

/**
* @RDE_HEADER@
* StreamNameMappingPublisher
* $Id$
* $HeadURL$
* $Author$
* Created by Christian Fröbel, NLSE, 2018-03-13
*/
#pragma once
#include <QMap>
#include <QObject>
#include <AudioVideoManagement/avm.hpp>
class QString;
namespace InfrastructureManagement
{
class MainStructureElement;
class StructureElement;
namespace Interface
{
class Dtc;
}
} // namespace InfrastructureManagement
enum class DataModification;
namespace AudioVideoManagement
{
namespace Interface
{
class Dts;
}
/**
* This class is responsible to publish the StreamNameMapping.
*
* We subscribe to ISM StructureElements and for each MountingPoint of type
* Outdoor-/IndoorCamera or AnnouncementUnit we publish the associated
* internalName and displayName.
*
* The internalName is the stream name used in the device_config.
* The displayName is what shall be show in the GUI.
*
* @author Christian Fröbel
*/
class StreamNameMappingPublisher : public QObject
{
public:
StreamNameMappingPublisher(InfrastructureManagement::Interface::Dtc *ismDtc, Interface::Dts *dts);
virtual ~StreamNameMappingPublisher() = default;
private slots:
void onMainStructureElementChanged(const InfrastructureManagement::MainStructureElement &mse, DataModification modType);
private:
void onMseChanged(const InfrastructureManagement::MainStructureElement &mse);
void onMseRemoved(const InfrastructureManagement::MainStructureElement &mse);
void publish(const InfrastructureManagement::StructureElement &mountingPoint);
void remove(const InfrastructureManagement::StructureElement &mountingPoint);
InfrastructureManagement::Interface::Dtc *m_ismDtc;
Interface::Dts *m_dts;
QMap<int, StreamName> m_streamNames;
};
} // namespace AudioVideoManagement