• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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 
16 #ifndef I_CORE_SERVICE_PROVIDER_H
17 #define I_CORE_SERVICE_PROVIDER_H
18 
19 #include <cstdint>
20 #include "audio_service_enum.h"
21 #include "audio_device_info.h"
22 #include "audio_device_descriptor.h"
23 
24 
25 namespace OHOS {
26 namespace AudioStandard {
27 class ICoreServiceProvider {
28 public:
29     virtual int32_t ReloadCaptureSession(uint32_t sessionId, SessionOperation operation) = 0;
30     virtual int32_t UpdateSessionOperation(uint32_t sessionId, SessionOperation operation,
31         SessionOperationMsg opMsg) = 0;
32     virtual int32_t SetDefaultOutputDevice(const DeviceType defaultOutputDevice,
33         const uint32_t sessionID, const StreamUsage streamUsage, bool isRunning, bool skipForce = false) = 0;
34     virtual std::string GetAdapterNameBySessionId(uint32_t sessionID) = 0;
35     virtual int32_t GetProcessDeviceInfoBySessionId(uint32_t sessionID, AudioDeviceDescriptor &deviceInfo,
36         AudioStreamInfo &streamInfo, bool isReloadProcess) = 0;
37     virtual uint32_t GenerateSessionId() = 0;
38     virtual int32_t SetWakeUpAudioCapturerFromAudioServer(const AudioProcessConfig &config) = 0;
39 
40     virtual ~ICoreServiceProvider() = default;
41 };
42 } // namespace AudioStandard
43 } // namespace OHOS
44 #endif // I_CORE_SERVICE_PROVIDER_H
45