/** * Communication with A/V system - fm server * $Id$ * $HeadURL$ * $Author$ */ #pragma once #include "av_socket.h" #include "logger.h" namespace AudioVideoManagement { class ExerciseContext; class FMControl final : public AVSocket { Q_OBJECT public: enum class Commands { SyslogEvent = 265, AvEvent = 266 }; enum class Subcommands { AllFilesDeleted = 2306, FileDeletionProgress = 2307 }; public: FMControl(const QString &fmServerHost, quint16 fmServerPort, QObject *parent = nullptr); ~FMControl(); signals: /** * When we want to delete an exercise (on AVS side) we set it's operating * mode to Cleanup. Then AVS starts to delete all the files associated with the exercise. * Once the deletion is finished, this signal will be triggered. */ void fileDeletionCompleted(const ExerciseContext &context); private: void handleSubcommandAvEvent(const QByteArray &line, const QVector &baList); private Q_SLOTS: void onReadyRead() override; }; } // namespace AudioVideoManagement