Functions |
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().
|
int | bt_opp_server_deinitialize (void) |
| Denitializes the Bluetooth OPP server.
|
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.
|
int | bt_opp_server_reject (void) |
| Rejects the push request from the remote device.
|
int | bt_opp_server_cancel_transfer (int transfer_id) |
| Cancels the transfer.
|
int | bt_opp_server_set_destination (const char *destination) |
| Sets the destination path of file to be pushed.
|
Typedefs |
typedef void(* | bt_opp_server_transfer_progress_cb )(const char *file, long long size, int percent, void *user_data) |
| Called when a file is being transfered.
|
typedef void(* | bt_opp_server_transfer_finished_cb )(int result, const char *file, long long size, void *user_data) |
| Called when a transfer is finished.
|
Bluetooth OPP(Object Push Profile) Server API provides functions for accepting objects such as pictures.
Required Header
#include <bluetooth.h>
Overview
This is OPP server APIs.
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.
Typedef Documentation
Called when a transfer is finished.
- Since :
- 2.3.1
- Parameters:
-
[in] | error_code | The result of push |
[in] | file | The path of file to be pushed |
[in] | size | The file size (bytes) |
[in] | user_data | The user data passed from the callback registration function |
- See also:
- bt_opp_server_accept()
-
bt_opp_server_accept_connection()
Called when a file is being transfered.
- Since :
- 2.3.1
- Parameters:
-
[in] | file | The path of file to be pushed |
[in] | size | The file size (bytes) |
[in] | percent | The progress in percentage (1 ~ 100) |
[in] | user_data | The user data passed from the callback registration function |
- See also:
- bt_opp_server_accept()
-
bt_opp_server_accept_connection()
Function Documentation
Accepts the push request from the remote device.
- Since :
- 2.3.1
- Privilege Level:
- public
- Privilege:
- http://tizen.org/privilege/bluetooth
- Parameters:
-
[in] | progress_cb | The callback called when a file is being transfered |
[in] | finished_cb | The callback called when a transfer is finished |
[in] | name | The name to store. This can be NULL if you initialize OPP server by bt_opp_server_initialize_by_connection_request(). |
[in] | user_data | The user data to be passed to the callback function |
[out] | transfer_id | The ID of transfer |
- Returns:
- 0 on success, otherwise a negative error value.
- Return values:
-
- See also:
- bt_opp_server_reject()
Cancels the transfer.
- Since :
- 2.3.1
- Privilege Level:
- public
- Privilege:
- http://tizen.org/privilege/bluetooth
- Parameters:
-
[in] | transfer_id | The ID of transfer |
- Returns:
- 0 on success, otherwise a negative error value.
- Return values:
-
- See also:
- bt_opp_server_accept()
Denitializes the Bluetooth OPP server.
- Since :
- 2.3.1
- Returns:
- 0 on success, otherwise a negative error value.
- Return values:
-
- See also:
- bt_opp_server_deinitialize()
Initializes the Bluetooth OPP server requested by bt_opp_server_connection_requested_cb().
- Since :
- 2.3.1
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().
- Parameters:
-
[in] | destination | The destination path |
[in] | connection_requested_cb | The callback called when an OPP connection is requested |
[in] | user_data | The user data to be passed to the callback function |
- Returns:
- 0 on success, otherwise a negative error value.
- Return values:
-
- See also:
- bt_opp_server_connection_requested_cb()
-
bt_opp_server_deinitialize()
-
bt_opp_server_accept()
-
bt_opp_server_reject()
Rejects the push request from the remote device.
- Since :
- 2.3.1
- Privilege Level:
- public
- Privilege:
- http://tizen.org/privilege/bluetooth
- Returns:
- 0 on success, otherwise a negative error value.
- Return values:
-
- See also:
- bt_opp_server_accept()
Sets the destination path of file to be pushed.
- Since :
- 2.3.1
- Privilege Level:
- public
- Privilege:
- http://tizen.org/privilege/bluetooth
- Parameters:
-
[in] | destination | The destination path of file to be pushed |
- Returns:
- 0 on success, otherwise a negative error value.
- Return values:
-