Electroneum
Public Member Functions | Static Public Attributes | Private Attributes | List of all members
hw::trezor::BridgeTransport Class Reference

#include <transport.hpp>

Inheritance diagram for hw::trezor::BridgeTransport:
Inheritance graph
[legend]
Collaboration diagram for hw::trezor::BridgeTransport:
Collaboration graph
[legend]

Public Member Functions

 BridgeTransport (boost::optional< std::string > device_path=boost::none, boost::optional< std::string > bridge_host=boost::none)
 
virtual ~BridgeTransport ()=default
 
std::string get_path () const override
 
void enumerate (t_transport_vect &res) override
 
void open () override
 
void close () override
 
void write (const google::protobuf::Message &req) override
 
void read (std::shared_ptr< google::protobuf::Message > &msg, messages::MessageType *msg_type=nullptr) override
 
const boost::optional< json > & device_info () const
 
std::ostream & dump (std::ostream &o) const override
 
- Public Member Functions inherited from hw::trezor::Transport
 Transport ()
 
virtual ~Transport ()=default
 
virtual bool ping ()
 
virtual std::shared_ptr< Transportfind_debug ()
 
virtual void write_chunk (const void *buff, size_t size)
 
virtual size_t read_chunk (void *buff, size_t size)
 

Static Public Attributes

static const char * PATH_PREFIX = "bridge:"
 

Private Attributes

epee::net_utils::http::http_simple_client m_http_client
 
std::string m_bridge_host
 
boost::optional< std::string > m_device_path
 
boost::optional< std::string > m_session
 
boost::optional< std::string > m_response
 
boost::optional< jsonm_device_info
 

Additional Inherited Members

- Protected Member Functions inherited from hw::trezor::Transport
virtual bool pre_open ()
 
virtual bool pre_close ()
 
- Protected Attributes inherited from hw::trezor::Transport
long m_open_counter
 

Constructor & Destructor Documentation

◆ BridgeTransport()

hw::trezor::BridgeTransport::BridgeTransport ( boost::optional< std::string >  device_path = boost::none,
boost::optional< std::string >  bridge_host = boost::none 
)

◆ ~BridgeTransport()

virtual hw::trezor::BridgeTransport::~BridgeTransport ( )
virtualdefault

Member Function Documentation

◆ close()

void hw::trezor::BridgeTransport::close ( )
overridevirtual

Reimplemented from hw::trezor::Transport.

◆ device_info()

const boost::optional< json > & hw::trezor::BridgeTransport::device_info ( ) const

◆ dump()

std::ostream & hw::trezor::BridgeTransport::dump ( std::ostream &  o) const
overridevirtual

Reimplemented from hw::trezor::Transport.

◆ enumerate()

void hw::trezor::BridgeTransport::enumerate ( t_transport_vect res)
overridevirtual

Reimplemented from hw::trezor::Transport.

◆ get_path()

std::string hw::trezor::BridgeTransport::get_path ( ) const
overridevirtual

Reimplemented from hw::trezor::Transport.

◆ open()

void hw::trezor::BridgeTransport::open ( )
overridevirtual

Reimplemented from hw::trezor::Transport.

◆ read()

void hw::trezor::BridgeTransport::read ( std::shared_ptr< google::protobuf::Message > &  msg,
messages::MessageType *  msg_type = nullptr 
)
overridevirtual

Implements hw::trezor::Transport.

◆ write()

void hw::trezor::BridgeTransport::write ( const google::protobuf::Message &  req)
overridevirtual

Implements hw::trezor::Transport.

Member Data Documentation

◆ m_bridge_host

std::string hw::trezor::BridgeTransport::m_bridge_host
private

◆ m_device_info

boost::optional<json> hw::trezor::BridgeTransport::m_device_info
private

◆ m_device_path

boost::optional<std::string> hw::trezor::BridgeTransport::m_device_path
private

◆ m_http_client

epee::net_utils::http::http_simple_client hw::trezor::BridgeTransport::m_http_client
private

◆ m_response

boost::optional<std::string> hw::trezor::BridgeTransport::m_response
private

◆ m_session

boost::optional<std::string> hw::trezor::BridgeTransport::m_session
private

◆ PATH_PREFIX

const char * hw::trezor::BridgeTransport::PATH_PREFIX = "bridge:"
static

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