hyperledger/iroha
Iroha - A simple, decentralized ledger http://iroha.tech
pb_query_response_factory.hpp
Go to the documentation of this file.
1 
6 #ifndef IROHA_PB_QUERY_RESPONSE_FACTORY_HPP
7 #define IROHA_PB_QUERY_RESPONSE_FACTORY_HPP
8 
10 #include "model/common.hpp"
19 #include "qry_responses.pb.h"
20 
21 namespace iroha {
22  namespace model {
23  namespace converters {
24 
29  public:
30  boost::optional<protocol::QueryResponse> serialize(
31  const std::shared_ptr<QueryResponse> query_response) const;
33  const protocol::QueryResponse &query_response) const;
34 
35  protocol::Account serializeAccount(const model::Account &account) const;
37  const protocol::Account &pb_account) const;
38 
39  protocol::AccountResponse serializeAccountResponse(
40  const model::AccountResponse &accountResponse) const;
42  const protocol::AccountResponse pb_response) const;
43 
44  protocol::AccountAsset serializeAccountAsset(
45  const model::AccountAsset &account_asset) const;
47  const protocol::AccountAsset &account_asset) const;
48 
49  protocol::AccountAssetResponse serializeAccountAssetResponse(
50  const model::AccountAssetResponse &accountAssetResponse) const;
52  const protocol::AccountAssetResponse &account_asset_response) const;
53 
54  protocol::AccountDetailResponse serializeAccountDetailResponse(
55  const model::AccountDetailResponse &accountDetailResponse) const;
57  const protocol::AccountDetailResponse &account_detail_response)
58  const;
59 
60  protocol::SignatoriesResponse serializeSignatoriesResponse(
61  const model::SignatoriesResponse &signatoriesResponse) const;
63  const protocol::SignatoriesResponse &signatoriesResponse) const;
64 
65  protocol::TransactionsResponse serializeTransactionsResponse(
66  const model::TransactionsResponse &transactionsResponse) const;
68  const protocol::TransactionsResponse &tx_response) const;
69 
70  protocol::AssetResponse serializeAssetResponse(
71  const model::AssetResponse &response) const;
73  const protocol::AssetResponse &response) const;
74 
75  protocol::RolesResponse serializeRolesResponse(
76  const model::RolesResponse &response) const;
78  const protocol::RolesResponse &response) const;
79 
80  protocol::RolePermissionsResponse serializeRolePermissionsResponse(
81  const model::RolePermissionsResponse &response) const;
83  const protocol::RolePermissionsResponse &response) const;
84 
85  protocol::ErrorResponse serializeErrorResponse(
86  const model::ErrorResponse &errorResponse) const;
88  const protocol::ErrorResponse &response) const;
89  };
90  } // namespace converters
91  } // namespace model
92 } // namespace iroha
93 
94 #endif // IROHA_PB_QUERY_RESPONSE_FACTORY_HPP
Definition: account_assets_response.hpp:16
Definition: transactions_response.hpp:18
Definition: account_asset.hpp:16
protocol::RolesResponse serializeRolesResponse(const model::RolesResponse &response) const
Definition: pb_query_response_factory.cpp:265
protocol::TransactionsResponse serializeTransactionsResponse(const model::TransactionsResponse &transactionsResponse) const
Definition: pb_query_response_factory.cpp:304
protocol::AssetResponse serializeAssetResponse(const model::AssetResponse &response) const
Definition: pb_query_response_factory.cpp:246
model::AccountResponse deserializeAccountResponse(const protocol::AccountResponse pb_response) const
Definition: pb_query_response_factory.cpp:149
protocol::RolePermissionsResponse serializeRolePermissionsResponse(const model::RolePermissionsResponse &response) const
Definition: pb_query_response_factory.cpp:284
boost::optional< std::shared_ptr< T >> optional_ptr
Definition: common.hpp:16
Definition: account_response.hpp:18
Definition: error_response.hpp:18
model::Account deserializeAccount(const protocol::Account &pb_account) const
Definition: pb_query_response_factory.cpp:127
Definition: block_query.hpp:16
Definition: signatories_response.hpp:20
protocol::Account serializeAccount(const model::Account &account) const
Definition: pb_query_response_factory.cpp:117
model::AccountAsset deserializeAccountAsset(const protocol::AccountAsset &account_asset) const
Definition: pb_query_response_factory.cpp:165
Definition: account.hpp:17
Definition: pb_query_response_factory.hpp:28
Definition: asset_response.hpp:18
model::ErrorResponse deserializeErrorResponse(const protocol::ErrorResponse &response) const
Definition: pb_query_response_factory.cpp:356
model::AccountAssetResponse deserializeAccountAssetResponse(const protocol::AccountAssetResponse &account_asset_response) const
Definition: pb_query_response_factory.cpp:190
optional_ptr< QueryResponse > deserialize(const protocol::QueryResponse &query_response) const
Definition: pb_query_response_factory.cpp:82
model::AssetResponse deserializeAssetResponse(const protocol::AssetResponse &response) const
Definition: pb_query_response_factory.cpp:256
model::AccountDetailResponse deserializeAccountDetailResponse(const protocol::AccountDetailResponse &account_detail_response) const
Definition: pb_query_response_factory.cpp:216
model::TransactionsResponse deserializeTransactionsResponse(const protocol::TransactionsResponse &tx_response) const
protocol::AccountDetailResponse serializeAccountDetailResponse(const model::AccountDetailResponse &accountDetailResponse) const
Definition: pb_query_response_factory.cpp:208
model::RolePermissionsResponse deserializeRolePermissionsResponse(const protocol::RolePermissionsResponse &response) const
Definition: pb_query_response_factory.cpp:294
Definition: roles_response.hpp:17
protocol::AccountAssetResponse serializeAccountAssetResponse(const model::AccountAssetResponse &accountAssetResponse) const
Definition: pb_query_response_factory.cpp:175
Definition: account_detail_response.hpp:15
protocol::SignatoriesResponse serializeSignatoriesResponse(const model::SignatoriesResponse &signatoriesResponse) const
Definition: pb_query_response_factory.cpp:225
boost::optional< protocol::QueryResponse > serialize(const std::shared_ptr< QueryResponse > query_response) const
Definition: pb_query_response_factory.cpp:17
Definition: roles_response.hpp:27
protocol::AccountAsset serializeAccountAsset(const model::AccountAsset &account_asset) const
Definition: pb_query_response_factory.cpp:156
protocol::ErrorResponse serializeErrorResponse(const model::ErrorResponse &errorResponse) const
Definition: pb_query_response_factory.cpp:321
model::RolesResponse deserializeRolesResponse(const protocol::RolesResponse &response) const
Definition: pb_query_response_factory.cpp:274
model::SignatoriesResponse deserializeSignatoriesResponse(const protocol::SignatoriesResponse &signatoriesResponse) const
Definition: pb_query_response_factory.cpp:236
protocol::AccountResponse serializeAccountResponse(const model::AccountResponse &accountResponse) const
Definition: pb_query_response_factory.cpp:138