DevicesFactory.h revision 10548295023bee99108e418499aff09fe578211e
1/*
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_V2_0_DevicesFactory_H_
18#define HIDL_GENERATED_android_hardware_audio_V2_0_DevicesFactory_H_
19
20#include <hardware/audio.h>
21
22#include <android/hardware/audio/2.0/IDevicesFactory.h>
23#include <hidl/Status.h>
24
25#include <hidl/MQDescriptor.h>
26namespace android {
27namespace hardware {
28namespace audio {
29namespace V2_0 {
30namespace implementation {
31
32using ::android::hardware::audio::V2_0::IDevice;
33using ::android::hardware::audio::V2_0::IDevicesFactory;
34using ::android::hardware::audio::V2_0::Result;
35using ::android::hardware::Return;
36using ::android::hardware::Void;
37using ::android::hardware::hidl_vec;
38using ::android::hardware::hidl_string;
39using ::android::sp;
40
41struct DevicesFactory : public IDevicesFactory {
42    // Methods from ::android::hardware::audio::V2_0::IDevicesFactory follow.
43    Return<void> openDevice(IDevicesFactory::Device device, openDevice_cb _hidl_cb)  override;
44
45  private:
46    static const char* deviceToString(IDevicesFactory::Device device);
47    static int loadAudioInterface(const char *if_name, audio_hw_device_t **dev);
48
49};
50
51extern "C" IDevicesFactory* HIDL_FETCH_IDevicesFactory(const char* name);
52
53}  // namespace implementation
54}  // namespace V2_0
55}  // namespace audio
56}  // namespace hardware
57}  // namespace android
58
59#endif  // HIDL_GENERATED_android_hardware_audio_V2_0_DevicesFactory_H_
60