BitShares-Core  7.0.2
BitShares blockchain node software and command-line wallet software
Public Member Functions | List of all members
fc::rpc::cli Class Reference

#include <cli.hpp>

Inheritance diagram for fc::rpc::cli:
fc::api_connection

Public Member Functions

 cli (uint32_t max_depth)
 
 ~cli ()
 
virtual variant send_call (api_id_type api_id, string method_name, variants args=variants())
 
virtual variant send_callback (uint64_t callback_id, variants args=variants())
 
virtual void send_notice (uint64_t callback_id, variants args=variants())
 
void start ()
 
void stop ()
 
void cancel ()
 
void wait ()
 
void format_result (const string &method, std::function< string(variant, const variants &)> formatter)
 
virtual void getline (const std::string &prompt, std::string &line)
 
void set_prompt (const string &prompt)
 
void set_regex_secret (const string &expr)
 
- Public Member Functions inherited from fc::api_connection
 api_connection (uint32_t max_depth)
 
virtual ~api_connection ()
 
template<typename T >
api< T > get_remote_api (api_id_type api_id=0)
 
variant receive_call (api_id_type api_id, const string &method_name, const variants &args=variants()) const
 
variant receive_callback (uint64_t callback_id, const variants &args=variants()) const
 
void receive_notice (uint64_t callback_id, const variants &args=variants()) const
 
template<typename Interface >
api_id_type register_api (const Interface &a)
 
template<typename Signature >
uint64_t register_callback (const std::function< Signature > &cb)
 
std::vector< std::string > get_method_names (api_id_type local_api_id=0) const
 

Additional Inherited Members

- Public Attributes inherited from fc::api_connection
fc::signal< void()> closed
 
const uint32_t _max_conversion_depth
 

Detailed Description

Provides a simple wrapper for RPC calls to a given interface.

Definition at line 16 of file cli.hpp.

Constructor & Destructor Documentation

◆ cli()

fc::rpc::cli::cli ( uint32_t  max_depth)
inline

Definition at line 19 of file cli.hpp.

◆ ~cli()

fc::rpc::cli::~cli ( )

Definition at line 34 of file cli.cpp.

Member Function Documentation

◆ cancel()

void fc::rpc::cli::cancel ( )

Definition at line 276 of file cli.cpp.

◆ format_result()

void fc::rpc::cli::format_result ( const string &  method,
std::function< string(variant, const variants &)>  formatter 
)

Definition at line 57 of file cli.cpp.

◆ getline()

void fc::rpc::cli::getline ( const std::string &  prompt,
std::string &  line 
)
virtual

Definition at line 305 of file cli.cpp.

◆ send_call()

variant fc::rpc::cli::send_call ( api_id_type  api_id,
string  method_name,
variants  args = variants() 
)
virtual

makes calls to the remote server

Implements fc::api_connection.

Definition at line 42 of file cli.cpp.

◆ send_callback()

variant fc::rpc::cli::send_callback ( uint64_t  callback_id,
variants  args = variants() 
)
virtual

Implements fc::api_connection.

Definition at line 47 of file cli.cpp.

◆ send_notice()

void fc::rpc::cli::send_notice ( uint64_t  callback_id,
variants  args = variants() 
)
virtual

Implements fc::api_connection.

Definition at line 52 of file cli.cpp.

◆ set_prompt()

void fc::rpc::cli::set_prompt ( const string &  prompt)

Definition at line 62 of file cli.cpp.

◆ set_regex_secret()

void fc::rpc::cli::set_regex_secret ( const string &  expr)

Definition at line 67 of file cli.cpp.

◆ start()

void fc::rpc::cli::start ( )

Definition at line 254 of file cli.cpp.

◆ stop()

void fc::rpc::cli::stop ( )

Definition at line 289 of file cli.cpp.

◆ wait()

void fc::rpc::cli::wait ( )

Definition at line 295 of file cli.cpp.


The documentation for this class was generated from the following files: