Audacity 3.2.0
Functions | Variables
audacity::cloud::audiocom::anonymous_namespace{ServiceConfig.cpp} Namespace Reference

Functions

std::string Substitute (std::string pattern, std::initializer_list< std::pair< std::string_view, std::string_view > > substitutions)
 
std::string GetButtonName (AudiocomTrace trace)
 

Variables

StringSetting audioComApiEndpoint
 
StringSetting audioComOAuthClientID
 
StringSetting audioComOAuthClientSecret
 
StringSetting audioComOAuthRedirectURL
 
StringSetting audioComOAuthLoginPage
 
StringSetting audioComFinishUploadPage
 
StringSetting audioComAuthWithRedirectURL
 
StringSetting audioComFrontendURL
 
StringSetting audioComAudioDownloadMimeType
 

Function Documentation

◆ GetButtonName()

std::string audacity::cloud::audiocom::anonymous_namespace{ServiceConfig.cpp}::GetButtonName ( AudiocomTrace  trace)

Definition at line 92 of file ServiceConfig.cpp.

93{
94 switch (trace)
95 {
97 return "ignore";
99 return "Share_Audio_Button";
101 return "Share_Audio_Menu";
103 return "Share_Audio_Export_Menu";
105 return "Share_Audio_Export_Extra_Menu";
107 return "Save_to_Cloud_Menu";
109 return "Save_Project_Save_to_Cloud_Menu";
111 return "Prefs_Panel";
113 return "Project_Opened_And_Upload_Resumed";
115 return "Update_Cloud_Audio_Preview_Menu";
117 return "Link_Audiocom_Account_Help_Menu";
119 return "Open_From_Cloud_Menu";
120 }
121
122 assert(false);
123 return {};
124}
@ LinkAudiocomAccountHelpMenu
@ UpdateCloudAudioPreviewMenu
@ SaveProjectSaveToCloudMenu
@ ShareAudioExportExtraMenu
@ ProjectOpenedAndUploadResumed

References ignore, LinkAudiocomAccountHelpMenu, OpenFromCloudMenu, PrefsPanel, ProjectOpenedAndUploadResumed, SaveProjectSaveToCloudMenu, SaveToCloudMenu, ShareAudioButton, ShareAudioExportExtraMenu, ShareAudioExportMenu, ShareAudioMenu, and UpdateCloudAudioPreviewMenu.

Referenced by audacity::cloud::audiocom::ServiceConfig::GetAudioURL(), audacity::cloud::audiocom::ServiceConfig::GetFinishUploadPage(), audacity::cloud::audiocom::ServiceConfig::GetOAuthLoginPage(), audacity::cloud::audiocom::ServiceConfig::GetProjectPagePath(), and audacity::cloud::audiocom::ServiceConfig::GetProjectsPagePath().

Here is the caller graph for this function:

◆ Substitute()

std::string audacity::cloud::audiocom::anonymous_namespace{ServiceConfig.cpp}::Substitute ( std::string  pattern,
std::initializer_list< std::pair< std::string_view, std::string_view > >  substitutions 
)

Definition at line 69 of file ServiceConfig.cpp.

73{
74 for (auto& [key, value] : substitutions)
75 {
76 auto pos = pattern.find(key);
77
78 while (pos > 0 && pos != std::string::npos)
79 {
80 // There is no need to check that pos + key.size() is valid, there
81 // will be a zero terminator in the worst case.
82 if (pattern[pos - 1] == '{' && pattern[pos + key.size()] == '}')
83 pattern.replace(pos - 1, key.size() + 2, value);
84
85 pos = pattern.find(key, pos + 1);
86 }
87 }
88
89 return std::move(pattern);
90}
static const AudacityProject::AttachedObjects::RegisteredFactory key
constexpr size_t npos(-1)

References key, and Tuple::detail::npos().

Referenced by audacity::cloud::audiocom::ServiceConfig::GetAudioURL(), audacity::cloud::audiocom::ServiceConfig::GetCreateSnapshotUrl(), audacity::cloud::audiocom::ServiceConfig::GetDeleteSnapshotUrl(), audacity::cloud::audiocom::ServiceConfig::GetFinishUploadPage(), audacity::cloud::audiocom::ServiceConfig::GetNetworkStatsUrl(), audacity::cloud::audiocom::ServiceConfig::GetOAuthLoginPage(), audacity::cloud::audiocom::ServiceConfig::GetProjectInfoUrl(), audacity::cloud::audiocom::ServiceConfig::GetProjectPagePath(), audacity::cloud::audiocom::ServiceConfig::GetProjectsPagePath(), audacity::cloud::audiocom::ServiceConfig::GetProjectsUrl(), audacity::cloud::audiocom::ServiceConfig::GetSnapshotInfoUrl(), and audacity::cloud::audiocom::ServiceConfig::GetSnapshotSyncUrl().

Here is the call graph for this function:
Here is the caller graph for this function:

Variable Documentation

◆ audioComApiEndpoint

StringSetting audacity::cloud::audiocom::anonymous_namespace{ServiceConfig.cpp}::audioComApiEndpoint
Initial value:
{ L"/CloudServices/AudioCom/ApiEndpoint",
L"https://api.audio.com" }

Definition at line 31 of file ServiceConfig.cpp.

Referenced by audacity::cloud::audiocom::ServiceConfig::ServiceConfig().

◆ audioComAudioDownloadMimeType

StringSetting audacity::cloud::audiocom::anonymous_namespace{ServiceConfig.cpp}::audioComAudioDownloadMimeType
Initial value:
{
L"/CloudServices/AudioCom/DownloadMimeType", L"audio/x-wav"
}

Definition at line 65 of file ServiceConfig.cpp.

Referenced by audacity::cloud::audiocom::ServiceConfig::ServiceConfig().

◆ audioComAuthWithRedirectURL

StringSetting audacity::cloud::audiocom::anonymous_namespace{ServiceConfig.cpp}::audioComAuthWithRedirectURL
Initial value:
{
L"/CloudServices/AudioCom/AuthWithRedirectURL",
L"https://audio.com/auth/check-and-redirect"
}

Definition at line 57 of file ServiceConfig.cpp.

Referenced by audacity::cloud::audiocom::ServiceConfig::ServiceConfig().

◆ audioComFinishUploadPage

StringSetting audacity::cloud::audiocom::anonymous_namespace{ServiceConfig.cpp}::audioComFinishUploadPage
Initial value:
{
L"/CloudServices/AudioCom/FinishUploadPage",
L"https://audio.com/audacity/upload?audioId={audio_id}&token={auth_token}&clientId={auth_client_id}&" MTM_CAMPAIGN
}
#define MTM_CAMPAIGN

Definition at line 52 of file ServiceConfig.cpp.

Referenced by audacity::cloud::audiocom::ServiceConfig::ServiceConfig().

◆ audioComFrontendURL

StringSetting audacity::cloud::audiocom::anonymous_namespace{ServiceConfig.cpp}::audioComFrontendURL
Initial value:
{ L"/CloudServices/AudioCom/FrontendURL",
L"https://audio.com" }

Definition at line 62 of file ServiceConfig.cpp.

Referenced by audacity::cloud::audiocom::ServiceConfig::ServiceConfig().

◆ audioComOAuthClientID

StringSetting audacity::cloud::audiocom::anonymous_namespace{ServiceConfig.cpp}::audioComOAuthClientID
Initial value:
{ L"/CloudServices/AudioCom/OAuthClientID",
L"1741964426607541" }

Definition at line 34 of file ServiceConfig.cpp.

Referenced by audacity::cloud::audiocom::ServiceConfig::ServiceConfig().

◆ audioComOAuthClientSecret

StringSetting audacity::cloud::audiocom::anonymous_namespace{ServiceConfig.cpp}::audioComOAuthClientSecret
Initial value:
{
L"/CloudServices/AudioCom/OAuthClientSecret",
L"shKqnY2sLTfRK7hztwzNEVxnmhJfOy1i"
}

Definition at line 37 of file ServiceConfig.cpp.

Referenced by audacity::cloud::audiocom::ServiceConfig::ServiceConfig().

◆ audioComOAuthLoginPage

StringSetting audacity::cloud::audiocom::anonymous_namespace{ServiceConfig.cpp}::audioComOAuthLoginPage
Initial value:
{
L"/CloudServices/AudioCom/OAuthLoginPage",
L"https://audio.com/audacity/link?clientId={auth_client_id}&" MTM_CAMPAIGN
}

Definition at line 47 of file ServiceConfig.cpp.

Referenced by audacity::cloud::audiocom::ServiceConfig::ServiceConfig().

◆ audioComOAuthRedirectURL

StringSetting audacity::cloud::audiocom::anonymous_namespace{ServiceConfig.cpp}::audioComOAuthRedirectURL
Initial value:
{
L"/CloudServices/AudioCom/OAuthRedirectURL",
L"https://audio.com/auth/sign-in/success"
}

Definition at line 42 of file ServiceConfig.cpp.

Referenced by audacity::cloud::audiocom::ServiceConfig::ServiceConfig().