COMCommand.h (2647B)
1 // Copyright (c) Microsoft Corporation. 2 // Licensed under the MIT License. 3 #pragma once 4 #include "Command.h" 5 6 namespace AppInstaller::CLI 7 { 8 // IMPORTANT: To use this command, the caller should have already retrieved the package manifest (GetManifest()) and added it to the Context Data 9 struct COMDownloadCommand final : public Command 10 { 11 constexpr static std::string_view CommandName = "download"sv; 12 COMDownloadCommand(std::string_view parent) : Command(CommandName, parent) {} 13 14 CLI::Resource::LocString ShortDescription() const override { return {}; } 15 CLI::Resource::LocString LongDescription() const override { return {}; } 16 17 protected: 18 void ExecuteInternal(Execution::Context& context) const override; 19 }; 20 21 // IMPORTANT: To use this command, the caller should have already retrieved the package manifest (GetManifest()) and added it to the Context Data 22 struct COMInstallCommand final : public Command 23 { 24 constexpr static std::string_view CommandName = "install"sv; 25 COMInstallCommand(std::string_view parent) : Command(CommandName, parent) {} 26 27 CLI::Resource::LocString ShortDescription() const override { return {}; } 28 CLI::Resource::LocString LongDescription() const override { return {}; } 29 30 protected: 31 void ExecuteInternal(Execution::Context& context) const override; 32 }; 33 34 // IMPORTANT: To use this command, the caller should have already retrieved the InstalledPackageVersion and added it to the Context Data 35 struct COMUninstallCommand final : public Command 36 { 37 constexpr static std::string_view CommandName = "uninstall"sv; 38 COMUninstallCommand(std::string_view parent) : Command(CommandName, parent) {} 39 40 CLI::Resource::LocString ShortDescription() const override { return {}; } 41 CLI::Resource::LocString LongDescription() const override { return {}; } 42 43 protected: 44 void ExecuteInternal(Execution::Context& context) const override; 45 }; 46 47 // IMPORTANT: To use this command, the caller should have already retrieved the InstalledPackageVersion and added it to the Context Data 48 struct COMRepairCommand final : public Command 49 { 50 constexpr static std::string_view CommandName = "repair"sv; 51 COMRepairCommand(std::string_view parent) : Command(CommandName, parent) {} 52 53 CLI::Resource::LocString ShortDescription() const override { return {}; } 54 CLI::Resource::LocString LongDescription() const override { return {}; } 55 56 protected: 57 void ExecuteInternal(Execution::Context& context) const override; 58 }; 59 }