ble_gatt_client
|
gatt client protocol core functions More...
#include "att.h"
#include "bluetooth.h"
#include "uuid.h"
#include "gatt-helpers.h"
#include "util.h"
#include "queue.h"
#include "gatt-db.h"
#include "gatt-client.h"
#include <assert.h>
#include <limits.h>
#include <sys/uio.h>
Go to the source code of this file.
Data Structures | |
struct | bt_gatt_client |
bluetooth GATT client structure More... | |
struct | request |
Request data structure. More... | |
struct | notify_chrc |
struct | notify_data |
struct | handle_range |
struct | discovery_op |
struct | chrc |
struct | service_changed_op |
struct | pdu_data |
struct | read_op |
struct | read_long_op |
struct | write_op |
struct | long_write_op |
struct | prep_write_op |
Macros | |
#define | MAX(a, b) ((a) > (b) ? (a) : (b)) |
#define | MIN(a, b) ((a) < (b) ? (a) : (b)) |
#define | UUID_BYTES (BT_GATT_UUID_SIZE * sizeof(uint8_t)) |
#define | GATT_SVC_UUID 0x1801 |
#define | SVC_CHNGD_UUID 0x2a05 |
Typedefs | |
typedef void(* | discovery_op_complete_func_t )(struct discovery_op *op, bool success, uint8_t att_ecode) |
typedef void(* | discovery_op_fail_func_t )(struct discovery_op *op) |
Functions | |
static struct request * | request_ref (struct request *req) |
static struct request * | request_create (struct bt_gatt_client *client) |
static void | request_unref (void *data) |
static struct notify_data * | notify_data_ref (struct notify_data *notify_data) |
static void | notify_data_unref (void *data) |
static void | find_ccc (struct gatt_db_attribute *attr, void *user_data) |
static struct notify_chrc * | notify_chrc_create (struct bt_gatt_client *client, uint16_t value_handle) |
static void | notify_chrc_free (void *data) |
static bool | match_notify_data_id (const void *a, const void *b) |
static bool | match_notify_data_handle_range (const void *a, const void *b) |
static bool | match_notify_chrc_handle_range (const void *a, const void *b) |
static void | gatt_client_remove_all_notify_in_range (struct bt_gatt_client *client, uint16_t start_handle, uint16_t end_handle) |
static void | gatt_client_remove_notify_chrcs_in_range (struct bt_gatt_client *client, uint16_t start_handle, uint16_t end_handle) |
static void | discovery_op_free (struct discovery_op *op) |
static struct discovery_op * | discovery_op_create (struct bt_gatt_client *client, uint16_t start, uint16_t end, discovery_op_complete_func_t complete_func, discovery_op_fail_func_t failure_func) |
static struct discovery_op * | discovery_op_ref (struct discovery_op *op) |
static void | discovery_op_unref (void *data) |
static void | discovery_req_clear (struct bt_gatt_client *client) |
static void | discover_chrcs_cb (bool success, uint8_t att_ecode, struct bt_gatt_result *result, void *user_data) |
static void | discover_incl_cb (bool success, uint8_t att_ecode, struct bt_gatt_result *result, void *user_data) |
static void | discover_descs_cb (bool success, uint8_t att_ecode, struct bt_gatt_result *result, void *user_data) |
static bool | discover_descs (struct discovery_op *op, bool *discovering) |
static void | discover_secondary_cb (bool success, uint8_t att_ecode, struct bt_gatt_result *result, void *user_data) |
static void | discover_primary_cb (bool success, uint8_t att_ecode, struct bt_gatt_result *result, void *user_data) |
static void | notify_client_ready (struct bt_gatt_client *client, bool success, uint8_t att_ecode) |
static void | exchange_mtu_cb (bool success, uint8_t att_ecode, void *user_data) |
static void | process_service_changed (struct bt_gatt_client *client, uint16_t start_handle, uint16_t end_handle) |
static void | service_changed_cb (uint16_t value_handle, const uint8_t *value, uint16_t length, void *user_data) |
static void | complete_notify_request (void *data) |
static bool | notify_data_write_ccc (struct notify_data *notify_data, bool enable, bt_att_response_func_t callback) |
static uint8_t | process_error (const void *pdu, uint16_t length) |
static void | enable_ccc_callback (uint8_t opcode, const void *pdu, uint16_t length, void *user_data) |
static bool | match_notify_chrc_value_handle (const void *a, const void *b) |
static unsigned int | register_notify (struct bt_gatt_client *client, uint16_t handle, bt_gatt_client_register_callback_t callback, bt_gatt_client_notify_callback_t notify, void *user_data, bt_gatt_client_destroy_func_t destroy) |
static void | get_first_attribute (struct gatt_db_attribute *attrib, void *user_data) |
static void | service_changed_register_cb (uint16_t att_ecode, void *user_data) |
static bool | register_service_changed (struct bt_gatt_client *client) |
static void | service_changed_complete (struct discovery_op *op, bool success, uint8_t att_ecode) |
static void | service_changed_failure (struct discovery_op *op) |
static void | init_complete (struct discovery_op *op, bool success, uint8_t att_ecode) |
static void | init_fail (struct discovery_op *op) |
static bool | gatt_client_init (struct bt_gatt_client *client, uint16_t mtu) |
static void | disable_ccc_callback (uint8_t opcode, const void *pdu, uint16_t length, void *user_data) |
static void | complete_unregister_notify (void *data) |
static void | notify_handler (void *data, void *user_data) |
static void | notify_cb (uint8_t opcode, const void *pdu, uint16_t length, void *user_data) |
static void | notify_data_cleanup (void *data) |
static void | bt_gatt_client_free (struct bt_gatt_client *client) |
static void | att_disconnect_cb (int err, void *user_data) |
struct bt_gatt_client * | bt_gatt_client_new (struct gatt_db *db, struct bt_att *att, uint16_t mtu) |
struct bt_gatt_client * | bt_gatt_client_ref (struct bt_gatt_client *client) |
void | bt_gatt_client_unref (struct bt_gatt_client *client) |
bool | bt_gatt_client_is_ready (struct bt_gatt_client *client) |
bool | bt_gatt_client_set_ready_handler (struct bt_gatt_client *client, bt_gatt_client_callback_t callback, void *user_data, bt_gatt_client_destroy_func_t destroy) |
bool | bt_gatt_client_set_service_changed (struct bt_gatt_client *client, bt_gatt_client_service_changed_callback_t callback, void *user_data, bt_gatt_client_destroy_func_t destroy) |
bool | bt_gatt_client_set_debug (struct bt_gatt_client *client, bt_gatt_client_debug_func_t callback, void *user_data, bt_gatt_client_destroy_func_t destroy) |
uint16_t | bt_gatt_client_get_mtu (struct bt_gatt_client *client) |
struct gatt_db * | bt_gatt_client_get_db (struct bt_gatt_client *client) |
static bool | match_req_id (const void *a, const void *b) |
static void | cancel_long_write_cb (uint8_t opcode, const void *pdu, uint16_t len, void *user_data) |
static bool | cancel_long_write_req (struct bt_gatt_client *client, struct request *req) |
static void | cancel_prep_write_cb (uint8_t opcode, const void *pdu, uint16_t len, void *user_data) |
static bool | cancel_prep_write_session (struct bt_gatt_client *client, struct request *req) |
static bool | cancel_request (struct request *req) |
bool | bt_gatt_client_cancel (struct bt_gatt_client *client, unsigned int id) |
bool | bt_gatt_client_cancel_all (struct bt_gatt_client *client) |
static void | destroy_read_op (void *data) |
static void | read_cb (uint8_t opcode, const void *pdu, uint16_t length, void *user_data) |
unsigned int | bt_gatt_client_read_value (struct bt_gatt_client *client, uint16_t value_handle, bt_gatt_client_read_callback_t callback, void *user_data, bt_gatt_client_destroy_func_t destroy) |
static void | read_multiple_cb (uint8_t opcode, const void *pdu, uint16_t length, void *user_data) |
unsigned int | bt_gatt_client_read_multiple (struct bt_gatt_client *client, uint16_t *handles, uint8_t num_handles, bt_gatt_client_read_callback_t callback, void *user_data, bt_gatt_client_destroy_func_t destroy) |
static void | destroy_read_long_op (void *data) |
static bool | append_chunk (struct read_long_op *op, const uint8_t *data, uint16_t len) |
static void | read_long_cb (uint8_t opcode, const void *pdu, uint16_t length, void *user_data) |
unsigned int | bt_gatt_client_read_long_value (struct bt_gatt_client *client, uint16_t value_handle, uint16_t offset, bt_gatt_client_read_callback_t callback, void *user_data, bt_gatt_client_destroy_func_t destroy) |
unsigned int | bt_gatt_client_write_without_response (struct bt_gatt_client *client, uint16_t value_handle, bool signed_write, const uint8_t *value, uint16_t length) |
static void | destroy_write_op (void *data) |
static void | write_cb (uint8_t opcode, const void *pdu, uint16_t length, void *user_data) |
unsigned int | bt_gatt_client_write_value (struct bt_gatt_client *client, uint16_t value_handle, const uint8_t *value, uint16_t length, bt_gatt_client_callback_t callback, void *user_data, bt_gatt_client_destroy_func_t destroy) |
static void | long_write_op_free (void *data) |
static void | prepare_write_cb (uint8_t opcode, const void *pdu, uint16_t length, void *user_data) |
static void | complete_write_long_op (struct request *req, bool success, uint8_t att_ecode, bool reliable_error) |
static void | handle_next_prep_write (struct request *req) |
static void | start_next_long_write (struct bt_gatt_client *client) |
static void | execute_write_cb (uint8_t opcode, const void *pdu, uint16_t length, void *user_data) |
unsigned int | bt_gatt_client_write_long_value (struct bt_gatt_client *client, bool reliable, uint16_t value_handle, uint16_t offset, const uint8_t *value, uint16_t length, bt_gatt_client_write_long_callback_t callback, void *user_data, bt_gatt_client_destroy_func_t destroy) |
static void | destroy_prep_write_op (void *data) |
static void | prep_write_cb (uint8_t opcode, const void *pdu, uint16_t length, void *user_data) |
static struct request * | get_reliable_request (struct bt_gatt_client *client, unsigned int id) |
unsigned int | bt_gatt_client_prepare_write (struct bt_gatt_client *client, unsigned int id, uint16_t value_handle, uint16_t offset, const uint8_t *value, uint16_t length, bt_gatt_client_write_long_callback_t callback, void *user_data, bt_gatt_client_destroy_func_t destroy) |
static void | exec_write_cb (uint8_t opcode, const void *pdu, uint16_t length, void *user_data) |
unsigned int | bt_gatt_client_write_execute (struct bt_gatt_client *client, unsigned int id, bt_gatt_client_callback_t callback, void *user_data, bt_gatt_client_destroy_func_t destroy) |
unsigned int | bt_gatt_client_register_notify (struct bt_gatt_client *client, uint16_t chrc_value_handle, bt_gatt_client_register_callback_t callback, bt_gatt_client_notify_callback_t notify, void *user_data, bt_gatt_client_destroy_func_t destroy) |
bool | bt_gatt_client_unregister_notify (struct bt_gatt_client *client, unsigned int id) |
bool | bt_gatt_client_set_security (struct bt_gatt_client *client, int level) |
int | bt_gatt_client_get_security (struct bt_gatt_client *client) |
gatt client protocol core functions
Definition in file gatt-client.c.
#define GATT_SVC_UUID 0x1801 |
Definition at line 56 of file gatt-client.c.
#define MAX | ( | a, | |
b | |||
) | ((a) > (b) ? (a) : (b)) |
Definition at line 47 of file gatt-client.c.
Referenced by gatt_client_init().
#define MIN | ( | a, | |
b | |||
) | ((a) < (b) ? (a) : (b)) |
Definition at line 51 of file gatt-client.c.
Referenced by bt_gatt_client_write_long_value(), and prepare_write_cb().
#define SVC_CHNGD_UUID 0x2a05 |
Definition at line 57 of file gatt-client.c.
Referenced by register_service_changed().
#define UUID_BYTES (BT_GATT_UUID_SIZE * sizeof(uint8_t)) |
Definition at line 54 of file gatt-client.c.
typedef void(* discovery_op_complete_func_t)(struct discovery_op *op, bool success, uint8_t att_ecode) |
Definition at line 372 of file gatt-client.c.
typedef void(* discovery_op_fail_func_t)(struct discovery_op *op) |
Definition at line 375 of file gatt-client.c.
|
static |
Definition at line 2197 of file gatt-client.c.
References BT_ATT_MAX_VALUE_LEN, read_long_op::iov, and read_long_op::offset.
Referenced by read_long_cb().
|
static |
Definition at line 1716 of file gatt-client.c.
References bt_gatt_client::att, bt_att_unref(), bt_gatt_client::disc_id, bt_gatt_client::in_init, notify_client_ready(), and bt_gatt_client::ready.
Referenced by bt_gatt_client_new().
bool bt_gatt_client_cancel | ( | struct bt_gatt_client * | client, |
unsigned int | id | ||
) |
Definition at line 1959 of file gatt-client.c.
References bt_gatt_client::att, cancel_request(), match_req_id(), bt_gatt_client::pending_requests, queue_remove_if(), and UINT_TO_PTR.
Referenced by cmd_write_execute().
bool bt_gatt_client_cancel_all | ( | struct bt_gatt_client * | client | ) |
Definition at line 1974 of file gatt-client.c.
References bt_gatt_client::att, bt_att_cancel(), bt_gatt_request_cancel(), bt_gatt_request_unref(), cancel_request(), bt_gatt_client::discovery_req, bt_gatt_client::mtu_req_id, bt_gatt_client::pending_requests, and queue_remove_all().
Referenced by bt_gatt_client_free().
|
static |
Definition at line 1687 of file gatt-client.c.
References bt_gatt_client::att, bt_att_unref(), bt_att_unregister(), bt_att_unregister_disconnect(), bt_gatt_client_cancel_all(), bt_gatt_client::db, bt_gatt_client::debug_data, bt_gatt_client::debug_destroy, bt_gatt_client::disc_id, gatt_db_unref(), bt_gatt_client::ind_id, bt_gatt_client::long_write_queue, notify_chrc_free(), bt_gatt_client::notify_chrcs, notify_data_cleanup(), bt_gatt_client::notify_id, bt_gatt_client::notify_list, bt_gatt_client::pending_requests, queue_destroy(), bt_gatt_client::ready_data, bt_gatt_client::ready_destroy, request_unref(), and bt_gatt_client::svc_chngd_queue.
Referenced by bt_gatt_client_new(), and bt_gatt_client_unref().
struct gatt_db* bt_gatt_client_get_db | ( | struct bt_gatt_client * | client | ) |
Definition at line 1881 of file gatt-client.c.
References bt_gatt_client::db.
uint16_t bt_gatt_client_get_mtu | ( | struct bt_gatt_client * | client | ) |
Definition at line 1873 of file gatt-client.c.
References bt_gatt_client::att, and bt_att_get_mtu().
int bt_gatt_client_get_security | ( | struct bt_gatt_client * | client | ) |
Definition at line 3063 of file gatt-client.c.
References bt_gatt_client::att, and bt_att_get_security().
Referenced by cmd_get_security().
bool bt_gatt_client_is_ready | ( | struct bt_gatt_client * | client | ) |
Definition at line 1815 of file gatt-client.c.
References bt_gatt_client::ready.
Referenced by bt_gatt_client_register_notify(), cmd_get_security(), cmd_read_long_value(), cmd_read_multiple(), cmd_read_value(), cmd_register_notify(), cmd_services(), cmd_set_security(), cmd_unregister_notify(), cmd_write_execute(), cmd_write_long_value(), cmd_write_prepare(), and cmd_write_value().
struct bt_gatt_client* bt_gatt_client_new | ( | struct gatt_db * | db, |
struct bt_att * | att, | ||
uint16_t | mtu | ||
) |
Definition at line 1733 of file gatt-client.c.
References bt_gatt_client::att, att_disconnect_cb(), BT_ATT_OP_HANDLE_VAL_IND, BT_ATT_OP_HANDLE_VAL_NOT, bt_att_ref(), bt_att_register(), bt_att_register_disconnect(), bt_gatt_client_free(), bt_gatt_client_ref(), bt_gatt_client::db, bt_gatt_client::disc_id, gatt_client_init(), gatt_db_ref(), bt_gatt_client::ind_id, bt_gatt_client::long_write_queue, new0, notify_cb(), bt_gatt_client::notify_chrcs, bt_gatt_client::notify_id, bt_gatt_client::notify_list, bt_gatt_client::pending_requests, queue_new(), and bt_gatt_client::svc_chngd_queue.
Referenced by client_create().
unsigned int bt_gatt_client_prepare_write | ( | struct bt_gatt_client * | client, |
unsigned int | id, | ||
uint16_t | value_handle, | ||
uint16_t | offset, | ||
const uint8_t * | value, | ||
uint16_t | length, | ||
bt_gatt_client_write_long_callback_t | callback, | ||
void * | user_data, | ||
bt_gatt_client_destroy_func_t | destroy | ||
) |
Definition at line 2846 of file gatt-client.c.
References bt_gatt_client::att, request::att_id, BT_ATT_OP_PREP_WRITE_REQ, bt_att_send(), prep_write_op::callback, request::data, bt_gatt_client::debug_callback, bt_gatt_client::debug_data, request::destroy, prep_write_op::destroy, destroy_prep_write_op(), get_reliable_request(), request::id, bt_gatt_client::in_long_write, prep_write_op::pdu, prep_write_op::pdu_len, request::prep_write, prep_write_cb(), put_le16(), bt_gatt_client::reliable_write_session_id, request_unref(), prep_write_op::user_data, and util_debug().
Referenced by cmd_write_prepare().
unsigned int bt_gatt_client_read_long_value | ( | struct bt_gatt_client * | client, |
uint16_t | value_handle, | ||
uint16_t | offset, | ||
bt_gatt_client_read_callback_t | callback, | ||
void * | user_data, | ||
bt_gatt_client_destroy_func_t | destroy | ||
) |
Definition at line 2279 of file gatt-client.c.
References bt_gatt_client::att, request::att_id, BT_ATT_OP_READ_BLOB_REQ, bt_att_send(), read_long_op::callback, read_long_op::client, request::data, request::destroy, read_long_op::destroy, destroy_read_long_op(), request::id, new0, read_long_op::offset, put_le16(), read_long_cb(), request_create(), request_unref(), read_long_op::user_data, and read_long_op::value_handle.
Referenced by cmd_read_long_value().
unsigned int bt_gatt_client_read_multiple | ( | struct bt_gatt_client * | client, |
uint16_t * | handles, | ||
uint8_t | num_handles, | ||
bt_gatt_client_read_callback_t | callback, | ||
void * | user_data, | ||
bt_gatt_client_destroy_func_t | destroy | ||
) |
Definition at line 2122 of file gatt-client.c.
References bt_gatt_client::att, request::att_id, bt_att_get_mtu(), BT_ATT_OP_READ_MULT_REQ, bt_att_send(), read_op::callback, request::data, request::destroy, read_op::destroy, destroy_read_op(), request::id, new0, put_le16(), read_multiple_cb(), request_create(), request_unref(), and read_op::user_data.
Referenced by cmd_read_multiple().
unsigned int bt_gatt_client_read_value | ( | struct bt_gatt_client * | client, |
uint16_t | value_handle, | ||
bt_gatt_client_read_callback_t | callback, | ||
void * | user_data, | ||
bt_gatt_client_destroy_func_t | destroy | ||
) |
client | |
value_handle | |
callback | |
user_data | |
destroy |
Definition at line 2050 of file gatt-client.c.
References bt_gatt_client::att, request::att_id, BT_ATT_OP_READ_REQ, bt_att_send(), read_op::callback, request::data, request::destroy, read_op::destroy, destroy_read_op(), request::id, new0, put_le16(), read_cb(), request_create(), request_unref(), and read_op::user_data.
Referenced by cmd_read_value().
struct bt_gatt_client* bt_gatt_client_ref | ( | struct bt_gatt_client * | client | ) |
Definition at line 1794 of file gatt-client.c.
References bt_gatt_client::ref_count.
Referenced by bt_gatt_client_new(), complete_write_long_op(), enable_ccc_callback(), execute_write_cb(), notify_cb(), and notify_client_ready().
unsigned int bt_gatt_client_register_notify | ( | struct bt_gatt_client * | client, |
uint16_t | chrc_value_handle, | ||
bt_gatt_client_register_callback_t | callback, | ||
bt_gatt_client_notify_callback_t | notify, | ||
void * | user_data, | ||
bt_gatt_client_destroy_func_t | destroy | ||
) |
Definition at line 3018 of file gatt-client.c.
References bt_gatt_client_is_ready(), bt_gatt_client::db, bt_gatt_client::in_svc_chngd, and register_notify().
Referenced by cmd_register_notify().
bool bt_gatt_client_set_debug | ( | struct bt_gatt_client * | client, |
bt_gatt_client_debug_func_t | callback, | ||
void * | user_data, | ||
bt_gatt_client_destroy_func_t | destroy | ||
) |
Definition at line 1856 of file gatt-client.c.
References bt_gatt_client::debug_callback, bt_gatt_client::debug_data, and bt_gatt_client::debug_destroy.
Referenced by client_create().
bool bt_gatt_client_set_ready_handler | ( | struct bt_gatt_client * | client, |
bt_gatt_client_callback_t | callback, | ||
void * | user_data, | ||
bt_gatt_client_destroy_func_t | destroy | ||
) |
Definition at line 1820 of file gatt-client.c.
References bt_gatt_client::ready_callback, bt_gatt_client::ready_data, and bt_gatt_client::ready_destroy.
Referenced by client_create().
bool bt_gatt_client_set_security | ( | struct bt_gatt_client * | client, |
int | level | ||
) |
Definition at line 3055 of file gatt-client.c.
References bt_gatt_client::att, and bt_att_set_security().
Referenced by cmd_set_security().
bool bt_gatt_client_set_service_changed | ( | struct bt_gatt_client * | client, |
bt_gatt_client_service_changed_callback_t | callback, | ||
void * | user_data, | ||
bt_gatt_client_destroy_func_t | destroy | ||
) |
Definition at line 1838 of file gatt-client.c.
References bt_gatt_client::svc_chngd_callback, bt_gatt_client::svc_chngd_data, and bt_gatt_client::svc_chngd_destroy.
Referenced by client_create().
void bt_gatt_client_unref | ( | struct bt_gatt_client * | client | ) |
Definition at line 1804 of file gatt-client.c.
References bt_gatt_client_free(), and bt_gatt_client::ref_count.
Referenced by client_destroy(), complete_write_long_op(), enable_ccc_callback(), execute_write_cb(), notify_cb(), and notify_client_ready().
bool bt_gatt_client_unregister_notify | ( | struct bt_gatt_client * | client, |
unsigned int | id | ||
) |
Definition at line 3035 of file gatt-client.c.
References notify_chrc::ccc_write_id, notify_data::chrc, complete_unregister_notify(), match_notify_data_id(), notify_chrc::notify_count, bt_gatt_client::notify_list, queue_remove_if(), and UINT_TO_PTR.
Referenced by cmd_unregister_notify().
unsigned int bt_gatt_client_write_execute | ( | struct bt_gatt_client * | client, |
unsigned int | id, | ||
bt_gatt_client_callback_t | callback, | ||
void * | user_data, | ||
bt_gatt_client_destroy_func_t | destroy | ||
) |
Definition at line 2966 of file gatt-client.c.
References bt_gatt_client::att, request::att_id, BT_ATT_OP_EXEC_WRITE_REQ, bt_att_send(), write_op::callback, write_op::client, request::data, request::destroy, write_op::destroy, destroy_write_op(), exec_write_cb(), bt_gatt_client::in_long_write, match_req_id(), new0, bt_gatt_client::pending_requests, queue_find(), bt_gatt_client::reliable_write_session_id, request_unref(), UINT_TO_PTR, and write_op::user_data.
Referenced by cmd_write_execute().
unsigned int bt_gatt_client_write_long_value | ( | struct bt_gatt_client * | client, |
bool | reliable, | ||
uint16_t | value_handle, | ||
uint16_t | offset, | ||
const uint8_t * | value, | ||
uint16_t | length, | ||
bt_gatt_client_write_long_callback_t | callback, | ||
void * | user_data, | ||
bt_gatt_client_destroy_func_t | destroy | ||
) |
Definition at line 2670 of file gatt-client.c.
References bt_gatt_client::att, request::att_id, bt_att_get_mtu(), BT_ATT_OP_PREP_WRITE_REQ, bt_att_send(), long_write_op::callback, long_write_op::client, long_write_op::cur_length, request::data, request::destroy, long_write_op::destroy, request::id, bt_gatt_client::in_long_write, long_write_op::length, request::long_write, long_write_op_free(), bt_gatt_client::long_write_queue, MIN, new0, long_write_op::offset, prepare_write_cb(), put_le16(), queue_push_tail(), long_write_op::reliable, bt_gatt_client::reliable_write_session_id, request_create(), request_unref(), long_write_op::user_data, long_write_op::value, and long_write_op::value_handle.
Referenced by cmd_write_long_value().
unsigned int bt_gatt_client_write_value | ( | struct bt_gatt_client * | client, |
uint16_t | value_handle, | ||
const uint8_t * | value, | ||
uint16_t | length, | ||
bt_gatt_client_callback_t | callback, | ||
void * | user_data, | ||
bt_gatt_client_destroy_func_t | destroy | ||
) |
Definition at line 2405 of file gatt-client.c.
References bt_gatt_client::att, request::att_id, BT_ATT_OP_WRITE_REQ, bt_att_send(), write_op::callback, request::data, request::destroy, write_op::destroy, destroy_write_op(), request::id, new0, put_le16(), request_create(), request_unref(), write_op::user_data, and write_cb().
Referenced by cmd_write_value().
unsigned int bt_gatt_client_write_without_response | ( | struct bt_gatt_client * | client, |
uint16_t | value_handle, | ||
bool | signed_write, | ||
const uint8_t * | value, | ||
uint16_t | length | ||
) |
Definition at line 2328 of file gatt-client.c.
References bt_gatt_client::att, request::att_id, bt_att_get_security(), BT_ATT_OP_SIGNED_WRITE_CMD, BT_ATT_OP_WRITE_CMD, bt_att_send(), BT_SECURITY_LOW, request::id, put_le16(), request_create(), and request_unref().
Referenced by cmd_write_value().
|
static |
Definition at line 1897 of file gatt-client.c.
References bt_gatt_client::in_long_write, bt_gatt_client::long_write_queue, and queue_isempty().
Referenced by cancel_long_write_req().
|
static |
Definition at line 1906 of file gatt-client.c.
References bt_gatt_client::att, request::att_id, BT_ATT_OP_EXEC_WRITE_REQ, bt_att_send(), cancel_long_write_cb(), bt_gatt_client::long_write_queue, and queue_remove().
Referenced by cancel_request().
|
static |
Definition at line 1926 of file gatt-client.c.
References request::client, and bt_gatt_client::reliable_write_session_id.
Referenced by cancel_prep_write_session().
|
static |
Definition at line 1935 of file gatt-client.c.
References bt_gatt_client::att, BT_ATT_OP_EXEC_WRITE_REQ, bt_att_send(), cancel_prep_write_cb(), and request_unref().
Referenced by cancel_request().
|
static |
Definition at line 1946 of file gatt-client.c.
References bt_gatt_client::att, request::att_id, bt_att_cancel(), cancel_long_write_req(), cancel_prep_write_session(), request::client, request::long_write, request::prep_write, and request::removed.
Referenced by bt_gatt_client_cancel(), and bt_gatt_client_cancel_all().
|
static |
Definition at line 1149 of file gatt-client.c.
References notify_data::att_id, notify_data::callback, notify_data::chrc, notify_chrc::notify_count, and notify_data::user_data.
Referenced by enable_ccc_callback(), and register_notify().
|
static |
Definition at line 1608 of file gatt-client.c.
References bt_gatt_client::att, notify_data::att_id, bt_att_cancel(), notify_chrc::ccc_handle, notify_data::chrc, notify_data::client, disable_ccc_callback(), notify_chrc::notify_count, notify_data_unref(), and notify_data_write_ccc().
Referenced by bt_gatt_client_unregister_notify().
|
static |
Definition at line 2571 of file gatt-client.c.
References bt_gatt_client::att, long_write_op::att_ecode, request::att_id, BT_ATT_OP_EXEC_WRITE_REQ, bt_att_send(), bt_gatt_client_ref(), bt_gatt_client_unref(), long_write_op::callback, long_write_op::client, request::data, execute_write_cb(), long_write_op::reliable_error, request_ref(), request_unref(), start_next_long_write(), long_write_op::success, and long_write_op::user_data.
Referenced by handle_next_prep_write(), and prepare_write_cb().
|
static |
Definition at line 2768 of file gatt-client.c.
References prep_write_op::destroy, prep_write_op::pdu, and prep_write_op::user_data.
Referenced by bt_gatt_client_prepare_write().
|
static |
Definition at line 2186 of file gatt-client.c.
References read_long_op::destroy, read_long_op::iov, and read_long_op::user_data.
Referenced by bt_gatt_client_read_long_value().
|
static |
Definition at line 2000 of file gatt-client.c.
References read_op::destroy, and read_op::user_data.
Referenced by bt_gatt_client_read_multiple(), and bt_gatt_client_read_value().
|
static |
Definition at line 2373 of file gatt-client.c.
References write_op::destroy, and write_op::user_data.
Referenced by bt_gatt_client_write_execute(), and bt_gatt_client_write_value().
|
static |
Definition at line 1586 of file gatt-client.c.
References notify_chrc::ccc_write_id, notify_data::chrc, enable_ccc_callback(), notify_chrc::notify_count, notify_data_write_ccc(), queue_pop_head(), notify_chrc::reg_notify_queue, and notify_data::user_data.
Referenced by complete_unregister_notify().
|
static |
Definition at line 771 of file gatt-client.c.
References bt_gatt_client::att, BT_ATT_ERROR_ATTRIBUTE_NOT_FOUND, bt_gatt_discover_characteristics(), bt_gatt_iter_init(), bt_gatt_iter_next_characteristic(), bt_gatt_result_characteristic_count(), bt_uuid128_create(), bt_uuid_to_string(), discovery_op::client, discovery_op::complete_func, discovery_op::cur_svc, uint128_t::data, bt_gatt_client::debug_callback, bt_gatt_client::debug_data, discover_descs(), discovery_op_ref(), discovery_op_unref(), bt_gatt_client::discovery_req, discovery_req_clear(), chrc::end_handle, gatt_db_attribute_get_service_handles(), gatt_db_service_set_active(), MAX_LEN_UUID_STR, new0, discovery_op::pending_chrcs, discovery_op::pending_svcs, chrc::properties, queue_pop_head(), queue_push_tail(), chrc::start_handle, discovery_op::success, util_debug(), chrc::uuid, and chrc::value_handle.
Referenced by discover_descs_cb(), and discover_incl_cb().
|
static |
Definition at line 612 of file gatt-client.c.
References bt_gatt_client::att, bt_gatt_discover_descriptors(), discovery_op::client, discovery_op::cur_svc, bt_gatt_client::debug_callback, bt_gatt_client::debug_data, discover_descs_cb(), discovery_op_ref(), discovery_op_unref(), bt_gatt_client::discovery_req, chrc::end_handle, gatt_db_attribute_get_handle(), gatt_db_service_insert_characteristic(), discovery_op::pending_chrcs, chrc::properties, queue_pop_head(), util_debug(), chrc::uuid, and chrc::value_handle.
Referenced by discover_chrcs_cb(), and discover_descs_cb().
|
static |
Definition at line 673 of file gatt-client.c.
References bt_gatt_client::att, BT_ATT_ERROR_ATTRIBUTE_NOT_FOUND, bt_gatt_discover_characteristics(), bt_gatt_iter_init(), bt_gatt_iter_next_descriptor(), bt_gatt_result_descriptor_count(), bt_uuid128_create(), bt_uuid_to_string(), discovery_op::client, discovery_op::complete_func, discovery_op::cur_svc, uint128_t::data, bt_gatt_client::debug_callback, bt_gatt_client::debug_data, discover_chrcs_cb(), discover_descs(), discovery_op_ref(), discovery_op_unref(), bt_gatt_client::discovery_req, discovery_req_clear(), gatt_db_attribute_get_handle(), gatt_db_attribute_get_service_handles(), gatt_db_service_insert_descriptor(), gatt_db_service_set_active(), gatt_db_attribute::handle, MAX_LEN_UUID_STR, discovery_op::pending_svcs, queue_pop_head(), discovery_op::success, util_debug(), and gatt_db_attribute::uuid.
Referenced by discover_descs().
|
static |
Definition at line 468 of file gatt-client.c.
References bt_gatt_client::att, BT_ATT_ERROR_ATTRIBUTE_NOT_FOUND, bt_gatt_discover_characteristics(), bt_gatt_discover_included_services(), bt_gatt_iter_init(), bt_gatt_iter_next_included_service(), bt_gatt_result_included_count(), bt_uuid128_create(), bt_uuid_to_string(), discovery_op::client, discovery_op::complete_func, discovery_op::cur_svc, uint128_t::data, bt_gatt_client::db, bt_gatt_client::debug_callback, bt_gatt_client::debug_data, discover_chrcs_cb(), discovery_op_ref(), discovery_op_unref(), bt_gatt_client::discovery_req, discovery_req_clear(), gatt_db_attribute_get_handle(), gatt_db_attribute_get_service_handles(), gatt_db_get_attribute(), gatt_db_service_add_included(), gatt_db_attribute::handle, MAX_LEN_UUID_STR, discovery_op::pending_svcs, queue_pop_head(), queue_push_tail(), discovery_op::success, discovery_op::tmp_queue, util_debug(), and gatt_db_attribute::uuid.
Referenced by discover_secondary_cb().
|
static |
Definition at line 986 of file gatt-client.c.
References bt_gatt_client::att, bt_gatt_discover_secondary_services(), bt_gatt_iter_init(), bt_gatt_iter_next_service(), bt_gatt_result_service_count(), bt_uuid128_create(), bt_uuid_to_string(), discovery_op::client, discovery_op::complete_func, uint128_t::data, bt_gatt_client::db, bt_gatt_client::debug_callback, bt_gatt_client::debug_data, discover_secondary_cb(), discovery_op_ref(), discovery_op_unref(), bt_gatt_client::discovery_req, discovery_req_clear(), discovery_op::end, gatt_db_clear_range(), gatt_db_insert_service(), gatt_db_service_get_active(), MAX_LEN_UUID_STR, discovery_op::pending_svcs, queue_isempty(), queue_push_tail(), discovery_op::start, discovery_op::success, util_debug(), and gatt_db_attribute::uuid.
Referenced by exchange_mtu_cb(), and process_service_changed().
|
static |
Definition at line 880 of file gatt-client.c.
References bt_gatt_client::att, BT_ATT_ERROR_ATTRIBUTE_NOT_FOUND, BT_ATT_ERROR_UNSUPPORTED_GROUP_TYPE, bt_gatt_discover_included_services(), bt_gatt_iter_init(), bt_gatt_iter_next_service(), bt_gatt_result_service_count(), bt_uuid128_create(), bt_uuid_to_string(), discovery_op::client, discovery_op::complete_func, discovery_op::cur_svc, uint128_t::data, bt_gatt_client::db, bt_gatt_client::debug_callback, bt_gatt_client::debug_data, discover_incl_cb(), discovery_op_ref(), discovery_op_unref(), bt_gatt_client::discovery_req, discovery_req_clear(), gatt_db_attribute_get_service_handles(), gatt_db_clear_range(), gatt_db_insert_service(), gatt_db_service_get_active(), MAX_LEN_UUID_STR, discovery_op::pending_svcs, queue_pop_head(), queue_push_tail(), discovery_op::success, discovery_op::tmp_queue, util_debug(), and gatt_db_attribute::uuid.
Referenced by discover_primary_cb().
|
static |
Definition at line 399 of file gatt-client.c.
References discovery_op::client, discovery_op::complete_func, discovery_op_free(), discovery_op::end, discovery_op::failure_func, new0, discovery_op::pending_chrcs, discovery_op::pending_svcs, queue_new(), discovery_op::start, and discovery_op::tmp_queue.
Referenced by gatt_client_init(), and process_service_changed().
|
static |
Definition at line 391 of file gatt-client.c.
References discovery_op::pending_chrcs, discovery_op::pending_svcs, queue_destroy(), and discovery_op::tmp_queue.
Referenced by discovery_op_create(), discovery_op_unref(), gatt_client_init(), and process_service_changed().
|
static |
Definition at line 435 of file gatt-client.c.
References discovery_op::ref_count.
Referenced by discover_chrcs_cb(), discover_descs(), discover_descs_cb(), discover_incl_cb(), discover_primary_cb(), discover_secondary_cb(), exchange_mtu_cb(), gatt_client_init(), and process_service_changed().
|
static |
Definition at line 442 of file gatt-client.c.
References discovery_op_free(), discovery_op::failure_func, discovery_op::ref_count, and discovery_op::success.
Referenced by discover_chrcs_cb(), discover_descs(), discover_descs_cb(), discover_incl_cb(), discover_primary_cb(), discover_secondary_cb(), exchange_mtu_cb(), gatt_client_init(), and process_service_changed().
|
static |
Definition at line 455 of file gatt-client.c.
References bt_gatt_request_unref(), and bt_gatt_client::discovery_req.
Referenced by discover_chrcs_cb(), discover_descs_cb(), discover_incl_cb(), discover_primary_cb(), and discover_secondary_cb().
|
static |
Definition at line 1205 of file gatt-client.c.
References BT_ATT_OP_ERROR_RSP, bt_gatt_client_ref(), bt_gatt_client_unref(), notify_data::callback, notify_chrc::ccc_write_id, notify_data::chrc, notify_data::client, complete_notify_request(), notify_chrc::notify_count, notify_data_write_ccc(), bt_gatt_client::notify_list, process_error(), queue_pop_head(), queue_remove(), queue_remove_all(), notify_chrc::reg_notify_queue, and notify_data::user_data.
Referenced by disable_ccc_callback(), and register_notify().
|
static |
Definition at line 1087 of file gatt-client.c.
References bt_gatt_client::att, BT_ATT_ERROR_REQUEST_NOT_SUPPORTED, bt_att_get_mtu(), bt_gatt_discover_all_primary_services(), discovery_op::client, bt_gatt_client::debug_callback, bt_gatt_client::debug_data, discover_primary_cb(), discovery_op_ref(), discovery_op_unref(), bt_gatt_client::discovery_req, bt_gatt_client::in_init, bt_gatt_client::mtu_req_id, notify_client_ready(), discovery_op::success, and util_debug().
Referenced by gatt_client_init().
|
static |
Definition at line 2934 of file gatt-client.c.
References BT_ATT_OP_ERROR_RSP, BT_ATT_OP_EXEC_WRITE_RSP, write_op::callback, write_op::client, request::data, process_error(), bt_gatt_client::reliable_write_session_id, start_next_long_write(), and write_op::user_data.
Referenced by bt_gatt_client_write_execute().
|
static |
Definition at line 2546 of file gatt-client.c.
References long_write_op::att_ecode, BT_ATT_OP_ERROR_RSP, BT_ATT_OP_EXEC_WRITE_RSP, bt_gatt_client_ref(), bt_gatt_client_unref(), long_write_op::callback, long_write_op::client, request::data, process_error(), long_write_op::reliable_error, start_next_long_write(), long_write_op::success, and long_write_op::user_data.
Referenced by complete_write_long_op().
|
static |
Definition at line 239 of file gatt-client.c.
References bt_uuid16_create(), bt_uuid_cmp(), GATT_CLIENT_CHARAC_CFG_UUID, gatt_db_attribute_get_type(), gatt_db_attribute::user_data, and gatt_db_attribute::uuid.
Referenced by notify_chrc_create().
|
static |
Definition at line 1553 of file gatt-client.c.
References bt_gatt_client::att, BT_ATT_DEFAULT_LE_MTU, bt_gatt_exchange_mtu(), discovery_op_create(), discovery_op_free(), discovery_op_ref(), discovery_op_unref(), exchange_mtu_cb(), bt_gatt_client::in_init, init_complete(), init_fail(), MAX, bt_gatt_client::mtu_req_id, and bt_gatt_client::ready.
Referenced by bt_gatt_client_new().
|
static |
Definition at line 344 of file gatt-client.c.
References handle_range::end, match_notify_data_handle_range(), notify_data_unref(), bt_gatt_client::notify_list, queue_remove_all(), and handle_range::start.
Referenced by process_service_changed().
|
static |
Definition at line 357 of file gatt-client.c.
References handle_range::end, match_notify_chrc_handle_range(), notify_chrc_free(), bt_gatt_client::notify_chrcs, queue_remove_all(), and handle_range::start.
Referenced by process_service_changed().
|
static |
Definition at line 1331 of file gatt-client.c.
References gatt_db_attribute::user_data.
Referenced by register_service_changed().
|
static |
Definition at line 2819 of file gatt-client.c.
References request::data, match_req_id(), new0, bt_gatt_client::pending_requests, queue_find(), request_create(), and UINT_TO_PTR.
Referenced by bt_gatt_client_prepare_write().
|
static |
Definition at line 2485 of file gatt-client.c.
References bt_gatt_client::att, request::att_id, BT_ATT_OP_PREP_WRITE_REQ, bt_att_send(), long_write_op::client, complete_write_long_op(), long_write_op::cur_length, request::data, long_write_op::index, long_write_op::offset, prepare_write_cb(), put_le16(), request_ref(), request_unref(), long_write_op::success, long_write_op::value, and long_write_op::value_handle.
Referenced by prepare_write_cb(), and start_next_long_write().
|
static |
Definition at line 1519 of file gatt-client.c.
References discovery_op::client, bt_gatt_client::debug_callback, bt_gatt_client::debug_data, bt_gatt_client::in_init, notify_client_ready(), register_service_changed(), discovery_op::success, and util_debug().
Referenced by gatt_client_init().
|
static |
Definition at line 1546 of file gatt-client.c.
References discovery_op::client, bt_gatt_client::db, and gatt_db_clear().
Referenced by gatt_client_init().
|
static |
Definition at line 2469 of file gatt-client.c.
References long_write_op::destroy, long_write_op::user_data, and long_write_op::value.
Referenced by bt_gatt_client_write_long_value().
|
static |
Definition at line 335 of file gatt-client.c.
References handle_range::end, handle_range::start, and notify_chrc::value_handle.
Referenced by gatt_client_remove_notify_chrcs_in_range().
|
static |
Definition at line 1247 of file gatt-client.c.
References PTR_TO_UINT, and notify_chrc::value_handle.
Referenced by register_notify().
|
static |
Definition at line 325 of file gatt-client.c.
References notify_data::chrc, handle_range::end, handle_range::start, and notify_chrc::value_handle.
Referenced by gatt_client_remove_all_notify_in_range().
|
static |
Definition at line 312 of file gatt-client.c.
References notify_data::id, and PTR_TO_UINT.
Referenced by bt_gatt_client_unregister_notify().
|
static |
Definition at line 1889 of file gatt-client.c.
References request::id, and PTR_TO_UINT.
Referenced by bt_gatt_client_cancel(), bt_gatt_client_write_execute(), and get_reliable_request().
|
static |
Definition at line 1656 of file gatt-client.c.
References bt_gatt_client::att, BT_ATT_OP_HANDLE_VAL_CONF, BT_ATT_OP_HANDLE_VAL_IND, bt_att_send(), bt_gatt_client_ref(), bt_gatt_client_unref(), pdu_data::length, notify_handler(), bt_gatt_client::notify_list, pdu_data::pdu, and queue_foreach().
Referenced by bt_gatt_client_new().
|
static |
Definition at line 255 of file gatt-client.c.
References bt_uuid16_create(), bt_uuid_cmp(), notify_chrc::ccc_handle, bt_gatt_client::db, find_ccc(), GATT_CHARAC_UUID, gatt_db_attribute_get_char_data(), gatt_db_attribute_get_handle(), gatt_db_attribute_get_type(), gatt_db_get_attribute(), gatt_db_service_foreach_desc(), new0, bt_gatt_client::notify_chrcs, notify_chrc::properties, queue_new(), queue_push_tail(), notify_chrc::reg_notify_queue, and notify_chrc::value_handle.
Referenced by register_notify().
|
static |
Definition at line 304 of file gatt-client.c.
References notify_data_unref(), queue_destroy(), and notify_chrc::reg_notify_queue.
Referenced by bt_gatt_client_free(), and gatt_client_remove_notify_chrcs_in_range().
|
static |
Definition at line 1075 of file gatt-client.c.
References bt_gatt_client_ref(), bt_gatt_client_unref(), bt_gatt_client::ready, bt_gatt_client::ready_callback, and bt_gatt_client::ready_data.
Referenced by att_disconnect_cb(), exchange_mtu_cb(), init_complete(), and service_changed_register_cb().
|
static |
Definition at line 1677 of file gatt-client.c.
References bt_gatt_client::att, notify_data::att_id, bt_att_cancel(), notify_data::client, and notify_data_unref().
Referenced by bt_gatt_client_free().
|
static |
Definition at line 219 of file gatt-client.c.
References notify_data::ref_count.
Referenced by notify_data_write_ccc().
|
static |
Definition at line 226 of file gatt-client.c.
References notify_data::destroy, notify_data::ref_count, and notify_data::user_data.
Referenced by complete_unregister_notify(), gatt_client_remove_all_notify_in_range(), notify_chrc_free(), notify_data_cleanup(), and notify_data_write_ccc().
|
static |
Definition at line 1160 of file gatt-client.c.
References bt_gatt_client::att, notify_data::att_id, BT_ATT_OP_WRITE_REQ, bt_att_send(), BT_GATT_CHRC_PROP_INDICATE, BT_GATT_CHRC_PROP_NOTIFY, notify_chrc::ccc_handle, notify_chrc::ccc_write_id, notify_data::chrc, notify_data::client, notify_data_ref(), notify_data_unref(), notify_data::pdu, notify_chrc::properties, and put_le16().
Referenced by complete_unregister_notify(), disable_ccc_callback(), enable_ccc_callback(), and register_notify().
|
static |
Definition at line 1632 of file gatt-client.c.
References notify_data::chrc, get_le16(), pdu_data::length, notify_data::notify, pdu_data::pdu, notify_data::user_data, and notify_chrc::value_handle.
Referenced by notify_cb().
|
static |
Definition at line 2779 of file gatt-client.c.
References BT_ATT_OP_ERROR_RSP, BT_ATT_OP_PREP_WRITE_RSP, prep_write_op::callback, request::data, prep_write_op::pdu, prep_write_op::pdu_len, process_error(), and prep_write_op::user_data.
Referenced by bt_gatt_client_prepare_write().
|
static |
Definition at line 2607 of file gatt-client.c.
References bt_gatt_client::att, long_write_op::att_ecode, bt_att_get_mtu(), BT_ATT_OP_ERROR_RSP, BT_ATT_OP_PREP_WRITE_RSP, long_write_op::client, complete_write_long_op(), long_write_op::cur_length, request::data, get_le16(), handle_next_prep_write(), long_write_op::index, long_write_op::length, MIN, long_write_op::offset, process_error(), long_write_op::reliable, long_write_op::reliable_error, long_write_op::success, long_write_op::value, and long_write_op::value_handle.
Referenced by bt_gatt_client_write_long_value(), and handle_next_prep_write().
|
static |
Definition at line 1193 of file gatt-client.c.
References bt_att_pdu_error_rsp::ecode.
Referenced by enable_ccc_callback(), exec_write_cb(), execute_write_cb(), prep_write_cb(), prepare_write_cb(), read_cb(), read_long_cb(), read_multiple_cb(), and write_cb().
|
static |
Definition at line 1440 of file gatt-client.c.
References bt_gatt_client::att, bt_gatt_discover_primary_services(), bt_gatt_client::db, bt_gatt_client::debug_callback, bt_gatt_client::debug_data, discover_primary_cb(), discovery_op_create(), discovery_op_free(), discovery_op_ref(), discovery_op_unref(), bt_gatt_client::discovery_req, gatt_client_remove_all_notify_in_range(), gatt_client_remove_notify_chrcs_in_range(), gatt_db_clear_range(), bt_gatt_client::in_svc_chngd, service_changed_complete(), service_changed_failure(), and util_debug().
Referenced by service_changed_cb(), and service_changed_complete().
|
static |
Definition at line 2010 of file gatt-client.c.
References BT_ATT_OP_ERROR_RSP, BT_ATT_OP_READ_RSP, read_op::callback, request::data, process_error(), and read_op::user_data.
Referenced by bt_gatt_client_read_value().
|
static |
Definition at line 2220 of file gatt-client.c.
References append_chunk(), bt_gatt_client::att, request::att_id, bt_att_get_mtu(), BT_ATT_MAX_VALUE_LEN, BT_ATT_OP_ERROR_RSP, BT_ATT_OP_READ_BLOB_REQ, BT_ATT_OP_READ_BLOB_RSP, bt_att_send(), read_long_op::callback, read_long_op::client, request::data, read_long_op::iov, read_long_op::offset, process_error(), put_le16(), request_ref(), request_unref(), read_long_op::user_data, and read_long_op::value_handle.
Referenced by bt_gatt_client_read_long_value().
|
static |
Definition at line 2095 of file gatt-client.c.
References BT_ATT_OP_ERROR_RSP, BT_ATT_OP_READ_MULT_RSP, read_op::callback, request::data, process_error(), and read_op::user_data.
Referenced by bt_gatt_client_read_multiple().
|
static |
Definition at line 1255 of file gatt-client.c.
References notify_data::callback, notify_chrc::ccc_handle, notify_chrc::ccc_write_id, notify_data::chrc, notify_data::client, complete_notify_request(), notify_data::destroy, enable_ccc_callback(), notify_data::id, match_notify_chrc_value_handle(), new0, bt_gatt_client::next_reg_id, notify_data::notify, notify_chrc_create(), bt_gatt_client::notify_chrcs, notify_chrc::notify_count, notify_data_write_ccc(), bt_gatt_client::notify_list, queue_find(), queue_push_tail(), queue_remove(), notify_data::ref_count, notify_chrc::reg_notify_queue, UINT_TO_PTR, and notify_data::user_data.
Referenced by bt_gatt_client_register_notify(), and register_service_changed().
|
static |
Definition at line 1365 of file gatt-client.c.
References bt_uuid16_create(), bt_gatt_client::db, gatt_db_attribute_get_handle(), gatt_db_find_by_type(), get_first_attribute(), register_notify(), service_changed_cb(), service_changed_register_cb(), bt_gatt_client::svc_chngd_ind_id, and SVC_CHNGD_UUID.
Referenced by init_complete(), and service_changed_complete().
|
static |
Definition at line 160 of file gatt-client.c.
References request::client, request::id, new0, bt_gatt_client::next_request_id, bt_gatt_client::pending_requests, queue_push_tail(), and request_ref().
Referenced by bt_gatt_client_read_long_value(), bt_gatt_client_read_multiple(), bt_gatt_client_read_value(), bt_gatt_client_write_long_value(), bt_gatt_client_write_value(), bt_gatt_client_write_without_response(), and get_reliable_request().
Definition at line 153 of file gatt-client.c.
References request::ref_count.
Referenced by complete_write_long_op(), handle_next_prep_write(), read_long_cb(), and request_create().
|
static |
Definition at line 178 of file gatt-client.c.
References request::client, request::data, request::destroy, bt_gatt_client::pending_requests, queue_remove(), request::ref_count, and request::removed.
Referenced by bt_gatt_client_free(), bt_gatt_client_prepare_write(), bt_gatt_client_read_long_value(), bt_gatt_client_read_multiple(), bt_gatt_client_read_value(), bt_gatt_client_write_execute(), bt_gatt_client_write_long_value(), bt_gatt_client_write_value(), bt_gatt_client_write_without_response(), cancel_prep_write_session(), complete_write_long_op(), handle_next_prep_write(), read_long_cb(), and start_next_long_write().
|
static |
Definition at line 1481 of file gatt-client.c.
References bt_gatt_client::debug_callback, bt_gatt_client::debug_data, service_changed_op::end_handle, get_le16(), bt_gatt_client::in_svc_chngd, new0, process_service_changed(), queue_push_tail(), service_changed_op::start_handle, bt_gatt_client::svc_chngd_queue, and util_debug().
Referenced by register_service_changed().
|
static |
Definition at line 1394 of file gatt-client.c.
References BT_ATT_ERROR_ATTRIBUTE_NOT_FOUND, discovery_op::client, bt_gatt_client::db, bt_gatt_client::debug_callback, bt_gatt_client::debug_data, discovery_op::end, service_changed_op::end_handle, gatt_db_clear_range(), bt_gatt_client::in_svc_chngd, process_service_changed(), queue_pop_head(), register_service_changed(), discovery_op::start, service_changed_op::start_handle, bt_gatt_client::svc_chngd_callback, bt_gatt_client::svc_chngd_data, bt_gatt_client::svc_chngd_queue, and util_debug().
Referenced by process_service_changed().
|
static |
Definition at line 1433 of file gatt-client.c.
References discovery_op::client, bt_gatt_client::db, discovery_op::end, gatt_db_clear_range(), and discovery_op::start.
Referenced by process_service_changed().
|
static |
Definition at line 1342 of file gatt-client.c.
References bt_gatt_client::debug_callback, bt_gatt_client::debug_data, notify_client_ready(), bt_gatt_client::svc_chngd_ind_id, bt_gatt_client::svc_chngd_registered, and util_debug().
Referenced by register_service_changed().
|
static |
Definition at line 2524 of file gatt-client.c.
References handle_next_prep_write(), bt_gatt_client::in_long_write, bt_gatt_client::long_write_queue, queue_isempty(), queue_pop_head(), and request_unref().
Referenced by complete_write_long_op(), exec_write_cb(), and execute_write_cb().
|
static |
Definition at line 2383 of file gatt-client.c.
References BT_ATT_OP_ERROR_RSP, BT_ATT_OP_WRITE_RSP, write_op::callback, request::data, process_error(), and write_op::user_data.
Referenced by bt_gatt_client_write_value().