#ifndef MESSMER_CRYFS_SRC_CLI_VERSIONCHECKER_H #define MESSMER_CRYFS_SRC_CLI_VERSIONCHECKER_H #include #include #include #include #include namespace cryfs { class VersionChecker final { public: //TODO Write a cpputils::shared_ref and use it VersionChecker(std::shared_ptr httpClient); boost::optional newestVersion() const; boost::optional securityWarningFor(const std::string &version) const; private: static boost::optional _getVersionInfo(std::shared_ptr httpClient); static boost::optional _parseJson(const std::string &json); boost::optional _versionInfo; DISALLOW_COPY_AND_ASSIGN(VersionChecker); }; } #endif