2026-05-16 01:08:42 +02:00
|
|
|
#pragma once
|
2026-05-28 22:40:33 +02:00
|
|
|
// Generated bindings require C++20 — the event-listener API uses
|
|
|
|
|
// std::span<const std::uint8_t> for the wildcard callback.
|
|
|
|
|
// MSVC keeps __cplusplus at 199711L unless /Zc:__cplusplus is passed,
|
|
|
|
|
// so consult _MSVC_LANG when present (it always reflects the active
|
|
|
|
|
// /std:c++XX level).
|
|
|
|
|
#if defined(_MSVC_LANG)
|
|
|
|
|
# if _MSVC_LANG < 202002L
|
|
|
|
|
# error "nim-ffi generated headers require C++20 or later (use /std:c++20)"
|
|
|
|
|
# endif
|
|
|
|
|
#elif !defined(__cplusplus) || __cplusplus < 202002L
|
|
|
|
|
# error "nim-ffi generated headers require C++20 or later"
|
|
|
|
|
#endif
|
2026-05-16 01:08:42 +02:00
|
|
|
#include <string>
|
|
|
|
|
#include <cstdint>
|
|
|
|
|
#include <chrono>
|
|
|
|
|
#include <stdexcept>
|
|
|
|
|
#include <mutex>
|
|
|
|
|
#include <condition_variable>
|
|
|
|
|
#include <memory>
|
|
|
|
|
#include <functional>
|
|
|
|
|
#include <future>
|
|
|
|
|
#include <vector>
|
|
|
|
|
#include <optional>
|
|
|
|
|
#include <type_traits>
|
|
|
|
|
#include <cstring>
|
|
|
|
|
extern "C" {
|
|
|
|
|
#include <tinycbor/cbor.h>
|
|
|
|
|
}
|