• 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 SOFTBUS_IPC_DEF_H
17 #define SOFTBUS_IPC_DEF_H
18 
19 #define SOFTBUS_SERVER_SA_ID_INNER 4700
20 
21 #ifdef __cplusplus
22 #if __cplusplus
23 extern "C" {
24 #endif
25 #endif
26 
27 #define MAX_SOFT_BUS_IPC_LEN 512
28 #define MAX_SOFT_BUS_IPC_LEN_EX 2048
29 #define SOFTBUS_SERVICE "softbus_service"
30 
31 struct CommonScvId {
32     unsigned int handle;
33     unsigned int token;
34     unsigned int cookie;
35     void *ipcCtx;
36     unsigned int cbId;
37 };
38 
39 enum SoftBusFuncId {
40     MANAGE_REGISTER_SERVICE = 0,
41 
42     SERVER_PUBLISH_SERVICE = 128,
43     SERVER_UNPUBLISH_SERVICE,
44 
45     SERVER_CREATE_SESSION_SERVER,
46     SERVER_REMOVE_SESSION_SERVER,
47     SERVER_OPEN_SESSION,
48     SERVER_OPEN_AUTH_SESSION,
49     SERVER_NOTIFY_AUTH_SUCCESS,
50     SERVER_CLOSE_CHANNEL,
51     SERVER_SESSION_SENDMSG,
52     SERVER_QOS_REPORT,
53     SERVER_GRANT_PERMISSION,
54     SERVER_REMOVE_PERMISSION,
55     SERVER_STREAM_STATS,
56 
57     SERVER_START_DISCOVERY,
58     SERVER_STOP_DISCOVERY,
59 
60     SERVER_JOIN_LNN,
61     SERVER_JOIN_METANODE,
62     SERVER_LEAVE_LNN,
63     SERVER_LEAVE_METANODE,
64     SERVER_GET_ALL_ONLINE_NODE_INFO,
65     SERVER_GET_LOCAL_DEVICE_INFO,
66     SERVER_GET_NODE_KEY_INFO,
67     SERVER_SET_NODE_DATA_CHANGE_FLAG,
68     SERVER_START_TIME_SYNC,
69     SERVER_STOP_TIME_SYNC,
70     SERVER_PUBLISH_LNN,
71     SERVER_STOP_PUBLISH_LNN,
72     SERVER_REFRESH_LNN,
73     SERVER_STOP_REFRESH_LNN,
74     SERVER_ACTIVE_META_NODE,
75     SERVER_DEACTIVE_META_NODE,
76     SERVER_GET_ALL_META_NODE_INFO,
77     SERVER_SHIFT_LNN_GEAR,
78     SERVER_RIPPLE_STATS,
79 
80     CLIENT_ON_CHANNEL_OPENED = 256,
81     CLIENT_ON_CHANNEL_OPENFAILED,
82     CLIENT_ON_CHANNEL_LINKDOWN,
83     CLIENT_ON_CHANNEL_CLOSED,
84     CLIENT_ON_CHANNEL_MSGRECEIVED,
85     CLIENT_ON_CHANNEL_QOSEVENT,
86 
87     CLIENT_DISCOVERY_SUCC,
88     CLIENT_DISCOVERY_FAIL,
89     CLIENT_DISCOVERY_DEVICE_FOUND,
90     CLIENT_PUBLISH_SUCC,
91     CLIENT_PUBLISH_FAIL,
92 
93     CLIENT_ON_JOIN_RESULT,
94     CLIENT_ON_JOIN_METANODE_RESULT,
95     CLIENT_ON_LEAVE_RESULT,
96     CLIENT_ON_LEAVE_METANODE_RESULT,
97     CLIENT_ON_NODE_ONLINE_STATE_CHANGED,
98     CLIENT_ON_NODE_BASIC_INFO_CHANGED,
99     CLIENT_ON_TIME_SYNC_RESULT,
100     CLIENT_ON_PUBLISH_LNN_RESULT,
101     CLIENT_ON_REFRESH_LNN_RESULT,
102     CLIENT_ON_REFRESH_DEVICE_FOUND,
103     CLIENT_ON_PERMISSION_CHANGE,
104 };
105 
106 #ifdef __cplusplus
107 #if __cplusplus
108 }
109 #endif /* __cplusplus */
110 #endif /* __cplusplus */
111 
112 #endif