1/*
2 * Copyright (c) 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/**
17 * @file IWpaInterface.idl
18 *
19 * @brief Provides APIs to enable or disable a WLAN hotspot, scan for hotspots, connect to or disconnect from a WLAN hotspot,
20 * set the country code, and manage network devices.
21 *
22 * @since 5.0
23 * @version 1.1
24 */
25
26package ohos.hdi.wlan.wpa.v1_1;
27
28import ohos.hdi.wlan.wpa.v1_0.IWpaInterface;
29import ohos.hdi.wlan.wpa.v1_1.IWpaCallback;
30
31interface IWpaInterface extends ohos.hdi.wlan.wpa.v1_0.IWpaInterface {
32    /**
33     * @brief send p2p data to wpa.
34     *
35     * @param ifName Indicates the NIC name.
36     * @param cmdType.
37     * @param dataType.
38     * @param carryData.
39     *
40     * @return Returns <b>0</b> if the operation is successful.
41     * @return Returns a negative value if the operation fails.
42     *
43     * @since 5.0
44     * @version 1.1
45     */
46    DeliverP2pData([in] String ifName, [in] int cmdType, [in] int dataType, [in] String carryData);
47
48     /**
49     * @brief Registers a callback to listen for asynchronous events.
50     *
51     * @param cbFunc Indicates the callback to register.
52     * @param ifName Indicates the NIC name.
53     *
54     * @return Returns <b>0</b> if the operation is successful.
55     * @return Returns a negative value if the operation fails.
56     *
57     * @since 5.0
58     * @version 1.0
59     */
60    RegisterWpaEventCallback([in] IWpaCallback cbFunc, [in] String ifName);
61
62    /**
63     * @brief Unregisters a callback.
64     *
65     * @param cbFunc Indicates the callback to unregister.
66     * @param ifName Indicates the NIC name.
67     *
68     * @return Returns <b>0</b> if the operation is successful.
69     * @return Returns a negative value if the operation fails.
70     *
71     * @since 5.0
72     * @version 1.0
73     */
74    UnregisterWpaEventCallback([in] IWpaCallback cbFunc, [in] String ifName);
75}
76