mirror of
https://github.com/microsoft/PowerToys.git
synced 2026-04-03 17:56:44 +02:00
29 lines
978 B
C
29 lines
978 B
C
|
|
#pragma once
|
||
|
|
#include "TwoWayPipeMessageIPCManaged.g.h"
|
||
|
|
#include "two_way_pipe_message_ipc.h"
|
||
|
|
|
||
|
|
namespace winrt::PowerToys::Interop::implementation
|
||
|
|
{
|
||
|
|
struct TwoWayPipeMessageIPCManaged : TwoWayPipeMessageIPCManagedT<TwoWayPipeMessageIPCManaged>
|
||
|
|
{
|
||
|
|
TwoWayPipeMessageIPCManaged() = default;
|
||
|
|
|
||
|
|
TwoWayPipeMessageIPCManaged(hstring const& inputPipeName, hstring const& outputPipeName, winrt::PowerToys::Interop::TwoWayPipeIPCReadCallback const& _callback);
|
||
|
|
void Send(hstring const& msg);
|
||
|
|
void Start();
|
||
|
|
void End();
|
||
|
|
void Close();
|
||
|
|
|
||
|
|
private:
|
||
|
|
TwoWayPipeMessageIPC* _pipe;
|
||
|
|
TwoWayPipeIPCReadCallback _callback;
|
||
|
|
std::function<void(const std::wstring& msg)> _internalReadCallback;
|
||
|
|
};
|
||
|
|
}
|
||
|
|
namespace winrt::PowerToys::Interop::factory_implementation
|
||
|
|
{
|
||
|
|
struct TwoWayPipeMessageIPCManaged : TwoWayPipeMessageIPCManagedT<TwoWayPipeMessageIPCManaged, implementation::TwoWayPipeMessageIPCManaged>
|
||
|
|
{
|
||
|
|
};
|
||
|
|
}
|