1 /* 2 * Copyright (c) 2021-2024 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 BUS_CENTER_SERVER_PROXY_H 17 #define BUS_CENTER_SERVER_PROXY_H 18 19 #include <stdint.h> 20 21 #include "ble_range.h" 22 #include "data_level.h" 23 #include "softbus_bus_center.h" 24 25 void BusCenterExProxyDeInit(void); 26 #ifdef __cplusplus 27 #if __cplusplus 28 extern "C" { 29 #endif 30 #endif 31 32 int32_t BusCenterServerProxyInit(void); 33 void BusCenterServerProxyDeInit(void); 34 int32_t ServerIpcGetAllOnlineNodeInfo(const char *pkgName, void **info, uint32_t infoTypeLen, int32_t *infoNum); 35 int32_t ServerIpcGetLocalDeviceInfo(const char *pkgName, void *info, uint32_t infoTypeLen); 36 int32_t ServerIpcGetNodeKeyInfo(const char *pkgName, const char *networkId, int32_t key, unsigned char *buf, 37 uint32_t len); 38 int32_t ServerIpcSetNodeDataChangeFlag(const char *pkgName, const char *networkId, uint16_t dataChangeFlag); 39 int32_t ServerIpcRegDataLevelChangeCb(const char *pkgName); 40 int32_t ServerIpcUnregDataLevelChangeCb(const char *pkgName); 41 int32_t ServerIpcSetDataLevel(const DataLevel *dataLevel); 42 int32_t ServerIpcRegBleRangeCb(const char *pkgName); 43 int32_t ServerIpcUnregBleRangeCb(const char *pkgName); 44 int32_t ServerIpcJoinLNN(const char *pkgName, void *addr, uint32_t addrTypeLen, bool isForceJoin); 45 int32_t ServerIpcLeaveLNN(const char *pkgName, const char *networkId); 46 int32_t ServerIpcStartTimeSync(const char *pkgName, const char *targetNetworkId, int32_t accuracy, int32_t period); 47 int32_t ServerIpcStopTimeSync(const char *pkgName, const char *targetNetworkId); 48 int32_t ServerIpcPublishLNN(const char *pkgName, const PublishInfo *info); 49 int32_t ServerIpcStopPublishLNN(const char *pkgName, int32_t publishId); 50 int32_t ServerIpcRefreshLNN(const char *pkgName, const SubscribeInfo *info); 51 int32_t ServerIpcStopRefreshLNN(const char *pkgName, int32_t refreshId); 52 int32_t ServerIpcActiveMetaNode(const char *pkgName, const MetaNodeConfigInfo *info, char *metaNodeId); 53 int32_t ServerIpcDeactiveMetaNode(const char *pkgName, const char *metaNodeId); 54 int32_t ServerIpcGetAllMetaNodeInfo(const char *pkgName, MetaNodeInfo *infos, int32_t *infoNum); 55 int32_t ServerIpcShiftLNNGear(const char *pkgName, const char *callerId, const char *targetNetworkId, 56 const GearMode *mode); 57 int32_t ServerIpcTriggerHbForMeasureDistance(const char *pkgName, const char *callerId, const HbMode *mode); 58 int32_t ServerIpcSyncTrustedRelationShip(const char *pkgName, const char *msg, uint32_t msgLen); 59 int32_t ServerIpcSetDisplayName(const char *pkgName, const char *nameData, uint32_t len); 60 61 #ifdef __cplusplus 62 #if __cplusplus 63 } 64 #endif /* __cplusplus */ 65 #endif /* __cplusplus */ 66 67 #endif // BUS_CENTER_SERVER_PROXY_H 68