diff options
Diffstat (limited to 'src/Client/CommandParser.cpp')
-rw-r--r-- | src/Client/CommandParser.cpp | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/Client/CommandParser.cpp b/src/Client/CommandParser.cpp index 78b3570..044a64c 100644 --- a/src/Client/CommandParser.cpp +++ b/src/Client/CommandParser.cpp @@ -26,6 +26,7 @@ #include <Common/RequestManager.h> #include <Common/Requests/FSInfoRequest.h> #include <Common/Requests/DisconnectRequest.h> +#include <Common/Requests/GroupListRequest.h> #include <Common/Requests/StatusRequest.h> #include <Common/Requests/UserInfoRequest.h> #include <Common/Requests/UserListRequest.h> @@ -48,6 +49,7 @@ const CommandParser::Command CommandParser::commands[] = { {{"status", "st", 0}, "status [host]", "Display status information", "Display host status information. If no host is given, display server status information.", &CommandParser::statusCommand}, {{"user_info", "user", 0}, "user_info uid", "Search for a user id", "Search for a user id.", &CommandParser::userInfoCommand}, {{"list_users", "users", 0}, "list_users", "Show the user account database", "Show the user account database.", &CommandParser::listUsersCommand}, + {{"list_groups", "groups", 0}, "list_groups", "Show the user group database", "Show the user group database.", &CommandParser::listGroupsCommand}, {{"exit", "quit", 0}, "exit", "Close the connection and quit the client", "Closes the connection and quits the client.", &CommandParser::exitCommand}, {{0}, 0, 0, 0, 0} }; @@ -290,6 +292,13 @@ void CommandParser::listUsersCommand(const std::vector<std::string>&) { boost::bind(&CommandManager::userListRequestFinished, CommandManager::get(), _1)); } +void CommandParser::listGroupsCommand(const std::vector<std::string>&) { + ++CommandManager::get()->activeRequests; + + Common::RequestManager::get()->sendRequest<Common::Requests::GroupListRequest>(connection, + boost::bind(&CommandManager::groupListRequestFinished, CommandManager::get(), _1)); +} + void CommandParser::exitCommand(const std::vector<std::string>&) { ++CommandManager::get()->activeRequests; |