Michael Wright | 5113aff | 2015-02-13 17:31:41 -0800 | [diff] [blame^] | 1 | /* |
| 2 | * Copyright (C) 2015 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 | #define LOG_NDEBUG 0 |
| 18 | #define LOG_TAG "EvdevModule" |
| 19 | |
| 20 | #include <assert.h> |
| 21 | #include <hardware/hardware.h> |
| 22 | #include <hardware/input.h> |
| 23 | |
| 24 | namespace input { |
| 25 | |
| 26 | extern "C" { |
| 27 | |
| 28 | static int dummy_open(const hw_module_t __unused *module, const char __unused *id, |
| 29 | hw_device_t __unused **device) { |
| 30 | assert(false); |
| 31 | return 0; |
| 32 | } |
| 33 | |
| 34 | static void input_init(const input_module_t* module, |
| 35 | input_host_t* host, input_host_callbacks_t cb) { |
| 36 | return; |
| 37 | } |
| 38 | |
| 39 | static void input_notify_report(input_report_t* r) { |
| 40 | return; |
| 41 | } |
| 42 | |
| 43 | static struct hw_module_methods_t input_module_methods = { |
| 44 | .open = dummy_open, |
| 45 | }; |
| 46 | |
| 47 | input_module_t HAL_MODULE_INFO_SYM = { |
| 48 | .common = { |
| 49 | .tag = HARDWARE_MODULE_TAG, |
| 50 | .module_api_version = INPUT_MODULE_API_VERSION_1_0, |
| 51 | .hal_api_version = HARDWARE_HAL_API_VERSION, |
| 52 | .id = INPUT_HARDWARE_MODULE_ID, |
| 53 | .name = "Input evdev HAL", |
| 54 | .author = "The Android Open Source Project", |
| 55 | .methods = &input_module_methods, |
| 56 | .dso = NULL, |
| 57 | .reserved = {0}, |
| 58 | }, |
| 59 | |
| 60 | .init = input_init, |
| 61 | .notify_report = input_notify_report, |
| 62 | }; |
| 63 | |
| 64 | } // extern "C" |
| 65 | |
| 66 | } // namespace input |