/*
 * Copyright (C) 2017 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.nfc@1.1;

import @1.1::INfcClientCallback;
import @1.0::INfc;
import @1.0::NfcStatus;

interface INfc extends @1.0::INfc {
    /**
     * Clears the NFC chip.
     *
     * Must be called during factory reset and/or before the first time the HAL is
     * initialized after a factory reset
     */
    factoryReset();

    /**
     * Enable Power off use cases and close the NFC controller.
     * Should free all resources.
     *
     * This call must enable NFC functionality for off host usecases in power
     * off use cases, if the device supports power off use cases. If the
     * device doesn't support power off use cases, this call should be same as
     * close()
     *
     * @return NfcStatus::OK on success and NfcStatus::FAILED on error.
     */
    closeForPowerOffCase() generates (NfcStatus status);

    /**
     * Open call to take the @1.1::INfcClientCallback
     *
     * @param clientCallback for sending events and data to client.
     * @return status NfcStatus::FAILED in case of error,
     *                NfcStatus::SUCCESS otherwise.
     */
    open_1_1(INfcClientCallback clientCallback) generates (NfcStatus status);

    /**
     * Fetches vendor specific configurations.
     * @return config indicates support for certain features and
     *     populates the vendor specific configs
     */
    getConfig() generates (NfcConfig config);
};
