master
h 109 lines 3.1 KB
Raw
1 /*++
2
3 Copyright (c) Microsoft. All rights reserved.
4
5 Module Name:
6
7 SessionCommand.h
8
9 Abstract:
10
11 Declaration of SessionCommand command tree.
12
13 --*/
14 #pragma once
15 #include "Command.h"
16
17 namespace wsl::windows::wslc {
18 // Root Session Command
19 struct SessionCommand final : public Command
20 {
21 constexpr static std::wstring_view CommandName = L"session";
22 SessionCommand(const std::wstring& parent) : Command(CommandName, parent)
23 {
24 }
25 std::vector<Argument> GetArguments() const override;
26 std::wstring ShortDescription() const override;
27 std::wstring LongDescription() const override;
28
29 std::vector<std::unique_ptr<Command>> GetCommands() const override;
30
31 protected:
32 void ExecuteInternal(CLIExecutionContext& context) const override;
33 };
34
35 // List Command
36 struct SessionListCommand final : public Command
37 {
38 constexpr static std::wstring_view CommandName = L"list";
39 SessionListCommand(const std::wstring& parent) : Command(CommandName, parent)
40 {
41 }
42 std::vector<Argument> GetArguments() const override;
43 std::wstring ShortDescription() const override;
44 std::wstring LongDescription() const override;
45
46 protected:
47 void ExecuteInternal(CLIExecutionContext& context) const override;
48 };
49
50 // Shell Command
51 struct SessionShellCommand final : public Command
52 {
53 constexpr static std::wstring_view CommandName = L"shell";
54 SessionShellCommand(const std::wstring& parent) : Command(CommandName, parent)
55 {
56 }
57 std::vector<Argument> GetArguments() const override;
58 std::wstring ShortDescription() const override;
59 std::wstring LongDescription() const override;
60
61 protected:
62 void ExecuteInternal(CLIExecutionContext& context) const override;
63 };
64
65 // Run Command
66 struct SessionRunCommand final : public Command
67 {
68 constexpr static std::wstring_view CommandName = L"run";
69 SessionRunCommand(const std::wstring& parent) : Command(CommandName, parent)
70 {
71 }
72 std::vector<Argument> GetArguments() const override;
73 std::wstring ShortDescription() const override;
74 std::wstring LongDescription() const override;
75
76 protected:
77 void ExecuteInternal(CLIExecutionContext& context) const override;
78 };
79
80 // Enter Command
81 struct SessionEnterCommand final : public Command
82 {
83 constexpr static std::wstring_view CommandName = L"enter";
84 SessionEnterCommand(const std::wstring& parent) : Command(CommandName, parent)
85 {
86 }
87 std::vector<Argument> GetArguments() const override;
88 std::wstring ShortDescription() const override;
89 std::wstring LongDescription() const override;
90
91 protected:
92 void ExecuteInternal(CLIExecutionContext& context) const override;
93 };
94
95 // Terminate Command
96 struct SessionTerminateCommand final : public Command
97 {
98 constexpr static std::wstring_view CommandName = L"terminate";
99 SessionTerminateCommand(const std::wstring& parent) : Command(CommandName, parent)
100 {
101 }
102 std::vector<Argument> GetArguments() const override;
103 std::wstring ShortDescription() const override;
104 std::wstring LongDescription() const override;
105
106 protected:
107 void ExecuteInternal(CLIExecutionContext& context) const override;
108 };
109 } // namespace wsl::windows::wslc