blob: d7c15de9d8c31ff2917b516a5d10cb28ddf4cdc1 [file] [log] [blame]
Nate Jiang3ec67812020-08-24 11:04:31 -07001/*
2 * Copyright 2020 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.5;
18
19import @1.0::CommandIdShort;
20import @1.0::WifiStatus;
21import @1.4::IWifiNanIface;
22import @1.4::NanConfigRequest;
23import @1.4::NanEnableRequest;
24import IWifiNanIfaceEventCallback;
25import NanConfigRequestSupplemental;
26
27/**
28 * Interface used to represent a single NAN (Neighbour Aware Network) iface.
29 *
30 * References to "NAN Spec" are to the Wi-Fi Alliance "Wi-Fi Neighbor Awareness
31 * Networking (NAN) Technical Specification".
32 */
33interface IWifiNanIface extends @1.4::IWifiNanIface {
34 /**
35 * Enable NAN: configures and activates NAN clustering (does not start
36 * a discovery session or set up data-interfaces or data-paths). Use the
37 * |IWifiNanIface.configureRequest| method to change the configuration of an already enabled
38 * NAN interface.
39 * Asynchronous response is with |IWifiNanIfaceEventCallback.notifyEnableResponse|.
40 *
41 * Note: supersedes the @1.4::IWifiNanIface.enableRequest() method which is deprecated as of
42 * HAL version 1.5.
43 *
44 * @param cmdId command Id to use for this invocation.
45 * @param msg1 Instance of |NanEnableRequest|.
46 * @param msg2 Instance of |NanConfigRequestSupplemental|.
47 * @return status WifiStatus of the operation.
48 * Possible status codes:
49 * |WifiStatusCode.SUCCESS|,
50 * |WifiStatusCode.ERROR_NOT_SUPPORTED|,
51 * |WifiStatusCode.ERROR_WIFI_IFACE_INVALID|,
52 * |WifiStatusCode.ERROR_INVALID_ARGS|,
53 * |WifiStatusCode.ERROR_UNKNOWN|
54 */
55 enableRequest_1_5(CommandIdShort cmdId, NanEnableRequest msg1,
56 NanConfigRequestSupplemental msg2) generates (WifiStatus status);
57
58 /**
59 * Configure NAN: configures an existing NAN functionality (i.e. assumes
60 * |IWifiNanIface.enableRequest| already submitted and succeeded).
61 * Asynchronous response is with |IWifiNanIfaceEventCallback.notifyConfigResponse|.
62 *
63 * Note: supersedes the @1.4::IWifiNanIface.configRequest() method which is deprecated as of
64 * HAL version 1.5.
65 *
66 * @param cmdId command Id to use for this invocation.
67 * @param msg1 Instance of |NanConfigRequest|.
68 * @param msg2 Instance of |NanConfigRequestSupplemental|.
69 * @return status WifiStatus of the operation.
70 * Possible status codes:
71 * |WifiStatusCode.SUCCESS|,
72 * |WifiStatusCode.ERROR_NOT_SUPPORTED|,
73 * |WifiStatusCode.ERROR_WIFI_IFACE_INVALID|,
74 * |WifiStatusCode.ERROR_INVALID_ARGS|,
75 * |WifiStatusCode.ERROR_UNKNOWN|
76 */
77 configRequest_1_5(CommandIdShort cmdId, NanConfigRequest msg1,
78 NanConfigRequestSupplemental msg2) generates (WifiStatus status);
79
80 /**
81 * Requests notifications of significant events on this iface. Multiple calls
82 * to this must register multiple callbacks each of which must receive all
83 * events.
84 *
85 * Note: supersedes the @1.2::IWifiNanIface.registerEventCallback() method which is deprecated
86 * as of HAL version 1.5.
87 *
88 * @param callback An instance of the |IWifiNanIfaceEventCallback| HIDL interface
89 * object.
90 * @return status WifiStatus of the operation.
91 * Possible status codes:
92 * |WifiStatusCode.SUCCESS|,
93 * |WifiStatusCode.ERROR_WIFI_IFACE_INVALID|
94 */
Roshan Piuse9d1e7d2020-11-04 11:44:16 -080095 registerEventCallback_1_5(IWifiNanIfaceEventCallback callback) generates (WifiStatus status);
Nate Jiang3ec67812020-08-24 11:04:31 -070096
97 /**
98 * Get NAN capabilities. Asynchronous response is with
99 * |IWifiNanIfaceEventCallback.notifyCapabilitiesResponse|.
Roshan Piuse9d1e7d2020-11-04 11:44:16 -0800100 *
Nate Jiang3ec67812020-08-24 11:04:31 -0700101 * Note: supersedes the @1.0::IWifiNanIface.getCapabilitiesRequest() method which is deprecated
102 * as of HAL version 1.5.
103 *
104 * @param cmdId command Id to use for this invocation.
105 * @return status WifiStatus of the operation.
106 * Possible status codes:
107 * |WifiStatusCode.SUCCESS|,
108 * |WifiStatusCode.ERROR_WIFI_IFACE_INVALID|,
109 * |WifiStatusCode.ERROR_UNKNOWN|
110 */
Roshan Piuse9d1e7d2020-11-04 11:44:16 -0800111 getCapabilitiesRequest_1_5(CommandIdShort cmdId) generates (WifiStatus status);
112};