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_CLIENT_PROXY_H 17 #define BUS_CENTER_CLIENT_PROXY_H 18 19 #include <stdint.h> 20 #include "softbus_bus_center.h" 21 #include "data_level_inner.h" 22 23 #ifdef __cplusplus 24 #if __cplusplus 25 extern "C" { 26 #endif 27 #endif 28 29 #define PKG_NAME_SIZE_MAX 65 30 31 typedef struct { 32 char pkgName[PKG_NAME_SIZE_MAX]; 33 int32_t pid; 34 } PkgNameAndPidInfo; 35 36 int32_t ClientOnJoinLNNResult(PkgNameAndPidInfo *info, void *addr, uint32_t addrTypeLen, 37 const char *networkId, int32_t retCode); 38 int32_t ClientOnLeaveLNNResult(const char *pkgName, int32_t pid, const char *networkId, int32_t retCode); 39 int32_t ClinetOnNodeOnlineStateChanged(bool isOnline, void *info, uint32_t infoTypeLen); 40 int32_t ClinetOnNodeBasicInfoChanged(void *info, uint32_t infoTypeLen, int32_t type); 41 int32_t ClientOnNodeStatusChanged(void *info, uint32_t infoTypeLen, int32_t type); 42 int32_t ClinetOnLocalNetworkIdChanged(void); 43 int32_t ClinetNotifyDeviceNotTrusted(const char *msg); 44 int32_t ClientNotifyHichainProofException( 45 const char *proofInfo, uint32_t proofLen, uint16_t deviceTypeId, int32_t errCode); 46 int32_t ClientOnTimeSyncResult( 47 const char *pkgName, int32_t pid, const void *info, uint32_t infoTypeLen, int32_t retCode); 48 int32_t ClientOnPublishLNNResult(const char *pkgName, int32_t pid, int32_t publishId, int32_t reason); 49 int32_t ClientOnRefreshLNNResult(const char *pkgName, int32_t pid, int32_t refreshId, int32_t reason); 50 int32_t ClientOnRefreshDeviceFound(const char *pkgName, int32_t pid, const void *device, uint32_t deviceLen); 51 int32_t ClientOnDataLevelChanged(const char *pkgName, int32_t pid, const char *networkId, 52 const DataLevelInfo *dataLevelInfo); 53 54 #ifdef __cplusplus 55 #if __cplusplus 56 } 57 #endif /* __cplusplus */ 58 #endif /* __cplusplus */ 59 60 #endif 61