int _bt_gatt_client_update_all(bt_gatt_client_h client);
-/**
- * @internal
- * @brief IPSP Init state changed callback
- */
-typedef void (*bt_le_ipsp_init_state_changed_cb)
- (int result, bool ipsp_initialized, void *user_data);
-
-/**
- * @internal
- * @brief Initialize Bluetooth LE IPSP service and set the callback
- */
-int bt_le_ipsp_initialize(bt_le_ipsp_init_state_changed_cb callback, void *user_data);
-
-/**
- * @internal
- * @brief De-Initialize Bluetooth LE IPSP service and unset the callback
- */
-int bt_le_ipsp_deinitialize(void);
-
-/**
- * @internal
- * @brief Connect to a IPSP service over LE to remote device.
- */
-int bt_le_ipsp_connect(const char *address);
-
-/**
- * @internal
- * @brief Disconnect to a IPSP service over LE to remote device.
- */
-int bt_le_ipsp_disconnect(const char *address);
-
-/**
-* @internal
-* @brief Check whether IPSP service is initialized
-*/
-int bt_le_ipsp_is_initialized(void);
-
-/**
- * @internal
- * @brief IPSP Connection state changed callback
- */
-typedef void (*bt_le_ipsp_connection_state_changed_cb)
- (int result, bool connected, const char *remote_address, const char *iface_name, void *user_data);
-/**
- * @internal
- * @brief Set IPSP connection state event change callback.
- */
-int bt_le_ipsp_set_connection_state_changed_cb(bt_le_ipsp_connection_state_changed_cb callback,
- void *user_data);
-
-/**
- * @internal
- * @brief Unset IPSP connection state event change callback.
- */
-int bt_le_ipsp_unset_connection_state_changed_cb(void);
-
-/**
- * @internal
- * @brief IPSP Connection Interface Info callback
- */
-typedef void (*bt_le_ipsp_interface_info_cb)
- (int result, const char *remote_address, const char *if_name,
- void *user_data);
-
/**
* @ingroup CAPI_NETWORK_BLUETOOTH_LE_MODULE
* @brief Reads the maximum data length of LE packets supported by the controller.
*/
int bt_dpm_get_data_transfer_state(bt_dpm_status_e *value);
+/**
+ * @internal
+ * @brief Initialize Bluetooth IPSP service and set the callback
+ */
+int bt_ipsp_initialize(bt_ipsp_init_state_changed_cb callback, void *user_data);
+
+/**
+ * @internal
+ * @brief De-Initialize Bluetooth IPSP service and unset the callback
+ */
+int bt_ipsp_deinitialize(void);
+
+/**
+ * @internal
+ * @brief Connect to a IPSP service over LE to remote device.
+ */
+int bt_ipsp_connect(const char *address);
+
+/**
+ * @internal
+ * @brief Disconnect to a IPSP service over LE to remote device.
+ */
+int bt_ipsp_disconnect(const char *address);
+
+/**
+* @internal
+* @brief Check whether IPSP service is initialized
+*/
+int bt_ipsp_is_initialized(void);
+
+/**
+ * @internal
+ * @brief Set IPSP connection state event change callback.
+ */
+int bt_ipsp_set_connection_state_changed_cb(bt_ipsp_connection_state_changed_cb callback,
+ void *user_data);
+
+/**
+ * @internal
+ * @brief Unset IPSP connection state event change callback.
+ */
+int bt_ipsp_unset_connection_state_changed_cb(void);
+
/**
* @}
*/
* @see bt_hid_device_set_data_received_cb()
*/
typedef void (*bt_hid_device_data_received_cb)(const bt_hid_device_received_data_s *data, void *user_data);
-/* HID device related type */
+
+/**
+ * @internal
+ * @ingroup
+ * @brief IPSP Init state changed callback
+ * @since_tizen 3.0
+ */
+typedef void (*bt_ipsp_init_state_changed_cb)
+ (int result, bool ipsp_initialized, void *user_data);
+
+/**
+ * @internal
+ * @ingroup
+ * @since_tizen 3.0
+
+ * @brief IPSP Connection state changed callback
+ */
+typedef void (*bt_ipsp_connection_state_changed_cb)
+ (int result, bool connected, const char *remote_address, const char *iface_name, void *user_data);
/**
*/
int bt_dpm_get_data_transfer_state(bt_dpm_status_e *value);
+/**
+ * @internal
+ * @brief Initialize Bluetooth IPSP service and set the callback
+ */
+int bt_ipsp_initialize(bt_ipsp_init_state_changed_cb callback, void *user_data);
+
+/**
+ * @internal
+ * @brief De-Initialize Bluetooth IPSP service and unset the callback
+ */
+int bt_ipsp_deinitialize(void);
+
+/**
+ * @internal
+ * @brief Connect to a IPSP service over LE to remote device.
+ */
+int bt_ipsp_connect(const char *address);
+
+/**
+ * @internal
+ * @brief Disconnect to a IPSP service over LE to remote device.
+ */
+int bt_ipsp_disconnect(const char *address);
+
+/**
+* @internal
+* @brief Check whether IPSP service is initialized
+*/
+int bt_ipsp_is_initialized(void);
+
+/**
+ * @internal
+ * @brief Set IPSP connection state event change callback.
+ */
+int bt_ipsp_set_connection_state_changed_cb(bt_ipsp_connection_state_changed_cb callback,
+ void *user_data);
+
+/**
+ * @internal
+ * @brief Unset IPSP connection state event change callback.
+ */
+int bt_ipsp_unset_connection_state_changed_cb(void);
+
/**
* @}
*/
* @see bt_hid_device_set_data_received_cb()
*/
typedef void (*bt_hid_device_data_received_cb)(const bt_hid_device_received_data_s *data, void *user_data);
-/* HID device related type */
+/**
+ * @internal
+ * @brief IPSP Init state changed callback
+ */
+typedef void (*bt_ipsp_init_state_changed_cb)
+ (int result, bool ipsp_initialized, void *user_data);
+
+/**
+ * @internal
+ * @brief IPSP Connection state changed callback
+ */
+typedef void (*bt_ipsp_connection_state_changed_cb)
+ (int result, bool connected, const char *remote_address, const char *iface_name, void *user_data);
/**
* @}
*/
int bt_dpm_get_data_transfer_state(bt_dpm_status_e *value);
+/**
+ * @internal
+ * @brief Initialize Bluetooth IPSP service and set the callback
+ */
+int bt_ipsp_initialize(bt_ipsp_init_state_changed_cb callback, void *user_data);
+
+/**
+ * @internal
+ * @brief De-Initialize Bluetooth IPSP service and unset the callback
+ */
+int bt_ipsp_deinitialize(void);
+
+/**
+ * @internal
+ * @brief Connect to a IPSP service over LE to remote device.
+ */
+int bt_ipsp_connect(const char *address);
+
+/**
+ * @internal
+ * @brief Disconnect to a IPSP service over LE to remote device.
+ */
+int bt_ipsp_disconnect(const char *address);
+
+/**
+* @internal
+* @brief Check whether IPSP service is initialized
+*/
+int bt_ipsp_is_initialized(void);
+
+/**
+ * @internal
+ * @brief Set IPSP connection state event change callback.
+ */
+int bt_ipsp_set_connection_state_changed_cb(bt_ipsp_connection_state_changed_cb callback,
+ void *user_data);
+
+/**
+ * @internal
+ * @brief Unset IPSP connection state event change callback.
+ */
+int bt_ipsp_unset_connection_state_changed_cb(void);
+
/**
* @}
*/
char **uuids;
} bt_dpm_uuids_list_s;
+/**
+ * @internal
+ * @brief IPSP Init state changed callback
+ */
+typedef void (*bt_ipsp_init_state_changed_cb)
+ (int result, bool ipsp_initialized, void *user_data);
+
+/**
+ * @internal
+ * @brief IPSP Connection state changed callback
+ */
+typedef void (*bt_ipsp_connection_state_changed_cb)
+ (int result, bool connected, const char *remote_address, const char *iface_name, void *user_data);
+
/**
* @}
*/
BT_INFO("BLUETOOTH_EVENT_IPSP_CONNECTED");
bt_ipsp_iface_info = (bt_ipsp_connection_info_t *)(param->param_data);
_bt_convert_address_to_string(&device_addr, &bt_ipsp_iface_info->btaddr);
- ((bt_le_ipsp_connection_state_changed_cb)bt_event_slot_container[event_index].callback)
+ ((bt_ipsp_connection_state_changed_cb)bt_event_slot_container[event_index].callback)
(_bt_get_error_code(param->result), TRUE, device_addr, bt_ipsp_iface_info->if_name,
bt_event_slot_container[event_index].user_data);
break;
BT_INFO("BLUETOOTH_EVENT_IPSP_DISCONNECTED");
bt_ipsp_iface_info = (bt_ipsp_connection_info_t *)(param->param_data);
_bt_convert_address_to_string(&device_addr, &bt_ipsp_iface_info->btaddr);
- ((bt_le_ipsp_connection_state_changed_cb)bt_event_slot_container[event_index].callback)
+ ((bt_ipsp_connection_state_changed_cb)bt_event_slot_container[event_index].callback)
(_bt_get_error_code(param->result), FALSE, device_addr, bt_ipsp_iface_info->if_name,
bt_event_slot_container[event_index].user_data);
break;
#endif
case BLUETOOTH_EVENT_IPSP_INIT_STATE_CHANGED: {
BT_DBG("BLUETOOTH_EVENT_IPSP_INIT_STATE_CHANGED"); /* LCOV_EXCL_LINE */
- ((bt_le_ipsp_init_state_changed_cb)bt_event_slot_container[event_index].callback) /* LCOV_EXCL_LINE */
+ ((bt_ipsp_init_state_changed_cb)bt_event_slot_container[event_index].callback) /* LCOV_EXCL_LINE */
(_bt_get_error_code(param->result), *(bool *)(param->param_data), /* LCOV_EXCL_LINE */
bt_event_slot_container[event_index].user_data);
break;
#include <bluetooth-ipsp-api.h>
#include "bluetooth.h"
+#include "bluetooth_internal.h"
#include "bluetooth_private.h"
static bool is_ipsp_initialized = false;
return BT_ERROR_NONE;
}
-int bt_le_ipsp_is_initialized(void)
+int bt_ipsp_is_initialized(void)
{
BT_CHECK_IPSP_SUPPORT();
BT_CHECK_INIT_STATUS();
return BT_ERROR_NONE;
}
-int bt_le_ipsp_initialize(bt_le_ipsp_init_state_changed_cb callback,
+int bt_ipsp_initialize(bt_ipsp_init_state_changed_cb callback,
void *user_data)
{
int error;
BT_CHECK_INIT_STATUS();
BT_CHECK_INPUT_PARAMETER(callback);
- error = bluetooth_le_ipsp_init();
+ error = bluetooth_ipsp_init();
error = _bt_get_error_code(error);
if (BT_ERROR_NONE != error) {
BT_ERR("%s(0x%08x)", _bt_convert_error_to_string(error), error);
return BT_ERROR_NONE;
}
-int bt_le_ipsp_deinitialize(void)
+int bt_ipsp_deinitialize(void)
{
int error;
BT_CHECK_INIT_STATUS();
BT_CHECK_IPSP_INIT_STATUS();
- error = bluetooth_le_ipsp_deinit();
+ error = bluetooth_ipsp_deinit();
error = _bt_get_error_code(error);
if (BT_ERROR_NONE != error) {
BT_ERR("%s(0x%08x)", _bt_convert_error_to_string(error), error);
return BT_ERROR_NONE;
}
-int bt_le_ipsp_connect(const char *address)
+int bt_ipsp_connect(const char *address)
{
int ret;
bluetooth_device_address_t bd_addr = { {0,} };
_bt_convert_address_to_hex(&bd_addr, address);
- ret = _bt_get_error_code(bluetooth_le_ipsp_connect((ipsp_device_address_t *)&bd_addr));
+ ret = _bt_get_error_code(bluetooth_ipsp_connect((ipsp_device_address_t *)&bd_addr));
if (ret != BT_ERROR_NONE)
BT_ERR("%s(0x%08x)", _bt_convert_error_to_string(ret), ret);
return ret;
}
-int bt_le_ipsp_disconnect(const char *address)
+int bt_ipsp_disconnect(const char *address)
{
int ret;
bluetooth_device_address_t bd_addr = { {0,} };
_bt_convert_address_to_hex(&bd_addr, address);
- ret = _bt_get_error_code(bluetooth_le_ipsp_disconnect((ipsp_device_address_t *)&bd_addr));
+ ret = _bt_get_error_code(bluetooth_ipsp_disconnect((ipsp_device_address_t *)&bd_addr));
if (ret != BT_ERROR_NONE)
BT_ERR("%s(0x%08x)", _bt_convert_error_to_string(ret), ret);
return ret;
}
-int bt_le_ipsp_set_connection_state_changed_cb(bt_le_ipsp_connection_state_changed_cb callback, void *user_data)
+int bt_ipsp_set_connection_state_changed_cb(bt_ipsp_connection_state_changed_cb callback, void *user_data)
{
BT_CHECK_IPSP_SUPPORT();
BT_CHECK_INIT_STATUS();
return BT_ERROR_NONE;
}
-int bt_le_ipsp_unset_connection_state_changed_cb(void)
+int bt_ipsp_unset_connection_state_changed_cb(void)
{
BT_CHECK_IPSP_SUPPORT();
BT_CHECK_INIT_STATUS();
/* IPSP functions */
{"BACK"
, BT_UNIT_TEST_FUNCTION_BACK},
- {"bt_le_ipsp_register[Server role]"
+ {"bt_ipsp_register[Server role]"
, BT_UNIT_TEST_FUNCTION_IPSP_REGISTER},
- {"bt_le_ipsp_unregister[Server role]"
+ {"bt_ipsp_unregister[Server role]"
, BT_UNIT_TEST_FUNCTION_IPSP_UNREGISTER},
- {"bt_le_ipsp_initialize[Server role]"
+ {"bt_ipsp_initialize[Server role]"
, BT_UNIT_TEST_FUNCTION_IPSP_INITIALIZE},
- {"bt_le_ipsp_deinitialize[Server role]"
+ {"bt_ipsp_deinitialize[Server role]"
, BT_UNIT_TEST_FUNCTION_IPSP_DEINITIALIZE},
- {"bt_le_ipsp_connect[Client role]"
+ {"bt_ipsp_connect[Client role]"
, BT_UNIT_TEST_FUNCTION_IPSP_CONNECT},
- {"bt_le_ipsp_disconnect[Client role]"
+ {"bt_ipsp_disconnect[Client role]"
, BT_UNIT_TEST_FUNCTION_IPSP_DISCONNECT},
- {"bt_le_ipsp_start_advertising[Server role]"
+ {"bt_ipsp_start_advertising[Server role]"
, BT_UNIT_TEST_FUNCTION_IPSP_START_ADVERTISING},
{"bt_ipsp_set_connection_state_changed_cb[Client/Server role]"
, BT_UNIT_TEST_FUNCTION_IPSP_SET_CONNECTION_STATE_CHANGED_CB},
TC_PRT("Connected %d", connected);
}
-void __bt_le_ipsp_init_state_changed_cb(int result,
+void __bt_ipsp_init_state_changed_cb(int result,
bool ipsp_initialized, void *user_data)
{
TC_PRT("result: %s", __bt_get_error_message(result));
}
}
-void __bt_le_ipsp_connection_state_changed_cb(int result,
+void __bt_ipsp_connection_state_changed_cb(int result,
bool connected, const char *remote_address, const char *iface_name, void *user_data)
{
TC_PRT("__bt_le_ipsp_connection_state_changed_cb: called");
case BT_UNIT_TEST_FUNCTION_IPSP_INITIALIZE:
/* Initialize IPSP server */
if (server != NULL && ipsp_h.svc != NULL) {
- ret = bt_le_ipsp_initialize(
- &__bt_le_ipsp_init_state_changed_cb,
+ ret = bt_ipsp_initialize(
+ &__bt_ipsp_init_state_changed_cb,
NULL);
TC_PRT("bt_le_ipsp_initialize : returns %s\n", __bt_get_error_message(ret));
} else {
break;
case BT_UNIT_TEST_FUNCTION_IPSP_DEINITIALIZE:
/* De-Initialize IPSP server */
- ret = bt_le_ipsp_deinitialize();
+ ret = bt_ipsp_deinitialize();
TC_PRT("bt_le_ipsp_deinitialize : returns %s\n", __bt_get_error_message(ret));
break;
case BT_UNIT_TEST_FUNCTION_IPSP_CONNECT:
- ret = bt_le_ipsp_connect(remote_addr);
+ ret = bt_ipsp_connect(remote_addr);
+ TC_PRT("returns %s", __bt_get_error_message(ret));
break;
case BT_UNIT_TEST_FUNCTION_IPSP_DISCONNECT:
- TC_PRT("PKPK : case BT_UNIT_TEST_FUNCTION_IPSP_DISCONNECT called");
-
- ret = bt_le_ipsp_disconnect(remote_addr);
+ ret = bt_ipsp_disconnect(remote_addr);
+ TC_PRT("returns %s", __bt_get_error_message(ret));
break;
case BT_UNIT_TEST_FUNCTION_IPSP_START_ADVERTISING: {
const char *ipsp_svc_uuid_16 = "1820";
- ret = bt_le_ipsp_is_initialized();
+ ret = bt_ipsp_is_initialized();
if (ret != BT_ERROR_NONE) {
TC_PRT("bt_le_ipsp_add_advertising_data: returns %s\n", __bt_get_error_message(ret));
break;
break;
}
case BT_UNIT_TEST_FUNCTION_IPSP_SET_CONNECTION_STATE_CHANGED_CB:
- ret = bt_le_ipsp_set_connection_state_changed_cb(
- __bt_le_ipsp_connection_state_changed_cb, NULL);
+ ret = bt_ipsp_set_connection_state_changed_cb(
+ __bt_ipsp_connection_state_changed_cb, NULL);
TC_PRT("returns %s\n", __bt_get_error_message(ret));
break;
case BT_UNIT_TEST_FUNCTION_IPSP_UNSET_CONNECTION_STATE_CHANGED_CB:
- ret = bt_le_ipsp_unset_connection_state_changed_cb();
+ ret = bt_ipsp_unset_connection_state_changed_cb();
TC_PRT("returns %s\n", __bt_get_error_message(ret));
break;