TizenRT Public API  v2.0 M2
CAPI_NETWORK_BLUETOOTH_MODULE

Files

file  bluetooth.h
 API to control the Bluetooth adapter and devices and communications.
 

Enumerations

Functions

int bt_initialize (void)
 Initializes the Bluetooth API. 2.3. More...
 
int bt_deinitialize (void)
 Releases all resources of the Bluetooth API. 2.3. More...
 
int bt_get_uuid_name (const char *uuid, char **name)
 Gets the specification name for the given UUID. 3.0. More...
 
int bt_adapter_get_state (bt_adapter_state_e *adapter_state)
 Gets the current state of local Bluetooth adapter. 2.3. More...
 
int bt_adapter_get_address (char **local_address)
 Gets the address of local Bluetooth adapter. 2.3. More...
 
int bt_adapter_get_name (char **local_name)
 Gets the name of local Bluetooth adapter. More...
 
int bt_adapter_set_name (const char *local_name)
 Sets the name of local Bluetooth adapter. 2.3 public http://tizen.org/privilege/bluetooth. More...
 
int bt_adapter_get_visibility (bt_adapter_visibility_mode_e *mode, int *duration)
 Gets the visibility mode of local Bluetooth adapter. 2.3. More...
 
int bt_adapter_start_device_discovery (void)
 Starts the device discovery, asynchronously. More...
 
int bt_adapter_stop_device_discovery (void)
 Stops the device discovery, asynchronously. 2.3 public http://tizen.org/privilege/bluetooth. More...
 
int bt_adapter_is_discovering (bool *is_discovering)
 Checks for the device discovery is in progress or not. 2.3. More...
 
int bt_device_get_service_mask_from_uuid_list (char **uuids, int no_of_service, bt_service_class_t *service_mask_list)
 Gets the service mask from the UUID list. 2.3. More...
 
int bt_adapter_foreach_bonded_device (bt_adapter_bonded_device_cb callback, void *user_data)
 Retrieves the device information of all bonded devices. 2.3. More...
 
int bt_adapter_get_bonded_device_info (const char *remote_address, bt_device_info_s **device_info)
 Gets the device information of a bonded device. 2.3. More...
 
int bt_adapter_free_device_info (bt_device_info_s *device_info)
 Frees device info. 2.3. More...
 
int bt_adapter_is_service_used (const char *service_uuid, bool *used)
 Checks whether the UUID of service is used or not. 2.3. More...
 
int bt_adapter_set_state_changed_cb (bt_adapter_state_changed_cb callback, void *user_data)
 Registers a callback function to be invoked when the Bluetooth adapter state changes. 2.3. More...
 
int bt_adapter_unset_state_changed_cb (void)
 Unregisters the callback function. 2.3. More...
 
int bt_adapter_set_name_changed_cb (bt_adapter_name_changed_cb callback, void *user_data)
 Registers a callback function to be invoked when the name of Bluetooth adapter changes. 2.3. More...
 
int bt_adapter_unset_name_changed_cb (void)
 Unregisters the callback function. 2.3. More...
 
int bt_adapter_set_visibility_mode_changed_cb (bt_adapter_visibility_mode_changed_cb callback, void *user_data)
 Registers a callback function to be invoked when the visibility mode changes. 2.3. More...
 
int bt_adapter_unset_visibility_mode_changed_cb (void)
 Unregisters the callback function. 2.3. More...
 
int bt_adapter_set_visibility_duration_changed_cb (bt_adapter_visibility_duration_changed_cb callback, void *user_data)
 Registers a callback function to be invoked every second. More...
 
int bt_adapter_unset_visibility_duration_changed_cb (void)
 Unregisters the callback function. 2.3. More...
 
int bt_adapter_set_device_discovery_state_changed_cb (bt_adapter_device_discovery_state_changed_cb callback, void *user_data)
 Registers a callback function to be invoked when the device discovery state changes. 2.3. More...
 
int bt_adapter_unset_device_discovery_state_changed_cb (void)
 Unregisters the callback function. 2.3. More...
 
int bt_adapter_get_local_oob_data (unsigned char **hash, unsigned char **randomizer, int *hash_len, int *randomizer_len)
 Gets the Hash and Randomizer value, synchronously. 2.3 public http://tizen.org/privilege/bluetooth. More...
 
int bt_adapter_set_remote_oob_data (const char *remote_address, unsigned char *hash, unsigned char *randomizer, int hash_len, int randomizer_len)
 Sets the Hash and Randomizer value, synchronously. 2.3 public http://tizen.org/privilege/bluetooth. More...
 
int bt_adapter_get_local_oob_ext_data (unsigned char **hash192, unsigned char **randomizer192, int *hash192_len, int *randomizer192_len, unsigned char **hash256, unsigned char **randomizer256, int *hash256_len, int *randomizer256_len)
 Gets the Hash and Randomizer value, synchronously. 3.0 public http://tizen.org/privilege/bluetooth. More...
 
int bt_adapter_set_remote_oob_ext_data (const char *remote_address, const unsigned char *hash192, const unsigned char *randomizer192, int hash192_len, int randomizer192_len, const unsigned char *hash256, const unsigned char *randomizer256, int hash256_len, int randomizer256_len)
 Sets the Hash and Randomizer value, synchronously. 3.0 public http://tizen.org/privilege/bluetooth. More...
 
int bt_adapter_remove_remote_oob_data (const char *remote_address)
 Deletes the Hash and Randomizer value, synchronously. 2.3 public http://tizen.org/privilege/bluetooth. More...
 
int bt_adapter_le_is_discovering (bool *is_discovering) TIZEN_DEPRECATED_API
 Checks for the LE device discovery is in progress or not. 2.3. More...
 
int bt_adapter_le_start_scan (bt_adapter_le_scan_result_cb cb, void *user_data)
 Starts the LE scan to find LE advertisement. More...
 
int bt_adapter_le_stop_scan (void)
 Stops the LE scan. 2.3.1 public http://tizen.org/privilege/bluetooth. More...
 
int bt_adapter_le_get_scan_result_service_uuids (const bt_adapter_le_device_scan_result_info_s *info, bt_adapter_le_packet_type_e pkt_type, char ***uuids, int *count)
 Gets the service UUID list from the scan result information. 2.3.1. More...
 
int bt_adapter_le_get_scan_result_device_name (const bt_adapter_le_device_scan_result_info_s *info, bt_adapter_le_packet_type_e pkt_type, char **name)
 Gets the device name from the scan result information. 2.3.1. More...
 
int bt_adapter_le_get_scan_result_tx_power_level (const bt_adapter_le_device_scan_result_info_s *info, bt_adapter_le_packet_type_e pkt_type, int *power_level)
 Gets the transmission power level from the scan result information. 2.3.1. More...
 
int bt_adapter_le_get_scan_result_service_solicitation_uuids (const bt_adapter_le_device_scan_result_info_s *info, bt_adapter_le_packet_type_e pkt_type, char ***uuids, int *count)
 Gets the service solicitation UUID list from the scan result information. 2.3.1. More...
 
int bt_adapter_le_get_scan_result_service_data_list (const bt_adapter_le_device_scan_result_info_s *info, bt_adapter_le_packet_type_e pkt_type, bt_adapter_le_service_data_s **data_list, int *count)
 Gets the service data list from the scan result information. 2.3.1. More...
 
int bt_adapter_le_free_service_data_list (bt_adapter_le_service_data_s *data_list, int count)
 Frees service data list. 2.3.1. More...
 
int bt_adapter_le_get_scan_result_appearance (const bt_adapter_le_device_scan_result_info_s *info, bt_adapter_le_packet_type_e pkt_type, int *appearance)
 Gets the appearance from the scan result information. 2.3.1. More...
 
int bt_adapter_le_get_scan_result_manufacturer_data (const bt_adapter_le_device_scan_result_info_s *info, bt_adapter_le_packet_type_e pkt_type, int *manufacturer_id, char **manufacturer_data, int *manufacturer_data_len)
 Gets the manufacturer data from the scan result information. 2.3.1. More...
 
int bt_adapter_le_get_scan_result_ibeacon_report (const bt_adapter_le_device_scan_result_info_s *info, bt_adapter_le_packet_type_e pkt_type, bt_adapter_le_ibeacon_scan_result_info_s **ibeacon_info)
 Gets iBeacon format's data from the scan result information. 4.0. More...
 
int bt_adapter_le_free_ibeacon_report (bt_adapter_le_ibeacon_scan_result_info_s *ibeacon_info)
 Frees iBeacon information. 4.0. More...
 
int bt_adapter_le_create_advertiser (bt_advertiser_h *advertiser)
 Creates advertiser to advertise device's existence or respond to LE scanning request. 2.3. More...
 
int bt_adapter_le_destroy_advertiser (bt_advertiser_h advertiser)
 Destroys advertiser. 2.3. More...
 
int bt_ipsp_initialize (bt_ipsp_init_state_changed_cb callback, void *user_data)
 Initializes the Bluetooth IPSP (Internet Protocol Support Profile) service. 4.0. More...
 
int bt_ipsp_deinitialize (void)
 Deinitializes the Bluetooth IPSP (Internet Protocol Support Profile) service. 4.0. More...
 
int bt_ipsp_connect (const char *remote_address)
 Connects to a remote device's IPSP service over LE, asynchronously. 4.0 public http://tizen.org/privilege/bluetooth. More...
 
int bt_ipsp_disconnect (const char *remote_address)
 Disconnects from a remote device's IPSP service, asynchronously. 4.0 public http://tizen.org/privilege/bluetooth. More...
 
int bt_ipsp_set_connection_state_changed_cb (bt_ipsp_connection_state_changed_cb callback, void *user_data)
 Registers a callback function that will be invoked when the connection state changes. 4.0. More...
 
int bt_ipsp_unset_connection_state_changed_cb (void)
 Unregisters the callback function called when the connection state changes. 4.0. More...
 
int bt_adapter_le_add_advertising_service_uuid (bt_advertiser_h advertiser, bt_adapter_le_packet_type_e pkt_type, const char *uuid)
 Adds a service UUID to advertise or scan response data. The maximum advertised or responded data size is 31 bytes including data type and system wide data. 2.3.1. More...
 
int bt_adapter_le_add_advertising_service_solicitation_uuid (bt_advertiser_h advertiser, bt_adapter_le_packet_type_e pkt_type, const char *uuid)
 Adds a service solicitation UUID to advertise or scan response data. The maximum advertised or responded data size is 31 bytes including data type and system wide data. 2.3.1. More...
 
int bt_adapter_le_add_advertising_service_data (bt_advertiser_h advertiser, bt_adapter_le_packet_type_e pkt_type, const char *uuid, const char *service_data, int service_data_len)
 Adds service data to advertise or scan response data. The maximum advertised or responded data size is 31 bytes including data type and system wide data. 2.3.1. More...
 
int bt_adapter_le_set_advertising_appearance (bt_advertiser_h advertiser, bt_adapter_le_packet_type_e pkt_type, int appearance)
 Sets the external appearance of this device to advertise or scan response data. Please refer to the adopted Bluetooth specification for the the appearance. 2.3.1. More...
 
int bt_adapter_le_add_advertising_manufacturer_data (bt_advertiser_h advertiser, bt_adapter_le_packet_type_e pkt_type, int manufacturer_id, const char *manufacturer_data, int manufacturer_data_len)
 Adds manufacturer specific data to advertise or scan response data. Please refer to the Bluetooth Assigned Numbers provided by the Bluetooth SIG for a list of existing company identifiers. The maximum advertised or responded data size is 31 bytes including data type and system wide data. 2.3.1. More...
 
int bt_adapter_le_set_advertising_device_name (bt_advertiser_h advertiser, bt_adapter_le_packet_type_e pkt_type, bool include_name)
 Sets whether the device name should be included in advertise or scan response data. The maximum advertised or responded data size is 31 bytes including data type and system wide data. 2.3.1. More...
 
int bt_adapter_le_set_advertising_tx_power_level (bt_advertiser_h advertiser, bt_adapter_le_packet_type_e pkt_type, bool include_tx_power)
 Sets whether the transmission power level should be included in advertise or scan response data. The maximum advertised or responded data size is 31 bytes including data type and system wide data. 2.3.1. More...
 
int bt_adapter_le_clear_advertising_data (bt_advertiser_h advertiser, bt_adapter_le_packet_type_e pkt_type)
 Clears all data to be advertised or responded to scan request from LE scanning device. 2.3. More...
 
int bt_adapter_le_stop_advertising (bt_advertiser_h advertiser)
 Stops the advertising. 2.3 public http://tizen.org/privilege/bluetooth. More...
 
int bt_adapter_le_start_advertising_new (bt_advertiser_h advertiser, bt_adapter_le_advertising_state_changed_cb cb, void *user_data)
 Starts advertising with passed advertiser and advertising parameters. More...
 
int bt_adapter_le_set_advertising_mode (bt_advertiser_h advertiser, bt_adapter_le_advertising_mode_e mode)
 Sets advertising mode to control the advertising power and latency. 2.3.1 public http://tizen.org/privilege/bluetooth. More...
 
int bt_adapter_le_set_advertising_connectable (bt_advertiser_h advertiser, bool connectable)
 Sets whether the advertising type should be connectable or non-connectable. 2.3.1 public http://tizen.org/privilege/bluetooth. More...
 
int bt_adapter_le_set_scan_mode (bt_adapter_le_scan_mode_e scan_mode)
 Sets Bluetooth LE scan mode. 3.0 public http://tizen.org/privilege/bluetooth. More...
 
int bt_device_create_bond (const char *remote_address)
 Creates a bond with a remote Bluetooth device, asynchronously. 2.3 public http://tizen.org/privilege/bluetooth. More...
 
int bt_device_cancel_bonding (void)
 Cancels the bonding process. 2.3 public http://tizen.org/privilege/bluetooth. More...
 
int bt_device_destroy_bond (const char *remote_address)
 Destroys the bond, asynchronously. 2.3 public http://tizen.org/privilege/bluetooth. More...
 
int bt_device_set_alias (const char *remote_address, const char *alias)
 Sets an alias for the bonded device. 2.3 public http://tizen.org/privilege/bluetooth. More...
 
int bt_device_set_authorization (const char *remote_address, bt_device_authorization_e authorization_state)
 Sets the authorization of a bonded device, asynchronously. 2.3 public http://tizen.org/privilege/bluetooth. More...
 
int bt_device_start_service_search (const char *remote_address)
 Starts the search for services supported by the specified device, asynchronously. 2.3 public http://tizen.org/privilege/bluetooth. More...
 
int bt_device_foreach_connected_profiles (const char *remote_address, bt_device_connected_profile callback, void *user_data)
 Gets the connected profiles. 2.3. More...
 
int bt_device_is_profile_connected (const char *remote_address, bt_profile_e bt_profile, bool *connected_status)
 Gets the profile connected status. 2.3. More...
 
int bt_device_update_le_connection_mode (const char *remote_address, bt_device_le_connection_mode_e mode)
 Updates a LE connection mode. 3.0 public http://tizen.org/privilege/bluetooth. More...
 
int bt_device_set_bond_created_cb (bt_device_bond_created_cb callback, void *user_data)
 Registers a callback function to be invoked when the bond creates. 2.3. More...
 
int bt_device_unset_bond_created_cb (void)
 Unregisters the callback function. 2.3. More...
 
int bt_device_set_bond_destroyed_cb (bt_device_bond_destroyed_cb callback, void *user_data)
 Registers a callback function to be invoked when the bond destroys. 2.3. More...
 
int bt_device_unset_bond_destroyed_cb (void)
 Unregisters the callback function. 2.3. More...
 
int bt_device_set_authorization_changed_cb (bt_device_authorization_changed_cb callback, void *user_data)
 Registers a callback function to be invoked when the authorization of device changes. 2.3. More...
 
int bt_device_unset_authorization_changed_cb (void)
 Unregisters the callback function. 2.3. More...
 
int bt_device_set_service_searched_cb (bt_device_service_searched_cb callback, void *user_data)
 Registers a callback function to be invoked when the process of service search finishes. 2.3. More...
 
int bt_device_unset_service_searched_cb (void)
 Unregisters the callback function. 2.3. More...
 
int bt_device_set_connection_state_changed_cb (bt_device_connection_state_changed_cb callback, void *user_data)
 Registers a callback function to be invoked when the connection state is changed. 2.3. More...
 
int bt_device_unset_connection_state_changed_cb (void)
 Unregisters the callback function to be invoked when the connection state is changed. 2.3. More...
 
int bt_socket_create_rfcomm (const char *service_uuid, int *socket_fd)
 Registers a RFCOMM server socket with a specific UUID. 2.3 public http://tizen.org/privilege/bluetooth. More...
 
int bt_socket_destroy_rfcomm (int socket_fd)
 Removes the RFCOMM server socket which was created using bt_socket_create_rfcomm(). 2.3 public http://tizen.org/privilege/bluetooth. More...
 
int bt_socket_listen_and_accept_rfcomm (int socket_fd, int max_pending_connections)
 Starts listening on passed RFCOMM socket and accepts connection requests. More...
 
int bt_socket_connect_rfcomm (const char *remote_address, const char *service_uuid)
 Connects to a specific RFCOMM based service on a remote Bluetooth device UUID, asynchronously. 2.3 public http://tizen.org/privilege/bluetooth. More...
 
int bt_socket_disconnect_rfcomm (int socket_fd)
 Disconnects the RFCOMM connection with the given file descriptor of connected socket. 2.3 public http://tizen.org/privilege/bluetooth. More...
 
int bt_socket_send_data (int socket_fd, const char *data, int length)
 Sends data to the connected device. 2.3 public http://tizen.org/privilege/bluetooth. More...
 
int bt_socket_set_data_received_cb (bt_socket_data_received_cb callback, void *user_data)
 Registers a callback function that will be invoked when you receive data. 2.3. More...
 
int bt_socket_unset_data_received_cb (void)
 Unregisters the callback function. 2.3. More...
 
int bt_socket_set_connection_requested_cb (bt_socket_connection_requested_cb callback, void *user_data)
 Registers a callback function that will be invoked when a RFCOMM connection is requested. 2.3. More...
 
int bt_socket_unset_connection_requested_cb (void)
 Unregisters the callback function. 2.3. More...
 
int bt_socket_set_connection_state_changed_cb (bt_socket_connection_state_changed_cb callback, void *user_data)
 Registers a callback function that will be invoked when the connection state changes. 2.3. More...
 
int bt_socket_unset_connection_state_changed_cb (void)
 Unregisters the callback function. 2.3. More...
 
int bt_opp_server_initialize_by_connection_request (const char *destination, bt_opp_server_connection_requested_cb connection_requested_cb, void *user_data)
 Initializes the Bluetooth OPP server requested by bt_opp_server_connection_requested_cb(). More...
 
int bt_opp_server_deinitialize (void)
 Deinitializes the Bluetooth OPP server. 2.3. More...
 
int bt_opp_server_accept (bt_opp_server_transfer_progress_cb progress_cb, bt_opp_server_transfer_finished_cb finished_cb, const char *name, void *user_data, int *transfer_id)
 Accepts the push request from the remote device. 2.3 public http://tizen.org/privilege/bluetooth. More...
 
int bt_opp_server_reject (void)
 Rejects the push request from the remote device. 2.3 public http://tizen.org/privilege/bluetooth. More...
 
int bt_opp_server_cancel_transfer (int transfer_id)
 Cancels the transfer. 2.3 public http://tizen.org/privilege/bluetooth. More...
 
int bt_opp_server_set_destination (const char *destination)
 Sets the destination path of file to be pushed. 2.3 public http://tizen.org/privilege/bluetooth. More...
 
int bt_opp_client_initialize (void)
 Initializes the Bluetooth OPP client. 2.3. More...
 
int bt_opp_client_deinitialize (void)
 Deinitializes the Bluetooth OPP client. 2.3. More...
 
int bt_opp_client_add_file (const char *file)
 Adds file to be pushed. 2.3. More...
 
int bt_opp_client_clear_files (void)
 Adds file to be pushed. 2.3. More...
 
int bt_opp_client_push_files (const char *remote_address, bt_opp_client_push_responded_cb responded_cb, bt_opp_client_push_progress_cb progress_cb, bt_opp_client_push_finished_cb finished_cb, void *user_data)
 Pushes the file to the remote device, asynchronously. More...
 
int bt_opp_client_cancel_push (void)
 Cancels the push request in progress, asynchronously. 2.3 public http://tizen.org/privilege/bluetooth. More...
 
int bt_hid_host_initialize (bt_hid_host_connection_state_changed_cb connection_cb, void *user_data)
 Initializes the Bluetooth HID (Human Interface Device) Host. 2.3. More...
 
int bt_hid_host_deinitialize (void)
 Deinitializes the Bluetooth HID (Human Interface Device) Host. 2.3. More...
 
int bt_hid_host_connect (const char *remote_address)
 Connects the remote device with the HID (Human Interface Device) service, asynchronously. 2.3 public http://tizen.org/privilege/bluetooth. More...
 
int bt_hid_host_disconnect (const char *remote_address)
 Disconnects the remote device with the HID (Human Interface Device) service, asynchronously. 2.3 public http://tizen.org/privilege/bluetooth. More...
 
int bt_hid_device_activate (bt_hid_device_connection_state_changed_cb callback, void *user_data)
 Activates the Bluetooth HID Device role. public http://tizen.org/privilege/bluetooth. More...
 
int bt_hid_device_deactivate (void)
 Deactivates the Bluetooth HID Device role. public http://tizen.org/privilege/bluetooth. More...
 
int bt_hid_device_connect (const char *remote_address)
 Initiates the HID device connection with the Device role, asynchronously. public http://tizen.org/privilege/bluetooth. More...
 
int bt_hid_device_disconnect (const char *remote_address)
 Disconnects from the HID Host device, asynchronously. public http://tizen.org/privilege/bluetooth. More...
 
int bt_hid_device_send_mouse_event (const char *remote_address, const bt_hid_mouse_data_s *mouse_data)
 Sends the mouse event data to the remote device. public http://tizen.org/privilege/bluetooth. More...
 
int bt_hid_device_send_key_event (const char *remote_address, const bt_hid_key_data_s *key_data)
 Sends the keyboard event data to the remote device. public http://tizen.org/privilege/bluetooth. More...
 
int bt_hid_device_set_data_received_cb (bt_hid_device_data_received_cb callback, void *user_data)
 Sets the callback called when the device receives data from the HID Host. . More...
 
int bt_hid_device_unset_data_received_cb (void)
 Unsets the data received callback. . More...
 
int bt_hid_device_reply_to_report (const char *remote_address, bt_hid_header_type_e header_type, bt_hid_param_type_e param_type, const char *data, unsigned int data_len)
 Responds to reports from the HID Host. public http://tizen.org/privilege/bluetooth. More...
 
int bt_audio_initialize (void)
 Initializes the Bluetooth profiles related with audio. 2.3. More...
 
int bt_audio_deinitialize (void)
 Deinitializes the Bluetooth profiles related with audio. 2.3. More...
 
int bt_audio_connect (const char *remote_address, bt_audio_profile_type_e type)
 Connects the remote device with the given audio profile, asynchronously. More...
 
int bt_audio_disconnect (const char *remote_address, bt_audio_profile_type_e type)
 Disconnects the remote device with the given audio profile, asynchronously. More...
 
int bt_audio_set_connection_state_changed_cb (bt_audio_connection_state_changed_cb callback, void *user_data)
 Registers a callback function that will be invoked when the connection state is changed. 2.3. More...
 
int bt_audio_unset_connection_state_changed_cb (void)
 Unregisters a callback function that will be invoked when the connection state is changed. 2.3. More...
 
int bt_avrcp_target_initialize (bt_avrcp_target_connection_state_changed_cb callback, void *user_data)
 Initializes the Bluetooth AVRCP (Audio/Video Remote Control Profile) target service. 2.4. More...
 
int bt_avrcp_target_deinitialize (void)
 Deinitializes the Bluetooth AVRCP (Audio/Video Remote Control Profile) target service. 2.4. More...
 
int bt_avrcp_target_notify_equalizer_state (bt_avrcp_equalizer_state_e state)
 Notifies the equalizer state to the remote device. 2.4 public http://tizen.org/privilege/bluetooth. More...
 
int bt_avrcp_target_notify_repeat_mode (bt_avrcp_repeat_mode_e mode)
 Notifies the repeat mode to the remote device. 2.4 public http://tizen.org/privilege/bluetooth. More...
 
int bt_avrcp_target_notify_shuffle_mode (bt_avrcp_shuffle_mode_e mode)
 Notifies the shuffle mode to the remote device. 2.4 public http://tizen.org/privilege/bluetooth. More...
 
int bt_avrcp_target_notify_scan_mode (bt_avrcp_scan_mode_e mode)
 Notifies the scan mode to the remote device. 2.4 public http://tizen.org/privilege/bluetooth. More...
 
int bt_avrcp_target_notify_player_state (bt_avrcp_player_state_e state)
 Notifies the player state to the remote device. 2.4 public http://tizen.org/privilege/bluetooth. More...
 
int bt_avrcp_target_notify_position (unsigned int position)
 Notifies the current position of song to the remote device. 2.4 public http://tizen.org/privilege/bluetooth. More...
 
int bt_avrcp_target_notify_track (const char *title, const char *artist, const char *album, const char *genre, unsigned int track_num, unsigned int total_tracks, unsigned int duration)
 Notifies the track to the remote device. 2.4 public http://tizen.org/privilege/bluetooth. More...
 
int bt_avrcp_set_equalizer_state_changed_cb (bt_avrcp_equalizer_state_changed_cb callback, void *user_data)
 Registers a callback function that will be invoked when the equalizer state is changed. (e.g., by a TV remote control or other input devices). 2.4. More...
 
int bt_avrcp_unset_equalizer_state_changed_cb (void)
 Unregisters a callback function that will be invoked when the equalizer state is changed. (e.g., by a TV remote control or other input devices). 2.4. More...
 
int bt_avrcp_set_repeat_mode_changed_cb (bt_avrcp_repeat_mode_changed_cb callback, void *user_data)
 Registers a callback function that will be invoked when the repeat mode is changed. (e.g., by a TV remote control or other input devices). 2.4. More...
 
int bt_avrcp_unset_repeat_mode_changed_cb (void)
 Unregisters a callback function that will be invoked when the repeat mode is changed. (e.g., by a TV remote control or other input devices). 2.4. More...
 
int bt_avrcp_set_shuffle_mode_changed_cb (bt_avrcp_shuffle_mode_changed_cb callback, void *user_data)
 Registers a callback function that will be invoked when the shuffle mode is changed. (e.g., by a TV remote control or other input devices). 2.4. More...
 
int bt_avrcp_unset_shuffle_mode_changed_cb (void)
 Unregisters a callback function that will be invoked when the shuffle mode is changed. (e.g., by a TV remote control or other input devices). 2.4. More...
 
int bt_avrcp_set_scan_mode_changed_cb (bt_avrcp_scan_mode_changed_cb callback, void *user_data)
 Registers a callback function that will be invoked when the scan mode is changed. (e.g., by a TV remote control or other input devices). 2.4. More...
 
int bt_avrcp_unset_scan_mode_changed_cb (void)
 Unregisters a callback function that will be invoked when the scan mode is changed. (e.g., by a TV remote control or other input devices). 2.4. More...
 
int bt_avrcp_set_position_changed_cb (bt_avrcp_position_changed_cb callback, void *user_data)
 Registers a callback function that will be invoked when the song position is changed. (e.g., by a TV remote control or other input devices). 3.0. More...
 
int bt_avrcp_unset_position_changed_cb (void)
 Unregisters a callback function that will be invoked when the song position is changed. (e.g., by a TV remote control or other input devices). 3.0. More...
 
int bt_avrcp_set_play_status_changed_cb (bt_avrcp_play_status_changed_cb callback, void *user_data)
 Registers a callback function that will be invoked when the Play status is changed. (e.g., by a TV remote control or other input devices). 3.0. More...
 
int bt_avrcp_unset_play_status_changed_cb (void)
 Unregisters a callback function that will be invoked when the Play status is changed. (e.g., by a TV remote control or other input devices). 3.0. More...
 
int bt_avrcp_set_track_info_changed_cb (bt_avrcp_track_info_changed_cb callback, void *user_data)
 Registers a callback function that will be invoked when the track metadata is changed. (e.g., by a TV remote control or other input devices). 3.0. More...
 
int bt_avrcp_unset_track_info_changed_cb (void)
 Unregisters a callback function that will be invoked when the track metadata is changed. (e.g., by a TV remote control or other input devices). 3.0. More...
 
int bt_avrcp_control_initialize (bt_avrcp_control_connection_state_changed_cb callback, void *user_data)
 Initializes the Bluetooth AVRCP (Audio/Video Remote Control Profile) controller service. 3.0. More...
 
int bt_avrcp_control_deinitialize (void)
 Deinitializes the Bluetooth AVRCP (Audio/Video Remote Control Profile) controller service. 3.0. More...
 
int bt_avrcp_control_connect (const char *remote_address)
 Connects the AVRCP (Audio/Video Remote Control Profile) target device. 3.0 public http://tizen.org/privilege/bluetooth. More...
 
int bt_avrcp_control_disconnect (const char *remote_address)
 Disconnects from the AVRCP (Audio/Video Remote Control Profile) target device. 3.0 public http://tizen.org/privilege/bluetooth. More...
 
int bt_avrcp_control_send_player_command (bt_avrcp_player_command_e cmd)
 Sends a command to the target device. 3.0 public http://tizen.org/privilege/bluetooth. More...
 
int bt_avrcp_control_set_equalizer_state (bt_avrcp_equalizer_state_e state)
 Sends the equalizer state change request to the remote device. 3.0 public http://tizen.org/privilege/bluetooth. More...
 
int bt_avrcp_control_get_equalizer_state (bt_avrcp_equalizer_state_e *state)
 Gets the the equalizer state of the remote device. 3.0. More...
 
int bt_avrcp_control_set_repeat_mode (bt_avrcp_repeat_mode_e mode)
 Sends the repeat change request to the remote device. 3.0 public http://tizen.org/privilege/bluetooth. More...
 
int bt_avrcp_control_get_repeat_mode (bt_avrcp_repeat_mode_e *mode)
 Gets the repeat state of the remote device. 3.0. More...
 
int bt_avrcp_control_set_shuffle_mode (bt_avrcp_shuffle_mode_e mode)
 Sends the shuffle mode change request to the remote device. 3.0 public http://tizen.org/privilege/bluetooth. More...
 
int bt_avrcp_control_get_shuffle_mode (bt_avrcp_shuffle_mode_e *mode)
 Gets the shuffle mode of the remote device. 3.0. More...
 
int bt_avrcp_control_set_scan_mode (bt_avrcp_scan_mode_e mode)
 Sends the scan mode change request to the remote device. 3.0 public http://tizen.org/privilege/bluetooth. More...
 
int bt_avrcp_control_get_scan_mode (bt_avrcp_scan_mode_e *mode)
 Gets the scan mode of the remote device. 3.0. More...
 
int bt_avrcp_control_get_position (unsigned int *position)
 Gets the position of the song played by the remote device. 3.0. More...
 
int bt_avrcp_control_get_play_status (bt_avrcp_player_state_e *status)
 Gets the play status of the remote device. 3.0. More...
 
int bt_avrcp_control_get_track_info (bt_avrcp_metadata_attributes_info_s **track)
 Gets the metadata of the track played by the remote device. 3.0. More...
 
int bt_avrcp_control_free_track_info (bt_avrcp_metadata_attributes_info_s *track)
 Frees the track metadata. 3.0. More...
 
int bt_hdp_register_sink_app (unsigned short data_type, char **app_id) TIZEN_DEPRECATED_API
 Registers an application that acts as the Sink role of HDP (Health Device Profile). 2.3 public http://tizen.org/privilege/bluetooth. More...
 
int bt_hdp_unregister_sink_app (const char *app_id) TIZEN_DEPRECATED_API
 Unregisters the given application that acts as the Sink role of HDP (Health Device Profile). 2.3 public http://tizen.org/privilege/bluetooth. More...
 
int bt_hdp_connect_to_source (const char *remote_address, const char *app_id) TIZEN_DEPRECATED_API
 Connects the remote device which acts as Source role, asynchronously. 2.3 public http://tizen.org/privilege/bluetooth. More...
 
int bt_hdp_disconnect (const char *remote_address, unsigned int channel) TIZEN_DEPRECATED_API
 Disconnects the remote device, asynchronously. 2.3 public http://tizen.org/privilege/bluetooth. More...
 
int bt_hdp_send_data (unsigned int channel, const char *data, unsigned int size) TIZEN_DEPRECATED_API
 Sends the data to the remote device. 2.3 public http://tizen.org/privilege/bluetooth. More...
 
int bt_hdp_set_connection_state_changed_cb (bt_hdp_connected_cb connected_cb, bt_hdp_disconnected_cb disconnected_cb, void *user_data) TIZEN_DEPRECATED_API
 Registers a callback function that will be invoked when the connection state is changed. 2.3. More...
 
int bt_hdp_unset_connection_state_changed_cb (void) TIZEN_DEPRECATED_API
 Unregisters a callback function that will be invoked when the connection state is changed. 2.3. More...
 
int bt_hdp_set_data_received_cb (bt_hdp_data_received_cb callback, void *user_data) TIZEN_DEPRECATED_API
 Registers a callback function that will be invoked when you receive the data. 2.3. More...
 
int bt_hdp_unset_data_received_cb (void) TIZEN_DEPRECATED_API
 Unregisters a callback function that will be invoked when you receive the data. 2.3. More...
 
int bt_gatt_get_value (bt_gatt_h gatt_handle, char **value, int *value_length)
 Gets the value of a characteristic or descriptor's GATT handle. 2.3.1. More...
 
int bt_gatt_get_int_value (bt_gatt_h gatt_handle, bt_data_type_int_e type, int offset, int *value)
 Gets the value of a characteristic or descriptor's GATT handle as an integer type. 2.3.1. More...
 
int bt_gatt_get_float_value (bt_gatt_h gatt_handle, bt_data_type_float_e type, int offset, float *value)
 Gets the value of a characteristic or descriptor's GATT handle as a float type. 2.3.1. More...
 
int bt_gatt_set_value (bt_gatt_h gatt_handle, const char *value, int value_length)
 Updates the value of a characteristic or descriptor's GATT handle. 2.3.1. More...
 
int bt_gatt_set_int_value (bt_gatt_h gatt_handle, bt_data_type_int_e type, int value, int offset)
 Updates the value of a characteristic or descriptor's GATT handle using a integer type's value. 2.3.1. More...
 
int bt_gatt_set_float_value (bt_gatt_h gatt_handle, bt_data_type_float_e type, int mantissa, int exponent, int offset)
 Updates the value of a characteristic or descriptor's GATT handle using a float type's value. 2.3.1. More...
 
int bt_gatt_get_uuid (bt_gatt_h gatt_handle, char **uuid)
 Gets the UUID of a service, characteristic or descriptor's GATT handle. 2.3.1. More...
 
int bt_gatt_get_type (bt_gatt_h gatt_handle, bt_gatt_type_e *gatt_type)
 Gets the type of GATT handle. 2.3.1. More...
 
int bt_gatt_service_get_client (bt_gatt_h service, bt_gatt_client_h *client)
 Gets the GATT client handle which the specified service belongs to. 2.3.1. More...
 
int bt_gatt_service_get_characteristic (bt_gatt_h service, const char *uuid, bt_gatt_h *characteristic)
 Gets a characteristic's GATT handle which has specific UUID. 2.3.1. More...
 
int bt_gatt_service_foreach_characteristics (bt_gatt_h service, bt_gatt_foreach_cb callback, void *user_data)
 Invokes callback function on each characteristic that belongs to the specified service. 2.3.1. More...
 
int bt_gatt_service_get_included_service (bt_gatt_h service, const char *uuid, bt_gatt_h *included_service)
 Gets an included service's GATT handle which has specific UUID. 2.3.1. More...
 
int bt_gatt_service_foreach_included_services (bt_gatt_h service, bt_gatt_foreach_cb callback, void *user_data)
 Invokes callback function on each included service that belongs to the specified service. 2.3.1. More...
 
int bt_gatt_characteristic_get_service (bt_gatt_h characteristic, bt_gatt_h *service)
 Gets the service's GATT handle which the specified characteristic belongs to. 2.3.1. More...
 
int bt_gatt_characteristic_get_properties (bt_gatt_h characteristic, int *properties)
 Gets the properties which a characteristic's GATT handle has. 2.3.1. More...
 
int bt_gatt_characteristic_get_write_type (bt_gatt_h characteristic, bt_gatt_write_type_e *write_type)
 Gets the write type of the specified characteristic. 2.3.1. More...
 
int bt_gatt_characteristic_set_write_type (bt_gatt_h characteristic, bt_gatt_write_type_e write_type)
 Updates the write type of the specified characteristic. 2.3.1. More...
 
int bt_gatt_characteristic_get_descriptor (bt_gatt_h characteristic, const char *uuid, bt_gatt_h *descriptor)
 Gets a descriptor's GATT handle which has specific UUID. 2.3.1. More...
 
int bt_gatt_characteristic_foreach_descriptors (bt_gatt_h characteristic, bt_gatt_foreach_cb callback, void *user_data)
 Invokes callback function on each descriptor that belongs to the specified characteristic. 2.3.1. More...
 
int bt_gatt_descriptor_get_characteristic (bt_gatt_h descriptor, bt_gatt_h *characteristic)
 Gets the characteristic's GATT handle which the specified descriptor belongs to. 2.3.1. More...
 
int bt_gatt_client_create (const char *remote_address, bt_gatt_client_h *client)
 Creates the GATT client handle. 2.3.1. More...
 
int bt_gatt_client_destroy (bt_gatt_client_h client)
 Destroys the GATT client's handle. 2.3.1. More...
 
int bt_gatt_client_get_remote_address (bt_gatt_client_h client, char **remote_address)
 Gets the address of remote device. 2.3.1. More...
 
int bt_gatt_client_read_value (bt_gatt_h gatt_handle, bt_gatt_client_request_completed_cb callback, void *user_data)
 Reads the value of a characteristic or descriptor from the remote device asynchronously. 2.3.1 public http://tizen.org/privilege/bluetooth. More...
 
int bt_gatt_client_write_value (bt_gatt_h gatt_handle, bt_gatt_client_request_completed_cb callback, void *user_data)
 Writes the value of a characteristic or descriptor to the remote device asynchronously. 2.3.1 public http://tizen.org/privilege/bluetooth. More...
 
int bt_gatt_client_request_att_mtu_change (bt_gatt_client_h client, unsigned int mtu)
 Requests a change of the ATT MTU value. 4.0 public http://tizen.org/privilege/bluetooth. More...
 
int bt_gatt_client_get_att_mtu (bt_gatt_client_h client, unsigned int *mtu)
 Gets the ATT MTU value set for a connection. 4.0. More...
 
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)
 Registers a callback function to be invoked when the ATT MTU is changed. 4.0. More...
 
int bt_gatt_client_unset_att_mtu_changed_cb (bt_gatt_client_h client)
 Unregisters the callback function to be invoked when the ATT MTU is changed. 4.0. More...
 
int bt_gatt_client_set_characteristic_value_changed_cb (bt_gatt_h characteristic, bt_gatt_client_characteristic_value_changed_cb callback, void *user_data)
 Registers a callback function to be invoked when the characteristic value is changed on the remote device. 2.3.1. More...
 
int bt_gatt_client_unset_characteristic_value_changed_cb (bt_gatt_h characteristic)
 Unregisters a callback function to be invoked when the characteristic value is changed on the remote device. 2.3.1. More...
 
int bt_gatt_client_get_service (bt_gatt_client_h client, const char *uuid, bt_gatt_h *service)
 Gets a service's GATT handle which has specific UUID. 2.3.1. More...
 
int bt_gatt_client_foreach_services (bt_gatt_client_h client, bt_gatt_foreach_cb callback, void *user_data)
 Invokes callback function on each service that belongs to the specified GATT client. 2.3.1. More...
 
int bt_gatt_client_set_service_changed_cb (bt_gatt_client_h client, bt_gatt_client_service_changed_cb callback, void *user_data)
 Registers a callback function to be invoked when service is changed from a remote device(GATT server). 3.0. More...
 
int bt_gatt_client_unset_service_changed_cb (bt_gatt_client_h client)
 Unregisters a callback function. 3.0. More...
 
int bt_gatt_connect (const char *address, bool auto_connect)
 Connects to a specific LE based service on a remote bluetooth device address, asynchronously. 2.3 public http://tizen.org/privilege/bluetooth. More...
 
int bt_gatt_disconnect (const char *address)
 Disconnects to LE connection with the given remote Bluetooth device address, asynchronously. 2.3 public http://tizen.org/privilege/bluetooth. More...
 
int bt_gatt_set_connection_state_changed_cb (bt_gatt_connection_state_changed_cb callback, void *user_data)
 Registers a callback function that will be invoked when the connection state is changed. 2.3. More...
 
int bt_gatt_unset_connection_state_changed_cb (void)
 Unregisters a callback function that will be invoked when the connection state is changed. 2.3. More...
 
int bt_gatt_service_destroy (bt_gatt_h gatt_handle)
 Destroys the GATT handle of service. 3.0. More...
 
int bt_gatt_characteristic_destroy (bt_gatt_h gatt_handle)
 Destroys the GATT handle of characteristic. 3.0. More...
 
int bt_gatt_descriptor_destroy (bt_gatt_h gatt_handle)
 Destroys the GATT handle of descriptor. 3.0. More...
 
int bt_gatt_characteristic_get_permissions (bt_gatt_h gatt_handle, int *permissions)
 Gets the permissions which a characteristic's GATT handle has. 3.0. More...
 
int bt_gatt_descriptor_get_permissions (bt_gatt_h gatt_handle, int *permissions)
 Gets the permissions which a descriptor's GATT handle has. 3.0. More...
 
int bt_gatt_service_create (const char *uuid, bt_gatt_service_type_e type, bt_gatt_h *service)
 Creates the GATT service. 3.0. More...
 
int bt_gatt_service_add_characteristic (bt_gatt_h service, bt_gatt_h characteristic)
 Adds a characteristic to a specified service. 3.0. More...
 
int bt_gatt_service_add_included_service (bt_gatt_h service, bt_gatt_h included_service)
 Adds a service to a specified service as included service. 3.0. More...
 
int bt_gatt_service_get_server (bt_gatt_h service, bt_gatt_server_h *server)
 Gets the GATT server handle to which the specified service belongs. 3.0. More...
 
int bt_gatt_characteristic_create (const char *uuid, int permissions, int properties, const char *value, int value_length, bt_gatt_h *characteristic)
 Creates the GATT characteristic. 3.0. More...
 
int bt_gatt_characteristic_add_descriptor (bt_gatt_h characteristic, bt_gatt_h descriptor)
 Adds a descriptor to a specified characteristic. 3.0. More...
 
int bt_gatt_descriptor_create (const char *uuid, int permissions, const char *value, int value_length, bt_gatt_h *descriptor)
 Creates the GATT characteristic descriptor. 3.0. More...
 
int bt_gatt_server_initialize (void)
 Initializes the GATT Server. 3.0. More...
 
int bt_gatt_server_deinitialize (void)
 DeInitializes the GATT server. 3.0. More...
 
int bt_gatt_server_create (bt_gatt_server_h *server)
 Creates the GATT server's handle. 3.0. More...
 
int bt_gatt_server_destroy (bt_gatt_server_h server)
 Destroys the GATT server's handle. 3.0. More...
 
int bt_gatt_server_set_read_value_requested_cb (bt_gatt_h gatt_handle, bt_gatt_server_read_value_requested_cb callback, void *user_data)
 Registers a callback function to be invoked when a read request for a specified characteristic or descriptor is issued from a remote device(GATT client). 3.0. More...
 
int bt_gatt_server_set_characteristic_notification_state_change_cb (bt_gatt_h gatt_handle, bt_gatt_server_characteristic_notification_state_changed_cb callback, void *user_data)
 Registers a callback function to be invoked when the remote device enables or disables the Notification/Indication for particular characteristics. 3.0. More...
 
int bt_gatt_server_set_write_value_requested_cb (bt_gatt_h gatt_handle, bt_gatt_server_write_value_requested_cb callback, void *user_data)
 Registers a callback function to be invoked when a value of a characteristic or descriptor has been changed by a remote device(GATT client)'s request. 3.0. More...
 
int bt_gatt_server_register_service (bt_gatt_server_h server, bt_gatt_h service)
 Registers a specified service to the specified GATT server that the local device is hosting. 3.0 public http://tizen.org/privilege/bluetooth. More...
 
int bt_gatt_server_unregister_service (bt_gatt_server_h server, bt_gatt_h service)
 Unregisters a specified service from the specified GATT server that the local device is hosting. 3.0 public http://tizen.org/privilege/bluetooth. More...
 
int bt_gatt_server_unregister_all_services (bt_gatt_server_h server)
 Unregisters all services from the specified GATT server that the local device is hosting. 3.0 public http://tizen.org/privilege/bluetooth. More...
 
int bt_gatt_server_start (void)
 Registers the application along with the GATT services of the application it is hosting. 3.0 public http://tizen.org/privilege/bluetooth. More...
 
int bt_gatt_server_send_response (int request_id, bt_gatt_att_request_type_e request_type, int offset, int resp_status, char *value, int value_length)
 Sends a response to the remote device as a result of a read/write request. 3.0 public http://tizen.org/privilege/bluetooth. More...
 
int bt_gatt_server_notify_characteristic_changed_value (bt_gatt_h characteristic, bt_gatt_server_notification_sent_cb callback, const char *device_address, void *user_data)
 Notifies value change of the characteristic to the remote devices which enable a Client Characteristic Configuration Descriptor. 3.0. More...
 
int bt_gatt_server_get_service (bt_gatt_server_h server, const char *uuid, bt_gatt_h *service)
 Gets a service's GATT handle which has specific UUID. 3.0. More...
 
int bt_gatt_server_foreach_services (bt_gatt_server_h server, bt_gatt_foreach_cb callback, void *user_data)
 Invokes callback function on each service that belongs to the specified GATT server. 3.0. More...
 
int bt_pbap_client_initialize (void)
 Initializes the Bluetooth PBAP Client. More...
 
int bt_pbap_client_deinitialize (void)
 Deinitializes the Bluetooth PBAP Client. More...
 
int bt_pbap_client_set_connection_state_changed_cb (bt_pbap_connection_state_changed_cb callback, void *user_data)
 Registers a callback function that will be invoked when the connection state is changed. 3.0. More...
 
int bt_pbap_client_unset_connection_state_changed_cb (void)
 Unregisters a callback function that will be invoked when the connection state is changed. 3.0. More...
 
int bt_pbap_client_connect (const char *address)
 Connects to PBAP server, asynchronously. 3.0 public http://tizen.org/privilege/bluetooth. More...
 
int bt_pbap_client_disconnect (const char *address)
 Disconnects from PBAP server, asynchronously. 3.0 public http://tizen.org/privilege/bluetooth. More...
 
int bt_pbap_client_get_phone_book_size (const char *address, bt_pbap_address_book_source_e source, bt_pbap_folder_type_e folder_type, bt_pbap_phone_book_size_cb callback, void *user_data)
 Gets size of phone book from PBAP server, asynchronously. 3.0 public http://tizen.org/privilege/bluetooth. More...
 
int bt_pbap_client_get_phone_book (const char *address, bt_pbap_address_book_source_e source, bt_pbap_folder_type_e folder_type, bt_pbap_vcard_format_e format, bt_pbap_sort_order_e order, unsigned short offset, unsigned short max_list_count, unsigned int fields, bt_pbap_phone_book_received_cb callback, void *user_data)
 Gets all contacts and call logs as vCard from PBAP server, asynchronously. More...
 
int bt_pbap_client_get_list (const char *address, bt_pbap_address_book_source_e source, bt_pbap_folder_type_e folder_type, bt_pbap_sort_order_e order, unsigned short offset, unsigned short max_list_count, bt_pbap_list_vcards_cb callback, void *user_data)
 Gets contact and call log information from the PBAP server, asynchronously. 3.0 public http://tizen.org/privilege/bluetooth. More...
 
int bt_pbap_client_pull_vcard (const char *address, bt_pbap_address_book_source_e source, bt_pbap_folder_type_e folder_type, int index, bt_pbap_vcard_format_e format, unsigned int fields, bt_pbap_phone_book_received_cb callback, void *user_data)
 Gets the selected contact using the index parameter as vCard from PBAP server, asynchronously. More...
 
int bt_pbap_client_search_phone_book (const char *address, bt_pbap_address_book_source_e source, bt_pbap_folder_type_e folder_type, bt_pbap_search_field_e search_attribute, const char *search_value, bt_pbap_sort_order_e order, unsigned short offset, unsigned short max_list_count, bt_pbap_list_vcards_cb callback, void *user_data)
 Finds and fetches the contact and call log information from the PBAP server, asynchronously. 3.0 public http://tizen.org/privilege/bluetooth. More...
 
int bt_adapter_le_scan_filter_create (bt_scan_filter_h *scan_filter)
 Creates a scan filter to find only LE advertisements which match specific requirements. More...
 
int bt_adapter_le_scan_filter_destroy (bt_scan_filter_h scan_filter)
 Destroys a scan filter. 4.0. More...
 
int bt_adapter_le_scan_filter_set_device_address (bt_scan_filter_h scan_filter, const char *address)
 Sets the device address for the advertisements filter. 4.0. More...
 
int bt_adapter_le_scan_filter_set_device_name (bt_scan_filter_h scan_filter, const char *name)
 Sets the device name for the advertisements filter. More...
 
int bt_adapter_le_scan_filter_set_service_uuid (bt_scan_filter_h scan_filter, const char *uuid)
 Sets the service UUID for the advertisements filter. More...
 
int bt_adapter_le_scan_filter_set_service_uuid_with_mask (bt_scan_filter_h scan_filter, const char *uuid, const char *mask)
 Sets the service UUID and the mask for the advertisements filter, to use for filtering by partial data. More...
 
int bt_adapter_le_scan_filter_set_service_solicitation_uuid (bt_scan_filter_h scan_filter, const char *uuid)
 Sets the service solicitation UUID for the advertisements filter. More...
 
int bt_adapter_le_scan_filter_set_service_solicitation_uuid_with_mask (bt_scan_filter_h scan_filter, const char *uuid, const char *mask)
 Sets the service solicitation UUID and the mask for the advertisements filter, to use for filtering by partial data. More...
 
int bt_adapter_le_scan_filter_set_service_data (bt_scan_filter_h scan_filter, const char *uuid, const char *data, unsigned int data_len)
 Sets the service data for the advertisements filter. More...
 
int bt_adapter_le_scan_filter_set_service_data_with_mask (bt_scan_filter_h scan_filter, const char *uuid, const char *data, unsigned int data_len, const char *mask, unsigned int mask_len)
 Sets the service data and the mask for the advertisements filter, to use for filtering by partial data. More...
 
int bt_adapter_le_scan_filter_set_manufacturer_data (bt_scan_filter_h scan_filter, int manufacturer_id, const char *data, unsigned int data_len)
 Sets the manufacturer data for the advertisements filter. More...
 
int bt_adapter_le_scan_filter_set_manufacturer_data_with_mask (bt_scan_filter_h scan_filter, int manufacturer_id, const char *data, unsigned int data_len, const char *mask, unsigned int mask_len)
 Sets the manufacturer data and the mask for the advertisements filter, to use for filtering by partial data. More...
 
int bt_adapter_le_scan_filter_set_type (bt_scan_filter_h scan_filter, bt_adapter_le_scan_filter_type_e mode)
 Sets the scan filter type for the advertisements filter. More...
 
int bt_adapter_le_scan_filter_register (bt_scan_filter_h scan_filter)
 Registers a scan filter to use for scanning. More...
 
int bt_adapter_le_scan_filter_unregister (bt_scan_filter_h scan_filter)
 Unregisters all registered scan filters. 4.0 public http://tizen.org/privilege/bluetooth. More...
 
int bt_adapter_le_scan_filter_unregister_all (void)
 Unregisters all registered scan filters. 4.0 public http://tizen.org/privilege/bluetooth. More...
 
int bt_adapter_le_is_2m_phy_supported (bool *is_supported)
 Checks if LE 2M PHY feature is supported or not. 5.0. More...
 
int bt_adapter_le_is_coded_phy_supported (bool *is_supported)
 Checks if LE CODED PHY feature is supported or not. 5.0. More...
 

Detailed Description

Enumeration Type Documentation

enum bt_error_e

Enumerations of Bluetooth error codes. 2.3.

Enumerator
BT_ERROR_NONE 

Successful

BT_ERROR_CANCELLED 

Operation cancelled

BT_ERROR_INVALID_PARAMETER 

Invalid parameter

BT_ERROR_OUT_OF_MEMORY 

Out of memory

BT_ERROR_RESOURCE_BUSY 

Device or resource busy

BT_ERROR_TIMED_OUT 

Timeout error

BT_ERROR_NOW_IN_PROGRESS 

Operation now in progress

BT_ERROR_NOT_SUPPORTED 

BT is Not Supported

BT_ERROR_PERMISSION_DENIED 

Permission denied

BT_ERROR_QUOTA_EXCEEDED 

Quota exceeded

BT_ERROR_NO_DATA 

No data available

BT_ERROR_DEVICE_POLICY_RESTRICTION 

Device policy restriction (Since 3.0)

BT_ERROR_NOT_INITIALIZED 

Local adapter not initialized

BT_ERROR_NOT_ENABLED 

Local adapter not enabled

BT_ERROR_ALREADY_DONE 

Operation already done

BT_ERROR_OPERATION_FAILED 

Operation failed

BT_ERROR_NOT_IN_PROGRESS 

Operation not in progress

BT_ERROR_REMOTE_DEVICE_NOT_BONDED 

Remote device not bonded

BT_ERROR_AUTH_REJECTED 

Authentication rejected

BT_ERROR_AUTH_FAILED 

Authentication failed

BT_ERROR_REMOTE_DEVICE_NOT_FOUND 

Remote device not found

BT_ERROR_SERVICE_SEARCH_FAILED 

Service search failed

BT_ERROR_REMOTE_DEVICE_NOT_CONNECTED 

Remote device is not connected

BT_ERROR_AGAIN 

Resource temporarily unavailable

BT_ERROR_SERVICE_NOT_FOUND 

Service Not Found

BT_ERROR_AUTHORIZATION_REJECTED 

Authorization rejected (Since 5.0)

Definition at line 82 of file bluetooth_type.h.

Function Documentation

int bt_adapter_foreach_bonded_device ( bt_adapter_bonded_device_cb  callback,
void *  user_data 
)

Retrieves the device information of all bonded devices. 2.3.

Parameters
[in]callbackThe callback function to invoke
[in]user_dataThe user data passed from the foreach function
Returns
0 on success, otherwise a negative error value.
Return values
BT_ERROR_NONESuccessful
BT_ERROR_NOT_INITIALIZEDNot initialized
BT_ERROR_INVALID_PARAMETERInvalid parameter
BT_ERROR_OUT_OF_MEMORYOut of memory
BT_ERROR_NOT_ENABLEDNot enabled
BT_ERROR_OPERATION_FAILEDOperation failed
BT_ERROR_NOT_SUPPORTEDNot supported
Precondition
The state of local Bluetooth must be BT_ADAPTER_ENABLED.
Postcondition
This function invokes bt_adapter_bonded_device_cb().
See also
bt_adapter_bonded_device_cb()
int bt_adapter_free_device_info ( bt_device_info_s device_info)

Frees device info. 2.3.

Parameters
[in]device_infoThe bonded device information
Returns
0 on success, otherwise a negative error value.
Return values
BT_ERROR_NONESuccessful
BT_ERROR_INVALID_PARAMETERInvalid parameter
BT_ERROR_NOT_SUPPORTEDNot supported
See also
bt_adapter_get_bonded_device_info()
int bt_adapter_get_address ( char **  local_address)

Gets the address of local Bluetooth adapter. 2.3.

Remarks
The local_address must be released with free() by you.
Parameters
[out]local_addressThe device address of local Bluetooth adapter
Returns
0 on success, otherwise a negative error value.
Return values
BT_ERROR_NONESuccessful
BT_ERROR_NOT_INITIALIZEDNot initialized
BT_ERROR_INVALID_PARAMETERInvalid parameter
BT_ERROR_NOT_ENABLEDNot enabled
BT_ERROR_OUT_OF_MEMORYOut of memory
BT_ERROR_OPERATION_FAILEDOperation failed
BT_ERROR_NOT_SUPPORTEDNot supported
Precondition
The state of local Bluetooth must be BT_ADAPTER_ENABLED.
See also
bt_adapter_get_name()
int bt_adapter_get_bonded_device_info ( const char *  remote_address,
bt_device_info_s **  device_info 
)

Gets the device information of a bonded device. 2.3.

Remarks
The device_info must be released with bt_adapter_free_device_info() by you .
Parameters
[in]remote_addressThe address of remote device
[out]device_infoThe bonded device information
Returns
0 on success, otherwise a negative error value.
Return values
BT_ERROR_NONESuccessful
BT_ERROR_NOT_INITIALIZEDNot initialized
BT_ERROR_INVALID_PARAMETERInvalid parameter
BT_ERROR_OUT_OF_MEMORYOut of memory
BT_ERROR_NOT_ENABLEDNot enabled
BT_ERROR_OPERATION_FAILEDOperation failed
BT_ERROR_REMOTE_DEVICE_NOT_BONDEDRemote device not bonded
BT_ERROR_NOT_SUPPORTEDNot supported
Precondition
The state of local Bluetooth must be BT_ADAPTER_ENABLED.
Postcondition
This function invokes bt_adapter_bonded_device_cb().
See also
bt_adapter_bonded_device_cb()
int bt_adapter_get_local_oob_data ( unsigned char **  hash,
unsigned char **  randomizer,
int *  hash_len,
int *  randomizer_len 
)

Gets the Hash and Randomizer value, synchronously. 2.3 public http://tizen.org/privilege/bluetooth.

Remarks
http://tizen.org/privilege/bluetooth (public level privilege) is required to use this API since 5.5.
Parameters
[out]hashThe hash value received from the controller
[out]randomizerThe hash value received from the controller
[out]hash_lenThe length of the hash value
[out]randomizer_lenThe length of the randomizer value
Returns
0 on success, otherwise a negative error value.
Return values
BT_ERROR_NONESuccessful
BT_ERROR_NOT_INITIALIZEDNot initialized
BT_ERROR_INVALID_PARAMETERInvalid parameter
BT_ERROR_NOT_ENABLEDNot enabled
BT_ERROR_OPERATION_FAILEDOperation failed
BT_ERROR_NOT_SUPPORTEDNot supported
Precondition
The state of local Bluetooth must be BT_ADAPTER_ENABLED.
The Bluetooth service must be initialized with bt_initialize().
See also
bt_initialize()
int bt_adapter_get_local_oob_ext_data ( unsigned char **  hash192,
unsigned char **  randomizer192,
int *  hash192_len,
int *  randomizer192_len,
unsigned char **  hash256,
unsigned char **  randomizer256,
int *  hash256_len,
int *  randomizer256_len 
)

Gets the Hash and Randomizer value, synchronously. 3.0 public http://tizen.org/privilege/bluetooth.

Remarks
http://tizen.org/privilege/bluetooth (public level privilege) is required to use this API since 5.5.
The hash192, randomizer192, hash256 and randomizer256 must be released using free().
Parameters
[out]hash192The hash value derived from the P-192 public key
[out]randomizer192The randomizer value associated with the P-192 public key
[out]hash192_lenThe length of hash192
[out]randomizer192_lenThe length of randomizer192
[out]hash256The hash value derived from the P-256 public key
[out]randomizer256The randomizer value associated with the P-256 public key
[out]hash256_lenThe length of hash256
[out]randomizer256_lenThe length of randomizer256
Returns
0 on success, otherwise a negative error value.
Return values
BT_ERROR_NONESuccessful
BT_ERROR_NOT_INITIALIZEDNot initialized
BT_ERROR_INVALID_PARAMETERInvalid parameter
BT_ERROR_NOT_ENABLEDNot enabled
BT_ERROR_OPERATION_FAILEDOperation failed
BT_ERROR_NOT_SUPPORTEDNot supported
Precondition
The state of local Bluetooth must be BT_ADAPTER_ENABLED.
The Bluetooth service must be initialized with bt_initialize().
See also
bt_initialize()
int bt_adapter_get_name ( char **  local_name)

Gets the name of local Bluetooth adapter.

Use this function to get the friendly name associated with Bluetooth
device, retrieved by the remote Bluetooth devices.

2.3

Remarks
The local_name must be released with free() by you.
Parameters
[out]local_nameThe local device name
Returns
0 on success, otherwise a negative error value.
Return values
BT_ERROR_NONESuccessful
BT_ERROR_NOT_INITIALIZEDNot initialized
BT_ERROR_INVALID_PARAMETERInvalid parameter
BT_ERROR_NOT_ENABLEDNot enabled
BT_ERROR_OUT_OF_MEMORYOut of memory
BT_ERROR_OPERATION_FAILEDOperation failed
BT_ERROR_NOT_SUPPORTEDNot supported
Precondition
The state of local Bluetooth must be BT_ADAPTER_ENABLED.
See also
bt_adapter_set_name()
int bt_adapter_get_state ( bt_adapter_state_e adapter_state)

Gets the current state of local Bluetooth adapter. 2.3.

Parameters
[out]adapter_stateThe current adapter state
Returns
0 on success, otherwise a negative error value.
Return values
BT_ERROR_NONESuccessful
BT_ERROR_NOT_INITIALIZEDNot initialized
BT_ERROR_INVALID_PARAMETERInvalid parameter
BT_ERROR_NOT_SUPPORTEDNot supported
Precondition
Bluetooth service must be initialized with bt_initialize().
See also
bt_initialize()
int bt_adapter_get_visibility ( bt_adapter_visibility_mode_e mode,
int *  duration 
)

Gets the visibility mode of local Bluetooth adapter. 2.3.

Parameters
[out]modeThe visibility mode of the Bluetooth device
[out]durationThe duration until the visibility mode is changed to BT_ADAPTER_VISIBILITY_MODE_NON_DISCOVERABLE (in seconds). duration is valid only if mode is BT_ADAPTER_VISIBILITY_MODE_LIMITED_DISCOVERABLE. This value can be NULL.
Returns
0 on success, otherwise a negative error value.
Return values
BT_ERROR_NONESuccessful
BT_ERROR_NOT_INITIALIZEDNot initialized
BT_ERROR_INVALID_PARAMETERInvalid parameter
BT_ERROR_NOT_ENABLEDNot enabled
BT_ERROR_OPERATION_FAILEDOperation failed
BT_ERROR_NOT_SUPPORTEDNot supported
Precondition
The state of local Bluetooth must be BT_ADAPTER_ENABLED.
int bt_adapter_is_discovering ( bool *  is_discovering)

Checks for the device discovery is in progress or not. 2.3.

Remarks
If Bluetooth discovery is in progress, other operations are not allowed and
you have to either stop the discovery operation, or wait for it to be finished,
before performing other operations.
Parameters
[out]is_discoveringThe discovering status: (true = in progress , false = not in progress )
Returns
0 on success, otherwise a negative error value.
Return values
BT_ERROR_NONESuccessful
BT_ERROR_NOT_INITIALIZEDNot initialized
BT_ERROR_INVALID_PARAMETERInvalid parameter
BT_ERROR_NOT_ENABLEDNot enabled
BT_ERROR_OPERATION_FAILEDOperation failed
BT_ERROR_NOT_SUPPORTEDNot supported
Precondition
The state of local Bluetooth must be BT_ADAPTER_ENABLED.
See also
bt_adapter_start_device_discovery()
bt_adapter_stop_device_discovery()
int bt_adapter_is_service_used ( const char *  service_uuid,
bool *  used 
)

Checks whether the UUID of service is used or not. 2.3.

Parameters
[in]service_uuidThe UUID of service
[out]usedIndicates whether the service is used or not
Returns
true on success, otherwise false.
0 on success, otherwise a negative error value.
Return values
BT_ERROR_NONESuccessful
BT_ERROR_NOT_INITIALIZEDNot initialized
BT_ERROR_INVALID_PARAMETERInvalid parameter
BT_ERROR_NOT_ENABLEDNot enabled
BT_ERROR_OPERATION_FAILEDOperation failed
BT_ERROR_NOT_SUPPORTEDNot supported
int bt_adapter_le_add_advertising_manufacturer_data ( bt_advertiser_h  advertiser,
bt_adapter_le_packet_type_e  pkt_type,
int  manufacturer_id,
const char *  manufacturer_data,
int  manufacturer_data_len 
)

Adds manufacturer specific data to advertise or scan response data. Please refer to the Bluetooth Assigned Numbers provided by the Bluetooth SIG for a list of existing company identifiers. The maximum advertised or responded data size is 31 bytes including data type and system wide data. 2.3.1.

Parameters
[in]advertiserThe handle of advertiser
[in]pkt_typeThe packet type
[in]manufacturer_idManufacturer identifier
[in]manufacturer_dataThe manufacturer specific data
[in]manufacturer_data_lenThe data length of manufacturer data
Returns
0 on success, otherwise a negative error value.
Return values
BT_ERROR_NONESuccessful
BT_ERROR_NOT_INITIALIZEDNot initialized
BT_ERROR_INVALID_PARAMETERInvalid parameter
BT_ERROR_QUOTA_EXCEEDEDQuota exceeded
BT_ERROR_OPERATION_FAILEDOperation failed
BT_ERROR_NOT_SUPPORTEDNot supported
Precondition
The Bluetooth service must be initialized with bt_initialize().
See also
bt_adapter_le_clear_advertising_data()
int bt_adapter_le_add_advertising_service_data ( bt_advertiser_h  advertiser,
bt_adapter_le_packet_type_e  pkt_type,
const char *  uuid,
const char *  service_data,
int  service_data_len 
)

Adds service data to advertise or scan response data. The maximum advertised or responded data size is 31 bytes including data type and system wide data. 2.3.1.

Remarks
16-bit UUID is supported. (e.g. 180F).
Parameters
[in]advertiserThe handle of advertiser
[in]pkt_typeThe packet type
[in]uuid16-bit UUID of the service
[in]service_dataThe service data
[in]service_data_lenThe data length of service data
Returns
0 on success, otherwise a negative error value.
Return values
BT_ERROR_NONESuccessful
BT_ERROR_NOT_INITIALIZEDNot initialized
BT_ERROR_INVALID_PARAMETERInvalid parameter
BT_ERROR_QUOTA_EXCEEDEDQuota exceeded
BT_ERROR_OPERATION_FAILEDOperation failed
BT_ERROR_NOT_SUPPORTEDNot supported
Precondition
The Bluetooth service must be initialized with bt_initialize().
See also
bt_adapter_le_clear_advertising_data()
int bt_adapter_le_add_advertising_service_solicitation_uuid ( bt_advertiser_h  advertiser,
bt_adapter_le_packet_type_e  pkt_type,
const char *  uuid 
)

Adds a service solicitation UUID to advertise or scan response data. The maximum advertised or responded data size is 31 bytes including data type and system wide data. 2.3.1.

Remarks
16-bit service solicitation UUID or 128-bit service solicitation UUID is supported. (e.g. 180F, 0000180F-0000-1000-8000-00805F9B34FB)
Parameters
[in]advertiserThe handle of advertiser
[in]pkt_typeThe packet type
[in]uuidThe string of the service solicitation UUID.
Returns
0 on success, otherwise a negative error value.
Return values
BT_ERROR_NONESuccessful
BT_ERROR_NOT_INITIALIZEDNot initialized
BT_ERROR_INVALID_PARAMETERInvalid parameter
BT_ERROR_QUOTA_EXCEEDEDQuota exceeded
BT_ERROR_OPERATION_FAILEDOperation failed
BT_ERROR_NOT_SUPPORTEDNot supported
Precondition
The Bluetooth service must be initialized with bt_initialize().
See also
bt_adapter_le_clear_advertising_data()
int bt_adapter_le_add_advertising_service_uuid ( bt_advertiser_h  advertiser,
bt_adapter_le_packet_type_e  pkt_type,
const char *  uuid 
)

Adds a service UUID to advertise or scan response data. The maximum advertised or responded data size is 31 bytes including data type and system wide data. 2.3.1.

Remarks
16-bit UUID or 128-bit UUID is supported. (e.g. 180F, 0000180F-0000-1000-8000-00805F9B34FB).
Parameters
[in]advertiserThe handle of advertiser
[in]pkt_typeThe packet type
[in]uuidThe string of the service UUID.
Returns
0 on success, otherwise a negative error value.
Return values
BT_ERROR_NONESuccessful
BT_ERROR_NOT_INITIALIZEDNot initialized
BT_ERROR_INVALID_PARAMETERInvalid parameter
BT_ERROR_QUOTA_EXCEEDEDQuota exceeded
BT_ERROR_OPERATION_FAILEDOperation failed
BT_ERROR_NOT_SUPPORTEDNot supported
Precondition
The Bluetooth service must be initialized with bt_initialize().
See also
bt_adapter_le_clear_advertising_data()
int bt_adapter_le_clear_advertising_data ( bt_advertiser_h  advertiser,
bt_adapter_le_packet_type_e  pkt_type 
)

Clears all data to be advertised or responded to scan request from LE scanning device. 2.3.

Parameters
[in]advertiserThe handle of advertiser
[in]pkt_typeThe packet type to be cleared
Returns
0 on success, otherwise a negative error value.
Return values
BT_ERROR_NONESuccessful
BT_ERROR_NOT_INITIALIZEDNot initialized
BT_ERROR_INVALID_PARAMETERInvalid parameter
BT_ERROR_NOT_SUPPORTEDNot supported
Precondition
The Bluetooth service must be initialized with bt_initialize().
int bt_adapter_le_create_advertiser ( bt_advertiser_h advertiser)

Creates advertiser to advertise device's existence or respond to LE scanning request. 2.3.

Parameters
[out]advertiserThe handle of advertiser
Returns
0 on success, otherwise a negative error value.
Return values
BT_ERROR_NONESuccessful
BT_ERROR_NOT_INITIALIZEDNot initialized
BT_ERROR_INVALID_PARAMETERInvalid parameter
BT_ERROR_OUT_OF_MEMORYOut of memory
BT_ERROR_NOT_SUPPORTEDNot supported
Precondition
The Bluetooth service must be initialized with bt_initialize().
See also
bt_adapter_le_destroy_advertiser()
int bt_adapter_le_destroy_advertiser ( bt_advertiser_h  advertiser)

Destroys advertiser. 2.3.

Parameters
[out]advertiserThe handle of advertiser
Returns
0 on success, otherwise a negative error value.
Return values
BT_ERROR_NONESuccessful
BT_ERROR_NOT_INITIALIZEDNot initialized
BT_ERROR_INVALID_PARAMETERInvalid parameter
BT_ERROR_NOT_SUPPORTEDNot supported
Precondition
The Bluetooth service must be initialized with bt_initialize().
See also
bt_adapter_le_create_advertiser()
int bt_adapter_le_free_ibeacon_report ( bt_adapter_le_ibeacon_scan_result_info_s ibeacon_info)

Frees iBeacon information. 4.0.

Parameters
[in]ibeacon_infoThe iBeacon format's scan result data
Returns
0 on success, otherwise a negative error value.
Return values
BT_ERROR_NONESuccessful
BT_ERROR_INVALID_PARAMETERInvalid parameter
BT_ERROR_NOT_SUPPORTEDNot supported
See also
bt_adapter_le_get_scan_result_service_data_list()
int bt_adapter_le_free_service_data_list ( bt_adapter_le_service_data_s data_list,
int  count 
)

Frees service data list. 2.3.1.

Parameters
[in]data_listThe list of the service data
[in]countThe count of the service data list
Returns
0 on success, otherwise a negative error value.
Return values
BT_ERROR_NONESuccessful
BT_ERROR_INVALID_PARAMETERInvalid parameter
BT_ERROR_NOT_SUPPORTEDNot supported
See also
bt_adapter_le_get_scan_result_service_data_list()
int bt_adapter_le_get_scan_result_appearance ( const bt_adapter_le_device_scan_result_info_s info,
bt_adapter_le_packet_type_e  pkt_type,
int *  appearance 
)

Gets the appearance from the scan result information. 2.3.1.

Parameters
[in]infoThe scan result information
[in]pkt_typeThe packet type
[out]appearanceThe appearance
Returns
0 on success, otherwise a negative error value.
Return values
BT_ERROR_NONESuccessful
BT_ERROR_NOT_INITIALIZEDNot initialized
BT_ERROR_INVALID_PARAMETERInvalid parameter
BT_ERROR_NO_DATANo data available
BT_ERROR_NOT_SUPPORTEDNot supported
Precondition
The Bluetooth service must be initialized with bt_initialize().
See also
bt_adapter_le_scan_result_cb()
int bt_adapter_le_get_scan_result_device_name ( const bt_adapter_le_device_scan_result_info_s info,
bt_adapter_le_packet_type_e  pkt_type,
char **  name 
)

Gets the device name from the scan result information. 2.3.1.

Remarks
The name must be released with free() by you.
Parameters
[in]infoThe scan result information
[in]pkt_typeThe packet type
[out]nameThe device name
Returns
0 on success, otherwise a negative error value.
Return values
BT_ERROR_NONESuccessful
BT_ERROR_NOT_INITIALIZEDNot initialized
BT_ERROR_INVALID_PARAMETERInvalid parameter
BT_ERROR_NO_DATANo data available
BT_ERROR_NOT_SUPPORTEDNot supported
Precondition
The Bluetooth service must be initialized with bt_initialize().
See also
bt_adapter_le_scan_result_cb()
int bt_adapter_le_get_scan_result_ibeacon_report ( const bt_adapter_le_device_scan_result_info_s info,
bt_adapter_le_packet_type_e  pkt_type,
bt_adapter_le_ibeacon_scan_result_info_s **  ibeacon_info 
)

Gets iBeacon format's data from the scan result information. 4.0.

Remarks
The ibeacon_info must be released with bt_adapter_le_free_ibeacon_report().
Parameters
[in]infoThe scan result information
[in]pkt_typeThe packet type
[out]ibeacon_infoThe iBeacon format's scan result data
Returns
0 on success, otherwise a negative error value.
Return values
BT_ERROR_NONESuccessful
BT_ERROR_NOT_INITIALIZEDNot initialized
BT_ERROR_INVALID_PARAMETERInvalid parameter
BT_ERROR_NO_DATANo data available
BT_ERROR_NOT_SUPPORTEDNot supported
Precondition
The Bluetooth service must be initialized with bt_initialize().
See also
bt_adapter_le_scan_result_cb()
int bt_adapter_le_get_scan_result_manufacturer_data ( const bt_adapter_le_device_scan_result_info_s info,
bt_adapter_le_packet_type_e  pkt_type,
int *  manufacturer_id,
char **  manufacturer_data,
int *  manufacturer_data_len 
)

Gets the manufacturer data from the scan result information. 2.3.1.

Remarks
The manufacturer_data must be released with free() by you.
Parameters
[in]infoThe scan result information
[in]pkt_typeThe packet type
[out]manufacturer_idThe manufacturer ID
[out]manufacturer_dataThe manufacturer data (byte array)
[out]manufacturer_data_lenThe length of manufacturer data
Returns
0 on success, otherwise a negative error value.
Return values
BT_ERROR_NONESuccessful
BT_ERROR_NOT_INITIALIZEDNot initialized
BT_ERROR_INVALID_PARAMETERInvalid parameter
BT_ERROR_NO_DATANo data available
BT_ERROR_NOT_SUPPORTEDNot supported
Precondition
The Bluetooth service must be initialized with bt_initialize().
See also
bt_adapter_le_scan_result_cb()
int bt_adapter_le_get_scan_result_service_data_list ( const bt_adapter_le_device_scan_result_info_s info,
bt_adapter_le_packet_type_e  pkt_type,
bt_adapter_le_service_data_s **  data_list,
int *  count 
)

Gets the service data list from the scan result information. 2.3.1.

Remarks
The data_list must be released with bt_adapter_le_free_service_data_list() by you .
Parameters
[in]infoThe scan result information
[in]pkt_typeThe packet type
[out]data_listThe list of the service data
[out]countThe count of the service data list
Returns
0 on success, otherwise a negative error value.
Return values
BT_ERROR_NONESuccessful
BT_ERROR_NOT_INITIALIZEDNot initialized
BT_ERROR_INVALID_PARAMETERInvalid parameter
BT_ERROR_NO_DATANo data available
BT_ERROR_NOT_SUPPORTEDNot supported
Precondition
The Bluetooth service must be initialized with bt_initialize().
See also
bt_adapter_le_scan_result_cb()
int bt_adapter_le_get_scan_result_service_solicitation_uuids ( const bt_adapter_le_device_scan_result_info_s info,
bt_adapter_le_packet_type_e  pkt_type,
char ***  uuids,
int *  count 
)

Gets the service solicitation UUID list from the scan result information. 2.3.1.

Remarks
The uuids must be iterated as count and each pointed data must be released with free(). Then uuids must be released with free().
16-bit service solicitation UUID or 128-bit service solicitation UUID is supported. (e.g. 180F, 0000180F-0000-1000-8000-00805F9B34FB)
Parameters
[in]infoThe scan result information
[in]pkt_typeThe packet type
[out]uuidsThe list of string of the service solicitation UUID
[out]countThe count of the service UUIDs
Returns
0 on success, otherwise a negative error value.
Return values
BT_ERROR_NONESuccessful
BT_ERROR_NOT_INITIALIZEDNot initialized
BT_ERROR_INVALID_PARAMETERInvalid parameter
BT_ERROR_NO_DATANo data available
BT_ERROR_NOT_SUPPORTEDNot supported
Precondition
The Bluetooth service must be initialized with bt_initialize().
See also
bt_adapter_le_scan_result_cb()
int bt_adapter_le_get_scan_result_service_uuids ( const bt_adapter_le_device_scan_result_info_s info,
bt_adapter_le_packet_type_e  pkt_type,
char ***  uuids,
int *  count 
)

Gets the service UUID list from the scan result information. 2.3.1.

Remarks
The uuids must be iterated as count and each pointed data must be released with free(). Then uuids must be released with free().
16-bit service UUID or 128-bit service UUID is supported. (e.g. 180F, 0000180F-0000-1000-8000-00805F9B34FB)
Parameters
[in]infoThe scan result information
[in]pkt_typeThe packet type
[out]uuidsThe list of string of the service UUID
[out]countThe count of the service UUIDs
Returns
0 on success, otherwise a negative error value.
Return values
BT_ERROR_NONESuccessful
BT_ERROR_NOT_INITIALIZEDNot initialized
BT_ERROR_INVALID_PARAMETERInvalid parameter
BT_ERROR_NO_DATANo data available
BT_ERROR_NOT_SUPPORTEDNot supported
Precondition
The Bluetooth service must be initialized with bt_initialize().
See also
bt_adapter_le_scan_result_cb()
int bt_adapter_le_get_scan_result_tx_power_level ( const bt_adapter_le_device_scan_result_info_s info,
bt_adapter_le_packet_type_e  pkt_type,
int *  power_level 
)

Gets the transmission power level from the scan result information. 2.3.1.

Parameters
[in]infoThe scan result information
[in]pkt_typeThe packet type
[out]power_levelThe transmission power level in dBm
Returns
0 on success, otherwise a negative error value.
Return values
BT_ERROR_NONESuccessful
BT_ERROR_NOT_INITIALIZEDNot initialized
BT_ERROR_INVALID_PARAMETERInvalid parameter
BT_ERROR_NO_DATANo data available
BT_ERROR_NOT_SUPPORTEDNot supported
Precondition
The Bluetooth service must be initialized with bt_initialize().
See also
bt_adapter_le_scan_result_cb()
int bt_adapter_le_is_2m_phy_supported ( bool *  is_supported)

Checks if LE 2M PHY feature is supported or not. 5.0.

Remarks
The LE 2M PHY feature was introduced in the BT 5.0 core specification.
Parameters
[out]is_supportedThe LE 2M PHY feature support: (true = supported , false = not supported)
Returns
0 on success, otherwise a negative error value.
Return values
BT_ERROR_NONESuccessful
BT_ERROR_NOT_INITIALIZEDNot initialized
BT_ERROR_INVALID_PARAMETERInvalid parameter
BT_ERROR_NOT_ENABLEDAdapter is not enabled
BT_ERROR_OPERATION_FAILEDOperation failed
BT_ERROR_NOT_SUPPORTEDNot supported
Precondition
The state of local Bluetooth must be BT_ADAPTER_ENABLED.
int bt_adapter_le_is_coded_phy_supported ( bool *  is_supported)

Checks if LE CODED PHY feature is supported or not. 5.0.

Remarks
The LE CODED PHY feature was introduced in the BT 5.0 core specification.
Parameters
[out]is_supportedThe LE CODED PHY feature support: (true = supported , false = not supported)
Returns
0 on success, otherwise a negative error value.
Return values
BT_ERROR_NONESuccessful
BT_ERROR_NOT_INITIALIZEDNot initialized
BT_ERROR_INVALID_PARAMETERInvalid parameter
BT_ERROR_NOT_ENABLEDAdapter is not enabled
BT_ERROR_OPERATION_FAILEDOperation failed
BT_ERROR_NOT_SUPPORTEDNot supported
Precondition
The state of local Bluetooth must be BT_ADAPTER_ENABLED.
int bt_adapter_le_is_discovering ( bool *  is_discovering)

Checks for the LE device discovery is in progress or not. 2.3.

Deprecated:
Deprecated since 2.3.1
Remarks
If Bluetooth LE scan is in progress, other operations are not allowed and
you have to either stop the LE scan operation, or wait for it to be finished,
before performing other operations.
Parameters
[out]is_discoveringThe discovering status: (true = in progress , false = not in progress )
Returns
0 on success, otherwise a negative error value.
Return values
BT_ERROR_NONESuccessful
BT_ERROR_NOT_INITIALIZEDNot initialized
BT_ERROR_INVALID_PARAMETERInvalid parameter
BT_ERROR_NOT_ENABLEDNot enabled
BT_ERROR_OPERATION_FAILEDOperation failed
BT_ERROR_NOT_SUPPORTEDNot supported
Precondition
The state of local Bluetooth must be BT_ADAPTER_ENABLED.
int bt_adapter_le_scan_filter_create ( bt_scan_filter_h scan_filter)

Creates a scan filter to find only LE advertisements which match specific requirements.

If the filter's attribute is not set, then the filter will accept all values of that attribute. If an attribute is set, the filter will accept only advertisements which match the set attribute.

For example, if device name is set with bt_adapter_le_scan_filter_set_device_name(), the filter will accept only advertisements from devices with the given name. If device name is not set, advertisements will be filtered without regard to device names. 4.0

Remarks
The scan_filter should be destroyed with bt_adapter_le_scan_filter_destroy().
Parameters
[out]scan_filterThe scan filter handle
Returns
0 on success, otherwise a negative error value.
Return values
BT_ERROR_NONESuccessful
BT_ERROR_NOT_INITIALIZEDNot initialized
BT_ERROR_INVALID_PARAMETERInvalid parameter
BT_ERROR_OUT_OF_MEMORYOut of memory
BT_ERROR_NOT_SUPPORTEDNot supported
Precondition
The Bluetooth service must be initialized with bt_initialize().
See also
bt_adapter_le_scan_filter_destroy()
int bt_adapter_le_scan_filter_destroy ( bt_scan_filter_h  scan_filter)

Destroys a scan filter. 4.0.

Parameters
[in]scan_filterThe scan filter handle
Returns
0 on success, otherwise a negative error value.
Return values
BT_ERROR_NONESuccessful
BT_ERROR_NOT_INITIALIZEDNot initialized
BT_ERROR_INVALID_PARAMETERInvalid parameter
BT_ERROR_NOT_SUPPORTEDNot supported
Precondition
The Bluetooth service must be initialized with bt_initialize().
See also
bt_adapter_le_scan_filter_create()
int bt_adapter_le_scan_filter_register ( bt_scan_filter_h  scan_filter)

Registers a scan filter to use for scanning.

If the filter is registered, it cannot be changed. 4.0 public http://tizen.org/privilege/bluetooth

Remarks
Several scan filters can be registered. If an advertisement passes
any of the registered scan filters, it will be included in the results.
Parameters
[in]scan_filterThe scan filter handle
Returns
0 on success, otherwise a negative error value.
Return values
BT_ERROR_NONESuccessful
BT_ERROR_NOT_INITIALIZEDNot initialized
BT_ERROR_INVALID_PARAMETERInvalid parameter
BT_ERROR_NOW_IN_PROGRESSScan is in progress
BT_ERROR_NOT_SUPPORTEDNot supported
BT_ERROR_PERMISSION_DENIEDPermission denied
Precondition
The Bluetooth service must be initialized with bt_initialize().
int bt_adapter_le_scan_filter_set_device_address ( bt_scan_filter_h  scan_filter,
const char *  address 
)

Sets the device address for the advertisements filter. 4.0.

Parameters
[in]scan_filterThe scan filter handle
[in]addressThe device address by which advertisements will be filtered
Returns
0 on success, otherwise a negative error value.
Return values
BT_ERROR_NONESuccessful
BT_ERROR_NOT_INITIALIZEDNot initialized
BT_ERROR_INVALID_PARAMETERInvalid parameter
BT_ERROR_NOT_SUPPORTEDNot supported
Precondition
The Bluetooth service must be initialized with bt_initialize().
int bt_adapter_le_scan_filter_set_device_name ( bt_scan_filter_h  scan_filter,
const char *  name 
)

Sets the device name for the advertisements filter.

Any previously set value will be overwritten. 4.0

Parameters
[in]scan_filterThe scan filter handle
[in]nameThe device name by which advertisements will be filtered
Returns
0 on success, otherwise a negative error value.
Return values
BT_ERROR_NONESuccessful
BT_ERROR_NOT_INITIALIZEDNot initialized
BT_ERROR_INVALID_PARAMETERInvalid parameter
BT_ERROR_NOT_SUPPORTEDNot supported
Precondition
The Bluetooth service must be initialized with bt_initialize().
int bt_adapter_le_scan_filter_set_manufacturer_data ( bt_scan_filter_h  scan_filter,
int  manufacturer_id,
const char *  data,
unsigned int  data_len 
)

Sets the manufacturer data for the advertisements filter.

Any previously set value will be overwritten. 4.0

Parameters
[in]scan_filterThe scan filter handle
[in]manufacturer_idThe manufacturer ID (0x0000 ~ 0xFFFF)
[in]dataThe manufacturer data (byte array)
[in]data_lenThe length of the manufacturer data
Returns
0 on success, otherwise a negative error value.
Return values
BT_ERROR_NONESuccessful
BT_ERROR_NOT_INITIALIZEDNot initialized
BT_ERROR_INVALID_PARAMETERInvalid parameter
BT_ERROR_NOT_SUPPORTEDNot supported
Precondition
The Bluetooth service must be initialized with bt_initialize().
int bt_adapter_le_scan_filter_set_manufacturer_data_with_mask ( bt_scan_filter_h  scan_filter,
int  manufacturer_id,
const char *  data,
unsigned int  data_len,
const char *  mask,
unsigned int  mask_len 
)

Sets the manufacturer data and the mask for the advertisements filter, to use for filtering by partial data.

Any previously set value will be overwritten. The mask works as follows: For each bit set to 1 in the mask, the corresponding bits in data and in the filtered data will have to be equal. If the mask bit is set to 0, the corresponding bits will be ignored. 4.0

Remarks
The mask and the manufacturer data must have equal lengths.
Parameters
[in]scan_filterThe scan filter handle
[in]manufacturer_idThe manufacturer ID (0x0000 ~ 0xFFFF)
[in]dataThe manufacturer data (byte array)
[in]data_lenThe length of the manufacturer data
[in]maskThe mask by which advertisements will be filtered
[in]mask_lenThe length of the mask
Returns
0 on success, otherwise a negative error value.
Return values
BT_ERROR_NONESuccessful
BT_ERROR_NOT_INITIALIZEDNot initialized
BT_ERROR_INVALID_PARAMETERInvalid parameter
BT_ERROR_NOT_SUPPORTEDNot supported
Precondition
The Bluetooth service must be initialized with bt_initialize().
int bt_adapter_le_scan_filter_set_service_data ( bt_scan_filter_h  scan_filter,
const char *  uuid,
const char *  data,
unsigned int  data_len 
)

Sets the service data for the advertisements filter.

Any previously set value will be overwritten. 4.0

Parameters
[in]scan_filterThe scan filter handle
[in]uuidThe service UUID by which advertisements will be filtered
[in]dataThe service data by which advertisements will be filtered
[in]data_lenThe length of the service data
Returns
0 on success, otherwise a negative error value.
Return values
BT_ERROR_NONESuccessful
BT_ERROR_NOT_INITIALIZEDNot initialized
BT_ERROR_INVALID_PARAMETERInvalid parameter
BT_ERROR_NOT_SUPPORTEDNot supported
Precondition
The Bluetooth service must be initialized with bt_initialize().
int bt_adapter_le_scan_filter_set_service_data_with_mask ( bt_scan_filter_h  scan_filter,
const char *  uuid,
const char *  data,
unsigned int  data_len,
const char *  mask,
unsigned int  mask_len 
)

Sets the service data and the mask for the advertisements filter, to use for filtering by partial data.

Any previously set value will be overwritten. The mask works as follows: For each bit set to 1 in the mask, the corresponding bits in data and in the filtered data will have to be equal. If the mask bit is set to 0, the corresponding bits will be ignored. 4.0

Remarks
The mask and the service data must have equal lengths.
Parameters
[in]scan_filterThe scan filter handle
[in]uuidThe service UUID by which advertisements will be filtered
[in]dataThe service data by which advertisements will be filtered
[in]data_lenThe length of the service data
[in]maskThe mask by which advertisements will be filtered
[in]mask_lenThe length of the mask
Returns
0 on success, otherwise a negative error value.
Return values
BT_ERROR_NONESuccessful
BT_ERROR_NOT_INITIALIZEDNot initialized
BT_ERROR_INVALID_PARAMETERInvalid parameter
BT_ERROR_NOT_SUPPORTEDNot supported
Precondition
The Bluetooth service must be initialized with bt_initialize().
int bt_adapter_le_scan_filter_set_service_solicitation_uuid ( bt_scan_filter_h  scan_filter,
const char *  uuid 
)

Sets the service solicitation UUID for the advertisements filter.

Any previously set value will be overwritten. 4.0

Parameters
[in]scan_filterThe scan filter handle
[in]uuidThe service solicitation UUID by which advertisements will be filtered
Returns
0 on success, otherwise a negative error value.
Return values
BT_ERROR_NONESuccessful
BT_ERROR_NOT_INITIALIZEDNot initialized
BT_ERROR_INVALID_PARAMETERInvalid parameter
BT_ERROR_NOT_SUPPORTEDNot supported
Precondition
The Bluetooth service must be initialized with bt_initialize().
int bt_adapter_le_scan_filter_set_service_solicitation_uuid_with_mask ( bt_scan_filter_h  scan_filter,
const char *  uuid,
const char *  mask 
)

Sets the service solicitation UUID and the mask for the advertisements filter, to use for filtering by partial data.

Any previously set value will be overwritten. The mask works as follows: For each bit set to 1 in the mask, the corresponding bits in uuid and in the filtered data will have to be equal. If the mask bit is set to 0, the corresponding bits will be ignored. 4.0

Remarks
The mask and the service solicitation uuid must have equal lengths.
Parameters
[in]scan_filterThe scan filter handle
[in]uuidThe service solicitation UUID by which advertisements will be filtered
[in]maskThe mask by which advertisements will be filtered
Returns
0 on success, otherwise a negative error value.
Return values
BT_ERROR_NONESuccessful
BT_ERROR_NOT_INITIALIZEDNot initialized
BT_ERROR_INVALID_PARAMETERInvalid parameter
BT_ERROR_NOT_SUPPORTEDNot supported
Precondition
The Bluetooth service must be initialized with bt_initialize().
int bt_adapter_le_scan_filter_set_service_uuid ( bt_scan_filter_h  scan_filter,
const char *  uuid 
)

Sets the service UUID for the advertisements filter.

Any previously set value will be overwritten. 4.0

Parameters
[in]scan_filterThe scan filter handle
[in]uuidThe service UUID by which advertisements will be filtered
Returns
0 on success, otherwise a negative error value.
Return values
BT_ERROR_NONESuccessful
BT_ERROR_NOT_INITIALIZEDNot initialized
BT_ERROR_INVALID_PARAMETERInvalid parameter
BT_ERROR_NOT_SUPPORTEDNot supported
Precondition
The Bluetooth service must be initialized with bt_initialize().
int bt_adapter_le_scan_filter_set_service_uuid_with_mask ( bt_scan_filter_h  scan_filter,
const char *  uuid,
const char *  mask 
)

Sets the service UUID and the mask for the advertisements filter, to use for filtering by partial data.

Any previously set value will be overwritten. The mask works as follows: For each bit set to 1 in the mask, the corresponding bits in uuid and in the filtered data will have to be equal. If the mask bit is set to 0, the corresponding bits will be ignored. 4.0

Remarks
The mask and the service uuid must have equal lengths.
Parameters
[in]scan_filterThe scan filter handle
[in]uuidThe service UUID by which advertisements will be filtered
[in]maskThe mask to filter advertisements
Returns
0 on success, otherwise a negative error value.
Return values
BT_ERROR_NONESuccessful
BT_ERROR_NOT_INITIALIZEDNot initialized
BT_ERROR_INVALID_PARAMETERInvalid parameter
BT_ERROR_NOT_SUPPORTEDNot supported
Precondition
The Bluetooth service must be initialized with bt_initialize().
int bt_adapter_le_scan_filter_set_type ( bt_scan_filter_h  scan_filter,
bt_adapter_le_scan_filter_type_e  mode 
)

Sets the scan filter type for the advertisements filter.

The filter type is used when searching only for iBeacon or proximity type's advertising data. If the type is not set, LE scanner will search devices as with regard to other filtered attributes. If the type is set, all other attributes set for the filter are ignored. 4.0

Parameters
[in]scan_filterThe scan filter handle
[in]modeThe scan filter type
Returns
0 on success, otherwise a negative error value.
Return values
BT_ERROR_NONESuccessful
BT_ERROR_NOT_INITIALIZEDNot initialized
BT_ERROR_INVALID_PARAMETERInvalid parameter
BT_ERROR_NOT_SUPPORTEDNot supported
Precondition
The Bluetooth service must be initialized with bt_initialize().
int bt_adapter_le_scan_filter_unregister ( bt_scan_filter_h  scan_filter)

Unregisters all registered scan filters. 4.0 public http://tizen.org/privilege/bluetooth.

Parameters
[in]scan_filterThe scan filter handle
Returns
0 on success, otherwise a negative error value.
Return values
BT_ERROR_NONESuccessful
BT_ERROR_NOT_INITIALIZEDNot initialized
BT_ERROR_INVALID_PARAMETERInvalid parameter
BT_ERROR_NOW_IN_PROGRESSScan is in progress
BT_ERROR_NOT_SUPPORTEDNot supported
BT_ERROR_PERMISSION_DENIEDPermission denied
Precondition
The Bluetooth service must be initialized with bt_initialize().
int bt_adapter_le_scan_filter_unregister_all ( void  )

Unregisters all registered scan filters. 4.0 public http://tizen.org/privilege/bluetooth.

Returns
0 on success, otherwise a negative error value.
Return values
BT_ERROR_NONESuccessful
BT_ERROR_NOT_INITIALIZEDNot initialized
BT_ERROR_NOW_IN_PROGRESSScan is in progress
BT_ERROR_NOT_SUPPORTEDNot supported
BT_ERROR_PERMISSION_DENIEDPermission denied
Precondition
The Bluetooth service must be initialized with bt_initialize().
int bt_adapter_le_set_advertising_appearance ( bt_advertiser_h  advertiser,
bt_adapter_le_packet_type_e  pkt_type,
int  appearance 
)

Sets the external appearance of this device to advertise or scan response data. Please refer to the adopted Bluetooth specification for the the appearance. 2.3.1.

Parameters
[in]advertiserThe handle of advertiser
[in]pkt_typeThe packet type
[in]appearanceThe external appearance of device
Returns
0 on success, otherwise a negative error value.
Return values
BT_ERROR_NONESuccessful
BT_ERROR_NOT_INITIALIZEDNot initialized
BT_ERROR_INVALID_PARAMETERInvalid parameter
BT_ERROR_QUOTA_EXCEEDEDQuota exceeded
BT_ERROR_OPERATION_FAILEDOperation failed
BT_ERROR_NOT_SUPPORTEDNot supported
Precondition
The Bluetooth service must be initialized with bt_initialize().
See also
bt_adapter_le_clear_advertising_data()
int bt_adapter_le_set_advertising_connectable ( bt_advertiser_h  advertiser,
bool  connectable 
)

Sets whether the advertising type should be connectable or non-connectable. 2.3.1 public http://tizen.org/privilege/bluetooth.

Parameters
[in]advertiserThe handle of advertiser
[in]connectableThe type of advertising
Returns
0 on success, otherwise a negative error value.
Return values
BT_ERROR_NONESuccessful
BT_ERROR_NOT_INITIALIZEDNot initialized
BT_ERROR_INVALID_PARAMETERInvalid parameter
BT_ERROR_NOT_ENABLEDNot enabled
BT_ERROR_NOW_IN_PROGRESSOperation is now in progress
BT_ERROR_PERMISSION_DENIEDPermission denied
BT_ERROR_NOT_SUPPORTEDNot supported
Precondition
The Bluetooth service must be initialized with bt_initialize().
See also
bt_adapter_le_start_advertising_new()
int bt_adapter_le_set_advertising_device_name ( bt_advertiser_h  advertiser,
bt_adapter_le_packet_type_e  pkt_type,
bool  include_name 
)

Sets whether the device name should be included in advertise or scan response data. The maximum advertised or responded data size is 31 bytes including data type and system wide data. 2.3.1.

Parameters
[in]advertiserThe handle of advertiser
[in]pkt_typeThe packet type
[in]include_nameWhether the device name should be included
Returns
0 on success, otherwise a negative error value.
Return values
BT_ERROR_NONESuccessful
BT_ERROR_NOT_INITIALIZEDNot initialized
BT_ERROR_INVALID_PARAMETERInvalid parameter
BT_ERROR_QUOTA_EXCEEDEDQuota exceeded
BT_ERROR_OPERATION_FAILEDOperation failed
BT_ERROR_NOT_SUPPORTEDNot supported
Precondition
The Bluetooth service must be initialized with bt_initialize().
See also
bt_adapter_le_clear_advertising_data()
int bt_adapter_le_set_advertising_mode ( bt_advertiser_h  advertiser,
bt_adapter_le_advertising_mode_e  mode 
)

Sets advertising mode to control the advertising power and latency. 2.3.1 public http://tizen.org/privilege/bluetooth.

Parameters
[in]advertiserThe handle of advertiser
[in]modeThe mode of advertising
Returns
0 on success, otherwise a negative error value.
Return values
BT_ERROR_NONESuccessful
BT_ERROR_NOT_INITIALIZEDNot initialized
BT_ERROR_INVALID_PARAMETERInvalid parameter
BT_ERROR_NOT_ENABLEDNot enabled
BT_ERROR_NOW_IN_PROGRESSOperation is now in progress
BT_ERROR_PERMISSION_DENIEDPermission denied
BT_ERROR_NOT_SUPPORTEDNot supported
Precondition
The Bluetooth service must be initialized with bt_initialize().
See also
bt_adapter_le_start_advertising_new()
int bt_adapter_le_set_advertising_tx_power_level ( bt_advertiser_h  advertiser,
bt_adapter_le_packet_type_e  pkt_type,
bool  include_tx_power 
)

Sets whether the transmission power level should be included in advertise or scan response data. The maximum advertised or responded data size is 31 bytes including data type and system wide data. 2.3.1.

Parameters
[in]advertiserThe handle of advertiser
[in]pkt_typeThe packet type
[in]include_tx_powerWhether the transmission power level should be included
Returns
0 on success, otherwise a negative error value.
Return values
BT_ERROR_NONESuccessful
BT_ERROR_NOT_INITIALIZEDNot initialized
BT_ERROR_INVALID_PARAMETERInvalid parameter
BT_ERROR_QUOTA_EXCEEDEDQuota exceeded
BT_ERROR_OPERATION_FAILEDOperation failed
BT_ERROR_NOT_SUPPORTEDNot supported
Precondition
The Bluetooth service must be initialized with bt_initialize().
See also
bt_adapter_le_clear_advertising_data()
int bt_adapter_le_set_scan_mode ( bt_adapter_le_scan_mode_e  scan_mode)

Sets Bluetooth LE scan mode. 3.0 public http://tizen.org/privilege/bluetooth.

Parameters
[in]scan_modeThe scan mode
Returns
0 on success, otherwise a negative error value.
Return values
BT_ERROR_NONESuccessful
BT_ERROR_NOT_ENABLEDAdapter is not enabled
BT_ERROR_INVALID_PARAMETERParameter is invalid
BT_ERROR_PERMISSION_DENIEDPermission denied
BT_ERROR_NOT_SUPPORTEDNot supported
Precondition
The state of local bluetooth must be BT_ADAPTER_ENABLED.
The bluetooth service must be initialized with bt_initialize().
See also
bt_initialize()
int bt_adapter_le_start_advertising_new ( bt_advertiser_h  advertiser,
bt_adapter_le_advertising_state_changed_cb  cb,
void *  user_data 
)

Starts advertising with passed advertiser and advertising parameters.

Once Bluetooth advertising is started, nearby Bluetooth LE (Low Energy) supported
devices can know this device's existence. And one of them can make a connection request,
if it is allowed.

2.3.1 public http://tizen.org/privilege/bluetooth

Parameters
[in]advertiserThe handle of advertiser
[in]cbThe callback to report the result of this function
[in]user_dataThe user data to be passed when callback is called
Returns
0 on success, otherwise a negative error value.
Return values
BT_ERROR_NONESuccessful
BT_ERROR_NOT_INITIALIZEDNot initialized
BT_ERROR_INVALID_PARAMETERInvalid parameter
BT_ERROR_NOT_ENABLEDNot enabled
BT_ERROR_NOW_IN_PROGRESSOperation is now in progress
BT_ERROR_OPERATION_FAILEDOperation failed
BT_ERROR_PERMISSION_DENIEDPermission denied
BT_ERROR_NOT_SUPPORTEDNot supported
Precondition
The Bluetooth service must be initialized with bt_initialize().
Postcondition
This function invokes bt_adapter_le_advertising_state_changed_cb().
See also
bt_adapter_le_stop_advertising()
bt_adapter_le_advertising_state_changed_cb()
int bt_adapter_le_start_scan ( bt_adapter_le_scan_result_cb  cb,
void *  user_data 
)

Starts the LE scan to find LE advertisement.

If a LE advertisement is found, bt_adapter_le_scan_result_cb() will be invoked.

2.3.1 public http://tizen.org/privilege/bluetooth

Parameters
[in]cbThe callback to report the result of this function
[in]user_dataThe user data to be passed when callback is called
Returns
0 on success, otherwise a negative error value.
Return values
BT_ERROR_NONESuccessful
BT_ERROR_NOT_INITIALIZEDNot initialized
BT_ERROR_NOT_ENABLEDNot enabled
BT_ERROR_NOW_IN_PROGRESSOperation is now in progress
BT_ERROR_OPERATION_FAILEDOperation failed
BT_ERROR_PERMISSION_DENIEDPermission denied
BT_ERROR_NOT_SUPPORTEDNot supported
Precondition
The state of local Bluetooth must be BT_ADAPTER_ENABLED.
Postcondition
This function invokes bt_adapter_le_scan_result_cb().
See also
bt_adapter_le_scan_result_cb()
int bt_adapter_le_stop_advertising ( bt_advertiser_h  advertiser)

Stops the advertising. 2.3 public http://tizen.org/privilege/bluetooth.

Parameters
[in]advertiserThe handle of advertiser
Returns
0 on success, otherwise a negative error value.
Return values
BT_ERROR_NONESuccessful
BT_ERROR_NOT_INITIALIZEDNot initialized
BT_ERROR_INVALID_PARAMETERInvalid parameter
BT_ERROR_NOT_ENABLEDNot enabled
BT_ERROR_NOT_IN_PROGRESSOperation is not in progress
BT_ERROR_OPERATION_FAILEDOperation failed
BT_ERROR_PERMISSION_DENIEDPermission denied
BT_ERROR_NOT_SUPPORTEDNot supported
Precondition
The advertising must be going on with bt_adapter_le_start_advertising_new().
Postcondition
This function invokes bt_adapter_le_advertising_state_changed_cb().
See also
bt_adapter_le_start_advertising_new()
bt_adapter_le_advertising_state_changed_cb()
int bt_adapter_le_stop_scan ( void  )

Stops the LE scan. 2.3.1 public http://tizen.org/privilege/bluetooth.

Returns
0 on success, otherwise a negative error value.
Return values
BT_ERROR_NONESuccessful
BT_ERROR_NOT_INITIALIZEDNot initialized
BT_ERROR_NOT_ENABLEDNot enabled
BT_ERROR_NOT_IN_PROGRESSOperation is not in progress
BT_ERROR_OPERATION_FAILEDOperation failed
BT_ERROR_PERMISSION_DENIEDPermission denied
BT_ERROR_NOT_SUPPORTEDNot supported
Precondition
The LE scan must be in progress with bt_adapter_le_start_scan().
See also
bt_adapter_le_start_scan()
int bt_adapter_remove_remote_oob_data ( const char *  remote_address)

Deletes the Hash and Randomizer value, synchronously. 2.3 public http://tizen.org/privilege/bluetooth.

Parameters
[in]remote_addressRemote device address
Returns
0 on success, otherwise a negative error value.
Return values
BT_ERROR_NONESuccessful
BT_ERROR_NOT_INITIALIZEDNot initialized
BT_ERROR_INVALID_PARAMETERInvalid parameter
BT_ERROR_NOT_ENABLEDNot enabled
BT_ERROR_OPERATION_FAILEDOperation failed
BT_ERROR_PERMISSION_DENIEDPermission denied
BT_ERROR_NOT_SUPPORTEDNot supported
Precondition
The state of local Bluetooth must be BT_ADAPTER_ENABLED.
The Bluetooth service must be initialized with bt_initialize().
See also
bt_initialize()
int bt_adapter_set_device_discovery_state_changed_cb ( bt_adapter_device_discovery_state_changed_cb  callback,
void *  user_data 
)

Registers a callback function to be invoked when the device discovery state changes. 2.3.

Parameters
[in]callbackThe callback function to register
[in]user_dataThe user data to be passed to the callback function
Returns
0 on success, otherwise a negative error value.
Return values
BT_ERROR_NONESuccessful
BT_ERROR_NOT_INITIALIZEDNot initialized
BT_ERROR_INVALID_PARAMETERInvalid parameter
BT_ERROR_NOT_SUPPORTEDNot supported
Precondition
The Bluetooth service must be initialized with bt_initialize().
Postcondition
bt_adapter_device_discovery_state_changed_cb() will be invoked.
See also
bt_initialize()
bt_adapter_device_discovery_state_changed_cb()
bt_adapter_set_device_discovery_state_changed_cb()
bt_adapter_unset_device_discovery_state_changed_cb()
int bt_adapter_set_name ( const char *  local_name)

Sets the name of local Bluetooth adapter. 2.3 public http://tizen.org/privilege/bluetooth.

Parameters
[in]local_nameThe name of the Bluetooth device.
The maximum length is 248 characters.
Returns
0 on success, otherwise a negative error value.
Return values
BT_ERROR_NONESuccessful
BT_ERROR_NOT_INITIALIZEDNot initialized
BT_ERROR_INVALID_PARAMETERInvalid parameter
BT_ERROR_NOT_ENABLEDNot enabled
BT_ERROR_OPERATION_FAILEDOperation failed
BT_ERROR_PERMISSION_DENIEDPermission denied
BT_ERROR_NOT_SUPPORTEDNot supported
Precondition
The state of local Bluetooth must be BT_ADAPTER_ENABLED.
Postcondition
bt_adapter_name_changed_cb() will be invoked if this function returns BT_ERROR_NONE.
See also
bt_adapter_get_name()
bt_adapter_name_changed_cb()
bt_adapter_set_name_changed_cb()
bt_adapter_unset_name_changed_cb()
int bt_adapter_set_name_changed_cb ( bt_adapter_name_changed_cb  callback,
void *  user_data 
)

Registers a callback function to be invoked when the name of Bluetooth adapter changes. 2.3.

Parameters
[in]callbackThe callback function to invoke
[in]user_dataThe user data to be passed to the callback function
Returns
0 on success, otherwise a negative error value.
Return values
BT_ERROR_NONESuccessful
BT_ERROR_NOT_INITIALIZEDNot initialized
BT_ERROR_INVALID_PARAMETERInvalid parameter
BT_ERROR_NOT_SUPPORTEDNot supported
Precondition
The Bluetooth service must be initialized with bt_initialize().
Postcondition
bt_adapter_name_changed_cb() will be invoked.
See also
bt_initialize()
bt_adapter_name_changed_cb()
bt_adapter_unset_name_changed_cb()
int bt_adapter_set_remote_oob_data ( const char *  remote_address,
unsigned char *  hash,
unsigned char *  randomizer,
int  hash_len,
int  randomizer_len 
)

Sets the Hash and Randomizer value, synchronously. 2.3 public http://tizen.org/privilege/bluetooth.

Parameters
[in]remote_addressRemote device address
[in]hashThe hash value received from the controller
[in]randomizerThe hash value received from the controller
[in]hash_lenThe length of the hash value. Allowed value is 16
[in]randomizer_lenThe length of the randomizer value. Allowed value is 16
Returns
0 on success, otherwise a negative error value.
Return values
BT_ERROR_NONESuccessful
BT_ERROR_NOT_INITIALIZEDNot initialized
BT_ERROR_INVALID_PARAMETERInvalid parameter
BT_ERROR_NOT_ENABLEDNot enabled
BT_ERROR_OPERATION_FAILEDOperation failed
BT_ERROR_PERMISSION_DENIEDPermission denied
BT_ERROR_NOT_SUPPORTEDNot supported
Precondition
The state of local Bluetooth must be BT_ADAPTER_ENABLED.
The Bluetooth service must be initialized with bt_initialize().
See also
bt_initialize()
int bt_adapter_set_remote_oob_ext_data ( const char *  remote_address,
const unsigned char *  hash192,
const unsigned char *  randomizer192,
int  hash192_len,
int  randomizer192_len,
const unsigned char *  hash256,
const unsigned char *  randomizer256,
int  hash256_len,
int  randomizer256_len 
)

Sets the Hash and Randomizer value, synchronously. 3.0 public http://tizen.org/privilege/bluetooth.

Parameters
[in]remote_addressRemote device address
[in]hash192The P-192 hash value received via OOB from remote device
[in]randomizer192The P-192 randomizer value received via OOB from remote device
[in]hash192_lenThe length of hash192
[in]randomizer192_lenThe length of randomizer192
[in]hash256The P-256 hash value received via OOB from remote device
[in]randomizer256The P-256 randomizer value received via OOB from remote device
[in]hash256_lenThe length of hash256
[in]randomizer256_lenThe length of randomizer256
Returns
0 on success, otherwise a negative error value.
Return values
BT_ERROR_NONESuccessful
BT_ERROR_NOT_INITIALIZEDNot initialized
BT_ERROR_INVALID_PARAMETERInvalid parameter
BT_ERROR_NOT_ENABLEDNot enabled
BT_ERROR_OPERATION_FAILEDOperation failed
BT_ERROR_PERMISSION_DENIEDPermission denied
BT_ERROR_NOT_SUPPORTEDNot supported
Precondition
The state of local Bluetooth must be BT_ADAPTER_ENABLED.
The Bluetooth service must be initialized with bt_initialize().
See also
bt_initialize()
int bt_adapter_set_state_changed_cb ( bt_adapter_state_changed_cb  callback,
void *  user_data 
)

Registers a callback function to be invoked when the Bluetooth adapter state changes. 2.3.

Parameters
[in]callbackThe callback function to invoke
[in]user_dataThe user data to be passed to the callback function
Returns
0 on success, otherwise a negative error value.
Return values
BT_ERROR_NONESuccessful
BT_ERROR_NOT_INITIALIZEDNot initialized
BT_ERROR_INVALID_PARAMETERInvalid parameter
BT_ERROR_NOT_SUPPORTEDNot supported
Precondition
The Bluetooth service must be initialized with bt_initialize().
Postcondition
bt_adapter_state_changed_cb() will be invoked.
See also
bt_initialize()
bt_adapter_state_changed_cb()
bt_adapter_set_state_changed_cb()
bt_adapter_unset_state_changed_cb()
int bt_adapter_set_visibility_duration_changed_cb ( bt_adapter_visibility_duration_changed_cb  callback,
void *  user_data 
)

Registers a callback function to be invoked every second.

When you set visibility mode as BT_ADAPTER_VISIBILITY_MODE_LIMITED_DISCOVERABLE,
callback will be called every second until visibility mode is changed to BT_ADAPTER_VISIBILITY_MODE_NON_DISCOVERABLE.

2.3 until the visibility mode is changed from BT_ADAPTER_VISIBILITY_MODE_LIMITED_DISCOVERABLE to BT_ADAPTER_VISIBILITY_MODE_NON_DISCOVERABLE.

Parameters
[in]callbackThe callback function to register
[in]user_dataThe user data to be passed to the callback function
Returns
0 on success, otherwise a negative error value.
Return values
BT_ERROR_NONESuccessful
BT_ERROR_NOT_INITIALIZEDNot initialized
BT_ERROR_INVALID_PARAMETERInvalid parameter
BT_ERROR_NOT_SUPPORTEDNot supported
Precondition
The Bluetooth service must be initialized by bt_initialize().
Postcondition
bt_adapter_visibility_duration_changed_cb() will be invoked.
See also
bt_initialize()
bt_adapter_visibility_duration_changed_cb()
bt_adapter_unset_visibility_duration_changed_cb()
int bt_adapter_set_visibility_mode_changed_cb ( bt_adapter_visibility_mode_changed_cb  callback,
void *  user_data 
)

Registers a callback function to be invoked when the visibility mode changes. 2.3.

Parameters
[in]callbackThe callback function to register
[in]user_dataThe user data to be passed to the callback function
Returns
0 on success, otherwise a negative error value.
Return values
BT_ERROR_NONESuccessful
BT_ERROR_NOT_INITIALIZEDNot initialized
BT_ERROR_INVALID_PARAMETERInvalid parameter
BT_ERROR_NOT_SUPPORTEDNot supported
Precondition
The Bluetooth service must be initialized with bt_initialize().
Postcondition
bt_adapter_visibility_mode_changed_cb() will be invoked.
See also
bt_initialize()
bt_adapter_visibility_mode_changed_cb()
bt_adapter_unset_visibility_mode_changed_cb()
int bt_adapter_start_device_discovery ( void  )

Starts the device discovery, asynchronously.

If a device is discovered, bt_adapter_device_discovery_state_changed_cb() will be invoked
with BT_ADAPTER_DEVICE_DISCOVERY_FOUND, and then bt_adapter_device_discovery_state_changed_cb()
will be called with BT_ADAPTER_DEVICE_DISCOVERY_FINISHED in case of the completion or cancellation of the discovery.

2.3 public http://tizen.org/privilege/bluetooth

Remarks
To connect to peer Bluetooth device, you need to know its Bluetooth address.
The device discovery can be stopped by bt_adapter_stop_device_discovery().
Returns
0 on success, otherwise a negative error value.
Return values
BT_ERROR_NONESuccessful
BT_ERROR_NOT_INITIALIZEDNot initialized
BT_ERROR_NOT_ENABLEDNot enabled
BT_ERROR_NOW_IN_PROGRESSOperation is now in progress
BT_ERROR_OPERATION_FAILEDOperation failed
BT_ERROR_PERMISSION_DENIEDPermission denied
BT_ERROR_NOT_SUPPORTEDNot supported
Precondition
The state of local Bluetooth must be BT_ADAPTER_ENABLED.
Postcondition
This function invokes bt_adapter_device_discovery_state_changed_cb().
See also
bt_adapter_is_discovering()
bt_adapter_stop_device_discovery()
bt_adapter_device_discovery_state_changed_cb()
bt_adapter_set_device_discovery_state_changed_cb()
bt_adapter_unset_device_discovery_state_changed_cb()
int bt_adapter_stop_device_discovery ( void  )

Stops the device discovery, asynchronously. 2.3 public http://tizen.org/privilege/bluetooth.

Remarks
The device discovery process will take 10 ~ 20 seconds to get all the devices in vicinity.
Returns
0 on success, otherwise a negative error value.
Return values
BT_ERROR_NONESuccessful
BT_ERROR_NOT_INITIALIZEDNot initialized
BT_ERROR_NOT_ENABLEDNot enabled
BT_ERROR_NOT_IN_PROGRESSOperation is not in progress
BT_ERROR_OPERATION_FAILEDOperation failed
BT_ERROR_PERMISSION_DENIEDPermission denied
BT_ERROR_NOT_SUPPORTEDNot supported
Precondition
The device discovery must be in progress with bt_adapter_start_device_discovery().
Postcondition
This function invokes bt_adapter_device_discovery_state_changed_cb().
See also
bt_adapter_is_discovering()
bt_adapter_start_device_discovery()
bt_adapter_set_device_discovery_state_changed_cb()
bt_adapter_unset_device_discovery_state_changed_cb()
bt_adapter_device_discovery_state_changed_cb()
int bt_adapter_unset_device_discovery_state_changed_cb ( void  )

Unregisters the callback function. 2.3.

Returns
0 on success, otherwise a negative error value.
Return values
BT_ERROR_NONESuccessful
BT_ERROR_NOT_INITIALIZEDNot initialized
BT_ERROR_NOT_SUPPORTEDNot supported
Precondition
The Bluetooth service must be initialized with bt_initialize().
See also
bt_initialize()
bt_adapter_set_device_discovery_state_changed_cb()
int bt_adapter_unset_name_changed_cb ( void  )

Unregisters the callback function. 2.3.

Returns
0 on success, otherwise a negative error value.
Return values
BT_ERROR_NONESuccessful
BT_ERROR_NOT_INITIALIZEDNot initialized
BT_ERROR_NOT_SUPPORTEDNot supported
Precondition
The Bluetooth service must be initialized with bt_initialize().
See also
bt_initialize()
bt_adapter_set_name_changed_cb()
int bt_adapter_unset_state_changed_cb ( void  )

Unregisters the callback function. 2.3.

Returns
0 on success, otherwise a negative error value.
Return values
BT_ERROR_NONESuccessful
BT_ERROR_NOT_INITIALIZEDNot initialized
BT_ERROR_NOT_SUPPORTEDNot supported
Precondition
The Bluetooth service must be initialized with bt_initialize().
See also
bt_initialize()
bt_adapter_set_state_changed_cb()
int bt_adapter_unset_visibility_duration_changed_cb ( void  )

Unregisters the callback function. 2.3.

Returns
0 on success, otherwise a negative error value.
Return values
BT_ERROR_NONESuccessful
BT_ERROR_NOT_INITIALIZEDNot initialized
BT_ERROR_NOT_SUPPORTEDNot supported
Precondition
The Bluetooth service must be initialized with bt_initialize().
See also
bt_initialize()
bt_adapter_set_visibility_duration_changed_cb()
int bt_adapter_unset_visibility_mode_changed_cb ( void  )

Unregisters the callback function. 2.3.

Returns
0 on success, otherwise a negative error value.
Return values
BT_ERROR_NONESuccessful
BT_ERROR_NOT_INITIALIZEDNot initialized
BT_ERROR_NOT_SUPPORTEDNot supported
Precondition
The Bluetooth service must be initialized with bt_initialize().
See also
bt_initialize()
bt_adapter_set_visibility_mode_changed_cb()
int bt_audio_connect ( const char *  remote_address,
bt_audio_profile_type_e  type 
)

Connects the remote device with the given audio profile, asynchronously.

If you input type as BT_AUDIO_PROFILE_TYPE_ALL and connection request succeeds, then bt_audio_connection_state_changed_cb() will be called twice
when BT_AUDIO_PROFILE_TYPE_HSP_HFP is connected and BT_AUDIO_PROFILE_TYPE_A2DP is connected.

2.3 public http://tizen.org/privilege/bluetooth

Parameters
[in]remote_addressThe remote address
[in]typeThe type of audio profile
Returns
0 on success, otherwise a negative error value.
Return values
BT_ERROR_NONESuccessful
BT_ERROR_NOT_INITIALIZEDNot initialized
BT_ERROR_INVALID_PARAMETERInvalid parameter
BT_ERROR_NOT_ENABLEDNot enabled
BT_ERROR_OPERATION_FAILEDOperation failed
BT_ERROR_PERMISSION_DENIEDPermission denied
BT_ERROR_NOT_SUPPORTEDNot supported
Precondition
The Bluetooth audio service must be initialized with bt_audio_initialize().
The local device must be bonded with the remote device by bt_device_create_bond().
Postcondition
bt_audio_connection_state_changed_cb() will be invoked.
See also
bt_audio_disconnect()
bt_audio_connection_state_changed_cb()
int bt_audio_deinitialize ( void  )

Deinitializes the Bluetooth profiles related with audio. 2.3.

Returns
0 on success, otherwise a negative error value.
Return values
BT_ERROR_NONESuccessful
BT_ERROR_NOT_INITIALIZEDNot initialized
BT_ERROR_OPERATION_FAILEDOperation failed
BT_ERROR_NOT_SUPPORTEDNot supported
Precondition
The Bluetooth audio service must be initialized with bt_audio_initialize().
See also
bt_audio_initialize()
int bt_audio_disconnect ( const char *  remote_address,
bt_audio_profile_type_e  type 
)

Disconnects the remote device with the given audio profile, asynchronously.

If you input type as BT_AUDIO_PROFILE_TYPE_ALL and disconnection request succeeds, then bt_audio_connection_state_changed_cb() will be called twice
when BT_AUDIO_PROFILE_TYPE_HSP_HFP is disconnected and BT_AUDIO_PROFILE_TYPE_A2DP is disconnected. 2.3 public http://tizen.org/privilege/bluetooth

Parameters
[in]remote_addressThe remote address
[in]typeThe type of audio profile
Returns
0 on success, otherwise a negative error value.
Return values
BT_ERROR_NONESuccessful
BT_ERROR_NOT_INITIALIZEDNot initialized
BT_ERROR_INVALID_PARAMETERInvalid parameter
BT_ERROR_NOT_ENABLEDNot enabled
BT_ERROR_OPERATION_FAILEDOperation failed
BT_ERROR_PERMISSION_DENIEDPermission denied
BT_ERROR_NOT_SUPPORTEDNot supported
Precondition
The remote device must be connected by bt_audio_connect().
Postcondition
bt_audio_connection_state_changed_cb() will be invoked.
See also
bt_audio_connect()
bt_audio_connection_state_changed_cb()
int bt_audio_initialize ( void  )

Initializes the Bluetooth profiles related with audio. 2.3.

Remarks
This function must be called before Bluetooth profiles related with audio starts.
You must free all resources of the this service by calling bt_audio_deinitialize()
if Bluetooth profiles related with audio service is no longer needed.
Returns
0 on success, otherwise a negative error value.
Return values
BT_ERROR_NONESuccessful
BT_ERROR_NOT_INITIALIZEDNot initialized
BT_ERROR_OPERATION_FAILEDOperation failed
BT_ERROR_NOT_SUPPORTEDNot supported
Precondition
The Bluetooth service must be initialized with bt_initialize().
See also
bt_initialize()
bt_audio_deinitialize()
int bt_audio_set_connection_state_changed_cb ( bt_audio_connection_state_changed_cb  callback,
void *  user_data 
)

Registers a callback function that will be invoked when the connection state is changed. 2.3.

Parameters
[in]callbackThe callback function to register
[in]user_dataThe user data to be passed to the callback function
Returns
0 on success, otherwise a negative error value.
Return values
BT_ERROR_NONESuccessful
BT_ERROR_NOT_INITIALIZEDNot initialized
BT_ERROR_INVALID_PARAMETERInvalid parameter
BT_ERROR_NOT_SUPPORTEDNot supported
Precondition
The Bluetooth audio service must be initialized with bt_audio_initialize().
See also
bt_audio_initialize()
bt_audio_connection_state_changed_cb()
int bt_audio_unset_connection_state_changed_cb ( void  )

Unregisters a callback function that will be invoked when the connection state is changed. 2.3.

Returns
0 on success, otherwise a negative error value.
Return values
BT_ERROR_NONESuccessful
BT_ERROR_NOT_INITIALIZEDNot initialized
BT_ERROR_NOT_SUPPORTEDNot supported
Precondition
The Bluetooth audio service must be initialized with bt_audio_initialize().
See also
bt_audio_initialize()
bt_audio_connection_state_changed_cb()
bt_audio_set_connection_state_changed_cb()
int bt_avrcp_control_connect ( const char *  remote_address)

Connects the AVRCP (Audio/Video Remote Control Profile) target device. 3.0 public http://tizen.org/privilege/bluetooth.

Parameters
[in]remote_addressThe remote address
Returns
0 on success, otherwise a negative error value.
Return values
BT_ERROR_NONESuccessful
BT_ERROR_NOT_INITIALIZEDNot initialized
BT_ERROR_INVALID_PARAMETERInvalid parameter
BT_ERROR_NOT_SUPPORTEDNot supported
BT_ERROR_PERMISSION_DENIEDPermission denied
Precondition
The Bluetooth audio service must be initialized with bt_avrcp_control_initialize().
See also
bt_avrcp_control_initialize()
int bt_avrcp_control_deinitialize ( void  )

Deinitializes the Bluetooth AVRCP (Audio/Video Remote Control Profile) controller service. 3.0.

Returns
0 on success, otherwise a negative error value.
Return values
BT_ERROR_NONESuccessful
BT_ERROR_NOT_INITIALIZEDNot initialized
BT_ERROR_NOT_SUPPORTEDNot supported
Precondition
The Bluetooth audio service must be initialized with bt_avrcp_control_initialize().
See also
bt_avrcp_control_initialize()
int bt_avrcp_control_disconnect ( const char *  remote_address)

Disconnects from the AVRCP (Audio/Video Remote Control Profile) target device. 3.0 public http://tizen.org/privilege/bluetooth.

Parameters
[in]remote_addressThe remote address
Returns
0 on success, otherwise a negative error value.
Return values
BT_ERROR_NONESuccessful
BT_ERROR_NOT_INITIALIZEDNot initialized
BT_ERROR_INVALID_PARAMETERInvalid parameter
BT_ERROR_NOT_SUPPORTEDNot supported
BT_ERROR_PERMISSION_DENIEDPermission denied
Precondition
The Bluetooth audio service must be initialized with bt_avrcp_control_initialize().
See also
bt_avrcp_control_initialize()
bt_avrcp_control_connect()
int bt_avrcp_control_free_track_info ( bt_avrcp_metadata_attributes_info_s track)

Frees the track metadata. 3.0.

Parameters
[in]trackThe track metadata.
Returns
0 on success, otherwise a negative error value.
Return values
BT_ERROR_NONESuccessful
BT_ERROR_NOT_INITIALIZEDNot initialized
BT_ERROR_INVALID_PARAMETERInvalid parameter
BT_ERROR_NOT_SUPPORTEDNot supported
Precondition
track should point to valid metadata address.
See also
bt_avrcp_control_get_track_info()
bt_avrcp_target_initialize()
int bt_avrcp_control_get_equalizer_state ( bt_avrcp_equalizer_state_e state)

Gets the the equalizer state of the remote device. 3.0.

Parameters
[out]stateThe equalizer state, one of: ON, OFF
Returns
0 on success, otherwise a negative error value.
Return values
BT_ERROR_NONESuccessful
BT_ERROR_NOT_INITIALIZEDNot initialized
BT_ERROR_INVALID_PARAMETERInvalid parameter
BT_ERROR_NOT_ENABLEDNot enabled
BT_ERROR_OPERATION_FAILEDOperation failed
BT_ERROR_REMOTE_DEVICE_NOT_CONNECTEDRemote device is not connected
BT_ERROR_NOT_SUPPORTEDNot supported
Precondition
The remote device must be connected.
See also
bt_avrcp_target_connection_state_changed_cb()
bt_avrcp_target_initialize()
int bt_avrcp_control_get_play_status ( bt_avrcp_player_state_e status)

Gets the play status of the remote device. 3.0.

Parameters
[out]statusThe play status, one of: PLAYING, STOPPED...
Returns
0 on success, otherwise a negative error value.
Return values
BT_ERROR_NONESuccessful
BT_ERROR_NOT_INITIALIZEDNot initialized
BT_ERROR_INVALID_PARAMETERInvalid parameter
BT_ERROR_NOT_ENABLEDNot enabled
BT_ERROR_OPERATION_FAILEDOperation failed
BT_ERROR_REMOTE_DEVICE_NOT_CONNECTEDRemote device is not connected
BT_ERROR_NOT_SUPPORTEDNot supported
Precondition
The remote device must be connected.
See also
bt_avrcp_target_connection_state_changed_cb()
bt_avrcp_target_initialize()
int bt_avrcp_control_get_position ( unsigned int *  position)

Gets the position of the song played by the remote device. 3.0.

Parameters
[out]positionThe position, in milliseconds
Returns
0 on success, otherwise a negative error value.
Return values
BT_ERROR_NONESuccessful
BT_ERROR_NOT_INITIALIZEDNot initialized
BT_ERROR_INVALID_PARAMETERInvalid parameter
BT_ERROR_NOT_ENABLEDNot enabled
BT_ERROR_OPERATION_FAILEDOperation failed
BT_ERROR_REMOTE_DEVICE_NOT_CONNECTEDRemote device is not connected
BT_ERROR_NOT_SUPPORTEDNot supported
Precondition
The remote device must be connected.
See also
bt_avrcp_target_connection_state_changed_cb()
bt_avrcp_target_initialize()
int bt_avrcp_control_get_repeat_mode ( bt_avrcp_repeat_mode_e mode)

Gets the repeat state of the remote device. 3.0.

Parameters
[out]modeThe repeat mode, one of: OFF, SINGLE, ALL
Returns
0 on success, otherwise a negative error value.
Return values
BT_ERROR_NONESuccessful
BT_ERROR_NOT_INITIALIZEDNot initialized
BT_ERROR_INVALID_PARAMETERInvalid parameter
BT_ERROR_NOT_ENABLEDNot enabled
BT_ERROR_OPERATION_FAILEDOperation failed
BT_ERROR_REMOTE_DEVICE_NOT_CONNECTEDRemote device is not connected
BT_ERROR_NOT_SUPPORTEDNot supported
Precondition
The remote device must be connected.
See also
bt_avrcp_target_connection_state_changed_cb()
bt_avrcp_target_initialize()
int bt_avrcp_control_get_scan_mode ( bt_avrcp_scan_mode_e mode)

Gets the scan mode of the remote device. 3.0.

Parameters
[out]modeThe scan mode, one of: OFF, GROUP, ALL
Returns
0 on success, otherwise a negative error value.
Return values
BT_ERROR_NONESuccessful
BT_ERROR_NOT_INITIALIZEDNot initialized
BT_ERROR_INVALID_PARAMETERInvalid parameter
BT_ERROR_NOT_ENABLEDNot enabled
BT_ERROR_OPERATION_FAILEDOperation failed
BT_ERROR_REMOTE_DEVICE_NOT_CONNECTEDRemote device is not connected
BT_ERROR_NOT_SUPPORTEDNot supported
Precondition
The remote device must be connected.
See also
bt_avrcp_target_connection_state_changed_cb()
bt_avrcp_target_initialize()
int bt_avrcp_control_get_shuffle_mode ( bt_avrcp_shuffle_mode_e mode)

Gets the shuffle mode of the remote device. 3.0.

Parameters
[out]modeThe shuffle mode, one of: OFF, GROUP, ALL
Returns
0 on success, otherwise a negative error value.
Return values
BT_ERROR_NONESuccessful
BT_ERROR_NOT_INITIALIZEDNot initialized
BT_ERROR_INVALID_PARAMETERInvalid parameter
BT_ERROR_NOT_ENABLEDNot enabled
BT_ERROR_OPERATION_FAILEDOperation failed
BT_ERROR_REMOTE_DEVICE_NOT_CONNECTEDRemote device is not connected
BT_ERROR_NOT_SUPPORTEDNot supported
Precondition
The remote device must be connected.
See also
bt_avrcp_target_connection_state_changed_cb()
bt_avrcp_target_initialize()
int bt_avrcp_control_get_track_info ( bt_avrcp_metadata_attributes_info_s **  track)

Gets the metadata of the track played by the remote device. 3.0.

Remarks
The track must be released using bt_avrcp_control_free_track_info().
Parameters
[out]trackThe track metadata.
Returns
0 on success, otherwise a negative error value.
Return values
BT_ERROR_NONESuccessful
BT_ERROR_NOT_INITIALIZEDNot initialized
BT_ERROR_INVALID_PARAMETERInvalid parameter
BT_ERROR_NOT_ENABLEDNot enabled
BT_ERROR_OPERATION_FAILEDOperation failed
BT_ERROR_REMOTE_DEVICE_NOT_CONNECTEDRemote device is not connected
BT_ERROR_NOT_SUPPORTEDNot supported
Precondition
The remote device must be connected.
See also
bt_avrcp_target_connection_state_changed_cb()
bt_avrcp_target_initialize()
int bt_avrcp_control_initialize ( bt_avrcp_control_connection_state_changed_cb  callback,
void *  user_data 
)

Initializes the Bluetooth AVRCP (Audio/Video Remote Control Profile) controller service. 3.0.

Remarks
This function must be called before any other AVRCP controller functions are called.
You must free all resources of the this service by calling bt_avrcp_control_deinitialize()
if Bluetooth AVRCP service is no longer needed.
Parameters
[in]callbackThe callback function called when the connection state is changed
[in]user_dataThe user data to be passed to the callback function
Returns
0 on success, otherwise a negative error value.
Return values
BT_ERROR_NONESuccessful
BT_ERROR_NOT_INITIALIZEDNot initialized
BT_ERROR_INVALID_PARAMETERInvalid parameter
BT_ERROR_OPERATION_FAILEDOperation failed
BT_ERROR_NOT_SUPPORTEDNot supported
Precondition
The Bluetooth service must be initialized with bt_initialize().
See also
bt_initialize()
bt_avrcp_control_deinitialize()
int bt_avrcp_control_send_player_command ( bt_avrcp_player_command_e  cmd)

Sends a command to the target device. 3.0 public http://tizen.org/privilege/bluetooth.

Parameters
[in]cmdThe commands, one of: Play, Pause, Next, Rewind.
Returns
0 on success, otherwise a negative error value.
Return values
BT_ERROR_NONESuccessful
BT_ERROR_NOT_INITIALIZEDNot initialized
BT_ERROR_INVALID_PARAMETERInvalid parameter
BT_ERROR_NOT_ENABLEDNot enabled
BT_ERROR_OPERATION_FAILEDOperation failed
BT_ERROR_REMOTE_DEVICE_NOT_CONNECTEDRemote device is not connected
BT_ERROR_PERMISSION_DENIEDPermission denied
BT_ERROR_NOT_SUPPORTEDNot supported
Precondition
The Bluetooth audio service must be initialized with bt_avrcp_control_initialize().
See also
bt_avrcp_control_initialize()
bt_avrcp_control_connect()
int bt_avrcp_control_set_equalizer_state ( bt_avrcp_equalizer_state_e  state)

Sends the equalizer state change request to the remote device. 3.0 public http://tizen.org/privilege/bluetooth.

Parameters
[in]stateThe new equalizer state, one of: ON, OFF
Returns
0 on success, otherwise a negative error value.
Return values
BT_ERROR_NONESuccessful
BT_ERROR_NOT_INITIALIZEDNot initialized
BT_ERROR_INVALID_PARAMETERInvalid parameter
BT_ERROR_NOT_ENABLEDNot enabled
BT_ERROR_OPERATION_FAILEDOperation failed
BT_ERROR_REMOTE_DEVICE_NOT_CONNECTEDRemote device is not connected
BT_ERROR_PERMISSION_DENIEDPermission denied
BT_ERROR_NOT_SUPPORTEDNot supported
Precondition
The remote device must be connected.
See also
bt_avrcp_target_connection_state_changed_cb()
bt_avrcp_target_initialize()
int bt_avrcp_control_set_repeat_mode ( bt_avrcp_repeat_mode_e  mode)

Sends the repeat change request to the remote device. 3.0 public http://tizen.org/privilege/bluetooth.

Parameters
[in]modeThe new repeat mode, one of: OFF, SINGLE, ALL
Returns
0 on success, otherwise a negative error value.
Return values
BT_ERROR_NONESuccessful
BT_ERROR_NOT_INITIALIZEDNot initialized
BT_ERROR_INVALID_PARAMETERInvalid parameter
BT_ERROR_NOT_ENABLEDNot enabled
BT_ERROR_OPERATION_FAILEDOperation failed
BT_ERROR_REMOTE_DEVICE_NOT_CONNECTEDRemote device is not connected
BT_ERROR_PERMISSION_DENIEDPermission denied
BT_ERROR_NOT_SUPPORTEDNot supported
Precondition
The remote device must be connected.
See also
bt_avrcp_target_connection_state_changed_cb()
bt_avrcp_target_initialize()
int bt_avrcp_control_set_scan_mode ( bt_avrcp_scan_mode_e  mode)

Sends the scan mode change request to the remote device. 3.0 public http://tizen.org/privilege/bluetooth.

Parameters
[in]modeThe new scan mode, one of: OFF, GROUP, ALL
Returns
0 on success, otherwise a negative error value.
Return values
BT_ERROR_NONESuccessful
BT_ERROR_NOT_INITIALIZEDNot initialized
BT_ERROR_INVALID_PARAMETERInvalid parameter
BT_ERROR_NOT_ENABLEDNot enabled
BT_ERROR_OPERATION_FAILEDOperation failed
BT_ERROR_REMOTE_DEVICE_NOT_CONNECTEDRemote device is not connected
BT_ERROR_PERMISSION_DENIEDPermission denied
BT_ERROR_NOT_SUPPORTEDNot supported
Precondition
The remote device must be connected.
See also
bt_avrcp_target_connection_state_changed_cb()
bt_avrcp_target_initialize()
int bt_avrcp_control_set_shuffle_mode ( bt_avrcp_shuffle_mode_e  mode)

Sends the shuffle mode change request to the remote device. 3.0 public http://tizen.org/privilege/bluetooth.

Parameters
[in]modeThe new shuffle mode, one of: OFF, GROUP, ALL
Returns
0 on success, otherwise a negative error value.
Return values
BT_ERROR_NONESuccessful
BT_ERROR_NOT_INITIALIZEDNot initialized
BT_ERROR_INVALID_PARAMETERInvalid parameter
BT_ERROR_NOT_ENABLEDNot enabled
BT_ERROR_OPERATION_FAILEDOperation failed
BT_ERROR_REMOTE_DEVICE_NOT_CONNECTEDRemote device is not connected
BT_ERROR_PERMISSION_DENIEDPermission denied
BT_ERROR_NOT_SUPPORTEDNot supported
Precondition
The remote device must be connected.
See also
bt_avrcp_target_connection_state_changed_cb()
bt_avrcp_target_initialize()
int bt_avrcp_set_equalizer_state_changed_cb ( bt_avrcp_equalizer_state_changed_cb  callback,
void *  user_data 
)

Registers a callback function that will be invoked when the equalizer state is changed. (e.g., by a TV remote control or other input devices). 2.4.

Parameters
[in]callbackThe callback function to register
[in]user_dataThe user data to be passed to the callback function
Returns
0 on success, otherwise a negative error value.
Return values
BT_ERROR_NONESuccessful
BT_ERROR_NOT_INITIALIZEDNot initialized
BT_ERROR_INVALID_PARAMETERInvalid parameter
BT_ERROR_NOT_SUPPORTEDNot supported
Precondition
The AVRCP service must be initialized with bt_avrcp_target_initialize() or bt_avrcp_control_initialize().
See also
bt_avrcp_target_initialize()
bt_avrcp_control_initialize()
bt_avrcp_unset_equalizer_state_changed_cb()
int bt_avrcp_set_play_status_changed_cb ( bt_avrcp_play_status_changed_cb  callback,
void *  user_data 
)

Registers a callback function that will be invoked when the Play status is changed. (e.g., by a TV remote control or other input devices). 3.0.

Parameters
[in]callbackThe callback function to register
[in]user_dataThe user data to be passed to the callback function
Returns
0 on success, otherwise a negative error value.
Return values
BT_ERROR_NONESuccessful
BT_ERROR_NOT_INITIALIZEDNot initialized
BT_ERROR_INVALID_PARAMETERInvalid parameter
BT_ERROR_NOT_SUPPORTEDNot supported
Precondition
The AVRCP service must be initialized with bt_avrcp_target_initialize() or bt_avrcp_control_initialize().
See also
bt_avrcp_target_initialize()
bt_avrcp_control_initialize()
bt_avrcp_unset_play_status_changed_cb()
int bt_avrcp_set_position_changed_cb ( bt_avrcp_position_changed_cb  callback,
void *  user_data 
)

Registers a callback function that will be invoked when the song position is changed. (e.g., by a TV remote control or other input devices). 3.0.

Parameters
[in]callbackThe callback function to register
[in]user_dataThe user data to be passed to the callback function
Returns
0 on success, otherwise a negative error value.
Return values
BT_ERROR_NONESuccessful
BT_ERROR_NOT_INITIALIZEDNot initialized
BT_ERROR_INVALID_PARAMETERInvalid parameter
BT_ERROR_NOT_SUPPORTEDNot supported
Precondition
The AVRCP service must be initialized with bt_avrcp_target_initialize() or bt_avrcp_control_initialize().
See also
bt_avrcp_target_initialize()
bt_avrcp_control_initialize()
bt_avrcp_set_position_changed_cb()
int bt_avrcp_set_repeat_mode_changed_cb ( bt_avrcp_repeat_mode_changed_cb  callback,
void *  user_data 
)

Registers a callback function that will be invoked when the repeat mode is changed. (e.g., by a TV remote control or other input devices). 2.4.

Parameters
[in]callbackThe callback function to register
[in]user_dataThe user data to be passed to the callback function
Returns
0 on success, otherwise a negative error value.
Return values
BT_ERROR_NONESuccessful
BT_ERROR_NOT_INITIALIZEDNot initialized
BT_ERROR_INVALID_PARAMETERInvalid parameter
BT_ERROR_NOT_SUPPORTEDNot supported
Precondition
The AVRCP service must be initialized with bt_avrcp_target_initialize() or bt_avrcp_control_initialize().
See also
bt_avrcp_target_initialize()
bt_avrcp_control_initialize()
bt_avrcp_unset_repeat_mode_changed_cb()
int bt_avrcp_set_scan_mode_changed_cb ( bt_avrcp_scan_mode_changed_cb  callback,
void *  user_data 
)

Registers a callback function that will be invoked when the scan mode is changed. (e.g., by a TV remote control or other input devices). 2.4.

Parameters
[in]callbackThe callback function to register
[in]user_dataThe user data to be passed to the callback function
Returns
0 on success, otherwise a negative error value.
Return values
BT_ERROR_NONESuccessful
BT_ERROR_NOT_INITIALIZEDNot initialized
BT_ERROR_INVALID_PARAMETERInvalid parameter
BT_ERROR_NOT_SUPPORTEDNot supported
Precondition
The AVRCP service must be initialized with bt_avrcp_target_initialize() or bt_avrcp_control_initialize().
See also
bt_avrcp_target_initialize()
bt_avrcp_control_initialize()
bt_avrcp_unset_scan_mode_changed_cb()
int bt_avrcp_set_shuffle_mode_changed_cb ( bt_avrcp_shuffle_mode_changed_cb  callback,
void *  user_data 
)

Registers a callback function that will be invoked when the shuffle mode is changed. (e.g., by a TV remote control or other input devices). 2.4.

Parameters
[in]callbackThe callback function to register
[in]user_dataThe user data to be passed to the callback function
Returns
0 on success, otherwise a negative error value.
Return values
BT_ERROR_NONESuccessful
BT_ERROR_NOT_INITIALIZEDNot initialized
BT_ERROR_INVALID_PARAMETERInvalid parameter
BT_ERROR_NOT_SUPPORTEDNot supported
Precondition
The AVRCP service must be initialized with bt_avrcp_target_initialize() or bt_avrcp_control_initialize().
See also
bt_avrcp_target_initialize()
bt_avrcp_control_initialize()
bt_avrcp_unset_shuffle_mode_changed_cb()
int bt_avrcp_set_track_info_changed_cb ( bt_avrcp_track_info_changed_cb  callback,
void *  user_data 
)

Registers a callback function that will be invoked when the track metadata is changed. (e.g., by a TV remote control or other input devices). 3.0.

Parameters
[in]callbackThe callback function to register
[in]user_dataThe user data to be passed to the callback function
Returns
0 on success, otherwise a negative error value.
Return values
BT_ERROR_NONESuccessful
BT_ERROR_NOT_INITIALIZEDNot initialized
BT_ERROR_INVALID_PARAMETERInvalid parameter
BT_ERROR_NOT_SUPPORTEDNot supported
Precondition
The AVRCP service must be initialized with bt_avrcp_target_initialize() or bt_avrcp_control_initialize().
See also
bt_avrcp_target_initialize()
bt_avrcp_control_initialize()
bt_avrcp_unset_track_info_changed_cb()
int bt_avrcp_target_deinitialize ( void  )

Deinitializes the Bluetooth AVRCP (Audio/Video Remote Control Profile) target service. 2.4.

Returns
0 on success, otherwise a negative error value.
Return values
BT_ERROR_NONESuccessful
BT_ERROR_NOT_INITIALIZEDNot initialized
BT_ERROR_NOT_SUPPORTEDNot supported
Precondition
The Bluetooth audio service must be initialized with bt_avrcp_target_initialize().
See also
bt_avrcp_target_initialize()
int bt_avrcp_target_initialize ( bt_avrcp_target_connection_state_changed_cb  callback,
void *  user_data 
)

Initializes the Bluetooth AVRCP (Audio/Video Remote Control Profile) target service. 2.4.

Remarks
This function must be called before any other AVRCP target functions are called.
You must free all resources of the this service by calling bt_avrcp_target_deinitialize()
if Bluetooth AVRCP service is no longer needed.
Parameters
[in]callbackThe callback function called when the connection state is changed
[in]user_dataThe user data to be passed to the callback function
Returns
0 on success, otherwise a negative error value.
Return values
BT_ERROR_NONESuccessful
BT_ERROR_NOT_INITIALIZEDNot initialized
BT_ERROR_INVALID_PARAMETERInvalid parameter
BT_ERROR_OPERATION_FAILEDOperation failed
BT_ERROR_NOT_SUPPORTEDNot supported
Precondition
The Bluetooth service must be initialized with bt_initialize().
See also
bt_initialize()
bt_avrcp_target_deinitialize()
int bt_avrcp_target_notify_equalizer_state ( bt_avrcp_equalizer_state_e  state)

Notifies the equalizer state to the remote device. 2.4 public http://tizen.org/privilege/bluetooth.

Parameters
[in]stateThe state of equalizer
Returns
0 on success, otherwise a negative error value.
Return values
BT_ERROR_NONESuccessful
BT_ERROR_NOT_INITIALIZEDNot initialized
BT_ERROR_INVALID_PARAMETERInvalid parameter
BT_ERROR_NOT_ENABLEDNot enabled
BT_ERROR_OPERATION_FAILEDOperation failed
BT_ERROR_REMOTE_DEVICE_NOT_CONNECTEDRemote device is not connected
BT_ERROR_PERMISSION_DENIEDPermission denied
BT_ERROR_NOT_SUPPORTEDNot supported
Precondition
The remote device must be connected.
See also
bt_avrcp_target_connection_state_changed_cb()
bt_avrcp_target_initialize()
int bt_avrcp_target_notify_player_state ( bt_avrcp_player_state_e  state)

Notifies the player state to the remote device. 2.4 public http://tizen.org/privilege/bluetooth.

Parameters
[in]stateThe player state
Returns
0 on success, otherwise a negative error value.
Return values
BT_ERROR_NONESuccessful
BT_ERROR_NOT_INITIALIZEDNot initialized
BT_ERROR_INVALID_PARAMETERInvalid parameter
BT_ERROR_NOT_ENABLEDNot enabled
BT_ERROR_OPERATION_FAILEDOperation failed
BT_ERROR_REMOTE_DEVICE_NOT_CONNECTEDRemote device is not connected
BT_ERROR_PERMISSION_DENIEDPermission denied
BT_ERROR_NOT_SUPPORTEDNot supported
Precondition
The remote device must be connected.
See also
bt_avrcp_target_connection_state_changed_cb()
bt_avrcp_target_initialize()
int bt_avrcp_target_notify_position ( unsigned int  position)

Notifies the current position of song to the remote device. 2.4 public http://tizen.org/privilege/bluetooth.

Parameters
[in]positionThe current position in milliseconds
Returns
0 on success, otherwise a negative error value.
Return values
BT_ERROR_NONESuccessful
BT_ERROR_NOT_INITIALIZEDNot initialized
BT_ERROR_INVALID_PARAMETERInvalid parameter
BT_ERROR_NOT_ENABLEDNot enabled
BT_ERROR_OPERATION_FAILEDOperation failed
BT_ERROR_REMOTE_DEVICE_NOT_CONNECTEDRemote device is not connected
BT_ERROR_PERMISSION_DENIEDPermission denied
BT_ERROR_NOT_SUPPORTEDNot supported
Precondition
The remote device must be connected.
See also
bt_avrcp_target_connection_state_changed_cb()
bt_avrcp_target_initialize()
int bt_avrcp_target_notify_repeat_mode ( bt_avrcp_repeat_mode_e  mode)

Notifies the repeat mode to the remote device. 2.4 public http://tizen.org/privilege/bluetooth.

Parameters
[in]modeThe repeat mode
Returns
0 on success, otherwise a negative error value.
Return values
BT_ERROR_NONESuccessful
BT_ERROR_NOT_INITIALIZEDNot initialized
BT_ERROR_INVALID_PARAMETERInvalid parameter
BT_ERROR_NOT_ENABLEDNot enabled
BT_ERROR_OPERATION_FAILEDOperation failed
BT_ERROR_REMOTE_DEVICE_NOT_CONNECTEDRemote device is not connected
BT_ERROR_PERMISSION_DENIEDPermission denied
BT_ERROR_NOT_SUPPORTEDNot supported
Precondition
The remote device must be connected.
See also
bt_avrcp_target_connection_state_changed_cb()
bt_avrcp_target_initialize()
int bt_avrcp_target_notify_scan_mode ( bt_avrcp_scan_mode_e  mode)

Notifies the scan mode to the remote device. 2.4 public http://tizen.org/privilege/bluetooth.

Parameters
[in]modeThe scan mode
Returns
0 on success, otherwise a negative error value.
Return values
BT_ERROR_NONESuccessful
BT_ERROR_NOT_INITIALIZEDNot initialized
BT_ERROR_INVALID_PARAMETERInvalid parameter
BT_ERROR_NOT_ENABLEDNot enabled
BT_ERROR_OPERATION_FAILEDOperation failed
BT_ERROR_REMOTE_DEVICE_NOT_CONNECTEDRemote device is not connected
BT_ERROR_PERMISSION_DENIEDPermission denied
BT_ERROR_NOT_SUPPORTEDNot supported
Precondition
The remote device must be connected.
See also
bt_avrcp_target_connection_state_changed_cb()
bt_avrcp_target_initialize()
int bt_avrcp_target_notify_shuffle_mode ( bt_avrcp_shuffle_mode_e  mode)

Notifies the shuffle mode to the remote device. 2.4 public http://tizen.org/privilege/bluetooth.

Parameters
[in]modeThe repeat mode
Returns
0 on success, otherwise a negative error value.
Return values
BT_ERROR_NONESuccessful
BT_ERROR_NOT_INITIALIZEDNot initialized
BT_ERROR_INVALID_PARAMETERInvalid parameter
BT_ERROR_NOT_ENABLEDNot enabled
BT_ERROR_OPERATION_FAILEDOperation failed
BT_ERROR_REMOTE_DEVICE_NOT_CONNECTEDRemote device is not connected
BT_ERROR_PERMISSION_DENIEDPermission denied
BT_ERROR_NOT_SUPPORTEDNot supported
Precondition
The remote device must be connected.
See also
bt_avrcp_target_connection_state_changed_cb()
bt_avrcp_target_initialize()
int bt_avrcp_target_notify_track ( const char *  title,
const char *  artist,
const char *  album,
const char *  genre,
unsigned int  track_num,
unsigned int  total_tracks,
unsigned int  duration 
)

Notifies the track to the remote device. 2.4 public http://tizen.org/privilege/bluetooth.

Parameters
[in]titleThe title of track
[in]artistThe artist of track
[in]albumThe album of track
[in]genreThe genre of track
[in]track_numThe track number
[in]total_tracksThe number of all tracks
[in]durationThe duration of track in milliseconds
Returns
0 on success, otherwise a negative error value.
Return values
BT_ERROR_NONESuccessful
BT_ERROR_NOT_INITIALIZEDNot initialized
BT_ERROR_INVALID_PARAMETERInvalid parameter
BT_ERROR_NOT_ENABLEDNot enabled
BT_ERROR_OPERATION_FAILEDOperation failed
BT_ERROR_REMOTE_DEVICE_NOT_CONNECTEDRemote device is not connected
BT_ERROR_PERMISSION_DENIEDPermission denied
BT_ERROR_NOT_SUPPORTEDNot supported
Precondition
The remote device must be connected.
See also
bt_avrcp_target_connection_state_changed_cb()
bt_avrcp_target_initialize()
int bt_avrcp_unset_equalizer_state_changed_cb ( void  )

Unregisters a callback function that will be invoked when the equalizer state is changed. (e.g., by a TV remote control or other input devices). 2.4.

Returns
0 on success, otherwise a negative error value.
Return values
BT_ERROR_NONESuccessful
BT_ERROR_NOT_INITIALIZEDNot initialized
BT_ERROR_NOT_SUPPORTEDNot supported
Precondition
The AVRCP service must be initialized with bt_avrcp_target_initialize() or bt_avrcp_control_initialize().
See also
bt_avrcp_target_initialize()
bt_avrcp_control_initialize()
bt_avrcp_set_equalizer_state_changed_cb()
int bt_avrcp_unset_play_status_changed_cb ( void  )

Unregisters a callback function that will be invoked when the Play status is changed. (e.g., by a TV remote control or other input devices). 3.0.

Returns
0 on success, otherwise a negative error value.
Return values
BT_ERROR_NONESuccessful
BT_ERROR_NOT_INITIALIZEDNot initialized
BT_ERROR_NOT_SUPPORTEDNot supported
Precondition
The AVRCP service must be initialized with bt_avrcp_target_initialize() or bt_avrcp_control_initialize().
See also
bt_avrcp_target_initialize()
bt_avrcp_control_initialize()
bt_avrcp_unset_play_status_changed_cb()
int bt_avrcp_unset_position_changed_cb ( void  )

Unregisters a callback function that will be invoked when the song position is changed. (e.g., by a TV remote control or other input devices). 3.0.

Returns
0 on success, otherwise a negative error value.
Return values
BT_ERROR_NONESuccessful
BT_ERROR_NOT_INITIALIZEDNot initialized
BT_ERROR_NOT_SUPPORTEDNot supported
Precondition
The AVRCP service must be initialized with bt_avrcp_target_initialize() or bt_avrcp_control_initialize().
See also
bt_avrcp_target_initialize()
bt_avrcp_control_initialize()
bt_avrcp_set_position_changed_cb()
int bt_avrcp_unset_repeat_mode_changed_cb ( void  )

Unregisters a callback function that will be invoked when the repeat mode is changed. (e.g., by a TV remote control or other input devices). 2.4.

Returns
0 on success, otherwise a negative error value.
Return values
BT_ERROR_NONESuccessful
BT_ERROR_NOT_INITIALIZEDNot initialized
BT_ERROR_NOT_SUPPORTEDNot supported
Precondition
The AVRCP service must be initialized with bt_avrcp_target_initialize() or bt_avrcp_control_initialize().
See also
bt_avrcp_target_initialize()
bt_avrcp_control_initialize()
bt_avrcp_set_repeat_mode_changed_cb()
int bt_avrcp_unset_scan_mode_changed_cb ( void  )

Unregisters a callback function that will be invoked when the scan mode is changed. (e.g., by a TV remote control or other input devices). 2.4.

Returns
0 on success, otherwise a negative error value.
Return values
BT_ERROR_NONESuccessful
BT_ERROR_NOT_INITIALIZEDNot initialized
BT_ERROR_NOT_SUPPORTEDNot supported
Precondition
The AVRCP service must be initialized with bt_avrcp_target_initialize() or bt_avrcp_control_initialize().
See also
bt_avrcp_target_initialize()
bt_avrcp_control_initialize()
bt_avrcp_set_scan_mode_changed_cb()
int bt_avrcp_unset_shuffle_mode_changed_cb ( void  )

Unregisters a callback function that will be invoked when the shuffle mode is changed. (e.g., by a TV remote control or other input devices). 2.4.

Returns
0 on success, otherwise a negative error value.
Return values
BT_ERROR_NONESuccessful
BT_ERROR_NOT_INITIALIZEDNot initialized
BT_ERROR_NOT_SUPPORTEDNot supported
Precondition
The AVRCP service must be initialized with bt_avrcp_target_initialize() or bt_avrcp_control_initialize().
See also
bt_avrcp_target_initialize()
bt_avrcp_control_initialize()
bt_avrcp_set_shuffle_mode_changed_cb()
int bt_avrcp_unset_track_info_changed_cb ( void  )

Unregisters a callback function that will be invoked when the track metadata is changed. (e.g., by a TV remote control or other input devices). 3.0.

Returns
0 on success, otherwise a negative error value.
Return values
BT_ERROR_NONESuccessful
BT_ERROR_NOT_INITIALIZEDNot initialized
BT_ERROR_NOT_SUPPORTEDNot supported
Precondition
The AVRCP service must be initialized with bt_avrcp_target_initialize() or bt_avrcp_control_initialize().
See also
bt_avrcp_target_initialize()
bt_avrcp_control_initialize()
bt_avrcp_set_track_info_changed_cb()
int bt_deinitialize ( void  )

Releases all resources of the Bluetooth API. 2.3.

Remarks
This function must be called if Bluetooth API is no longer needed.
Returns
0 on success, otherwise a negative error value.
Return values
BT_ERROR_NONESuccessful
BT_ERROR_NOT_INITIALIZEDNot initialized
BT_ERROR_OPERATION_FAILEDOperation failed
BT_ERROR_NOT_SUPPORTEDNot supported
Precondition
Bluetooth API must be initialized with bt_initialize().
See also
bt_initialize()
int bt_device_cancel_bonding ( void  )

Cancels the bonding process. 2.3 public http://tizen.org/privilege/bluetooth.

Remarks
Use this function when the remote Bluetooth device is not responding to the
bond request or you wish to cancel the bonding request.
Returns
0 on success, otherwise a negative error value.
Return values
BT_ERROR_NONESuccessful
BT_ERROR_NOT_INITIALIZEDNot initialized
BT_ERROR_NOT_ENABLEDNot enabled
BT_ERROR_NOT_IN_PROGRESSOperation not in progress
BT_ERROR_PERMISSION_DENIEDPermission denied
BT_ERROR_NOT_SUPPORTEDNot supported
Precondition
The creating a bond must be in progress by bt_device_create_bond().
See also
bt_device_create_bond()
bt_device_bond_created_cb()
bt_device_set_bond_created_cb()
bt_device_unset_bond_created_cb()
int bt_device_create_bond ( const char *  remote_address)

Creates a bond with a remote Bluetooth device, asynchronously. 2.3 public http://tizen.org/privilege/bluetooth.

Remarks
A bond can be destroyed by bt_device_destroy_bond().
The bonding request can be cancelled by bt_device_cancel_bonding().
Parameters
[in]remote_addressThe address of the remote Bluetooth device with which the bond should be created
Returns
0 on success, otherwise a negative error value.
Return values
BT_ERROR_NONESuccessful
BT_ERROR_NOT_INITIALIZEDNot initialized
BT_ERROR_INVALID_PARAMETERInvalid parameter
BT_ERROR_NOT_ENABLEDNot enabled
BT_ERROR_RESOURCE_BUSYDevice or resource busy
BT_ERROR_OPERATION_FAILEDOperation failed
BT_ERROR_PERMISSION_DENIEDPermission denied
BT_ERROR_NOT_SUPPORTEDNot supported
Precondition
The state of local Bluetooth must be BT_ADAPTER_ENABLED.
The remote device must be discoverable with bt_adapter_start_device_discovery().
Postcondition
This function invokes bt_device_bond_created_cb().
See also
bt_adapter_start_device_discovery()
bt_device_bond_created_cb()
bt_device_cancel_bonding()
bt_device_destroy_bond()
bt_device_set_bond_created_cb()
bt_device_unset_bond_created_cb()
int bt_device_destroy_bond ( const char *  remote_address)

Destroys the bond, asynchronously. 2.3 public http://tizen.org/privilege/bluetooth.

Parameters
[in]remote_addressThe address of the remote Bluetooth device to remove bonding
Returns
0 on success, otherwise a negative error value.
Return values
BT_ERROR_NONESuccessful
BT_ERROR_NOT_INITIALIZEDNot initialized
BT_ERROR_INVALID_PARAMETERInvalid parameter
BT_ERROR_NOT_ENABLEDNot enabled
BT_ERROR_RESOURCE_BUSYDevice or resource busy
BT_ERROR_REMOTE_DEVICE_NOT_BONDEDRemote device not bonded
BT_ERROR_OPERATION_FAILEDOperation failed
BT_ERROR_PERMISSION_DENIEDPermission denied
BT_ERROR_NOT_SUPPORTEDNot supported
Precondition
The state of local Bluetooth must be BT_ADAPTER_ENABLED.
The bond with the remote device must be created with bt_device_create_bond().
Postcondition
This function invokes bt_device_bond_destroyed_cb().
See also
bt_device_create_bond()
bt_device_bond_destroyed_cb()
bt_device_set_bond_destroyed_cb()
bt_device_unset_bond_destroyed_cb()
int bt_device_foreach_connected_profiles ( const char *  remote_address,
bt_device_connected_profile  callback,
void *  user_data 
)

Gets the connected profiles. 2.3.

Parameters
[in]remote_addressThe address of the remote device
[in]callbackThe callback function to invoke
[in]user_dataThe user data to be passed to the callback function
Returns
0 on success, otherwise a negative error value.
Return values
BT_ERROR_NONESuccessful
BT_ERROR_INVALID_PARAMETERInvalid parameter
BT_ERROR_NOT_INITIALIZEDNot initialized
BT_ERROR_NOT_ENABLEDNot enabled
BT_ERROR_NOT_SUPPORTEDNot supported
Precondition
The state of local Bluetooth must be BT_ADAPTER_ENABLED.
Postcondition
bt_device_connected_profile() will be invoked.
See also
bt_device_connected_profile()
int bt_device_get_service_mask_from_uuid_list ( char **  uuids,
int  no_of_service,
bt_service_class_t service_mask_list 
)

Gets the service mask from the UUID list. 2.3.

Parameters
[in]uuidsThe UUID list of the device.
[in]no_of_serviceThe number of the UUID list count.
[out]service_mask_listService mask list converted from the given UUID list.
Returns
0 on success, otherwise a negative error value.
Return values
BT_ERROR_NONESuccessful
BT_ERROR_INVALID_PARAMETERInvalid parameter
BT_ERROR_NOT_SUPPORTEDNot supported
See also
bt_service_class_t
int bt_device_is_profile_connected ( const char *  remote_address,
bt_profile_e  bt_profile,
bool *  connected_status 
)

Gets the profile connected status. 2.3.

Parameters
[in]remote_addressThe address of the remote device
[in]bt_profilewish to know bt_profile
[out]connected_statusthe connected status
Returns
0 on success, otherwise a negative error value.
Return values
BT_ERROR_NONESuccessful
BT_ERROR_INVALID_PARAMETERInvalid parameter
BT_ERROR_NOT_INITIALIZEDNot initialized
BT_ERROR_NOT_ENABLEDNot enabled
BT_ERROR_REMOTE_DEVICE_NOT_BONDEDRemote device not bonded
BT_ERROR_OPERATION_FAILEDOperation failed
BT_ERROR_NOT_SUPPORTEDNot supported
Precondition
The state of local Bluetooth must be BT_ADAPTER_ENABLED.
int bt_device_set_alias ( const char *  remote_address,
const char *  alias 
)

Sets an alias for the bonded device. 2.3 public http://tizen.org/privilege/bluetooth.

Parameters
[in]remote_addressThe address of the remote Bluetooth device
[in]aliasThe alias of the remote Bluetooth device
Returns
0 on success, otherwise a negative error value.
Return values
BT_ERROR_NONESuccessful
BT_ERROR_NOT_INITIALIZEDNot initialized
BT_ERROR_INVALID_PARAMETERInvalid parameter
BT_ERROR_NOT_ENABLEDNot enabled
BT_ERROR_REMOTE_DEVICE_NOT_BONDEDRemote device not bonded
BT_ERROR_OPERATION_FAILEDOperation failed
BT_ERROR_PERMISSION_DENIEDPermission denied
BT_ERROR_NOT_SUPPORTEDNot supported
Precondition
The state of local Bluetooth must be BT_ADAPTER_ENABLED.
The bond with the remote device must be created with bt_device_create_bond().
See also
bt_device_create_bond()
int bt_device_set_authorization ( const char *  remote_address,
bt_device_authorization_e  authorization_state 
)

Sets the authorization of a bonded device, asynchronously. 2.3 public http://tizen.org/privilege/bluetooth.

Remarks
Once a device is authorized, you don't need to receive a confirmation.
Parameters
[in]remote_addressThe address of the remote Bluetooth device to authorize
[in]authorization_stateThe Bluetooth authorization state
Returns
0 on success, otherwise a negative error value.
Return values
BT_ERROR_NONESuccessful
BT_ERROR_NOT_INITIALIZEDNot initialized
BT_ERROR_INVALID_PARAMETERInvalid parameter
BT_ERROR_NOT_ENABLEDNot enabled
BT_ERROR_REMOTE_DEVICE_NOT_BONDEDRemote device not bonded
BT_ERROR_OPERATION_FAILEDOperation failed
BT_ERROR_PERMISSION_DENIEDPermission denied
BT_ERROR_NOT_SUPPORTEDNot supported
Precondition
The state of local Bluetooth must be BT_ADAPTER_ENABLED.
The bond with the remote device must be created with bt_device_create_bond().
Postcondition
bt_device_authorization_changed_cb() will be invoked.
See also
bt_device_create_bond()
bt_device_authorization_changed_cb()
bt_device_set_authorization_changed_cb()
bt_device_unset_authorization_changed_cb()
int bt_device_set_authorization_changed_cb ( bt_device_authorization_changed_cb  callback,
void *  user_data 
)

Registers a callback function to be invoked when the authorization of device changes. 2.3.

Parameters
[in]callbackThe callback function to register
[in]user_dataThe user data to be passed to the callback function
Returns
0 on success, otherwise a negative error value.
Return values
BT_ERROR_NONESuccessful
BT_ERROR_NOT_INITIALIZEDNot initialized
BT_ERROR_INVALID_PARAMETERInvalid parameter
BT_ERROR_NOT_SUPPORTEDNot supported
Precondition
The Bluetooth service must be initialized with bt_initialize().
Postcondition
bt_device_authorization_changed_cb() will be invoked.
See also
bt_initialize()
bt_device_authorization_changed_cb()
bt_device_set_authorization_changed_cb()
bt_device_unset_authorization_changed_cb()
int bt_device_set_bond_created_cb ( bt_device_bond_created_cb  callback,
void *  user_data 
)

Registers a callback function to be invoked when the bond creates. 2.3.

Parameters
[in]callbackThe callback function to register
[in]user_dataThe user data to be passed to the callback function
Returns
0 on success, otherwise a negative error value.
Return values
BT_ERROR_NONESuccessful
BT_ERROR_NOT_INITIALIZEDNot initialized
BT_ERROR_INVALID_PARAMETERInvalid parameter
BT_ERROR_NOT_SUPPORTEDNot supported
Precondition
The Bluetooth service must be initialized with bt_initialize().
Postcondition
bt_device_bond_created_cb() will be invoked.
See also
bt_initialize()
bt_device_bond_created_cb()
bt_device_unset_bond_created_cb()
int bt_device_set_bond_destroyed_cb ( bt_device_bond_destroyed_cb  callback,
void *  user_data 
)

Registers a callback function to be invoked when the bond destroys. 2.3.

Parameters
[in]callbackThe callback function to register
[in]user_dataThe user data to be passed to the callback function
Returns
0 on success, otherwise a negative error value.
Return values
BT_ERROR_NONESuccessful
BT_ERROR_NOT_INITIALIZEDNot initialized
BT_ERROR_INVALID_PARAMETERInvalid parameter
BT_ERROR_NOT_SUPPORTEDNot supported
Precondition
The Bluetooth service must be initialized with bt_initialize().
Postcondition
bt_device_bond_destroyed_cb() will be invoked.
See also
bt_initialize()
bt_device_bond_destroyed_cb()
bt_device_unset_bond_destroyed_cb()
int bt_device_set_connection_state_changed_cb ( bt_device_connection_state_changed_cb  callback,
void *  user_data 
)

Registers a callback function to be invoked when the connection state is changed. 2.3.

Parameters
[in]callbackThe callback function to register
[in]user_dataThe user data to be passed to the callback function
Returns
0 on success, otherwise a negative error value.
Return values
BT_ERROR_NONESuccessful
BT_ERROR_NOT_INITIALIZEDNot initialized
BT_ERROR_INVALID_PARAMETERInvalid parameter
BT_ERROR_NOT_SUPPORTEDNot supported
Precondition
The Bluetooth service must be initialized with bt_initialize().
Postcondition
bt_device_connection_state_changed_cb() will be invoked.
See also
bt_initialize()
bt_device_connection_state_changed_cb()
bt_device_unset_connection_state_changed_cb()
int bt_device_set_service_searched_cb ( bt_device_service_searched_cb  callback,
void *  user_data 
)

Registers a callback function to be invoked when the process of service search finishes. 2.3.

Parameters
[in]callbackThe callback function to register
[in]user_dataThe user data to be passed to the callback function
Returns
0 on success, otherwise a negative error value.
Return values
BT_ERROR_NONESuccessful
BT_ERROR_NOT_INITIALIZEDNot initialized
BT_ERROR_INVALID_PARAMETERInvalid parameter
BT_ERROR_NOT_SUPPORTEDNot supported
Precondition
The Bluetooth service must be initialized with bt_initialize().
Postcondition
bt_device_service_searched_cb() will be invoked.
See also
bt_initialize()
bt_device_service_searched_cb()
bt_device_unset_service_searched_cb()
int bt_device_start_service_search ( const char *  remote_address)

Starts the search for services supported by the specified device, asynchronously. 2.3 public http://tizen.org/privilege/bluetooth.

Remarks
If creating a bond succeeds, which means bt_device_bond_created_cb() is called with result BT_ERROR_NONE,
then you don't need to run this function.
The service search takes a couple of seconds to complete normally.
Parameters
[in]remote_addressThe address of the remote Bluetooth device whose services need to be checked
Returns
0 on success, otherwise a negative error value.
Return values
BT_ERROR_NONESuccessful
BT_ERROR_NOT_INITIALIZEDNot initialized
BT_ERROR_INVALID_PARAMETERInvalid parameter
BT_ERROR_NOT_ENABLEDNot enabled
BT_ERROR_REMOTE_DEVICE_NOT_BONDEDRemote device not bonded
BT_ERROR_SERVICE_SEARCH_FAILEDService search failed
BT_ERROR_PERMISSION_DENIEDPermission denied
BT_ERROR_NOT_SUPPORTEDNot supported
Precondition
The state of local Bluetooth must be BT_ADAPTER_ENABLED.
The remote device must be discoverable with bt_adapter_start_device_discovery().
The bond with the remote device must be created with bt_device_create_bond().
Postcondition
This function invokes bt_device_service_searched_cb().
See also
bt_adapter_start_device_discovery()
bt_device_create_bond()
bt_device_bond_created_cb()
bt_device_service_searched_cb()
bt_device_set_service_searched_cb()
bt_device_unset_service_searched_cb()
int bt_device_unset_authorization_changed_cb ( void  )

Unregisters the callback function. 2.3.

Returns
0 on success, otherwise a negative error value.
Return values
BT_ERROR_NONESuccessful
BT_ERROR_NOT_INITIALIZEDNot initialized
BT_ERROR_NOT_SUPPORTEDNot supported
Precondition
The Bluetooth service must be initialized with bt_initialize().
See also
bt_initialize()
bt_device_set_authorization_changed_cb()
int bt_device_unset_bond_created_cb ( void  )

Unregisters the callback function. 2.3.

Returns
0 on success, otherwise a negative error value.
Return values
BT_ERROR_NONESuccessful
BT_ERROR_NOT_INITIALIZEDNot initialized
BT_ERROR_NOT_SUPPORTEDNot supported
Precondition
The Bluetooth service must be initialized with bt_initialize().
See also
bt_initialize()
bt_device_set_bond_created_cb()
int bt_device_unset_bond_destroyed_cb ( void  )

Unregisters the callback function. 2.3.

Returns
0 on success, otherwise a negative error value.
Return values
BT_ERROR_NONESuccessful
BT_ERROR_NOT_INITIALIZEDNot initialized
BT_ERROR_NOT_SUPPORTEDNot supported
Precondition
The Bluetooth service must be initialized with bt_initialize().
See also
bt_initialize()
bt_device_set_bond_destroyed_cb()
int bt_device_unset_connection_state_changed_cb ( void  )

Unregisters the callback function to be invoked when the connection state is changed. 2.3.

Returns
0 on success, otherwise a negative error value.
Return values
BT_ERROR_NONESuccessful
BT_ERROR_NOT_INITIALIZEDNot initialized
BT_ERROR_NOT_SUPPORTEDNot supported
Precondition
The Bluetooth service must be initialized with bt_initialize().
See also
bt_initialize()
bt_device_set_connection_state_changed_cb()
int bt_device_unset_service_searched_cb ( void  )

Unregisters the callback function. 2.3.

Returns
0 on success, otherwise a negative error value.
Return values
BT_ERROR_NONESuccessful
BT_ERROR_NOT_INITIALIZEDNot initialized
BT_ERROR_NOT_SUPPORTEDNot supported
Precondition
The Bluetooth service must be initialized with bt_initialize().
See also
bt_initialize()
bt_device_set_service_searched_cb()
int bt_device_update_le_connection_mode ( const char *  remote_address,
bt_device_le_connection_mode_e  mode 
)

Updates a LE connection mode. 3.0 public http://tizen.org/privilege/bluetooth.

Parameters
[in]remote_addressThe address of the remote Bluetooth device
[in]modeThe LE connection mode
Returns
0 on success, otherwise a negative error value.
Return values
BT_ERROR_NONESuccessful
BT_ERROR_INVALID_PARAMETERInvalid parameter
BT_ERROR_NOT_INITIALIZEDNot initialized
BT_ERROR_NOT_ENABLEDNot enabled
BT_ERROR_OPERATION_FAILEDOperation failed
BT_ERROR_PERMISSION_DENIEDPermission denied
BT_ERROR_NOT_SUPPORTEDNot supported
int bt_gatt_characteristic_add_descriptor ( bt_gatt_h  characteristic,
bt_gatt_h  descriptor 
)

Adds a descriptor to a specified characteristic. 3.0.

Parameters
[in]characteristicThe GATT handle of the characteristic
[in]descriptorThe descriptor's GATT handle to be added
Returns
0 on success, otherwise a negative error value
Return values
BT_ERROR_NONESuccessful
BT_ERROR_INVALID_PARAMETERInvalid parameter
BT_ERROR_NOT_SUPPORTEDNot supported
See also
bt_gatt_characteristic_create()
bt_gatt_descriptor_create()
int bt_gatt_characteristic_create ( const char *  uuid,
int  permissions,
int  properties,
const char *  value,
int  value_length,
bt_gatt_h characteristic 
)

Creates the GATT characteristic. 3.0.

Remarks
The permissions can be one or more values of bt_gatt_permission_e, combined with bitwise 'or'.
The properties can be one or more values of bt_gatt_property_e, combined with bitwise 'or'.
The characteristic should be destroyed by using bt_gatt_characteristic_destroy().
Parameters
[in]uuidThe UUID of the characteristic
[in]permissionsthe permissions of the characteristic
[in]propertiesThe properties of the characteristic
[in]valueThe value(byte stream) of the characteristic
[in]value_lengthThe length of value
[out]characteristicThe GATT handle of the created characteristic
Returns
0 on success, otherwise a negative error value
Return values
BT_ERROR_NONESuccessful
BT_ERROR_INVALID_PARAMETERInvalid parameter
BT_ERROR_OUT_OF_MEMORYOut of memory
BT_ERROR_NOT_SUPPORTEDNot supported
See also
bt_gatt_characteristic_destroy()
int bt_gatt_characteristic_destroy ( bt_gatt_h  gatt_handle)

Destroys the GATT handle of characteristic. 3.0.

Parameters
[in]gatt_handleThe handle of characteristic
Returns
0 on success, otherwise a negative error value
Return values
BT_ERROR_NONESuccessful
BT_ERROR_INVALID_PARAMETERInvalid parameter
BT_ERROR_NOT_SUPPORTEDNot supported
See also
bt_gatt_characteristic_create()
int bt_gatt_characteristic_foreach_descriptors ( bt_gatt_h  characteristic,
bt_gatt_foreach_cb  callback,
void *  user_data 
)

Invokes callback function on each descriptor that belongs to the specified characteristic. 2.3.1.

Parameters
[in]characteristicThe characteristic's GATT handle
[in]callbackThe function to be invoked on each descriptor
[in]user_dataThe user data to be passed to callback function
Returns
0 on success, otherwise a negative error value
Return values
BT_ERROR_NONESuccessful
BT_ERROR_INVALID_PARAMETERInvalid parameter
BT_ERROR_NOT_SUPPORTEDNot supported
See also
bt_gatt_foreach_cb()
int bt_gatt_characteristic_get_descriptor ( bt_gatt_h  characteristic,
const char *  uuid,
bt_gatt_h descriptor 
)

Gets a descriptor's GATT handle which has specific UUID. 2.3.1.

Remarks
The returned GATT handle must not be freed by application.
It will be freed when an associated client is destroyed by bt_gatt_client_destroy().
If there are multiple descriptors which have same UUID, only the first matched one will be returned.
Parameters
[in]characteristicThe characteristic's GATT handle
[in]uuidThe descriptor's GATT handle which has this UUID will be returned if it exists
[out]descriptorThe descriptor's GATT handle which has uuid if it exists
Returns
0 on success, otherwise a negative error value
Return values
BT_ERROR_NONESuccessful
BT_ERROR_INVALID_PARAMETERInvalid parameter
BT_ERROR_NO_DATANo data available
BT_ERROR_NOT_SUPPORTEDNot supported
int bt_gatt_characteristic_get_permissions ( bt_gatt_h  gatt_handle,
int *  permissions 
)

Gets the permissions which a characteristic's GATT handle has. 3.0.

Remarks
The permissions can be one or more values of bt_gatt_permission_e, combined with bitwise 'or'.
Parameters
[in]gatt_handleThe handle of a characteristic
[out]permissionsThe permissions which a characteristic's GATT handle has
Returns
0 on success, otherwise a negative error value
Return values
BT_ERROR_NONESuccessful
BT_ERROR_INVALID_PARAMETERInvalid parameter
BT_ERROR_NOT_SUPPORTEDNot supported
See also
bt_gatt_characteristic_create()
bt_gatt_permission_e
int bt_gatt_characteristic_get_properties ( bt_gatt_h  characteristic,
int *  properties 
)

Gets the properties which a characteristic's GATT handle has. 2.3.1.

Parameters
[in]characteristicThe characteristic's GATT handle
[out]propertiesThe properties which a characteristic's GATT handle has
Returns
0 on success, otherwise a negative error value
Return values
BT_ERROR_NONESuccessful
BT_ERROR_INVALID_PARAMETERInvalid parameter
BT_ERROR_NOT_SUPPORTEDNot supported
See also
bt_gatt_property_e
int bt_gatt_characteristic_get_service ( bt_gatt_h  characteristic,
bt_gatt_h service 
)

Gets the service's GATT handle which the specified characteristic belongs to. 2.3.1.

Remarks
The returned GATT handle must not be freed by application.
It will be freed when an associated client is destroyed by bt_gatt_client_destroy().
Parameters
[in]characteristicThe characteristic's GATT handle
[out]serviceThe service's GATT handle which characteristic belongs to
Returns
0 on success, otherwise a negative error value
Return values
BT_ERROR_NONESuccessful
BT_ERROR_INVALID_PARAMETERInvalid parameter
BT_ERROR_NOT_SUPPORTEDNot supported
int bt_gatt_characteristic_get_write_type ( bt_gatt_h  characteristic,
bt_gatt_write_type_e write_type 
)

Gets the write type of the specified characteristic. 2.3.1.

Parameters
[in]characteristicThe characteristic's GATT handle
[out]write_typeThe write type of the specified characteristic
Returns
0 on success, otherwise a negative error value
Return values
BT_ERROR_NONESuccessful
BT_ERROR_INVALID_PARAMETERInvalid parameter
BT_ERROR_NOT_SUPPORTEDNot supported
See also
bt_gatt_write_type_e
int bt_gatt_characteristic_set_write_type ( bt_gatt_h  characteristic,
bt_gatt_write_type_e  write_type 
)

Updates the write type of the specified characteristic. 2.3.1.

Parameters
[in]characteristicThe characteristic's GATT handle
[in]write_typeThe write type to be updated
Returns
0 on success, otherwise a negative error value
Return values
BT_ERROR_NONESuccessful
BT_ERROR_INVALID_PARAMETERInvalid parameter
BT_ERROR_NOT_SUPPORTEDNot supported
See also
bt_gatt_client_write_value()
bt_gatt_write_type_e
int bt_gatt_client_create ( const char *  remote_address,
bt_gatt_client_h client 
)

Creates the GATT client handle. 2.3.1.

Remarks
The GATT client handle must be freed by bt_gatt_client_destroy() after use.
Parameters
[in]remote_addressThe address of the remote device
[out]clientThe created GATT client's handle
Returns
0 on success, otherwise a negative error value
Return values
BT_ERROR_NONESuccessful
BT_ERROR_INVALID_PARAMETERInvalid parameter
BT_ERROR_OUT_OF_MEMORYOut of memory
BT_ERROR_ALREADY_DONEOperation is already done
BT_ERROR_NOT_SUPPORTEDNot supported
See also
bt_gatt_client_destroy()
int bt_gatt_client_destroy ( bt_gatt_client_h  client)

Destroys the GATT client's handle. 2.3.1.

Remarks
All related service, characteristic and descriptor's GATT handles are freed also.
Parameters
[in]clientThe GATT client's handle
Returns
0 on success, otherwise a negative error value
Return values
BT_ERROR_NONESuccessful
BT_ERROR_INVALID_PARAMETERInvalid parameter
BT_ERROR_NOT_SUPPORTEDNot supported
See also
bt_gatt_client_create()
int bt_gatt_client_foreach_services ( bt_gatt_client_h  client,
bt_gatt_foreach_cb  callback,
void *  user_data 
)

Invokes callback function on each service that belongs to the specified GATT client. 2.3.1.

Parameters
[in]clientThe GATT client's handle
[in]callbackThe function to be invoked on each service
[in]user_dataThe user data to be passed to callback function
Returns
0 on success, otherwise a negative error value
Return values
BT_ERROR_NONESuccessful
BT_ERROR_INVALID_PARAMETERInvalid parameter
BT_ERROR_NOT_SUPPORTEDNot supported
See also
bt_gatt_foreach_cb()
int bt_gatt_client_get_att_mtu ( bt_gatt_client_h  client,
unsigned int *  mtu 
)

Gets the ATT MTU value set for a connection. 4.0.

Parameters
[in]clientThe created GATT client's handle
[out]mtuThe MTU value set for a connection
Returns
0 on success, otherwise a negative error value.
Return values
BT_ERROR_NONESuccessful
BT_ERROR_INVALID_PARAMETERInvalid parameter
BT_ERROR_NOT_INITIALIZEDNot initialized
BT_ERROR_NOT_ENABLEDNot enabled
BT_ERROR_OPERATION_FAILEDOperation failed
BT_ERROR_NOT_SUPPORTEDNot supported
int bt_gatt_client_get_remote_address ( bt_gatt_client_h  client,
char **  remote_address 
)

Gets the address of remote device. 2.3.1.

Parameters
[in]clientThe created GATT client's handle
[out]remote_addressThe address of the remote device which is associated with client
Returns
0 on success, otherwise a negative error value
Return values
BT_ERROR_NONESuccessful
BT_ERROR_INVALID_PARAMETERInvalid parameter
BT_ERROR_NOT_SUPPORTEDNot supported
See also
bt_gatt_client_create()
int bt_gatt_client_get_service ( bt_gatt_client_h  client,
const char *  uuid,
bt_gatt_h service 
)

Gets a service's GATT handle which has specific UUID. 2.3.1.

Remarks
The returned GATT handle must not be freed by application.
It will be freed when an associated client is destroyed by bt_gatt_client_destroy().
If there are multiple services which have same UUID, only the first matched one will be returned.
Parameters
[in]clientThe GATT client's handle
[in]uuidThe service's GATT handle which has this UUID will be returned if it exists
[out]serviceThe service's GATT handle which has uuid if it exists
Returns
0 on success, otherwise a negative error value
Return values
BT_ERROR_NONESuccessful
BT_ERROR_INVALID_PARAMETERInvalid parameter
BT_ERROR_NO_DATANo data available
BT_ERROR_NOT_SUPPORTEDNot supported
int bt_gatt_client_read_value ( bt_gatt_h  gatt_handle,
bt_gatt_client_request_completed_cb  callback,
void *  user_data 
)

Reads the value of a characteristic or descriptor from the remote device asynchronously. 2.3.1 public http://tizen.org/privilege/bluetooth.

Parameters
[in]gatt_handleThe GATT handle of a characteristic or descriptor
[in]callbackWhen a read request is completed, this callback function will be called
[in]user_dataThe user data to be passed to callback function
Returns
0 on success, otherwise a negative error value
Return values
BT_ERROR_NONESuccessful
BT_ERROR_NOT_INITIALIZEDNot initialized
BT_ERROR_INVALID_PARAMETERInvalid parameter
BT_ERROR_NOT_ENABLEDNot enabled
BT_ERROR_OPERATION_FAILEDOperation failed
BT_ERROR_NOW_IN_PROGRESSOperation now in progress
BT_ERROR_PERMISSION_DENIEDPermission denied
BT_ERROR_NOT_SUPPORTEDNot supported
See also
bt_gatt_client_create()
bt_gatt_client_request_completed_cb()
int bt_gatt_client_request_att_mtu_change ( bt_gatt_client_h  client,
unsigned int  mtu 
)

Requests a change of the ATT MTU value. 4.0 public http://tizen.org/privilege/bluetooth.

Parameters
[in]clientThe created GATT client's handle
[in]mtuThe new MTU value
Returns
0 on success, otherwise a negative error value.
Return values
BT_ERROR_NONESuccessful
BT_ERROR_INVALID_PARAMETERInvalid parameter
BT_ERROR_NOT_INITIALIZEDNot initialized
BT_ERROR_NOT_ENABLEDNot enabled
BT_ERROR_OPERATION_FAILEDOperation failed
BT_ERROR_PERMISSION_DENIEDPermission denied
BT_ERROR_NOT_SUPPORTEDNot supported
See also
bt_gatt_client_set_att_mtu_changed_cb()
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 
)

Registers a callback function to be invoked when the ATT MTU is changed. 4.0.

Parameters
[in]clientThe created GATT client's handle
[in]callbackThe callback function to register
[in]user_dataThe user data to be passed to the callback function
Returns
0 on success, otherwise a negative error value.
Return values
BT_ERROR_NONESuccessful
BT_ERROR_NOT_INITIALIZEDNot initialized
BT_ERROR_INVALID_PARAMETERInvalid parameter
BT_ERROR_NOT_SUPPORTEDNot supported
Precondition
The Bluetooth service must be initialized with bt_initialize().
Postcondition
bt_device_connection_state_changed_cb() will be invoked.
See also
bt_initialize()
bt_gatt_client_request_att_mtu_change()
bt_gatt_client_unset_att_mtu_changed_cb()
int bt_gatt_client_set_characteristic_value_changed_cb ( bt_gatt_h  characteristic,
bt_gatt_client_characteristic_value_changed_cb  callback,
void *  user_data 
)

Registers a callback function to be invoked when the characteristic value is changed on the remote device. 2.3.1.

Parameters
[in]characteristicThe characteristic's GATT handle
[in]callbackThe callback to be invoked when the value is changed and it is informed
[in]user_dataThe user data to be passed to callback function
Returns
0 on success, otherwise a negative error value
Return values
BT_ERROR_NONESuccessful
BT_ERROR_NOT_INITIALIZEDNot initialized
BT_ERROR_INVALID_PARAMETERInvalid parameter
BT_ERROR_NOT_SUPPORTEDNot supported
See also
bt_gatt_client_characteristic_value_changed_cb()
bt_gatt_client_unset_characteristic_value_change()
int bt_gatt_client_set_service_changed_cb ( bt_gatt_client_h  client,
bt_gatt_client_service_changed_cb  callback,
void *  user_data 
)

Registers a callback function to be invoked when service is changed from a remote device(GATT server). 3.0.

Parameters
[in]clientThe GATT client's handle
[in]callbackThe callback to be invoked
[in]user_dataThe user data to be passed to callback function
Returns
0 on success, otherwise a negative error value
Return values
BT_ERROR_NONESuccessful
BT_ERROR_INVALID_PARAMETERInvalid parameter
BT_ERROR_NOT_SUPPORTEDNot supported
See also
bt_gatt_client_unset_service_changed_cb()
int bt_gatt_client_unset_att_mtu_changed_cb ( bt_gatt_client_h  client)

Unregisters the callback function to be invoked when the ATT MTU is changed. 4.0.

Parameters
[in]clientThe created GATT client's handle
Returns
0 on success, otherwise a negative error value.
Return values
BT_ERROR_NONESuccessful
BT_ERROR_NOT_INITIALIZEDNot initialized
BT_ERROR_INVALID_PARAMETERInvalid parameter
BT_ERROR_NOT_SUPPORTEDNot supported
Precondition
The Bluetooth service must be initialized with bt_initialize().
See also
bt_initialize()
bt_gatt_client_request_att_mtu_change()
bt_gatt_client_set_att_mtu_changed_cb()
int bt_gatt_client_unset_characteristic_value_changed_cb ( bt_gatt_h  characteristic)

Unregisters a callback function to be invoked when the characteristic value is changed on the remote device. 2.3.1.

Parameters
[in]characteristicThe characteristic's GATT handle, whose value change will not be informed
Returns
0 on success, otherwise a negative error value
Return values
BT_ERROR_NONESuccessful
BT_ERROR_NOT_INITIALIZEDNot initialized
BT_ERROR_INVALID_PARAMETERInvalid parameter
BT_ERROR_NOT_SUPPORTEDNot supported
See also
bt_gatt_client_set_characteristic_value_changed_cb()
int bt_gatt_client_unset_service_changed_cb ( bt_gatt_client_h  client)

Unregisters a callback function. 3.0.

Parameters
[in]clientThe GATT client's handle
Returns
0 on success, otherwise a negative error value
Return values
BT_ERROR_NONESuccessful
BT_ERROR_INVALID_PARAMETERInvalid parameter
BT_ERROR_NOT_SUPPORTEDNot supported
See also
bt_gatt_client_set_service_changed_cb()
int bt_gatt_client_write_value ( bt_gatt_h  gatt_handle,
bt_gatt_client_request_completed_cb  callback,
void *  user_data 
)

Writes the value of a characteristic or descriptor to the remote device asynchronously. 2.3.1 public http://tizen.org/privilege/bluetooth.

Parameters
[in]gatt_handleThe GATT handle of a characteristic or descriptor
[in]callbackWhen a write request is completed, this callback function will be called
[in]user_dataThe user data to be passed to callback function
Returns
0 on success, otherwise a negative error value
Return values
BT_ERROR_NONESuccessful
BT_ERROR_NOT_INITIALIZEDNot initialized
BT_ERROR_INVALID_PARAMETERInvalid parameter
BT_ERROR_NOT_ENABLEDNot enabled
BT_ERROR_OPERATION_FAILEDOperation failed
BT_ERROR_NOW_IN_PROGRESSOperation now in progress
BT_ERROR_PERMISSION_DENIEDPermission denied
BT_ERROR_NOT_SUPPORTEDNot supported
See also
bt_gatt_client_create()
bt_gatt_characteristic_set_write_type()
bt_gatt_set_value()
bt_gatt_set_int_value()
bt_gatt_set_float_value()
bt_gatt_client_request_completed_cb()
int bt_gatt_connect ( const char *  address,
bool  auto_connect 
)

Connects to a specific LE based service on a remote bluetooth device address, asynchronously. 2.3 public http://tizen.org/privilege/bluetooth.

Remarks
A connection can be disconnected by bt_gatt_disconnect().
Parameters
[in]addressThe address of the remote Bluetooth device.
[in]auto_connectThe flag of the auto connection.
Returns
0 on success, otherwise a negative error value.
Return values
BT_ERROR_NONESuccessful
BT_ERROR_NOT_INITIALIZEDNot initialized
BT_ERROR_NOT_ENABLEDNot enabled
BT_ERROR_INVALID_PARAMETERInvalid parameter
BT_ERROR_OPERATION_FAILEDOperation failed
BT_ERROR_PERMISSION_DENIEDPermission denied
BT_ERROR_NOT_SUPPORTEDNot supported
Precondition
The Bluetooth service must be initialized with bt_initialize().
The remote device must support le connection.
Postcondition
This function invokes bt_gatt_connection_state_changed_cb().
See also
bt_initialize()
bt_gatt_disconnect()
bt_gatt_set_connection_state_changed_cb()
bt_gatt_unset_connection_state_changed_cb()
bt_gatt_connection_state_changed_cb()
int bt_gatt_descriptor_create ( const char *  uuid,
int  permissions,
const char *  value,
int  value_length,
bt_gatt_h descriptor 
)

Creates the GATT characteristic descriptor. 3.0.

Remarks
The permissions can be one or more values of bt_gatt_permission_e, combined with bitwise 'or'.
The descriptor should be destroyed by using bt_gatt_descriptor_destroy().
Parameters
[in]uuidThe UUID of the descriptor
[in]permissionsThe permissions of the descriptor
[in]valueThe value(byte stream) associated with the descriptor
[in]value_lengthThe length of value
[out]descriptorThe GATT handle of the created characteristic descriptor
Returns
0 on success, otherwise a negative error value
Return values
BT_ERROR_NONESuccessful
BT_ERROR_INVALID_PARAMETERInvalid parameter
BT_ERROR_OUT_OF_MEMORYOut of memory
BT_ERROR_NOT_SUPPORTEDNot supported
See also
bt_gatt_descriptor_destroy()
int bt_gatt_descriptor_destroy ( bt_gatt_h  gatt_handle)

Destroys the GATT handle of descriptor. 3.0.

Parameters
[in]gatt_handleThe handle of descriptor
Returns
0 on success, otherwise a negative error value
Return values
BT_ERROR_NONESuccessful
BT_ERROR_INVALID_PARAMETERInvalid parameter
BT_ERROR_NOT_SUPPORTEDNot supported
See also
bt_gatt_descriptor_create()
int bt_gatt_descriptor_get_characteristic ( bt_gatt_h  descriptor,
bt_gatt_h characteristic 
)

Gets the characteristic's GATT handle which the specified descriptor belongs to. 2.3.1.

Remarks
The returned GATT handle must not be freed by application.
It will be freed when an associated client is destroyed by bt_gatt_client_destroy().
Parameters
[in]descriptorThe descriptor's GATT handle
[out]characteristicThe characteristic's GATT handle which descriptor belongs to
Returns
0 on success, otherwise a negative error value
Return values
BT_ERROR_NONESuccessful
BT_ERROR_INVALID_PARAMETERInvalid parameter
BT_ERROR_NOT_SUPPORTEDNot supported
int bt_gatt_descriptor_get_permissions ( bt_gatt_h  gatt_handle,
int *  permissions 
)

Gets the permissions which a descriptor's GATT handle has. 3.0.

Remarks
The permissions can be one or more values of bt_gatt_permission_e, combined with bitwise 'or'.
Parameters
[in]gatt_handleThe handle of a descriptor
[out]permissionsThe permissions which a descriptor's GATT handle has
Returns
0 on success, otherwise a negative error value
Return values
BT_ERROR_NONESuccessful
BT_ERROR_INVALID_PARAMETERInvalid parameter
BT_ERROR_NOT_SUPPORTEDNot supported
See also
bt_gatt_descriptor_create()
bt_gatt_permission_e
int bt_gatt_disconnect ( const char *  address)

Disconnects to LE connection with the given remote Bluetooth device address, asynchronously. 2.3 public http://tizen.org/privilege/bluetooth.

Parameters
[in]addressThe address of the remote Bluetooth device
Returns
0 on success, otherwise a negative error value.
Return values
BT_ERROR_NONESuccessful
BT_ERROR_NOT_INITIALIZEDNot initialized
BT_ERROR_NOT_ENABLEDNot enabled
BT_ERROR_INVALID_PARAMETERInvalid parameter
BT_ERROR_OPERATION_FAILEDOperation failed
BT_ERROR_PERMISSION_DENIEDPermission denied
BT_ERROR_NOT_SUPPORTEDNot supported
Precondition
The connection must be established.
Postcondition
This function invokes bt_gatt_connection_state_changed_cb().
See also
bt_initialize()
bt_gatt_connect()
bt_gatt_set_connection_state_changed_cb()
bt_gatt_unset_connection_state_changed_cb()
bt_gatt_connection_state_changed_cb()
int bt_gatt_get_float_value ( bt_gatt_h  gatt_handle,
bt_data_type_float_e  type,
int  offset,
float *  value 
)

Gets the value of a characteristic or descriptor's GATT handle as a float type. 2.3.1.

Remarks
This function returns a locally saved value in gatt_handle.
When gatt_handle is associated with bt_gatt_client_h, bt_gatt_client_read_value() must be used prior to this function
in order to get the remote device's current value.
Parameters
[in]gatt_handleThe handle of a characteristic or descriptor
[in]typeThe type of a saved value in gatt_handle
[in]offsetThe offset from where a value will be read from gatt_handle as an integer type
[out]valueThe float type's value of gatt_handle
Returns
0 on success, otherwise a negative error value
Return values
BT_ERROR_NONESuccessful
BT_ERROR_INVALID_PARAMETERInvalid parameter
BT_ERROR_NOT_SUPPORTEDNot supported
int bt_gatt_get_int_value ( bt_gatt_h  gatt_handle,
bt_data_type_int_e  type,
int  offset,
int *  value 
)

Gets the value of a characteristic or descriptor's GATT handle as an integer type. 2.3.1.

Remarks
This function returns a locally saved value in gatt_handle.
When gatt_handle is associated with bt_gatt_client_h, bt_gatt_client_read_value() must be used prior to this function
in order to get the remote device's current value.
Parameters
[in]gatt_handleThe handle of a characteristic or descriptor
[in]typeThe type of a saved value in gatt_handle
[in]offsetThe offset from where a value will be read from gatt_handle as an integer type
[out]valueThe integer type's value of gatt_handle
Returns
0 on success, otherwise a negative error value
Return values
BT_ERROR_NONESuccessful
BT_ERROR_INVALID_PARAMETERInvalid parameter
BT_ERROR_NOT_SUPPORTEDNot supported
int bt_gatt_get_type ( bt_gatt_h  gatt_handle,
bt_gatt_type_e gatt_type 
)

Gets the type of GATT handle. 2.3.1.

Parameters
[in]gatt_handleThe GATT handle
[out]gatt_typeThe type of gatt_handle
Returns
0 on success, otherwise a negative error value
Return values
BT_ERROR_NONESuccessful
BT_ERROR_INVALID_PARAMETERInvalid parameter
BT_ERROR_NOT_SUPPORTEDNot supported
int bt_gatt_get_uuid ( bt_gatt_h  gatt_handle,
char **  uuid 
)

Gets the UUID of a service, characteristic or descriptor's GATT handle. 2.3.1.

Remarks
uuid must be released using free().
16-bit UUID or 128-bit UUID is supported. (e.g. 2A19, 00002A19-0000-1000-8000-00805F9B34FB).
Parameters
[in]gatt_handleThe handle of a service, characteristic or descriptor
[out]uuidThe string of the UUID of gatt_handle
Returns
0 on success, otherwise a negative error value
Return values
BT_ERROR_NONESuccessful
BT_ERROR_INVALID_PARAMETERInvalid parameter
BT_ERROR_NOT_SUPPORTEDNot supported
int bt_gatt_get_value ( bt_gatt_h  gatt_handle,
char **  value,
int *  value_length 
)

Gets the value of a characteristic or descriptor's GATT handle. 2.3.1.

Remarks
value must be released using free().
When gatt_handle is associated with bt_gatt_client_h, bt_gatt_client_read_value() must be used prior to this function
in order to get the remote device's current value.
Parameters
[in]gatt_handleThe handle of a characteristic or descriptor
[out]valueThe value of gatt_handle. It is a byte stream type.
[out]value_lengthThe length of value
Returns
0 on success, otherwise a negative error value
Return values
BT_ERROR_NONESuccessful
BT_ERROR_INVALID_PARAMETERInvalid parameter
BT_ERROR_NOT_SUPPORTEDNot supported
int bt_gatt_server_create ( bt_gatt_server_h server)

Creates the GATT server's handle. 3.0.

Remarks
The server handle should be destroyed by using bt_gatt_server_destroy().
Parameters
[out]serverThe GATT server's handle
Returns
0 on success, otherwise a negative error value
Return values
BT_ERROR_NONESuccessful
BT_ERROR_INVALID_PARAMETERInvalid parameter
BT_ERROR_OUT_OF_MEMORYOut of memory
BT_ERROR_NOT_SUPPORTEDNot supported
See also
bt_gatt_server_destroy()
int bt_gatt_server_deinitialize ( void  )

DeInitializes the GATT server. 3.0.

Returns
0 on success, otherwise a negative error value.
Return values
BT_ERROR_NONESuccessful
BT_ERROR_NOT_INITIALIZEDNot initialized
BT_ERROR_OPERATION_FAILEDOperation failed
BT_ERROR_NOT_SUPPORTEDNot supported
Precondition
The state of local Bluetooth must be BT_ADAPTER_ENABLED.
See also
bt_gatt_server_initialize()
int bt_gatt_server_destroy ( bt_gatt_server_h  server)

Destroys the GATT server's handle. 3.0.

Remarks
All registered services to GATT server are unregistered.
Parameters
[in]serverThe GATT server's handle
Returns
0 on success, otherwise a negative error value
Return values
BT_ERROR_NONESuccessful
BT_ERROR_INVALID_PARAMETERInvalid parameter
BT_ERROR_NOT_SUPPORTEDNot supported
See also
bt_gatt_server_create()
int bt_gatt_server_foreach_services ( bt_gatt_server_h  server,
bt_gatt_foreach_cb  callback,
void *  user_data 
)

Invokes callback function on each service that belongs to the specified GATT server. 3.0.

Parameters
[in]serverThe GATT server's handle
[in]callbackThe function to be invoked on each service
[in]user_dataThe user data to be passed to callback function
Returns
0 on success, otherwise a negative error value
Return values
BT_ERROR_NONESuccessful
BT_ERROR_INVALID_PARAMETERInvalid parameter
BT_ERROR_NOT_SUPPORTEDNot supported
See also
bt_gatt_foreach_cb()
int bt_gatt_server_get_service ( bt_gatt_server_h  server,
const char *  uuid,
bt_gatt_h service 
)

Gets a service's GATT handle which has specific UUID. 3.0.

Remarks
The returned GATT handle must not be freed by application.
It will be freed when an associated server is destroyed by bt_gatt_server_destroy().
If there are multiple services which have same UUID, only the first matched one will be returned.
Parameters
[in]serverThe GATT server's handle
[in]uuidThe service's GATT handle which has this UUID will be returned if it exists
[out]serviceThe service's GATT handle which has uuid if it exists
Returns
0 on success, otherwise a negative error value
Return values
BT_ERROR_NONESuccessful
BT_ERROR_INVALID_PARAMETERInvalid parameter
BT_ERROR_NO_DATANo data available
BT_ERROR_NOT_SUPPORTEDNot supported
int bt_gatt_server_initialize ( void  )

Initializes the GATT Server. 3.0.

Returns
0 on success, otherwise a negative error value.
Return values
BT_ERROR_NONESuccessful
BT_ERROR_NOT_INITIALIZEDNot initialized
BT_ERROR_OPERATION_FAILEDOperation failed
BT_ERROR_NOT_SUPPORTEDNot supported
Precondition
The state of local Bluetooth must be BT_ADAPTER_ENABLED.
See also
bt_gatt_server_deinitialize()
int bt_gatt_server_notify_characteristic_changed_value ( bt_gatt_h  characteristic,
bt_gatt_server_notification_sent_cb  callback,
const char *  device_address,
void *  user_data 
)

Notifies value change of the characteristic to the remote devices which enable a Client Characteristic Configuration Descriptor. 3.0.

Parameters
[in]characteristicThe characteristic which has a changed value
[in]callbackThe function to be invoked on each remote device when a sending operation is done
[in]device_addressRemote device address to send notify or indicate and if set to NULL then notify/indicate all is enabled.
[in]user_dataThe user data to be passed to callback function
Returns
0 on success, otherwise a negative error value
Return values
BT_ERROR_NONESuccessful
BT_ERROR_INVALID_PARAMETERInvalid parameter
BT_ERROR_NOT_SUPPORTEDNot supported
See also
bt_gatt_server_notification_sent_cb()
int bt_gatt_server_register_service ( bt_gatt_server_h  server,
bt_gatt_h  service 
)

Registers a specified service to the specified GATT server that the local device is hosting. 3.0 public http://tizen.org/privilege/bluetooth.

Parameters
[in]serverThe GATT server that local device is hosting
[in]serviceThe service, which needs to be registered in server
Returns
0 on success, otherwise a negative error value
Return values
BT_ERROR_NONESuccessful
BT_ERROR_INVALID_PARAMETERInvalid parameter
BT_ERROR_OPERATION_FAILEDOperation failed
BT_ERROR_ALREADY_DONEOperation is already done
BT_ERROR_PERMISSION_DENIEDPermission denied
BT_ERROR_NOT_SUPPORTEDNot supported
See also
bt_gatt_server_create()
bt_gatt_service_create()
bt_gatt_server_start()
bt_gatt_server_unregister_service()
int bt_gatt_server_send_response ( int  request_id,
bt_gatt_att_request_type_e  request_type,
int  offset,
int  resp_status,
char *  value,
int  value_length 
)

Sends a response to the remote device as a result of a read/write request. 3.0 public http://tizen.org/privilege/bluetooth.

Remarks
Until this function is called, a read/write request is not finished.
Parameters
[in]request_idThe identification of a read/write request
[in]request_typeThe request type for read/write
[in]offsetThe offset from where a value is read
[in]resp_statusThe application error if any occurred or BT_ERROR_NONE for successful.
[in]valueThe value to be sent. It will be sent from offset. If it is NULL, a requested GATT handle's value will be sent from offset.
[in]value_lengthValue Length
Returns
0 on success, otherwise a negative error value
Return values
BT_ERROR_NONESuccessful
BT_ERROR_INVALID_PARAMETERInvalid parameter
BT_ERROR_PERMISSION_DENIEDPermission denied
BT_ERROR_NOT_SUPPORTEDNot supported
See also
bt_gatt_server_read_value_requested_cb()
int bt_gatt_server_set_characteristic_notification_state_change_cb ( bt_gatt_h  gatt_handle,
bt_gatt_server_characteristic_notification_state_changed_cb  callback,
void *  user_data 
)

Registers a callback function to be invoked when the remote device enables or disables the Notification/Indication for particular characteristics. 3.0.

Parameters
[in]gatt_handleThe GATT handle of a characteristic
[in]callbackThe callback to be invoked
[in]user_dataThe user data to be passed to callback function
Returns
0 on success, otherwise a negative error value
Return values
BT_ERROR_NONESuccessful
BT_ERROR_INVALID_PARAMETERInvalid parameter
BT_ERROR_NOT_SUPPORTEDNot supported
See also
bt_gatt_server_characteristic_notification_state_changed_cb()
int bt_gatt_server_set_read_value_requested_cb ( bt_gatt_h  gatt_handle,
bt_gatt_server_read_value_requested_cb  callback,
void *  user_data 
)

Registers a callback function to be invoked when a read request for a specified characteristic or descriptor is issued from a remote device(GATT client). 3.0.

Parameters
[in]gatt_handleThe GATT handle of a characteristic or descriptor
[in]callbackThe callback to be invoked
[in]user_dataThe user data to be passed to callback function
Returns
0 on success, otherwise a negative error value
Return values
BT_ERROR_NONESuccessful
BT_ERROR_INVALID_PARAMETERInvalid parameter
BT_ERROR_NOT_SUPPORTEDNot supported
See also
bt_gatt_server_read_value_requested_cb()
bt_gatt_server_send_response()
int bt_gatt_server_set_write_value_requested_cb ( bt_gatt_h  gatt_handle,
bt_gatt_server_write_value_requested_cb  callback,
void *  user_data 
)

Registers a callback function to be invoked when a value of a characteristic or descriptor has been changed by a remote device(GATT client)'s request. 3.0.

Parameters
[in]gatt_handleThe GATT handle of a characteristic or descriptor
[in]callbackThe callback to be invoked
[in]user_dataThe user data to be passed to callback function
Returns
0 on success, otherwise a negative error value
Return values
BT_ERROR_NONESuccessful
BT_ERROR_INVALID_PARAMETERInvalid parameter
BT_ERROR_NOT_SUPPORTEDNot supported
See also
bt_gatt_server_write_value_requested_cb()
int bt_gatt_server_start ( void  )

Registers the application along with the GATT services of the application it is hosting. 3.0 public http://tizen.org/privilege/bluetooth.

Returns
0 on success, otherwise a negative error value
Return values
BT_ERROR_NONESuccessful
BT_ERROR_OPERATION_FAILEDOperation failed
BT_ERROR_ALREADY_DONEOperation is already done
BT_ERROR_PERMISSION_DENIEDPermission denied
BT_ERROR_NOT_SUPPORTEDNot supported
See also
bt_gatt_server_initialize()
bt_gatt_server_create()
bt_gatt_service_create()
bt_gatt_server_unregister_service()
int bt_gatt_server_unregister_all_services ( bt_gatt_server_h  server)

Unregisters all services from the specified GATT server that the local device is hosting. 3.0 public http://tizen.org/privilege/bluetooth.

Parameters
[in]serverThe GATT server that local device is hosting
Returns
0 on success, otherwise a negative error value
Return values
BT_ERROR_NONESuccessful
BT_ERROR_INVALID_PARAMETERInvalid parameter
BT_ERROR_PERMISSION_DENIEDPermission denied
BT_ERROR_NOT_SUPPORTEDNot supported
See also
bt_gatt_server_register_service()
int bt_gatt_server_unregister_service ( bt_gatt_server_h  server,
bt_gatt_h  service 
)

Unregisters a specified service from the specified GATT server that the local device is hosting. 3.0 public http://tizen.org/privilege/bluetooth.

Parameters
[in]serverThe GATT server that local device is hosting
[in]serviceThe service, which needs to be unregistered from server
Returns
0 on success, otherwise a negative error value
Return values
BT_ERROR_NONESuccessful
BT_ERROR_INVALID_PARAMETERInvalid parameter
BT_ERROR_SERVICE_NOT_FOUNDService not found
BT_ERROR_PERMISSION_DENIEDPermission denied
BT_ERROR_NOT_SUPPORTEDNot supported
See also
bt_gatt_server_register_service()
int bt_gatt_service_add_characteristic ( bt_gatt_h  service,
bt_gatt_h  characteristic 
)

Adds a characteristic to a specified service. 3.0.

Parameters
[in]serviceThe service's GATT handle
[in]characteristicThe characteristic's GATT handle to be added
Returns
0 on success, otherwise a negative error value
Return values
BT_ERROR_NONESuccessful
BT_ERROR_INVALID_PARAMETERInvalid parameter
BT_ERROR_NOT_SUPPORTEDNot supported
See also
bt_gatt_service_create()
bt_gatt_characteristic_create()
int bt_gatt_service_add_included_service ( bt_gatt_h  service,
bt_gatt_h  included_service 
)

Adds a service to a specified service as included service. 3.0.

Parameters
[in]serviceThe service's GATT handle
[in]included_serviceThe service's GATT handle to be added as included service
Returns
0 on success, otherwise a negative error value
Return values
BT_ERROR_NONESuccessful
BT_ERROR_INVALID_PARAMETERInvalid parameter
BT_ERROR_NOT_SUPPORTEDNot supported
See also
bt_gatt_service_create()
int bt_gatt_service_create ( const char *  uuid,
bt_gatt_service_type_e  type,
bt_gatt_h service 
)

Creates the GATT service. 3.0.

Remarks
The service should be destroyed by using bt_gatt_service_destroy().
Parameters
[in]uuidThe UUID of the service
[in]typeThe type of the service
[out]serviceThe GATT handle of the created service
Returns
0 on success, otherwise a negative error value
Return values
BT_ERROR_NONESuccessful
BT_ERROR_INVALID_PARAMETERInvalid parameter
BT_ERROR_OUT_OF_MEMORYOut of memory
BT_ERROR_NOT_SUPPORTEDNot supported
See also
bt_gatt_service_destroy()
int bt_gatt_service_destroy ( bt_gatt_h  gatt_handle)

Destroys the GATT handle of service. 3.0.

Parameters
[in]gatt_handleThe handle of service
Returns
0 on success, otherwise a negative error value
Return values
BT_ERROR_NONESuccessful
BT_ERROR_INVALID_PARAMETERInvalid parameter
BT_ERROR_NOT_SUPPORTEDNot supported
See also
bt_gatt_service_create()
int bt_gatt_service_foreach_characteristics ( bt_gatt_h  service,
bt_gatt_foreach_cb  callback,
void *  user_data 
)

Invokes callback function on each characteristic that belongs to the specified service. 2.3.1.

Parameters
[in]serviceThe service's GATT handle
[in]callbackThe function to be invoked on each characteristic
[in]user_dataThe user data to be passed to callback function
Returns
0 on success, otherwise a negative error value
Return values
BT_ERROR_NONESuccessful
BT_ERROR_INVALID_PARAMETERInvalid parameter
BT_ERROR_NOT_SUPPORTEDNot supported
See also
bt_gatt_foreach_cb()
int bt_gatt_service_foreach_included_services ( bt_gatt_h  service,
bt_gatt_foreach_cb  callback,
void *  user_data 
)

Invokes callback function on each included service that belongs to the specified service. 2.3.1.

Parameters
[in]serviceThe service's GATT handle
[in]callbackThe function to be invoked on each included service
[in]user_dataThe user data to be passed to the callback function
Returns
0 on success, otherwise a negative error value
Return values
BT_ERROR_NONESuccessful
BT_ERROR_INVALID_PARAMETERInvalid parameter
BT_ERROR_NOT_SUPPORTEDNot supported
See also
bt_gatt_foreach_cb()
int bt_gatt_service_get_characteristic ( bt_gatt_h  service,
const char *  uuid,
bt_gatt_h characteristic 
)

Gets a characteristic's GATT handle which has specific UUID. 2.3.1.

Remarks
The returned GATT handle must not be freed by application.
It will be freed when an associated client is destroyed by bt_gatt_client_destroy().
If there are multiple characteristics which have same UUID, only the first matched one will be returned.
Parameters
[in]serviceThe service's GATT handle
[in]uuidThe characteristic's GATT handle which has this UUID will be returned if it exists
[out]characteristicThe characteristic's GATT handle which has uuid if it exists
Returns
0 on success, otherwise a negative error value
Return values
BT_ERROR_NONESuccessful
BT_ERROR_INVALID_PARAMETERInvalid parameter
BT_ERROR_NO_DATANo data available
BT_ERROR_NOT_SUPPORTEDNot supported
int bt_gatt_service_get_client ( bt_gatt_h  service,
bt_gatt_client_h client 
)

Gets the GATT client handle which the specified service belongs to. 2.3.1.

Remarks
This function doesn't allocate new memory for GATT client handle.
The returned GATT client handle is the same one which was got from bt_gatt_client_create().
So if it is destroyed by bt_gatt_client_destroy(), all related GATT handles are freed also.
Parameters
[in]serviceThe service's GATT handle
[out]clientThe GATT client handle which service belongs to
Returns
0 on success, otherwise a negative error value
Return values
BT_ERROR_NONESuccessful
BT_ERROR_INVALID_PARAMETERInvalid parameter
BT_ERROR_NOT_SUPPORTEDNot supported
See also
bt_gatt_client_create()
int bt_gatt_service_get_included_service ( bt_gatt_h  service,
const char *  uuid,
bt_gatt_h included_service 
)

Gets an included service's GATT handle which has specific UUID. 2.3.1.

Remarks
The returned GATT handle must not be freed by application.
It will be freed when an associated client is destroyed by bt_gatt_client_destroy().
If there are multiple included services which have same UUID, only the first matched one will be returned.
Parameters
[in]serviceThe service's GATT handle
[in]uuidThe included service's GATT handle which has this UUID will be returned if it exists
[out]included_serviceThe included service's GATT handle which has uuid if it exists
Returns
0 on success, otherwise a negative error value
Return values
BT_ERROR_NONESuccessful
BT_ERROR_INVALID_PARAMETERInvalid parameter
BT_ERROR_NO_DATANo data available
BT_ERROR_NOT_SUPPORTEDNot supported
int bt_gatt_service_get_server ( bt_gatt_h  service,
bt_gatt_server_h server 
)

Gets the GATT server handle to which the specified service belongs. 3.0.

Remarks
The returned Server handle must not be freed by application.
Parameters
[in]serviceThe service's GATT handle
[out]serverThe GATT server handle to which service belongs
Returns
0 on success, otherwise a negative error value
Return values
BT_ERROR_NONESuccessful
BT_ERROR_INVALID_PARAMETERInvalid parameter
BT_ERROR_NOT_SUPPORTEDNot supported
See also
bt_gatt_server_create()
bt_gatt_service_create()
bt_gatt_server_register_service()
int bt_gatt_set_connection_state_changed_cb ( bt_gatt_connection_state_changed_cb  callback,
void *  user_data 
)

Registers a callback function that will be invoked when the connection state is changed. 2.3.

Parameters
[in]callbackThe callback function to register.
[in]user_dataThe user data to be passed to the callback function.
Returns
0 on success, otherwise a negative error value.
Return values
BT_ERROR_NONESuccessful
BT_ERROR_NOT_INITIALIZEDNot initialized
BT_ERROR_INVALID_PARAMETERInvalid parameter
BT_ERROR_NOT_SUPPORTEDNot supported
See also
bt_gatt_connect()
bt_gatt_disconnect()
bt_gatt_unset_connection_state_changed_cb()
int bt_gatt_set_float_value ( bt_gatt_h  gatt_handle,
bt_data_type_float_e  type,
int  mantissa,
int  exponent,
int  offset 
)

Updates the value of a characteristic or descriptor's GATT handle using a float type's value. 2.3.1.

Remarks
This function updates a value of gatt_handle locally.
When gatt_handle is associated with bt_gatt_client_h, bt_gatt_client_write_value() can be used after this function
in order to update the remote device's value.
Parameters
[in]gatt_handleThe handle of a characteristic or descriptor
[in]typemantissa and exponent will be saved in gatt_handle as this type
[in]mantissaThe mantissa of float type's value to be updated
[in]exponentThe exponent of float type's value to be updated
[in]offsetThe offset from where mantissa and exponent will be saved in gatt_handle
Returns
0 on success, otherwise a negative error value
Return values
BT_ERROR_NONESuccessful
BT_ERROR_INVALID_PARAMETERInvalid parameter
BT_ERROR_OPERATION_FAILEDOperation failed
BT_ERROR_NOT_SUPPORTEDNot supported
int bt_gatt_set_int_value ( bt_gatt_h  gatt_handle,
bt_data_type_int_e  type,
int  value,
int  offset 
)

Updates the value of a characteristic or descriptor's GATT handle using a integer type's value. 2.3.1.

Remarks
This function updates a value of gatt_handle locally.
When gatt_handle is associated with bt_gatt_client_h, bt_gatt_client_write_value() can be used after this function
in order to update the remote device's value.
Parameters
[in]gatt_handleThe handle of a characteristic or descriptor
[in]typevalue will be saved in gatt_handle as this type
[in]valueThe integer type's value to be updated
[in]offsetThe offset from where value will be saved in gatt_handle
Returns
0 on success, otherwise a negative error value
Return values
BT_ERROR_NONESuccessful
BT_ERROR_INVALID_PARAMETERInvalid parameter
BT_ERROR_OPERATION_FAILEDOperation failed
BT_ERROR_NOT_SUPPORTEDNot supported
int bt_gatt_set_value ( bt_gatt_h  gatt_handle,
const char *  value,
int  value_length 
)

Updates the value of a characteristic or descriptor's GATT handle. 2.3.1.

Remarks
This function updates a value of gatt_handle locally.
When gatt_handle is associated with bt_gatt_client_h, bt_gatt_client_write_value() can be used after this function
in order to update the remote device's value.
Parameters
[in]gatt_handleThe handle of a characteristic or descriptor
[in]valueThe value to be updated
[in]value_lengthThe length of value
Returns
0 on success, otherwise a negative error value
Return values
BT_ERROR_NONESuccessful
BT_ERROR_INVALID_PARAMETERInvalid parameter
BT_ERROR_OPERATION_FAILEDOperation failed
BT_ERROR_NOT_SUPPORTEDNot supported
int bt_gatt_unset_connection_state_changed_cb ( void  )

Unregisters a callback function that will be invoked when the connection state is changed. 2.3.

Returns
0 on success, otherwise a negative error value.
Return values
BT_ERROR_NONESuccessful
BT_ERROR_NOT_INITIALIZEDNot initialized
BT_ERROR_NOT_SUPPORTEDNot supported
See also
bt_gatt_connect()
bt_gatt_disconnect()
bt_gatt_connection_state_changed_cb()
int bt_get_uuid_name ( const char *  uuid,
char **  name 
)

Gets the specification name for the given UUID. 3.0.

Remarks
The name must be released using free().
Parameters
[in]uuidThe UUID
[out]nameThe specification name defined at www.bluetooth.com
Returns
0 on success, otherwise a negative error value.
Return values
BT_ERROR_NONESuccessful
BT_ERROR_INVALID_PARAMETERInvalid parameter
BT_ERROR_NOT_SUPPORTEDNot supported
See also
bt_gatt_get_uuid()
int bt_hdp_connect_to_source ( const char *  remote_address,
const char *  app_id 
)

Connects the remote device which acts as Source role, asynchronously. 2.3 public http://tizen.org/privilege/bluetooth.

Deprecated:
Deprecated since 5.0.
Remarks
Deprecated, because of no usecase and supported devices.
Parameters
[in]remote_addressThe remote address
[in]app_idThe ID of application
Returns
0 on success, otherwise a negative error value.
Return values
BT_ERROR_NONESuccessful
BT_ERROR_NOT_INITIALIZEDNot initialized
BT_ERROR_INVALID_PARAMETERInvalid parameter
BT_ERROR_NOT_ENABLEDNot enabled
BT_ERROR_OUT_OF_MEMORYOut of memory
BT_ERROR_OPERATION_FAILEDOperation failed
BT_ERROR_PERMISSION_DENIEDPermission denied
BT_ERROR_NOT_SUPPORTEDNot supported
Precondition
The Sink role of HDP must be registered with bt_hdp_register_sink_app().
The local device must be bonded with the remote device by bt_device_create_bond().
Postcondition
bt_hdp_connected_cb() will be invoked.
See also
bt_hdp_disconnect()
bt_hdp_set_connection_state_changed_cb()
bt_hdp_unset_connection_state_changed_cb()
int bt_hdp_disconnect ( const char *  remote_address,
unsigned int  channel 
)

Disconnects the remote device, asynchronously. 2.3 public http://tizen.org/privilege/bluetooth.

Deprecated:
Deprecated since 5.0.
Remarks
Deprecated, because of no usecase and supported devices.
Parameters
[in]remote_addressThe remote address
[in]channelThe connected data channel
Returns
0 on success, otherwise a negative error value.
Return values
BT_ERROR_NONESuccessful
BT_ERROR_NOT_INITIALIZEDNot initialized
BT_ERROR_INVALID_PARAMETERInvalid parameter
BT_ERROR_NOT_ENABLEDNot enabled
BT_ERROR_REMOTE_DEVICE_NOT_CONNECTEDRemote device is not connected
BT_ERROR_OUT_OF_MEMORYOut of memory
BT_ERROR_OPERATION_FAILEDOperation failed
BT_ERROR_PERMISSION_DENIEDPermission denied
BT_ERROR_NOT_SUPPORTEDNot supported
Precondition
The remote device must be connected.
Postcondition
bt_hdp_disconnected_cb() will be invoked.
See also
bt_hdp_set_connection_state_changed_cb()
bt_hdp_unset_connection_state_changed_cb()
int bt_hdp_register_sink_app ( unsigned short  data_type,
char **  app_id 
)

Registers an application that acts as the Sink role of HDP (Health Device Profile). 2.3 public http://tizen.org/privilege/bluetooth.

Deprecated:
Deprecated since 5.0.
Remarks
The app_id must be released with free() by you.
Deprecated, because of no usecase and supported devices.
Parameters
[in]data_typeThe data type of MDEP. This value is defined in ISO/IEEE 11073-20601 spec. For example, pulse oximeter is 0x1004 and blood pressure monitor is 0x1007.
[out]app_idThe ID of application
Returns
0 on success, otherwise a negative error value.
Return values
BT_ERROR_NONESuccessful
BT_ERROR_NOT_INITIALIZEDNot initialized
BT_ERROR_INVALID_PARAMETERInvalid parameter
BT_ERROR_OUT_OF_MEMORYOut of memory
BT_ERROR_NOT_ENABLEDNot enabled
BT_ERROR_PERMISSION_DENIEDPermission denied
BT_ERROR_NOT_SUPPORTEDNot supported
Precondition
The state of local Bluetooth must be BT_ADAPTER_ENABLED.
See also
bt_hdp_unregister_sink_app()
int bt_hdp_send_data ( unsigned int  channel,
const char *  data,
unsigned int  size 
)

Sends the data to the remote device. 2.3 public http://tizen.org/privilege/bluetooth.

Deprecated:
Deprecated since 5.0.
Remarks
Deprecated, because of no usecase and supported devices.
Parameters
[in]channelThe connected data channel
[in]dataThe data to send
[in]sizeThe size of data to send (byte)
Returns
0 on success, otherwise a negative error value.
Return values
BT_ERROR_NONESuccessful
BT_ERROR_NOT_INITIALIZEDNot initialized
BT_ERROR_INVALID_PARAMETERInvalid parameter
BT_ERROR_NOT_ENABLEDNot enabled
BT_ERROR_OPERATION_FAILEDOperation failed
BT_ERROR_PERMISSION_DENIEDPermission denied
BT_ERROR_NOT_SUPPORTEDNot supported
Precondition
The remote device must be connected.
See also
bt_hdp_data_received_cb()
bt_hdp_set_data_received_cb()
bt_hdp_unset_data_received_cb()
int bt_hdp_set_connection_state_changed_cb ( bt_hdp_connected_cb  connected_cb,
bt_hdp_disconnected_cb  disconnected_cb,
void *  user_data 
)

Registers a callback function that will be invoked when the connection state is changed. 2.3.

Deprecated:
Deprecated since 5.0.
Remarks
Deprecated, because of no usecase and supported devices.
Parameters
[in]connected_cbThe callback function called when a connection is established
[in]disconnected_cbThe callback function called when a connection is disconnected
[in]user_dataThe user data to be passed to the callback function
Returns
0 on success, otherwise a negative error value.
Return values
BT_ERROR_NONESuccessful
BT_ERROR_NOT_INITIALIZEDNot initialized
BT_ERROR_INVALID_PARAMETERInvalid parameter
BT_ERROR_NOT_SUPPORTEDNot supported
Precondition
The Bluetooth service must be initialized with bt_initialize().
See also
bt_hdp_unset_connection_state_changed_cb()
int bt_hdp_set_data_received_cb ( bt_hdp_data_received_cb  callback,
void *  user_data 
)

Registers a callback function that will be invoked when you receive the data. 2.3.

Deprecated:
Deprecated since 5.0.
Remarks
Deprecated, because of no usecase and supported devices.
Parameters
[in]callbackThe callback function to register
[in]user_dataThe user data to be passed to the callback function
Returns
0 on success, otherwise a negative error value.
Return values
BT_ERROR_NONESuccessful
BT_ERROR_NOT_INITIALIZEDNot initialized
BT_ERROR_INVALID_PARAMETERInvalid parameter
BT_ERROR_NOT_SUPPORTEDNot supported
Precondition
The Bluetooth service must be initialized with bt_initialize().
See also
bt_hdp_unset_data_received_cb()
int bt_hdp_unregister_sink_app ( const char *  app_id)

Unregisters the given application that acts as the Sink role of HDP (Health Device Profile). 2.3 public http://tizen.org/privilege/bluetooth.

Deprecated:
Deprecated since 5.0.
Remarks
Deprecated, because of no usecase and supported devices.
Parameters
[in]app_idThe ID of application
Returns
0 on success, otherwise a negative error value.
Return values
BT_ERROR_NONESuccessful
BT_ERROR_NOT_INITIALIZEDNot initialized
BT_ERROR_INVALID_PARAMETERInvalid parameter
BT_ERROR_NOT_ENABLEDNot enabled
BT_ERROR_OPERATION_FAILEDOperation failed
BT_ERROR_PERMISSION_DENIEDPermission denied
BT_ERROR_NOT_SUPPORTEDNot supported
See also
bt_hdp_register_sink_app()
int bt_hdp_unset_connection_state_changed_cb ( void  )

Unregisters a callback function that will be invoked when the connection state is changed. 2.3.

Deprecated:
Deprecated since 5.0.
Remarks
Deprecated, because of no usecase and supported devices.
Returns
0 on success, otherwise a negative error value.
Return values
BT_ERROR_NONESuccessful
BT_ERROR_NOT_INITIALIZEDNot initialized
BT_ERROR_NOT_SUPPORTEDNot supported
Precondition
The Bluetooth service must be initialized with bt_initialize().
See also
bt_hdp_set_connection_state_changed_cb()
int bt_hdp_unset_data_received_cb ( void  )

Unregisters a callback function that will be invoked when you receive the data. 2.3.

Deprecated:
Deprecated since 5.0.
Remarks
Deprecated, because of no usecase and supported devices.
Returns
0 on success, otherwise a negative error value.
Return values
BT_ERROR_NONESuccessful
BT_ERROR_NOT_INITIALIZEDNot initialized
BT_ERROR_NOT_SUPPORTEDNot supported
Precondition
The Bluetooth service must be initialized with bt_initialize().
See also
bt_hdp_set_data_received_cb()
int bt_hid_device_activate ( bt_hid_device_connection_state_changed_cb  callback,
void *  user_data 
)

Activates the Bluetooth HID Device role. public http://tizen.org/privilege/bluetooth.

Remarks
This function must be called to register HID UUID.
Only then a remote device is able to identify this one as a HID device.
Parameters
[in]callbackThe callback called when the connection state is changed
[in]user_dataThe user data to be passed to the callback function
Returns
0 on success, otherwise a negative error value.
Return values
BT_ERROR_NONESuccessful
BT_ERROR_NOT_INITIALIZEDNot initialized
BT_ERROR_INVALID_PARAMETERInvalid parameter
BT_ERROR_NOT_ENABLEDNot enabled
BT_ERROR_NOW_IN_PROGRESSAlready activated
BT_ERROR_OPERATION_FAILEDOperation failed
BT_ERROR_PERMISSION_DENIEDPermission denied
BT_ERROR_NOT_SUPPORTEDNot supported
Precondition
The Bluetooth service must be initialized with bt_initialize().
See also
bt_initialize()
bt_hid_device_deactivate()
int bt_hid_device_connect ( const char *  remote_address)

Initiates the HID device connection with the Device role, asynchronously. public http://tizen.org/privilege/bluetooth.

Remarks
This function must be called to Initiate the HID device role connection.
Parameters
[in]remote_addressThe remote device's address.
Returns
0 on success, otherwise a negative error value.
Return values
BT_ERROR_NONESuccessful
BT_ERROR_NOT_INITIALIZEDNot initialized
BT_ERROR_INVALID_PARAMETERInvalid parameter
BT_ERROR_NOT_ENABLEDNot enabled
BT_ERROR_NOT_IN_PROGRESSNot activated
BT_ERROR_OPERATION_FAILEDOperation failed
BT_ERROR_PERMISSION_DENIEDPermission denied
BT_ERROR_ALREADY_DONEAlready connected
BT_ERROR_NOT_SUPPORTEDNot supported
Precondition
The Bluetooth service must be initialized with bt_initialize().
The local device must be bonded with the remote device by bt_device_create_bond().
See also
bt_initialize()
bt_hid_device_activate()
int bt_hid_device_deactivate ( void  )

Deactivates the Bluetooth HID Device role. public http://tizen.org/privilege/bluetooth.

Remarks
This function must be called to deregister the HID UUID.
Returns
0 on success, otherwise a negative error value.
Return values
BT_ERROR_NONESuccessful
BT_ERROR_NOT_INITIALIZEDNot initialized
BT_ERROR_NOT_ENABLEDNot enabled
BT_ERROR_NOT_IN_PROGRESSNot activated
BT_ERROR_OPERATION_FAILEDOperation failed
BT_ERROR_PERMISSION_DENIEDPermission denied
BT_ERROR_NOT_SUPPORTEDNot supported
Precondition
The Bluetooth service must be initialized with bt_initialize().
See also
bt_initialize()
bt_hid_device_activate()
int bt_hid_device_disconnect ( const char *  remote_address)

Disconnects from the HID Host device, asynchronously. public http://tizen.org/privilege/bluetooth.

Parameters
[in]remote_addressThe remote device's address.
Returns
0 on success, otherwise a negative error value.
Return values
BT_ERROR_NONESuccessful
BT_ERROR_NOT_INITIALIZEDNot initialized
BT_ERROR_INVALID_PARAMETERInvalid parameter
BT_ERROR_NOT_ENABLEDNot enabled
BT_ERROR_REMOTE_DEVICE_NOT_CONNECTEDRemote device is not connected
BT_ERROR_OPERATION_FAILEDOperation failed
BT_ERROR_PERMISSION_DENIEDPermission denied
BT_ERROR_NOT_SUPPORTEDNot supported
Precondition
The Bluetooth service must be initialized with bt_initialize().
See also
bt_initialize()
bt_hid_device_connection_state_changed_cb()
int bt_hid_device_reply_to_report ( const char *  remote_address,
bt_hid_header_type_e  header_type,
bt_hid_param_type_e  param_type,
const char *  data,
unsigned int  data_len 
)

Responds to reports from the HID Host. public http://tizen.org/privilege/bluetooth.

Parameters
[in]remote_addressThe remote device's address.
[in]header_typeThe response header type
[in]param_typeThe response parameter type
[in]dataThe response data
[in]data_lenThe length of the response data
Returns
0 on success, otherwise a negative error value.
Return values
BT_ERROR_NONESuccessful
BT_ERROR_NOT_INITIALIZEDNot initialized
BT_ERROR_INVALID_PARAMETERInvalid parameter
BT_ERROR_NOT_ENABLEDNot enabled
BT_ERROR_OPERATION_FAILEDOperation failed
BT_ERROR_PERMISSION_DENIEDPermission denied
BT_ERROR_NOT_SUPPORTEDNot supported
Precondition
The HID connection must be established.
See also
bt_hid_device_connection_state_changed_cb()
int bt_hid_device_send_key_event ( const char *  remote_address,
const bt_hid_key_data_s key_data 
)

Sends the keyboard event data to the remote device. public http://tizen.org/privilege/bluetooth.

Parameters
[in]remote_addressThe remote device's address.
[in]key_dataThe key data to be passed to the remote device
Returns
0 on success, otherwise a negative error value.
Return values
BT_ERROR_NONESuccessful
BT_ERROR_NOT_INITIALIZEDNot initialized
BT_ERROR_INVALID_PARAMETERInvalid parameter
BT_ERROR_OPERATION_FAILEDOperation failed
BT_ERROR_PERMISSION_DENIEDPermission denied
BT_ERROR_NOT_SUPPORTEDNot supported
Precondition
The HID connection must be established.
See also
bt_hid_device_connection_state_changed_cb()
int bt_hid_device_send_mouse_event ( const char *  remote_address,
const bt_hid_mouse_data_s mouse_data 
)

Sends the mouse event data to the remote device. public http://tizen.org/privilege/bluetooth.

Parameters
[in]remote_addressThe remote device's address.
[in]mouse_dataThe mouse data to be passed to the remote device.
Returns
0 on success, otherwise a negative error value.
Return values
BT_ERROR_NONESuccessful
BT_ERROR_NOT_INITIALIZEDNot initialized
BT_ERROR_INVALID_PARAMETERInvalid parameter
BT_ERROR_OPERATION_FAILEDOperation failed
BT_ERROR_PERMISSION_DENIEDPermission denied
BT_ERROR_NOT_SUPPORTEDNot supported
Precondition
The HID connection must be established.
See also
bt_hid_device_connection_state_changed_cb()
int bt_hid_device_set_data_received_cb ( bt_hid_device_data_received_cb  callback,
void *  user_data 
)

Sets the callback called when the device receives data from the HID Host. .

Parameters
[in]callbackThe callback function to be set when data is received.
[in]user_dataThe user data to be passed to the callback.
Returns
0 on success, otherwise a negative error value.
Return values
BT_ERROR_NONESuccessful
BT_ERROR_NOT_INITIALIZEDNot initialized
BT_ERROR_INVALID_PARAMETERInvalid parameter
BT_ERROR_NOT_SUPPORTEDNot supported
See also
bt_hid_device_connection_state_changed_cb()
int bt_hid_device_unset_data_received_cb ( void  )

Unsets the data received callback. .

Returns
0 on success, otherwise a negative error value.
Return values
BT_ERROR_NONESuccessful
BT_ERROR_NOT_INITIALIZEDNot initialized
BT_ERROR_NOT_SUPPORTEDNot supported
See also
bt_hid_device_connection_state_changed_cb()
int bt_hid_host_connect ( const char *  remote_address)

Connects the remote device with the HID (Human Interface Device) service, asynchronously. 2.3 public http://tizen.org/privilege/bluetooth.

@ @ @

Parameters
[in]remote_addressThe remote address
Returns
0 on success, otherwise a negative error value.
Return values
BT_ERROR_NONESuccessful
BT_ERROR_NOT_INITIALIZEDNot initialized
BT_ERROR_INVALID_PARAMETERInvalid parameter
BT_ERROR_NOT_ENABLEDNot enabled
BT_ERROR_OPERATION_FAILEDOperation failed
BT_ERROR_PERMISSION_DENIEDPermission denied
BT_ERROR_NOT_SUPPORTEDNot supported
Precondition
The local device must be bonded with the remote device by bt_device_create_bond().
The Bluetooth HID service must be initialized with bt_hid_host_initialize().
Postcondition
bt_hid_host_connection_state_changed_cb() will be invoked.
See also
bt_hid_host_disconnect()
bt_hid_host_connection_state_changed_cb()
int bt_hid_host_deinitialize ( void  )

Deinitializes the Bluetooth HID (Human Interface Device) Host. 2.3.

@ @ @

Returns
0 on success, otherwise a negative error value.
Return values
BT_ERROR_NONESuccessful
BT_ERROR_NOT_INITIALIZEDNot initialized
BT_ERROR_OPERATION_FAILEDOperation failed
BT_ERROR_NOT_SUPPORTEDNot supported
Precondition
The Bluetooth HID service must be initialized with bt_hid_host_initialize().
See also
bt_hid_host_initialize()
int bt_hid_host_disconnect ( const char *  remote_address)

Disconnects the remote device with the HID (Human Interface Device) service, asynchronously. 2.3 public http://tizen.org/privilege/bluetooth.

@ @ @

Parameters
[in]remote_addressThe remote address
Returns
0 on success, otherwise a negative error value.
Return values
BT_ERROR_NONESuccessful
BT_ERROR_NOT_INITIALIZEDNot initialized
BT_ERROR_INVALID_PARAMETERInvalid parameter
BT_ERROR_NOT_ENABLEDNot enabled
BT_ERROR_REMOTE_DEVICE_NOT_CONNECTEDRemote device is not connected
BT_ERROR_OPERATION_FAILEDOperation failed
BT_ERROR_PERMISSION_DENIEDPermission denied
BT_ERROR_NOT_SUPPORTEDNot supported
Precondition
The remote device must be connected by bt_hid_host_connect().
Postcondition
bt_hid_host_connection_state_changed_cb() will be invoked.
See also
bt_hid_host_connect()
bt_hid_host_connection_state_changed_cb()
int bt_hid_host_initialize ( bt_hid_host_connection_state_changed_cb  connection_cb,
void *  user_data 
)

Initializes the Bluetooth HID (Human Interface Device) Host. 2.3.

@ @ @

Remarks
This function must be called before Bluetooth HID Host starts.
You must free all resources of the Bluetooth service by calling bt_hid_host_deinitialize()
if Bluetooth HID Host service is no longer needed.
Parameters
[in]connection_cbThe callback called when the connection state is changed
[in]user_dataThe user data to be passed to the callback function
Returns
0 on success, otherwise a negative error value.
Return values
BT_ERROR_NONESuccessful
BT_ERROR_NOT_INITIALIZEDNot initialized
BT_ERROR_INVALID_PARAMETERInvalid parameter
BT_ERROR_OPERATION_FAILEDOperation failed
BT_ERROR_NOT_SUPPORTEDNot supported
Precondition
The Bluetooth service must be initialized with bt_initialize().
See also
bt_initialize()
bt_hid_host_deinitialize()
int bt_initialize ( void  )

Initializes the Bluetooth API. 2.3.

Remarks
This function must be called before Bluetooth API starts.
You must free all resources of the Bluetooth service by calling bt_deinitialize() if Bluetooth service is no longer needed.
Returns
0 on success, otherwise a negative error value.
Return values
BT_ERROR_NONESuccessful
BT_ERROR_OPERATION_FAILEDOperation failed
BT_ERROR_NOT_SUPPORTEDNot supported
See also
bt_deinitialize()
int bt_ipsp_connect ( const char *  remote_address)

Connects to a remote device's IPSP service over LE, asynchronously. 4.0 public http://tizen.org/privilege/bluetooth.

Parameters
[in]remote_addressThe remote address
Returns
0 on success, otherwise a negative error value.
Return values
BT_ERROR_NONESuccessful
BT_ERROR_NOT_INITIALIZEDNot initialized
BT_ERROR_INVALID_PARAMETERInvalid parameter
BT_ERROR_NOT_ENABLEDNot enabled
BT_ERROR_OPERATION_FAILEDOperation failed
BT_ERROR_PERMISSION_DENIEDPermission denied
BT_ERROR_NOT_SUPPORTEDNot supported
Postcondition
bt_ipsp_set_connection_state_changed_cb() will be invoked.
See also
bt_ipsp_set_connection_state_changed_cb()
int bt_ipsp_deinitialize ( void  )

Deinitializes the Bluetooth IPSP (Internet Protocol Support Profile) service. 4.0.

Returns
0 on success, otherwise a negative error value.
Return values
BT_ERROR_NONESuccessful
BT_ERROR_NOT_INITIALIZEDNot initialized
BT_ERROR_OPERATION_FAILEDOperation failed
BT_ERROR_NOT_SUPPORTEDNot supported
Precondition
The Bluetooth service must be initialized with bt_initialize().
See also
bt_initialize()
int bt_ipsp_disconnect ( const char *  remote_address)

Disconnects from a remote device's IPSP service, asynchronously. 4.0 public http://tizen.org/privilege/bluetooth.

Parameters
[in]remote_addressThe remote address
Returns
0 on success, otherwise a negative error value.
Return values
BT_ERROR_NONESuccessful
BT_ERROR_NOT_INITIALIZEDNot initialized
BT_ERROR_INVALID_PARAMETERInvalid parameter
BT_ERROR_NOT_ENABLEDNot enabled
BT_ERROR_REMOTE_DEVICE_NOT_CONNECTEDRemote device is not connected
BT_ERROR_OPERATION_FAILEDOperation failed
BT_ERROR_PERMISSION_DENIEDPermission denied
BT_ERROR_NOT_SUPPORTEDNot supported
Precondition
The remote device must be connected by bt_ipsp_connect().
Postcondition
bt_ipsp_set_connection_state_changed_cb() will be invoked.
See also
bt_ipsp_connect()
bt_ipsp_set_connection_state_changed_cb()
int bt_ipsp_initialize ( bt_ipsp_init_state_changed_cb  callback,
void *  user_data 
)

Initializes the Bluetooth IPSP (Internet Protocol Support Profile) service. 4.0.

Parameters
[in]callbackThe callback called when the initialization is finished
[in]user_dataThe user data to be passed to the callback function
Returns
0 on success, otherwise a negative error value.
Return values
BT_ERROR_NONESuccessful
BT_ERROR_NOT_INITIALIZEDNot initialized
BT_ERROR_INVALID_PARAMETERInvalid parameter
BT_ERROR_OPERATION_FAILEDOperation failed
BT_ERROR_NOT_SUPPORTEDNot supported
Precondition
The Bluetooth service must be initialized with bt_initialize().
See also
bt_initialize()
int bt_ipsp_set_connection_state_changed_cb ( bt_ipsp_connection_state_changed_cb  callback,
void *  user_data 
)

Registers a callback function that will be invoked when the connection state changes. 4.0.

Parameters
[in]callbackThe callback function to register
[in]user_dataThe user data to be passed to the callback function
Returns
0 on success, otherwise a negative error value.
Return values
BT_ERROR_NONESuccessful
BT_ERROR_NOT_INITIALIZEDNot initialized
BT_ERROR_INVALID_PARAMETERInvalid parameter
BT_ERROR_NOT_SUPPORTEDNot supported
Precondition
The Bluetooth service must be initialized with bt_initialize().
See also
bt_initialize()
int bt_ipsp_unset_connection_state_changed_cb ( void  )

Unregisters the callback function called when the connection state changes. 4.0.

Returns
0 on success, otherwise a negative error value.
Return values
BT_ERROR_NONESuccessful
BT_ERROR_NOT_INITIALIZEDNot initialized
BT_ERROR_NOT_SUPPORTEDNot supported
Precondition
The Bluetooth service must be initialized with bt_initialize().
See also
bt_initialize()
int bt_opp_client_add_file ( const char *  file)

Adds file to be pushed. 2.3.

Parameters
[in]fileThe path of file to be pushed
Returns
0 on success, otherwise a negative error value.
Return values
BT_ERROR_NONESuccessful
BT_ERROR_NOT_INITIALIZEDNot initialized
BT_ERROR_NOT_ENABLEDNot enabled
BT_ERROR_OPERATION_FAILEDOperation failed
BT_ERROR_NOT_SUPPORTEDNot supported
BT_ERROR_INVALID_PARAMETERInvalid parameter
See also
bt_opp_client_clear_files()
bt_opp_client_push_files()
int bt_opp_client_cancel_push ( void  )

Cancels the push request in progress, asynchronously. 2.3 public http://tizen.org/privilege/bluetooth.

Returns
0 on success, otherwise a negative error value.
Return values
BT_ERROR_NONESuccessful
BT_ERROR_NOT_INITIALIZEDNot initialized
BT_ERROR_NOT_ENABLEDNot enabled
BT_ERROR_OPERATION_FAILEDOperation failed
BT_ERROR_PERMISSION_DENIEDPermission denied
BT_ERROR_NOT_SUPPORTEDNot supported
Precondition
bt_opp_client_push_files() must be called.
Postcondition
bt_opp_client_push_finished_cb() will be invoked with result BT_ERROR_CANCELLED, which is a parameter of bt_opp_client_push_files().
See also
bt_opp_client_initialize()
bt_opp_client_push_files()
int bt_opp_client_clear_files ( void  )

Adds file to be pushed. 2.3.

Returns
0 on success, otherwise a negative error value.
Return values
BT_ERROR_NONESuccessful
BT_ERROR_NOT_INITIALIZEDNot initialized
BT_ERROR_NOT_ENABLEDNot enabled
BT_ERROR_OPERATION_FAILEDOperation failed
BT_ERROR_NOT_SUPPORTEDNot supported
See also
bt_opp_client_add_file()
bt_opp_client_push_files()
int bt_opp_client_deinitialize ( void  )

Deinitializes the Bluetooth OPP client. 2.3.

Returns
0 on success, otherwise a negative error value.
Return values
BT_ERROR_NONESuccessful
BT_ERROR_NOT_INITIALIZEDNot initialized
BT_ERROR_OPERATION_FAILEDOperation failed
BT_ERROR_NOT_SUPPORTEDNot supported
See also
bt_opp_client_initialize()
int bt_opp_client_initialize ( void  )

Initializes the Bluetooth OPP client. 2.3.

Remarks
This function must be called before Bluetooth OPP client starts.
You must free all resources of the Bluetooth service by calling bt_opp_client_deinitialize()
if Bluetooth OPP service is no longer needed.
Returns
0 on success, otherwise a negative error value.
Return values
BT_ERROR_NONESuccessful
BT_ERROR_NOT_INITIALIZEDNot initialized
BT_ERROR_RESOURCE_BUSYDevice or resource busy
BT_ERROR_OPERATION_FAILEDOperation failed
BT_ERROR_NOT_SUPPORTEDNot supported
See also
bt_opp_client_deinitialize()
int bt_opp_client_push_files ( const char *  remote_address,
bt_opp_client_push_responded_cb  responded_cb,
bt_opp_client_push_progress_cb  progress_cb,
bt_opp_client_push_finished_cb  finished_cb,
void *  user_data 
)

Pushes the file to the remote device, asynchronously.

At first, bt_opp_client_push_responded_cb() will be called when OPP server responds to the push request.
After connection is established, bt_opp_client_push_progress_cb() will be called repeatedly until a file is transferred completely.
If you send several files, then bt_opp_client_push_progress_cb() with another file will be called repeatedly until the file is transferred completely.
bt_opp_client_push_finished_cb() will be called when the push request is finished.

2.3 public http://tizen.org/privilege/bluetooth

Parameters
[in]remote_addressThe remote address
[in]responded_cbThe callback called when OPP server responds to the push request
[in]progress_cbThe callback called when each file is being transferred
[in]finished_cbThe callback called when the push request is finished
[in]user_dataThe user data to be passed to the callback function
Returns
0 on success, otherwise a negative error value.
Return values
BT_ERROR_NONESuccessful
BT_ERROR_NOT_INITIALIZEDNot initialized
BT_ERROR_NOT_ENABLEDNot enabled
BT_ERROR_INVALID_PARAMETERInvalid parameter
BT_ERROR_OPERATION_FAILEDOperation failed
BT_ERROR_NOW_IN_PROGRESSOperation now in progress
BT_ERROR_PERMISSION_DENIEDPermission denied
BT_ERROR_NOT_SUPPORTEDNot supported
See also
bt_opp_client_initialize()
bt_opp_client_cancel_push()
int bt_opp_server_accept ( bt_opp_server_transfer_progress_cb  progress_cb,
bt_opp_server_transfer_finished_cb  finished_cb,
const char *  name,
void *  user_data,
int *  transfer_id 
)

Accepts the push request from the remote device. 2.3 public http://tizen.org/privilege/bluetooth.

Remarks
If you initialize OPP server by bt_opp_server_initialize_by_connection_request(), then name is ignored. You can cancel the pushes by bt_opp_server_cancel_transfer() with transfer_id.
Parameters
[in]progress_cbThe callback called when a file is being transferred
[in]finished_cbThe callback called when a transfer is finished
[in]nameThe name to store. This can be NULL if you initialize OPP server by bt_opp_server_initialize_by_connection_request().
[in]user_dataThe user data to be passed to the callback function
[out]transfer_idThe ID of transfer
Returns
0 on success, otherwise a negative error value.
Return values
BT_ERROR_NONESuccessful
BT_ERROR_INVALID_PARAMETERInvalid parameter
BT_ERROR_NOT_INITIALIZEDNot initialized
BT_ERROR_NOT_ENABLEDNot enabled
BT_ERROR_OPERATION_FAILEDOperation failed
BT_ERROR_NOW_IN_PROGRESSOperation now in progress
BT_ERROR_PERMISSION_DENIEDPermission denied
BT_ERROR_NOT_SUPPORTEDNot supported
See also
bt_opp_server_reject()
int bt_opp_server_cancel_transfer ( int  transfer_id)

Cancels the transfer. 2.3 public http://tizen.org/privilege/bluetooth.

Parameters
[in]transfer_idThe ID of transfer
Returns
0 on success, otherwise a negative error value.
Return values
BT_ERROR_NONESuccessful
BT_ERROR_NOT_INITIALIZEDNot initialized
BT_ERROR_NOT_ENABLEDNot enabled
BT_ERROR_INVALID_PARAMETERInvalid parameter
BT_ERROR_OPERATION_FAILEDOperation failed
BT_ERROR_PERMISSION_DENIEDPermission denied
BT_ERROR_NOT_SUPPORTEDNot supported
See also
bt_opp_server_accept()
int bt_opp_server_deinitialize ( void  )

Deinitializes the Bluetooth OPP server. 2.3.

Returns
0 on success, otherwise a negative error value.
Return values
BT_ERROR_NONESuccessful
BT_ERROR_NOT_INITIALIZEDNot initialized
BT_ERROR_NOT_ENABLEDNot enabled
BT_ERROR_OPERATION_FAILEDOperation failed
BT_ERROR_NOT_SUPPORTEDNot supported
See also
bt_opp_server_deinitialize()
int bt_opp_server_initialize_by_connection_request ( const char *  destination,
bt_opp_server_connection_requested_cb  connection_requested_cb,
void *  user_data 
)

Initializes the Bluetooth OPP server requested by bt_opp_server_connection_requested_cb().

No popup appears when an OPP connection is requested from a remote device.
Instead, connection_requested_cb() will be called.
At that time, you can call either bt_opp_server_accept() or bt_opp_server_reject(). 2.3

Remarks
This function must be called to start Bluetooth OPP server.
You must free all resources of the Bluetooth service by calling bt_opp_server_deinitialize() if Bluetooth OPP service is no longer needed.
Parameters
[in]destinationThe destination path
[in]connection_requested_cbThe callback called when an OPP connection is requested
[in]user_dataThe user data to be passed to the callback function
Returns
0 on success, otherwise a negative error value.
Return values
BT_ERROR_NONESuccessful
BT_ERROR_NOT_INITIALIZEDNot initialized
BT_ERROR_NOT_ENABLEDNot enabled
BT_ERROR_INVALID_PARAMETERInvalid parameter
BT_ERROR_RESOURCE_BUSYDevice or resource busy
BT_ERROR_OPERATION_FAILEDOperation failed
BT_ERROR_NOT_SUPPORTEDNot supported
See also
bt_opp_server_connection_requested_cb()
bt_opp_server_deinitialize()
bt_opp_server_accept()
bt_opp_server_reject()
int bt_opp_server_reject ( void  )

Rejects the push request from the remote device. 2.3 public http://tizen.org/privilege/bluetooth.

Returns
0 on success, otherwise a negative error value.
Return values
BT_ERROR_NONESuccessful
BT_ERROR_NOT_INITIALIZEDNot initialized
BT_ERROR_NOT_ENABLEDNot enabled
BT_ERROR_OPERATION_FAILEDOperation failed
BT_ERROR_PERMISSION_DENIEDPermission denied
BT_ERROR_NOT_SUPPORTEDNot supported
See also
bt_opp_server_accept()
int bt_opp_server_set_destination ( const char *  destination)

Sets the destination path of file to be pushed. 2.3 public http://tizen.org/privilege/bluetooth.

Parameters
[in]destinationThe destination path of file to be pushed
Returns
0 on success, otherwise a negative error value.
Return values
BT_ERROR_NONESuccessful
BT_ERROR_NOT_INITIALIZEDNot initialized
BT_ERROR_NOT_ENABLEDNot enabled
BT_ERROR_INVALID_PARAMETERInvalid parameter
BT_ERROR_OPERATION_FAILEDOperation failed
BT_ERROR_PERMISSION_DENIEDPermission denied
BT_ERROR_NOT_SUPPORTEDNot supported
int bt_pbap_client_connect ( const char *  address)

Connects to PBAP server, asynchronously. 3.0 public http://tizen.org/privilege/bluetooth.

Parameters
[in]addressThe other device's address
Returns
0 on success, otherwise a negative error value.
Return values
BT_ERROR_NONESuccessful
BT_ERROR_NOT_INITIALIZEDNot initialized
BT_ERROR_INVALID_PARAMETERInvalid parameter
BT_ERROR_NOT_ENABLEDAdapter is not enabled
BT_ERROR_OPERATION_FAILEDOperation failed
BT_ERROR_PERMISSION_DENIEDPermission denied
BT_ERROR_NOT_SUPPORTEDNot supported
Precondition
The state of the local Bluetooth adapter must be BT_ADAPTER_ENABLED.
The PBAP client must be initialized with bt_pbap_client_initialize().
The local device must be bonded with the remote device by bt_device_create_bond().
Postcondition
bt_pbap_connection_state_changed_cb() will be invoked.
See also
bt_pbap_client_disconnect()
bt_pbap_client_set_connection_state_changed_cb()
int bt_pbap_client_deinitialize ( void  )

Deinitializes the Bluetooth PBAP Client.

This deinitialization must be done to free resources when the PBAP client is not longer needed. 3.0

Returns
0 on success, otherwise a negative error value.
Return values
BT_ERROR_NONESuccessful
BT_ERROR_NOT_INITIALIZEDNot initialized
BT_ERROR_NOT_ENABLEDNot enabled
BT_ERROR_OPERATION_FAILEDOperation failed
BT_ERROR_NOT_SUPPORTEDNot supported
Precondition
The state of the local Bluetooth adapter must be BT_ADAPTER_ENABLED. The PBAP client must be initialized with bt_pbap_client_initialize().
See also
bt_pbap_client_deinitialize()
bt_pbap_client_connect()
bt_pbap_client_disconnect()
bt_pbap_client_get_phone_book_size()
bt_pbap_client_get_phone_book()
bt_pbap_client_get_list()
bt_pbap_client_pull_vcard()
bt_pbap_client_search_phone_book()
int bt_pbap_client_disconnect ( const char *  address)

Disconnects from PBAP server, asynchronously. 3.0 public http://tizen.org/privilege/bluetooth.

Parameters
[in]addressThe other device's address
Returns
0 on success, otherwise a negative error value.
Return values
BT_ERROR_NONESuccessful
BT_ERROR_NOT_INITIALIZEDNot initialized
BT_ERROR_INVALID_PARAMETERInvalid parameter
BT_ERROR_NOT_ENABLEDAdapter is not enabled
BT_ERROR_OPERATION_FAILEDOperation failed
BT_ERROR_PERMISSION_DENIEDPermission denied
BT_ERROR_NOT_SUPPORTEDNot supported
Precondition
The state of the local Bluetooth adapter must be BT_ADAPTER_ENABLED.
The PBAP client must be initialized with bt_pbap_client_initialize().
PBAP connection must be created with bt_pbap_client_connect().
Postcondition
bt_pbap_connection_state_changed_cb() will be invoked.
See also
bt_pbap_client_connect()
bt_pbap_client_set_connection_state_changed_cb()
int bt_pbap_client_get_list ( const char *  address,
bt_pbap_address_book_source_e  source,
bt_pbap_folder_type_e  folder_type,
bt_pbap_sort_order_e  order,
unsigned short  offset,
unsigned short  max_list_count,
bt_pbap_list_vcards_cb  callback,
void *  user_data 
)

Gets contact and call log information from the PBAP server, asynchronously. 3.0 public http://tizen.org/privilege/bluetooth.

Parameters
[in]addressThe other device's address
[in]sourceSource of phone book (Phone/SIM)
[in]folder_typeType of folder
[in]orderSpecifies which field shall be used to sort vCards.
[in]offsetvCards to be excluded from beginning.
[in]max_list_countMaximum number of vCards to be fetched
[in]callbackThe callback function called when PBAP List is returned.
[in]user_dataData to be passed to the PBAP phone book pulling callback.
Returns
0 on success, otherwise a negative error value.
Return values
BT_ERROR_NONESuccessful
BT_ERROR_NOT_INITIALIZEDNot initialized
BT_ERROR_INVALID_PARAMETERInvalid parameter
BT_ERROR_NOT_ENABLEDAdapter is not enabled
BT_ERROR_OPERATION_FAILEDOperation failed
BT_ERROR_PERMISSION_DENIEDPermission denied
BT_ERROR_NOT_SUPPORTEDNot supported
Precondition
The state of the local Bluetooth adapter must be BT_ADAPTER_ENABLED.
The PBAP client must be initialized with bt_pbap_client_initialize().
PBAP connection must be created with bt_pbap_client_connect().
See also
bt_pbap_client_connect()
int bt_pbap_client_get_phone_book ( const char *  address,
bt_pbap_address_book_source_e  source,
bt_pbap_folder_type_e  folder_type,
bt_pbap_vcard_format_e  format,
bt_pbap_sort_order_e  order,
unsigned short  offset,
unsigned short  max_list_count,
unsigned int  fields,
bt_pbap_phone_book_received_cb  callback,
void *  user_data 
)

Gets all contacts and call logs as vCard from PBAP server, asynchronously.

The received phone book file will be saved in the platform downloads folder. 3.0 public http://tizen.org/privilege/bluetooth http://tizen.org/privilege/mediastorage

Parameters
[in]addressThe other device's address
[in]sourceSource of phone book (Phone/SIM)
[in]folder_typeType of folder
[in]formatThe vCard format
[in]orderSpecifies which field shall be used to sort vCards.
[in]offsetThe number of vCards to be excluded, counting from the beginning
[in]max_list_countThe maximum number of vCards to be fetched
[in]fieldsvCard fields to be fetched; one or more bt_pbap_field_e values combined with bitwise 'or'
[in]callbackThe callback function called when PBAP phone book is Pulled.
[in]user_dataData to be passed to the PBAP phone book pulling callback.
Returns
0 on success, otherwise a negative error value.
Return values
BT_ERROR_NONESuccessful
BT_ERROR_NOT_INITIALIZEDNot initialized
BT_ERROR_INVALID_PARAMETERInvalid parameter
BT_ERROR_NOT_ENABLEDAdapter is not enabled
BT_ERROR_OPERATION_FAILEDOperation failed
BT_ERROR_PERMISSION_DENIEDPermission denied
BT_ERROR_NOT_SUPPORTEDNot supported
Precondition
The state of the local Bluetooth adapter must be BT_ADAPTER_ENABLED.
The PBAP client must be initialized with bt_pbap_client_initialize().
PBAP connection must be created with bt_pbap_client_connect().
See also
bt_pbap_client_connect()
int bt_pbap_client_get_phone_book_size ( const char *  address,
bt_pbap_address_book_source_e  source,
bt_pbap_folder_type_e  folder_type,
bt_pbap_phone_book_size_cb  callback,
void *  user_data 
)

Gets size of phone book from PBAP server, asynchronously. 3.0 public http://tizen.org/privilege/bluetooth.

Parameters
[in]addressThe other device's address
[in]sourceSource of the phone book (Phone/SIM)
[in]folder_typeType of folder
[in]callbackThe callback function called when PBAP phone book size is returned.
[in]user_dataData to be passed to the PBAP phone book size callback.
Returns
0 on success, otherwise a negative error value.
Return values
BT_ERROR_NONESuccessful
BT_ERROR_NOT_INITIALIZEDNot initialized
BT_ERROR_INVALID_PARAMETERInvalid parameter
BT_ERROR_NOT_ENABLEDAdapter is not enabled
BT_ERROR_OPERATION_FAILEDOperation failed
BT_ERROR_PERMISSION_DENIEDPermission denied
BT_ERROR_NOT_SUPPORTEDNot supported
Precondition
The state of the local Bluetooth adapter must be BT_ADAPTER_ENABLED.
The PBAP client must be initialized with bt_pbap_client_initialize().
PBAP connection must be created with bt_pbap_client_connect().
See also
bt_pbap_client_connect()
int bt_pbap_client_initialize ( void  )

Initializes the Bluetooth PBAP Client.

This initialization is necessary to call other PBAP client APIs. 3.0

Remarks
This function must be called to initialize Bluetooth PBAP client. You must free all resources of the Bluetooth service
by calling bt_pbap_client_deinitialize() if Bluetooth PBAP Client is no longer needed.
Returns
0 on success, otherwise a negative error value.
Return values
BT_ERROR_NONESuccessful
BT_ERROR_NOT_INITIALIZEDNot initialized
BT_ERROR_NOT_ENABLEDNot enabled
BT_ERROR_OPERATION_FAILEDOperation failed
BT_ERROR_NOT_SUPPORTEDNot supported
Precondition
The state of the local Bluetooth adapter must be BT_ADAPTER_ENABLED.
See also
bt_pbap_client_deinitialize()
bt_pbap_client_connect()
bt_pbap_client_disconnect()
bt_pbap_client_get_phone_book_size()
bt_pbap_client_get_phone_book()
bt_pbap_client_get_list()
bt_pbap_client_pull_vcard()
bt_pbap_client_search_phone_book()
int bt_pbap_client_pull_vcard ( const char *  address,
bt_pbap_address_book_source_e  source,
bt_pbap_folder_type_e  folder_type,
int  index,
bt_pbap_vcard_format_e  format,
unsigned int  fields,
bt_pbap_phone_book_received_cb  callback,
void *  user_data 
)

Gets the selected contact using the index parameter as vCard from PBAP server, asynchronously.

The received phone book file will be saved in the platform downloads folder. The index value should be equal to the value of the index field in the bt_pbap_vcard_info_s structure, which can be obtained with bt_pbap_client_get_list() or bt_pbap_client_search_phone_book(). 3.0 public http://tizen.org/privilege/bluetooth http://tizen.org/privilege/mediastorage

Parameters
[in]addressThe other device's address
[in]sourceSource of phone book (Phone/SIM)
[in]folder_typeType of folder
[in]indexThe handle index of vCard to be fetched
[in]formatFormat of vCard
[in]fieldsvCard fields to be fetched; one or more bt_pbap_field_e values combined with bitwise 'or'
[in]callbackThe callback function called when PBAP phone book is Pulled.
[in]user_dataData to be passed to the PBAP phone book Pulling callback.
Returns
0 on success, otherwise a negative error value.
Return values
BT_ERROR_NONESuccessful
BT_ERROR_NOT_INITIALIZEDNot initialized
BT_ERROR_INVALID_PARAMETERInvalid parameter
BT_ERROR_NOT_ENABLEDAdapter is not enabled
BT_ERROR_OPERATION_FAILEDOperation failed
BT_ERROR_PERMISSION_DENIEDPermission denied
BT_ERROR_NOT_SUPPORTEDNot supported
Precondition
The state of the local Bluetooth adapter must be BT_ADAPTER_ENABLED.
The PBAP client must be initialized with bt_pbap_client_initialize().
PBAP connection must be created with bt_pbap_client_connect().
The vCard information (bt_pbap_vcard_info_s) must be obtained with bt_pbap_client_get_list() or bt_pbap_client_search_phone_book().
See also
bt_pbap_client_connect()
bt_pbap_client_get_list()
bt_pbap_client_search_phone_book()
int bt_pbap_client_search_phone_book ( const char *  address,
bt_pbap_address_book_source_e  source,
bt_pbap_folder_type_e  folder_type,
bt_pbap_search_field_e  search_attribute,
const char *  search_value,
bt_pbap_sort_order_e  order,
unsigned short  offset,
unsigned short  max_list_count,
bt_pbap_list_vcards_cb  callback,
void *  user_data 
)

Finds and fetches the contact and call log information from the PBAP server, asynchronously. 3.0 public http://tizen.org/privilege/bluetooth.

Parameters
[in]addressThe other device's address
[in]sourceSource of phone book (Phone/SIM)
[in]folder_typeType of folder
[in]search_attributefield to be search
[in]search_valuepattern to be searched for
[in]orderSpecifies which field shall be used to sort vCards.
[in]offsetvCards to be excluded from beginning.
[in]max_list_countMaximum number of vCards to be fetched
[in]callbackThe callback function called when PBAP List is returned.
[in]user_dataData to be passed to the PBAP phone book pulling callback.
Returns
0 on success, otherwise a negative error value.
Return values
BT_ERROR_NONESuccessful
BT_ERROR_NOT_INITIALIZEDNot initialized
BT_ERROR_INVALID_PARAMETERInvalid parameter
BT_ERROR_NOT_ENABLEDAdapter is not enabled
BT_ERROR_OPERATION_FAILEDOperation failed
BT_ERROR_PERMISSION_DENIEDPermission denied
BT_ERROR_NOT_SUPPORTEDNot supported
Precondition
The state of the local Bluetooth adapter must be BT_ADAPTER_ENABLED.
The PBAP client must be initialized with bt_pbap_client_initialize().
PBAP connection must be created with bt_pbap_client_connect().
See also
bt_pbap_client_connect()
int bt_pbap_client_set_connection_state_changed_cb ( bt_pbap_connection_state_changed_cb  callback,
void *  user_data 
)

Registers a callback function that will be invoked when the connection state is changed. 3.0.

Parameters
[in]callbackThe callback function to register
[in]user_dataThe user data to be passed to the callback function
Returns
0 on success, otherwise a negative error value.
Return values
BT_ERROR_NONESuccessful
BT_ERROR_NOT_INITIALIZEDNot initialized
BT_ERROR_INVALID_PARAMETERInvalid parameter
BT_ERROR_NOT_SUPPORTEDNot supported
Precondition
The PBAP client must be initialized with bt_pbap_client_initialize().
See also
bt_pbap_client_initialize()
int bt_pbap_client_unset_connection_state_changed_cb ( void  )

Unregisters a callback function that will be invoked when the connection state is changed. 3.0.

Returns
0 on success, otherwise a negative error value.
Return values
BT_ERROR_NONESuccessful
BT_ERROR_NOT_INITIALIZEDNot initialized
BT_ERROR_NOT_SUPPORTEDNot supported
Precondition
The PBAP client must be initialized with bt_pbap_client_initialize().
See also
bt_pbap_client_initialize()
int bt_socket_connect_rfcomm ( const char *  remote_address,
const char *  service_uuid 
)

Connects to a specific RFCOMM based service on a remote Bluetooth device UUID, asynchronously. 2.3 public http://tizen.org/privilege/bluetooth.

Remarks
A connection can be disconnected by bt_socket_disconnect_rfcomm().
Parameters
[in]remote_addressThe address of the remote Bluetooth device
[in]service_uuidThe UUID of service provided by the remote Bluetooth device
Returns
0 on success, otherwise a negative error value.
Return values
BT_ERROR_NONESuccessful
BT_ERROR_NOT_INITIALIZEDNot initialized
BT_ERROR_INVALID_PARAMETERInvalid parameter
BT_ERROR_NOT_ENABLEDNot enabled
BT_ERROR_OPERATION_FAILEDOperation failed
BT_ERROR_PERMISSION_DENIEDPermission denied
BT_ERROR_NOT_SUPPORTEDNot supported
Precondition
The state of local Bluetooth must be BT_ADAPTER_ENABLED.
The remote device must be discoverable with bt_adapter_start_device_discovery().
The bond with the remote device must be created with bt_device_create_bond().
Postcondition
This function invokes bt_socket_connection_state_changed_cb().
See also
bt_device_create_bond()
bt_adapter_start_device_discovery()
bt_device_start_service_search()
bt_socket_disconnect_rfcomm()
bt_socket_connection_state_changed_cb()
bt_socket_set_connection_state_changed_cb()
bt_socket_unset_connection_state_changed_cb()
int bt_socket_create_rfcomm ( const char *  service_uuid,
int *  socket_fd 
)

Registers a RFCOMM server socket with a specific UUID. 2.3 public http://tizen.org/privilege/bluetooth.

Remarks
A socket can be destroyed by bt_socket_destroy_rfcomm().
Parameters
[in]service_uuidThe UUID of service to provide
[out]socket_fdThe file descriptor of socket to listen
Returns
0 on success, otherwise a negative error value.
Return values
BT_ERROR_NONESuccessful
BT_ERROR_NOT_INITIALIZEDNot initialized
BT_ERROR_INVALID_PARAMETERInvalid parameter
BT_ERROR_NOT_ENABLEDNot enabled
BT_ERROR_OPERATION_FAILEDOperation failed
BT_ERROR_PERMISSION_DENIEDPermission denied
BT_ERROR_NOT_SUPPORTEDNot supported
Precondition
The state of local Bluetooth must be BT_ADAPTER_ENABLED.
See also
bt_socket_listen_and_accept_rfcomm()
bt_socket_destroy_rfcomm()
int bt_socket_destroy_rfcomm ( int  socket_fd)

Removes the RFCOMM server socket which was created using bt_socket_create_rfcomm(). 2.3 public http://tizen.org/privilege/bluetooth.

Remarks
If callback function bt_socket_connection_state_changed_cb() is set and the remote Bluetooth device is connected,
then bt_socket_connection_state_changed_cb() will be called when this function is finished successfully.
Parameters
[in]socket_fdThe file descriptor of socket (which was created using bt_socket_create_rfcomm()) to destroy
Returns
0 on success, otherwise a negative error value.
Return values
BT_ERROR_NONESuccessful
BT_ERROR_NOT_INITIALIZEDNot initialized
BT_ERROR_INVALID_PARAMETERInvalid parameter
BT_ERROR_NOT_ENABLEDNot enabled
BT_ERROR_OPERATION_FAILEDOperation failed
BT_ERROR_PERMISSION_DENIEDPermission denied
BT_ERROR_NOT_SUPPORTEDNot supported
Precondition
The socket must be created with bt_socket_create_rfcomm().
Postcondition
If callback function bt_socket_connection_state_changed_cb() is set and the remote Bluetooth device is connected, then bt_socket_connection_state_changed_cb() will be called.
See also
bt_socket_create_rfcomm()
bt_socket_connection_state_changed_cb()
bt_socket_set_connection_state_changed_cb()
bt_socket_unset_connection_state_changed_cb()
int bt_socket_disconnect_rfcomm ( int  socket_fd)

Disconnects the RFCOMM connection with the given file descriptor of connected socket. 2.3 public http://tizen.org/privilege/bluetooth.

Parameters
[in]socket_fdThe file descriptor of socket to close which was received using bt_socket_connection_state_changed_cb().
Returns
0 on success, otherwise a negative error value.
Return values
BT_ERROR_NONESuccessful
BT_ERROR_NOT_INITIALIZEDNot initialized
BT_ERROR_NOT_ENABLEDNot enabled
BT_ERROR_INVALID_PARAMETERInvalid parameter
BT_ERROR_PERMISSION_DENIEDPermission denied
BT_ERROR_NOT_SUPPORTEDNot supported
Precondition
The connection must be established.
See also
bt_socket_connection_state_changed_cb()
bt_socket_set_connection_state_changed_cb()
bt_socket_unset_connection_state_changed_cb()
int bt_socket_listen_and_accept_rfcomm ( int  socket_fd,
int  max_pending_connections 
)

Starts listening on passed RFCOMM socket and accepts connection requests.

Pop-up is shown automatically when a RFCOMM connection is requested.
bt_socket_connection_state_changed_cb() will be called with
BT_SOCKET_CONNECTED if you click "yes" and connection is finished successfully. 2.3 public http://tizen.org/privilege/bluetooth

Parameters
[in]socket_fdThe file descriptor of socket on which start to listen
[in]max_pending_connectionsThe maximum number of pending connections
Returns
0 on success, otherwise a negative error value.
Return values
BT_ERROR_NONESuccessful
BT_ERROR_NOT_INITIALIZEDNot initialized
BT_ERROR_NOT_ENABLEDNot enabled
BT_ERROR_INVALID_PARAMETERInvalid parameter
BT_ERROR_OPERATION_FAILEDOperation failed
BT_ERROR_PERMISSION_DENIEDPermission denied
BT_ERROR_NOT_SUPPORTEDNot supported
Precondition
The socket must be created with bt_socket_create_rfcomm().
Postcondition
If callback function bt_socket_connection_state_changed_cb() is set, then bt_socket_connection_state_changed_cb() will be called when the remote Bluetooth device is connected.
See also
bt_socket_create_rfcomm()
bt_socket_connection_state_changed_cb()
bt_socket_set_connection_state_changed_cb()
bt_socket_unset_connection_state_changed_cb()
int bt_socket_send_data ( int  socket_fd,
const char *  data,
int  length 
)

Sends data to the connected device. 2.3 public http://tizen.org/privilege/bluetooth.

Remarks
The specific error code can be obtained using the get_last_result() method. Error codes are described in Exception section.
Parameters
[in]socket_fdThe file descriptor of connected socket which was received using bt_socket_connection_state_changed_cb()
[in]dataThe data to be sent
[in]lengthThe length of data to be sent
Returns
the number of bytes written (zero indicates nothing was written).
Return values
Onerror, -1 is returned, and errno is set appropriately. See write 2 man page.
BT_ERROR_NOT_INITIALIZEDNot initialized
BT_ERROR_NOT_SUPPORTEDNot supported
BT_ERROR_INVALID_PARAMETERInvalid parameter
Exceptions
BT_ERROR_PERMISSION_DENIEDPermission denied
BT_ERROR_AGAINResource temporarily unavailable
Precondition
The connection must be established.
See also
bt_socket_connection_state_changed_cb()
bt_socket_set_connection_state_changed_cb()
bt_socket_unset_connection_state_changed_cb()
int bt_socket_set_connection_requested_cb ( bt_socket_connection_requested_cb  callback,
void *  user_data 
)

Registers a callback function that will be invoked when a RFCOMM connection is requested. 2.3.

Parameters
[in]callbackThe callback function to register
[in]user_dataThe user data to be passed to the callback function
Returns
0 on success, otherwise a negative error value.
Return values
BT_ERROR_NONESuccessful
BT_ERROR_NOT_INITIALIZEDNot initialized
BT_ERROR_INVALID_PARAMETERInvalid parameter
BT_ERROR_NOT_SUPPORTEDNot supported
Precondition
The Bluetooth service must be initialized with bt_initialize().
Postcondition
bt_socket_connection_requested_cb() will be invoked.
See also
bt_initialize()
bt_socket_unset_connection_requested_cb()
int bt_socket_set_connection_state_changed_cb ( bt_socket_connection_state_changed_cb  callback,
void *  user_data 
)

Registers a callback function that will be invoked when the connection state changes. 2.3.

Parameters
[in]callbackThe callback function to register
[in]user_dataThe user data to be passed to the callback function
Returns
0 on success, otherwise a negative error value.
Return values
BT_ERROR_NONESuccessful
BT_ERROR_NOT_INITIALIZEDNot initialized
BT_ERROR_INVALID_PARAMETERInvalid parameter
BT_ERROR_NOT_SUPPORTEDNot supported
Precondition
The Bluetooth service must be initialized with bt_initialize().
Postcondition
bt_socket_connection_state_changed_cb() will be invoked.
See also
bt_initialize()
bt_socket_connection_state_changed_cb()
bt_socket_unset_connection_state_changed_cb()
int bt_socket_set_data_received_cb ( bt_socket_data_received_cb  callback,
void *  user_data 
)

Registers a callback function that will be invoked when you receive data. 2.3.

Parameters
[in]callbackThe callback function to register
[in]user_dataThe user data to be passed to the callback function
Returns
0 on success, otherwise a negative error value.
Return values
BT_ERROR_NONESuccessful
BT_ERROR_NOT_INITIALIZEDNot initialized
BT_ERROR_INVALID_PARAMETERInvalid parameter
BT_ERROR_NOT_SUPPORTEDNot supported
Precondition
The Bluetooth service must be initialized with bt_initialize().
Postcondition
bt_socket_data_received_cb() will be invoked.
See also
bt_initialize()
bt_socket_data_received_cb()
bt_socket_set_data_received_cb()
bt_socket_unset_data_received_cb()
int bt_socket_unset_connection_requested_cb ( void  )

Unregisters the callback function. 2.3.

Returns
0 on success, otherwise a negative error value.
Return values
BT_ERROR_NONESuccessful
BT_ERROR_NOT_INITIALIZEDNot initialized
BT_ERROR_NOT_SUPPORTEDNot supported
Precondition
The Bluetooth service must be initialized with bt_initialize().
See also
bt_initialize()
bt_socket_set_connection_requested_cb()
bt_socket_connection_requested_cb()
int bt_socket_unset_connection_state_changed_cb ( void  )

Unregisters the callback function. 2.3.

Returns
0 on success, otherwise a negative error value.
Return values
BT_ERROR_NONESuccessful
BT_ERROR_NOT_INITIALIZEDNot initialized
BT_ERROR_NOT_SUPPORTEDNot supported
Precondition
The Bluetooth service must be initialized with bt_initialize().
See also
bt_initialize()
bt_socket_connection_state_changed_cb()
bt_socket_set_connection_state_changed_cb()
int bt_socket_unset_data_received_cb ( void  )

Unregisters the callback function. 2.3.

Returns
0 on success, otherwise a negative error value.
Return values
BT_ERROR_NONESuccessful
BT_ERROR_NOT_INITIALIZEDNot initialized
BT_ERROR_NOT_SUPPORTEDNot supported
Precondition
The Bluetooth service must be initialized with bt_initialize().
See also
bt_initialize()
bt_socket_data_received_cb()
bt_socket_set_data_received_cb()