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 PROTO_H 17 #define PROTO_H 18 19 #include <sys/types.h> 20 21 enum class MmiMessageId : int32_t { 22 INVALID, 23 ADD_INPUT_DEVICE_LISTENER, 24 DISPLAY_INFO, 25 NOTICE_ANR, 26 MARK_PROCESS, 27 ON_SUBSCRIBE_KEY, 28 ON_SUBSCRIBE_KEY_MONITOR, 29 ON_SUBSCRIBE_SWITCH, 30 ON_KEY_EVENT, 31 ON_POINTER_EVENT, 32 REPORT_KEY_EVENT, 33 REPORT_POINTER_EVENT, 34 ON_DEVICE_ADDED, 35 ON_DEVICE_REMOVED, 36 SCINFO_CONFIG, 37 WINDOW_AREA_INFO, 38 NOTIFY_BUNDLE_NAME, 39 WINDOW_INFO, 40 WINDOW_STATE_ERROR_CALLBACK, 41 WINDOW_STATE_ERROR_NOTIFY, 42 ON_SUBSCRIBE_LONG_PRESS, 43 SET_INPUT_DEVICE_ENABLED, 44 ON_PRE_KEY_EVENT, 45 ON_SUBSCRIBE_TABLET, 46 DEVICE_CONSUMER_HANDLER_EVENT, 47 ON_SUBSCRIBE_INPUT_ACTIVE, 48 }; 49 50 enum TokenType : int32_t { 51 TOKEN_INVALID = -1, 52 TOKEN_HAP = 0, 53 TOKEN_NATIVE, 54 TOKEN_SHELL, 55 TOKEN_SYSTEM_HAP, 56 }; 57 58 enum ANTTimeOutTime : int64_t { 59 INPUT_UI_TIMEOUT_TIME = 5 * 1000000 60 }; 61 62 enum ANREventType { 63 ANR_DISPATCH, 64 ANR_MONITOR, 65 ANR_EVENT_TYPE_NUM, 66 }; 67 #endif // PROTO_H 68