Nick Pelly | 038cabe | 2010-09-23 16:12:11 -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 | |
Nick Pelly | 590b73b | 2010-10-12 13:00:50 -0700 | [diff] [blame] | 17 | package android.nfc; |
Nick Pelly | 038cabe | 2010-09-23 16:12:11 -0700 | [diff] [blame] | 18 | |
Nick Pelly | 590b73b | 2010-10-12 13:00:50 -0700 | [diff] [blame] | 19 | import android.nfc.NdefMessage; |
Martijn Coenen | 2dcae567 | 2011-06-02 16:02:00 -0700 | [diff] [blame] | 20 | import android.nfc.Tag; |
Martijn Coenen | bf34061 | 2011-01-19 00:57:17 +0100 | [diff] [blame] | 21 | import android.nfc.TransceiveResult; |
Nick Pelly | 038cabe | 2010-09-23 16:12:11 -0700 | [diff] [blame] | 22 | |
| 23 | /** |
Nick Pelly | 590b73b | 2010-10-12 13:00:50 -0700 | [diff] [blame] | 24 | * @hide |
Nick Pelly | 038cabe | 2010-09-23 16:12:11 -0700 | [diff] [blame] | 25 | */ |
| 26 | interface INfcTag |
| 27 | { |
Nick Pelly | 590b73b | 2010-10-12 13:00:50 -0700 | [diff] [blame] | 28 | int close(int nativeHandle); |
Martijn Coenen | 4049f9d0 | 2010-12-14 16:58:27 +0100 | [diff] [blame] | 29 | int connect(int nativeHandle, int technology); |
Martijn Coenen | b79173f | 2010-12-10 11:54:26 -0800 | [diff] [blame] | 30 | int reconnect(int nativeHandle); |
Jeff Hamilton | 6be655c | 2010-11-12 12:28:16 -0600 | [diff] [blame] | 31 | int[] getTechList(int nativeHandle); |
Nick Pelly | 038cabe | 2010-09-23 16:12:11 -0700 | [diff] [blame] | 32 | boolean isNdef(int nativeHandle); |
Sylvain Fonteneau | a71354d | 2010-10-18 17:19:45 -0700 | [diff] [blame] | 33 | boolean isPresent(int nativeHandle); |
Martijn Coenen | bf34061 | 2011-01-19 00:57:17 +0100 | [diff] [blame] | 34 | TransceiveResult transceive(int nativeHandle, in byte[] data, boolean raw); |
Nick Pelly | 590b73b | 2010-10-12 13:00:50 -0700 | [diff] [blame] | 35 | |
Jeff Hamilton | 641dd62 | 2010-12-02 09:16:22 -0600 | [diff] [blame] | 36 | NdefMessage ndefRead(int nativeHandle); |
| 37 | int ndefWrite(int nativeHandle, in NdefMessage msg); |
| 38 | int ndefMakeReadOnly(int nativeHandle); |
| 39 | boolean ndefIsWritable(int nativeHandle); |
Martijn Coenen | 5289b91 | 2010-12-07 18:01:35 -0800 | [diff] [blame] | 40 | int formatNdef(int nativeHandle, in byte[] key); |
Martijn Coenen | 2dcae567 | 2011-06-02 16:02:00 -0700 | [diff] [blame] | 41 | Tag rediscover(int nativehandle); |
Martijn Coenen | a701cf8 | 2011-01-12 21:17:43 +0100 | [diff] [blame] | 42 | |
Martijn Coenen | 112fdf6 | 2011-06-09 16:57:49 +0200 | [diff] [blame] | 43 | int setTimeout(int technology, int timeout); |
Martijn Coenen | 20e62c9 | 2011-07-20 16:06:34 +0200 | [diff] [blame] | 44 | int getTimeout(int technology); |
Martijn Coenen | a924973 | 2011-06-06 17:06:54 +0200 | [diff] [blame] | 45 | void resetTimeouts(); |
Martijn Coenen | faca12a | 2011-08-19 14:07:52 +0200 | [diff] [blame] | 46 | boolean canMakeReadOnly(int ndefType); |
| 47 | int getMaxTransceiveLength(int technology); |
Martijn Coenen | fa98cf0 | 2012-04-02 15:56:07 -0700 | [diff] [blame] | 48 | boolean getExtendedLengthApdusSupported(); |
Martijn Coenen | 5289b91 | 2010-12-07 18:01:35 -0800 | [diff] [blame] | 49 | } |