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 /*SAID: 4700*/ 40 enum SoftBusFuncId { 41 MANAGE_REGISTER_SERVICE = 0, 42 43 SERVER_PUBLISH_SERVICE = 128, 44 SERVER_UNPUBLISH_SERVICE, 45 46 SERVER_CREATE_SESSION_SERVER, 47 SERVER_REMOVE_SESSION_SERVER, 48 SERVER_OPEN_SESSION, 49 SERVER_OPEN_AUTH_SESSION, 50 SERVER_NOTIFY_AUTH_SUCCESS, 51 SERVER_CLOSE_CHANNEL, 52 SERVER_SESSION_SENDMSG, 53 SERVER_QOS_REPORT, 54 SERVER_GRANT_PERMISSION, 55 SERVER_REMOVE_PERMISSION, 56 SERVER_STREAM_STATS, 57 SERVER_GET_SOFTBUS_SPEC_OBJECT, 58 59 SERVER_START_DISCOVERY, 60 SERVER_STOP_DISCOVERY, 61 62 SERVER_JOIN_LNN, 63 SERVER_JOIN_METANODE, 64 SERVER_LEAVE_LNN, 65 SERVER_LEAVE_METANODE, 66 SERVER_GET_ALL_ONLINE_NODE_INFO, 67 SERVER_GET_LOCAL_DEVICE_INFO, 68 SERVER_GET_NODE_KEY_INFO, 69 SERVER_SET_NODE_DATA_CHANGE_FLAG, 70 SERVER_START_TIME_SYNC, 71 SERVER_STOP_TIME_SYNC, 72 SERVER_PUBLISH_LNN, 73 SERVER_STOP_PUBLISH_LNN, 74 SERVER_REFRESH_LNN, 75 SERVER_STOP_REFRESH_LNN, 76 SERVER_ACTIVE_META_NODE, 77 SERVER_DEACTIVE_META_NODE, 78 SERVER_GET_ALL_META_NODE_INFO, 79 SERVER_SHIFT_LNN_GEAR, 80 SERVER_RIPPLE_STATS, 81 82 CLIENT_ON_CHANNEL_OPENED = 256, 83 CLIENT_ON_CHANNEL_OPENFAILED, 84 CLIENT_ON_CHANNEL_LINKDOWN, 85 CLIENT_ON_CHANNEL_CLOSED, 86 CLIENT_ON_CHANNEL_MSGRECEIVED, 87 CLIENT_ON_CHANNEL_QOSEVENT, 88 89 CLIENT_DISCOVERY_SUCC, 90 CLIENT_DISCOVERY_FAIL, 91 CLIENT_DISCOVERY_DEVICE_FOUND, 92 CLIENT_PUBLISH_SUCC, 93 CLIENT_PUBLISH_FAIL, 94 95 CLIENT_ON_JOIN_RESULT, 96 CLIENT_ON_JOIN_METANODE_RESULT, 97 CLIENT_ON_LEAVE_RESULT, 98 CLIENT_ON_LEAVE_METANODE_RESULT, 99 CLIENT_ON_NODE_ONLINE_STATE_CHANGED, 100 CLIENT_ON_NODE_BASIC_INFO_CHANGED, 101 CLIENT_ON_TIME_SYNC_RESULT, 102 CLIENT_ON_PUBLISH_LNN_RESULT, 103 CLIENT_ON_REFRESH_LNN_RESULT, 104 CLIENT_ON_REFRESH_DEVICE_FOUND, 105 CLIENT_ON_PERMISSION_CHANGE, 106 }; 107 108 #ifdef __cplusplus 109 #if __cplusplus 110 } 111 #endif /* __cplusplus */ 112 #endif /* __cplusplus */ 113 114 #endif