summaryrefslogtreecommitdiffstats
path: root/src/Client/CommandParser.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/Client/CommandParser.h')
-rw-r--r--src/Client/CommandParser.h15
1 files changed, 13 insertions, 2 deletions
diff --git a/src/Client/CommandParser.h b/src/Client/CommandParser.h
index 692eb7e..ca9b59e 100644
--- a/src/Client/CommandParser.h
+++ b/src/Client/CommandParser.h
@@ -20,8 +20,10 @@
#ifndef MAD_CLIENT_COMMANDPARSER_H_
#define MAD_CLIENT_COMMANDPARSER_H_
-#include "CommandManager.h"
#include <Common/HostInfo.h>
+#include <Common/XmlPacket.h>
+
+#include <boost/smart_ptr.hpp>
#include <map>
#include <string>
@@ -52,11 +54,16 @@ class CommandParser {
Common::Connection *connection;
+ bool disconnect;
+
const Command* findCommand(const std::string& command);
void printUsage(const std::string& command);
std::map<std::string, Common::HostInfo> parseHostList(const std::vector<std::string> &args, bool mustBeActive = false);
+ void printFSInfo(boost::shared_ptr<const Common::XmlPacket> &packet);
+ void printHostStatus(boost::shared_ptr<const Common::XmlPacket> &packet);
+
void fsinfoCommand(const std::vector<std::string> &args);
void helpCommand(const std::vector<std::string> &args);
void listHostsCommand(const std::vector<std::string> &args);
@@ -70,7 +77,7 @@ class CommandParser {
void listGroupUsersCommand(const std::vector<std::string> &args);
void exitCommand(const std::vector<std::string>&);
- CommandParser() : connection(0) {}
+ CommandParser() : connection(0), disconnect(false) {}
public:
static CommandParser *get() {
@@ -90,6 +97,10 @@ class CommandParser {
void requestDisconnect() {
exitCommand(std::vector<std::string>());
}
+
+ bool willDisconnect() const {
+ return disconnect;
+ }
};
}