/**
* @defgroup CAPI_NETWORK_BLUETOOTH_GATT_MODULE Bluetooth GATT
- * @brief Bluetooth GATT(Generic Attribute Profile) API provides functions for discovering, reading and modifying attributes.
+ * @brief Bluetooth GATT (Generic Attribute Profile) API provides common functions for GATT client and GATT server.
* @ingroup CAPI_NETWORK_BLUETOOTH_MODULE
*
* @section CAPI_NETWORK_BLUETOOTH_GATT_MODULE_HEADER Required Header
* Two roles are defined for devices that implement GATT.
* The @a Server is the device that accepts incoming commands and requests from the client and sends responses, indications and notifications to a client.
* The @a Client is the device that initiates commands and requests towards the server and can receive responses, indications and notifications sent by the server.
- * This API supports the @a Client role in GATT. \n
+ * This API supports both @a Server role and @a Client role in GATT. \n
* Bluetooth stack architecture has been changed. Thus, GATT APIs defined in Tizen 2.3 are deprecated and new GATT client APIs are defined.
*
* @section CAPI_NETWORK_BLUETOOTH_GATT_MODULE_FEATURE Related Features
* This API is related with the following features:\n
- * - http://tizen.org/feature/network.bluetooth.le\n
+ * - http://tizen.org/feature/network.bluetooth.le.gatt.server\n
+ * - http://tizen.org/feature/network.bluetooth.le.gatt.client\n
*
* It is recommended to design feature related codes in your application for reliability.\n
*
/**
* @defgroup CAPI_NETWORK_BLUETOOTH_GATT_SERVER_MODULE Bluetooth GATT Server
- * @brief Bluetooth GATT(Generic Attribute Profile) API provides functions for modifying attributes and registering services, characteristics and descriptors.
- * @ingroup CAPI_NETWORK_BLUETOOTH_MODULE
+ * @brief Bluetooth GATT (Generic Attribute Profile) Server API provides functions for modifying attributes and registering services, characteristics and descriptors.
+ * @ingroup CAPI_NETWORK_BLUETOOTH_GATT_MODULE
*
- * @section CAPI_NETWORK_BLUETOOTH_GATT_MODULE_HEADER Required Header
+ * @section CAPI_NETWORK_BLUETOOTH_GATT_SERVER_MODULE_HEADER Required Header
* \#include <bluetooth.h>
*
* @section CAPI_NETWORK_BLUETOOTH_GATT_SERVER_MODULE_OVERVIEW Overview
* The @a Client is the device that initiates commands and requests towards a server and can receive responses, indications and notifications sent by the server.
*
* @section CAPI_NETWORK_BLUETOOTH_GATT_SERVER_MODULE_FEATURE Related Features
+ * This API supports both @a Server role in GATT. \n
* This API is related with the following features:\n
- * - http://tizen.org/feature/network.bluetooth.le\n
+ * - http://tizen.org/feature/network.bluetooth.le.gatt.server\n
*
* It is recommended to create an application with regard to features, to increase reliability.\n
*
*/
/**
+ * @defgroup CAPI_NETWORK_BLUETOOTH_GATT_CLIENT_MODULE Bluetooth GATT Client
+ * @brief Bluetooth GATT (Generic Attribute Profile) Client API provides functions for discovering attributes and registering services, characteristics and descriptors of the remote device.
+ * @ingroup CAPI_NETWORK_BLUETOOTH_GATT_MODULE
+ *
+ * @section CAPI_NETWORK_BLUETOOTH_GATT_CLIENT_MODULE_HEADER Required Header
+ * \#include <bluetooth.h>
+ *
+ * @section CAPI_NETWORK_BLUETOOTH_GATT_CLIENT_MODULE_OVERVIEW Overview
+ * Two roles are defined for devices that implement GATT.
+ * The @a Server is the device that accepts incoming commands and requests from a client and sends responses, indications and notifications to the client.
+ * The @a Client is the device that initiates commands and requests towards a server and can receive responses, indications and notifications sent by the server.
+ *
+ * @section CAPI_NETWORK_BLUETOOTH_GATT_CLIENT_MODULE_FEATURE Related Features
+ * This API supports both @a Client role in GATT. \n
+ * This API is related with the following features:\n
+ * - http://tizen.org/feature/network.bluetooth.le.gatt.client\n
+ *
+ * It is recommended to create your application with regard to features, to increase reliability.\n
+ *
+ * You can check if a device supports the related features for this API by using @ref CAPI_SYSTEM_SYSTEM_INFO_MODULE, and control your application's actions accordingly.\n
+ *
+ * To ensure your application is only running on the device with specific features, please define the features in your manifest file using the manifest editor in the SDK.\n
+ *
+ * More details on using features in your application can be found from <a href="https://developer.tizen.org/development/tools/native-tools/manifest-text-editor#feature"><b>Feature Element</b>.</a>
+ *
+ */
+
+/**
* @defgroup CAPI_NETWORK_BLUETOOTH_IPSP_MODULE Bluetooth IPSP
* @brief Bluetooth IPSP(Internet Protocol Support Profile) API provides functions for supporting of exchanging IPv6 packets between devices over the BLE transport.
* @ingroup CAPI_NETWORK_BLUETOOTH_MODULE
*
*/
+/**
+ * @defgroup CAPI_NETWORK_BLUETOOTH_OOB_MODULE Bluetooth OOB
+ * @brief Bluetooth OOB (Out of Band) API provides functions for exchanging some information used in the pairing process.
+ * @ingroup CAPI_NETWORK_BLUETOOTH_MODULE
+ *
+ * @section CAPI_NETWORK_BLUETOOTH_OOB_MODULE_HEADER Required Header
+ * \#include <bluetooth.h>
+ *
+ * @section CAPI_NETWORK_BLUETOOTH_OOB_MODULE_OVERVIEW Overview
+ * This set of functions is used for exchanging the hash key and randomizer.
+ * This API uses an external means of communication, such as near-field communication (NFC) to exchange some information used in the pairing process.
+ *
+ * @section CAPI_NETWORK_BLUETOOTH_HDP_MODULE_FEATURE Related Features
+ * This API is related with the following features:\n
+ * - http://tizen.org/feature/network.bluetooth.oob\n
+ *
+ * It is recommended to use features in your application for reliability.\n
+ *
+ * You can check if a device supports the related features for this API by using @ref CAPI_SYSTEM_SYSTEM_INFO_MODULE, and control your application's actions accordingly.\n
+ *
+ * To ensure your application is only running on the device with specific features, please define the features in your manifest file using the manifest editor in the SDK.\n
+ *
+ * More details on featuring your application can be found from <a href="https://developer.tizen.org/development/tools/native-tools/manifest-text-editor#feature"><b>Feature Element</b>.</a>
+ *
+ */
+
#endif /* __TIZEN_NETWORK_BLUETOOTH_DOC_H__ */
int bt_adapter_unset_device_discovery_state_changed_cb(void);
/**
- * @ingroup CAPI_NETWORK_BLUETOOTH_ADAPTER_MODULE
+ * @ingroup CAPI_NETWORK_BLUETOOTH_OOB_MODULE
* @brief Get the Hash and Randmoizer value, synchronously.
* @since_tizen @if WEARABLE 2.3.1 @else 2.3 @endif
*
int *hash_len, int *randomizer_len);
/**
- * @ingroup CAPI_NETWORK_BLUETOOTH_ADAPTER_MODULE
+ * @ingroup CAPI_NETWORK_BLUETOOTH_OOB_MODULE
* @brief Sets the Hash and Randmoizer value, synchronously.
* @since_tizen @if WEARABLE 2.3.1 @else 2.3 @endif
* @privlevel public
int hash_len, int randomizer_len);
/**
- * @ingroup CAPI_NETWORK_BLUETOOTH_ADAPTER_MODULE
+ * @ingroup CAPI_NETWORK_BLUETOOTH_OOB_MODULE
* @brief Gets the Hash and Randmoizer value, synchronously.
* @since_tizen 3.0
* @privlevel public
int *hash256_len, int *randomizer256_len);
/**
- * @ingroup CAPI_NETWORK_BLUETOOTH_ADAPTER_MODULE
+ * @ingroup CAPI_NETWORK_BLUETOOTH_OOB_MODULE
* @brief Sets the Hash and Randmoizer value, synchronously.
* @since_tizen 3.0
* @privlevel public
int hash256_len, int randomizer256_len);
/**
- * @ingroup CAPI_NETWORK_BLUETOOTH_ADAPTER_MODULE
+ * @ingroup CAPI_NETWORK_BLUETOOTH_OOB_MODULE
* @brief Deletes the Hash and Randomizer value, synchronously.
* @since_tizen @if WEARABLE 2.3.1 @else 2.3 @endif
* @privlevel public
int bt_gatt_get_type(bt_gatt_h gatt_handle, bt_gatt_type_e *gatt_type);
/**
- * @ingroup CAPI_NETWORK_BLUETOOTH_GATT_MODULE
+ * @ingroup CAPI_NETWORK_BLUETOOTH_GATT_CLIENT_MODULE
* @brief Gets the GATT client handle which the specified service belongs to.
* @since_tizen 2.3.1
*
int bt_gatt_descriptor_get_characteristic(bt_gatt_h descriptor, bt_gatt_h *characteristic);
/**
- * @ingroup CAPI_NETWORK_BLUETOOTH_GATT_MODULE
+ * @ingroup CAPI_NETWORK_BLUETOOTH_GATT_CLIENT_MODULE
* @brief Creates the GATT client handle.
* @since_tizen 2.3.1
*
int bt_gatt_client_create(const char *remote_address, bt_gatt_client_h *client);
/**
- * @ingroup CAPI_NETWORK_BLUETOOTH_GATT_MODULE
+ * @ingroup CAPI_NETWORK_BLUETOOTH_GATT_CLIENT_MODULE
* @brief Destroys the GATT client's handle.
* @since_tizen 2.3.1
*
int bt_gatt_client_destroy(bt_gatt_client_h client);
/**
- * @ingroup CAPI_NETWORK_BLUETOOTH_GATT_MODULE
+ * @ingroup CAPI_NETWORK_BLUETOOTH_GATT_CLIENT_MODULE
* @brief Gets the address of remote device.
* @since_tizen 2.3.1
*
char **remote_address);
/**
- * @ingroup CAPI_NETWORK_BLUETOOTH_GATT_MODULE
+ * @ingroup CAPI_NETWORK_BLUETOOTH_GATT_CLIENT_MODULE
* @brief Reads the value of a characteristic or descriptor from the remote device asynchronously.
* @since_tizen 2.3.1
* @privlevel public
bt_gatt_client_request_completed_cb callback, void *user_data);
/**
- * @ingroup CAPI_NETWORK_BLUETOOTH_GATT_MODULE
+ * @ingroup CAPI_NETWORK_BLUETOOTH_GATT_CLIENT_MODULE
* @brief Writes the value of a characteristic or descriptor to the remote device asynchronously.
* @since_tizen 2.3.1
* @privlevel public
bt_gatt_client_request_completed_cb callback, void *user_data);
/**
- * @ingroup CAPI_NETWORK_BLUETOOTH_GATT_MODULE
+ * @ingroup CAPI_NETWORK_BLUETOOTH_GATT_CLIENT_MODULE
* @brief Requests a change of the ATT MTU value.
* @since_tizen 4.0
* @privlevel public
int bt_gatt_client_request_att_mtu_change(bt_gatt_client_h client, unsigned int mtu);
/**
- * @ingroup CAPI_NETWORK_BLUETOOTH_GATT_MODULE
+ * @ingroup CAPI_NETWORK_BLUETOOTH_GATT_CLIENT_MODULE
* @brief Gets the ATT MTU value set for a connection.
* @since_tizen 4.0
*
int bt_gatt_client_get_att_mtu(bt_gatt_client_h client, unsigned int *mtu);
/**
- * @ingroup CAPI_NETWORK_BLUETOOTH_GATT_MODULE
+ * @ingroup CAPI_NETWORK_BLUETOOTH_GATT_CLIENT_MODULE
* @brief Registers a callback function to be invoked when the ATT MTU is changed.
* @since_tizen 4.0
* @param[in] client The created GATT client's handle
int bt_gatt_client_set_att_mtu_changed_cb(bt_gatt_client_h client, bt_gatt_client_att_mtu_changed_cb callback, void *user_data);
/**
- * @ingroup CAPI_NETWORK_BLUETOOTH_GATT_MODULE
+ * @ingroup CAPI_NETWORK_BLUETOOTH_GATT_CLIENT_MODULE
* @brief Unregisters the callback function to be invoked when the ATT MTU is changed.
* @since_tizen 4.0
* @param[in] client The created GATT client's handle
int bt_gatt_client_unset_att_mtu_changed_cb(bt_gatt_client_h client);
/**
- * @ingroup CAPI_NETWORK_BLUETOOTH_GATT_MODULE
+ * @ingroup CAPI_NETWORK_BLUETOOTH_GATT_CLIENT_MODULE
* @brief Registers a callback function to be invoked when the characteristic value is changed on the remote device.
* @since_tizen 2.3.1
*
void *user_data);
/**
- * @ingroup CAPI_NETWORK_BLUETOOTH_GATT_MODULE
+ * @ingroup CAPI_NETWORK_BLUETOOTH_GATT_CLIENT_MODULE
* @brief Unregisters a callback function to be invoked when the characteristic value is changed on the remote device.
* @since_tizen 2.3.1
*
int bt_gatt_client_unset_characteristic_value_changed_cb(bt_gatt_h characteristic);
/**
- * @ingroup CAPI_NETWORK_BLUETOOTH_GATT_MODULE
+ * @ingroup CAPI_NETWORK_BLUETOOTH_GATT_CLIENT_MODULE
* @brief Gets a service's GATT handle which has specific UUID.
* @since_tizen 2.3.1
*
bt_gatt_h *service);
/**
- * @ingroup CAPI_NETWORK_BLUETOOTH_GATT_MODULE
+ * @ingroup CAPI_NETWORK_BLUETOOTH_GATT_CLIENT_MODULE
* @brief Invokes @a callback function on each service that belongs to the specified GATT client.
* @since_tizen 2.3.1
*
bt_gatt_foreach_cb callback, void *user_data);
/**
- * @ingroup CAPI_NETWORK_BLUETOOTH_GATT_MODULE
+ * @ingroup CAPI_NETWORK_BLUETOOTH_GATT_CLIENT_MODULE
* @brief Registers a callback function to be invoked when service is changed from a remote device(GATT server).
* @since_tizen 3.0
*
bt_gatt_client_service_changed_cb callback, void *user_data);
/**
- * @ingroup CAPI_NETWORK_BLUETOOTH_GATT_MODULE
+ * @ingroup CAPI_NETWORK_BLUETOOTH_GATT_CLIENT_MODULE
* @brief Unregisters a callback function
* @since_tizen 3.0
*
int bt_gatt_client_unset_service_changed_cb(bt_gatt_client_h client);
/**
- * @ingroup CAPI_NETWORK_BLUETOOTH_GATT_MODULE
+ * @ingroup CAPI_NETWORK_BLUETOOTH_GATT_CLIENT_MODULE
* @brief Connect to a specific LE based service on a remote bluetooth device address, asynchronously.
* @since_tizen @if WEARABLE 2.3.1 @else 2.3 @endif
* @privlevel public
int bt_gatt_connect(const char *address, bool auto_connect);
/**
- * @ingroup CAPI_NETWORK_BLUETOOTH_GATT_MODULE
+ * @ingroup CAPI_NETWORK_BLUETOOTH_GATT_CLIENT_MODULE
* @brief Disconnect to LE connection with the given remote Bluetooth device address, asynchronously.
* @since_tizen @if WEARABLE 2.3.1 @else 2.3 @endif
* @privlevel public
int bt_gatt_disconnect(const char *address);
/**
- * @ingroup CAPI_NETWORK_BLUETOOTH_GATT_MODULE
+ * @ingroup CAPI_NETWORK_BLUETOOTH_GATT_CLIENT_MODULE
* @brief Registers a callback function that will be invoked when the connection state is changed.
* @since_tizen @if WEARABLE 2.3.1 @else 2.3 @endif
*
int bt_gatt_set_connection_state_changed_cb(bt_gatt_connection_state_changed_cb callback, void *user_data);
/**
- * @ingroup CAPI_NETWORK_BLUETOOTH_GATT_MODULE
+ * @ingroup CAPI_NETWORK_BLUETOOTH_GATT_CLIENT_MODULE
* @brief Unregisters a callback function that will be invoked when the connection state is changed.
* @since_tizen @if WEARABLE 2.3.1 @else 2.3 @endif
*
int bt_gatt_descriptor_destroy(bt_gatt_h gatt_handle);
/**
- * @ingroup CAPI_NETWORK_BLUETOOTH_GATT_SERVER_MODULE
+ * @ingroup CAPI_NETWORK_BLUETOOTH_GATT_MODULE
* @brief Gets the permissions which a characteristic's GATT handle has.
* @since_tizen 3.0
*
int bt_gatt_characteristic_get_permissions(bt_gatt_h gatt_handle, int *permissions);
/**
- * @ingroup CAPI_NETWORK_BLUETOOTH_GATT_SERVER_MODULE
+ * @ingroup CAPI_NETWORK_BLUETOOTH_GATT_MODULE
* @brief Gets the permissions which a descriptor's GATT handle has.
* @since_tizen 3.0
*
int bt_gatt_service_get_server(bt_gatt_h service, bt_gatt_server_h *server);
/**
- * @ingroup CAPI_NETWORK_BLUETOOTH_GATT_SERVER_MODULE
+ * @ingroup CAPI_NETWORK_BLUETOOTH_GATT_MODULE
* @brief Creates the GATT characteristic.
* @since_tizen 3.0
*
bt_gatt_h descriptor);
/**
- * @ingroup CAPI_NETWORK_BLUETOOTH_GATT_SERVER_MODULE
+ * @ingroup CAPI_NETWORK_BLUETOOTH_GATT_MODULE
* @brief Creates the GATT characteristic descriptor.
* @since_tizen 3.0
*
#define BT_FEATURE_MAP "tizen.org/feature/network.bluetooth.map"
#define BT_FEATURE_TETHERING "tizen.org/feature/network.tethering.bluetooth"
#define BT_FEATURE_PBAP_CLIENT "tizen.org/feature/network.bluetooth.phonebook.client"
+#define BT_FEATURE_OOB "tizen.org/feature/network.bluetooth.oob"
+#define BT_FEATURE_GATT_SERVER "tizen.org/feature/network.bluetooth.le.gatt.server"
+#define BT_FEATURE_GATT_CLIENT "tizen.org/feature/network.bluetooth.le.gatt.client"
#define BT_CHECK_SUPPORTED_FEATURE(feature_name) \
do { \
} bt_gatt_property_e;
/**
- * @ingroup CAPI_NETWORK_BLUETOOTH_GATT_MODULE
+ * @ingroup CAPI_NETWORK_BLUETOOTH_GATT_CLIENT_MODULE
* @brief Enumerations of gatt server's service changing mode.
* @since_tizen 3.0
*/
} bt_gatt_client_service_change_type_e;
/**
- * @ingroup CAPI_NETWORK_BLUETOOTH_GATT_SERVER_MODULE
+ * @ingroup CAPI_NETWORK_BLUETOOTH_GATT_MODULE
* @brief Enumerations of the attribute's permission.
* @since_tizen 3.0
*/
typedef void *bt_gatt_h;
/**
- * @ingroup CAPI_NETWORK_BLUETOOTH_ADAPTER_LE_MODULE
+ * @ingroup CAPI_NETWORK_BLUETOOTH_GATT_CLIENT_MODULE
* @brief The handle of a GATT client which is associated with a remote device.
* @since_tizen 2.3.1
*/
void *user_data);
/**
- * @ingroup CAPI_NETWORK_BLUETOOTH_GATT_MODULE
+ * @ingroup CAPI_NETWORK_BLUETOOTH_GATT_CLIENT_MODULE
* @brief Attribute protocol MTU change information structure.
* @since_tizen 4.0
*
} bt_gatt_client_att_mtu_info_s;
/**
- * @ingroup CAPI_NETWORK_BLUETOOTH_GATT_MODULE
+ * @ingroup CAPI_NETWORK_BLUETOOTH_GATT_CLIENT_MODULE
* @brief Called when the ATT MTU value is changed.
* @since_tizen 4.0
*
void *user_data);
/**
- * @ingroup CAPI_NETWORK_BLUETOOTH_GATT_MODULE
+ * @ingroup CAPI_NETWORK_BLUETOOTH_GATT_CLIENT_MODULE
* @brief Called when the client request(e.g. read / write) has been completed
* @since_tizen 2.3.1
*
bt_gatt_h request_handle, void *user_data);
/**
- * @ingroup CAPI_NETWORK_BLUETOOTH_GATT_MODULE
+ * @ingroup CAPI_NETWORK_BLUETOOTH_GATT_CLIENT_MODULE
* @brief Called when a value of a watched characteristic's GATT handle has been changed
* @since_tizen 2.3.1
*
char *value, int len, void *user_data);
/**
- * @ingroup CAPI_NETWORK_BLUETOOTH_GATT_MODULE
+ * @ingroup CAPI_NETWORK_BLUETOOTH_GATT_CLIENT_MODULE
* @brief Called when a service of a remote GATT server has been changed.
* @since_tizen 3.0
*
{
int ret = BT_ERROR_NONE;
- BT_CHECK_SUPPORTED_FEATURE(BT_FEATURE_COMMON);
+ BT_CHECK_SUPPORTED_FEATURE(BT_FEATURE_OOB);
BT_CHECK_INIT_STATUS();
BT_CHECK_INPUT_PARAMETER(hash);
BT_CHECK_INPUT_PARAMETER(randomizer);
bt_oob_data_t oob_data = { {0},};
int len;
- BT_CHECK_SUPPORTED_FEATURE(BT_FEATURE_COMMON);
+ BT_CHECK_SUPPORTED_FEATURE(BT_FEATURE_OOB);
BT_CHECK_INIT_STATUS();
BT_CHECK_INPUT_PARAMETER(remote_address); /* LCOV_EXCL_START */
{
int ret = BT_ERROR_NONE;
- BT_CHECK_SUPPORTED_FEATURE(BT_FEATURE_COMMON);
+ BT_CHECK_SUPPORTED_FEATURE(BT_FEATURE_OOB);
BT_CHECK_INIT_STATUS();
BT_CHECK_INPUT_PARAMETER(hash192);
BT_CHECK_INPUT_PARAMETER(randomizer192);
bt_oob_data_t oob_data = { {0},};
int len;
- BT_CHECK_SUPPORTED_FEATURE(BT_FEATURE_COMMON);
+ BT_CHECK_SUPPORTED_FEATURE(BT_FEATURE_OOB);
BT_CHECK_INIT_STATUS();
BT_CHECK_INPUT_PARAMETER(remote_address);
bluetooth_bdaddr_type_e addr_type = BLUETOOTH_BDADDR_LE_PUBLIC;
int len;
- BT_CHECK_SUPPORTED_FEATURE(BT_FEATURE_COMMON);
+ BT_CHECK_SUPPORTED_FEATURE(BT_FEATURE_OOB);
BT_CHECK_INIT_STATUS();
BT_CHECK_INPUT_PARAMETER(remote_address);
int ret = BT_ERROR_NONE;
bluetooth_device_address_t addr_hex = { {0,} };
- BT_CHECK_SUPPORTED_FEATURE(BT_FEATURE_COMMON);
+ BT_CHECK_SUPPORTED_FEATURE(BT_FEATURE_OOB);
BT_CHECK_INIT_STATUS();
BT_CHECK_INPUT_PARAMETER(remote_address);
#define BT_CHECK_GATT_SUPPORT() \
{ \
- BT_CHECK_SUPPORTED_FEATURE(BT_FEATURE_COMMON); \
BT_CHECK_SUPPORTED_FEATURE(BT_FEATURE_LE); \
+ BT_CHECK_SUPPORTED_FEATURES(BT_FEATURE_GATT_SERVER, BT_FEATURE_GATT_CLIENT); \
+}
+
+#define BT_CHECK_GATT_SERVER_SUPPORT() \
+{ \
+ BT_CHECK_SUPPORTED_FEATURE(BT_FEATURE_LE); \
+ BT_CHECK_SUPPORTED_FEATURE(BT_FEATURE_GATT_SERVER); \
+}
+
+#define BT_CHECK_GATT_CLIENT_SUPPORT() \
+{ \
+ BT_CHECK_SUPPORTED_FEATURE(BT_FEATURE_LE); \
+ BT_CHECK_SUPPORTED_FEATURE(BT_FEATURE_GATT_CLIENT); \
}
#define BT_CHECK_GATT_SERVER_INIT_STATUS() { \
int ret;
bluetooth_device_address_t bd_addr = { {0,} };
- BT_CHECK_GATT_SUPPORT();
+ BT_CHECK_GATT_CLIENT_SUPPORT();
BT_CHECK_INIT_STATUS();
BT_CHECK_INPUT_PARAMETER(address);
_bt_convert_address_to_hex(&bd_addr, address);
int ret;
bluetooth_device_address_t bd_addr = { {0,} };
- BT_CHECK_GATT_SUPPORT();
+ BT_CHECK_GATT_CLIENT_SUPPORT();
BT_CHECK_INIT_STATUS();
BT_CHECK_INPUT_PARAMETER(address);
_bt_convert_address_to_hex(&bd_addr, address);
int bt_gatt_set_connection_state_changed_cb(bt_gatt_connection_state_changed_cb callback,
void *user_data)
{
- BT_CHECK_GATT_SUPPORT();
+ BT_CHECK_GATT_CLIENT_SUPPORT();
BT_CHECK_INIT_STATUS();
BT_CHECK_INPUT_PARAMETER(callback);
_bt_set_cb(BT_EVENT_GATT_CONNECTION_STATUS, callback, user_data);
int bt_gatt_unset_connection_state_changed_cb(void)
{
- BT_CHECK_GATT_SUPPORT();
+ BT_CHECK_GATT_CLIENT_SUPPORT();
BT_CHECK_INIT_STATUS();
_bt_unset_cb(BT_EVENT_GATT_CONNECTION_STATUS);
return BT_ERROR_NONE;
{
bt_gatt_common_s *handle = (bt_gatt_common_s *)gatt_handle;
- BT_CHECK_GATT_SUPPORT();
+ BT_CHECK_GATT_SERVER_SUPPORT();
BT_CHECK_INIT_STATUS();
BT_CHECK_INPUT_PARAMETER(gatt_handle);
{
bt_gatt_common_s *handle = (bt_gatt_common_s *)gatt_handle;
- BT_CHECK_GATT_SUPPORT();
+ BT_CHECK_GATT_SERVER_SUPPORT();
BT_CHECK_INIT_STATUS();
BT_CHECK_INPUT_PARAMETER(gatt_handle);
{
bt_gatt_service_s *svc = (bt_gatt_service_s *)service;
- BT_CHECK_GATT_SUPPORT();
+ BT_CHECK_GATT_SERVER_SUPPORT();
BT_CHECK_INIT_STATUS();
BT_CHECK_INPUT_PARAMETER(service);
{
bt_gatt_service_s *svc = (bt_gatt_service_s *)service;
- BT_CHECK_GATT_SUPPORT();
+ BT_CHECK_GATT_CLIENT_SUPPORT();
BT_CHECK_INIT_STATUS();
BT_CHECK_INPUT_PARAMETER(service);
{
bt_gatt_server_s *serv = NULL;
- BT_CHECK_GATT_SUPPORT();
+ BT_CHECK_GATT_SERVER_SUPPORT();
BT_CHECK_INIT_STATUS();
BT_CHECK_INPUT_PARAMETER(server);
{
bt_gatt_server_s *serv = (bt_gatt_server_s *)server;
- BT_CHECK_GATT_SUPPORT();
+ BT_CHECK_GATT_SERVER_SUPPORT();
BT_CHECK_INIT_STATUS();
BT_CHECK_INPUT_PARAMETER(server);
bt_gatt_characteristic_s *chr = (bt_gatt_characteristic_s *)gatt_handle;
bt_gatt_descriptor_s *desc = (bt_gatt_descriptor_s*)gatt_handle;
- BT_CHECK_GATT_SUPPORT();
+ BT_CHECK_GATT_SERVER_SUPPORT();
BT_CHECK_INIT_STATUS();
BT_CHECK_GATT_SERVER_INIT_STATUS();
BT_CHECK_INPUT_PARAMETER(gatt_handle);
{
bt_gatt_characteristic_s *chr = (bt_gatt_characteristic_s *)gatt_handle;
- BT_CHECK_GATT_SUPPORT();
+ BT_CHECK_GATT_SERVER_SUPPORT();
BT_CHECK_INIT_STATUS();
BT_CHECK_GATT_SERVER_INIT_STATUS();
BT_CHECK_INPUT_PARAMETER(gatt_handle);
bt_gatt_service_s *svc = (bt_gatt_service_s *)service;
GSList *char_l;
- BT_CHECK_GATT_SUPPORT();
+ BT_CHECK_GATT_SERVER_SUPPORT();
BT_CHECK_INIT_STATUS();
BT_CHECK_GATT_SERVER_INIT_STATUS();
BT_CHECK_INPUT_PARAMETER(server);
bt_gatt_service_s *svc = (bt_gatt_service_s *)service;
GSList *char_l;
- BT_CHECK_GATT_SUPPORT();
+ BT_CHECK_GATT_SERVER_SUPPORT();
BT_CHECK_INIT_STATUS();
BT_CHECK_GATT_SERVER_INIT_STATUS();
BT_CHECK_INPUT_PARAMETER(server);
bt_gatt_server_s *serv = (bt_gatt_server_s *)server;
bt_gatt_service_s *svc = (bt_gatt_service_s *)service;
- BT_CHECK_GATT_SUPPORT();
+ BT_CHECK_GATT_SERVER_SUPPORT();
BT_CHECK_INIT_STATUS();
BT_CHECK_GATT_SERVER_INIT_STATUS();
BT_CHECK_INPUT_PARAMETER(server);
bt_gatt_server_s *serv = (bt_gatt_server_s*)server;
- BT_CHECK_GATT_SUPPORT();
+ BT_CHECK_GATT_SERVER_SUPPORT();
BT_CHECK_INIT_STATUS();
BT_CHECK_GATT_SERVER_INIT_STATUS();
BT_CHECK_INPUT_PARAMETER(server);
{
int ret = BT_ERROR_NONE;
- BT_CHECK_GATT_SUPPORT();
+ BT_CHECK_GATT_SERVER_SUPPORT();
BT_CHECK_INIT_STATUS();
BT_CHECK_GATT_SERVER_INIT_STATUS();
int offset, int resp_status, char *value, int value_length)
{
int ret = BT_ERROR_NONE;
- BT_CHECK_GATT_SUPPORT();
+ BT_CHECK_GATT_SERVER_SUPPORT();
BT_CHECK_INIT_STATUS();
if (request_type == BT_GATT_REQUEST_TYPE_READ &&
bluetooth_device_address_t addr_hex = { {0,} };
int ret = BT_ERROR_NONE;
- BT_CHECK_GATT_SUPPORT();
+ BT_CHECK_GATT_SERVER_SUPPORT();
BT_CHECK_INIT_STATUS();
BT_CHECK_GATT_SERVER_INIT_STATUS();
BT_CHECK_INPUT_PARAMETER(characteristic);
bt_gatt_characteristic_s *chr = (bt_gatt_characteristic_s *)gatt_handle;
bt_gatt_descriptor_s *desc = (bt_gatt_descriptor_s*)gatt_handle;
- BT_CHECK_GATT_SUPPORT();
+ BT_CHECK_GATT_SERVER_SUPPORT();
BT_CHECK_INIT_STATUS();
BT_CHECK_GATT_SERVER_INIT_STATUS();
BT_CHECK_INPUT_PARAMETER(gatt_handle);
bt_gatt_h gatt_handle = NULL;
int ret;
- BT_CHECK_GATT_SUPPORT();
+ BT_CHECK_GATT_SERVER_SUPPORT();
BT_CHECK_INIT_STATUS();
BT_CHECK_GATT_SERVER_INIT_STATUS();
int total = 0;
int index = 1;
- BT_CHECK_GATT_SUPPORT();
+ BT_CHECK_GATT_SERVER_SUPPORT();
BT_CHECK_INIT_STATUS();
BT_CHECK_GATT_SERVER_INIT_STATUS();
bool connected = false;
GSList *l;
- BT_CHECK_GATT_SUPPORT();
+ BT_CHECK_GATT_CLIENT_SUPPORT();
BT_CHECK_INIT_STATUS();
BT_CHECK_INPUT_PARAMETER(remote_address); /* LCOV_EXCL_START */
{
bt_gatt_client_s *client_s = (bt_gatt_client_s *)client;
- BT_CHECK_GATT_SUPPORT();
+ BT_CHECK_GATT_CLIENT_SUPPORT();
BT_CHECK_INIT_STATUS();
BT_CHECK_INPUT_PARAMETER(client); /* LCOV_EXCL_START */
{
bt_gatt_client_s *client_s = (bt_gatt_client_s *)client;
- BT_CHECK_GATT_SUPPORT();
+ BT_CHECK_GATT_CLIENT_SUPPORT();
BT_CHECK_INIT_STATUS();
BT_CHECK_INPUT_PARAMETER(client); /* LCOV_EXCL_START */
BT_CHECK_INPUT_PARAMETER(remote_address);
int ret = BT_ERROR_NONE;
bt_gatt_common_s *c = (bt_gatt_common_s *)gatt_handle;
- BT_CHECK_GATT_SUPPORT();
+ BT_CHECK_GATT_CLIENT_SUPPORT();
BT_CHECK_INIT_STATUS();
BT_CHECK_INPUT_PARAMETER(gatt_handle);
BT_CHECK_INPUT_PARAMETER(callback); /* LCOV_EXCL_START */
bt_gatt_property_e write_prop = BT_GATT_PROPERTY_WRITE;
int ret = BT_ERROR_NONE;
- BT_CHECK_GATT_SUPPORT();
+ BT_CHECK_GATT_CLIENT_SUPPORT();
BT_CHECK_INIT_STATUS();
BT_CHECK_INPUT_PARAMETER(gatt_handle); /* LCOV_EXCL_START */
char *name = NULL;
bt_gatt_characteristic_s *chr = (bt_gatt_characteristic_s *)characteristic;
- BT_CHECK_GATT_SUPPORT();
+ BT_CHECK_GATT_CLIENT_SUPPORT();
BT_CHECK_INIT_STATUS();
BT_CHECK_INPUT_PARAMETER(characteristic);
BT_CHECK_INPUT_PARAMETER(callback);
int ret;
bt_gatt_characteristic_s *chr = (bt_gatt_characteristic_s *)characteristic;
- BT_CHECK_GATT_SUPPORT();
+ BT_CHECK_GATT_CLIENT_SUPPORT();
BT_CHECK_INIT_STATUS();
BT_CHECK_INPUT_PARAMETER(characteristic); /* LCOV_EXCL_START */
bt_gatt_h gatt_handle = NULL;
int ret;
- BT_CHECK_GATT_SUPPORT();
+ BT_CHECK_GATT_CLIENT_SUPPORT();
BT_CHECK_INIT_STATUS();
BT_CHECK_INPUT_PARAMETER(client);
BT_CHECK_INPUT_PARAMETER(uuid);
int total = 0;
int index = 1;
- BT_CHECK_GATT_SUPPORT();
+ BT_CHECK_GATT_CLIENT_SUPPORT();
BT_CHECK_INIT_STATUS();
BT_CHECK_INPUT_PARAMETER(client);
BT_CHECK_INPUT_PARAMETER(callback); /* LCOV_EXCL_LINE */
bluetooth_device_address_t bd_addr = { {0,} };
bt_gatt_client_s *client_s = (bt_gatt_client_s *)client;
- BT_CHECK_GATT_SUPPORT();
+ BT_CHECK_GATT_CLIENT_SUPPORT();
BT_CHECK_INIT_STATUS();
BT_CHECK_INPUT_PARAMETER(client);
BT_CHECK_INPUT_PARAMETER(callback);
bluetooth_device_address_t bd_addr = { {0,} };
bt_gatt_client_s *client_s = (bt_gatt_client_s *)client;
- BT_CHECK_GATT_SUPPORT();
+ BT_CHECK_GATT_CLIENT_SUPPORT();
BT_CHECK_INIT_STATUS();
BT_CHECK_INPUT_PARAMETER(client);
bluetooth_device_address_t addr_hex = { {0,} };
bt_gatt_client_s *client_s = (bt_gatt_client_s *)client;
- BT_CHECK_SUPPORTED_FEATURE(BT_FEATURE_COMMON);
+ BT_CHECK_GATT_CLIENT_SUPPORT();
BT_CHECK_INIT_STATUS();
BT_CHECK_INPUT_PARAMETER(client);
unsigned int mtu_value = 0;
bt_gatt_client_s *client_s = (bt_gatt_client_s *)client;
- BT_CHECK_SUPPORTED_FEATURE(BT_FEATURE_COMMON);
+ BT_CHECK_GATT_CLIENT_SUPPORT();
BT_CHECK_INIT_STATUS();
BT_CHECK_INPUT_PARAMETER(client);
{
bt_gatt_client_s *client_s = (bt_gatt_client_s *)client;
- BT_CHECK_SUPPORTED_FEATURE(BT_FEATURE_COMMON);
+ BT_CHECK_GATT_CLIENT_SUPPORT();
BT_CHECK_INIT_STATUS();
BT_CHECK_INPUT_PARAMETER(callback);
BT_CHECK_INPUT_PARAMETER(client);
{
bt_gatt_client_s *client_s = (bt_gatt_client_s *)client;
- BT_CHECK_SUPPORTED_FEATURE(BT_FEATURE_COMMON);
+ BT_CHECK_GATT_CLIENT_SUPPORT();
BT_CHECK_INIT_STATUS();
BT_CHECK_INPUT_PARAMETER(client);