Electroneum
Electroneum::WalletListener Struct Referenceabstract

#include <wallet2_api.h>

Inheritance diagram for Electroneum::WalletListener:

Public Member Functions

virtual ~WalletListener ()=0
 
virtual void etnSpent (const std::string &txId, uint64_t amount)=0
 etnSpent - called when etn spent More...
 
virtual void etnReceived (const std::string &txId, uint64_t amount)=0
 etnReceived - called when etn received More...
 
virtual void unconfirmedETNReceived (const std::string &txId, uint64_t amount)=0
 unconfirmedETNReceived - called when payment arrived in tx pool More...
 
virtual void newBlock (uint64_t height)=0
 newBlock - called when new block received More...
 
virtual void updated ()=0
 updated - generic callback, called when any event (sent/received/block reveived/etc) happened with the wallet; More...
 
virtual void refreshed ()=0
 refreshed - called when wallet refreshed by background thread or explicitly refreshed by calling "refresh" synchronously More...
 
virtual void onDeviceButtonRequest (uint64_t code)
 called by device if the action is required More...
 
virtual void onDeviceButtonPressed ()
 called by device if the button was pressed More...
 
virtual optional< std::string > onDevicePinRequest ()
 called by device when PIN is needed More...
 
virtual optional< std::string > onDevicePassphraseRequest (bool on_device)
 called by device when passphrase entry is needed More...
 
virtual void onDeviceProgress (const DeviceProgress &event)
 Signalizes device operation progress. More...
 
virtual void onSetWallet (Wallet *wallet)
 If the listener is created before the wallet this enables to set created wallet object. More...
 

Detailed Description

Definition at line 348 of file wallet2_api.h.

Constructor & Destructor Documentation

◆ ~WalletListener()

Electroneum::WalletListener::~WalletListener ( )
pure virtual

Definition at line 296 of file wallet.cpp.

296 {}

Member Function Documentation

◆ etnReceived()

virtual void Electroneum::WalletListener::etnReceived ( const std::string &  txId,
uint64_t  amount 
)
pure virtual

etnReceived - called when etn received

Parameters
txId- transaction id
amount- amount

Implemented in MyWalletListener.

◆ etnSpent()

virtual void Electroneum::WalletListener::etnSpent ( const std::string &  txId,
uint64_t  amount 
)
pure virtual

etnSpent - called when etn spent

Parameters
txId- transaction id
amount- amount

Implemented in MyWalletListener.

◆ newBlock()

virtual void Electroneum::WalletListener::newBlock ( uint64_t  height)
pure virtual

newBlock - called when new block received

Parameters
height- block height

Implemented in MyWalletListener.

◆ onDeviceButtonPressed()

virtual void Electroneum::WalletListener::onDeviceButtonPressed ( )
inlinevirtual

called by device if the button was pressed

Definition at line 397 of file wallet2_api.h.

397 { }

◆ onDeviceButtonRequest()

virtual void Electroneum::WalletListener::onDeviceButtonRequest ( uint64_t  code)
inlinevirtual

called by device if the action is required

Definition at line 392 of file wallet2_api.h.

392 { (void)code; }

◆ onDevicePassphraseRequest()

virtual optional<std::string> Electroneum::WalletListener::onDevicePassphraseRequest ( bool  on_device)
inlinevirtual

called by device when passphrase entry is needed

Definition at line 409 of file wallet2_api.h.

409  {
410  if (!on_device) throw std::runtime_error("Not supported");
411  return optional<std::string>();
412  }

◆ onDevicePinRequest()

virtual optional<std::string> Electroneum::WalletListener::onDevicePinRequest ( )
inlinevirtual

called by device when PIN is needed

Definition at line 402 of file wallet2_api.h.

402  {
403  throw std::runtime_error("Not supported");
404  }

◆ onDeviceProgress()

virtual void Electroneum::WalletListener::onDeviceProgress ( const DeviceProgress event)
inlinevirtual

Signalizes device operation progress.

Definition at line 417 of file wallet2_api.h.

417 { (void)event; };

◆ onSetWallet()

virtual void Electroneum::WalletListener::onSetWallet ( Wallet wallet)
inlinevirtual

If the listener is created before the wallet this enables to set created wallet object.

Definition at line 422 of file wallet2_api.h.

422 { (void)wallet; };
Here is the caller graph for this function:

◆ refreshed()

virtual void Electroneum::WalletListener::refreshed ( )
pure virtual

refreshed - called when wallet refreshed by background thread or explicitly refreshed by calling "refresh" synchronously

Implemented in MyWalletListener.

◆ unconfirmedETNReceived()

virtual void Electroneum::WalletListener::unconfirmedETNReceived ( const std::string &  txId,
uint64_t  amount 
)
pure virtual

unconfirmedETNReceived - called when payment arrived in tx pool

Parameters
txId- transaction id
amount- amount

Implemented in MyWalletListener.

◆ updated()

virtual void Electroneum::WalletListener::updated ( )
pure virtual

updated - generic callback, called when any event (sent/received/block reveived/etc) happened with the wallet;

Implemented in MyWalletListener.


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