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 /**
17  * @addtogroup WLAN
18  * @{
19  *
20  * @brief Provides cross-OS migration, component adaptation, and modular assembly and compilation.
21  *
22  * Based on the unified APIs provided by the WLAN module, developers of the Hardware Driver Interface
23  * (HDI) are capable of creating, disabling, scanning for, and connecting to WLAN hotspots, managing WLAN chips,
24  * network devices, and power, and applying for, releasing, and moving network data buffers.
25  *
26  * @since 4.1
27  * @version 1.2
28  */
29 
30 /**
31  * @file wifi_hal_p2p_feature.h
32  *
33  * @brief Declares P2P features.
34  *
35  * @since 4.1
36  * @version 1.2
37  */
38 
39 #ifndef WIFI_HAL_P2P_FEATURE_H
40 #define WIFI_HAL_P2P_FEATURE_H
41 
42 #include "wifi_hal_base_feature.h"
43 
44 #ifdef __cplusplus
45 #if __cplusplus
46 extern "C" {
47 #endif
48 #endif
49 
50 /**
51  * @brief Inherits the basic features of {@link IWiFiBaseFeature} and additionally provides the feature of setting
52  * scanning for a single MAC address.
53  *
54  * @since 4.1
55  * @version 1.2
56  */
57 struct IWiFiP2p {
58     struct IWiFiBaseFeature baseFeature;  /**< Basic features of {@link IWiFiBaseFeature} */
59 };
60 
61 /**
62  * @brief Initializes a specified P2P feature. This function is called during P2P {@link FeatureType} creation.
63  *
64  * @param fe Indicates the double pointer to the P2P feature.
65  *
66  * @return Returns <b>0</b> if the operation is successful; returns a negative value representing {@link HDF_STATUS}
67  * if the operation fails.
68  *
69  * @since 4.1
70  * @version 1.2
71  */
72 int32_t InitP2pFeature(struct IWiFiP2p **fe);
73 
74 #ifdef __cplusplus
75 #if __cplusplus
76 }
77 #endif
78 #endif
79 
80 #endif
81 /** @} */
82