OSDN Git Service

Move hidl shims to the vendor partition.
[android-x86/hardware-interfaces.git] / wifi / 1.0 / IWifiNanIface.hal
1 /*
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
17 package android.hardware.wifi@1.0;
18
19 import IWifiIface;
20 import IWifiNanIfaceEventCallback;
21
22 /**
23  * Interface used to represent a single NAN(Neighbour Aware Network) iface.
24  *
25  * References to "NAN Spec" are to the Wi-Fi Alliance "Wi-Fi Neighbor Awareness
26  * Networking (NAN) Technical Specification".
27  */
28 interface IWifiNanIface extends IWifiIface {
29   /**
30    * Requests notifications of significant events on this iface. Multiple calls
31    * to this must register multiple callbacks each of which must receive all
32    * events.
33    *
34    * @param callback An instance of the |IWifiNanIfaceEventCallback| HIDL interface
35    *        object.
36    * @return status WifiStatus of the operation.
37    *         Possible status codes:
38    *         |WifiStatusCode.SUCCESS|,
39    *         |WifiStatusCode.ERROR_WIFI_IFACE_INVALID|
40    */
41   registerEventCallback(IWifiNanIfaceEventCallback callback)
42       generates (WifiStatus status);
43
44   /**
45    * Get NAN capabilities. Asynchronous response is with
46    * |IWifiNanIfaceEventCallback.notifyCapabilitiesResponse|.
47    *
48    * @param cmdId command Id to use for this invocation.
49    * @return status WifiStatus of the operation.
50    *         Possible status codes:
51    *         |WifiStatusCode.SUCCESS|,
52    *         |WifiStatusCode.ERROR_WIFI_IFACE_INVALID|,
53    *         |WifiStatusCode.ERROR_UNKNOWN|
54    */
55   getCapabilitiesRequest(CommandIdShort cmdId) generates (WifiStatus status);
56
57   /**
58    * Enable NAN: configures and activates NAN clustering (does not start
59    * a discovery session or set up data-interfaces or data-paths). Use the
60    * |IWifiNanIface.configureRequest| method to change the configuration of an already enabled
61    * NAN interface.
62    * Asynchronous response is with |IWifiNanIfaceEventCallback.notifyEnableResponse|.
63    *
64    * @param cmdId command Id to use for this invocation.
65    * @param msg Instance of |NanEnableRequest|.
66    * @return status WifiStatus of the operation.
67    *         Possible status codes:
68    *         |WifiStatusCode.SUCCESS|,
69    *         |WifiStatusCode.ERROR_WIFI_IFACE_INVALID|,
70    *         |WifiStatusCode.ERROR_INVALID_ARGS|,
71    *         |WifiStatusCode.ERROR_UNKNOWN|
72    */
73   enableRequest(CommandIdShort cmdId, NanEnableRequest msg)
74       generates (WifiStatus status);
75
76   /**
77    * Configure NAN: configures an existing NAN functionality (i.e. assumes
78    * |IWifiNanIface.enableRequest| already submitted and succeeded).
79    * Asynchronous response is with |IWifiNanIfaceEventCallback.notifyConfigResponse|.
80    *
81    * @param cmdId command Id to use for this invocation.
82    * @param msg Instance of |NanConfigRequest|.
83    * @return status WifiStatus of the operation.
84    *         Possible status codes:
85    *         |WifiStatusCode.SUCCESS|,
86    *         |WifiStatusCode.ERROR_WIFI_IFACE_INVALID|,
87    *         |WifiStatusCode.ERROR_INVALID_ARGS|,
88    *         |WifiStatusCode.ERROR_UNKNOWN|
89    */
90   configRequest(CommandIdShort cmdId, NanConfigRequest msg)
91       generates (WifiStatus status);
92
93   /**
94    * Disable NAN functionality.
95    * Asynchronous response is with |IWifiNanIfaceEventCallback.notifyDisableResponse|.
96    *
97    * @param cmdId command Id to use for this invocation.
98    * @return status WifiStatus of the operation.
99    *         Possible status codes:
100    *         |WifiStatusCode.SUCCESS|,
101    *         |WifiStatusCode.ERROR_WIFI_IFACE_INVALID|,
102    *         |WifiStatusCode.ERROR_UNKNOWN|
103    */
104   disableRequest(CommandIdShort cmdId) generates (WifiStatus status);
105
106   /**
107    * Publish request to start advertising a discovery service.
108    * Asynchronous response is with |IWifiNanIfaceEventCallback.notifyStartPublishResponse|.
109    *
110    * @param cmdId command Id to use for this invocation.
111    * @param msg Instance of |NanPublishRequest|.
112    * @return status WifiStatus of the operation.
113    *         Possible status codes:
114    *         |WifiStatusCode.SUCCESS|,
115    *         |WifiStatusCode.ERROR_WIFI_IFACE_INVALID|,
116    *         |WifiStatusCode.ERROR_INVALID_ARGS|,
117    *         |WifiStatusCode.ERROR_UNKNOWN|
118    */
119   startPublishRequest(CommandIdShort cmdId, NanPublishRequest msg)
120       generates (WifiStatus status);
121
122   /**
123    * Stop publishing a discovery service.
124    * Asynchronous response is with |IWifiNanIfaceEventCallback.notifyStopPublishResponse|.
125    *
126    * @param cmdId command Id to use for this invocation.
127    * @param sessionId ID of the publish discovery session to be stopped.
128    * @return status WifiStatus of the operation.
129    *         Possible status codes:
130    *         |WifiStatusCode.SUCCESS|,
131    *         |WifiStatusCode.ERROR_WIFI_IFACE_INVALID|,
132    *         |WifiStatusCode.ERROR_UNKNOWN|
133    */
134   stopPublishRequest(CommandIdShort cmdId, uint8_t sessionId)
135       generates (WifiStatus status);
136
137   /**
138    * Subscribe request to start searching for a discovery service.
139    * Asynchronous response is with |IWifiNanIfaceEventCallback.notifyStartSubscribeResponse|.
140    *
141    * @param cmdId command Id to use for this invocation.
142    * @param msg Instance of |NanSubscribeRequest|.
143    * @return status WifiStatus of the operation.
144    *         Possible status codes:
145    *         |WifiStatusCode.SUCCESS|,
146    *         |WifiStatusCode.ERROR_WIFI_IFACE_INVALID|,
147    *         |WifiStatusCode.ERROR_INVALID_ARGS|,
148    *         |WifiStatusCode.ERROR_UNKNOWN|
149    */
150   startSubscribeRequest(CommandIdShort cmdId, NanSubscribeRequest msg)
151       generates (WifiStatus status);
152
153   /**
154    * Stop subscribing to a discovery service.
155    * Asynchronous response is with |IWifiNanIfaceEventCallback.notifyStopSubscribeResponse|.
156    *
157    * @param cmdId command Id to use for this invocation.
158    * @param sessionId ID of the subscribe discovery session to be stopped.
159    * @return status WifiStatus of the operation.
160    *         Possible status codes:
161    *         |WifiStatusCode.SUCCESS|,
162    *         |WifiStatusCode.ERROR_WIFI_IFACE_INVALID|,
163    *         |WifiStatusCode.ERROR_UNKNOWN|
164    */
165   stopSubscribeRequest(CommandIdShort cmdId, uint8_t sessionId)
166       generates (WifiStatus status);
167
168   /**
169    * NAN transmit follow up message request.
170    * Asynchronous response is with |IWifiNanIfaceEventCallback.notifyTransmitFollowupResponse|.
171    *
172    * @param cmdId command Id to use for this invocation.
173    * @param msg Instance of |NanTransmitFollowupRequest|.
174    * @return status WifiStatus of the operation.
175    *         Possible status codes:
176    *         |WifiStatusCode.SUCCESS|,
177    *         |WifiStatusCode.ERROR_WIFI_IFACE_INVALID|,
178    *         |WifiStatusCode.ERROR_INVALID_ARGS|,
179    *         |WifiStatusCode.ERROR_UNKNOWN|
180    */
181   transmitFollowupRequest(CommandIdShort cmdId, NanTransmitFollowupRequest msg)
182       generates (WifiStatus status);
183
184   /**
185    * Create a NAN Data Interface.
186    * Asynchronous response is with |IWifiNanIfaceEventCallback.notifyCreateDataInterfaceResponse|.
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   createDataInterfaceRequest(CommandIdShort cmdId, string ifaceName)
196       generates (WifiStatus status);
197
198   /**
199    * Delete a NAN Data Interface.
200    * Asynchronous response is with |IWifiNanIfaceEventCallback.notifyDeleteDataInterfaceResponse|.
201    *
202    * @param cmdId command Id to use for this invocation.
203    * @return status WifiStatus of the operation.
204    *         Possible status codes:
205    *         |WifiStatusCode.SUCCESS|,
206    *         |WifiStatusCode.ERROR_WIFI_IFACE_INVALID|,
207    *         |WifiStatusCode.ERROR_UNKNOWN|
208    */
209   deleteDataInterfaceRequest(CommandIdShort cmdId, string ifaceName)
210       generates (WifiStatus status);
211
212   /**
213    * Initiate a data-path (NDP) setup operation: Initiator.
214    * Asynchronous response is with |IWifiNanIfaceEventCallback.notifyInitiateDataPathResponse|.
215    *
216    * @param cmdId command Id to use for this invocation.
217    * @param msg Instance of |NanInitiateDataPathRequest|.
218    * @return status WifiStatus of the operation.
219    *         Possible status codes:
220    *         |WifiStatusCode.SUCCESS|,
221    *         |WifiStatusCode.ERROR_WIFI_IFACE_INVALID|,
222    *         |WifiStatusCode.ERROR_INVALID_ARGS|,
223    *         |WifiStatusCode.ERROR_UNKNOWN|
224    */
225   initiateDataPathRequest(CommandIdShort cmdId, NanInitiateDataPathRequest msg)
226       generates (WifiStatus status);
227
228   /**
229    * Respond to a received data indication as part of a data-path (NDP) setup operation. An
230    * indication is received by the Responder from the Initiator.
231    * Asynchronous response is with
232    * |IWifiNanIfaceEventCallback.notifyRespondToDataPathIndicationResponse|.
233    *
234    * @param cmdId command Id to use for this invocation.
235    * @param msg Instance of |NanRespondToDataPathIndicationRequest|.
236    * @return status WifiStatus of the operation.
237    *         Possible status codes:
238    *         |WifiStatusCode.SUCCESS|,
239    *         |WifiStatusCode.ERROR_WIFI_IFACE_INVALID|,
240    *         |WifiStatusCode.ERROR_INVALID_ARGS|,
241    *         |WifiStatusCode.ERROR_UNKNOWN|
242    */
243   respondToDataPathIndicationRequest(CommandIdShort cmdId,
244                                      NanRespondToDataPathIndicationRequest msg)
245       generates (WifiStatus status);
246
247   /**
248    * Data-path (NDP) termination request: executed by either Initiator or Responder.
249    * Asynchronous response is with |IWifiNanIfaceEventCallback.notifyTerminateDataPathResponse|.
250    *
251    * @param cmdId command Id to use for this invocation.
252    * @param ndpInstanceId Data-path instance ID to be terminated.
253    * @return status WifiStatus of the operation.
254    *         Possible status codes:
255    *         |WifiStatusCode.SUCCESS|,
256    *         |WifiStatusCode.ERROR_WIFI_IFACE_INVALID|,
257    *         |WifiStatusCode.ERROR_UNKNOWN|
258    */
259   terminateDataPathRequest(CommandIdShort cmdId, uint32_t ndpInstanceId)
260       generates (WifiStatus status);
261 };