mirror of
https://github.com/autc04/Retro68.git
synced 2024-12-01 11:52:47 +00:00
27 lines
603 B
C
27 lines
603 B
C
|
#pragma once
|
||
|
#include "Launcher.h"
|
||
|
#include <vector>
|
||
|
|
||
|
class Stream;
|
||
|
class WaitableStream;
|
||
|
|
||
|
class StreamBasedLauncher : public Launcher
|
||
|
{
|
||
|
WaitableStream *stream;
|
||
|
Stream *rStream;
|
||
|
std::vector<char> outputBytes;
|
||
|
bool upgradeMode = false;
|
||
|
public:
|
||
|
StreamBasedLauncher(boost::program_options::variables_map& options);
|
||
|
virtual ~StreamBasedLauncher();
|
||
|
|
||
|
virtual bool Go(int timeout = 0);
|
||
|
virtual void DumpOutput();
|
||
|
|
||
|
protected:
|
||
|
void SetupStream(WaitableStream* aStream, Stream* wrapped = nullptr);
|
||
|
private:
|
||
|
void write(const void *p, size_t n);
|
||
|
ssize_t read(void * p, size_t n);
|
||
|
};
|