1 /*
2  * Copyright (c) 2023-2024 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 OHOS_AUDIO_CAPTURE_INTERFACE_IMPL_BASE_H
17 #define OHOS_AUDIO_CAPTURE_INTERFACE_IMPL_BASE_H
18 
19 #include <string>
20 
21 #include <v1_0/iaudio_capture.h>
22 #include <v2_0/id_audio_manager.h>
23 
24 namespace OHOS {
25 namespace HDI {
26 namespace DistributedAudio {
27 namespace Audio {
28 namespace V1_0 {
29 using OHOS::HDI::DistributedAudio::Audioext::V2_0::AudioData;
30 using OHOS::HDI::DistributedAudio::Audioext::V2_0::AudioParameter;
31 using OHOS::HDI::DistributedAudio::Audioext::V2_0::IDAudioCallback;
32 typedef enum {
33     CAPTURE_STATUS_OPEN = 0,
34     CAPTURE_STATUS_CLOSE,
35     CAPTURE_STATUS_START,
36     CAPTURE_STATUS_STOP,
37     CAPTURE_STATUS_PAUSE,
38 } AudioCaptureStatus;
39 
40 class AudioCaptureInterfaceImplBase : public IAudioCapture {
41 public:
42     AudioCaptureInterfaceImplBase() = default;
43     virtual ~AudioCaptureInterfaceImplBase() = default;
44 
45     virtual const AudioDeviceDescriptor &GetCaptureDesc() = 0;
46     virtual void SetAttrs(const std::string &adpName, const AudioDeviceDescriptor &desc,
47         const AudioSampleAttributes &attrs, const sptr<IDAudioCallback> &callback, const int32_t dhId) = 0;
48     virtual void SetDumpFlagInner() = 0;
49 };
50 } // V1_0
51 } // Audio
52 } // Distributedaudio
53 } // HDI
54 } // OHOS
55 #endif // OHOS_AUDIO_CAPTURE_INTERFACE_IMPL_BASE_H