Monero
command_parser_executor.h
Go to the documentation of this file.
1 
9 // Copyright (c) 2014-2018, The Monero Project
10 //
11 // All rights reserved.
12 //
13 // Redistribution and use in source and binary forms, with or without modification, are
14 // permitted provided that the following conditions are met:
15 //
16 // 1. Redistributions of source code must retain the above copyright notice, this list of
17 // conditions and the following disclaimer.
18 //
19 // 2. Redistributions in binary form must reproduce the above copyright notice, this list
20 // of conditions and the following disclaimer in the documentation and/or other
21 // materials provided with the distribution.
22 //
23 // 3. Neither the name of the copyright holder nor the names of its contributors may be
24 // used to endorse or promote products derived from this software without specific
25 // prior written permission.
26 //
27 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
28 // EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
29 // MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
30 // THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
31 // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
32 // PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
33 // INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
34 // STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF
35 // THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
36 
37 #pragma once
38 
39 #include <boost/optional/optional.hpp>
40 
42 #include "common/common_fwd.h"
43 #include "rpc/core_rpc_server.h"
44 
45 namespace daemonize {
46 
48 {
49 private:
51 public:
53  uint32_t ip
54  , uint16_t port
55  , const boost::optional<tools::login>& login
56  , bool is_rpc
57  , cryptonote::core_rpc_server* rpc_server = NULL
58  );
59 
60  bool print_peer_list(const std::vector<std::string>& args);
61 
62  bool print_peer_list_stats(const std::vector<std::string>& args);
63 
64  bool save_blockchain(const std::vector<std::string>& args);
65 
66  bool show_hash_rate(const std::vector<std::string>& args);
67 
68  bool hide_hash_rate(const std::vector<std::string>& args);
69 
70  bool show_difficulty(const std::vector<std::string>& args);
71 
72  bool show_status(const std::vector<std::string>& args);
73 
74  bool print_connections(const std::vector<std::string>& args);
75 
76  bool print_blockchain_info(const std::vector<std::string>& args);
77 
78  bool set_log_level(const std::vector<std::string>& args);
79 
80  bool set_log_categories(const std::vector<std::string>& args);
81 
82  bool print_height(const std::vector<std::string>& args);
83 
84  bool print_block(const std::vector<std::string>& args);
85 
86  bool print_transaction(const std::vector<std::string>& args);
87 
88  bool is_key_image_spent(const std::vector<std::string>& args);
89 
90  bool print_transaction_pool_long(const std::vector<std::string>& args);
91 
92  bool print_transaction_pool_short(const std::vector<std::string>& args);
93 
94  bool print_transaction_pool_stats(const std::vector<std::string>& args);
95 
96  bool start_mining(const std::vector<std::string>& args);
97 
98  bool stop_mining(const std::vector<std::string>& args);
99 
100  bool stop_daemon(const std::vector<std::string>& args);
101 
102  bool print_status(const std::vector<std::string>& args);
103 
104  bool set_limit(const std::vector<std::string>& args);
105 
106  bool set_limit_up(const std::vector<std::string>& args);
107 
108  bool set_limit_down(const std::vector<std::string>& args);
109 
110  bool out_peers(const std::vector<std::string>& args);
111 
112  bool in_peers(const std::vector<std::string>& args);
113 
114  bool start_save_graph(const std::vector<std::string>& args);
115 
116  bool stop_save_graph(const std::vector<std::string>& args);
117 
118  bool hard_fork_info(const std::vector<std::string>& args);
119 
120  bool show_bans(const std::vector<std::string>& args);
121 
122  bool ban(const std::vector<std::string>& args);
123 
124  bool unban(const std::vector<std::string>& args);
125 
126  bool flush_txpool(const std::vector<std::string>& args);
127 
128  bool output_histogram(const std::vector<std::string>& args);
129 
130  bool print_coinbase_tx_sum(const std::vector<std::string>& args);
131 
132  bool alt_chain_info(const std::vector<std::string>& args);
133 
134  bool print_blockchain_dynamic_stats(const std::vector<std::string>& args);
135 
136  bool update(const std::vector<std::string>& args);
137 
138  bool relay_tx(const std::vector<std::string>& args);
139 
140  bool sync_info(const std::vector<std::string>& args);
141 
142  bool version(const std::vector<std::string>& args);
143 };
144 
145 } // namespace daemonize
bool start_mining(const std::vector< std::string > &args)
Definition: command_parser_executor.cpp:264
bool stop_save_graph(const std::vector< std::string > &args)
Definition: command_parser_executor.cpp:478
t_rpc_command_executor m_executor
Definition: command_parser_executor.h:50
bool show_status(const std::vector< std::string > &args)
Definition: command_parser_executor.cpp:91
bool print_transaction_pool_long(const std::vector< std::string > &args)
Definition: command_parser_executor.cpp:243
bool show_bans(const std::vector< std::string > &args)
Definition: command_parser_executor.cpp:506
bool flush_txpool(const std::vector< std::string > &args)
Definition: command_parser_executor.cpp:542
bool print_connections(const std::vector< std::string > &args)
Definition: command_parser_executor.cpp:98
bool hide_hash_rate(const std::vector< std::string > &args)
Definition: command_parser_executor.cpp:77
bool print_transaction_pool_stats(const std::vector< std::string > &args)
Definition: command_parser_executor.cpp:257
bool print_transaction_pool_short(const std::vector< std::string > &args)
Definition: command_parser_executor.cpp:250
Definition: command_parser_executor.cpp:37
bool unban(const std::vector< std::string > &args)
Definition: command_parser_executor.cpp:535
bool print_block(const std::vector< std::string > &args)
Definition: command_parser_executor.cpp:164
bool set_limit_up(const std::vector< std::string > &args)
Definition: command_parser_executor.cpp:402
bool print_transaction(const std::vector< std::string > &args)
Definition: command_parser_executor.cpp:190
bool stop_daemon(const std::vector< std::string > &args)
Definition: command_parser_executor.cpp:370
bool stop_mining(const std::vector< std::string > &args)
Definition: command_parser_executor.cpp:363
bool version(const std::vector< std::string > &args)
Definition: command_parser_executor.cpp:677
bool set_log_categories(const std::vector< std::string > &args)
bool hard_fork_info(const std::vector< std::string > &args)
Definition: command_parser_executor.cpp:484
Definition: command_parser_executor.h:47
bool relay_tx(const std::vector< std::string > &args)
Definition: command_parser_executor.cpp:655
bool ban(const std::vector< std::string > &args)
Definition: command_parser_executor.cpp:512
bool print_coinbase_tx_sum(const std::vector< std::string > &args)
Definition: command_parser_executor.cpp:592
bool print_status(const std::vector< std::string > &args)
Definition: command_parser_executor.cpp:377
bool output_histogram(const std::vector< std::string > &args)
Definition: command_parser_executor.cpp:560
bool set_log_level(const std::vector< std::string > &args)
Definition: command_parser_executor.cpp:128
bool print_peer_list_stats(const std::vector< std::string > &args)
Definition: command_parser_executor.cpp:56
bool set_limit_down(const std::vector< std::string > &args)
Definition: command_parser_executor.cpp:420
Definition: rpc_command_executor.h:53
bool show_difficulty(const std::vector< std::string > &args)
Definition: command_parser_executor.cpp:84
bool update(const std::vector< std::string > &args)
Definition: command_parser_executor.cpp:644
bool alt_chain_info(const std::vector< std::string > &args)
Definition: command_parser_executor.cpp:615
bool print_blockchain_info(const std::vector< std::string > &args)
Definition: command_parser_executor.cpp:105
bool in_peers(const std::vector< std::string > &args)
Definition: command_parser_executor.cpp:455
bool show_hash_rate(const std::vector< std::string > &args)
Definition: command_parser_executor.cpp:70
t_command_parser_executor(uint32_t ip, uint16_t port, const boost::optional< tools::login > &login, bool is_rpc, cryptonote::core_rpc_server *rpc_server=NULL)
Definition: command_parser_executor.cpp:39
bool print_peer_list(const std::vector< std::string > &args)
Definition: command_parser_executor.cpp:49
Definition: core_rpc_server.h:52
bool set_limit(const std::vector< std::string > &args)
Definition: command_parser_executor.cpp:384
bool sync_info(const std::vector< std::string > &args)
Definition: command_parser_executor.cpp:670
bool start_save_graph(const std::vector< std::string > &args)
Definition: command_parser_executor.cpp:472
bool print_blockchain_dynamic_stats(const std::vector< std::string > &args)
Definition: command_parser_executor.cpp:626
bool out_peers(const std::vector< std::string > &args)
Definition: command_parser_executor.cpp:438
bool is_key_image_spent(const std::vector< std::string > &args)
Definition: command_parser_executor.cpp:223
bool save_blockchain(const std::vector< std::string > &args)
Definition: command_parser_executor.cpp:63
bool print_height(const std::vector< std::string > &args)
Definition: command_parser_executor.cpp:157