blob: 6801618e6a685a24da20ee9617e85eda6ac361d2 [file] [log] [blame]
Nick Pelly590b73b2010-10-12 13:00:50 -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
17package android.nfc;
18
Jeff Hamilton52d32032011-01-08 15:31:26 -060019import android.app.PendingIntent;
Jeff Hamilton52d32032011-01-08 15:31:26 -060020import android.content.IntentFilter;
Martijn Coenendbedb4c2014-07-01 15:52:19 -070021import android.nfc.BeamShareData;
Nick Pelly590b73b2010-10-12 13:00:50 -070022import android.nfc.NdefMessage;
23import android.nfc.Tag;
Jeff Hamiltond88e9aa2011-01-24 14:53:00 -060024import android.nfc.TechListParcel;
Martijn Coenen5b1e0322013-09-02 20:38:47 -070025import android.nfc.IAppCallback;
Nick Pelly367f41f2011-03-08 11:43:30 -080026import android.nfc.INfcAdapterExtras;
Nick Pellyc84c89a2011-08-22 22:27:11 -070027import android.nfc.INfcTag;
Martijn Coenena7397882013-07-30 20:07:47 -070028import android.nfc.INfcCardEmulation;
Yoshinobu Itoc52adfe2016-01-22 18:14:18 +090029import android.nfc.INfcFCardEmulation;
Andres Morales11d2e532014-07-23 12:39:55 -070030import android.nfc.INfcUnlockHandler;
Martijn Coenend55def82016-04-14 15:19:31 +020031import android.nfc.ITagRemovedCallback;
Love Khanna755a8fa2017-05-17 15:52:16 +053032import android.nfc.INfcDta;
Martijn Coenen5b1e0322013-09-02 20:38:47 -070033import android.os.Bundle;
Nick Pelly590b73b2010-10-12 13:00:50 -070034
35/**
36 * @hide
37 */
38interface INfcAdapter
39{
Nick Pelly590b73b2010-10-12 13:00:50 -070040 INfcTag getNfcTagInterface();
Martijn Coenena7397882013-07-30 20:07:47 -070041 INfcCardEmulation getNfcCardEmulationInterface();
Yoshinobu Itoc52adfe2016-01-22 18:14:18 +090042 INfcFCardEmulation getNfcFCardEmulationInterface();
Jeff Hamiltonbb951c82011-11-08 16:55:13 -060043 INfcAdapterExtras getNfcAdapterExtrasInterface(in String pkg);
Love Khanna755a8fa2017-05-17 15:52:16 +053044 INfcDta getNfcDtaInterface(in String pkg);
Nick Pelly8d32a012011-08-09 07:03:49 -070045 int getState();
Sunil Jogi3bba8d02012-04-10 13:12:26 -070046 boolean disable(boolean saveState);
Nick Pelly590b73b2010-10-12 13:00:50 -070047 boolean enable();
Nick Pellyc84c89a2011-08-22 22:27:11 -070048 boolean enableNdefPush();
49 boolean disableNdefPush();
50 boolean isNdefPushEnabled();
Andres Morales9c4f4002014-09-08 17:09:16 -070051 void pausePolling(int timeoutInMs);
52 void resumePolling();
Nick Pellyc84c89a2011-08-22 22:27:11 -070053
54 void setForegroundDispatch(in PendingIntent intent,
55 in IntentFilter[] filters, in TechListParcel techLists);
Martijn Coenen5b1e0322013-09-02 20:38:47 -070056 void setAppCallback(in IAppCallback callback);
Martijn Coenendbedb4c2014-07-01 15:52:19 -070057 oneway void invokeBeam();
58 oneway void invokeBeamInternal(in BeamShareData shareData);
Nick Pellyc97a5522012-01-05 15:13:01 +110059
Martijn Coenend55def82016-04-14 15:19:31 +020060 boolean ignore(int nativeHandle, int debounceMs, ITagRemovedCallback callback);
61
Nick Pelly1f5badc2012-01-24 13:22:58 -080062 void dispatch(in Tag tag);
Martijn Coenen188cddb2012-01-31 22:16:15 -080063
Martijn Coenen5b1e0322013-09-02 20:38:47 -070064 void setReaderMode (IBinder b, IAppCallback callback, int flags, in Bundle extras);
Martijn Coenen188cddb2012-01-31 22:16:15 -080065 void setP2pModes(int initatorModes, int targetModes);
Andres Morales3b33fd22014-05-20 09:25:07 -070066
Andres Morales11d2e532014-07-23 12:39:55 -070067 void addNfcUnlockHandler(INfcUnlockHandler unlockHandler, in int[] techList);
Andres Moralesf9a97942014-08-14 15:43:30 -070068 void removeNfcUnlockHandler(INfcUnlockHandler unlockHandler);
Martijn Coenend8bcfba2014-11-13 15:00:56 -080069
70 void verifyNfcPermission();
Nick Pelly367f41f2011-03-08 11:43:30 -080071}