INfcAdapter.aidl revision 367f41f8f61126c2ab34a34cc676756a9fc23ac2
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.ComponentName; 21import android.content.IntentFilter; 22import android.nfc.NdefMessage; 23import android.nfc.Tag; 24import android.nfc.TechListParcel; 25import android.nfc.ILlcpSocket; 26import android.nfc.ILlcpServiceSocket; 27import android.nfc.ILlcpConnectionlessSocket; 28import android.nfc.INfcTag; 29import android.nfc.IP2pTarget; 30import android.nfc.IP2pInitiator; 31import android.nfc.INfcAdapterExtras; 32 33/** 34 * @hide 35 */ 36interface INfcAdapter 37{ 38 ILlcpSocket getLlcpInterface(); 39 ILlcpConnectionlessSocket getLlcpConnectionlessInterface(); 40 ILlcpServiceSocket getLlcpServiceInterface(); 41 INfcTag getNfcTagInterface(); 42 IP2pTarget getP2pTargetInterface(); 43 IP2pInitiator getP2pInitiatorInterface(); 44 INfcAdapterExtras getNfcAdapterExtrasInterface(); 45 46 // NfcAdapter-class related methods 47 boolean isEnabled(); 48 NdefMessage localGet(); 49 void localSet(in NdefMessage message); 50 void enableForegroundDispatch(in ComponentName activity, in PendingIntent intent, 51 in IntentFilter[] filters, in TechListParcel techLists); 52 void disableForegroundDispatch(in ComponentName activity); 53 void enableForegroundNdefPush(in ComponentName activity, in NdefMessage msg); 54 void disableForegroundNdefPush(in ComponentName activity); 55 56 // Non-public methods 57 // TODO: check and complete 58 int createLlcpConnectionlessSocket(int sap); 59 int createLlcpServiceSocket(int sap, String sn, int miu, int rw, int linearBufferLength); 60 int createLlcpSocket(int sap, int miu, int rw, int linearBufferLength); 61 boolean disable(); 62 boolean enable(); 63 String getProperties(String param); 64 int setProperties(String param, String value); 65} 66