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 BUS_CENTER_SERVER_PROXY_H 17 #define BUS_CENTER_SERVER_PROXY_H 18 19 #include <stdint.h> 20 21 #include "softbus_bus_center.h" 22 23 void BusCenterExProxyDeInit(void); 24 #ifdef __cplusplus 25 #if __cplusplus 26 extern "C" { 27 #endif 28 #endif 29 30 int32_t BusCenterServerProxyInit(void); 31 void BusCenterServerProxyDeInit(void); 32 int32_t ServerIpcGetAllOnlineNodeInfo(const char *pkgName, void **info, uint32_t infoTypeLen, int32_t *infoNum); 33 int32_t ServerIpcGetLocalDeviceInfo(const char *pkgName, void *info, uint32_t infoTypeLen); 34 int32_t ServerIpcGetNodeKeyInfo(const char *pkgName, const char *networkId, int key, unsigned char *buf, uint32_t len); 35 int32_t ServerIpcSetNodeDataChangeFlag(const char *pkgName, const char *networkId, uint16_t dataChangeFlag); 36 int32_t ServerIpcJoinLNN(const char *pkgName, void *addr, unsigned int addrTypeLen); 37 int32_t ServerIpcLeaveLNN(const char *pkgName, const char *networkId); 38 int32_t ServerIpcStartTimeSync(const char *pkgName, const char *targetNetworkId, int32_t accuracy, int32_t period); 39 int32_t ServerIpcStopTimeSync(const char *pkgName, const char *targetNetworkId); 40 int32_t ServerIpcPublishLNN(const char *pkgName, const PublishInfo *info); 41 int32_t ServerIpcStopPublishLNN(const char *pkgName, int32_t publishId); 42 int32_t ServerIpcRefreshLNN(const char *pkgName, const SubscribeInfo *info); 43 int32_t ServerIpcStopRefreshLNN(const char *pkgName, int32_t refreshId); 44 int32_t ServerIpcActiveMetaNode(const char *pkgName, const MetaNodeConfigInfo *info, char *metaNodeId); 45 int32_t ServerIpcDeactiveMetaNode(const char *pkgName, const char *metaNodeId); 46 int32_t ServerIpcGetAllMetaNodeInfo(const char *pkgName, MetaNodeInfo *infos, int32_t *infoNum); 47 int32_t ServerIpcShiftLNNGear(const char *pkgName, const char *callerId, const char *targetNetworkId, 48 const GearMode *mode); 49 50 #ifdef __cplusplus 51 #if __cplusplus 52 } 53 #endif /* __cplusplus */ 54 #endif /* __cplusplus */ 55 56 #endif // !DISC_SERVER_PROXY_H 57