69 lines
1.1 KiB
C++
Executable File
69 lines
1.1 KiB
C++
Executable File
/**
|
|
* @RDE_HEADER@
|
|
* KeepAlive
|
|
* $Id$
|
|
* $HeadURL$
|
|
* $Author$
|
|
* Created by Christian Fröbel, NLSE, 2018-04-10
|
|
*/
|
|
|
|
#pragma once
|
|
|
|
#include "icommand.h"
|
|
|
|
namespace AudioVideoManagement
|
|
{
|
|
|
|
namespace detail
|
|
{
|
|
|
|
/**
|
|
* Implementation used for KeepAlives on both, RCP_AVA and RCP_VD.
|
|
*
|
|
* @author Christian Fröbel
|
|
*/
|
|
template<class Comm, class DoneObserver>
|
|
class KeepAlive final : public ICommand
|
|
{
|
|
public:
|
|
KeepAlive(Comm *comm, DoneObserver *doneObserver);
|
|
|
|
void send() override;
|
|
QString debug() const override { return QLatin1String("KeepAlive"); }
|
|
|
|
private slots:
|
|
void onKeepAliveReceived();
|
|
|
|
private:
|
|
void done();
|
|
|
|
Comm *m_comm;
|
|
DoneObserver *m_observer;
|
|
};
|
|
|
|
} // namespace detail
|
|
|
|
|
|
class IAvaComm;
|
|
class IAvaCommandDoneObserver;
|
|
|
|
namespace AvaCommands
|
|
{
|
|
|
|
using KeepAlive = detail::KeepAlive<IAvaComm, IAvaCommandDoneObserver>;
|
|
|
|
} // namespace AvaCommands
|
|
|
|
|
|
class IVdComm;
|
|
class IVdCommandDoneObserver;
|
|
|
|
namespace VdCommands
|
|
{
|
|
|
|
using KeepAlive = detail::KeepAlive<IVdComm, IVdCommandDoneObserver>;
|
|
|
|
} // namespace VdCommands
|
|
|
|
} // namespace AudioVideoManagement
|