![]() |
Audacity 3.2.0
|
Configuration for the audio.com. More...
#include <ServiceConfig.h>
Public Member Functions | |
std::string_view | GetAPIEndpoint () const |
API endpoint. More... | |
std::string_view | GetOAuthLoginPage () const |
Page to open in browser to initiate OAuth. More... | |
std::string_view | GetOAuthClientID () const |
OAuth2 client ID. More... | |
std::string_view | GetOAuthRedirectURL () const |
OAuth2 redirect URL. Only used to satisfy the protocol. More... | |
std::string | GetAPIUrl (std::string_view apiURI) const |
Helper to construct the full URLs for the API. More... | |
std::string | GetFinishUploadPage (std::string_view audioID, std::string_view token) const |
Helper to construct the page URL for the anonymous upload last stage. More... | |
std::string | GetAudioURL (std::string_view userSlug, std::string_view audioSlug) const |
Helper to construct the page URL for the authorised upload. More... | |
std::chrono::milliseconds | GetProgressCallbackTimeout () const |
Timeout between progress callbacks. More... | |
std::vector< std::string > | GetPreferredAudioFormats () const |
Preferred audio format. More... | |
rapidjson::Document | GetExportConfig (const std::string &exporterName) const |
Export configuration suitable for the mime type provided. More... | |
std::string | GetDownloadMime () const |
Return the mime type server should store the file. This is a requirement from audiocom. More... | |
std::string | GetAcceptLanguageValue () const |
Returns the preferred language. More... | |
Configuration for the audio.com.
Definition at line 23 of file ServiceConfig.h.
std::string cloud::audiocom::ServiceConfig::GetAcceptLanguageValue | ( | ) | const |
Returns the preferred language.
Definition at line 105 of file ServiceConfig.cpp.
References Languages::GetLang().
Referenced by cloud::audiocom::anonymous_namespace{UploadService.cpp}::AudiocomUploadOperation::SetRequiredHeaders().
std::string_view cloud::audiocom::ServiceConfig::GetAPIEndpoint | ( | ) | const |
API endpoint.
Definition at line 19 of file ServiceConfig.cpp.
Referenced by GetAPIUrl().
std::string cloud::audiocom::ServiceConfig::GetAPIUrl | ( | std::string_view | apiURI | ) | const |
Helper to construct the full URLs for the API.
Definition at line 44 of file ServiceConfig.cpp.
References GetAPIEndpoint().
Referenced by cloud::audiocom::anonymous_namespace{UploadService.cpp}::AudiocomUploadOperation::DiscardResult(), cloud::audiocom::OAuthService::DoAuthorise(), and cloud::audiocom::anonymous_namespace{UploadService.cpp}::AudiocomUploadOperation::InitiateUpload().
std::string cloud::audiocom::ServiceConfig::GetAudioURL | ( | std::string_view | userSlug, |
std::string_view | audioSlug | ||
) | const |
Helper to construct the page URL for the authorised upload.
Definition at line 57 of file ServiceConfig.cpp.
Referenced by cloud::audiocom::anonymous_namespace{UploadService.cpp}::AudiocomUploadOperation::CompletePromise().
std::string cloud::audiocom::ServiceConfig::GetDownloadMime | ( | ) | const |
Return the mime type server should store the file. This is a requirement from audiocom.
Definition at line 100 of file ServiceConfig.cpp.
Referenced by cloud::audiocom::anonymous_namespace{UploadService.cpp}::GetUploadRequestPayload().
rapidjson::Document cloud::audiocom::ServiceConfig::GetExportConfig | ( | const std::string & | exporterName | ) | const |
Export configuration suitable for the mime type provided.
Definition at line 73 of file ServiceConfig.cpp.
Referenced by cloud::audiocom::ShareAudioDialog::ExportProject().
std::string cloud::audiocom::ServiceConfig::GetFinishUploadPage | ( | std::string_view | audioID, |
std::string_view | token | ||
) | const |
Helper to construct the page URL for the anonymous upload last stage.
Definition at line 49 of file ServiceConfig.cpp.
References GetOAuthClientID().
Referenced by cloud::audiocom::anonymous_namespace{UploadService.cpp}::AudiocomUploadOperation::CompletePromise().
std::string_view cloud::audiocom::ServiceConfig::GetOAuthClientID | ( | ) | const |
OAuth2 client ID.
Definition at line 33 of file ServiceConfig.cpp.
Referenced by GetFinishUploadPage(), GetOAuthLoginPage(), and cloud::audiocom::anonymous_namespace{OAuthService.cpp}::WriteCommonFields().
std::string_view cloud::audiocom::ServiceConfig::GetOAuthLoginPage | ( | ) | const |
Page to open in browser to initiate OAuth.
Definition at line 24 of file ServiceConfig.cpp.
References GetOAuthClientID().
std::string_view cloud::audiocom::ServiceConfig::GetOAuthRedirectURL | ( | ) | const |
OAuth2 redirect URL. Only used to satisfy the protocol.
Definition at line 38 of file ServiceConfig.cpp.
Referenced by cloud::audiocom::OAuthService::AuthoriseCode().
std::vector< std::string > cloud::audiocom::ServiceConfig::GetPreferredAudioFormats | ( | ) | const |
Preferred audio format.
Definition at line 68 of file ServiceConfig.cpp.
std::chrono::milliseconds cloud::audiocom::ServiceConfig::GetProgressCallbackTimeout | ( | ) | const |
Timeout between progress callbacks.
Definition at line 63 of file ServiceConfig.cpp.
Referenced by cloud::audiocom::anonymous_namespace{UploadService.cpp}::AudiocomUploadOperation::HandleUploadProgress().