Home | History | Annotate | Download | only in 1.1
      1 /*
      2  * Copyright (C) 2017 The Android Open Source Project
      3  *
      4  * Licensed under the Apache License, Version 2.0 (the "License");
      5  * you may not use this file except in compliance with the License.
      6  * You may obtain a copy of the License at
      7  *
      8  *      http://www.apache.org/licenses/LICENSE-2.0
      9  *
     10  * Unless required by applicable law or agreed to in writing, software
     11  * distributed under the License is distributed on an "AS IS" BASIS,
     12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     13  * See the License for the specific language governing permissions and
     14  * limitations under the License.
     15  */
     16 package android.hardware.nfc@1.1;
     17 
     18 import @1.1::INfcClientCallback;
     19 import @1.0::INfc;
     20 import @1.0::NfcStatus;
     21 
     22 interface INfc extends @1.0::INfc {
     23     /**
     24      * Clears the NFC chip.
     25      *
     26      * Must be called during factory reset and/or before the first time the HAL is
     27      * initialized after a factory reset
     28      */
     29     factoryReset();
     30 
     31     /**
     32      * Enable Power off use cases and close the NFC controller.
     33      * Should free all resources.
     34      *
     35      * This call must enable NFC functionality for off host usecases in power
     36      * off use cases, if the device supports power off use cases. If the
     37      * device doesn't support power off use cases, this call should be same as
     38      * close()
     39      *
     40      * @return NfcStatus::OK on success and NfcStatus::FAILED on error.
     41      */
     42     closeForPowerOffCase() generates (NfcStatus status);
     43 
     44     /**
     45      * Open call to take the @1.1::INfcClientCallback
     46      *
     47      * @param clientCallback for sending events and data to client.
     48      * @return status NfcStatus::FAILED in case of error,
     49      *                NfcStatus::SUCCESS otherwise.
     50      */
     51     open_1_1(INfcClientCallback clientCallback) generates (NfcStatus status);
     52 
     53     /**
     54      * Fetches vendor specific configurations.
     55      * @return config indicates support for certain features and
     56      *     populates the vendor specific configs
     57      */
     58     getConfig() generates (NfcConfig config);
     59 };
     60