2014-03-04 00:07:58 +02:00
|
|
|
#pragma once
|
|
|
|
|
2014-06-20 22:29:46 +03:00
|
|
|
#include "console_handler.h"
|
2014-06-20 21:49:43 +03:00
|
|
|
#include "daemon/interactive_command_executor.h"
|
2014-06-20 02:02:22 +03:00
|
|
|
#include "daemon/command_parser_executor.h"
|
2014-06-17 23:46:41 +03:00
|
|
|
|
|
|
|
namespace daemonize {
|
2014-03-04 00:07:58 +02:00
|
|
|
|
2014-06-17 23:46:41 +03:00
|
|
|
class t_command_server {
|
|
|
|
private:
|
2014-06-20 02:02:22 +03:00
|
|
|
t_command_parser_executor m_parser;
|
2014-06-20 22:29:46 +03:00
|
|
|
epee::command_handler m_command_lookup;
|
2014-06-17 23:46:41 +03:00
|
|
|
public:
|
2014-06-20 02:02:22 +03:00
|
|
|
t_command_server(
|
2014-06-20 22:29:46 +03:00
|
|
|
t_command_executor * executor
|
|
|
|
);
|
2014-06-17 23:46:41 +03:00
|
|
|
|
2014-06-20 22:29:46 +03:00
|
|
|
bool process_command(const std::string& cmd);
|
2014-06-17 23:46:41 +03:00
|
|
|
|
|
|
|
private:
|
2014-06-20 22:29:46 +03:00
|
|
|
bool help(const std::vector<std::string>& args);
|
2014-06-17 23:46:41 +03:00
|
|
|
|
2014-06-20 22:29:46 +03:00
|
|
|
std::string get_commands_str();
|
2014-06-17 23:46:41 +03:00
|
|
|
};
|
|
|
|
|
|
|
|
} // namespace daemonize
|