struct _bluetooth_view
{
common_view* view;
-
+ bt_adapter_state_e adapter_state;
Evas_Object *create_label;
};
ui_utils_guide_instruction_popup_button(navi, "Instructions:<br/>Test Type One<br/>1.Bluetooth On<br/>2. Create Bond with some device and Create Bonding callback Invoked<br/><br/>Test Type Two<br/>1. Bluetooth Off<br/>2. Correct Error Message Displayed<br/><b>Note:You can also refer info section");
char resultc[256] ={0,};
- sprintf(resultc, "result = %s",get_bluetooth_error(ret));
- ui_utils_label_set_text(this->create_label, resultc, "left");
+ ret = bt_adapter_get_state(&this->adapter_state);
+ RETVM_IF(ret != BT_ERROR_NONE, NULL,"bt_adapter_get_state fail > Error = %d", get_bluetooth_error(ret));
+
+ //If the Bluetooth Service is not enabled
+ if(this->adapter_state == BT_ADAPTER_ENABLED)
+ {
+ sprintf(resultc, "result = %s","BT_ERROR_NONE");
+ }
+ else
+ {
+ sprintf(resultc, "result = %s","BT_ERROR_NOT_ENABLED");
+ }
+
+ ui_utils_label_set_text(this->create_label, resultc, "left");
ret = bt_device_set_bond_created_cb(Bluetooth_bt_device_bond_created_cb_p, this);
DBG("bt_device_set_bond_created_cb %d", ret);
RETVM_IF(ret != BT_ERROR_NONE && ret != BT_ERROR_NOT_SUPPORTED, NULL, "bt_device_set_bond_created_cb failed : %s", get_bluetooth_error(ret));
ui_utils_guide_instruction_popup_button(navi, "Instructions:<br/>Test Type One<br/>1.Bluetooth On<br/>2. Create bond with device and destroy bond then Destroy Bonding callback Invoked<br/><br/>Test Type Two<br/>1. Bluetooth Off<br/>2. Correct Error Message Displayed<br/><b>Note:You can also refer info section");
char resultc[256] ={0,};
- sprintf(resultc, "result = %s",get_bluetooth_error(ret));
- ui_utils_label_set_text(this->create_label, resultc, "left");
+ ret = bt_adapter_get_state(&this->adapter_state);
+ RETVM_IF(ret != BT_ERROR_NONE, NULL,"bt_adapter_get_state fail > Error = %d", get_bluetooth_error(ret));
+
+ //If the Bluetooth Service is not enabled
+ if(this->adapter_state == BT_ADAPTER_ENABLED)
+ {
+ sprintf(resultc, "result = %s","BT_ERROR_NONE");
+ }
+ else
+ {
+ sprintf(resultc, "result = %s","BT_ERROR_NOT_ENABLED");
+ }
+
+ ui_utils_label_set_text(this->create_label, resultc, "left");
ret = bt_device_set_bond_destroyed_cb(Bluetooth_bt_device_bond_destroyed_cb_p, this);
RETVM_IF(ret != BT_ERROR_NONE && ret != BT_ERROR_NOT_SUPPORTED, NULL, "bt_device_set_bond_created_cb failed : %s", get_bluetooth_error(ret));