• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * Copyright (c) 2024 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 #ifndef NFC_CARDEMULATION_FFI_H
16 #define NFC_CARDEMULATION_FFI_H
17 
18 #include <cstdint>
19 
20 #include "cj_ffi/cj_common_ffi.h"
21 
22 namespace OHOS {
23 namespace NFC {
24 namespace KITS {
25 const int32_t ERR_NO_MEMORY = -2;
26 
27 struct CArrUI8 {
28     uint8_t *head;
29     int64_t size;
30 };
31 
32 extern "C" {
33 FFI_EXPORT int32_t FfiNfcCardEmulationisDefaultService(
34     char *cBundleName, char *cAbilityName, char *cModuleName, char *cardTypeName, bool *ret);
35 
36 FFI_EXPORT int32_t FfiNfcCardEmulationstart(
37     char *cBundleName, char *cAbilityName, char *cModuleName, CArrString cAidList);
38 
39 FFI_EXPORT int32_t FfiNfcCardEmulationOn(int8_t eventType, int64_t id);
40 
41 FFI_EXPORT int32_t FfiNfcCardEmulationstop(char *cBundleName, char *cAbilityName, char *cModuleName);
42 
43 FFI_EXPORT int32_t FfiNfcCardEmulationTransmit(CArrUI8 cResponseApdu);
44 }
45 
46 } // namespace KITS
47 } // namespace NFC
48 } // namespace OHOS
49 
50 #endif