diff options
author | Andre Eisenbach <eisenbach@google.com> | 2015-04-10 18:56:28 -0700 |
---|---|---|
committer | Andre Eisenbach <eisenbach@google.com> | 2015-04-10 18:56:28 -0700 |
commit | 345f1ee37058465584edb86a4278676f7f7dc43e (patch) | |
tree | 4c6f74483556da81483683b2fcb693cc1f2db593 /jni | |
parent | bbb4110b455b3aa29106d5b4f0a37e1be8e09475 (diff) | |
download | android_packages_apps_Bluetooth-345f1ee37058465584edb86a4278676f7f7dc43e.tar.gz android_packages_apps_Bluetooth-345f1ee37058465584edb86a4278676f7f7dc43e.tar.bz2 android_packages_apps_Bluetooth-345f1ee37058465584edb86a4278676f7f7dc43e.zip |
Add UUIDs to SDP JNI
This ultimately should all be in one place...
Change-Id: I67ee5ce3a61956f1d63a2b04f2098b19db5e8754
Diffstat (limited to 'jni')
-rw-r--r-- | jni/com_android_bluetooth_sdp.cpp | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/jni/com_android_bluetooth_sdp.cpp b/jni/com_android_bluetooth_sdp.cpp index 19c38a610..8c1bc0fc1 100644 --- a/jni/com_android_bluetooth_sdp.cpp +++ b/jni/com_android_bluetooth_sdp.cpp @@ -25,6 +25,26 @@ #include <string.h> +static const uint8_t UUID_OBEX_OBJECT_PUSH[] = {0x00, 0x00, 0x11, 0x05, 0x00, 0x00, 0x10, 0x00, + 0x80, 0x00, 0x00, 0x80, 0x5F, 0x9B, 0x34, 0xFB}; +static const uint8_t UUID_PBAP_PSE[] = {0x00, 0x00, 0x11, 0x2F, 0x00, 0x00, 0x10, 0x00, + 0x80, 0x00, 0x00, 0x80, 0x5F, 0x9B, 0x34, 0xFB}; +static const uint8_t UUID_MAP_MAS[] = {0x00, 0x00, 0x11, 0x32, 0x00, 0x00, 0x10, 0x00, + 0x80, 0x00, 0x00, 0x80, 0x5F, 0x9B, 0x34, 0xFB}; +static const uint8_t UUID_MAP_MNS[] = {0x00, 0x00, 0x11, 0x33, 0x00, 0x00, 0x10, 0x00, + 0x80, 0x00, 0x00, 0x80, 0x5F, 0x9B, 0x34, 0xFB}; +static const uint8_t UUID_SPP[] = {0x00, 0x00, 0x11, 0x01, 0x00, 0x00, 0x10, 0x00, + 0x80, 0x00, 0x00, 0x80, 0x5F, 0x9B, 0x34, 0xFB}; + +// TODO: +// Both the fact that the UUIDs are declared in multiple places, plus the fact +// that there is a mess of UUID comparison and shortening methods will have to +// be fixed. +// The btcore->uuid module should be used for all instances. + +#define UUID_MAX_LENGTH 16 +#define IS_UUID(u1,u2) !memcmp(u1,u2,UUID_MAX_LENGTH) + namespace android { static jmethodID method_sdpRecordFoundCallback; |