2023-08-29 14:26:59 +00:00
|
|
|
#pragma once
|
|
|
|
|
2023-10-04 13:25:25 +00:00
|
|
|
#include <llarp/crypto/crypto.hpp>
|
2023-10-03 20:00:23 +00:00
|
|
|
#include <llarp/dht/key.hpp>
|
|
|
|
#include <llarp/path/path_types.hpp>
|
|
|
|
#include <llarp/router_id.hpp>
|
|
|
|
#include <llarp/service/tag.hpp>
|
|
|
|
#include <llarp/util/bencode.hpp>
|
2023-08-29 14:26:59 +00:00
|
|
|
#include <llarp/util/buffer.hpp>
|
2023-09-14 14:54:51 +00:00
|
|
|
#include <llarp/util/logging.hpp>
|
|
|
|
|
2023-10-03 20:00:23 +00:00
|
|
|
#include <oxenc/bt.h>
|
|
|
|
|
2023-09-14 14:54:51 +00:00
|
|
|
namespace
|
|
|
|
{
|
|
|
|
static auto link_cat = llarp::log::Cat("lokinet.link");
|
|
|
|
} // namespace
|
|
|
|
|
2023-08-29 14:26:59 +00:00
|
|
|
namespace llarp
|
|
|
|
{
|
|
|
|
/// abstract base class for serialized messages
|
|
|
|
struct AbstractSerializable
|
|
|
|
{
|
|
|
|
virtual std::string
|
|
|
|
bt_encode() const = 0;
|
|
|
|
virtual void
|
|
|
|
bt_encode(oxenc::bt_dict_producer& btdp) const = 0;
|
|
|
|
};
|
2023-09-13 15:57:29 +00:00
|
|
|
|
|
|
|
struct AbstractMessageHandler
|
|
|
|
{
|
|
|
|
virtual bool
|
|
|
|
handle_message(AbstractSerializable&) = 0;
|
|
|
|
};
|
2023-08-29 14:26:59 +00:00
|
|
|
} // namespace llarp
|