1/*
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
19import android.app.PendingIntent;
20import android.content.IntentFilter;
21import android.nfc.BeamShareData;
22import android.nfc.NdefMessage;
23import android.nfc.Tag;
24import android.nfc.TechListParcel;
25import android.nfc.IAppCallback;
26import android.nfc.INfcAdapterExtras;
27import android.nfc.INfcTag;
28import android.nfc.INfcCardEmulation;
29import android.nfc.INfcUnlockHandler;
30import android.os.Bundle;
31
32/**
33 * @hide
34 */
35interface INfcAdapter
36{
37    INfcTag getNfcTagInterface();
38    INfcCardEmulation getNfcCardEmulationInterface();
39    INfcAdapterExtras getNfcAdapterExtrasInterface(in String pkg);
40
41    int getState();
42    boolean disable(boolean saveState);
43    boolean enable();
44    boolean enableNdefPush();
45    boolean disableNdefPush();
46    boolean isNdefPushEnabled();
47    void pausePolling(int timeoutInMs);
48    void resumePolling();
49
50    void setForegroundDispatch(in PendingIntent intent,
51            in IntentFilter[] filters, in TechListParcel techLists);
52    void setAppCallback(in IAppCallback callback);
53    oneway void invokeBeam();
54    oneway void invokeBeamInternal(in BeamShareData shareData);
55
56    void dispatch(in Tag tag);
57
58    void setReaderMode (IBinder b, IAppCallback callback, int flags, in Bundle extras);
59    void setP2pModes(int initatorModes, int targetModes);
60
61    void addNfcUnlockHandler(INfcUnlockHandler unlockHandler, in int[] techList);
62    void removeNfcUnlockHandler(INfcUnlockHandler unlockHandler);
63
64    void verifyNfcPermission();
65}
66