/* * Copyright (c) 2023 Huawei Device Co., Ltd. * 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. */ /** * @addtogroup HdiNfc * @{ * * @brief Provides unified APIs for nfc services to access nfc drivers. * * An nfc service can obtain an nfc driver object or agent and then call APIs provided by this object or agent to * access nfc devices, thereby obtaining enabling or disabling an nfc controller, initializing an nfc core, * writing NCI data to an nfc driver, starting configuration for RF discovery of nfc remote endpoints, * sending nfc commands to an nfc driver for IO control. * * @version 1.1 */ /** * @file NfcTypes.idl * * @brief Declares the APIs provided by the sensor module for obtaining sensor information, subscribing to or * unsubscribing from sensor data, enabling or disabling a sensor, setting the sensor data reporting mode, * and setting sensor options such as the accuracy and measurement range. * * @since 4.1 * @version 1.1 */ package ohos.hdi.nfc.v1_1; /** * @brief Vendor Specific Proprietary Protocal and Discovery Configuration. * * @since 4.1 */ enum VendorProtocalDiscoveryCfg { NCI_PROTOCOL_18092_ACTIVE = 0, NCI_PROTOCOL_B_PRIME = 1, NCI_PROTOCOL_DUAL = 2, NCI_PROTOCOL_15693 = 3, NCI_PROTOCOL_KOVIO = 4, NCI_PROTOCOL_MIFARE = 5, NCI_DISCOVERY_TYPE_POLL_KOVIO = 6, NCI_DISCOVERY_TYPE_POLL_B_PRIME = 7, NCI_DISCOVERY_TYPE_LISTEN_B_PRIME = 8, VENDOR_PROPEIETARY_CFG_MAX = 9, }; /** * @brief Vendor Specific NFC Configuration. * * @since 4.1 */ struct NfcVendorConfig { /** Extended APDU length for ISO_DEP */ unsigned int isoDepExtApduLength; /** Default Secure Element route id */ unsigned char defaultOffHostRoute; /** Default Secure Element route id for felica */ unsigned char defaultOffHostRouteFelica; /** Set the default Felica T3T System Code OffHost route Location */ unsigned char defaultSysCodeRoute; /** Set the Felica T3T System Code Power state */ unsigned char defaultSysCodePwrState; /** Default route for unconfigured protocols and technology. */ unsigned char defaultUnconfiguredRoute; /** Configure the NFC Extras to open and use a static pipe. EE is ESE */ unsigned char esePipeId; /** onfigure the NFC Extras to open and use a static pipe. EE is SIM */ unsigned char simPipeId; /** If set to true, NFCC is using bail out mode for either Type A or Type B poll. */ boolean pollBailOutMode; /** Choose the presence-check algorithm for type-4 tag. If not defined, the default is I_BLOCK. */ unsigned char checkAlgorithm; /** Vendor Specific Proprietary Protocol & Discovery Configuration. */ unsigned char []vendorProtocalDiscoveryCfg; /** Vendor Specific Proprietary Protocol & Discovery Configuration Data Size. */ unsigned char vendorProtocalDiscoveryCfgSize; /** White list of Hosts */ List hostWhitelist; /** OffHost UICC route location for Multi SE */ List offHostRouteUicc; /** OffHost eSE route location for Multi SE */ List offHostRouteEse; /** Set the ISODEP route location */ unsigned char defaultIsoDepRoute; };