hyperledger/iroha
Iroha - A simple, decentralized ledger http://iroha.tech
proto_query.hpp
Go to the documentation of this file.
1 
6 #ifndef IROHA_SHARED_MODEL_PROTO_QUERY_HPP
7 #define IROHA_SHARED_MODEL_PROTO_QUERY_HPP
8 
10 
11 #include "queries.pb.h"
12 
13 namespace shared_model {
14  namespace proto {
15 
16  class Query final : public interface::Query {
17  public:
19 
20  Query(const Query &o);
21  Query(Query &&o) noexcept;
22 
23  explicit Query(const TransportType &ref);
24  explicit Query(TransportType &&ref);
25 
26  ~Query() override;
27 
28  const Query::QueryVariantType &get() const override;
29 
30  const interface::types::AccountIdType &creatorAccountId() const override;
31 
33 
34  const interface::types::BlobType &blob() const override;
35 
36  const interface::types::BlobType &payload() const override;
37 
38  // ------------------------| Signable override |-------------------------
40 
41  bool addSignature(
42  interface::types::SignedHexStringView signed_blob,
43  interface::types::PublicKeyHexStringView public_key) override;
44 
45  const interface::types::HashType &hash() const override;
46 
48 
49  const TransportType &getTransport() const;
50 
51  private:
52  struct Impl;
53  std::unique_ptr<Impl> impl_;
54  };
55 
56  } // namespace proto
57 } // namespace shared_model
58 
59 #endif // IROHA_SHARED_MODEL_PROTO_QUERY_HPP
bool addSignature(interface::types::SignedHexStringView signed_blob, interface::types::PublicKeyHexStringView public_key) override
Definition: proto_query.cpp:137
Definition: hash.hpp:18
Definition: blob.hpp:27
interface::types::CounterType queryCounter() const override
Definition: proto_query.cpp:121
Definition: query.hpp:36
const interface::types::HashType & hash() const override
Definition: proto_query.cpp:157
iroha::protocol::Query TransportType
Definition: proto_query.hpp:18
interface::types::TimestampType createdTime() const override
Definition: proto_query.cpp:161
const interface::types::BlobType & payload() const override
Definition: proto_query.cpp:129
const TransportType & getTransport() const
Definition: proto_query.cpp:165
boost::any_range< interface::Signature, boost::forward_traversal_tag, const Signature & > SignatureRangeType
Type of signature range, which returns when signatures are invoked.
Definition: range_types.hpp:24
Query(const Query &o)
Definition: proto_query.cpp:101
interface::types::SignatureRangeType signatures() const override
Definition: proto_query.cpp:133
Definition: proto_query.hpp:16
std::string AccountIdType
Type of account id.
Definition: types.hpp:38
wrap< GetAccount, GetSignatories, GetAccountTransactions, GetAccountAssetTransactions, GetTransactions, GetAccountAssets, GetAccountDetail, GetRoles, GetRolePermissions, GetAssetInfo, GetPendingTransactions, GetBlock, GetPeers, GetEngineReceipts > QueryVariantType
Type of variant, that handle concrete query.
Definition: query.hpp:57
const interface::types::AccountIdType & creatorAccountId() const override
Definition: proto_query.cpp:117
const interface::types::BlobType & blob() const override
Definition: proto_query.cpp:125
uint64_t CounterType
Type of counter.
Definition: types.hpp:69
Definition: command_executor.hpp:12
uint64_t TimestampType
Type of timestamp.
Definition: types.hpp:67