diff options
author | Satya Calloji <satyac@broadcom.com> | 2015-03-31 13:58:21 -0700 |
---|---|---|
committer | Satya Calloji <satyac@broadcom.com> | 2015-04-17 14:27:17 -0700 |
commit | 51225020dc3e99c5ffe04d3efde82bbfa64a0d6b (patch) | |
tree | 5f52f6d50a9c42f6c22769a2c4b55af9d2cbe64e /include/hardware/bt_gatt_client.h | |
parent | 9a92a7bff0d0768888cfeef4db6b6fd81bec32ae (diff) | |
download | hardware_libhardware-51225020dc3e99c5ffe04d3efde82bbfa64a0d6b.zip hardware_libhardware-51225020dc3e99c5ffe04d3efde82bbfa64a0d6b.tar.gz hardware_libhardware-51225020dc3e99c5ffe04d3efde82bbfa64a0d6b.tar.bz2 |
LE low power scan feature
LE low power extended scan feature header changes
based on Google spec v0.95
Bug: 20029342
Change-Id: Id1020a4da177d0bc421fdd123c5355a291cc0475
Diffstat (limited to 'include/hardware/bt_gatt_client.h')
-rw-r--r-- | include/hardware/bt_gatt_client.h | 26 |
1 files changed, 25 insertions, 1 deletions
diff --git a/include/hardware/bt_gatt_client.h b/include/hardware/bt_gatt_client.h index 7881dc8..e7e8e82 100644 --- a/include/hardware/bt_gatt_client.h +++ b/include/hardware/bt_gatt_client.h @@ -96,6 +96,25 @@ typedef struct uint16_t u5; } btgatt_test_params_t; +/* BT GATT client error codes */ +typedef enum +{ + BT_GATTC_COMMAND_SUCCESS = 0, /* 0 Command succeeded */ + BT_GATTC_COMMAND_STARTED, /* 1 Command started OK. */ + BT_GATTC_COMMAND_BUSY, /* 2 Device busy with another command */ + BT_GATTC_COMMAND_STORED, /* 3 request is stored in control block */ + BT_GATTC_NO_RESOURCES, /* 4 No resources to issue command */ + BT_GATTC_MODE_UNSUPPORTED, /* 5 Request for 1 or more unsupported modes */ + BT_GATTC_ILLEGAL_VALUE, /* 6 Illegal command /parameter value */ + BT_GATTC_INCORRECT_STATE, /* 7 Device in wrong state for request */ + BT_GATTC_UNKNOWN_ADDR, /* 8 Unknown remote BD address */ + BT_GATTC_DEVICE_TIMEOUT, /* 9 Device timeout */ + BT_GATTC_INVALID_CONTROLLER_OUTPUT,/* 10 An incorrect value was received from HCI */ + BT_GATTC_SECURITY_ERROR, /* 11 Authorization or security failure or not authorized */ + BT_GATTC_DELAYED_ENCRYPTION_CHECK, /*12 Delayed encryption check */ + BT_GATTC_ERR_PROCESSING /* 12 Generic error */ +} btgattc_error_t; + /** BT-GATT Client callback structure. */ /** Callback invoked in response to register_client */ @@ -222,6 +241,10 @@ typedef void (*batchscan_threshold_callback)(int client_if); /** Track ADV VSE callback invoked when tracked device is found or lost */ typedef void (*track_adv_event_callback)(btgatt_track_adv_info_t *p_track_adv_info); +/** Callback invoked when scan parameter setup has completed */ +typedef void (*scan_parameter_setup_completed_callback)(int client_if, + btgattc_error_t status); + typedef struct { register_client_callback register_client_cb; scan_result_callback scan_result_cb; @@ -255,6 +278,7 @@ typedef struct { batchscan_reports_callback batchscan_reports_cb; batchscan_threshold_callback batchscan_threshold_cb; track_adv_event_callback track_adv_event_cb; + scan_parameter_setup_completed_callback scan_parameter_setup_completed_cb; } btgatt_client_callbacks_t; /** Represents the standard BT-GATT client interface. */ @@ -388,7 +412,7 @@ typedef struct { int max_interval, int latency, int timeout); /** Sets the LE scan interval and window in units of N*0.625 msec */ - bt_status_t (*set_scan_parameters)(int scan_interval, int scan_window); + bt_status_t (*set_scan_parameters)(int client_if, int scan_interval, int scan_window); /* Setup the parameters as per spec, user manual specified values and enable multi ADV */ bt_status_t (*multi_adv_enable)(int client_if, int min_interval,int max_interval,int adv_type, |