Kagome
Polkadot Runtime Engine in C++17
unsubscribe_storage.hpp
Go to the documentation of this file.
1 
6 #ifndef KAGOME_API_REQUEST_UNSUBSCRIBE_STORAGE
7 #define KAGOME_API_REQUEST_UNSUBSCRIBE_STORAGE
8 
9 #include <jsonrpc-lean/request.h>
10 
11 #include <optional>
12 
14 #include "common/buffer.hpp"
15 #include "outcome/outcome.hpp"
16 #include "primitives/block_id.hpp"
17 
19 
20  class UnsubscribeStorage final {
21  public:
22  UnsubscribeStorage(const UnsubscribeStorage &) = delete;
24 
27 
28  explicit UnsubscribeStorage(std::shared_ptr<StateApi> api)
29  : api_(std::move(api)){};
30  ~UnsubscribeStorage() = default;
31 
32  outcome::result<void> init(const jsonrpc::Request::Parameters &params);
33  outcome::result<bool> execute();
34 
35  private:
36  std::shared_ptr<StateApi> api_;
37  std::vector<uint32_t> subscriber_id_;
38  };
39 
40 } // namespace kagome::api::state::request
41 
42 #endif // KAGOME_API_REQUEST_UNSUBSCRIBE_STORAGE
UnsubscribeStorage(const UnsubscribeStorage &)=delete
STL namespace.
UnsubscribeStorage & operator=(const UnsubscribeStorage &)=delete
UnsubscribeStorage(std::shared_ptr< StateApi > api)
outcome::result< void > init(const jsonrpc::Request::Parameters &params)