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