#ifndef _UNINSTALL_H_ #define _UNINSTALL_H_ #include #include #include // use the standard namespace #if !defined (GSDL_NAMESPACE_BROKEN) #if defined(GSDL_USE_OBJECTSPACE) using namespace ospace::std; #else using namespace std; #endif #endif #include #if defined (GSDL_USE_IOS_H) #include #else #include #endif #include "stringArray.h" static string uninstall_ALL = "all"; typedef class unInstallCommand { public: string command; stringArray parameters; unInstallCommand() { this->parameters.permitDuplication(true); } unInstallCommand(string commandname) { this->command = commandname; this->parameters.permitDuplication(true); } unInstallCommand(string commandname, stringArray params) { this->command = commandname; this->parameters = params; this->parameters.permitDuplication(true); }; void addParameter(string parameter) { this->parameters.add(parameter); }; string commandName() { return this->command; }; stringArray ¶meterList() { return this->parameters; }; } unInstallCommand; typedef vector unInstallCommandList; typedef map > unInstallCommandMap; class installManager { private: fstream logfile; string logfileName; string currentModule; unInstallCommandMap modules; bool changed; bool writeString(string str); bool writeString(char *string); bool writeSeparator(); string readString(); bool writeCommand(unInstallCommand &command); string readCommand(stringArray ¶ms); public: installManager() { this->changed = false; } bool logExists(); bool setLogFile(string filename); bool ensureLog(); bool readLog(); bool recordLog(); void setModule(string moduleName); bool storeCommand(unInstallCommand &command); string popCommand(stringArray ¶ms); bool isEmpty(); ~installManager(); }; class installAgent { protected: installManager *manager; public: installAgent(installManager &useManager) { this->manager = &useManager; }; virtual bool undoAction(string actionName, stringArray ¶ms) { return false; }; // bool undo(string actionName); }; #endif