blob: 0260162ddfbe04face37342dfbdec5c23abf1f45 [file] [log] [blame]
Etan Cohen9e7a4052017-12-21 13:45:26 -08001/*
2 * Copyright 2017 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.2;
18
19import @1.0::CommandIdShort;
20import @1.0::IWifiNanIface;
21import @1.0::NanConfigRequest;
22import @1.0::NanEnableRequest;
23import @1.0::WifiStatus;
Etan Cohenc7bd0f72017-12-26 11:52:44 -080024import IWifiNanIfaceEventCallback;
Etan Cohen9e7a4052017-12-21 13:45:26 -080025
26/**
27 * Interface used to represent a single NAN (Neighbour Aware Network) iface.
28 *
29 * References to "NAN Spec" are to the Wi-Fi Alliance "Wi-Fi Neighbor Awareness
30 * Networking (NAN) Technical Specification".
31 */
32interface IWifiNanIface extends @1.0::IWifiNanIface {
33 /**
Etan Cohenc7bd0f72017-12-26 11:52:44 -080034 * Requests notifications of significant events on this iface. Multiple calls
35 * to this must register multiple callbacks each of which must receive all
36 * events.
37 *
38 * Note: supersedes the @1.0::IWifiNanIface.registerEventCallback() method which is deprecated
39 * as of HAL version 1.2.
40 *
41 * @param callback An instance of the |IWifiNanIfaceEventCallback| HIDL interface
42 * object.
43 * @return status WifiStatus of the operation.
44 * Possible status codes:
45 * |WifiStatusCode.SUCCESS|,
46 * |WifiStatusCode.ERROR_WIFI_IFACE_INVALID|
47 */
48 registerEventCallback_1_2(IWifiNanIfaceEventCallback callback)
49 generates (WifiStatus status);
50
51 /**
Etan Cohen9e7a4052017-12-21 13:45:26 -080052 * Enable NAN: configures and activates NAN clustering (does not start
53 * a discovery session or set up data-interfaces or data-paths). Use the
54 * |IWifiNanIface.configureRequest| method to change the configuration of an already enabled
55 * NAN interface.
56 * Asynchronous response is with |IWifiNanIfaceEventCallback.notifyEnableResponse|.
57 *
58 * Note: supersedes the @1.0::IWifiNanIface.enableRequest() method which is deprecated as of
59 * HAL version 1.2.
60 *
61 * @param cmdId command Id to use for this invocation.
62 * @param msg1 Instance of |NanEnableRequest|.
63 * @param msg2 Instance of |NanConfigRequestSupplemental|.
64 * @return status WifiStatus of the operation.
65 * Possible status codes:
66 * |WifiStatusCode.SUCCESS|,
67 * |WifiStatusCode.ERROR_WIFI_IFACE_INVALID|,
68 * |WifiStatusCode.ERROR_INVALID_ARGS|,
69 * |WifiStatusCode.ERROR_UNKNOWN|
70 */
71 enableRequest_1_2(CommandIdShort cmdId, NanEnableRequest msg1,
72 NanConfigRequestSupplemental msg2)
73 generates (WifiStatus status);
74
75 /**
76 * Configure NAN: configures an existing NAN functionality (i.e. assumes
77 * |IWifiNanIface.enableRequest| already submitted and succeeded).
78 * Asynchronous response is with |IWifiNanIfaceEventCallback.notifyConfigResponse|.
79 *
80 * Note: supersedes the @1.0::IWifiNanIface.configRequest() method which is deprecated as of
81 * HAL version 1.2.
82 *
83 * @param cmdId command Id to use for this invocation.
84 * @param msg1 Instance of |NanConfigRequest|.
85 * @param msg1 Instance of |NanConfigRequestSupplemental|.
86 * @return status WifiStatus of the operation.
87 * Possible status codes:
88 * |WifiStatusCode.SUCCESS|,
89 * |WifiStatusCode.ERROR_WIFI_IFACE_INVALID|,
90 * |WifiStatusCode.ERROR_INVALID_ARGS|,
91 * |WifiStatusCode.ERROR_UNKNOWN|
92 */
93 configRequest_1_2(CommandIdShort cmdId, NanConfigRequest msg1,
94 NanConfigRequestSupplemental msg2)
95 generates (WifiStatus status);
96};