blob: 10988c6bb8c3695d7507c3f4a0c414b132b692a6 [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;
Nick Pelly590b73b2010-10-12 13:00:50 -070021import android.nfc.NdefMessage;
22import android.nfc.Tag;
Jeff Hamiltond88e9aa2011-01-24 14:53:00 -060023import android.nfc.TechListParcel;
Martijn Coenen5b1e0322013-09-02 20:38:47 -070024import android.nfc.IAppCallback;
Nick Pelly367f41f2011-03-08 11:43:30 -080025import android.nfc.INfcAdapterExtras;
Nick Pellyc84c89a2011-08-22 22:27:11 -070026import android.nfc.INfcTag;
Martijn Coenena7397882013-07-30 20:07:47 -070027import android.nfc.INfcCardEmulation;
Andres Morales38a7ed02013-11-14 19:02:56 -080028import android.nfc.INfcUnlockSettings;
Martijn Coenen5b1e0322013-09-02 20:38:47 -070029import android.os.Bundle;
Nick Pelly590b73b2010-10-12 13:00:50 -070030
31/**
32 * @hide
33 */
34interface INfcAdapter
35{
Nick Pelly590b73b2010-10-12 13:00:50 -070036 INfcTag getNfcTagInterface();
Martijn Coenena7397882013-07-30 20:07:47 -070037 INfcCardEmulation getNfcCardEmulationInterface();
Jeff Hamiltonbb951c82011-11-08 16:55:13 -060038 INfcAdapterExtras getNfcAdapterExtrasInterface(in String pkg);
Andres Morales38a7ed02013-11-14 19:02:56 -080039 INfcUnlockSettings getNfcUnlockSettingsInterface();
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();
47
48 void setForegroundDispatch(in PendingIntent intent,
49 in IntentFilter[] filters, in TechListParcel techLists);
Martijn Coenen5b1e0322013-09-02 20:38:47 -070050 void setAppCallback(in IAppCallback callback);
Nick Pellyc97a5522012-01-05 15:13:01 +110051
Nick Pelly1f5badc2012-01-24 13:22:58 -080052 void dispatch(in Tag tag);
Martijn Coenen188cddb2012-01-31 22:16:15 -080053
Martijn Coenen5b1e0322013-09-02 20:38:47 -070054 void setReaderMode (IBinder b, IAppCallback callback, int flags, in Bundle extras);
Martijn Coenen188cddb2012-01-31 22:16:15 -080055 void setP2pModes(int initatorModes, int targetModes);
Nick Pelly367f41f2011-03-08 11:43:30 -080056}