blob: 450fba06744631e92cec5a7320b6f81191497865 [file] [log] [blame]
Roshan Piusadcfba42016-10-05 10:19:06 -07001/*
2 * Copyright 2016 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.0;
18
19import IWifiIface;
Roshan Pius120f94c2016-10-13 11:48:42 -070020import IWifiNanIfaceEventCallback;
Roshan Piusadcfba42016-10-05 10:19:06 -070021
22/**
Roshan Pius120f94c2016-10-13 11:48:42 -070023 * Interface used to represent a single NAN(Neighbour Aware Network) iface.
Roshan Piusadcfba42016-10-05 10:19:06 -070024 */
25interface IWifiNanIface extends IWifiIface {
Roshan Pius120f94c2016-10-13 11:48:42 -070026 /**
27 * Requests notifications of significant events on this iface. Multiple calls
28 * to this must register multiple callbacks each of which must receive all
29 * events.
30 *
31 * @param callback An instance of the |IWifiNanIfaceEventCallback| HIDL interface
32 * object.
33 * @return status WifiStatus of the operation.
34 * Possible status codes:
35 * |WifiStatusCode.SUCCESS|,
36 * |WifiStatusCode.ERROR_WIFI_IFACE_INVALID|
37 */
38 registerEventCallback(IWifiNanIfaceEventCallback callback)
39 generates (WifiStatus status);
40
41 /**
Etan Cohenf01bcaa2016-12-25 09:42:21 -080042 * Get NAN capabilities.
43 *
44 * @param cmdId command Id to use for this invocation.
45 * @return status WifiStatus of the operation.
46 * Possible status codes:
47 * |WifiStatusCode.SUCCESS|,
48 * |WifiStatusCode.ERROR_WIFI_IFACE_INVALID|,
49 * |WifiStatusCode.ERROR_UNKNOWN|
50 */
51 getCapabilitiesRequest(CommandIdShort cmdId) generates (WifiStatus status);
52
53 /**
54 * Enable NAN: configures and activates NAN clustering (does not start
55 * a discovery session or set up data-interfaces or data-paths). Use the
56 * |configureRequest| method to change the configuration of an already enabled
57 * NAN interface.
Roshan Pius120f94c2016-10-13 11:48:42 -070058 *
59 * @param cmdId command Id to use for this invocation.
60 * @param msg Instance of |NanEnableRequest|.
61 * @return status WifiStatus of the operation.
62 * Possible status codes:
63 * |WifiStatusCode.SUCCESS|,
64 * |WifiStatusCode.ERROR_WIFI_IFACE_INVALID|,
65 * |WifiStatusCode.ERROR_INVALID_ARGS|,
66 * |WifiStatusCode.ERROR_UNKNOWN|
67 */
Etan Cohenf01bcaa2016-12-25 09:42:21 -080068 enableRequest(CommandIdShort cmdId, NanEnableRequest msg)
69 generates (WifiStatus status);
70
71 /**
72 * Configure NAN: configures an existing NAN functionality (i.e. assumes
73 * |enableRequest| already submitted and succeeded).
74 *
75 * @param cmdId command Id to use for this invocation.
76 * @param msg Instance of |NanConfigRequest|.
77 * @return status WifiStatus of the operation.
78 * Possible status codes:
79 * |WifiStatusCode.SUCCESS|,
80 * |WifiStatusCode.ERROR_WIFI_IFACE_INVALID|,
81 * |WifiStatusCode.ERROR_INVALID_ARGS|,
82 * |WifiStatusCode.ERROR_UNKNOWN|
83 */
84 configRequest(CommandIdShort cmdId, NanConfigRequest msg)
Roshan Pius120f94c2016-10-13 11:48:42 -070085 generates (WifiStatus status);
86
87 /**
88 * Disable NAN functionality.
89 *
90 * @param cmdId command Id to use for this invocation.
91 * @return status WifiStatus of the operation.
92 * Possible status codes:
93 * |WifiStatusCode.SUCCESS|,
94 * |WifiStatusCode.ERROR_WIFI_IFACE_INVALID|,
95 * |WifiStatusCode.ERROR_UNKNOWN|
96 */
Etan Cohenf01bcaa2016-12-25 09:42:21 -080097 disableRequest(CommandIdShort cmdId) generates (WifiStatus status);
Roshan Pius120f94c2016-10-13 11:48:42 -070098
99 /**
Etan Cohenf01bcaa2016-12-25 09:42:21 -0800100 * Publish request to start advertising a discovery service.
Roshan Pius120f94c2016-10-13 11:48:42 -0700101 *
102 * @param cmdId command Id to use for this invocation.
103 * @param msg Instance of |NanPublishRequest|.
104 * @return status WifiStatus of the operation.
105 * Possible status codes:
106 * |WifiStatusCode.SUCCESS|,
107 * |WifiStatusCode.ERROR_WIFI_IFACE_INVALID|,
108 * |WifiStatusCode.ERROR_INVALID_ARGS|,
109 * |WifiStatusCode.ERROR_UNKNOWN|
110 */
Etan Cohenf01bcaa2016-12-25 09:42:21 -0800111 startPublishRequest(CommandIdShort cmdId, NanPublishRequest msg)
Roshan Pius120f94c2016-10-13 11:48:42 -0700112 generates (WifiStatus status);
113
114 /**
Etan Cohenf01bcaa2016-12-25 09:42:21 -0800115 * Stop publishing a discovery service.
Roshan Pius120f94c2016-10-13 11:48:42 -0700116 *
117 * @param cmdId command Id to use for this invocation.
Etan Cohenf01bcaa2016-12-25 09:42:21 -0800118 * @param sessionId ID of the publish discovery session to be stopped.
Roshan Pius120f94c2016-10-13 11:48:42 -0700119 * @return status WifiStatus of the operation.
120 * Possible status codes:
121 * |WifiStatusCode.SUCCESS|,
122 * |WifiStatusCode.ERROR_WIFI_IFACE_INVALID|,
Roshan Pius120f94c2016-10-13 11:48:42 -0700123 * |WifiStatusCode.ERROR_UNKNOWN|
124 */
Etan Cohen073bb992017-02-09 10:05:59 -0800125 stopPublishRequest(CommandIdShort cmdId, uint8_t sessionId)
Roshan Pius120f94c2016-10-13 11:48:42 -0700126 generates (WifiStatus status);
127
128 /**
Etan Cohenf01bcaa2016-12-25 09:42:21 -0800129 * Subscribe request to start searching for a discovery service.
Roshan Pius120f94c2016-10-13 11:48:42 -0700130 *
131 * @param cmdId command Id to use for this invocation.
132 * @param msg Instance of |NanSubscribeRequest|.
133 * @return status WifiStatus of the operation.
134 * Possible status codes:
135 * |WifiStatusCode.SUCCESS|,
136 * |WifiStatusCode.ERROR_WIFI_IFACE_INVALID|,
137 * |WifiStatusCode.ERROR_INVALID_ARGS|,
138 * |WifiStatusCode.ERROR_UNKNOWN|
139 */
Etan Cohenf01bcaa2016-12-25 09:42:21 -0800140 startSubscribeRequest(CommandIdShort cmdId, NanSubscribeRequest msg)
Roshan Pius120f94c2016-10-13 11:48:42 -0700141 generates (WifiStatus status);
142
143 /**
Etan Cohenf01bcaa2016-12-25 09:42:21 -0800144 * Stop subscribing to a discovery service.
Roshan Pius120f94c2016-10-13 11:48:42 -0700145 *
146 * @param cmdId command Id to use for this invocation.
Etan Cohenf01bcaa2016-12-25 09:42:21 -0800147 * @param sessionId ID of the subscribe discovery session to be stopped.
Roshan Pius120f94c2016-10-13 11:48:42 -0700148 * @return status WifiStatus of the operation.
149 * Possible status codes:
150 * |WifiStatusCode.SUCCESS|,
151 * |WifiStatusCode.ERROR_WIFI_IFACE_INVALID|,
Roshan Pius120f94c2016-10-13 11:48:42 -0700152 * |WifiStatusCode.ERROR_UNKNOWN|
153 */
Etan Cohen073bb992017-02-09 10:05:59 -0800154 stopSubscribeRequest(CommandIdShort cmdId, uint8_t sessionId)
Roshan Pius120f94c2016-10-13 11:48:42 -0700155 generates (WifiStatus status);
156
157 /**
Etan Cohenf01bcaa2016-12-25 09:42:21 -0800158 * NAN transmit follow up message request.
Roshan Pius120f94c2016-10-13 11:48:42 -0700159 *
160 * @param cmdId command Id to use for this invocation.
161 * @param msg Instance of |NanTransmitFollowupRequest|.
162 * @return status WifiStatus of the operation.
163 * Possible status codes:
164 * |WifiStatusCode.SUCCESS|,
165 * |WifiStatusCode.ERROR_WIFI_IFACE_INVALID|,
166 * |WifiStatusCode.ERROR_INVALID_ARGS|,
167 * |WifiStatusCode.ERROR_UNKNOWN|
168 */
Etan Cohenf01bcaa2016-12-25 09:42:21 -0800169 transmitFollowupRequest(CommandIdShort cmdId, NanTransmitFollowupRequest msg)
Roshan Pius120f94c2016-10-13 11:48:42 -0700170 generates (WifiStatus status);
171
172 /**
Etan Cohenf01bcaa2016-12-25 09:42:21 -0800173 * Create a NAN Data Interface.
Roshan Pius120f94c2016-10-13 11:48:42 -0700174 *
175 * @param cmdId command Id to use for this invocation.
Etan Cohenf01bcaa2016-12-25 09:42:21 -0800176 * @return status WifiStatus of the operation.
177 * Possible status codes:
178 * |WifiStatusCode.SUCCESS|,
179 * |WifiStatusCode.ERROR_WIFI_IFACE_INVALID|,
180 * |WifiStatusCode.ERROR_UNKNOWN|
181 */
182 createDataInterfaceRequest(CommandIdShort cmdId, string ifaceName)
183 generates (WifiStatus status);
184
185 /**
186 * Delete a NAN Data Interface.
187 *
188 * @param cmdId command Id to use for this invocation.
189 * @return status WifiStatus of the operation.
190 * Possible status codes:
191 * |WifiStatusCode.SUCCESS|,
192 * |WifiStatusCode.ERROR_WIFI_IFACE_INVALID|,
193 * |WifiStatusCode.ERROR_UNKNOWN|
194 */
195 deleteDataInterfaceRequest(CommandIdShort cmdId, string ifaceName)
196 generates (WifiStatus status);
197
198 /**
199 * Initiate a data-path (NDP) setup operation: Initiator.
200 *
201 * @param cmdId command Id to use for this invocation.
202 * @param msg Instance of |NanInitiateDataPathRequest|.
Roshan Pius120f94c2016-10-13 11:48:42 -0700203 * @return status WifiStatus of the operation.
204 * Possible status codes:
205 * |WifiStatusCode.SUCCESS|,
206 * |WifiStatusCode.ERROR_WIFI_IFACE_INVALID|,
207 * |WifiStatusCode.ERROR_INVALID_ARGS|,
208 * |WifiStatusCode.ERROR_UNKNOWN|
209 */
Etan Cohenf01bcaa2016-12-25 09:42:21 -0800210 initiateDataPathRequest(CommandIdShort cmdId, NanInitiateDataPathRequest msg)
Roshan Pius120f94c2016-10-13 11:48:42 -0700211 generates (WifiStatus status);
212
213 /**
Etan Cohenf01bcaa2016-12-25 09:42:21 -0800214 * Respond to a received data indication as part of a data-path (NDP) setup operation. An
215 * indication is received by the Responder from the Initiator.
216 *
217 * @param cmdId command Id to use for this invocation.
218 * @param msg Instance of |NanRespondToDataPathIndicationRequest|.
219 * @return status WifiStatus of the operation.
220 * Possible status codes:
221 * |WifiStatusCode.SUCCESS|,
222 * |WifiStatusCode.ERROR_WIFI_IFACE_INVALID|,
223 * |WifiStatusCode.ERROR_INVALID_ARGS|,
224 * |WifiStatusCode.ERROR_UNKNOWN|
225 */
226 respondToDataPathIndicationRequest(CommandIdShort cmdId,
227 NanRespondToDataPathIndicationRequest msg)
228 generates (WifiStatus status);
229
230 /**
231 * Data-path (NDP) termination request: executed by either Initiator or Responder.
232 *
233 * @param cmdId command Id to use for this invocation.
234 * @param ndpInstanceId Data-path instance ID to be terminated.
235 * @return status WifiStatus of the operation.
236 * Possible status codes:
237 * |WifiStatusCode.SUCCESS|,
238 * |WifiStatusCode.ERROR_WIFI_IFACE_INVALID|,
239 * |WifiStatusCode.ERROR_UNKNOWN|
240 */
241 terminateDataPathRequest(CommandIdShort cmdId, uint32_t ndpInstanceId)
242 generates (WifiStatus status);
Roshan Piusadcfba42016-10-05 10:19:06 -0700243};