/ src / common / interop / TwoWayPipeMessageIPCManaged.h
TwoWayPipeMessageIPCManaged.h
 1  #pragma once
 2  #include "TwoWayPipeMessageIPCManaged.g.h"
 3  #include "two_way_pipe_message_ipc.h"
 4  
 5  namespace winrt::PowerToys::Interop::implementation
 6  {
 7      struct TwoWayPipeMessageIPCManaged : TwoWayPipeMessageIPCManagedT<TwoWayPipeMessageIPCManaged>
 8      {
 9          TwoWayPipeMessageIPCManaged() = default;
10  
11          TwoWayPipeMessageIPCManaged(hstring const& inputPipeName, hstring const& outputPipeName, winrt::PowerToys::Interop::TwoWayPipeIPCReadCallback const& _callback);
12          void Send(hstring const& msg);
13          void Start();
14          void End();
15          void Close();
16  
17      private:
18          TwoWayPipeMessageIPC* _pipe;
19          TwoWayPipeIPCReadCallback _callback;
20          std::function<void(const std::wstring& msg)> _internalReadCallback;
21      };
22  }
23  namespace winrt::PowerToys::Interop::factory_implementation
24  {
25      struct TwoWayPipeMessageIPCManaged : TwoWayPipeMessageIPCManagedT<TwoWayPipeMessageIPCManaged, implementation::TwoWayPipeMessageIPCManaged>
26      {
27      };
28  }