Kagome
Polkadot Runtime Engine in C++17
io_extension.hpp
Go to the documentation of this file.
1 
6 #ifndef KAGOME_IO_EXTENSION_HPP
7 #define KAGOME_IO_EXTENSION_HPP
8 
9 #include <cstdint>
10 
11 #include "log/logger.hpp"
12 #include "runtime/types.hpp"
13 
14 namespace kagome::runtime {
15  class MemoryProvider;
16 }
17 
18 namespace kagome::host_api {
19 
23  class IOExtension {
24  public:
25  explicit IOExtension(
26  std::shared_ptr<const runtime::MemoryProvider> memory_provider);
27 
31  void ext_logging_log_version_1(runtime::WasmEnum level,
32  runtime::WasmSpan target,
33  runtime::WasmSpan message);
34 
38  runtime::WasmEnum ext_logging_max_level_version_1();
39 
40  private:
41  std::shared_ptr<const runtime::MemoryProvider> memory_provider_;
43  };
44 } // namespace kagome::host_api
45 
46 #endif // KAGOME_IO_EXTENSION_HPP
std::shared_ptr< soralog::Logger > Logger
Definition: logger.hpp:23
uint64_t WasmSpan
combination of pointer and size, where less significant part represents wasm pointer, and most significant represents size
Definition: types.hpp:31
uint32_t WasmEnum
Enum value is uint32_t.
Definition: types.hpp:39
std::shared_ptr< const runtime::MemoryProvider > memory_provider_