diff options
author | Nick Pelly <npelly@google.com> | 2009-05-26 19:13:43 -0700 |
---|---|---|
committer | Nick Pelly <npelly@google.com> | 2009-05-26 19:39:21 -0700 |
commit | 0b6955a48bad9aee01ae2f0c06d3f168ca603ab7 (patch) | |
tree | 8cb631ba1b84c0def8752f8dece5a9b70bb2d0fb /core/jni/AndroidRuntime.cpp | |
parent | 1ab55ea04ff25bf3d57a3c5a1656343ac6eb6acb (diff) | |
download | frameworks_base-0b6955a48bad9aee01ae2f0c06d3f168ca603ab7.zip frameworks_base-0b6955a48bad9aee01ae2f0c06d3f168ca603ab7.tar.gz frameworks_base-0b6955a48bad9aee01ae2f0c06d3f168ca603ab7.tar.bz2 |
New BluetoothSocket API.
Modeled on blocking java.net.Socket and java.net.ServerSocket library.
Public interface is:
public final class BluetoothSocket implements Closeable {
public static BluetoothSocket createRfcommSocket(String address, int port) throws IOException;
public static BluetoothSocket createInsecureRfcommSocket(String address, int port) throws IOException;
public void connect() throws IOException;
public void close() throws IOException;
public String getAddress();
public InputStream getInputStream() throws IOException;
public OutputStream getOutputStream() throws IOException;
}
public final class BluetoothServerSocket implements Closeable {
public static BluetoothServerSocket listenUsingRfcommOn(int port) throws IOException;
public static BluetoothServerSocket listenUsingUnsecureRfcommOn(int port) throws IOException;
public BluetoothSocket accept() throws IOException;
public BluetoothSocket accept(int timeout) throws IOException;
public void close() throws IOException;
}
Diffstat (limited to 'core/jni/AndroidRuntime.cpp')
-rw-r--r-- | core/jni/AndroidRuntime.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/core/jni/AndroidRuntime.cpp b/core/jni/AndroidRuntime.cpp index 144bf5d..9584baf 100644 --- a/core/jni/AndroidRuntime.cpp +++ b/core/jni/AndroidRuntime.cpp @@ -144,7 +144,7 @@ extern int register_android_text_KeyCharacterMap(JNIEnv *env); extern int register_android_opengl_classes(JNIEnv *env); extern int register_android_bluetooth_HeadsetBase(JNIEnv* env); extern int register_android_bluetooth_BluetoothAudioGateway(JNIEnv* env); -extern int register_android_bluetooth_RfcommSocket(JNIEnv *env); +extern int register_android_bluetooth_BluetoothSocket(JNIEnv *env); extern int register_android_bluetooth_ScoSocket(JNIEnv *env); extern int register_android_server_BluetoothDeviceService(JNIEnv* env); extern int register_android_server_BluetoothEventLoop(JNIEnv *env); @@ -1159,7 +1159,7 @@ static const RegJNIRec gRegJNI[] = { REG_JNI(register_android_opengl_classes), REG_JNI(register_android_bluetooth_HeadsetBase), REG_JNI(register_android_bluetooth_BluetoothAudioGateway), - REG_JNI(register_android_bluetooth_RfcommSocket), + REG_JNI(register_android_bluetooth_BluetoothSocket), REG_JNI(register_android_bluetooth_ScoSocket), REG_JNI(register_android_server_BluetoothDeviceService), REG_JNI(register_android_server_BluetoothEventLoop), |