Audacity 3.2.0
ServiceConfig.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 ServiceConfig.h
7
8 Dmitry Vedenko
9
10**********************************************************************/
11#pragma once
12
13#include <chrono>
14#include <string>
15#include <vector>
16#include <rapidjson/fwd.h>
17
19{
20
22class CLOUD_AUDIOCOM_API ServiceConfig final
23{
24public:
27 std::string GetAPIEndpoint() const;
29 std::string GetOAuthLoginPage() const;
31 std::string GetOAuthClientID() const;
33 std::string GetOAuthClientSecret() const;
35 std::string GetOAuthRedirectURL() const;
37 std::string GetAPIUrl(std::string_view apiURI) const;
39 std::string GetFinishUploadPage(std::string_view audioID, std::string_view token) const;
41 std::string GetAudioURL(std::string_view userSlug, std::string_view audioSlug) const;
43 std::chrono::milliseconds GetProgressCallbackTimeout() const;
45 std::vector<std::string> GetPreferredAudioFormats(bool preferLossless = true) const;
47 rapidjson::Document GetExportConfig(const std::string& exporterName) const;
50 std::string GetDownloadMime() const;
52 std::string GetAcceptLanguageValue() const;
53
54 std::string GetCreateProjectUrl() const;
55 std::string GetCreateSnapshotUrl(std::string_view projectId) const;
56 std::string GetSnapshotSyncUrl(
57 std::string_view projectId, std::string_view snapshotId) const;
58 std::string GetProjectsUrl(int page, int pageSize, std::string_view searchTerm) const;
59
60 std::string GetProjectInfoUrl(std::string_view projectId) const;
61 std::string GetSnapshotInfoUrl(
62 std::string_view projectId, std::string_view snapshotId) const;
63 std::string GetDeleteSnapshotUrl(
64 std::string_view projectId, std::string_view snapshotId) const;
65
66 std::string GetNetworkStatsUrl(std::string_view projectId) const;
67 std::string
68 GetProjectPageUrl(std::string_view userId, std::string_view projectId) const;
69 std::string
70 GetProjectsPageUrl(std::string_view userId) const;
71
72private:
73 std::string mApiEndpoint;
74 std::string mOAuthClientID;
75 std::string mOAuthClientSecret;
76 std::string mOAuthRedirectURL;
77 std::string mOAuthLoginPage;
78 std::string mFinishUploadPage;
79 std::string mFrontendURL;
80 std::string mPreferredMimeType;
81};
82
84CLOUD_AUDIOCOM_API const ServiceConfig& GetServiceConfig();
85} // namespace audacity::cloud::audiocom
Configuration for the audio.com.
Definition: ServiceConfig.h:23
const ServiceConfig & GetServiceConfig()
Returns the instance of the ServiceConfig.