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 CONFIG_MULTIMODAL_H 17 #define CONFIG_MULTIMODAL_H 18 19 namespace OHOS { 20 namespace MMI { 21 #define DEF_MMI_EVENT_INJECTION "/system/bin/mmi-event-injection" 22 #define DEF_MMI_VIRTUAL_DEVICE_MANAGER "/system/bin/mmi-virtual-device-manager" 23 #define DEF_MMI_DATA_ROOT "/data/mmi/" 24 #define DEF_EXP_CONFIG "/system/etc/mmi_device_config.ini" 25 #ifdef __aarch64__ 26 #define DEF_EXP_SOPATH "/system/lib64/" 27 #else 28 #define DEF_EXP_SOPATH "/system/lib/" 29 #endif 30 #define DEF_SCREEN_MAX_WIDTH 480 31 #define DEF_SCREEN_MAX_HEIGHT 960 32 33 // Maximum buffer size of network packets 34 #define MAX_PACKET_BUF_SIZE (1024*8) 35 // Maximum buffer size of socket stream 36 #define MAX_STREAM_BUF_SIZE (MAX_PACKET_BUF_SIZE*2) 37 #define MAX_VECTOR_SIZE 1000 38 #define MAX_INPUT_DEVICE 64 39 #define MAX_SUPPORT_KEY 5 40 #define MAX_KEY_SIZE 395 41 42 // Instantaneous maximum listening buffer size of socket 43 #define MAX_LIST_SIZE 100 44 // Client quantity warning value 45 #define MAX_SESSON_ALARM 300 46 // Epoll create maximum event size 47 #define MAX_EVENT_SIZE 100 48 // Default epoll write timeout 49 #define DEFINE_EPOLL_TIMEOUT 1000 50 // Client reconnection cooldown 51 #define CLIENT_RECONNECT_COOLING_TIME 800 52 // Server failure restart cooldown 53 #define SERVER_RESTART_COOLING_TIME 2000 54 // Thread death threshold time 55 #define MAX_THREAD_DEATH_TIME (6*1000) 56 // notifyDeviceChange@Device added 57 #define MMISEVER_WMS_DEVICE_ADDED 1 58 // notifyDeviceChange@Device removed 59 #define MMISEVER_WMS_DEVICE_REMOVE 2 60 #define SEND_RETRY_LIMIT 100 61 #define SEND_RETRY_SLEEP_TIME 500 62 #define ONCE_PROCESS_NETPACKET_LIMIT 100 63 #define MAX_RECV_LIMIT 32 64 #define INPUT_POINTER_DEVICES "input.pointer.device" 65 #define SUPER_PRIVACY_SWITCH "persist.input.switch" 66 #define MMI_DINPUT_PKG_NAME "ohos.multimodalinput.dinput" 67 } // namespace MMI 68 } // namespace OHOS 69 #endif // CONFIG_MULTIMODAL_H 70