mirror of
https://github.com/PurpleI2P/i2pd.git
synced 2025-04-28 11:47:48 +02:00
persist etag for addressbook subscription
This commit is contained in:
parent
4934fc8809
commit
1a894abcff
4 changed files with 31 additions and 5 deletions
|
@ -38,6 +38,8 @@ namespace client
|
|||
virtual bool Init () = 0;
|
||||
virtual int Load (std::map<std::string, i2p::data::IdentHash>& addresses) = 0;
|
||||
virtual int Save (const std::map<std::string, i2p::data::IdentHash>& addresses) = 0;
|
||||
|
||||
virtual void SaveEtag (const i2p::data::IdentHash& subscription, const std::string& etag, const std::string& lastModified) = 0;
|
||||
};
|
||||
|
||||
class AddressBookSubscription;
|
||||
|
@ -56,7 +58,7 @@ namespace client
|
|||
void InsertAddress (std::shared_ptr<const i2p::data::IdentityEx> address);
|
||||
|
||||
void LoadHostsFromStream (std::istream& f);
|
||||
void DownloadComplete (bool success);
|
||||
void DownloadComplete (bool success, const i2p::data::IdentHash& subscription, const std::string& etag, const std::string& lastModified);
|
||||
//This method returns the ".b32.i2p" address
|
||||
std::string ToAddress(const i2p::data::IdentHash& ident) { return GetB32Address(ident); }
|
||||
std::string ToAddress(std::shared_ptr<const i2p::data::IdentityEx> ident) { return ToAddress(ident->GetIdentHash ()); }
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue