Tizen Native API
|
Functions | |
int | bt_initialize (void) |
Initializes the Bluetooth API. | |
int | bt_deinitialize (void) |
Releases all resources of the Bluetooth API. |
Bluetooth Service provides API to manage Bluetooth device.
Required Header
#include <bluetooth.h>
Overview
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.
Related Features
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.
Enumeration Type Documentation
enum bt_error_e |
Enumerations of Bluetooth error codes.
- Since :
- 2.3
- Enumerator:
Function Documentation
int bt_deinitialize | ( | void | ) |
Releases all resources of the Bluetooth API.
- Since :
- 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_NONE Successful BT_ERROR_NOT_INITIALIZED Not initialized BT_ERROR_OPERATION_FAILED Operation failed BT_ERROR_NOT_SUPPORTED Not supported
- Precondition:
- Bluetooth API must be initialized with bt_initialize().
- See also:
- bt_initialize()
int bt_initialize | ( | void | ) |
Initializes the Bluetooth API.
- Since :
- 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_NONE Successful BT_ERROR_OPERATION_FAILED Operation failed BT_ERROR_NOT_SUPPORTED Not supported
- See also:
- bt_deinitialize()