OSDN Git Service

Replace BT_OCTET16 with Octet16
authorJakub Pawlowski <jpawlowski@google.com>
Fri, 15 Jun 2018 00:40:34 +0000 (17:40 -0700)
committerJakub Pawlowski <jpawlowski@google.com>
Tue, 19 Jun 2018 20:37:32 +0000 (20:37 +0000)
commitae57211e7c6ef25788369052817403e30cc9f06f
tree2a35ee0650cd74d0a765d8648d0ecd756b657ea9
parentdb83273e52eafdd49c137e3207cf277b8affc3d0
Replace BT_OCTET16 with Octet16

BT_OCTET16 was a uint8_t[16], that is a pointer.
This means that it was not copyable, and one had to be always aware of
what this type really means when passing it to function.

Octet16 is std::array<uint8_t, 16> and is copyable. It can also be
copied using "=" operator, instead of memcpy, or ARRAY_TO_STREAM.

Octet16 can also be returned from function by value. Thanks to it, some
smp functions can be simplified, by returning value instead of accepting
pointer to output.

Test: net_stack_smp_test
Change-Id: I0687a948e5807f76ec3d1b5d1d4d2ad2b50b87dd
41 files changed:
bta/dm/bta_dm_act.cc
bta/dm/bta_dm_api.cc
bta/dm/bta_dm_ci.cc
bta/dm/bta_dm_int.h
bta/include/bta_api.h
bta/include/bta_dm_ci.h
bta/include/bta_dm_co.h
btif/co/bta_dm_co.cc
btif/include/btif_dm.h
btif/include/btif_storage.h
btif/src/btif_dm.cc
btif/src/btif_storage.cc
stack/btm/btm_ble.cc
stack/btm/btm_ble_addr.cc
stack/btm/btm_ble_int.h
stack/btm/btm_ble_multi_adv.cc
stack/btm/btm_ble_privacy.cc
stack/btm/btm_dev.cc
stack/btm/btm_int.h
stack/btm/btm_int_types.h
stack/btm/btm_sec.cc
stack/btu/btu_hcif.cc
stack/hcic/hciblecmds.cc
stack/hcic/hcicmds.cc
stack/include/bt_types.h
stack/include/btm_api.h
stack/include/btm_api_types.h
stack/include/btm_ble_api.h
stack/include/btm_ble_api_types.h
stack/include/hcimsgs.h
stack/include/smp_api.h
stack/include/smp_api_types.h
stack/smp/smp_act.cc
stack/smp/smp_api.cc
stack/smp/smp_cmac.cc
stack/smp/smp_int.h
stack/smp/smp_keys.cc
stack/smp/smp_utils.cc
stack/test/ble_advertiser_test.cc
stack/test/stack_smp_aes_cmac_test.cc
stack/test/stack_smp_test.cc