blob: 3ac1dcc272b74bcc5d6346b32ba9fd6091018697 [file] [log] [blame]
Nick Pelly038cabe2010-09-23 16:12:11 -07001/*
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 Pelly590b73b2010-10-12 13:00:50 -070017package android.nfc;
Nick Pelly038cabe2010-09-23 16:12:11 -070018
Nick Pelly590b73b2010-10-12 13:00:50 -070019import android.nfc.NdefMessage;
Martijn Coenen2dcae5672011-06-02 16:02:00 -070020import android.nfc.Tag;
Martijn Coenenbf340612011-01-19 00:57:17 +010021import android.nfc.TransceiveResult;
Nick Pelly038cabe2010-09-23 16:12:11 -070022
23/**
Nick Pelly590b73b2010-10-12 13:00:50 -070024 * @hide
Nick Pelly038cabe2010-09-23 16:12:11 -070025 */
26interface INfcTag
27{
Nick Pelly590b73b2010-10-12 13:00:50 -070028 int close(int nativeHandle);
Martijn Coenen4049f9d02010-12-14 16:58:27 +010029 int connect(int nativeHandle, int technology);
Martijn Coenenb79173f2010-12-10 11:54:26 -080030 int reconnect(int nativeHandle);
Jeff Hamilton6be655c2010-11-12 12:28:16 -060031 int[] getTechList(int nativeHandle);
Nick Pelly038cabe2010-09-23 16:12:11 -070032 boolean isNdef(int nativeHandle);
Sylvain Fonteneaua71354d2010-10-18 17:19:45 -070033 boolean isPresent(int nativeHandle);
Martijn Coenenbf340612011-01-19 00:57:17 +010034 TransceiveResult transceive(int nativeHandle, in byte[] data, boolean raw);
Nick Pelly590b73b2010-10-12 13:00:50 -070035
Jeff Hamilton641dd622010-12-02 09:16:22 -060036 NdefMessage ndefRead(int nativeHandle);
37 int ndefWrite(int nativeHandle, in NdefMessage msg);
38 int ndefMakeReadOnly(int nativeHandle);
39 boolean ndefIsWritable(int nativeHandle);
Martijn Coenen5289b912010-12-07 18:01:35 -080040 int formatNdef(int nativeHandle, in byte[] key);
Martijn Coenen2dcae5672011-06-02 16:02:00 -070041 Tag rediscover(int nativehandle);
Martijn Coenena701cf82011-01-12 21:17:43 +010042
Martijn Coenen112fdf62011-06-09 16:57:49 +020043 int setTimeout(int technology, int timeout);
Martijn Coenen20e62c92011-07-20 16:06:34 +020044 int getTimeout(int technology);
Martijn Coenena9249732011-06-06 17:06:54 +020045 void resetTimeouts();
Martijn Coenenfaca12a2011-08-19 14:07:52 +020046 boolean canMakeReadOnly(int ndefType);
47 int getMaxTransceiveLength(int technology);
Martijn Coenenfa98cf02012-04-02 15:56:07 -070048 boolean getExtendedLengthApdusSupported();
Martijn Coenen5289b912010-12-07 18:01:35 -080049}