diff options
author | Martijn Coenen <maco@google.com> | 2012-07-25 08:56:11 -0700 |
---|---|---|
committer | Martijn Coenen <maco@google.com> | 2012-07-25 08:57:34 -0700 |
commit | 4bbd47e5507d4c47a4d722216606307e45195a0a (patch) | |
tree | 5a28cbb02a1b5cadfcac4648d89afe3cec7b1e11 /src/com/android/nfc/nxp/NativeLlcpServiceSocket.java | |
parent | ff94ceff4c2715134c85a84c75d47a5835f1a598 (diff) | |
download | packages_apps_nfc-4bbd47e5507d4c47a4d722216606307e45195a0a.zip packages_apps_nfc-4bbd47e5507d4c47a4d722216606307e45195a0a.tar.gz packages_apps_nfc-4bbd47e5507d4c47a4d722216606307e45195a0a.tar.bz2 |
Move NXP JNI and DeviceHost implementation into separate dir.
Preparation for the new NCI stack. The idea is to
build either the NXP or the NCI stack, triggered
by a makefile switch. To that end, move the
DeviceHost and JNI implementations in their own
directory, so we can build them only if needed.
Change-Id: I8579ec30ceb1908e4cd180cfbd10224aa4bddb8d
Diffstat (limited to 'src/com/android/nfc/nxp/NativeLlcpServiceSocket.java')
-rwxr-xr-x | src/com/android/nfc/nxp/NativeLlcpServiceSocket.java | 53 |
1 files changed, 0 insertions, 53 deletions
diff --git a/src/com/android/nfc/nxp/NativeLlcpServiceSocket.java b/src/com/android/nfc/nxp/NativeLlcpServiceSocket.java deleted file mode 100755 index 531afd8..0000000 --- a/src/com/android/nfc/nxp/NativeLlcpServiceSocket.java +++ /dev/null @@ -1,53 +0,0 @@ -/* - * Copyright (C) 2010 The Android Open Source Project - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.android.nfc.nxp; - -import com.android.nfc.DeviceHost; -import com.android.nfc.DeviceHost.LlcpSocket; - -import java.io.IOException; - -/** - * LlcpServiceSocket represents a LLCP Service to be used in a - * Connection-oriented communication - */ -public class NativeLlcpServiceSocket implements DeviceHost.LlcpServerSocket { - private int mHandle; - private int mLocalMiu; - private int mLocalRw; - private int mLocalLinearBufferLength; - private int mSap; - private String mServiceName; - - public NativeLlcpServiceSocket(){ } - - private native NativeLlcpSocket doAccept(int miu, int rw, int linearBufferLength); - @Override - public LlcpSocket accept() throws IOException { - LlcpSocket socket = doAccept(mLocalMiu, mLocalRw, mLocalLinearBufferLength); - if (socket == null) throw new IOException(); - return socket; - } - - private native boolean doClose(); - @Override - public void close() throws IOException { - if (!doClose()) { - throw new IOException(); - } - } -} |