Ahmed ElArabawy | d73b64c | 2022-01-13 09:20:15 -0800 | [diff] [blame] | 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 | |
| 17 | package android.hardware.wifi@1.6; |
| 18 | |
| 19 | import @1.0::WifiStatus; |
Nate Jiang | 50c001d | 2022-01-12 16:06:01 -0800 | [diff] [blame] | 20 | import @1.0::CommandIdShort; |
| 21 | import @1.4::NanConfigRequest; |
| 22 | import @1.4::NanEnableRequest; |
Ahmed ElArabawy | d73b64c | 2022-01-13 09:20:15 -0800 | [diff] [blame] | 23 | import @1.5::IWifiNanIface; |
| 24 | import IWifiNanIfaceEventCallback; |
Nate Jiang | 50c001d | 2022-01-12 16:06:01 -0800 | [diff] [blame] | 25 | import NanConfigRequestSupplemental; |
| 26 | import NanInitiateDataPathRequest; |
| 27 | import NanPublishRequest; |
| 28 | import NanRespondToDataPathIndicationRequest; |
Ahmed ElArabawy | d73b64c | 2022-01-13 09:20:15 -0800 | [diff] [blame] | 29 | |
| 30 | /** |
| 31 | * Interface used to represent a single NAN (Neighbour Aware Network) iface. |
| 32 | * |
| 33 | * References to "NAN Spec" are to the Wi-Fi Alliance "Wi-Fi Neighbor Awareness |
| 34 | * Networking (NAN) Technical Specification". |
| 35 | */ |
| 36 | interface IWifiNanIface extends @1.5::IWifiNanIface { |
| 37 | /** |
| 38 | * Requests notifications of significant events on this iface. Multiple calls |
| 39 | * to this must register multiple callbacks each of which must receive all |
| 40 | * events. |
| 41 | * |
| 42 | * @param callback An instance of the |IWifiNanIfaceEventCallback| HIDL interface |
| 43 | * object. |
| 44 | * @return status WifiStatus of the operation. |
| 45 | * Possible status codes: |
| 46 | * |WifiStatusCode.SUCCESS|, |
| 47 | * |WifiStatusCode.ERROR_WIFI_IFACE_INVALID| |
| 48 | */ |
| 49 | registerEventCallback_1_6(IWifiNanIfaceEventCallback callback) generates (WifiStatus status); |
Nate Jiang | 50c001d | 2022-01-12 16:06:01 -0800 | [diff] [blame] | 50 | |
| 51 | /** |
| 52 | * Initiate a data-path (NDP) setup operation: Initiator. |
| 53 | * Asynchronous response is with |IWifiNanIfaceEventCallback.notifyInitiateDataPathResponse|. |
| 54 | * |
| 55 | * Note: supersedes the @1.0::IWifiNanIface.respondToDataPathIndicationRequest() method which is |
| 56 | * deprecated as of HAL version 1.6. |
| 57 | * |
| 58 | * @param cmdId command Id to use for this invocation. |
| 59 | * @param msg Instance of |NanInitiateDataPathRequest|. |
| 60 | * @return status WifiStatus of the operation. |
| 61 | * Possible status codes: |
| 62 | * |WifiStatusCode.SUCCESS|, |
| 63 | * |WifiStatusCode.ERROR_WIFI_IFACE_INVALID|, |
| 64 | * |WifiStatusCode.ERROR_INVALID_ARGS|, |
| 65 | * |WifiStatusCode.ERROR_UNKNOWN| |
| 66 | */ |
| 67 | initiateDataPathRequest_1_6(CommandIdShort cmdId, NanInitiateDataPathRequest msg) |
| 68 | generates (WifiStatus status); |
| 69 | |
| 70 | /** |
| 71 | * Respond to a received data indication as part of a data-path (NDP) setup operation. An |
| 72 | * indication is received by the Responder from the Initiator. |
| 73 | * Asynchronous response is with |
| 74 | * |IWifiNanIfaceEventCallback.notifyRespondToDataPathIndicationResponse|. |
| 75 | * |
| 76 | * Note: supersedes the @1.0::IWifiNanIface.respondToDataPathIndicationRequest() method which is |
| 77 | * deprecated as of HAL version 1.6. |
| 78 | * |
| 79 | * @param cmdId command Id to use for this invocation. |
| 80 | * @param msg Instance of |NanRespondToDataPathIndicationRequest|. |
| 81 | * @return status WifiStatus of the operation. |
| 82 | * Possible status codes: |
| 83 | * |WifiStatusCode.SUCCESS|, |
| 84 | * |WifiStatusCode.ERROR_WIFI_IFACE_INVALID|, |
| 85 | * |WifiStatusCode.ERROR_INVALID_ARGS|, |
| 86 | * |WifiStatusCode.ERROR_UNKNOWN| |
| 87 | */ |
| 88 | respondToDataPathIndicationRequest_1_6(CommandIdShort cmdId, |
| 89 | NanRespondToDataPathIndicationRequest msg) generates (WifiStatus status); |
| 90 | |
| 91 | /** |
| 92 | * Enable NAN: configures and activates NAN clustering (does not start |
| 93 | * a discovery session or set up data-interfaces or data-paths). Use the |
| 94 | * |IWifiNanIface.configureRequest| method to change the configuration of an already enabled |
| 95 | * NAN interface. |
| 96 | * Asynchronous response is with |IWifiNanIfaceEventCallback.notifyEnableResponse|. |
| 97 | * |
| 98 | * Note: supersedes the @1.5::IWifiNanIface.enableRequest() method which is deprecated as of |
| 99 | * HAL version 1.6. |
| 100 | * |
| 101 | * @param cmdId command Id to use for this invocation. |
| 102 | * @param msg1 Instance of |NanEnableRequest|. |
| 103 | * @param msg2 Instance of |NanConfigRequestSupplemental|. |
| 104 | * @return status WifiStatus of the operation. |
| 105 | * Possible status codes: |
| 106 | * |WifiStatusCode.SUCCESS|, |
| 107 | * |WifiStatusCode.ERROR_NOT_SUPPORTED|, |
| 108 | * |WifiStatusCode.ERROR_WIFI_IFACE_INVALID|, |
| 109 | * |WifiStatusCode.ERROR_INVALID_ARGS|, |
| 110 | * |WifiStatusCode.ERROR_UNKNOWN| |
| 111 | */ |
| 112 | enableRequest_1_6(CommandIdShort cmdId, NanEnableRequest msg1, |
| 113 | NanConfigRequestSupplemental msg2) generates (WifiStatus status); |
| 114 | |
| 115 | /** |
| 116 | * Configure NAN: configures an existing NAN functionality (i.e. assumes |
| 117 | * |IWifiNanIface.enableRequest| already submitted and succeeded). |
| 118 | * Asynchronous response is with |IWifiNanIfaceEventCallback.notifyConfigResponse|. |
| 119 | * |
| 120 | * Note: supersedes the @1.5::IWifiNanIface.configRequest() method which is deprecated as of |
| 121 | * HAL version 1.6. |
| 122 | * |
| 123 | * @param cmdId command Id to use for this invocation. |
| 124 | * @param msg1 Instance of |NanConfigRequest|. |
| 125 | * @param msg2 Instance of |NanConfigRequestSupplemental|. |
| 126 | * @return status WifiStatus of the operation. |
| 127 | * Possible status codes: |
| 128 | * |WifiStatusCode.SUCCESS|, |
| 129 | * |WifiStatusCode.ERROR_NOT_SUPPORTED|, |
| 130 | * |WifiStatusCode.ERROR_WIFI_IFACE_INVALID|, |
| 131 | * |WifiStatusCode.ERROR_INVALID_ARGS|, |
| 132 | * |WifiStatusCode.ERROR_UNKNOWN| |
| 133 | */ |
| 134 | configRequest_1_6(CommandIdShort cmdId, NanConfigRequest msg1, |
| 135 | NanConfigRequestSupplemental msg2) generates (WifiStatus status); |
| 136 | |
| 137 | /** |
| 138 | * Publish request to start advertising a discovery service. |
| 139 | * Asynchronous response is with |IWifiNanIfaceEventCallback.notifyStartPublishResponse|. |
| 140 | * |
| 141 | * Note: supersedes the @1.0::IWifiNanIface.startPublishRequest() method which is deprecated as |
| 142 | * of HAL version 1.6. |
| 143 | * |
| 144 | * @param cmdId command Id to use for this invocation. |
| 145 | * @param msg Instance of |NanPublishRequest|. |
| 146 | * @return status WifiStatus of the operation. |
| 147 | * Possible status codes: |
| 148 | * |WifiStatusCode.SUCCESS|, |
| 149 | * |WifiStatusCode.ERROR_WIFI_IFACE_INVALID|, |
| 150 | * |WifiStatusCode.ERROR_INVALID_ARGS|, |
| 151 | * |WifiStatusCode.ERROR_UNKNOWN| |
| 152 | */ |
| 153 | startPublishRequest_1_6(CommandIdShort cmdId, NanPublishRequest msg) |
| 154 | generates (WifiStatus status); |
Ahmed ElArabawy | d73b64c | 2022-01-13 09:20:15 -0800 | [diff] [blame] | 155 | }; |