summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJakub Pawlowski <jpawlowski@google.com>2017-07-05 11:13:00 -0700
committerJakub Pawlowski <jpawlowski@google.com>2017-07-06 22:39:27 +0000
commitbec70c64ce74a7438d13a1c79e5898182bfcf3a9 (patch)
treed66ecbb058ad689535f202790d6e671400d143cf
parentf12e85e1d3aa640922686d9c4cab992684812535 (diff)
downloadlibhardware-bec70c64ce74a7438d13a1c79e5898182bfcf3a9.tar.gz
Make RawAddress into a class (2/3)
* Add libbluetooth-types - library containing types implementation, that is common between stystem/bt and packages/apps/Bluetooth. It must be included in every project using btif interface. * Put Raw Address implementation into libbluetooth-types * Unify all "to/from string" helper methods into ToString and FromString * bd_addr_empty -> RawAddress::kEmpty * bd_addr_any -> RawAddress::kAny Also fix leaks in jni str2addr by adding ReleaseStringUTFChars Test: types_unittest Change-Id: I2a0eb8d50ff777f494eed26bd58b5c502d2a0716 Merged-In: I2a0eb8d50ff777f494eed26bd58b5c502d2a0716
-rw-r--r--include/hardware/bluetooth.h7
1 files changed, 2 insertions, 5 deletions
diff --git a/include/hardware/bluetooth.h b/include/hardware/bluetooth.h
index 119c35d0..9fd91cb2 100644
--- a/include/hardware/bluetooth.h
+++ b/include/hardware/bluetooth.h
@@ -24,6 +24,8 @@
#include <hardware/hardware.h>
+#include <raw_address.h>
+
__BEGIN_DECLS
/**
@@ -55,11 +57,6 @@ __BEGIN_DECLS
/** Bluetooth test interface IDs */
#define BT_TEST_INTERFACE_MCAP_ID "mcap_test"
-/** Bluetooth Address */
-typedef struct {
- uint8_t address[6];
-} __attribute__((packed))RawAddress;
-
/** Bluetooth Device Name */
typedef struct {
uint8_t name[249];