1/*
2 * Copyright (c) 2022 Huawei Device Co., Ltd.
3 * Licensed under the Apache License, Version 2.0 (the "License");
4 * you may not use this file except in compliance with the License.
5 * You may obtain a copy of the License at
6 *
7 *     http://www.apache.org/licenses/LICENSE-2.0
8 *
9 * Unless required by applicable law or agreed to in writing, software
10 * distributed under the License is distributed on an "AS IS" BASIS,
11 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 * See the License for the specific language governing permissions and
13 * limitations under the License.
14 */
15
16/**
17 * @addtogroup HdiNfc
18 * @{
19 *
20 * @brief Provides unified APIs for nfc services to access nfc drivers.
21 *
22 * An nfc service can obtain an nfc driver object or agent and then call APIs provided by this object or agent to
23 * access nfc devices, thereby obtaining enabling or disabling an nfc controller, initializing an nfc core,
24 * writing NCI data to an nfc driver, starting configuration for RF discovery of nfc remote endpoints,
25 * sending nfc commands to an nfc driver for IO control.
26 *
27 * @version 1.0
28 */
29
30
31package ohos.hdi.nfc.v1_0;
32
33import ohos.hdi.nfc.v1_0.NfcTypes;
34
35/**
36 * @brief Declares callbacks for reporting data and events from the nfc chip to the nfc stack.
37 *
38 * @since 3.2
39 * @version 1.0
40 */
41[callback] interface INfcCallback {
42    /**
43    * @brief Defines the function for reporting nfc data from the nfc chip.
44    *
45    * @param data Indicates the reporting data from nfc chip.
46    *
47    * @since 3.2
48    */
49    OnData([in] List<unsigned char> data);
50
51    /**
52    * @brief Defines the function for reporting nfc events from the nfc chip.
53    *
54    * @param event Indicates the reporting event ID defined in NfcEvent.
55    * @param status Indicates the reporting nfc status defined in NfcStatus. For details,
56    * see {@link NfcTypes}.
57    *
58    * @since 3.2
59    */
60    OnEvent([in] enum NfcEvent event, [in] enum NfcStatus status);
61}
62