61 lines
1.3 KiB
C++
Executable File
61 lines
1.3 KiB
C++
Executable File
/**
|
|
* @RDE_HEADER@
|
|
* QueryEloka
|
|
* $Id$
|
|
* $HeadURL$
|
|
* $Author$
|
|
* Created by Astrid Mueller, SGAS, 2017-11-14
|
|
*/
|
|
|
|
#pragma once
|
|
|
|
#include "icommand.h"
|
|
#include <AudioVideoManagement/ava_types.h>
|
|
#include <AudioVideoManagement/list_response_collector.h>
|
|
#include <QVector>
|
|
|
|
namespace AudioVideoManagement
|
|
{
|
|
|
|
class IAvaComm;
|
|
class IAvaCommandDoneObserver;
|
|
|
|
namespace AvaCommands
|
|
{
|
|
|
|
/**
|
|
* Command to issue queryEloka with modes AvaQueryElokaMode::Push or AvaQueryElokaMode::Poll.
|
|
* When mode is AvaQueryElokaMode::Stop, queryEloka is a SimpleCommand.
|
|
*
|
|
* @author Astrid Müller
|
|
*/
|
|
class QueryEloka final : public ICommand
|
|
{
|
|
Q_OBJECT
|
|
|
|
public:
|
|
QueryEloka(IAvaComm *comm, IAvaCommandDoneObserver *observer, AvaQueryElokaMode mode);
|
|
|
|
void send() override;
|
|
QString debug() const override { return QLatin1String("QueryEloka"); }
|
|
|
|
const QVector<AvaEloka> &eloka() const { return m_eloka; }
|
|
|
|
private slots:
|
|
void onOk();
|
|
|
|
private:
|
|
void done();
|
|
void onQueryElokaListReceived(QVector<AvaEloka> &&eloka);
|
|
|
|
const AvaQueryElokaMode m_mode;
|
|
bool m_ok{false};
|
|
IAvaComm *m_comm;
|
|
IAvaCommandDoneObserver *m_observer;
|
|
QVector<AvaEloka> m_eloka;
|
|
QueryElokaListCollector m_collector;
|
|
};
|
|
|
|
} // namespace AvaCommands
|
|
} // namespace AudioVideoManagement
|