blob: 229356f1706238a387bd917215c45104a060bbf7 [file] [log] [blame]
Mikhail Naganov7cbf2f12016-10-27 20:05:35 -07001/*
2 * Copyright (C) 2016 The Android Open Source Project
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16
17#ifndef HIDL_GENERATED_android_hardware_audio_effect_V2_0_EffectsFactory_H_
18#define HIDL_GENERATED_android_hardware_audio_effect_V2_0_EffectsFactory_H_
19
20#include <system/audio_effect.h>
21
22#include <android/hardware/audio/effect/2.0/IEffectsFactory.h>
23#include <hidl/Status.h>
24
25#include <hidl/MQDescriptor.h>
26namespace android {
27namespace hardware {
28namespace audio {
29namespace effect {
30namespace V2_0 {
31namespace implementation {
32
33using ::android::hardware::audio::common::V2_0::Uuid;
34using ::android::hardware::audio::effect::V2_0::EffectDescriptor;
35using ::android::hardware::audio::effect::V2_0::IEffect;
36using ::android::hardware::audio::effect::V2_0::IEffectsFactory;
37using ::android::hardware::audio::effect::V2_0::Result;
38using ::android::hardware::Return;
39using ::android::hardware::Void;
40using ::android::hardware::hidl_vec;
41using ::android::hardware::hidl_string;
42using ::android::sp;
43
44struct EffectsFactory : public IEffectsFactory {
45 // Methods from ::android::hardware::audio::effect::V2_0::IEffectsFactory follow.
46 Return<void> getAllDescriptors(getAllDescriptors_cb _hidl_cb) override;
47 Return<void> getDescriptor(const Uuid& uid, getDescriptor_cb _hidl_cb) override;
48 Return<void> createEffect(
49 const Uuid& uid, int32_t session, int32_t ioHandle, createEffect_cb _hidl_cb) override;
50 Return<void> debugDump(const native_handle_t* fd) override;
51
52 private:
53 static sp<IEffect> dispatchEffectInstanceCreation(
54 const effect_descriptor_t& halDescriptor, effect_handle_t handle);
55};
56
57extern "C" IEffectsFactory* HIDL_FETCH_IEffectsFactory(const char* name);
58
59} // namespace implementation
60} // namespace V2_0
61} // namespace effect
62} // namespace audio
63} // namespace hardware
64} // namespace android
65
66#endif // HIDL_GENERATED_android_hardware_audio_effect_V2_0_EffectsFactory_H_