Make persistent storage synchronization interval configurable

This commit is contained in:
hakunamtu 2019-01-16 22:30:25 +03:00
parent fdcea5537c
commit 3fd69311cb
4 changed files with 61 additions and 21 deletions

View file

@ -194,6 +194,8 @@ namespace data
bool SaveToFile (const std::string& fullPath);
std::shared_ptr<RouterProfile> GetProfile () const;
bool HasProfile () const { return static_cast<bool>(m_Profile); };
void SetProfile (const std::shared_ptr<RouterProfile>& profile) { m_Profile = profile; };
void SaveProfile () { if (m_Profile) m_Profile->Save (GetIdentHash ()); };
void Update (const uint8_t * buf, int len);