blob: a0da125a7e8d343dca32565c9693b74b7c832672 [file] [log] [blame]
Kevin Rocardd4de2882018-02-28 14:33:38 -08001/*
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
Kevin Rocarddf9b4202018-05-10 19:56:08 -070017#ifndef ANDROID_HARDWARE_DEVICES_FACTORY_HAL_LOCAL_H
18#define ANDROID_HARDWARE_DEVICES_FACTORY_HAL_LOCAL_H
Kevin Rocardd4de2882018-02-28 14:33:38 -080019
20#include <media/audiohal/DevicesFactoryHalInterface.h>
21#include <utils/Errors.h>
22#include <utils/RefBase.h>
23
24#include "DeviceHalLocal.h"
25
26namespace android {
27
28class DevicesFactoryHalLocal : public DevicesFactoryHalInterface
29{
30 public:
31 // Opens a device with the specified name. To close the device, it is
32 // necessary to release references to the returned object.
33 virtual status_t openDevice(const char *name, sp<DeviceHalInterface> *device);
34
Eric Laurent42896a02019-09-27 15:40:33 -070035 status_t getHalPids(std::vector<pid_t> *pids __unused) override {
36 return INVALID_OPERATION;
37 }
38
Mikhail Naganov88de22f2020-03-06 10:55:34 -080039 status_t setCallbackOnce(sp<DevicesFactoryHalCallback> callback __unused) override {
40 return INVALID_OPERATION;
41 }
42
Jiabin Huangebe64102021-09-07 20:01:07 +000043 float getHalVersion() const override {
44 return MAJOR_VERSION + (float)MINOR_VERSION / 10;
45 }
46
Kevin Rocardd4de2882018-02-28 14:33:38 -080047 private:
48 friend class DevicesFactoryHalHybrid;
49
50 // Can not be constructed directly by clients.
51 DevicesFactoryHalLocal() {}
52
53 virtual ~DevicesFactoryHalLocal() {}
54};
55
56} // namespace android
57
Kevin Rocarddf9b4202018-05-10 19:56:08 -070058#endif // ANDROID_HARDWARE_DEVICES_FACTORY_HAL_LOCAL_H