1 #pragma once 2 class CUpdateHelper 3 { 4 public: 5 CUpdateHelper(); 6 ~CUpdateHelper(); 7 8 enum class UpdateSource 9 { 10 GitHubSource, 11 GiteeSource 12 }; 13 14 void SetUpdateSource(UpdateSource update_source); 15 16 bool CheckForUpdate(); 17 18 const std::wstring& GetVersion() const; 19 const std::wstring& GetLink() const; 20 const std::wstring& GetLink64() const; 21 const std::wstring& GetContentsEn() const; 22 const std::wstring& GetContentsZhCn() const; 23 bool IsRowData(); 24 25 private: 26 void ParseUpdateInfo(wstring version_info); 27 28 private: 29 std::wstring m_version; 30 std::wstring m_link; 31 std::wstring m_link64; 32 std::wstring m_contents_en; 33 std::wstring m_contents_zh_cn; 34 bool m_row_data{ true }; 35 UpdateSource m_update_source{ UpdateSource::GitHubSource }; 36 }; 37