1 /* 2 * Copyright (c) 2022 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 #ifndef DSOFTBUS_ENHANCE_INTERFACE_H 16 #define DSOFTBUS_ENHANCE_INTERFACE_H 17 18 #include "auth_device_common_key_struct.h" 19 #include "cJSON.h" 20 #include "lnn_node_info_struct.h" 21 #include "lnn_data_cloud_sync_struct.h" 22 #include "lnn_fast_offline_struct.h" 23 #include "lnn_sync_info_manager_struct.h" 24 #include "stdint.h" 25 #include "stdbool.h" 26 #include "lnn_lane_power_control_struct.h" 27 #include "lnn_cipherkey_manager_struct.h" 28 #include "auth_interface_struct.h" 29 30 #ifdef __cplusplus 31 #if __cplusplus 32 extern "C" { 33 #endif 34 #endif 35 36 int32_t LnnRetrieveDeviceInfo(const char *udid, NodeInfo *deviceInfo); 37 bool IsCipherManagerFindKey(const char *udid); 38 int32_t AuthFindDeviceKey(const char *udidHash, int32_t keyType, AuthDeviceKeyInfo *deviceKey); 39 int32_t AuthFindLatestNormalizeKey( 40 const char *udidHash, AuthDeviceKeyInfo *deviceKey, bool clearOldKey); 41 int32_t LnnUpdateRemoteDeviceInfo(const NodeInfo *deviceInfo); 42 int32_t LnnRegistBleHeartbeatMediumMgr(void); 43 bool IsCloudSyncEnabled(void); 44 int32_t LnnGetLocalCacheNodeInfo(NodeInfo *info); 45 int32_t LnnSaveRemoteDeviceInfo(const NodeInfo *deviceInfo); 46 int32_t LnnUnPackCloudSyncDeviceInfo(cJSON *json, NodeInfo *cloudSyncInfo); 47 int32_t LnnGetLocalBroadcastCipherInfo(CloudSyncInfo *info); 48 int32_t LnnPackCloudSyncDeviceInfo(cJSON *json, const NodeInfo *cloudSyncInfo); 49 int32_t LnnRegisterBleLpDeviceMediumMgr(void); 50 int32_t LnnInitQos(void); 51 int32_t LnnInitFastOffline(void); 52 int32_t LnnSendNotTrustedInfo(const NotTrustedDelayInfo *info, uint32_t num, LnnSyncInfoMsgComplete complete); 53 int32_t LnnInitMetaNode(void); 54 int32_t LnnGetLocalDefaultPtkByUuid(const char *uuid, char *localPtk, uint32_t len); 55 int32_t LnnGetRemoteDefaultPtkByUuid(const char *uuid, char *remotePtk, uint32_t len); 56 int32_t EnablePowerControl(const WifiDirectLinkInfo *wifiDirectInfo); 57 int32_t LnnGetLocalBroadcastCipherKey(BroadcastCipherKey *broadcastKey); 58 int32_t LnnLoadLocalBroadcastCipherKey(void); 59 int32_t AuthMetaPostTransData(int64_t authId, const AuthTransData *dataInfo); 60 int32_t AuthMetaGetServerSide(int64_t authId, bool *isServer); 61 int32_t LnnGetLocalPtkByUuid(const char *uuid, char *localPtk, uint32_t len); 62 63 #ifdef __cplusplus 64 #if __cplusplus 65 } 66 #endif /* __cplusplus */ 67 #endif /* __cplusplus */ 68 69 #endif