MCPcopy Create free account
hub / github.com/audacity/audacity / GetAudioInfo

Function GetAudioInfo

libraries/lib-cloud-audiocom/CloudSyncService.cpp:683–711  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

681}
682
683void GetAudioInfo(
684 OAuthService& oAuthService, const ServiceConfig& serviceConfig,
685 std::string audioId,
686 std::function<void(sync::CloudAudioFullInfo, ResponseResult)> callback)
687{
688 assert(callback);
689
690 PerformProjectGetRequest(
691 oAuthService, serviceConfig.GetAudioInfoUrl(audioId),
692 [callback = std::move(callback)](ResponseResult result)
693 {
694 if (result.Code != SyncResultCode::Success)
695 {
696 callback(sync::CloudAudioFullInfo {}, std::move(result));
697 return;
698 }
699
700 auto audioInfo = sync::DeserializeCloudAudioFullInfo(result.Content);
701
702 if (!audioInfo)
703 {
704 callback({}, { SyncResultCode::UnexpectedResponse,
705 std::move(result.Content) });
706 return;
707 }
708
709 callback(std::move(*audioInfo), std::move(result));
710 });
711}
712
713void GetAudioDownloadInfo(
714 OAuthService& oAuthService, const ServiceConfig& serviceConfig,

Callers 1

DownloadCloudAudioMethod · 0.85

Calls 14

PerformProjectGetRequestFunction · 0.85
moveFunction · 0.85
callbackFunction · 0.85
SetCommonHeadersFunction · 0.85
SetOptionalHeadersFunction · 0.85
GetResponseResultFunction · 0.85
GetAudioInfoUrlMethod · 0.80
setHeaderMethod · 0.80
doGetMethod · 0.80
OnCancelledMethod · 0.80

Tested by

no test coverage detected