master
h 34 lines 993 Bytes
Raw
1 /*++
2
3 Copyright (c) Microsoft. All rights reserved.
4
5 Module Name:
6
7 ConsoleService.h
8
9 Abstract:
10
11 This file contains the ConsoleService definition
12
13 --*/
14 #pragma once
15
16 #include <wslc.h>
17 #include <WSLCContainerLauncher.h>
18 #include <ConsoleState.h>
19 #include "Terminal.h"
20
21 namespace wsl::windows::wslc::services {
22 class ConsoleService
23 {
24 public:
25 static int AttachToCurrentConsole(
26 Terminal& terminal, wsl::windows::common::ConsoleState& console, wsl::windows::common::ClientRunningWSLCProcess&& process, bool triggerRefresh = false);
27 static bool RelayInteractiveTty(
28 wsl::windows::common::ConsoleState& console, wsl::windows::common::ClientRunningWSLCProcess& process, HANDLE tty, bool triggerRefresh = false);
29 static void RelayNonTtyProcess(
30 wsl::windows::common::io::HandleWrapper&& Stdin,
31 wsl::windows::common::io::HandleWrapper&& Stdout,
32 wsl::windows::common::io::HandleWrapper&& Stderr);
33 };
34 } // namespace wsl::windows::wslc::services