Initial commit
This commit is contained in:
commit
b7d90b9afe
16245 files changed
+3396666
No files matched your search
+108
@@ -0,0 +1,108 @@
|
||||
/**
|
||||
* @RDE_HEADER@
|
||||
* HMI Plugin for AudioVideoSystem
|
||||
* $Id$
|
||||
* $HeadURL$
|
||||
* $Author$
|
||||
* Created by Patric Karwat, SLSE, 2016-08-17
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <Plugins/AudioVideoManagement/avm_data_plugin_interface.h>
|
||||
#include <AudioVideoManagement/avm_dtc.h>
|
||||
#include <OperatorManagement/opm_dtc.h>
|
||||
#include "avm_exercise_context.h"
|
||||
#include "avs_session_context.h"
|
||||
#include <memory>
|
||||
|
||||
|
||||
namespace LtsSession { class LtsSession; }
|
||||
|
||||
|
||||
namespace AudioVideoManagement
|
||||
{
|
||||
|
||||
class AvaSession;
|
||||
class AvaState;
|
||||
class PlaybackApp;
|
||||
class PluginSettings;
|
||||
class StreamNameMapping;
|
||||
|
||||
class DataPlugin final : public QObject, public DataPluginBase::Plugin
|
||||
{
|
||||
Q_PLUGIN_METADATA(IID "data:3:avm")
|
||||
Q_INTERFACES(DataPluginBase::Plugin)
|
||||
|
||||
Q_OBJECT
|
||||
public:
|
||||
DataPlugin();
|
||||
~DataPlugin();
|
||||
|
||||
QString pluginName() const override { return QStringLiteral("AudioVideoManagement"); }
|
||||
std::shared_ptr<DataPluginBase::Interface> createDataInterface(LtsSession::LtsSessionDataDds *session) override;
|
||||
|
||||
bool availableInPartition(IDL::PartitionType partition) const override { return partition == IDL::PartitionType::Exercise || partition == IDL::PartitionType::Replay || partition == IDL::PartitionType::Global; }
|
||||
|
||||
private:
|
||||
AvmExerciseContextManager m_exerciseContext;
|
||||
AvsSessionContext m_avsSessionContext;
|
||||
std::unique_ptr<PluginSettings> m_pluginSettings; //!< the singleton instance
|
||||
};
|
||||
|
||||
|
||||
class DataInterfaceImpl final : public DataInterface
|
||||
{
|
||||
public:
|
||||
DataInterfaceImpl(LtsSession::LtsSessionDataDds *session, AvmExerciseContextHandle &&exerciseContextHandle, AvsSessionContext *sessionContext);
|
||||
~DataInterfaceImpl();
|
||||
|
||||
std::shared_ptr<AudioVideoManagement::Interface::Dtc> getDtc() override { return m_exerciseContextHandle.dtc(); }
|
||||
std::shared_ptr<AudioVideoManagement::Interface::Ftc> getFtc() override { return m_exerciseContextHandle.ftc(); }
|
||||
|
||||
ExerciseManagement::Interface::Dtc *getExmDtc() override { return m_exerciseContextHandle.exmDtc(); }
|
||||
OperatorManagement::Interface::Dtc *getOpmDtc() override { return m_exerciseContextHandle.opmDtc(); }
|
||||
|
||||
/**
|
||||
* @name Access to the communication session with AVS_Workstation and related parts.
|
||||
* The getter-methods may only be called when hasAvsSession() returns true.
|
||||
* They always return a valid pointer then.
|
||||
*/
|
||||
///@{
|
||||
bool hasAvsSession() const override { return m_avsSessionContextHandle; }
|
||||
bool vdSessionEstablished() const override;
|
||||
AvaSession *avaSession() override;
|
||||
AvaState *avaState() override;
|
||||
AvsMenus *menus() override;
|
||||
PlaybackApp *videoPlaybackApp() override { return m_avsSessionContextHandle.videoPlaybackApp(); }
|
||||
PlaybackApp *audioPlaybackApp() override { return m_avsSessionContextHandle.audioPlaybackApp(); }
|
||||
PlaybackApp *videoPresentationApp() override { return m_avsSessionContextHandle.videoPresentationApp(); }
|
||||
PlaybackApp *audioPresentationApp() override { return m_avsSessionContextHandle.audioPresentationApp(); }
|
||||
///@}
|
||||
|
||||
/**
|
||||
* @name Access to the communication session with AVS_Export.
|
||||
* The getter-methods may only be called when hasAvsSession() returns true.
|
||||
* They always return a valid pointer then.
|
||||
*/
|
||||
///@{
|
||||
VdSession *vdSession() override;
|
||||
///@}
|
||||
|
||||
/** Only available when not in global partition; must not be called otherwise. */
|
||||
StreamNameMapping *streamNameMapping() override;
|
||||
|
||||
/** No-op when hasAvsSession() == false. */
|
||||
///{@
|
||||
void showCamera(QWidget *irreplacableWidget, int mountingPointId) override;
|
||||
void showAnnouncementUnit(int mountingPointId) override;
|
||||
void showOrCloseAvsApp() override;
|
||||
///@}
|
||||
|
||||
private:
|
||||
AvmExerciseContextHandle m_exerciseContextHandle;
|
||||
AvsSessionContextHandle m_avsSessionContextHandle;
|
||||
LtsSession::LtsSession *m_session;
|
||||
};
|
||||
|
||||
} // namespace AudioVideoManagement
|
||||
Reference in new issue
Block a user