1 /* 2 * Copyright (c) 2021 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 54 SERVER_START_DISCOVERY, 55 SERVER_STOP_DISCOVERY, 56 57 SERVER_JOIN_LNN, 58 SERVER_LEAVE_LNN, 59 SERVER_GET_ALL_ONLINE_NODE_INFO, 60 SERVER_GET_LOCAL_DEVICE_INFO, 61 SERVER_GET_NODE_KEY_INFO, 62 SERVER_START_TIME_SYNC, 63 SERVER_STOP_TIME_SYNC, 64 SERVER_PUBLISH_LNN, 65 SERVER_STOP_PUBLISH_LNN, 66 SERVER_REFRESH_LNN, 67 SERVER_STOP_REFRESH_LNN, 68 SERVER_ACTIVE_META_NODE, 69 SERVER_DEACTIVE_META_NODE, 70 SERVER_GET_ALL_META_NODE_INFO, 71 72 CLIENT_ON_CHANNEL_OPENED = 256, 73 CLIENT_ON_CHANNEL_OPENFAILED, 74 CLIENT_ON_CHANNEL_LINKDOWN, 75 CLIENT_ON_CHANNEL_CLOSED, 76 CLIENT_ON_CHANNEL_MSGRECEIVED, 77 CLIENT_ON_CHANNEL_QOSEVENT, 78 79 CLIENT_DISCOVERY_SUCC, 80 CLIENT_DISCOVERY_FAIL, 81 CLIENT_DISCOVERY_DEVICE_FOUND, 82 CLIENT_PUBLISH_SUCC, 83 CLIENT_PUBLISH_FAIL, 84 85 CLIENT_ON_JOIN_RESULT, 86 CLIENT_ON_LEAVE_RESULT, 87 CLIENT_ON_NODE_ONLINE_STATE_CHANGED, 88 CLIENT_ON_NODE_BASIC_INFO_CHANGED, 89 CLIENT_ON_TIME_SYNC_RESULT, 90 CLIENT_ON_PUBLISH_LNN_RESULT, 91 CLIENT_ON_REFRESH_LNN_RESULT, 92 CLIENT_ON_REFRESH_DEVICE_FOUND, 93 }; 94 95 #ifdef __cplusplus 96 #if __cplusplus 97 } 98 #endif /* __cplusplus */ 99 #endif /* __cplusplus */ 100 101 #endif