more commands added
authorJan Kupec <jkupec@suse.cz>
Tue, 19 Jun 2007 10:17:01 +0000 (10:17 +0000)
committerJan Kupec <jkupec@suse.cz>
Tue, 19 Jun 2007 10:17:01 +0000 (10:17 +0000)
src/zypper-command.cc
src/zypper-command.h

index ad9b1e8..5ceaa4e 100644 (file)
@@ -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<std::string,ZypperCommand::Command>::const_iterator it
index 76d485f..932cfcc 100644 (file)
@@ -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) {}