From 9b813d4a78a5f56ec3f4be2e00f3ba10b667825f Mon Sep 17 00:00:00 2001 From: Jan Kupec Date: Tue, 19 Jun 2007 10:17:01 +0000 Subject: [PATCH] more commands added --- src/zypper-command.cc | 25 ++++++++++++++++++++++++- src/zypper-command.h | 20 ++++++++++++++++++++ 2 files changed, 44 insertions(+), 1 deletion(-) diff --git a/src/zypper-command.cc b/src/zypper-command.cc index ad9b1e8..5ceaa4e 100644 --- a/src/zypper-command.cc +++ b/src/zypper-command.cc @@ -25,6 +25,18 @@ const ZypperCommand ZypperCommand::INSTALL(ZypperCommand::INSTALL_e); const ZypperCommand ZypperCommand::REMOVE(ZypperCommand::REMOVE_e); const ZypperCommand ZypperCommand::UPDATE(ZypperCommand::UPDATE_e); +const ZypperCommand ZypperCommand::INFO(ZypperCommand::INFO_e); + +const ZypperCommand ZypperCommand::HELP(ZypperCommand::HELP_e); +const ZypperCommand ZypperCommand::SHELL(ZypperCommand::SHELL_e); +const ZypperCommand ZypperCommand::SHELL_QUIT(ZypperCommand::SHELL_QUIT_e); +const ZypperCommand ZypperCommand::NONE(ZypperCommand::NONE_e); +const ZypperCommand ZypperCommand::MOO(ZypperCommand::MOO_e); + + +const ZypperCommand ZypperCommand::RUG_PATCH_INFO(ZypperCommand::RUG_PATCH_INFO_e); + + ZypperCommand::ZypperCommand(const std::string & strval_r) : _command(parse(strval_r)) {} @@ -42,7 +54,18 @@ ZypperCommand::Command ZypperCommand::parse(const std::string & strval_r) _table["install"] = _table["in"] = ZypperCommand::INSTALL_e; _table["remove"] = _table["rm"] = ZypperCommand::REMOVE_e; _table["update"] = _table["up"] = ZypperCommand::UPDATE_e; - _table["NONE"] = _table["none"] = ZypperCommand::NONE_e; + + _table["info"] = _table["if"] = ZypperCommand::INFO_e; + + _table["help"] = ZypperCommand::HELP_e; + _table["shell"] = _table["sh"] = ZypperCommand::SHELL_e; + _table["quit"] = _table["exit"] = _table["\004"] = ZypperCommand::SHELL_QUIT_e; + _table["NONE"] = _table["none"] = _table[""] = ZypperCommand::NONE_e; + _table["moo"] = ZypperCommand::MOO_e; + + + // rug commands doable with zypper commands + _table["patch-info"] = ZypperCommand::RUG_PATCH_INFO_e; } std::map::const_iterator it diff --git a/src/zypper-command.h b/src/zypper-command.h index 76d485f..932cfcc 100644 --- a/src/zypper-command.h +++ b/src/zypper-command.h @@ -10,6 +10,7 @@ */ struct ZypperCommand { + static const ZypperCommand NONE; static const ZypperCommand ADD_REPO; static const ZypperCommand REMOVE_REPO; static const ZypperCommand LIST_REPOS; @@ -18,6 +19,16 @@ struct ZypperCommand static const ZypperCommand INSTALL; static const ZypperCommand REMOVE; static const ZypperCommand UPDATE; + + static const ZypperCommand INFO; + + static const ZypperCommand HELP; + static const ZypperCommand SHELL; + static const ZypperCommand SHELL_QUIT; + static const ZypperCommand MOO; + + // rug commands + static const ZypperCommand RUG_PATCH_INFO; enum Command { @@ -30,6 +41,15 @@ struct ZypperCommand INSTALL_e, REMOVE_e, UPDATE_e, + + INFO_e, + + HELP_e, + SHELL_e, + SHELL_QUIT_e, + MOO_e, + + RUG_PATCH_INFO_e }; ZypperCommand(Command command) : _command(command) {} -- 2.7.4