1 /* 2 * Copyright (c) 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 DEVICE_COOPERATE_SOFTBUS_DEFINE_H 17 #define DEVICE_COOPERATE_SOFTBUS_DEFINE_H 18 19 #include <string> 20 #include <unistd.h> 21 22 namespace OHOS { 23 namespace MMI { 24 constexpr int32_t ENCRYPT_TAG_LEN = 32; 25 constexpr int32_t MSG_MAX_SIZE = 45 * 1024; 26 constexpr uint32_t SESSION_NAME_SIZE_MAX = 256; 27 constexpr uint32_t DEVICE_ID_SIZE_MAX = 65; 28 constexpr uint32_t INTERCEPT_STRING_LENGTH = 20; 29 constexpr int32_t SESSION_WAIT_TIMEOUT_SECOND = 5; 30 constexpr int32_t SESSION_SIDE_SERVER = 0; 31 constexpr int32_t SESSION_SIDE_CLIENT = 1; 32 33 const std::string SESSION_NAME = "ohos.mmi."; 34 const std::string GROUP_ID = "mmi_softbus_group_id"; 35 36 #define MMI_SOFTBUS_KEY_CMD_TYPE "mmi_softbus_key_cmd_type" 37 #define MMI_SOFTBUS_KEY_LOCAL_DEVICE_ID "mmi_softbus_key_local_device_id" 38 #define MMI_SOFTBUS_KEY_START_DHID "mmi_softbus_key_start_dhid" 39 #define MMI_SOFTBUS_KEY_POINTER_X "mmi_softbus_key_pointer_x" 40 #define MMI_SOFTBUS_KEY_POINTER_Y "mmi_softbus_key_pointer_y" 41 #define MMI_SOFTBUS_KEY_RESULT "mmi_softbus_key_result" 42 #define MMI_SOFTBUS_KEY_OTHER_DEVICE_ID "mmi_softbus_key_other_device_id" 43 #define MMI_SOFTBUS_KEY_SESSION_ID "mmi_softbus_key_session_id" 44 45 enum { 46 REMOTE_COOPERATE_START = 1, 47 REMOTE_COOPERATE_START_RES = 2, 48 REMOTE_COOPERATE_STOP = 3, 49 REMOTE_COOPERATE_STOP_RES = 4, 50 REMOTE_COOPERATE_STOP_OTHER_RES = 5 51 }; 52 } // namespace MMI 53 } // namespace OHOS 54 #endif // DEVICE_COOPERATE_SOFTBUS_DEFINE_H 55