gatt_client.h (8183ac30e3e8b86d5fa7520022dfb6ea66927e2a) | gatt_client.h (a94d23eaebfede58bf9fb58975795b387dd511df) |
---|---|
1/* 2 * Copyright (C) 2014 BlueKitchen GmbH 3 * 4 * Redistribution and use in source and binary forms, with or without 5 * modification, are permitted provided that the following conditions 6 * are met: 7 * 8 * 1. Redistributions of source code must retain the above copyright --- 480 unchanged lines hidden (view full) --- 489 * For each found included service a GATT_EVENT_INCLUDED_SERVICE_QUERY_RESULT event will be emitted. 490 * The GATT_EVENT_QUERY_COMPLETE event marks the end of discovery. 491 * Information about included service type (primary/secondary) can be retrieved either by sending 492 * an ATT find information request for the returned start group handle 493 * (returning the handle and the UUID for primary or secondary service) or by comparing the service 494 * to the list of all primary services. 495 * @param callback 496 * @param con_handle | 1/* 2 * Copyright (C) 2014 BlueKitchen GmbH 3 * 4 * Redistribution and use in source and binary forms, with or without 5 * modification, are permitted provided that the following conditions 6 * are met: 7 * 8 * 1. Redistributions of source code must retain the above copyright --- 480 unchanged lines hidden (view full) --- 489 * For each found included service a GATT_EVENT_INCLUDED_SERVICE_QUERY_RESULT event will be emitted. 490 * The GATT_EVENT_QUERY_COMPLETE event marks the end of discovery. 491 * Information about included service type (primary/secondary) can be retrieved either by sending 492 * an ATT find information request for the returned start group handle 493 * (returning the handle and the UUID for primary or secondary service) or by comparing the service 494 * to the list of all primary services. 495 * @param callback 496 * @param con_handle |
497 * @param service_id - context provided to callback in events 498 * @param connection_id - contest provided to callback in events | 497 * @param service_id - context provided to callback in events 498 * @param connection_id - contest provided to callback in events |
499 * @param service_id 500 * @return status BTSTACK_MEMORY_ALLOC_FAILED, if no GATT client for con_handle is found 501 * GATT_CLIENT_IN_WRONG_STATE , if GATT client is not ready 502 * ERROR_CODE_SUCCESS , if query is successfully registered 503 */ 504uint8_t gatt_client_find_included_services_for_service_with_context(btstack_packet_handler_t callback, hci_con_handle_t con_handle, 505 gatt_client_service_t * service, uint16_t service_id, uint16_t connection_id); 506 --- 98 unchanged lines hidden (view full) --- 605 * @param con_handle 606 * @param characteristic 607 * @return status BTSTACK_MEMORY_ALLOC_FAILED, if no GATT client for con_handle is found 608 * GATT_CLIENT_IN_WRONG_STATE , if GATT client is not ready 609 * ERROR_CODE_SUCCESS , if query is successfully registered 610 */ 611uint8_t gatt_client_discover_characteristic_descriptors(btstack_packet_handler_t callback, hci_con_handle_t con_handle, gatt_client_characteristic_t * characteristic); 612 | 499 * @param service_id 500 * @return status BTSTACK_MEMORY_ALLOC_FAILED, if no GATT client for con_handle is found 501 * GATT_CLIENT_IN_WRONG_STATE , if GATT client is not ready 502 * ERROR_CODE_SUCCESS , if query is successfully registered 503 */ 504uint8_t gatt_client_find_included_services_for_service_with_context(btstack_packet_handler_t callback, hci_con_handle_t con_handle, 505 gatt_client_service_t * service, uint16_t service_id, uint16_t connection_id); 506 --- 98 unchanged lines hidden (view full) --- 605 * @param con_handle 606 * @param characteristic 607 * @return status BTSTACK_MEMORY_ALLOC_FAILED, if no GATT client for con_handle is found 608 * GATT_CLIENT_IN_WRONG_STATE , if GATT client is not ready 609 * ERROR_CODE_SUCCESS , if query is successfully registered 610 */ 611uint8_t gatt_client_discover_characteristic_descriptors(btstack_packet_handler_t callback, hci_con_handle_t con_handle, gatt_client_characteristic_t * characteristic); 612 |
613 614/** 615 * @brief Discovers attribute handle and UUID of a characteristic descriptor within the specified characteristic. 616 * For each found descriptor a GATT_EVENT_ALL_CHARACTERISTIC_DESCRIPTORS_QUERY_RESULT event will be emitted. 617 * 618 * The GATT_EVENT_QUERY_COMPLETE event marks the end of discovery. 619 * @param callback 620 * @param con_handle 621 * @param characteristic 622 * @param service_id - context provided to callback in events 623 * @param connection_id - contest provided to callback in events 624 * @return status BTSTACK_MEMORY_ALLOC_FAILED, if no GATT client for con_handle is found 625 * GATT_CLIENT_IN_WRONG_STATE , if GATT client is not ready 626 * ERROR_CODE_SUCCESS , if query is successfully registered 627 */ 628uint8_t gatt_client_discover_characteristic_descriptors_with_context(btstack_packet_handler_t callback, hci_con_handle_t con_handle, 629 gatt_client_characteristic_t * characteristic, uint16_t service_id, uint16_t connection_it); 630 |
|
613/** 614 * @brief Reads the characteristic value using the characteristic's value handle. 615 * If the characteristic value is found a GATT_EVENT_CHARACTERISTIC_VALUE_QUERY_RESULT event will be emitted. 616 * The GATT_EVENT_QUERY_COMPLETE event marks the end of read. 617 * @param callback 618 * @param con_handle 619 * @param characteristic 620 * @return status BTSTACK_MEMORY_ALLOC_FAILED, if no GATT client for con_handle is found --- 513 unchanged lines hidden --- | 631/** 632 * @brief Reads the characteristic value using the characteristic's value handle. 633 * If the characteristic value is found a GATT_EVENT_CHARACTERISTIC_VALUE_QUERY_RESULT event will be emitted. 634 * The GATT_EVENT_QUERY_COMPLETE event marks the end of read. 635 * @param callback 636 * @param con_handle 637 * @param characteristic 638 * @return status BTSTACK_MEMORY_ALLOC_FAILED, if no GATT client for con_handle is found --- 513 unchanged lines hidden --- |