Audacity 3.2.0
Public Member Functions | Private Member Functions | Private Attributes | List of all members
audacity::cloud::audiocom::AuthorizationHandler Class Referencefinal

#include <AuthorizationHandler.h>

Collaboration diagram for audacity::cloud::audiocom::AuthorizationHandler:
[legend]

Public Member Functions

 AuthorizationHandler ()
 
void PushSuppressDialogs ()
 
void PopSuppressDialogs ()
 

Private Member Functions

void OnAuthStateChanged (const AuthStateChangedMessage &message)
 

Private Attributes

Observer::Subscription mAuthStateChangedSubscription
 
size_t mSuppressed {}
 

Detailed Description

Definition at line 24 of file AuthorizationHandler.h.

Constructor & Destructor Documentation

◆ AuthorizationHandler()

audacity::cloud::audiocom::AuthorizationHandler::AuthorizationHandler ( )

Definition at line 136 of file AuthorizationHandler.cpp.

138 [this](const auto& message) { OnAuthStateChanged(message); }))
139{
140}
void OnAuthStateChanged(const AuthStateChangedMessage &message)
OAuthService & GetOAuthService()
Returns the instance of the OAuthService.

References OnAuthStateChanged().

Here is the call graph for this function:

Member Function Documentation

◆ OnAuthStateChanged()

void audacity::cloud::audiocom::AuthorizationHandler::OnAuthStateChanged ( const AuthStateChangedMessage message)
private

Definition at line 155 of file AuthorizationHandler.cpp.

157{
158 if (mSuppressed > 0 || message.silent)
159 return;
160
161 if (!message.errorMessage.empty())
162 {
163 LinkFailedDialog dialog { nullptr };
164 dialog.ShowModal();
165 }
166 else if (message.authorised)
167 {
168 LinkSucceededDialog dialog { nullptr };
169 dialog.ShowModal();
170 }
171}

References audacity::cloud::audiocom::AuthStateChangedMessage::authorised, audacity::cloud::audiocom::AuthStateChangedMessage::errorMessage, mSuppressed, and audacity::cloud::audiocom::AuthStateChangedMessage::silent.

Referenced by AuthorizationHandler().

Here is the caller graph for this function:

◆ PopSuppressDialogs()

void audacity::cloud::audiocom::AuthorizationHandler::PopSuppressDialogs ( )

Definition at line 147 of file AuthorizationHandler.cpp.

148{
149 assert(mSuppressed > 0);
150
151 if (mSuppressed > 0)
152 --mSuppressed;
153}

References mSuppressed.

Referenced by audacity::cloud::audiocom::PerformBlockingAuth(), audacity::cloud::audiocom::sync::CloudProjectPropertiesDialog::~CloudProjectPropertiesDialog(), audacity::cloud::audiocom::LinkWithTokenDialog::~LinkWithTokenDialog(), and audacity::cloud::audiocom::ShareAudioDialog::~ShareAudioDialog().

Here is the caller graph for this function:

◆ PushSuppressDialogs()

void audacity::cloud::audiocom::AuthorizationHandler::PushSuppressDialogs ( )

Definition at line 142 of file AuthorizationHandler.cpp.

143{
144 ++mSuppressed;
145}

References mSuppressed.

Referenced by audacity::cloud::audiocom::sync::CloudProjectPropertiesDialog::CloudProjectPropertiesDialog(), and audacity::cloud::audiocom::PerformBlockingAuth().

Here is the caller graph for this function:

Member Data Documentation

◆ mAuthStateChangedSubscription

Observer::Subscription audacity::cloud::audiocom::AuthorizationHandler::mAuthStateChangedSubscription
private

Definition at line 35 of file AuthorizationHandler.h.

◆ mSuppressed

size_t audacity::cloud::audiocom::AuthorizationHandler::mSuppressed {}
private

The documentation for this class was generated from the following files: