| 1 | /*++ |
| 2 | |
| 3 | Copyright (c) Microsoft. All rights reserved. |
| 4 | |
| 5 | Module Name: |
| 6 | |
| 7 | SystemCommand.h |
| 8 | |
| 9 | Abstract: |
| 10 | |
| 11 | Declaration of System command tree. |
| 12 | |
| 13 | --*/ |
| 14 | #pragma once |
| 15 | #include "Command.h" |
| 16 | |
| 17 | namespace wsl::windows::wslc { |
| 18 | // Root System Command |
| 19 | struct SystemCommand final : public Command |
| 20 | { |
| 21 | constexpr static std::wstring_view CommandName = L"system"; |
| 22 | SystemCommand(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 | // System Info Command |
| 36 | struct SystemInfoCommand final : public Command |
| 37 | { |
| 38 | constexpr static std::wstring_view CommandName = L"info"; |
| 39 | SystemInfoCommand(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 | } // namespace wsl::windows::wslc |