Audacity 3.2.0
AuthorizationHandler.h
Go to the documentation of this file.
1/* SPDX-License-Identifier: GPL-2.0-or-later */
2/*!********************************************************************
3
4 Audacity: A Digital Audio Editor
5
6 AuthorizationHandler.h
7
8 Dmitry Vedenko
9
10**********************************************************************/
11#pragma once
12
13#include <string>
14
15#include "Observer.h"
16#include "TranslatableString.h"
17
18class AudacityProject;
19enum class AudiocomTrace;
20
22{
23struct AuthStateChangedMessage;
24
26{
27public:
29
31 void PopSuppressDialogs();
32
33private:
35
37
38 size_t mSuppressed {};
39}; // class AuthorizationHandler
40
41AuthorizationHandler& GetAuthorizationHandler();
42
43struct AuthResult final
44{
45 enum class Status
46 {
47 Authorised,
48 Cancelled,
49 UseAlternative,
50 Failure
51 };
52
54 std::string ErrorMessage;
55};
56
59 const TranslatableString& alternativeActionLabel = {});
60} // namespace audacity::cloud::audiocom
AudiocomTrace
Definition: ExportUtils.h:27
const auto project
The top-level handle to an Audacity project. It serves as a source of events that other objects can b...
Definition: Project.h:90
A move-only handle representing a connection to a Publisher.
Definition: Observer.h:70
Holds a msgid for the translation catalog; may also bind format arguments.
void OnAuthStateChanged(const AuthStateChangedMessage &message)
AuthorizationHandler & GetAuthorizationHandler()
AuthResult PerformBlockingAuth(AudacityProject *project, AudiocomTrace trace, const TranslatableString &alternativeActionLabel)
Message that is sent when authorization state changes.
Definition: OAuthService.h:29