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

#include <AuthorizationHandler.h>

Collaboration diagram for 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 19 of file AuthorizationHandler.h.

Constructor & Destructor Documentation

◆ AuthorizationHandler()

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

Definition at line 32 of file AuthorizationHandler.cpp.

34 [this](const auto& message) { OnAuthStateChanged(message); }))
35{
36}
void OnAuthStateChanged(const AuthStateChangedMessage &message)
Observer::Subscription mAuthStateChangedSubscription
OAuthService & GetOAuthService()
Returns the instance of the OAuthService.

References OnAuthStateChanged().

Here is the call graph for this function:

Member Function Documentation

◆ OnAuthStateChanged()

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

Definition at line 51 of file AuthorizationHandler.cpp.

53{
54 if (mSuppressed > 0)
55 return;
56
57 if (!message.errorMessage.empty())
58 {
59 LinkFailedDialog dialog { nullptr };
60 dialog.ShowModal();
61 }
62 else if (message.authorised)
63 {
64 LinkSucceededDialog dialog { nullptr };
65 dialog.ShowModal();
66 }
67}

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

Referenced by AuthorizationHandler().

Here is the caller graph for this function:

◆ PopSuppressDialogs()

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

Definition at line 43 of file AuthorizationHandler.cpp.

44{
45 assert(mSuppressed > 0);
46
47 if (mSuppressed > 0)
49}

References mSuppressed.

Referenced by cloud::audiocom::LinkAccountDialog::~LinkAccountDialog(), and cloud::audiocom::ShareAudioDialog::~ShareAudioDialog().

Here is the caller graph for this function:

◆ PushSuppressDialogs()

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

Definition at line 38 of file AuthorizationHandler.cpp.

39{
41}

References mSuppressed.

Member Data Documentation

◆ mAuthStateChangedSubscription

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

Definition at line 31 of file AuthorizationHandler.h.

◆ mSuppressed

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

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