• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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_SEAT_ID "seat0"         // Default libinput seat
22 
23 #define DEF_MMI_EVENT_INJECTION "/system/bin/mmi-event-injection"
24 #define DEF_MMI_VIRTUAL_DEVICE_MANAGER "/system/bin/mmi-virtual-device-manager"
25 #define DEF_MMI_DATA_ROOT "/data/mmi/"
26 #define DEF_EXP_CONFIG "/system/etc/mmi_device_config.ini"
27 #ifdef __aarch64__
28     #define DEF_EXP_SOPATH "/system/lib64/"
29 #else
30     #define DEF_EXP_SOPATH "/system/lib/"
31 #endif
32 #define DEF_SCREEN_MAX_WIDTH 480
33 #define DEF_SCREEN_MAX_HEIGHT 960
34 
35 #define MAX_PACKET_BUF_SIZE (1024*8)                // Maximum buffer size of network packets
36 #define MAX_STREAM_BUF_SIZE (MAX_PACKET_BUF_SIZE*2) // Maximum buffer size of socket stream
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 #define MAX_LIST_SIZE 100                   // Instantaneous maximum listening buffer size of socket
43 #define MAX_SESSON_ALARM 300                // Client quantity warning value
44 #define MAX_EVENT_SIZE 100                  // Epoll create maximum event size
45 #define DEFINE_EPOLL_TIMEOUT 1000           // Default epoll write timeout
46 #define CLIENT_RECONNECT_COOLING_TIME 800   // Client reconnection cooldown
47 #define SERVER_RESTART_COOLING_TIME 2000    // Server failure restart cooldown
48 #define MAX_THREAD_DEATH_TIME (6*1000)      // Thread death threshold time
49 #define MMISEVER_WMS_DEVICE_ADDED 1         // notifyDeviceChange@Device added
50 #define MMISEVER_WMS_DEVICE_REMOVE 2        // notifyDeviceChange@Device removed
51 #ifndef OHOS_BUILD_ENABLE_COOPERATE
52     #define SEND_RETRY_LIMIT 32
53 #else
54     #define SEND_RETRY_LIMIT 2
55 #endif
56 #define SEND_RETRY_SLEEP_TIME 10000
57 #define ONCE_PROCESS_NETPACKET_LIMIT 100
58 #define MAX_RECV_LIMIT 32
59 #define INPUT_POINTER_DEVICE "input.pointer.device"
60 #define MMI_DINPUT_PKG_NAME "ohos.multimodalinput.dinput"
61 } // namespace MMI
62 } // namespace OHOS
63 #endif // CONFIG_MULTIMODAL_H
64