blob: 600df3036648ce1a44a687a68d0d3773c6ff5c28 [file] [log] [blame]
/*
* Copyright 2016 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package android.hardware.wifi.supplicant@1.0;
import ISupplicantNetwork;
/**
* Interface exposed by the supplicant for each network interface (e.g wlan0)
* it controls.
*/
interface ISupplicantIface {
/**
* Retrieves the name of the network interface.
*
* @return status Status of the operation.
* Possible status codes:
* |SupplicantStatusCode.SUCCESS|,
* |SupplicantStatusCode.FAILURE_IFACE_INVALID|
* @return name Name of the network interface, e.g., wlan0
*/
getName() generates (SupplicantStatus status, string name);
/**
* Retrieves the type of the network interface.
*
* @return status Status of the operation.
* Possible status codes:
* |SupplicantStatusCode.SUCCESS|,
* |SupplicantStatusCode.FAILURE_IFACE_INVALID|
* @return type Type of the network interface, e.g., STA.
*/
getType() generates (SupplicantStatus status, IfaceType type);
/**
* Add a new network to the interface.
*
* @return status Status of the operation.
* Possible status codes:
* |SupplicantStatusCode.SUCCESS|,
* |SupplicantStatusCode.FAILURE_UNKNOWN|,
* |SupplicantStatusCode.FAILURE_IFACE_INVALID|
* @return network HIDL interface object representing the new network if
* successful, null otherwise.
*/
addNetwork()
generates (SupplicantStatus status, ISupplicantNetwork network);
/**
* Remove a network from the interface.
*
* Use |ISupplicantNetwork.getId()| on the corresponding network HIDL
* interface object to retrieve the ID.
*
* @param id Network ID allocated to the corresponding network.
* @return status Status of the operation.
* Possible status codes:
* |SupplicantStatusCode.SUCCESS|,
* |SupplicantStatusCode.FAILURE_UNKNOWN|,
* |SupplicantStatusCode.FAILURE_IFACE_INVALID|,
* |SupplicantStatusCode.FAILURE_NETWORK_UNKNOWN|
*/
removeNetwork(SupplicantNetworkId id)
generates (SupplicantStatus status);
/**
* Gets a HIDL interface object for the network corresponding to the
* |SupplicantNetworkId|.
*
* Use |ISupplicantNetwork.getId()| on the corresponding network HIDL
* interface object to retrieve the ID.
*
* @param id Network ID allocated to the corresponding network.
* @return status Status of the operation.
* Possible status codes:
* |SupplicantStatusCode.SUCCESS|,
* |SupplicantStatusCode.FAILURE_UNKNOWN|,
* |SupplicantStatusCode.FAILURE_IFACE_INVALID|,
* |SupplicantStatusCode.FAILURE_NETWORK_UNKNOWN|
* @return network HIDL interface object representing the new network if
* successful, null otherwise.
*/
getNetwork(SupplicantNetworkId id)
generates (SupplicantStatus status, ISupplicantNetwork network);
/**
* Retrieve a list of all the network Id's controlled by the supplicant.
*
* The corresponding |ISupplicantNetwork| object for any network can be
* retrieved using |getNetwork| method.
*
* @return status Status of the operation.
* Possible status codes:
* |SupplicantStatusCode.SUCCESS|,
* |SupplicantStatusCode.FAILURE_UNKNOWN|
* @return networkIds List of all network Id's controlled by the supplicant.
*/
listNetworks()
generates (SupplicantStatus status, vec<SupplicantNetworkId> networkIds);
};