Tizen Native API
5.5
|
Bluetooth Service provides API to manage Bluetooth device.
#include <bluetooth.h>
Bluetooth Service consists of Bluetooth Adapter, Bluetooth Device and Bluetooth Socket.
In order to use the above APIs, you must call bt_initialize() in advance. In addition, bt_deinitialize() should be called when Bluetooth Service is no longer needed. Please refer Bluetooth Tutorial if you want to get more detailed usages and information of this api.
Note on callbacks: All callbacks in this module are called in the main loop context.
This API is related with the following features:
It is recommended to design feature related codes in your application for reliability.
You can check if a device supports the related features for this API by using System Information,thereby controlling the procedure of your application.
To ensure your application is only running on the device with specific features, please define the features in your manifest file using the manifest editor in the SDK.
More details on featuring your application can be found from Feature Element.
Functions | |
int | bt_initialize (void) |
Initializes the Bluetooth API. | |
int | bt_deinitialize (void) |
Releases all resources of the Bluetooth API. | |
int | bt_get_uuid_name (const char *uuid, char **name) |
Gets the specification name for the given UUID. |
enum bt_error_e |
Enumerations of Bluetooth error codes.
int bt_deinitialize | ( | void | ) |
Releases all resources of the Bluetooth API.
BT_ERROR_NONE | Successful |
BT_ERROR_NOT_INITIALIZED | Not initialized |
BT_ERROR_OPERATION_FAILED | Operation failed |
BT_ERROR_NOT_SUPPORTED | Not supported |
int bt_get_uuid_name | ( | const char * | uuid, |
char ** | name | ||
) |
Gets the specification name for the given UUID.
[in] | uuid | The UUID |
[out] | name | The specification name defined at www.bluetooth.com |
BT_ERROR_NONE | Successful |
BT_ERROR_INVALID_PARAMETER | Invalid parameter |
BT_ERROR_NOT_SUPPORTED | Not supported |
int bt_initialize | ( | void | ) |
Initializes the Bluetooth API.
BT_ERROR_NONE | Successful |
BT_ERROR_OPERATION_FAILED | Operation failed |
BT_ERROR_NOT_SUPPORTED | Not supported |