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
17package android.hardware.wifi.supplicant@1.0;
18
19import ISupplicantIface;
20import ISupplicantP2pIfaceCallback;
21
22/**
23 * Interface exposed by the supplicant for each P2P mode network
24 * interface (e.g p2p0) it controls.
25 */
26interface ISupplicantP2pIface extends ISupplicantIface {
27  enum WpsProvisionMethod : uint32_t {
28    /**
29     * Push button method.
30     */
31    PBC,
32    /**
33     * Display pin method configuration - pin is generated and displayed on
34     * device.
35     */
36    DISPLAY,
37    /**
38     * Keypad pin method configuration - pin is entered on device.
39     */
40    KEYPAD
41  };
42
43  /**
44   * Use to specify a range of frequencies.
45   * For example: 2412-2432,2462,5000-6000, etc.
46   */
47  struct FreqRange {
48      uint32_t min;
49      uint32_t max;
50  };
51
52  /**
53   * Enum describing the modes of Miracast supported
54   * via driver commands.
55   */
56  enum MiracastMode : uint8_t {
57    DISABLED = 0,
58    /**
59     * Operating as source.
60     */
61    SOURCE = 1,
62    /**
63     * Operating as sink.
64     */
65    SINK = 2
66  };
67
68  /**
69   * Register for callbacks from this interface.
70   *
71   * These callbacks are invoked for events that are specific to this interface.
72   * Registration of multiple callback objects is supported. These objects must
73   * be automatically deleted when the corresponding client process is dead or
74   * if this interface is removed.
75   *
76   * @param callback An instance of the |ISupplicantP2pIfaceCallback| HIDL
77   *        interface object.
78   * @return status Status of the operation.
79   *         Possible status codes:
80   *         |SupplicantStatusCode.SUCCESS|,
81   *         |SupplicantStatusCode.FAILURE_UNKNOWN|,
82   *         |SupplicantStatusCode.FAILURE_IFACE_INVALID|
83   */
84  registerCallback(ISupplicantP2pIfaceCallback callback)
85      generates (SupplicantStatus status);
86
87  /**
88   * Gets the MAC address of the device.
89   *
90   * @return status Status of the operation.
91   *         Possible status codes:
92   *         |SupplicantStatusCode.SUCCESS|,
93   *         |SupplicantStatusCode.FAILURE_UNKNOWN|,
94   *         |SupplicantStatusCode.FAILURE_IFACE_INVALID|
95   * @return deviceAddress MAC address of the device.
96   */
97  getDeviceAddress()
98      generates (SupplicantStatus status, MacAddress deviceAddress);
99
100  /**
101   * Set the postfix to be used for P2P SSID's.
102   *
103   * @param postfix String to be appended to SSID.
104   * @return status Status of the operation.
105   *         Possible status codes:
106   *         |SupplicantStatusCode.SUCCESS|,
107   *         |SupplicantStatusCode.FAILURE_ARGS_INVALID|,
108   *         |SupplicantStatusCode.FAILURE_UNKNOWN|,
109   *         |SupplicantStatusCode.FAILURE_IFACE_INVALID|
110   */
111  setSsidPostfix(vec<uint8_t> postfix) generates (SupplicantStatus status);
112
113  /**
114   * Set the Maximum idle time in seconds for P2P groups.
115   * This value controls how long a P2P group is maintained after there
116   * is no other members in the group. As a group owner, this means no
117   * associated stations in the group. As a P2P client, this means no
118   * group owner seen in scan results.
119   *
120   * @param groupIfName Group interface name to use.
121   * @param timeoutInSec Timeout value in seconds.
122   * @return status Status of the operation.
123   *         Possible status codes:
124   *         |SupplicantStatusCode.SUCCESS|,
125   *         |SupplicantStatusCode.FAILURE_UNKNOWN|,
126   *         |SupplicantStatusCode.FAILURE_IFACE_INVALID|
127   */
128  setGroupIdle(string groupIfName, uint32_t timeoutInSec)
129      generates (SupplicantStatus status);
130
131  /**
132   * Turn on/off power save mode for the interface.
133   *
134   * @param groupIfName Group interface name to use.
135   * @param enable Indicate if power save is to be turned on/off.
136   * @return status Status of the operation.
137   *         Possible status codes:
138   *         |SupplicantStatusCode.SUCCESS|,
139   *         |SupplicantStatusCode.FAILURE_UNKNOWN|,
140   *         |SupplicantStatusCode.FAILURE_IFACE_INVALID|,
141   *         |SupplicantStatusCode.FAILURE_IFACE_DISABLED|
142   */
143  setPowerSave(string groupIfName, bool enable)
144      generates (SupplicantStatus status);
145
146  /**
147   * Initiate a P2P service discovery with an optional timeout.
148   *
149   * @param timeoutInSec Max time to be spent is peforming discovery.
150   *        Set to 0 to indefinely continue discovery untill and explicit
151   *        |stopFind| is sent.
152   * @return status Status of the operation.
153   *         Possible status codes:
154   *         |SupplicantStatusCode.SUCCESS|,
155   *         |SupplicantStatusCode.FAILURE_UNKNOWN|,
156   *         |SupplicantStatusCode.FAILURE_IFACE_INVALID|
157   *         |SupplicantStatusCode.FAILURE_IFACE_DISABLED|
158   */
159  find(uint32_t timeoutInSec) generates (SupplicantStatus status);
160
161  /**
162   * Stop an ongoing P2P service discovery.
163   *
164   * @return status Status of the operation.
165   *         Possible status codes:
166   *         |SupplicantStatusCode.SUCCESS|,
167   *         |SupplicantStatusCode.FAILURE_UNKNOWN|,
168   *         |SupplicantStatusCode.FAILURE_IFACE_INVALID|
169   *         |SupplicantStatusCode.FAILURE_IFACE_DISABLED|
170   */
171  stopFind() generates (SupplicantStatus status);
172
173  /**
174   * Flush P2P peer table and state.
175   *
176   * @return status Status of the operation.
177   *         Possible status codes:
178   *         |SupplicantStatusCode.SUCCESS|,
179   *         |SupplicantStatusCode.FAILURE_UNKNOWN|,
180   *         |SupplicantStatusCode.FAILURE_IFACE_INVALID|
181   */
182  flush() generates (SupplicantStatus status);
183
184  /**
185   * Start P2P group formation with a discovered P2P peer. This includes
186   * optional group owner negotiation, group interface setup, provisioning,
187   * and establishing data connection.
188   *
189   * @param peerAddress MAC address of the device to connect to.
190   * @method provisionMethod Provisioning method to use.
191   * @param preSelectedPin Pin to be used, if |provisionMethod| uses one of the
192   *        preselected |PIN*| methods.
193   * @param joinExistingGroup Indicates that this is a command to join an
194   *        existing group as a client. It skips the group owner negotiation
195   *        part. This must send a Provision Discovery Request message to the
196   *        target group owner before associating for WPS provisioning.
197   * @param persistent Used to request a persistent group to be formed.
198   * @param goIntent Used to override the default Intent for this group owner
199   *        negotiation (Values from 1-15). Refer to section 4.1.6 in
200   *        Wi-Fi Peer-to-Peer (P2P) Technical Specification Version 1.7.
201   * @return status Status of the operation.
202   *         Possible status codes:
203   *         |SupplicantStatusCode.SUCCESS|,
204   *         |SupplicantStatusCode.FAILURE_ARGS_INVALID|,
205   *         |SupplicantStatusCode.FAILURE_UNKNOWN|,
206   *         |SupplicantStatusCode.FAILURE_IFACE_INVALID|
207   * @return generatedPin Pin generated, if |provisionMethod| uses one of the
208   *         generated |PIN*| methods.
209   */
210  connect(MacAddress peerAddress,
211          WpsProvisionMethod provisionMethod,
212          string preSelectedPin,
213          bool joinExistingGroup,
214          bool persistent,
215          uint32_t goIntent)
216      generates (SupplicantStatus status, string generatedPin);
217
218  /**
219   * Cancel an ongoing P2P group formation and joining-a-group related
220   * operation. This operation unauthorizes the specific peer device (if any
221   * had been authorized to start group formation), stops P2P find (if in
222   * progress), stops pending operations for join-a-group, and removes the
223   * P2P group interface (if one was used) that is in the WPS provisioning
224   * step. If the WPS provisioning step has been completed, the group is not
225   * terminated.
226   *
227   * @return status Status of the operation.
228   *         Possible status codes:
229   *         |SupplicantStatusCode.SUCCESS|,
230   *         |SupplicantStatusCode.FAILURE_NOT_STARTED|,
231   *         |SupplicantStatusCode.FAILURE_UNKNOWN|,
232   *         |SupplicantStatusCode.FAILURE_IFACE_INVALID|
233   */
234  cancelConnect() generates (SupplicantStatus status);
235
236  /**
237   * Send P2P provision discovery request to the specified peer. The
238   * parameters for this command are the P2P device address of the peer and the
239   * desired configuration method.
240   *
241   * @param peerAddress MAC address of the device to send discovery.
242   * @method provisionMethod Provisioning method to use.
243   * @return status Status of the operation.
244   *         Possible status codes:
245   *         |SupplicantStatusCode.SUCCESS|,
246   *         |SupplicantStatusCode.FAILURE_UNKNOWN|,
247   *         |SupplicantStatusCode.FAILURE_IFACE_INVALID|
248   */
249  provisionDiscovery(MacAddress peerAddress,
250                     WpsProvisionMethod provisionMethod)
251      generates (SupplicantStatus status);
252
253  /**
254   * Set up a P2P group owner manually (i.e., without group owner
255   * negotiation with a specific peer). This is also known as autonomous
256   * group owner. Optional |persistentNetworkId| may be used to specify
257   * restart of a persistent group.
258   *
259   * @param persistent Used to request a persistent group to be formed.
260   * @param persistentNetworkId Used to specify the restart of a persistent
261   *        group. Set to UINT32_MAX for a non-persistent group.
262   * @return status Status of the operation.
263   *         Possible status codes:
264   *         |SupplicantStatusCode.SUCCESS|,
265   *         |SupplicantStatusCode.FAILURE_UNKNOWN|,
266   *         |SupplicantStatusCode.FAILURE_IFACE_INVALID|
267   */
268  addGroup(bool persistent, SupplicantNetworkId persistentNetworkId)
269      generates (SupplicantStatus status);
270
271  /**
272   * Terminate a P2P group. If a new virtual network interface was used for
273   * the group, it must also be removed. The network interface name of the
274   * group interface is used as a parameter for this command.
275   *
276   * @param groupIfName Group interface name to use.
277   * @return status Status of the operation.
278   *         Possible status codes:
279   *         |SupplicantStatusCode.SUCCESS|,
280   *         |SupplicantStatusCode.FAILURE_UNKNOWN|,
281   *         |SupplicantStatusCode.FAILURE_IFACE_INVALID|
282   */
283  removeGroup(string groupIfName) generates (SupplicantStatus status);
284
285  /**
286   * Reject connection attempt from a peer (specified with a device
287   * address). This is a mechanism to reject a pending group owner negotiation
288   * with a peer and request to automatically block any further connection or
289   * discovery of the peer.
290   *
291   * @param peerAddress MAC address of the device to reject.
292   * @return status Status of the operation.
293   *         Possible status codes:
294   *         |SupplicantStatusCode.SUCCESS|,
295   *         |SupplicantStatusCode.FAILURE_UNKNOWN|,
296   *         |SupplicantStatusCode.FAILURE_IFACE_INVALID|
297   *         |SupplicantStatusCode.FAILURE_IFACE_DISABLED|
298   */
299  reject(MacAddress peerAddress) generates (SupplicantStatus status);
300
301  /**
302   * Invite a device to a persistent group.
303   * If the peer device is the group owner of the persistent group, the peer
304   * parameter is not needed. Otherwise it is used to specify which
305   * device to invite. |goDeviceAddress| parameter may be used to override
306   * the group owner device address for Invitation Request should it not be
307   * known for some reason (this should not be needed in most cases).
308   *
309   * @param groupIfName Group interface name to use.
310   * @param goDeviceAddress MAC address of the group owner device.
311   * @param peerAddress MAC address of the device to invite.
312   * @return status Status of the operation.
313   *         Possible status codes:
314   *         |SupplicantStatusCode.SUCCESS|,
315   *         |SupplicantStatusCode.FAILURE_UNKNOWN|,
316   *         |SupplicantStatusCode.FAILURE_IFACE_INVALID|
317   */
318  invite(string groupIfName, MacAddress goDeviceAddress, MacAddress peerAddress)
319      generates (SupplicantStatus status);
320
321  /**
322   * Reinvoke a device from a persistent group.
323   *
324   * @param persistentNetworkId Used to specify the persistent group.
325   * @param peerAddress MAC address of the device to reinvoke.
326   * @return status Status of the operation.
327   *         Possible status codes:
328   *         |SupplicantStatusCode.SUCCESS|,
329   *         |SupplicantStatusCode.FAILURE_UNKNOWN|,
330   *         |SupplicantStatusCode.FAILURE_IFACE_INVALID|
331   */
332  reinvoke(SupplicantNetworkId persistentNetworkId, MacAddress peerAddress)
333      generates (SupplicantStatus status);
334
335  /**
336   * Configure Extended Listen Timing.
337   *
338   * If enabled, listen state must be entered every |intervalInMillis| for at
339   * least |periodInMillis|. Both values have acceptable range of 1-65535
340   * (with interval obviously having to be larger than or equal to duration).
341   * If the P2P module is not idle at the time the Extended Listen Timing
342   * timeout occurs, the Listen State operation must be skipped.
343   *
344   * @param periodInMillis Period in milliseconds.
345   * @param intervalInMillis Interval in milliseconds.
346   * @return status Status of the operation.
347   *         Possible status codes:
348   *         |SupplicantStatusCode.SUCCESS|,
349   *         |SupplicantStatusCode.FAILURE_ARGS_INVALID|,
350   *         |SupplicantStatusCode.FAILURE_UNKNOWN|,
351   *         |SupplicantStatusCode.FAILURE_IFACE_INVALID|
352   */
353  configureExtListen(uint32_t periodInMillis,
354                     uint32_t intervalInMillis)
355      generates (SupplicantStatus status);
356
357  /**
358   * Set P2P Listen channel.
359   *
360   * When specifying a social channel on the 2.4 GHz band (1/6/11) there is no
361   * need to specify the operating class since it defaults to 81. When
362   * specifying a social channel on the 60 GHz band (2), specify the 60 GHz
363   * operating class (180).
364   *
365   * @param channel Wifi channel. eg, 1, 6, 11.
366   * @param operatingClass Operating Class indicates the channel set of the AP
367   *        indicated by this BSSID
368   * @return status Status of the operation.
369   *         Possible status codes:
370   *         |SupplicantStatusCode.SUCCESS|,
371   *         |SupplicantStatusCode.FAILURE_UNKNOWN|,
372   *         |SupplicantStatusCode.FAILURE_IFACE_INVALID|
373   */
374  setListenChannel(uint32_t channel, uint32_t operatingClass)
375      generates (SupplicantStatus status);
376
377  /**
378   * Set P2P disallowed frequency ranges.
379   *
380   * Specify ranges of frequencies that are disallowed for any p2p operations.
381
382   * @param ranges List of ranges which needs to be disallowed.
383   * @return status Status of the operation.
384   *         Possible status codes:
385   *         |SupplicantStatusCode.SUCCESS|,
386   *         |SupplicantStatusCode.FAILURE_UNKNOWN|,
387   *         |SupplicantStatusCode.FAILURE_IFACE_INVALID|
388   */
389  setDisallowedFrequencies(vec<FreqRange> ranges)
390      generates (SupplicantStatus status);
391
392  /**
393   * Gets the operational SSID of the device.
394   *
395   * @param peerAddress MAC address of the peer.
396   * @return status Status of the operation.
397   *         Possible status codes:
398   *         |SupplicantStatusCode.SUCCESS|,
399   *         |SupplicantStatusCode.FAILURE_UNKNOWN|,
400   *         |SupplicantStatusCode.FAILURE_IFACE_INVALID|
401   * @return ssid SSID of the device
402   */
403  getSsid(MacAddress peerAddress)
404      generates (SupplicantStatus status, Ssid ssid);
405
406  /**
407   * Gets the capability of the group which the device is a
408   * member of.
409   *
410   * @param peerAddress MAC address of the peer.
411   * @return status Status of the operation.
412   *         Possible status codes:
413   *         |SupplicantStatusCode.SUCCESS|,
414   *         |SupplicantStatusCode.FAILURE_UNKNOWN|,
415   *         |SupplicantStatusCode.FAILURE_IFACE_INVALID|
416   * @return capabilityMask Combination of |P2pGroupCapabilityMask| values.
417   */
418  getGroupCapability(MacAddress peerAddress)
419      generates (SupplicantStatus status,
420                 bitfield<P2pGroupCapabilityMask> capabilities);
421
422  /**
423   * This command can be used to add a bonjour service.
424   *
425   * @param query Hex dump of the query data.
426   * @param return Hex dump of the response data.
427   * @return status Status of the operation.
428   *         Possible status codes:
429   *         |SupplicantStatusCode.SUCCESS|,
430   *         |SupplicantStatusCode.FAILURE_UNKNOWN|,
431   *         |SupplicantStatusCode.FAILURE_IFACE_INVALID|
432   */
433  addBonjourService(vec<uint8_t> query, vec<uint8_t> response)
434      generates (SupplicantStatus status);
435
436  /**
437   * This command can be used to remove a bonjour service.
438   *
439   * @param query Hex dump of the query data.
440   * @return status Status of the operation.
441   *         Possible status codes:
442   *         |SupplicantStatusCode.SUCCESS|,
443   *         |SupplicantStatusCode.FAILURE_UNKNOWN|,
444   *         |SupplicantStatusCode.FAILURE_NOT_STARTED|,
445   *         |SupplicantStatusCode.FAILURE_IFACE_INVALID|
446   */
447  removeBonjourService(vec<uint8_t> query) generates (SupplicantStatus status);
448
449  /**
450   * This command can be used to add a UPNP service.
451   *
452   * @param version Version to be used.
453   * @package serviceName Service name to be used.
454   * @return status Status of the operation.
455   *         Possible status codes:
456   *         |SupplicantStatusCode.SUCCESS|,
457   *         |SupplicantStatusCode.FAILURE_UNKNOWN|,
458   *         |SupplicantStatusCode.FAILURE_IFACE_INVALID|
459   */
460  addUpnpService(uint32_t version, string serviceName)
461      generates (SupplicantStatus status);
462
463  /**
464   * This command can be used to remove a UPNP service.
465   *
466   * @param version Version to be used.
467   * @package serviceName Service name to be used.
468   * @return status Status of the operation.
469   *         Possible status codes:
470   *         |SupplicantStatusCode.SUCCESS|,
471   *         |SupplicantStatusCode.FAILURE_UNKNOWN|,
472   *         |SupplicantStatusCode.FAILURE_NOT_STARTED|,
473   *         |SupplicantStatusCode.FAILURE_IFACE_INVALID|
474   */
475  removeUpnpService(uint32_t version, string serviceName)
476      generates (SupplicantStatus status);
477
478  /**
479   * This command can be used to flush all services from the
480   * device.
481   *
482   * @return status Status of the operation.
483   *         Possible status codes:
484   *         |SupplicantStatusCode.SUCCESS|,
485   *         |SupplicantStatusCode.FAILURE_UNKNOWN|,
486   *         |SupplicantStatusCode.FAILURE_IFACE_INVALID|
487   */
488  flushServices() generates (SupplicantStatus status);
489
490  /**
491   * Schedule a P2P service discovery request. The parameters for this command
492   * are the device address of the peer device (or 00:00:00:00:00:00 for
493   * wildcard query that is sent to every discovered P2P peer that supports
494   * service discovery) and P2P Service Query TLV(s) as hexdump.
495   *
496   * @param peerAddress MAC address of the device to discover.
497   * @param query Hex dump of the query data.
498   * @return status Status of the operation.
499   *         Possible status codes:
500   *         |SupplicantStatusCode.SUCCESS|,
501   *         |SupplicantStatusCode.FAILURE_UNKNOWN|,
502   *         |SupplicantStatusCode.FAILURE_IFACE_INVALID|
503   * @return identifier Identifier for the request. Can be used to cancel the
504   *         request.
505   */
506  requestServiceDiscovery(MacAddress peerAddress, vec<uint8_t> query)
507      generates (SupplicantStatus status, uint64_t identifier);
508
509  /**
510   * Cancel a previous service discovery request.
511   *
512   * @return identifier Identifier for the request to cancel.
513   * @return status Status of the operation.
514   *         Possible status codes:
515   *         |SupplicantStatusCode.SUCCESS|,
516   *         |SupplicantStatusCode.FAILURE_NOT_STARTED|,
517   *         |SupplicantStatusCode.FAILURE_UNKNOWN|,
518   *         |SupplicantStatusCode.FAILURE_IFACE_INVALID|
519   */
520  cancelServiceDiscovery(uint64_t identifier)
521      generates (SupplicantStatus status);
522
523  /**
524   * Send driver command to set Miracast mode.
525   *
526   * @param mode Mode of Miracast.
527   * @return status Status of the operation.
528   *         Possible status codes:
529   *         |SupplicantStatusCode.SUCCESS|,
530   *         |SupplicantStatusCode.FAILURE_UNKNOWN|,
531   *         |SupplicantStatusCode.FAILURE_IFACE_INVALID|
532   */
533  setMiracastMode(MiracastMode mode)
534      generates (SupplicantStatus status);
535
536  /**
537   * Initiate WPS Push Button setup.
538   * The PBC operation requires that a button is also pressed at the
539   * AP/Registrar at about the same time (2 minute window).
540   *
541   * @param groupIfName Group interface name to use.
542   * @param bssid BSSID of the AP. Use zero'ed bssid to indicate wildcard.
543   * @return status Status of the operation.
544   *         Possible status codes:
545   *         |SupplicantStatusCode.SUCCESS|,
546   *         |SupplicantStatusCode.FAILURE_UNKNOWN|,
547   *         |SupplicantStatusCode.FAILURE_IFACE_INVALID|
548   */
549  startWpsPbc(string groupIfName, Bssid bssid)
550      generates (SupplicantStatus status);
551
552  /**
553   * Initiate WPS Pin Keypad setup.
554   *
555   * @param groupIfName Group interface name to use.
556   * @param pin 8 digit pin to be used.
557   * @return status Status of the operation.
558   *         Possible status codes:
559   *         |SupplicantStatusCode.SUCCESS|,
560   *         |SupplicantStatusCode.FAILURE_UNKNOWN|,
561   *         |SupplicantStatusCode.FAILURE_IFACE_INVALID|
562   */
563  startWpsPinKeypad(string groupIfName, string pin)
564      generates (SupplicantStatus status);
565
566  /**
567   * Initiate WPS Pin Display setup.
568   *
569   * @param groupIfName Group interface name to use.
570   * @param bssid BSSID of the AP. Use zero'ed bssid to indicate wildcard.
571   * @return status Status of the operation.
572   *         Possible status codes:
573   *         |SupplicantStatusCode.SUCCESS|,
574   *         |SupplicantStatusCode.FAILURE_UNKNOWN|,
575   *         |SupplicantStatusCode.FAILURE_IFACE_INVALID|
576   * @return generatedPin 8 digit pin generated.
577   */
578  startWpsPinDisplay(string groupIfName, Bssid bssid)
579      generates (SupplicantStatus status, string generatedPin);
580
581  /**
582   * Cancel any ongoing WPS operations.
583   *
584   * @param groupIfName Group interface name to use.
585   * @return status Status of the operation.
586   *         Possible status codes:
587   *         |SupplicantStatusCode.SUCCESS|,
588   *         |SupplicantStatusCode.FAILURE_UNKNOWN|,
589   *         |SupplicantStatusCode.FAILURE_IFACE_INVALID|
590
591   */
592  cancelWps(string groupIfName) generates (SupplicantStatus status);
593
594  /**
595   * Enable/Disable Wifi Display.
596   *
597   * @param enable true to enable, false to disable.
598   * @return status Status of the operation.
599   *         Possible status codes:
600   *         |SupplicantStatusCode.SUCCESS|,
601   *         |SupplicantStatusCode.FAILURE_UNKNOWN|,
602   *         |SupplicantStatusCode.FAILURE_IFACE_INVALID|
603   */
604  enableWfd(bool enable) generates (SupplicantStatus status);
605
606  /**
607   * Set Wifi Display device info.
608   *
609   * @param info WFD device info as described in section 5.1.2 of WFD technical
610   *        specification v1.0.0.
611   * @return status Status of the operation.
612   *         Possible status codes:
613   *         |SupplicantStatusCode.SUCCESS|,
614   *         |SupplicantStatusCode.FAILURE_UNKNOWN|,
615   *         |SupplicantStatusCode.FAILURE_IFACE_INVALID|
616   */
617  setWfdDeviceInfo(uint8_t[6] info) generates (SupplicantStatus status);
618
619  /**
620   * Creates a NFC handover request message.
621   *
622   * @return status Status of the operation.
623   *         Possible status codes:
624   *         |SupplicantStatusCode.SUCCESS|,
625   *         |SupplicantStatusCode.FAILURE_UNKNOWN|,
626   *         |SupplicantStatusCode.FAILURE_IFACE_INVALID|
627   * @return request Bytes representing the handover request as specified in
628   *         section 3.1.1 of NFC Connection Handover 1.2 Technical
629   *         Specification.
630   */
631  createNfcHandoverRequestMessage()
632      generates (SupplicantStatus status, vec<uint8_t> request);
633
634  /**
635   * Creates a NFC handover select message.
636   *
637   * @return status Status of the operation.
638   *         Possible status codes:
639   *         |SupplicantStatusCode.SUCCESS|,
640   *         |SupplicantStatusCode.FAILURE_UNKNOWN|,
641   *         |SupplicantStatusCode.FAILURE_IFACE_INVALID|
642   * @return select Bytes representing the handover select as specified in
643   *         section 3.1.2 of NFC Connection Handover 1.2 Technical
644   *         Specification.
645   */
646  createNfcHandoverSelectMessage()
647      generates (SupplicantStatus status, vec<uint8_t> select);
648
649  /**
650   * Report the response of the NFC handover request.
651   *
652   * @param request Bytes representing the handover request as specified in
653   *        section 3.1.1 of NFC Connection Handover 1.2 Technical
654   *        Specification.
655   * @return status Status of the operation.
656   *         Possible status codes:
657   *         |SupplicantStatusCode.SUCCESS|,
658   *         |SupplicantStatusCode.FAILURE_UNKNOWN|,
659   *         |SupplicantStatusCode.FAILURE_IFACE_INVALID|
660   */
661  reportNfcHandoverResponse(vec<uint8_t> request)
662      generates (SupplicantStatus status);
663
664  /**
665   * Report the initiation of the NFC handover select.
666   *
667   * @param select Bytes representing the handover select as specified in
668   *        section 3.1.2 of NFC Connection Handover 1.2 Technical
669   *        Specification.
670   * @return status Status of the operation.
671   *         Possible status codes:
672   *         |SupplicantStatusCode.SUCCESS|,
673   *         |SupplicantStatusCode.FAILURE_UNKNOWN|,
674   *         |SupplicantStatusCode.FAILURE_IFACE_INVALID|
675   */
676  reportNfcHandoverInitiation(vec<uint8_t> select)
677      generates (SupplicantStatus status);
678
679  /**
680   * Persist the current configuration to disk.
681   *
682   * @return status Status of the operation.
683   *         Possible status codes:
684   *         |SupplicantStatusCode.SUCCESS|,
685   *         |SupplicantStatusCode.FAILURE_UNKNOWN|,
686   *         |SupplicantStatusCode.FAILURE_IFACE_INVALID|
687   */
688  saveConfig() generates (SupplicantStatus status);
689};
690