mirror of
https://github.com/microsoft/mscclpp.git
synced 2026-05-13 09:46:00 +00:00
41 lines
550 B
C++
41 lines
550 B
C++
#ifndef MSCCLPP_PROXY_HPP_
|
|
#define MSCCLPP_PROXY_HPP_
|
|
|
|
#include "mscclppfifo.hpp"
|
|
|
|
#include <functional>
|
|
#include <memory>
|
|
|
|
namespace mscclpp {
|
|
|
|
enum class ProxyHandlerResult
|
|
{
|
|
Continue,
|
|
FlushFifoTailAndContinue,
|
|
Stop,
|
|
};
|
|
|
|
class Proxy;
|
|
using ProxyHandler = std::function<ProxyHandlerResult(ProxyTrigger)>;
|
|
|
|
class Proxy
|
|
{
|
|
public:
|
|
Proxy(ProxyHandler handler);
|
|
|
|
~Proxy();
|
|
|
|
void start();
|
|
|
|
void stop();
|
|
|
|
HostProxyFifo& fifo();
|
|
|
|
private:
|
|
struct Impl;
|
|
std::unique_ptr<Impl> pimpl;
|
|
};
|
|
|
|
} // namespace mscclpp
|
|
|
|
#endif // MSCCLPP_PROXY_HPP_
|