Nick Pelly | 590b73b | 2010-10-12 13:00:50 -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 | package android.nfc; |
| 18 | |
Jeff Hamilton | 52d3203 | 2011-01-08 15:31:26 -0600 | [diff] [blame] | 19 | import android.app.PendingIntent; |
Jeff Hamilton | 52d3203 | 2011-01-08 15:31:26 -0600 | [diff] [blame] | 20 | import android.content.IntentFilter; |
Martijn Coenen | dbedb4c | 2014-07-01 15:52:19 -0700 | [diff] [blame] | 21 | import android.nfc.BeamShareData; |
Nick Pelly | 590b73b | 2010-10-12 13:00:50 -0700 | [diff] [blame] | 22 | import android.nfc.NdefMessage; |
| 23 | import android.nfc.Tag; |
Jeff Hamilton | d88e9aa | 2011-01-24 14:53:00 -0600 | [diff] [blame] | 24 | import android.nfc.TechListParcel; |
Martijn Coenen | 5b1e032 | 2013-09-02 20:38:47 -0700 | [diff] [blame] | 25 | import android.nfc.IAppCallback; |
Nick Pelly | 367f41f | 2011-03-08 11:43:30 -0800 | [diff] [blame] | 26 | import android.nfc.INfcAdapterExtras; |
Nick Pelly | c84c89a | 2011-08-22 22:27:11 -0700 | [diff] [blame] | 27 | import android.nfc.INfcTag; |
Martijn Coenen | a739788 | 2013-07-30 20:07:47 -0700 | [diff] [blame] | 28 | import android.nfc.INfcCardEmulation; |
Yoshinobu Ito | c52adfe | 2016-01-22 18:14:18 +0900 | [diff] [blame] | 29 | import android.nfc.INfcFCardEmulation; |
Andres Morales | 11d2e53 | 2014-07-23 12:39:55 -0700 | [diff] [blame] | 30 | import android.nfc.INfcUnlockHandler; |
Martijn Coenen | d55def8 | 2016-04-14 15:19:31 +0200 | [diff] [blame] | 31 | import android.nfc.ITagRemovedCallback; |
Love Khanna | 755a8fa | 2017-05-17 15:52:16 +0530 | [diff] [blame] | 32 | import android.nfc.INfcDta; |
Martijn Coenen | 5b1e032 | 2013-09-02 20:38:47 -0700 | [diff] [blame] | 33 | import android.os.Bundle; |
Nick Pelly | 590b73b | 2010-10-12 13:00:50 -0700 | [diff] [blame] | 34 | |
| 35 | /** |
| 36 | * @hide |
| 37 | */ |
| 38 | interface INfcAdapter |
| 39 | { |
Nick Pelly | 590b73b | 2010-10-12 13:00:50 -0700 | [diff] [blame] | 40 | INfcTag getNfcTagInterface(); |
Martijn Coenen | a739788 | 2013-07-30 20:07:47 -0700 | [diff] [blame] | 41 | INfcCardEmulation getNfcCardEmulationInterface(); |
Yoshinobu Ito | c52adfe | 2016-01-22 18:14:18 +0900 | [diff] [blame] | 42 | INfcFCardEmulation getNfcFCardEmulationInterface(); |
Jeff Hamilton | bb951c8 | 2011-11-08 16:55:13 -0600 | [diff] [blame] | 43 | INfcAdapterExtras getNfcAdapterExtrasInterface(in String pkg); |
Love Khanna | 755a8fa | 2017-05-17 15:52:16 +0530 | [diff] [blame] | 44 | INfcDta getNfcDtaInterface(in String pkg); |
Nick Pelly | 8d32a01 | 2011-08-09 07:03:49 -0700 | [diff] [blame] | 45 | int getState(); |
Sunil Jogi | 3bba8d0 | 2012-04-10 13:12:26 -0700 | [diff] [blame] | 46 | boolean disable(boolean saveState); |
Nick Pelly | 590b73b | 2010-10-12 13:00:50 -0700 | [diff] [blame] | 47 | boolean enable(); |
Nick Pelly | c84c89a | 2011-08-22 22:27:11 -0700 | [diff] [blame] | 48 | boolean enableNdefPush(); |
| 49 | boolean disableNdefPush(); |
| 50 | boolean isNdefPushEnabled(); |
Andres Morales | 9c4f400 | 2014-09-08 17:09:16 -0700 | [diff] [blame] | 51 | void pausePolling(int timeoutInMs); |
| 52 | void resumePolling(); |
Nick Pelly | c84c89a | 2011-08-22 22:27:11 -0700 | [diff] [blame] | 53 | |
| 54 | void setForegroundDispatch(in PendingIntent intent, |
| 55 | in IntentFilter[] filters, in TechListParcel techLists); |
Martijn Coenen | 5b1e032 | 2013-09-02 20:38:47 -0700 | [diff] [blame] | 56 | void setAppCallback(in IAppCallback callback); |
Martijn Coenen | dbedb4c | 2014-07-01 15:52:19 -0700 | [diff] [blame] | 57 | oneway void invokeBeam(); |
| 58 | oneway void invokeBeamInternal(in BeamShareData shareData); |
Nick Pelly | c97a552 | 2012-01-05 15:13:01 +1100 | [diff] [blame] | 59 | |
Martijn Coenen | d55def8 | 2016-04-14 15:19:31 +0200 | [diff] [blame] | 60 | boolean ignore(int nativeHandle, int debounceMs, ITagRemovedCallback callback); |
| 61 | |
Nick Pelly | 1f5badc | 2012-01-24 13:22:58 -0800 | [diff] [blame] | 62 | void dispatch(in Tag tag); |
Martijn Coenen | 188cddb | 2012-01-31 22:16:15 -0800 | [diff] [blame] | 63 | |
Martijn Coenen | 5b1e032 | 2013-09-02 20:38:47 -0700 | [diff] [blame] | 64 | void setReaderMode (IBinder b, IAppCallback callback, int flags, in Bundle extras); |
Martijn Coenen | 188cddb | 2012-01-31 22:16:15 -0800 | [diff] [blame] | 65 | void setP2pModes(int initatorModes, int targetModes); |
Andres Morales | 3b33fd2 | 2014-05-20 09:25:07 -0700 | [diff] [blame] | 66 | |
Andres Morales | 11d2e53 | 2014-07-23 12:39:55 -0700 | [diff] [blame] | 67 | void addNfcUnlockHandler(INfcUnlockHandler unlockHandler, in int[] techList); |
Andres Morales | f9a9794 | 2014-08-14 15:43:30 -0700 | [diff] [blame] | 68 | void removeNfcUnlockHandler(INfcUnlockHandler unlockHandler); |
Martijn Coenen | d8bcfba | 2014-11-13 15:00:56 -0800 | [diff] [blame] | 69 | |
| 70 | void verifyNfcPermission(); |
Nick Pelly | 367f41f | 2011-03-08 11:43:30 -0800 | [diff] [blame] | 71 | } |