return 0;
}
+
+//& purpose: To test bt_adapter_le_set_advertising_flags
+//& type: auto
+/**
+ * @testcase ITc_bt_adapter_le_set_advertising_flags
+ * @since_tizen 8.0
+ * @author SRID(tarun1.kumar)
+ * @reviewer SRID(shobhit.v)
+ * @type Positive
+ * @description To test bt_adapter_le_set_advertising_flags
+ * @scenario Call bt_adapter_le_set_advertising_flags
+ * @apicovered bt_adapter_le_set_advertising_flags , bt_adapter_le_create_advertiser
+ * @passcase If target API bt_adapter_le_set_advertising_flags return 0
+ * @failcase If target API bt_adapter_le_set_advertising_flags return 1
+ * @precondition Bluetooth must be initialized
+ * @postcondition Bluetooth must be deinitialized
+ */
+int ITc_bt_adapter_le_set_advertising_flags_p(void)
+{
+ START_TEST;
+
+ bt_advertiser_h advertiser = NULL;
+ int nRet = bt_adapter_le_create_advertiser(&advertiser);
+
+ if ( !g_bBluetoothIsLESupported )
+ {
+ PRINT_RESULT(BT_ERROR_NOT_SUPPORTED, nRet, "bt_adapter_le_create_advertiser", BluetoothGetError(nRet));
+ return 0;
+ }
+
+ PRINT_RESULT(BT_ERROR_NONE, nRet, "bt_adapter_le_create_advertiser", BluetoothGetError(nRet));
+
+ nRet = bt_adapter_le_set_advertising_flags(advertiser,BT_ADAPTER_LE_ADVERTISING_FLAGS_GEN_DISC | BT_ADAPTER_LE_ADVERTISING_FLAGS_BREDR_UNSUP);
+ PRINT_RESULT_CLEANUP(BT_ERROR_NONE, nRet, "bt_adapter_le_set_advertising_flags", BluetoothGetError(nRet),bt_adapter_le_destroy_advertiser(advertiser));
+
+ nRet = bt_adapter_le_destroy_advertiser(advertiser);
+ PRINT_RESULT(BT_ERROR_NONE, nRet, "bt_adapter_le_destroy_advertiser", BluetoothGetError(nRet));
+ return 0;
+}
+
+
/** @} */
/** @} */
extern int ITc_bt_adapter_le_stop_advertising_p(void);
extern int ITc_bt_adapter_le_clear_advertising_data_p(void);
extern int ITc_bt_adapter_le_set_scan_mode_p(void);
+extern int ITc_bt_adapter_le_set_advertising_flags_p(void);
extern int ITc_bluetooth_adapter_bt_adapter_set_get_name_p(void);
extern int ITc_bluetooth_adapter_bt_adapter_set_unset_name_changed_cb_p(void);
extern int ITc_bluetooth_adapter_bt_adapter_get_visibility_p(void);
{"ITc_bluetooth_bt_socket_listen_l2cap_channel_p", ITc_bluetooth_bt_socket_listen_l2cap_channel_p, ITs_bluetooth_l2cap_channel_startup, ITs_bluetooth_l2cap_channel_cleanup},
{"ITc_bluetooth_bt_socket_set_unset_l2cap_channel_connection_requested_cb_p", ITc_bluetooth_bt_socket_set_unset_l2cap_channel_connection_requested_cb_p, ITs_bluetooth_l2cap_channel_startup, ITs_bluetooth_l2cap_channel_cleanup},
{"ITc_bluetooth_bt_socket_set_unset_l2cap_channel_connection_state_changed_cb_p", ITc_bluetooth_bt_socket_set_unset_l2cap_channel_connection_state_changed_cb_p, ITs_bluetooth_l2cap_channel_startup, ITs_bluetooth_l2cap_channel_cleanup},
+ {"ITc_bt_adapter_le_set_advertising_flags_p", ITc_bt_adapter_le_set_advertising_flags_p, ITs_bluetooth_adapter_le_startup, ITs_bluetooth_adapter_le_cleanup},
{NULL, NULL}
};
extern int ITc_bt_adapter_le_stop_advertising_p(void);
extern int ITc_bt_adapter_le_clear_advertising_data_p(void);
extern int ITc_bt_adapter_le_set_scan_mode_p(void);
+extern int ITc_bt_adapter_le_set_advertising_flags_p(void);
extern int ITc_bluetooth_adapter_bt_adapter_set_get_name_p(void);
extern int ITc_bluetooth_adapter_bt_adapter_set_unset_name_changed_cb_p(void);
extern int ITc_bluetooth_adapter_bt_adapter_get_visibility_p(void);
{"ITc_bluetooth_bt_socket_get_l2cap_psm_p", ITc_bluetooth_bt_socket_get_l2cap_psm_p, ITs_bluetooth_l2cap_channel_startup, ITs_bluetooth_l2cap_channel_cleanup},
{"ITc_bluetooth_bt_socket_listen_l2cap_channel_p", ITc_bluetooth_bt_socket_listen_l2cap_channel_p, ITs_bluetooth_l2cap_channel_startup, ITs_bluetooth_l2cap_channel_cleanup},
{"ITc_bluetooth_bt_socket_set_unset_l2cap_channel_connection_requested_cb_p", ITc_bluetooth_bt_socket_set_unset_l2cap_channel_connection_requested_cb_p, ITs_bluetooth_l2cap_channel_startup, ITs_bluetooth_l2cap_channel_cleanup},
- {"ITc_bluetooth_bt_socket_set_unset_l2cap_channel_connection_state_changed_cb_p", ITc_bluetooth_bt_socket_set_unset_l2cap_channel_connection_state_changed_cb_p, ITs_bluetooth_l2cap_channel_startup, ITs_bluetooth_l2cap_channel_cleanup},
+ {"ITc_bluetooth_bt_socket_set_unset_l2cap_channel_connection_state_changed_cb_p", ITc_bluetooth_bt_socket_set_unset_l2cap_channel_connection_state_changed_cb_p, ITs_bluetooth_l2cap_channel_startup, ITs_bluetooth_l2cap_channel_cleanup},
+ {"ITc_bt_adapter_le_set_advertising_flags_p", ITc_bt_adapter_le_set_advertising_flags_p, ITs_bluetooth_adapter_le_startup, ITs_bluetooth_adapter_le_cleanup},
{NULL, NULL}
};
extern int ITc_bt_adapter_le_stop_advertising_p(void);
extern int ITc_bt_adapter_le_clear_advertising_data_p(void);
extern int ITc_bt_adapter_le_set_scan_mode_p(void);
+extern int ITc_bt_adapter_le_set_advertising_flags_p(void);
extern int ITc_bluetooth_adapter_bt_adapter_set_get_name_p(void);
extern int ITc_bluetooth_adapter_bt_adapter_set_unset_name_changed_cb_p(void);
extern int ITc_bluetooth_adapter_bt_adapter_get_visibility_p(void);
{"ITc_bluetooth_bt_socket_listen_l2cap_channel_p", ITc_bluetooth_bt_socket_listen_l2cap_channel_p, ITs_bluetooth_l2cap_channel_startup, ITs_bluetooth_l2cap_channel_cleanup},
{"ITc_bluetooth_bt_socket_set_unset_l2cap_channel_connection_requested_cb_p", ITc_bluetooth_bt_socket_set_unset_l2cap_channel_connection_requested_cb_p, ITs_bluetooth_l2cap_channel_startup, ITs_bluetooth_l2cap_channel_cleanup},
{"ITc_bluetooth_bt_socket_set_unset_l2cap_channel_connection_state_changed_cb_p", ITc_bluetooth_bt_socket_set_unset_l2cap_channel_connection_state_changed_cb_p, ITs_bluetooth_l2cap_channel_startup, ITs_bluetooth_l2cap_channel_cleanup},
+ {"ITc_bt_adapter_le_set_advertising_flags_p", ITc_bt_adapter_le_set_advertising_flags_p, ITs_bluetooth_adapter_le_startup, ITs_bluetooth_adapter_le_cleanup},
{NULL, NULL}
};