113{
115
118 else
120
121
124
126 return;
127
128 const auto error = *message.Error;
129
130 switch (error.Type)
131 {
133
136 break;
138 [[fallthrough]];
140 {
141 auto result = ProjectLimitDialog { &
mProject }.ShowDialog();
142
144 {
148
150 const auto projectsPath = serviceConfig.GetProjectsPagePath(slug, message.audiocomTrace);
151 const auto url = oauthService.MakeAudioComAuthorizeURL(slug, projectsPath);
152
154
155 WaitForActionDialog {
157 XO(
"Waiting for space to free up"),
158 XO(
"Once you have made storage space available on audio.com, click Retry."),
159 }
160 .ShowDialog();
162 }
164 {
167 }
168 }
169 break;
171 {
172 if (
173 ProjectVersionConflictDialog { &
mProject,
176 {
178 }
179 else
180 {
182 }
183 }
184 break;
186 {
187 if (
188 NotCloudProjectDialog { &
mProject }.ShowDialog() ==
190 {
193 }
194 else
195 {
197 }
198 }
199 break;
201 {
202 ConnectionIssuesDialog { &
mProject }.ShowDialog();
203 }
204 break;
206 [[fallthrough]];
208 [[fallthrough]];
211 break;
213 [[fallthrough]];
214 default:
215 break;
216 }
217
218 wxLogError(
220}
void UnlinkAccount(AudiocomTrace)
Removes access and refresh token, notifies about the logout.
static DialogButtonIdentifier SaveLocallyIdentifier()
void SetUploadProgress(double progress)
static DialogButtonIdentifier VisitAudioComIdentifier()
static DialogButtonIdentifier SaveLocallyButtonIdentifier()
static DialogButtonIdentifier UseLocalIdentifier()
static void OnSave(const CloudSyncError &error)
bool OpenInDefaultBrowser(const wxString &url)
Open an URL in default browser.
void ReopenProject(AudacityProject &project)
bool ResaveLocally(AudacityProject &project)
void SaveToCloud(AudacityProject &project, UploadMode mode, CreateSnapshotCallback snapshotCallback)
void ResumeProjectUpload(ProjectCloudExtension &projectCloudExtension, std::function< void(AudiocomTrace)> onBeforeUploadStarts)
UserService & GetUserService()
OAuthService & GetOAuthService()
Returns the instance of the OAuthService.
const ServiceConfig & GetServiceConfig()
Returns the instance of the ServiceConfig.
std::string ToUTF8(const std::wstring &wstr)
wxString ToWXString(const std::string &str)
@ ProjectStorageLimitReached