2019-09-04 18:26:26 +02:00
|
|
|
#pragma once
|
2024-08-08 15:26:43 +01:00
|
|
|
#include <functional>
|
2020-03-05 13:07:06 +03:00
|
|
|
class TwoWayPipeMessageIPC
|
|
|
|
|
{
|
2019-09-04 18:26:26 +02:00
|
|
|
public:
|
2024-08-08 15:26:43 +01:00
|
|
|
typedef std::function<void(const std::wstring&)>callback_function;
|
2020-04-23 17:11:02 -07:00
|
|
|
TwoWayPipeMessageIPC(
|
2020-12-15 15:16:09 +03:00
|
|
|
std::wstring _input_pipe_name,
|
|
|
|
|
std::wstring _output_pipe_name,
|
2020-04-23 17:11:02 -07:00
|
|
|
callback_function p_func);
|
|
|
|
|
~TwoWayPipeMessageIPC();
|
|
|
|
|
void send(std::wstring msg);
|
|
|
|
|
void start(HANDLE _restricted_pipe_token);
|
|
|
|
|
void end();
|
2019-09-04 18:26:26 +02:00
|
|
|
|
|
|
|
|
private:
|
2020-04-23 17:11:02 -07:00
|
|
|
class TwoWayPipeMessageIPCImpl;
|
|
|
|
|
TwoWayPipeMessageIPCImpl* impl;
|
|
|
|
|
};
|