LocalLeaseSet2 added

This commit is contained in:
orignal 2019-01-09 14:51:47 -05:00
parent 5398b651f7
commit 9504e69598
3 changed files with 49 additions and 4 deletions

View file

@ -168,6 +168,12 @@ namespace data
bool operator== (const LeaseSet& other) const
{ return m_BufferLen == other.GetBufferLen () && !memcmp (other.GetBuffer (), other.GetBuffer (), m_BufferLen); };
virtual uint8_t GetStoreType () const { return NETDB_STORE_TYPE_LEASESET; };
protected:
// called from LocalLeaseSet2
void SetBuffer (const uint8_t * buf, size_t len);
private:
@ -176,6 +182,21 @@ namespace data
uint8_t * m_Buffer, * m_Leases;
size_t m_BufferLen;
};
class LocalLeaseSet2: public LocalLeaseSet
{
public:
LocalLeaseSet2 (uint8_t storeType, std::shared_ptr<const IdentityEx> identity,
uint16_t keyType, uint16_t keyLen, const uint8_t * encryptionPublicKey,
std::vector<std::shared_ptr<i2p::tunnel::InboundTunnel> > tunnels);
uint8_t GetStoreType () const { return m_StoreType; };
private:
uint8_t m_StoreType;
};
}
}