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