1 /* 2 * Copyright (c) 2025 Huawei Device Co., Ltd. 3 * Licensed under the Apache License, Version 2.0 (the "License"); 4 * you may not use this file except in compliance with the License. 5 * You may obtain a copy of the License at 6 * 7 * http://www.apache.org/licenses/LICENSE-2.0 8 * 9 * Unless required by applicable law or agreed to in writing, software 10 * distributed under the License is distributed on an "AS IS" BASIS, 11 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 * See the License for the specific language governing permissions and 13 * limitations under the License. 14 */ 15 #ifndef ST_AUDIO_GLOBAL_CONFIG_MANAGER_H 16 #define ST_AUDIO_GLOBAL_CONFIG_MANAGER_H 17 18 #include <vector> 19 #include <string> 20 #include <memory> 21 #include <unordered_map> 22 23 namespace OHOS { 24 namespace AudioStandard { 25 26 static constexpr uint32_t DEFAULT_INNER_CAPTURE_NUM_LIMIT = 2; 27 28 class AudioGlobalConfigManager { 29 public: GetAudioGlobalConfigManager()30 static AudioGlobalConfigManager& GetAudioGlobalConfigManager() 31 { 32 static AudioGlobalConfigManager audioGlobalConfigManager; 33 return audioGlobalConfigManager; 34 } 35 void ParseGlobalConfigXml(); GetCapLimit()36 uint32_t GetCapLimit() 37 { 38 return innerCapLimit_; 39 } 40 41 private: 42 uint32_t innerCapLimit_ = DEFAULT_INNER_CAPTURE_NUM_LIMIT; 43 }; 44 } // namespace AudioStandard 45 } // namespace OHOS 46 #endif //ST_AUDIO_AFFINITY_MANAGER_H 47