summaryrefslogtreecommitdiffstats
path: root/core/jni/android_bluetooth_common.h
diff options
context:
space:
mode:
authorNick Pelly <npelly@google.com>2009-05-26 19:13:43 -0700
committerNick Pelly <npelly@google.com>2009-05-26 19:39:21 -0700
commit0b6955a48bad9aee01ae2f0c06d3f168ca603ab7 (patch)
tree8cb631ba1b84c0def8752f8dece5a9b70bb2d0fb /core/jni/android_bluetooth_common.h
parent1ab55ea04ff25bf3d57a3c5a1656343ac6eb6acb (diff)
downloadframeworks_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/android_bluetooth_common.h')
-rw-r--r--core/jni/android_bluetooth_common.h2
1 files changed, 1 insertions, 1 deletions
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 @@ jboolean dbus_returns_boolean(JNIEnv *env, DBusMessage *reply);
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();