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

Function GetProjectInfo

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

Source from the content-addressed store, hash-verified

118}
119
120void GetProjectInfo(
121 OAuthService& oAuthService, const ServiceConfig& serviceConfig,
122 std::string projectId,
123 std::function<void(sync::ProjectInfo, ResponseResult)> callback)
124{
125 assert(callback);
126
127 PerformProjectGetRequest(
128 oAuthService, serviceConfig.GetProjectInfoUrl(projectId),
129 [callback = std::move(callback)](ResponseResult result)
130 {
131 if (result.Code != SyncResultCode::Success)
132 {
133 callback(sync::ProjectInfo {}, std::move(result));
134 return;
135 }
136
137 auto projectInfo = sync::DeserializeProjectInfo(result.Content);
138
139 if (!projectInfo)
140 {
141 callback(
142 {}, { SyncResultCode::UnexpectedResponse,
143 std::move(result.Content) });
144 return;
145 }
146
147 callback(std::move(*projectInfo), std::move(result));
148 });
149}
150
151void GetSnapshotInfo(
152 OAuthService& oAuthService, const ServiceConfig& serviceConfig,

Callers 3

GetSnapshotInfoFunction · 0.85
SyncProjectMethod · 0.85
GetHeadSnapshotIDMethod · 0.85

Calls 5

PerformProjectGetRequestFunction · 0.85
moveFunction · 0.85
callbackFunction · 0.85
DeserializeProjectInfoFunction · 0.85
GetProjectInfoUrlMethod · 0.80

Tested by

no test coverage detected