// Copyright (c) 2012-2015, The CryptoNote developers, The Bytecoin developers // // This file is part of Bytecoin. // // Bytecoin is free software: you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // // Bytecoin is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public License // along with Bytecoin. If not, see . #pragma once #include "Common/ConsoleHandler.h" #include #include namespace CryptoNote { class core; class NodeServer; } class DaemonCommandsHandler { public: DaemonCommandsHandler(CryptoNote::core& core, CryptoNote::NodeServer& srv, Logging::LoggerManager& log); bool start_handling() { m_consoleHandler.start(); return true; } void stop_handling() { m_consoleHandler.stop(); } private: Common::ConsoleHandler m_consoleHandler; CryptoNote::core& m_core; CryptoNote::NodeServer& m_srv; Logging::LoggerRef logger; Logging::LoggerManager& m_logManager; std::string get_commands_str(); bool print_block_by_height(uint32_t height); bool print_block_by_hash(const std::string& arg); bool exit(const std::vector& args); bool help(const std::vector& args); bool print_pl(const std::vector& args); bool show_hr(const std::vector& args); bool hide_hr(const std::vector& args); bool print_bc_outs(const std::vector& args); bool print_cn(const std::vector& args); bool print_bc(const std::vector& args); bool print_bci(const std::vector& args); bool set_log(const std::vector& args); bool print_block(const std::vector& args); bool print_tx(const std::vector& args); bool print_pool(const std::vector& args); bool print_pool_sh(const std::vector& args); bool start_mining(const std::vector& args); bool stop_mining(const std::vector& args); };