mirror of
https://github.com/oxen-io/lokinet.git
synced 2024-11-03 23:15:52 +00:00
7caa87862e
All #ifndef guards on headers have been removed, I think, in favor of #pragma once Headers are now included as `#include "filename"` if the included file resides in the same directory as the file including it, or any subdirectory therein. Otherwise they are included as `#include <project/top/dir/relative/path/filename>` The above does not include system/os headers.
40 lines
773 B
C++
40 lines
773 B
C++
#pragma once
|
|
|
|
#include <llarp/constants/proto.hpp>
|
|
#include <llarp/path/path_types.hpp>
|
|
#include <llarp/util/bencode.hpp>
|
|
#include <llarp/util/buffer.hpp>
|
|
|
|
namespace llarp
|
|
{
|
|
struct AbstractRouter;
|
|
namespace routing
|
|
{
|
|
struct IMessageHandler;
|
|
|
|
struct IMessage
|
|
{
|
|
PathID_t from;
|
|
uint64_t S{0};
|
|
uint64_t version = LLARP_PROTO_VERSION;
|
|
|
|
IMessage() = default;
|
|
|
|
virtual ~IMessage() = default;
|
|
|
|
virtual bool
|
|
BEncode(llarp_buffer_t* buf) const = 0;
|
|
|
|
virtual bool
|
|
DecodeKey(const llarp_buffer_t& key, llarp_buffer_t* buf) = 0;
|
|
|
|
virtual bool
|
|
HandleMessage(IMessageHandler* h, AbstractRouter* r) const = 0;
|
|
|
|
virtual void
|
|
Clear() = 0;
|
|
};
|
|
|
|
} // namespace routing
|
|
} // namespace llarp
|