19a3a84f5a366085b7a90a2d4bec4b9f1cf453660Roshan Pius/*
29a3a84f5a366085b7a90a2d4bec4b9f1cf453660Roshan Pius * Copyright 2016 The Android Open Source Project
39a3a84f5a366085b7a90a2d4bec4b9f1cf453660Roshan Pius *
49a3a84f5a366085b7a90a2d4bec4b9f1cf453660Roshan Pius * Licensed under the Apache License, Version 2.0 (the "License");
59a3a84f5a366085b7a90a2d4bec4b9f1cf453660Roshan Pius * you may not use this file except in compliance with the License.
69a3a84f5a366085b7a90a2d4bec4b9f1cf453660Roshan Pius * You may obtain a copy of the License at
79a3a84f5a366085b7a90a2d4bec4b9f1cf453660Roshan Pius *
89a3a84f5a366085b7a90a2d4bec4b9f1cf453660Roshan Pius *      http://www.apache.org/licenses/LICENSE-2.0
99a3a84f5a366085b7a90a2d4bec4b9f1cf453660Roshan Pius *
109a3a84f5a366085b7a90a2d4bec4b9f1cf453660Roshan Pius * Unless required by applicable law or agreed to in writing, software
119a3a84f5a366085b7a90a2d4bec4b9f1cf453660Roshan Pius * distributed under the License is distributed on an "AS IS" BASIS,
129a3a84f5a366085b7a90a2d4bec4b9f1cf453660Roshan Pius * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
139a3a84f5a366085b7a90a2d4bec4b9f1cf453660Roshan Pius * See the License for the specific language governing permissions and
149a3a84f5a366085b7a90a2d4bec4b9f1cf453660Roshan Pius * limitations under the License.
159a3a84f5a366085b7a90a2d4bec4b9f1cf453660Roshan Pius */
169a3a84f5a366085b7a90a2d4bec4b9f1cf453660Roshan Pius
1722ab8b2451a749270ca38f6b53e1d40e67bebb06Roshan Piuspackage android.hardware.wifi.supplicant@1.0;
189a3a84f5a366085b7a90a2d4bec4b9f1cf453660Roshan Pius
199a3a84f5a366085b7a90a2d4bec4b9f1cf453660Roshan Pius/**
208c6a8772f7fc3bdc75d7f07c519869bef501a748Roshan Pius * Interface exposed by the supplicant for each network configuration it
219a3a84f5a366085b7a90a2d4bec4b9f1cf453660Roshan Pius * controls.
228c6a8772f7fc3bdc75d7f07c519869bef501a748Roshan Pius * A network is the supplicant's way of representing the configuration
239a3a84f5a366085b7a90a2d4bec4b9f1cf453660Roshan Pius * parameters of a Wifi service set. Service sets are identified by their
249a3a84f5a366085b7a90a2d4bec4b9f1cf453660Roshan Pius * service set identitifier (SSID). The parameters for a network includes the
259a3a84f5a366085b7a90a2d4bec4b9f1cf453660Roshan Pius * credentials, bssid, etc.
269a3a84f5a366085b7a90a2d4bec4b9f1cf453660Roshan Pius */
279a3a84f5a366085b7a90a2d4bec4b9f1cf453660Roshan Piusinterface ISupplicantNetwork {
289a3a84f5a366085b7a90a2d4bec4b9f1cf453660Roshan Pius  /**
298c6a8772f7fc3bdc75d7f07c519869bef501a748Roshan Pius   * Retrieves the ID allocated to this network by the supplicant.
309a3a84f5a366085b7a90a2d4bec4b9f1cf453660Roshan Pius   *
319a3a84f5a366085b7a90a2d4bec4b9f1cf453660Roshan Pius   * This is not the |SSID| of the network, but an internal identifier for
328c6a8772f7fc3bdc75d7f07c519869bef501a748Roshan Pius   * this network used by the supplicant.
339a3a84f5a366085b7a90a2d4bec4b9f1cf453660Roshan Pius   *
349a3a84f5a366085b7a90a2d4bec4b9f1cf453660Roshan Pius   * @return status Status of the operation.
359a3a84f5a366085b7a90a2d4bec4b9f1cf453660Roshan Pius   *         Possible status codes:
369a3a84f5a366085b7a90a2d4bec4b9f1cf453660Roshan Pius   *         |SupplicantStatusCode.SUCCESS|,
379a3a84f5a366085b7a90a2d4bec4b9f1cf453660Roshan Pius   *         |SupplicantStatusCode.FAILURE_NETWORK_INVALID|
389a3a84f5a366085b7a90a2d4bec4b9f1cf453660Roshan Pius   * @return id Network ID.
399a3a84f5a366085b7a90a2d4bec4b9f1cf453660Roshan Pius   */
409a3a84f5a366085b7a90a2d4bec4b9f1cf453660Roshan Pius  getId() generates (SupplicantStatus status, SupplicantNetworkId id);
419a3a84f5a366085b7a90a2d4bec4b9f1cf453660Roshan Pius
429a3a84f5a366085b7a90a2d4bec4b9f1cf453660Roshan Pius  /**
439a3a84f5a366085b7a90a2d4bec4b9f1cf453660Roshan Pius   * Retrieves the name of the interface this network belongs to.
449a3a84f5a366085b7a90a2d4bec4b9f1cf453660Roshan Pius   *
459a3a84f5a366085b7a90a2d4bec4b9f1cf453660Roshan Pius   * @return status Status of the operation.
469a3a84f5a366085b7a90a2d4bec4b9f1cf453660Roshan Pius   *         Possible status codes:
479a3a84f5a366085b7a90a2d4bec4b9f1cf453660Roshan Pius   *         |SupplicantStatusCode.SUCCESS|,
489a3a84f5a366085b7a90a2d4bec4b9f1cf453660Roshan Pius   *         |SupplicantStatusCode.FAILURE_NETWORK_INVALID|
499a3a84f5a366085b7a90a2d4bec4b9f1cf453660Roshan Pius   * @return Name of the network interface, e.g., wlan0
509a3a84f5a366085b7a90a2d4bec4b9f1cf453660Roshan Pius   */
519a3a84f5a366085b7a90a2d4bec4b9f1cf453660Roshan Pius  getInterfaceName() generates (SupplicantStatus status, string name);
529a3a84f5a366085b7a90a2d4bec4b9f1cf453660Roshan Pius
539a3a84f5a366085b7a90a2d4bec4b9f1cf453660Roshan Pius  /**
5439f588f8ed81654c382f8396af394d42824f5cbbRoshan Pius   * Retrieves the type of the interface this network belongs to.
559a3a84f5a366085b7a90a2d4bec4b9f1cf453660Roshan Pius   *
569a3a84f5a366085b7a90a2d4bec4b9f1cf453660Roshan Pius   * @return status Status of the operation.
579a3a84f5a366085b7a90a2d4bec4b9f1cf453660Roshan Pius   *         Possible status codes:
589a3a84f5a366085b7a90a2d4bec4b9f1cf453660Roshan Pius   *         |SupplicantStatusCode.SUCCESS|,
5939f588f8ed81654c382f8396af394d42824f5cbbRoshan Pius   *         |SupplicantStatusCode.FAILURE_IFACE_INVALID|
6039f588f8ed81654c382f8396af394d42824f5cbbRoshan Pius   * @return type Type of the network interface, e.g., STA.
619a3a84f5a366085b7a90a2d4bec4b9f1cf453660Roshan Pius   */
6239f588f8ed81654c382f8396af394d42824f5cbbRoshan Pius  getType() generates (SupplicantStatus status, IfaceType type);
639a3a84f5a366085b7a90a2d4bec4b9f1cf453660Roshan Pius};
64