/*
 * Copyright 2019 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@1.4;

import @1.0::IWifiApIface;
import @1.0::MacAddress;
import @1.0::WifiStatus;

/**
 * Represents a network interface in AP mode.
 *
 * This can be obtained through @1.0::IWifiChip.getApIface() and casting
 * IWifiApIface up to 1.4.
 */
interface IWifiApIface extends @1.0::IWifiApIface {
    /**
     * Changes the MAC address of the interface to the given MAC address.
     *
     * @param mac MAC address to change to.
     * @return status WifiStatus of the operation.
     *         Possible status codes:
     *         |WifiStatusCode.SUCCESS|,
     *         |WifiStatusCode.ERROR_WIFI_IFACE_INVALID|,
     *         |WifiStatusCode.ERROR_UNKNOWN|
     */
    setMacAddress(MacAddress mac) generates (WifiStatus status);

    /**
     * Gets the factory MAC address of the interface.
     *
     * @return status WifiStatus of the operation
     *         Possible status codes:
     *         |WifiStatusCode.SUCCESS|,
     *         |WifiStatusCode.ERROR_WIFI_IFACE_INVALID|,
     *         |WifiStatusCode.ERROR_UNKNOWN|
     * @return mac factory MAC address of the interface
     */
    getFactoryMacAddress() generates (WifiStatus status, MacAddress mac);
};
