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 SMP_SEND_H
17 #define SMP_SEND_H
18 
19 #include <stdint.h>
20 
21 #include "hci/hci.h"
22 #include "platform/include/list.h"
23 #include "smp_def.h"
24 
25 #ifdef __cplusplus
26 extern "C" {
27 #endif
28 
29 int SMP_SendDistributionKeysToRemote();
30 int SMP_SendHciLeRandCmd(uint16_t step);
31 int SMP_SendLeEncryptCmd(
32     const HciLeEncryptParam *pEncryptParam, uint16_t step, const SMP_EncCmd *pEncCmdData, bool isUsingHw);
33 void SMP_SendDataCallback(uint16_t aclHandle, int result);
34 void SMP_SendPairingResponseCallback(uint16_t aclHandle, int result);
35 void SMP_SendPairingFailedCallback(uint16_t aclHandle, int result);
36 void SMP_SendSecurityRequestCallback(uint16_t aclHandle, int result);
37 void SMP_SendEncryptionInformationCallback(uint16_t aclHandle, int result);
38 void SMP_SendMasterIdentificationCallback(uint16_t aclHandle, int result);
39 void SMP_SendIdentityInformationCallback(uint16_t aclHandle, int result);
40 void SMP_SendIdentityAddressInformationCallback(uint16_t aclHandle, int result);
41 void SMP_SendSigningInformationCallback(uint16_t aclHandle, int result);
42 void SMP_FreeEncCmd(void *encCmd);
43 SMP_EncCmd *SMP_AllocEncCmd();
44 void SMP_EncCmdTimeout(void *param);
45 List *SMP_GetEncCmdList();
46 void SMP_SetEncCmdList(List *list);
47 
48 #ifdef __cplusplus
49 }
50 #endif
51 
52 #endif