2019-01-22 01:14:02 +00:00
|
|
|
#ifndef LLARP_DHT_PUBLISHSERVICEJOB
|
|
|
|
#define LLARP_DHT_PUBLISHSERVICEJOB
|
|
|
|
|
|
|
|
#include <dht/tx.hpp>
|
|
|
|
#include <dht/txowner.hpp>
|
|
|
|
#include <service/address.hpp>
|
2019-04-22 18:35:19 +00:00
|
|
|
#include <service/intro_set.hpp>
|
2019-01-22 01:14:02 +00:00
|
|
|
|
|
|
|
#include <set>
|
|
|
|
|
|
|
|
namespace llarp
|
|
|
|
{
|
|
|
|
namespace dht
|
|
|
|
{
|
2020-01-27 21:30:41 +00:00
|
|
|
struct PublishServiceJob : public TX< Key_t, service::EncryptedIntroSet >
|
2019-01-22 01:14:02 +00:00
|
|
|
{
|
|
|
|
uint64_t S;
|
|
|
|
std::set< Key_t > dontTell;
|
2020-01-27 21:30:41 +00:00
|
|
|
service::EncryptedIntroSet introset;
|
2019-01-22 01:14:02 +00:00
|
|
|
|
2020-01-27 21:30:41 +00:00
|
|
|
PublishServiceJob(const TXOwner &asker,
|
|
|
|
const service::EncryptedIntroSet &introset,
|
2019-01-24 01:31:02 +00:00
|
|
|
AbstractContext *ctx, uint64_t s,
|
2019-07-30 23:42:13 +00:00
|
|
|
std::set< Key_t > exclude);
|
2019-01-22 01:14:02 +00:00
|
|
|
|
|
|
|
bool
|
2020-01-27 21:30:41 +00:00
|
|
|
Validate(const service::EncryptedIntroSet &introset) const override;
|
2019-01-22 01:14:02 +00:00
|
|
|
|
|
|
|
void
|
|
|
|
Start(const TXOwner &peer) override;
|
|
|
|
|
|
|
|
bool
|
|
|
|
GetNextPeer(Key_t &, const std::set< Key_t > &) override
|
|
|
|
{
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
|
|
|
|
void
|
|
|
|
DoNextRequest(const Key_t &) override
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
void
|
|
|
|
SendReply() override
|
|
|
|
{
|
|
|
|
// don't need this
|
|
|
|
}
|
|
|
|
};
|
|
|
|
} // namespace dht
|
|
|
|
} // namespace llarp
|
|
|
|
|
|
|
|
#endif
|