diff options
author | Prerepa Viswanadham <dham@google.com> | 2015-05-01 10:57:25 -0700 |
---|---|---|
committer | Prerepa Viswanadham <dham@google.com> | 2015-05-01 10:57:25 -0700 |
commit | f0254aa0a0bcdcf54084efb91a324b386006d575 (patch) | |
tree | 0b0e30092bd784172983851a4b502c48cc21b3b9 /include | |
parent | 4bdd7cbd47c7b89f6a47c3dbba648a3d95f9a45d (diff) | |
parent | 51225020dc3e99c5ffe04d3efde82bbfa64a0d6b (diff) | |
download | hardware_libhardware-f0254aa0a0bcdcf54084efb91a324b386006d575.zip hardware_libhardware-f0254aa0a0bcdcf54084efb91a324b386006d575.tar.gz hardware_libhardware-f0254aa0a0bcdcf54084efb91a324b386006d575.tar.bz2 |
Merge commit '5122502' into master_merge
Diffstat (limited to 'include')
-rw-r--r-- | include/hardware/bluetooth.h | 2 | ||||
-rw-r--r-- | include/hardware/bt_gatt_client.h | 26 |
2 files changed, 27 insertions, 1 deletions
diff --git a/include/hardware/bluetooth.h b/include/hardware/bluetooth.h index 1be4009..893f85d 100644 --- a/include/hardware/bluetooth.h +++ b/include/hardware/bluetooth.h @@ -152,6 +152,8 @@ typedef struct uint8_t activity_energy_info_supported; uint16_t scan_result_storage_size; uint16_t total_trackable_advertisers; + bool extended_scan_support; + bool debug_logging_supported; }bt_local_le_features_t; /* Bluetooth Adapter and Remote Device property types */ 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, |