Initial commit
This commit is contained in:
commit
b7d90b9afe
16245 files changed
+3396666
No files matched your search
@@ -0,0 +1,51 @@
|
||||
/**
|
||||
* @RDE_HEADER@
|
||||
* GetStreamList
|
||||
* $Id$
|
||||
* $HeadURL$
|
||||
* $Author$
|
||||
* Created by Christian Fröbel, SLSE, 2017-06-29
|
||||
*/
|
||||
|
||||
#include "get_stream_list.h"
|
||||
#include "iava_comm.h"
|
||||
#include "iava_command_done_observer.h"
|
||||
#include <QtGlobal>
|
||||
|
||||
|
||||
namespace AudioVideoManagement
|
||||
{
|
||||
|
||||
namespace AvaCommands
|
||||
{
|
||||
|
||||
GetStreamList::GetStreamList(IAvaComm *comm, IAvaCommandDoneObserver *observer, AvaStreamType streamType, AvaStreamSource streamSource, StreamNameMapping *streamNameMapping)
|
||||
: m_streamType(streamType)
|
||||
, m_streamSource(streamSource)
|
||||
, m_collector(comm, [this] (QVector<AvaStream> &&streams) { onStreamListReceived(std::move(streams)); }, StreamListElementFactory(streamType, streamSource, streamNameMapping))
|
||||
, m_comm(comm)
|
||||
, m_observer(observer)
|
||||
{
|
||||
Q_ASSERT(comm);
|
||||
Q_ASSERT(observer);
|
||||
}
|
||||
|
||||
void GetStreamList::send()
|
||||
{
|
||||
m_collector.start();
|
||||
m_comm->getStreamList(m_streamType, m_streamSource);
|
||||
}
|
||||
|
||||
void GetStreamList::done()
|
||||
{
|
||||
m_comm->disconnect(this);
|
||||
m_observer->done(this);
|
||||
}
|
||||
|
||||
void GetStreamList::onStreamListReceived(QVector<AvaStream> &&streams)
|
||||
{
|
||||
m_streams = std::move(streams);
|
||||
done();
|
||||
}
|
||||
|
||||
}} // namespace AudioVideoManagement::AvaCommands
|
||||
Reference in new issue
Block a user