*
******************************************************************************/
-#include "bt_target.h"
-
#include <base/bind.h>
-#include <string.h>
+#include <base/location.h>
+#include <cstdint>
+#include <memory>
+#include <vector>
+
+#include "bt_target.h" // Must be first to define build configuration
-#include "bt_common.h"
-#include "bta_gatt_api.h"
-#include "bta_gatts_int.h"
-#include "bta_sys.h"
-#include "stack/include/btu.h"
+#include "bta/gatt/bta_gatts_int.h"
+#include "osi/include/allocator.h"
+#include "stack/include/btu.h" // do_in_main_thread
+#include "types/bluetooth/uuid.h"
#include "types/bt_transport.h"
+#include "types/raw_address.h"
/*****************************************************************************
* Constants
return;
}
- BT_HDR* p_buf = (BT_HDR*)osi_malloc(sizeof(BT_HDR));
+ BT_HDR_RIGID* p_buf = (BT_HDR_RIGID*)osi_malloc(sizeof(BT_HDR_RIGID));
p_buf->event = BTA_GATTS_API_DISABLE_EVT;
bta_sys_sendmsg(p_buf);
bta_sys_deregister(BTA_ID_GATTS);
*
******************************************************************************/
void BTA_GATTS_DeleteService(uint16_t service_id) {
- BT_HDR* p_buf = (BT_HDR*)osi_malloc(sizeof(BT_HDR));
+ BT_HDR_RIGID* p_buf = (BT_HDR_RIGID*)osi_malloc(sizeof(BT_HDR_RIGID));
p_buf->event = BTA_GATTS_API_DEL_SRVC_EVT;
p_buf->layer_specific = service_id;
*
******************************************************************************/
void BTA_GATTS_StopService(uint16_t service_id) {
- BT_HDR* p_buf = (BT_HDR*)osi_malloc(sizeof(BT_HDR));
+ BT_HDR_RIGID* p_buf = (BT_HDR_RIGID*)osi_malloc(sizeof(BT_HDR_RIGID));
p_buf->event = BTA_GATTS_API_STOP_SRVC_EVT;
p_buf->layer_specific = service_id;
*
******************************************************************************/
void BTA_GATTS_Close(uint16_t conn_id) {
- BT_HDR* p_buf = (BT_HDR*)osi_malloc(sizeof(BT_HDR));
+ BT_HDR_RIGID* p_buf = (BT_HDR_RIGID*)osi_malloc(sizeof(BT_HDR_RIGID));
p_buf->event = BTA_GATTS_API_CLOSE_EVT;
p_buf->layer_specific = conn_id;