#ifndef _UNINSTALL_H_ #define _UNINSTALL_H_ #include #include #include using namespace std; #include "stringArray.h" static string uninstall_ALL = "all"; typedef struct unInstallCommand { string command; stringArray parameters; } unInstallCommand; typedef vector unInstallCommandList; typedef map > unInstallCommandMap; class unInstaller { private: unInstallCommandMap _map; void unInstallGroup(unInstallCommandList &list); bool readFile(string &fileName); bool getLine(char *line, string &groupname); public: unInstaller(string &fileName); unInstaller(const char *fileName); void unInstall(string &listName); bool record(string group, string cmd, string param); bool record(string group, string cmd, int count, ...); bool saveToFile(string filename); bool execCommand(string &command, stringArray ¶ms); }; #endif