Nick Pelly | bc21fde | 2010-10-13 17:25:24 -0700 | [diff] [blame^] | 1 | /* |
| 2 | * Copyright (C) 2010 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 | |
| 17 | /* |
| 18 | * Contains the bare minimum header so that framework NFC jni can link |
| 19 | * against NFC native library |
| 20 | */ |
| 21 | |
| 22 | #ifndef __ANDROID_NFC_H__ |
| 23 | #define __ANDROID_NFC_H__ |
| 24 | |
| 25 | extern "C" { |
| 26 | |
| 27 | typedef struct phFriNfc_NdefRecord { |
| 28 | uint8_t Flags; |
| 29 | uint8_t Tnf; |
| 30 | uint8_t TypeLength; |
| 31 | uint8_t *Type; |
| 32 | uint8_t IdLength; |
| 33 | uint8_t *Id; |
| 34 | uint32_t PayloadLength; |
| 35 | uint8_t *PayloadData; |
| 36 | } phFriNfc_NdefRecord_t; |
| 37 | |
| 38 | uint16_t phFriNfc_NdefRecord_GetRecords(uint8_t* pBuffer, |
| 39 | uint32_t BufferLength, |
| 40 | uint8_t* pRawRecords[ ], |
| 41 | uint8_t IsChunked[ ], |
| 42 | uint32_t* pNumberOfRawRecords |
| 43 | ); |
| 44 | uint16_t phFriNfc_NdefRecord_Parse(phFriNfc_NdefRecord_t* pRecord, |
| 45 | uint8_t* pRawRecord); |
| 46 | |
| 47 | uint16_t phFriNfc_NdefRecord_Generate(phFriNfc_NdefRecord_t* pRecord, |
| 48 | uint8_t* pBuffer, |
| 49 | uint32_t MaxBufferSize, |
| 50 | uint32_t* pBytesWritten |
| 51 | ); |
| 52 | } |
| 53 | |
| 54 | #endif |