1 /* 2 * Copyright (c) 2021-2022 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 VIRTUAL_DEVICE_CONFIG_H 17 #define VIRTUAL_DEVICE_CONFIG_H 18 19 #include <cerrno> 20 #include <cinttypes> 21 #include <csignal> 22 #include <cstdint> 23 #include <cstring> 24 #include <dirent.h> 25 #include <fcntl.h> 26 #include <fstream> 27 #include <functional> 28 #include <iostream> 29 #include <map> 30 #include <memory> 31 #include <sstream> 32 #include <sys/stat.h> 33 #include <unistd.h> 34 #include <vector> 35 36 #include "linux/input.h" 37 #include "linux/uinput.h" 38 #include "securec.h" 39 40 #ifndef REL_WHEEL_HI_RES 41 #define REL_WHEEL_HI_RES 0x0b 42 #endif 43 44 #ifndef REL_HWHEEL_HI_RES 45 #define REL_HWHEEL_HI_RES 0x0c 46 #endif 47 48 namespace OHOS { 49 namespace MMI { 50 #define SYMBOL_FOLDER_PERMISSIONS 775 51 #define PARAMETERS_NUMBER 3 52 #define PARAMETERS_QUERY_NUMBER 2 53 54 struct ResolutionInfo { 55 int16_t axisCode {}; 56 int32_t absResolution {}; 57 }; 58 59 struct AbsInfo { 60 int32_t code {}; 61 int32_t minValue {}; 62 int32_t maxValue {}; 63 int32_t fuzz {}; 64 int32_t flat {}; 65 }; 66 67 const std::string g_folderPath = "/data/symbol/"; 68 } // namespace MMI 69 } // namespace OHOS 70 #endif // VIRTUAL_DEVICE_CONFIG_H