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;
19
21{
22struct AuthStateChangedMessage;
23
25{
26public:
28
30 void PopSuppressDialogs();
31
32private:
34
36
37 size_t mSuppressed {};
38}; // class AuthorizationHandler
39
40AuthorizationHandler& GetAuthorizationHandler();
41
42struct AuthResult final
43{
44 enum class Status
45 {
46 Authorised,
47 Cancelled,
48 UseAlternative,
49 Failure
50 };
51
53 std::string ErrorMessage;
54};
55
57PerformBlockingAuth(AudacityProject* project, const TranslatableString& alternativeActionLabel = {});
58} // namespace audacity::cloud::audiocom
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, const TranslatableString &alternativeActionLabel)
Message that is sent when authorization state changes.
Definition: OAuthService.h:27