lokinet/llarp/dht/publishservicejob.hpp

55 lines
1.2 KiB
C++
Raw Normal View History

2019-01-22 01:14:02 +00:00
#ifndef LLARP_DHT_PUBLISHSERVICEJOB
#define LLARP_DHT_PUBLISHSERVICEJOB
#include "tx.hpp"
#include "txowner.hpp"
#include <llarp/service/address.hpp>
#include <llarp/service/intro_set.hpp>
2019-01-22 01:14:02 +00:00
#include <set>
namespace llarp
{
namespace dht
{
struct PublishServiceJob : public TX<TXOwner, service::EncryptedIntroSet>
2019-01-22 01:14:02 +00:00
{
uint64_t relayOrder;
2020-01-27 21:30:41 +00:00
service::EncryptedIntroSet introset;
2019-01-22 01:14:02 +00:00
PublishServiceJob(
const TXOwner& asker,
const service::EncryptedIntroSet& introset,
AbstractContext* ctx,
uint64_t relayOrder);
2019-01-22 01:14:02 +00:00
bool
Validate(const service::EncryptedIntroSet& introset) const override;
2019-01-22 01:14:02 +00:00
void
Start(const TXOwner& peer) override;
2019-01-22 01:14:02 +00:00
virtual void
SendReply() override;
};
struct LocalPublishServiceJob : public PublishServiceJob
{
PathID_t localPath;
uint64_t txid;
LocalPublishServiceJob(
const TXOwner& peer,
const PathID_t& fromID,
uint64_t txid,
const service::EncryptedIntroSet& introset,
AbstractContext* ctx,
uint64_t relayOrder);
2019-01-22 01:14:02 +00:00
void
SendReply() override;
2019-01-22 01:14:02 +00:00
};
} // namespace dht
} // namespace llarp
#endif