1adcfba4b09b6d708cafe8d8e0cc35ed8888cde9cRoshan Pius/*
2adcfba4b09b6d708cafe8d8e0cc35ed8888cde9cRoshan Pius * Copyright 2016 The Android Open Source Project
3adcfba4b09b6d708cafe8d8e0cc35ed8888cde9cRoshan Pius *
4adcfba4b09b6d708cafe8d8e0cc35ed8888cde9cRoshan Pius * Licensed under the Apache License, Version 2.0 (the "License");
5adcfba4b09b6d708cafe8d8e0cc35ed8888cde9cRoshan Pius * you may not use this file except in compliance with the License.
6adcfba4b09b6d708cafe8d8e0cc35ed8888cde9cRoshan Pius * You may obtain a copy of the License at
7adcfba4b09b6d708cafe8d8e0cc35ed8888cde9cRoshan Pius *
8adcfba4b09b6d708cafe8d8e0cc35ed8888cde9cRoshan Pius *      http://www.apache.org/licenses/LICENSE-2.0
9adcfba4b09b6d708cafe8d8e0cc35ed8888cde9cRoshan Pius *
10adcfba4b09b6d708cafe8d8e0cc35ed8888cde9cRoshan Pius * Unless required by applicable law or agreed to in writing, software
11adcfba4b09b6d708cafe8d8e0cc35ed8888cde9cRoshan Pius * distributed under the License is distributed on an "AS IS" BASIS,
12adcfba4b09b6d708cafe8d8e0cc35ed8888cde9cRoshan Pius * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13adcfba4b09b6d708cafe8d8e0cc35ed8888cde9cRoshan Pius * See the License for the specific language governing permissions and
14adcfba4b09b6d708cafe8d8e0cc35ed8888cde9cRoshan Pius * limitations under the License.
15adcfba4b09b6d708cafe8d8e0cc35ed8888cde9cRoshan Pius */
16adcfba4b09b6d708cafe8d8e0cc35ed8888cde9cRoshan Pius
17adcfba4b09b6d708cafe8d8e0cc35ed8888cde9cRoshan Piuspackage android.hardware.wifi@1.0;
18adcfba4b09b6d708cafe8d8e0cc35ed8888cde9cRoshan Pius
19adcfba4b09b6d708cafe8d8e0cc35ed8888cde9cRoshan Piusimport IWifiIface;
20adcfba4b09b6d708cafe8d8e0cc35ed8888cde9cRoshan Pius
21adcfba4b09b6d708cafe8d8e0cc35ed8888cde9cRoshan Pius/**
22adcfba4b09b6d708cafe8d8e0cc35ed8888cde9cRoshan Pius * Interface used to represent a single AP iface.
23adcfba4b09b6d708cafe8d8e0cc35ed8888cde9cRoshan Pius */
24adcfba4b09b6d708cafe8d8e0cc35ed8888cde9cRoshan Piusinterface IWifiApIface extends IWifiIface {
2532fc12ea4f38224a18b124434da49a56c6d83f86Roshan Pius  /**
2632fc12ea4f38224a18b124434da49a56c6d83f86Roshan Pius   * Set country code for this iface.
2732fc12ea4f38224a18b124434da49a56c6d83f86Roshan Pius   *
2832fc12ea4f38224a18b124434da49a56c6d83f86Roshan Pius   * @param code 2 byte country code (as defined in ISO 3166) to set.
2932fc12ea4f38224a18b124434da49a56c6d83f86Roshan Pius   * @return status Status of the operation.
3032fc12ea4f38224a18b124434da49a56c6d83f86Roshan Pius   *         Possible status codes:
3132fc12ea4f38224a18b124434da49a56c6d83f86Roshan Pius   *         |WifiStatusCode.SUCCESS|,
3232fc12ea4f38224a18b124434da49a56c6d83f86Roshan Pius   *         |WifiStatusCode.FAILURE_UNKNOWN|,
3332fc12ea4f38224a18b124434da49a56c6d83f86Roshan Pius   *         |WifiStatusCode.FAILURE_IFACE_INVALID|
3432fc12ea4f38224a18b124434da49a56c6d83f86Roshan Pius   */
3532fc12ea4f38224a18b124434da49a56c6d83f86Roshan Pius  setCountryCode(int8_t[2] code) generates (WifiStatus status);
367f4574d2a1764df195ad9c16f149a73b93b825d3Roshan Pius
377f4574d2a1764df195ad9c16f149a73b93b825d3Roshan Pius  /**
387f4574d2a1764df195ad9c16f149a73b93b825d3Roshan Pius   * Used to query the list of valid frequencies (depending on country code set)
397f4574d2a1764df195ad9c16f149a73b93b825d3Roshan Pius   * for the provided band.
407f4574d2a1764df195ad9c16f149a73b93b825d3Roshan Pius   *
417f4574d2a1764df195ad9c16f149a73b93b825d3Roshan Pius   * @param band Band for which the frequency list is being generated.
427f4574d2a1764df195ad9c16f149a73b93b825d3Roshan Pius   * @return status WifiStatus of the operation.
437f4574d2a1764df195ad9c16f149a73b93b825d3Roshan Pius   *         Possible status codes:
447f4574d2a1764df195ad9c16f149a73b93b825d3Roshan Pius   *         |WifiStatusCode.SUCCESS|,
457f4574d2a1764df195ad9c16f149a73b93b825d3Roshan Pius   *         |WifiStatusCode.ERROR_WIFI_IFACE_INVALID|,
467f4574d2a1764df195ad9c16f149a73b93b825d3Roshan Pius   *         |WifiStatusCode.ERROR_NOT_SUPPORTED|,
477f4574d2a1764df195ad9c16f149a73b93b825d3Roshan Pius   *         |WifiStatusCode.ERROR_NOT_AVAILABLE|,
487f4574d2a1764df195ad9c16f149a73b93b825d3Roshan Pius   *         |WifiStatusCode.ERROR_UNKNOWN|
497f4574d2a1764df195ad9c16f149a73b93b825d3Roshan Pius   * @return frequencies vector of valid frequencies for the provided band.
507f4574d2a1764df195ad9c16f149a73b93b825d3Roshan Pius   */
517f4574d2a1764df195ad9c16f149a73b93b825d3Roshan Pius  getValidFrequenciesForBand(WifiBand band)
527f4574d2a1764df195ad9c16f149a73b93b825d3Roshan Pius      generates (WifiStatus status, vec<WifiChannelInMhz> frequencies);
53adcfba4b09b6d708cafe8d8e0cc35ed8888cde9cRoshan Pius};
54