blob: 8414738cfa44efac27f2614a191d20121baf663c [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;
Martijn Coenen5b1e0322013-09-02 20:38:47 -070028import android.os.Bundle;
Nick Pelly590b73b2010-10-12 13:00:50 -070029
30/**
31 * @hide
32 */
33interface INfcAdapter
34{
Nick Pelly590b73b2010-10-12 13:00:50 -070035 INfcTag getNfcTagInterface();
Martijn Coenena7397882013-07-30 20:07:47 -070036 INfcCardEmulation getNfcCardEmulationInterface();
Jeff Hamiltonbb951c82011-11-08 16:55:13 -060037 INfcAdapterExtras getNfcAdapterExtrasInterface(in String pkg);
Nick Pelly590b73b2010-10-12 13:00:50 -070038
Nick Pelly8d32a012011-08-09 07:03:49 -070039 int getState();
Sunil Jogi3bba8d02012-04-10 13:12:26 -070040 boolean disable(boolean saveState);
Nick Pelly590b73b2010-10-12 13:00:50 -070041 boolean enable();
Nick Pellyc84c89a2011-08-22 22:27:11 -070042 boolean enableNdefPush();
43 boolean disableNdefPush();
44 boolean isNdefPushEnabled();
45
46 void setForegroundDispatch(in PendingIntent intent,
47 in IntentFilter[] filters, in TechListParcel techLists);
Martijn Coenen5b1e0322013-09-02 20:38:47 -070048 void setAppCallback(in IAppCallback callback);
Nick Pellyc97a5522012-01-05 15:13:01 +110049
Nick Pelly1f5badc2012-01-24 13:22:58 -080050 void dispatch(in Tag tag);
Martijn Coenen188cddb2012-01-31 22:16:15 -080051
Martijn Coenen5b1e0322013-09-02 20:38:47 -070052 void setReaderMode (IBinder b, IAppCallback callback, int flags, in Bundle extras);
Martijn Coenen188cddb2012-01-31 22:16:15 -080053 void setP2pModes(int initatorModes, int targetModes);
Nick Pelly367f41f2011-03-08 11:43:30 -080054}