blob: 940565f09c03ca6341a82f2fa00d7b7f8db10b29 [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 Coenen5b1e0322013-09-02 20:38:47 -070031import android.os.Bundle;
Nick Pelly590b73b2010-10-12 13:00:50 -070032
33/**
34 * @hide
35 */
36interface INfcAdapter
37{
Nick Pelly590b73b2010-10-12 13:00:50 -070038 INfcTag getNfcTagInterface();
Martijn Coenena7397882013-07-30 20:07:47 -070039 INfcCardEmulation getNfcCardEmulationInterface();
Yoshinobu Itoc52adfe2016-01-22 18:14:18 +090040 INfcFCardEmulation getNfcFCardEmulationInterface();
Jeff Hamiltonbb951c82011-11-08 16:55:13 -060041 INfcAdapterExtras getNfcAdapterExtrasInterface(in String pkg);
Nick Pelly590b73b2010-10-12 13:00:50 -070042
Nick Pelly8d32a012011-08-09 07:03:49 -070043 int getState();
Sunil Jogi3bba8d02012-04-10 13:12:26 -070044 boolean disable(boolean saveState);
Nick Pelly590b73b2010-10-12 13:00:50 -070045 boolean enable();
Nick Pellyc84c89a2011-08-22 22:27:11 -070046 boolean enableNdefPush();
47 boolean disableNdefPush();
48 boolean isNdefPushEnabled();
Andres Morales9c4f4002014-09-08 17:09:16 -070049 void pausePolling(int timeoutInMs);
50 void resumePolling();
Nick Pellyc84c89a2011-08-22 22:27:11 -070051
52 void setForegroundDispatch(in PendingIntent intent,
53 in IntentFilter[] filters, in TechListParcel techLists);
Martijn Coenen5b1e0322013-09-02 20:38:47 -070054 void setAppCallback(in IAppCallback callback);
Martijn Coenendbedb4c2014-07-01 15:52:19 -070055 oneway void invokeBeam();
56 oneway void invokeBeamInternal(in BeamShareData shareData);
Nick Pellyc97a5522012-01-05 15:13:01 +110057
Nick Pelly1f5badc2012-01-24 13:22:58 -080058 void dispatch(in Tag tag);
Martijn Coenen188cddb2012-01-31 22:16:15 -080059
Martijn Coenen5b1e0322013-09-02 20:38:47 -070060 void setReaderMode (IBinder b, IAppCallback callback, int flags, in Bundle extras);
Martijn Coenen188cddb2012-01-31 22:16:15 -080061 void setP2pModes(int initatorModes, int targetModes);
Andres Morales3b33fd22014-05-20 09:25:07 -070062
Andres Morales11d2e532014-07-23 12:39:55 -070063 void addNfcUnlockHandler(INfcUnlockHandler unlockHandler, in int[] techList);
Andres Moralesf9a97942014-08-14 15:43:30 -070064 void removeNfcUnlockHandler(INfcUnlockHandler unlockHandler);
Martijn Coenend8bcfba2014-11-13 15:00:56 -080065
66 void verifyNfcPermission();
Nick Pelly367f41f2011-03-08 11:43:30 -080067}