• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * Copyright (c) 2022-2023 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_COORDINATION_SOFTBUS_DEFINE_H
17 #define DEVICE_COORDINATION_SOFTBUS_DEFINE_H
18 
19 #include <string>
20 #include <unistd.h>
21 
22 namespace OHOS {
23 namespace Msdp {
24 namespace DeviceStatus {
25 constexpr int32_t FILTER_WAIT_TIMEOUT_SECOND { 1 };
26 constexpr int32_t SESSION_SIDE_CLIENT { 1 };
27 constexpr int32_t SESSION_SIDE_SERVER { 0 };
28 constexpr int32_t SESSION_WAIT_TIMEOUT_SECOND { 5 };
29 constexpr uint32_t DEVICE_NAME_SIZE_MAX { 256 };
30 constexpr uint32_t PKG_NAME_SIZE_MAX { 65 };
31 constexpr uint32_t BIND_STRING_LENGTH { 10 };
32 constexpr uint32_t INTERCEPT_STRING_LENGTH { 20 };
33 constexpr uint32_t SESSION_NAME_SIZE_MAX { 256 };
34 constexpr size_t MSG_MAX_SIZE { 45 * 1024 };
35 constexpr int32_t ENCRYPT_TAG_LEN { 32 };
36 
37 #define FI_SOFTBUS_KEY_CMD_TYPE "fi_softbus_key_cmd_type"
38 #define FI_SOFTBUS_KEY_LOCAL_DEVICE_ID "fi_softbus_key_local_device_id"
39 #define FI_SOFTBUS_KEY_START_DHID "fi_softbus_key_start_dhid"
40 #define FI_SOFTBUS_KEY_POINTER_X "fi_softbus_key_pointer_x"
41 #define FI_SOFTBUS_KEY_POINTER_Y "fi_softbus_key_pointer_y"
42 #define FI_SOFTBUS_KEY_RESULT "fi_softbus_key_result"
43 #define FI_SOFTBUS_KEY_SESSION_ID "fi_softbus_key_session_id"
44 #define FI_SOFTBUS_KEY_OTHER_DEVICE_ID "fi_softbus_key_other_device_id"
45 #define FI_SOFTBUS_POINTER_BUTTON_IS_PRESS "fi_softbus_pointer_button_is_press"
46 
47 enum {
48     REMOTE_COORDINATION_START = 1,
49     REMOTE_COORDINATION_START_RES = 2,
50     REMOTE_COORDINATION_STOP = 3,
51     REMOTE_COORDINATION_STOP_RES = 4,
52     REMOTE_COORDINATION_STOP_OTHER_RES = 5,
53     NOTIFY_UNCHAINED_RES = 6,
54     NOTIFY_FILTER_ADDED = 7
55 };
56 } // namespace DeviceStatus
57 } // namespace Msdp
58 } // namespace OHOS
59 #endif // DEVICE_COORDINATION_SOFTBUS_DEFINE_H
60