28 static _v::WebClientUnity::Ptr m_WebClient;
31 static _v::WebClientUnity::Ptr& WebClient();
69 BeatMaps::MapVersion::Ptr p_Version,
70 _u::CancellationToken p_Token,
80 static std::pair<bool, std::u16string> ExtractZipAsync( BeatMaps::MapDetail::Ptr p_Song,
82 std::u16string_view p_CustomSongsPath,
83 bool p_Overwrite =
false);
91 template<
typename t_Type>
92 static bool GetObjectFromJsonString(std::u16string_view p_Serialized, std::shared_ptr<t_Type>& p_Object)
97 _v::Json::U16Document l_Document;
98 if (!_v::Json::TryFromU16String(p_Serialized, l_Document))
101 p_Object = std::make_shared<t_Type>();
102 p_Object->Unserialize(l_Document);
104 catch (
const std::exception& l_Exception)
112 return p_Object !=
nullptr;
static void DownloadSong(BeatMaps::MapDetail::Ptr p_Song, BeatMaps::MapVersion::Ptr p_Version, _u::CancellationToken p_Token, _v::CActionRef< bool, std::u16string_view > p_Callback, _v::CActionRef< float > p_Progress=nullptr)
Download a song.