1f857971dSopenharmony_ci/*
2f857971dSopenharmony_ci * Copyright (c) 2021-2023 Huawei Device Co., Ltd.
3f857971dSopenharmony_ci * Licensed under the Apache License, Version 2.0 (the "License");
4f857971dSopenharmony_ci * you may not use this file except in compliance with the License.
5f857971dSopenharmony_ci * You may obtain a copy of the License at
6f857971dSopenharmony_ci *
7f857971dSopenharmony_ci *     http://www.apache.org/licenses/LICENSE-2.0
8f857971dSopenharmony_ci *
9f857971dSopenharmony_ci * Unless required by applicable law or agreed to in writing, software
10f857971dSopenharmony_ci * distributed under the License is distributed on an "AS IS" BASIS,
11f857971dSopenharmony_ci * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12f857971dSopenharmony_ci * See the License for the specific language governing permissions and
13f857971dSopenharmony_ci * limitations under the License.
14f857971dSopenharmony_ci */
15f857971dSopenharmony_ci
16f857971dSopenharmony_ci#ifndef PROTO_H
17f857971dSopenharmony_ci#define PROTO_H
18f857971dSopenharmony_ci
19f857971dSopenharmony_ci#include <sys/types.h>
20f857971dSopenharmony_ci
21f857971dSopenharmony_ciinline constexpr int32_t MAX_EVENT_SIZE { 100 };
22f857971dSopenharmony_ciinline constexpr int32_t STREAM_BUF_READ_FAIL { 1 };
23f857971dSopenharmony_ciinline constexpr int32_t STREAM_BUF_WRITE_FAIL { 2 };
24f857971dSopenharmony_ciinline constexpr int32_t MAX_VECTOR_SIZE { 10 };
25f857971dSopenharmony_ciinline constexpr int32_t MEM_OUT_OF_BOUNDS { 3 };
26f857971dSopenharmony_ciinline constexpr int32_t MEMCPY_SEC_FUN_FAIL { 4 };
27f857971dSopenharmony_ciinline constexpr int32_t PARAM_INPUT_INVALID { 5 };
28f857971dSopenharmony_ciinline constexpr int32_t MAX_STREAM_BUF_SIZE { 1024 };
29f857971dSopenharmony_ciinline constexpr size_t MAX_PACKET_BUF_SIZE { MAX_STREAM_BUF_SIZE };
30f857971dSopenharmony_ciinline constexpr int32_t ONCE_PROCESS_NETPACKET_LIMIT { 100 };
31f857971dSopenharmony_ciinline constexpr int32_t INVALID_FD { 6 };
32f857971dSopenharmony_ciinline constexpr int32_t INVALID_PID { 7 };
33f857971dSopenharmony_ciinline constexpr int32_t SESSION_NOT_FOUND { 8 };
34f857971dSopenharmony_ciinline constexpr int32_t EPOLL_MODIFY_FAIL { 9 };
35f857971dSopenharmony_ciinline constexpr int32_t ADD_SESSION_FAIL { 11 };
36f857971dSopenharmony_ciinline constexpr size_t MAX_SESSION_ALARM { 100 };
37f857971dSopenharmony_ciinline constexpr int32_t MAX_RECV_LIMIT { 13 };
38f857971dSopenharmony_ciinline constexpr int32_t SERVICE_NOT_RUNNING { 14 };
39f857971dSopenharmony_ciinline constexpr int32_t CONNECT_MODULE_TYPE_FI_CLIENT { 0 };
40f857971dSopenharmony_ciinline constexpr int64_t CLIENT_RECONNECT_COOLING_TIME { 800 };
41f857971dSopenharmony_ciinline constexpr int32_t SEND_RETRY_LIMIT { 32 };
42f857971dSopenharmony_ciinline constexpr useconds_t SEND_RETRY_SLEEP_TIME { 10000 };
43f857971dSopenharmony_ci
44f857971dSopenharmony_cienum class MessageId : int32_t {
45f857971dSopenharmony_ci    INVALID,
46f857971dSopenharmony_ci
47f857971dSopenharmony_ci    COORDINATION_ADD_LISTENER,
48f857971dSopenharmony_ci    COORDINATION_MESSAGE,
49f857971dSopenharmony_ci    COORDINATION_GET_STATE,
50f857971dSopenharmony_ci    HOT_AREA_ADD_LISTENER,
51f857971dSopenharmony_ci    MOUSE_LOCATION_ADD_LISTENER,
52f857971dSopenharmony_ci
53f857971dSopenharmony_ci    DSOFTBUS_START_COOPERATE,
54f857971dSopenharmony_ci    DSOFTBUS_START_COOPERATE_RESPONSE,
55f857971dSopenharmony_ci    DSOFTBUS_START_COOPERATE_FINISHED,
56f857971dSopenharmony_ci    DSOFTBUS_STOP_COOPERATE,
57f857971dSopenharmony_ci    DSOFTBUS_COME_BACK,
58f857971dSopenharmony_ci    DSOFTBUS_RELAY_COOPERATE,
59f857971dSopenharmony_ci    DSOFTBUS_RELAY_COOPERATE_FINISHED,
60f857971dSopenharmony_ci    DSOFTBUS_INPUT_POINTER_EVENT,
61f857971dSopenharmony_ci    DSOFTBUS_INPUT_KEY_EVENT,
62f857971dSopenharmony_ci    DSOFTBUS_SUBSCRIBE_MOUSE_LOCATION,
63f857971dSopenharmony_ci    DSOFTBUS_UNSUBSCRIBE_MOUSE_LOCATION,
64f857971dSopenharmony_ci    DSOFTBUS_REPLY_SUBSCRIBE_MOUSE_LOCATION,
65f857971dSopenharmony_ci    DSOFTBUS_REPLY_UNSUBSCRIBE_MOUSE_LOCATION,
66f857971dSopenharmony_ci    DSOFTBUS_MOUSE_LOCATION,
67f857971dSopenharmony_ci
68f857971dSopenharmony_ci    DRAG_NOTIFY_RESULT,
69f857971dSopenharmony_ci    DRAG_STATE_LISTENER,
70f857971dSopenharmony_ci    DRAG_NOTIFY_HIDE_ICON,
71f857971dSopenharmony_ci    DRAG_STYLE_LISTENER,
72f857971dSopenharmony_ci    DSOFTBUS_INPUT_DEV_HOT_PLUG,
73f857971dSopenharmony_ci    DSOFTBUS_INPUT_DEV_SYNC,
74f857971dSopenharmony_ci    MAX_MESSAGE_ID,
75f857971dSopenharmony_ci    ADD_SELECTED_PIXELMAP_RESULT
76f857971dSopenharmony_ci};
77f857971dSopenharmony_ci
78f857971dSopenharmony_cienum TokenType : int32_t {
79f857971dSopenharmony_ci    TOKEN_INVALID = -1,
80f857971dSopenharmony_ci    TOKEN_HAP = 0,
81f857971dSopenharmony_ci    TOKEN_NATIVE,
82f857971dSopenharmony_ci    TOKEN_SHELL
83f857971dSopenharmony_ci};
84f857971dSopenharmony_ci#endif // PROTO_H
85