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;

}
diff --git a/core/jni/android_bluetooth_common.h b/core/jni/android_bluetooth_common.h
index 69092dd..e5b8813 100644
--- a/core/jni/android_bluetooth_common.h
+++ b/core/jni/android_bluetooth_common.h
@@ -144,7 +144,7 @@
 jobjectArray dbus_returns_array_of_strings(JNIEnv *env, DBusMessage *reply);
 jbyteArray dbus_returns_array_of_bytes(JNIEnv *env, DBusMessage *reply);
 
-void get_bdaddr(const char *str, bdaddr_t *ba);
+int get_bdaddr(const char *str, bdaddr_t *ba);
 void get_bdaddr_as_string(const bdaddr_t *ba, char *str);
 
 bool debug_no_encrypt();