blob: 961a3f41cd5eb7fb19e7708f3b68f7c41fd0558e [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;
Andres Morales11d2e532014-07-23 12:39:55 -070029import android.nfc.INfcUnlockHandler;
Martijn Coenen5b1e0322013-09-02 20:38:47 -070030import android.os.Bundle;
Nick Pelly590b73b2010-10-12 13:00:50 -070031
32/**
33 * @hide
34 */
35interface INfcAdapter
36{
Nick Pelly590b73b2010-10-12 13:00:50 -070037 INfcTag getNfcTagInterface();
Martijn Coenena7397882013-07-30 20:07:47 -070038 INfcCardEmulation getNfcCardEmulationInterface();
Jeff Hamiltonbb951c82011-11-08 16:55:13 -060039 INfcAdapterExtras getNfcAdapterExtrasInterface(in String pkg);
Nick Pelly590b73b2010-10-12 13:00:50 -070040
Nick Pelly8d32a012011-08-09 07:03:49 -070041 int getState();
Sunil Jogi3bba8d02012-04-10 13:12:26 -070042 boolean disable(boolean saveState);
Nick Pelly590b73b2010-10-12 13:00:50 -070043 boolean enable();
Nick Pellyc84c89a2011-08-22 22:27:11 -070044 boolean enableNdefPush();
45 boolean disableNdefPush();
46 boolean isNdefPushEnabled();
Andres Morales9c4f4002014-09-08 17:09:16 -070047 void pausePolling(int timeoutInMs);
48 void resumePolling();
Nick Pellyc84c89a2011-08-22 22:27:11 -070049
50 void setForegroundDispatch(in PendingIntent intent,
51 in IntentFilter[] filters, in TechListParcel techLists);
Martijn Coenen5b1e0322013-09-02 20:38:47 -070052 void setAppCallback(in IAppCallback callback);
Martijn Coenendbedb4c2014-07-01 15:52:19 -070053 oneway void invokeBeam();
54 oneway void invokeBeamInternal(in BeamShareData shareData);
Nick Pellyc97a5522012-01-05 15:13:01 +110055
Nick Pelly1f5badc2012-01-24 13:22:58 -080056 void dispatch(in Tag tag);
Martijn Coenen188cddb2012-01-31 22:16:15 -080057
Martijn Coenen5b1e0322013-09-02 20:38:47 -070058 void setReaderMode (IBinder b, IAppCallback callback, int flags, in Bundle extras);
Martijn Coenen188cddb2012-01-31 22:16:15 -080059 void setP2pModes(int initatorModes, int targetModes);
Andres Morales3b33fd22014-05-20 09:25:07 -070060
Andres Morales11d2e532014-07-23 12:39:55 -070061 void addNfcUnlockHandler(INfcUnlockHandler unlockHandler, in int[] techList);
Andres Moralesf9a97942014-08-14 15:43:30 -070062 void removeNfcUnlockHandler(INfcUnlockHandler unlockHandler);
Martijn Coenend8bcfba2014-11-13 15:00:56 -080063
64 void verifyNfcPermission();
Nick Pelly367f41f2011-03-08 11:43:30 -080065}