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 #ifndef AVCTP_GAP_H
16 #define AVCTP_GAP_H
17 #include "avctp_int.h"
18 #include "gap_if.h"
19 #ifdef __cplusplus
20 extern "C" {
21 #endif
22 
23 typedef struct {
24     uint16_t result;
25     GapServiceSecurityInfo serviceInfo;
26     void *context;
27 } AvctSecurityResultCallbackTskParam;
28 
29 typedef struct {
30     uint16_t result;
31     GapServiceSecurityInfo serviceInfo;
32     void *context;
33 } AvctRevConnSecurityResultCallbackTskParam;
34 
35 extern void AvctRequestSecurity(const AvctCbDev *cbDev, GAP_Service serviceId, uint16_t psm);
36 extern void AvctRequestSecurityBy(
37     const uint16_t aclHandle, const BtAddr addr, const uint16_t lcid, const uint8_t id, const uint16_t lpsm);
38 
39 void AvctSecurityResultCallback(uint16_t result, GapServiceSecurityInfo serviceInfo, void *context);
40 void AvctSecurityResultCallbackTsk(void *context);
41 void AvctSecurityResult(uint16_t result, GapServiceSecurityInfo serviceInfo, void *context);
42 
43 void AvctRevConnSecurityResultCallback(uint16_t result, GapServiceSecurityInfo serviceInfo, void *context);
44 void AvctRevConnSecurityResultCallbackTsk(void *context);
45 void AvctRevConnSecurityResult(uint16_t result, GapServiceSecurityInfo serviceInfo, void *context);
46 
47 #ifdef __cplusplus
48 }
49 #endif
50 #endif /* AVCTP_GAP_H */