1/*
2 * Copyright 2022 The Android Open Source Project
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 *      http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16
17package android.hardware.wifi@1.6;
18
19import @1.0::CommandIdShort;
20import @1.0::WifiNanStatus;
21import @1.5::IWifiNanIfaceEventCallback;
22
23/**
24 * NAN Response and Asynchronous Event Callbacks.
25 *
26 * References to "NAN Spec" are to the Wi-Fi Alliance "Wi-Fi Neighbor Awareness
27 * Networking (NAN) Technical Specification".
28 */
29interface IWifiNanIfaceEventCallback extends @1.5::IWifiNanIfaceEventCallback {
30    /**
31     * Asynchronous callback indicating a data-path (NDP) setup has been completed: received by
32     * both Initiator and Responder.
33     *
34     * Note: supersedes the @1.0::IWifiNanIfaceEventCallback.eventDataPathConfirm() method which is
35     * deprecated as of HAL version 1.2.
36     *
37     * @param event: NanDataPathConfirmInd containing event details.
38     */
39    oneway eventDataPathConfirm_1_6(NanDataPathConfirmInd event);
40
41    /**
42     * Asynchronous callback indicating a data-path (NDP) schedule has been updated (e.g. channels
43     * have been changed).
44     *
45     * @param event: NanDataPathScheduleUpdateInd containing event details.
46     */
47    oneway eventDataPathScheduleUpdate_1_6(NanDataPathScheduleUpdateInd event);
48
49    /**
50     * Asynchronous callback indicating that a match has occurred: i.e. a service has been
51     * discovered.
52     *
53     * Note: supersedes the @1.0::IWifiNanIfaceEventCallback.eventMatch(NanMatchInd event) method
54     * which is deprecated as of HAL version 1.6.
55     *
56     * @param event: NanMatchInd containing event details.
57     */
58    oneway eventMatch_1_6(NanMatchInd event);
59
60    /**
61     * Asynchronous callback invoked in response to a capability request
62     * |IWifiNanIface.getCapabilitiesRequest|.
63     *
64     * Note: supersedes the @1.5::IWifiNanIfaceEventCallback.notifyCapabilitiesResponse() method
65     * which is deprecated as of HAL version 1.6.
66     *
67     * @param cmdId command Id corresponding to the original request.
68     * @param status WifiNanStatus of the operation. Possible status codes are:
69     *        |NanStatusType.SUCCESS|
70     * @param capabilities Capability data.
71     */
72    oneway notifyCapabilitiesResponse_1_6(CommandIdShort id, WifiNanStatus status,
73        NanCapabilities capabilities);
74};
75