hyperledger/iroha
Iroha - A simple, decentralized ledger http://iroha.tech
command_service.hpp
Go to the documentation of this file.
1 
6 #ifndef TORII_COMMAND_SERVICE_HPP
7 #define TORII_COMMAND_SERVICE_HPP
8 
9 #include <rxcpp/rx.hpp>
11 
12 namespace shared_model {
13  namespace interface {
14  class TransactionBatch;
15  class TransactionResponse;
16  } // namespace interface
17 
18  namespace crypto {
19  class Hash;
20  } // namespace crypto
21 } // namespace shared_model
22 
23 namespace iroha {
24  namespace torii {
25 
27  public:
28  virtual ~CommandService() = default;
29 
34  virtual void handleTransactionBatch(
35  std::shared_ptr<shared_model::interface::TransactionBatch> batch) = 0;
36 
44  virtual std::shared_ptr<shared_model::interface::TransactionResponse>
45  getStatus(const shared_model::crypto::Hash &request) = 0;
46 
55  virtual rxcpp::observable<
56  std::shared_ptr<shared_model::interface::TransactionResponse>>
57  getStatusStream(const shared_model::crypto::Hash &hash) = 0;
58  };
59 
60  } // namespace torii
61 } // namespace iroha
62 
63 #endif // TORII_COMMAND_SERVICE_HPP
Definition: hash.hpp:18
Definition: command_client.hpp:16
Definition: block_query.hpp:16
hash256_t hash(const T &pb)
Definition: pb_common.hpp:43
Definition: command_service.hpp:26
Definition: command_executor.hpp:12