* @function utc_bluetooth_bt_audio_negative_startup
* @description check if bluetooth is supported, initialize bluetooth.
* check if media or call feature is supported, then initialize the audio profiles.
+ * @scenario initializes the bluetooth API and audio profiles, this needs to be called before each test.
* @parameter NA
* @return NA
*/
system_info_get_platform_bool("http://tizen.org/feature/network.bluetooth.audio.call", &call_supported);
#endif
- if(bt_supported) {
+ if (bt_supported) {
startup_flag = BT_ERROR_NONE;
ret = bt_initialize();
if(BT_ERROR_NONE != ret) {
return;
}
- if(media_supported || call_supported) {
+ if (media_supported || call_supported) {
ret = bt_audio_initialize();
if(BT_ERROR_NONE != ret) {
fprintf(stderr, "Startup error at %s:%d\n", __FILE__, __LINE__);
* @function utc_bluetooth_bt_audio_negative_cleanup
* @description check if media or call feature is supported, then de-initialize the audio profiles
* check if bluetooth is supported, de-initialize bluetooth.
+ * @scenario de-initializes the audio profiles and Rrelease all resources of bluetooth, this needs to be called after each test.
+
* @parameter NA
* @return NA
*/
void utc_bluetooth_bt_audio_negative_cleanup(void)
{
- if(media_supported || call_supported)
+ if (media_supported || call_supported)
bt_audio_deinitialize();
- if(bt_supported)
+ if (bt_supported)
bt_deinitialize();
}
*/
int utc_bluetooth_bt_audio_connect_n(void)
{
- if(media_supported) {
+ if (media_supported) {
assert_eq(startup_flag, BT_ERROR_NONE);
ret = bt_deinitialize();
- assert_eq(ret,BT_ERROR_NONE);
ret = bt_audio_connect("DummyAddress", BT_AUDIO_PROFILE_TYPE_A2DP);
assert_eq(ret, BT_ERROR_NOT_INITIALIZED);
*/
int utc_bluetooth_bt_audio_disconnect_n(void)
{
- if(media_supported) {
+ if (media_supported) {
assert_eq(startup_flag, BT_ERROR_NONE);
ret = bt_deinitialize();
- assert_eq(ret,BT_ERROR_NONE);
ret = bt_audio_disconnect(NULL, BT_AUDIO_PROFILE_TYPE_A2DP);
assert_eq(ret, BT_ERROR_NOT_INITIALIZED);
*/
int utc_bluetooth_bt_audio_set_connection_state_changed_cb_n(void)
{
- if(media_supported || call_supported) {
+ if (media_supported || call_supported) {
assert_eq(startup_flag, BT_ERROR_NONE);
ret = bt_deinitialize();
- assert_eq(ret,BT_ERROR_NONE);
ret = bt_audio_set_connection_state_changed_cb(NULL, NULL);
assert_eq(ret, BT_ERROR_NOT_INITIALIZED);
*/
int utc_bluetooth_bt_audio_set_connection_state_changed_cb_n1(void)
{
- if(media_supported || call_supported) {
+ if (media_supported || call_supported) {
assert_eq(startup_flag, BT_ERROR_NONE);
ret = bt_audio_set_connection_state_changed_cb(NULL, NULL);
*/
int utc_bluetooth_bt_audio_deinitialize_n(void)
{
- if(media_supported || call_supported) {
+ if (media_supported || call_supported) {
assert_eq(startup_flag, BT_ERROR_NONE);
ret = bt_deinitialize();
- assert_eq(ret, BT_ERROR_NONE);
ret = bt_audio_deinitialize();
assert_eq(ret, BT_ERROR_NOT_INITIALIZED);
*/
int utc_bluetooth_bt_audio_initialize_n(void)
{
- if(media_supported || call_supported) {
+ if (media_supported || call_supported) {
assert_eq(startup_flag, BT_ERROR_NONE);
ret = bt_deinitialize();
- assert_eq(ret, BT_ERROR_NONE);
ret = bt_audio_initialize();
assert_eq(ret, BT_ERROR_NOT_INITIALIZED);
*/
int utc_bluetooth_bt_audio_unset_connection_state_changed_cb_n(void)
{
- if(media_supported || call_supported) {
+ if (media_supported || call_supported) {
assert_eq(startup_flag, BT_ERROR_NONE);
ret = bt_deinitialize();
- assert_eq(ret, BT_ERROR_NONE);
ret = bt_audio_unset_connection_state_changed_cb();
assert_eq(ret, BT_ERROR_NOT_INITIALIZED);
*/
int utc_bluetooth_bt_avrcp_set_equalizer_state_changed_cb_n(void)
{
- assert_eq(startup_flag, BT_ERROR_NONE);
+ if (media_supported) {
+ assert_eq(startup_flag, BT_ERROR_NONE);
- ret = bt_deinitialize();
- assert_eq(ret, BT_ERROR_NONE);
+ ret = bt_deinitialize();
- ret = bt_avrcp_set_equalizer_state_changed_cb(__bt_avrcp_equalizer_state_changed_cb, NULL);
- assert_eq(ret, BT_ERROR_NOT_INITIALIZED);
+ ret = bt_avrcp_set_equalizer_state_changed_cb(__bt_avrcp_equalizer_state_changed_cb, NULL);
+ assert_eq(ret, BT_ERROR_NOT_INITIALIZED);
+ } else {
+ ret = bt_avrcp_set_equalizer_state_changed_cb(__bt_avrcp_equalizer_state_changed_cb, NULL);
+ assert_eq(ret, BT_ERROR_NOT_SUPPORTED);
+ }
return 0;
}
*/
int utc_bluetooth_bt_avrcp_set_repeat_mode_changed_cb_n(void)
{
- assert_eq(startup_flag, BT_ERROR_NONE);
+ if (media_supported) {
+ assert_eq(startup_flag, BT_ERROR_NONE);
- ret = bt_deinitialize();
- assert_eq(ret, BT_ERROR_NONE);
+ ret = bt_deinitialize();
- ret = bt_avrcp_set_repeat_mode_changed_cb(__bt_avrcp_repeat_mode_changed_cb, NULL);
- assert_eq(ret, BT_ERROR_NOT_INITIALIZED);
+ ret = bt_avrcp_set_repeat_mode_changed_cb(__bt_avrcp_repeat_mode_changed_cb, NULL);
+ assert_eq(ret, BT_ERROR_NOT_INITIALIZED);
+ } else {
+ ret = bt_avrcp_set_repeat_mode_changed_cb(__bt_avrcp_repeat_mode_changed_cb, NULL);
+ assert_eq(ret, BT_ERROR_NOT_SUPPORTED);
+ }
return 0;
}
*/
int utc_bluetooth_bt_avrcp_set_scan_mode_changed_cb_n(void)
{
- assert_eq(startup_flag, BT_ERROR_NONE);
+ if (media_supported) {
+ assert_eq(startup_flag, BT_ERROR_NONE);
- ret = bt_deinitialize();
- assert_eq(ret, BT_ERROR_NONE);
+ ret = bt_deinitialize();
- ret = bt_avrcp_set_scan_mode_changed_cb(__bt_avrcp_scan_mode_changed_cb, NULL);
- assert_eq(ret, BT_ERROR_NOT_INITIALIZED);
+ ret = bt_avrcp_set_scan_mode_changed_cb(__bt_avrcp_scan_mode_changed_cb, NULL);
+ assert_eq(ret, BT_ERROR_NOT_INITIALIZED);
+ } else {
+ ret = bt_avrcp_set_scan_mode_changed_cb(__bt_avrcp_scan_mode_changed_cb, NULL);
+ assert_eq(ret, BT_ERROR_NOT_SUPPORTED);
+ }
return 0;
}
*/
int utc_bluetooth_bt_avrcp_set_shuffle_mode_changed_cb_n(void)
{
- assert_eq(startup_flag, BT_ERROR_NONE);
+ if (media_supported) {
+ assert_eq(startup_flag, BT_ERROR_NONE);
- ret = bt_deinitialize();
- assert_eq(ret, BT_ERROR_NONE);
+ ret = bt_deinitialize();
- ret = bt_avrcp_set_shuffle_mode_changed_cb(__bt_avrcp_scan_mode_changed_cb, NULL);
- assert_eq(ret, BT_ERROR_NOT_INITIALIZED);
+ ret = bt_avrcp_set_shuffle_mode_changed_cb(__bt_avrcp_set_shuffle_mode_changed_cb, NULL);
+ assert_eq(ret, BT_ERROR_NOT_INITIALIZED);
+ } else {
+ ret = bt_avrcp_set_shuffle_mode_changed_cb(__bt_avrcp_set_shuffle_mode_changed_cb, NULL);
+ assert_eq(ret, BT_ERROR_NOT_SUPPORTED);
+ }
return 0;
}
*/
int utc_bluetooth_bt_avrcp_target_deinitialize_n(void)
{
+ if (media_supported) {
+ assert_eq(startup_flag, BT_ERROR_NONE);
- assert_eq(startup_flag, BT_ERROR_NONE);
-
- ret = bt_deinitialize();
- assert_eq(ret, BT_ERROR_NONE);
+ ret = bt_deinitialize();
- ret = bt_avrcp_set_shuffle_mode_changed_cb(__bt_avrcp_scan_mode_changed_cb, NULL);
- assert_eq(ret, BT_ERROR_NOT_INITIALIZED);
+ ret = bt_avrcp_target_deinitialize();
+ assert_eq(ret, BT_ERROR_NOT_INITIALIZED);
+ } else {
+ ret = bt_avrcp_target_deinitialize();
+ assert_eq(ret, BT_ERROR_NOT_SUPPORTED);
+ }
return 0;
}
*/
int utc_bluetooth_bt_avrcp_target_initialize_n(void)
{
- assert_eq(startup_flag, BT_ERROR_NONE);
+ if (media_supported) {
+ assert_eq(startup_flag, BT_ERROR_NONE);
- ret = bt_deinitialize();
- assert_eq(ret, BT_ERROR_NONE);
+ ret = bt_deinitialize();
- ret = bt_avrcp_target_initialize(__bt_avrcp_target_connection_state_changed_cb, NULL);
- assert_eq(ret, BT_ERROR_NOT_INITIALIZED);
+ ret = bt_avrcp_target_initialize(__bt_avrcp_target_connection_state_changed_cb, NULL);
+ assert_eq(ret, BT_ERROR_NOT_INITIALIZED);
+ } else {
+ ret = bt_avrcp_target_initialize(__bt_avrcp_target_connection_state_changed_cb, NULL);
+ assert_eq(ret, BT_ERROR_NOT_SUPPORTED);
+ }
return 0;
}
*/
int utc_bluetooth_bt_avrcp_target_notify_equalizer_state_n(void)
{
- assert_eq(startup_flag, BT_ERROR_NONE);
-
- ret = bt_deinitialize();
- assert_eq(ret, BT_ERROR_NONE);
+ if (media_supported) {
+ assert_eq(startup_flag, BT_ERROR_NONE);
- ret = bt_avrcp_target_notify_equalizer_state(0x01);
- assert_eq(ret, BT_ERROR_NOT_INITIALIZED);
+ ret = bt_deinitialize();
+ ret = bt_avrcp_target_notify_equalizer_state(0x01);
+ assert_eq(ret, BT_ERROR_NOT_INITIALIZED);
+ } else {
+ ret = bt_avrcp_target_notify_equalizer_state(0x01);
+ assert_eq(ret, BT_ERROR_NOT_SUPPORTED);
+ }
return 0;
}
*/
int utc_bluetooth_bt_avrcp_target_notify_player_state_n(void)
{
- assert_eq(startup_flag, BT_ERROR_NONE);
+ if (media_supported) {
+ assert_eq(startup_flag, BT_ERROR_NONE);
- ret = bt_deinitialize();
- assert_eq(ret, BT_ERROR_NONE);
+ ret = bt_deinitialize();
- ret = bt_avrcp_target_notify_equalizer_state(0x01);
- assert_eq(ret, BT_ERROR_NOT_INITIALIZED);
+ ret = bt_avrcp_target_notify_player_state(0x01);
+ assert_eq(ret, BT_ERROR_NOT_INITIALIZED);
+ } else {
+ ret = bt_avrcp_target_notify_player_state(0x01);
+ assert_eq(ret, BT_ERROR_NOT_SUPPORTED);
+ }
return 0;
}
*/
int utc_bluetooth_bt_avrcp_target_notify_position_n(void)
{
- assert_eq(startup_flag, BT_ERROR_NONE);
+ if (media_supported) {
+ assert_eq(startup_flag, BT_ERROR_NONE);
- ret = bt_deinitialize();
- assert_eq(ret, BT_ERROR_NONE);
+ ret = bt_deinitialize();
- ret = bt_avrcp_target_notify_position(0x01);
- assert_eq(ret, BT_ERROR_NOT_INITIALIZED);
+ ret = bt_avrcp_target_notify_position(0x01);
+ assert_eq(ret, BT_ERROR_NOT_INITIALIZED);
+ } else {
+ ret = bt_avrcp_target_notify_position(0x01);
+ assert_eq(ret, BT_ERROR_NOT_SUPPORTED);
+ }
return 0;
}
*/
int utc_bluetooth_bt_avrcp_target_notify_repeat_mode_n(void)
{
- assert_eq(startup_flag, BT_ERROR_NONE);
-
- ret = bt_deinitialize();
- assert_eq(ret, BT_ERROR_NONE);
+ if (media_supported) {
+ assert_eq(startup_flag, BT_ERROR_NONE);
- ret = bt_avrcp_target_notify_repeat_mode(0x01);
- assert_eq(ret, BT_ERROR_NOT_INITIALIZED);
+ ret = bt_deinitialize();
+ ret = bt_avrcp_target_notify_repeat_mode(0x01);
+ assert_eq(ret, BT_ERROR_NOT_INITIALIZED);
+ } else {
+ ret = bt_avrcp_target_notify_repeat_mode(0x01);
+ assert_eq(ret, BT_ERROR_NOT_SUPPORTED);
+ }
return 0;
}
*/
int utc_bluetooth_bt_avrcp_target_notify_scan_mode_n(void)
{
- assert_eq(startup_flag, BT_ERROR_NONE);
+ if (media_supported) {
+ assert_eq(startup_flag, BT_ERROR_NONE);
- ret = bt_deinitialize();
- assert_eq(ret, BT_ERROR_NONE);
+ ret = bt_deinitialize();
- ret = bt_avrcp_target_notify_scan_mode(0x01);
- assert_eq(ret, BT_ERROR_NOT_INITIALIZED);
+ ret = bt_avrcp_target_notify_scan_mode(0x01);
+ assert_eq(ret, BT_ERROR_NOT_INITIALIZED);
+ } else {
+ ret = bt_avrcp_target_notify_scan_mode(0x01);
+ assert_eq(ret, BT_ERROR_NOT_SUPPORTED);
+ }
return 0;
}
*/
int utc_bluetooth_bt_avrcp_target_notify_shuffle_mode_n(void)
{
- assert_eq(startup_flag, BT_ERROR_NONE);
+ if (media_supported) {
+ assert_eq(startup_flag, BT_ERROR_NONE);
- ret = bt_deinitialize();
- assert_eq(ret, BT_ERROR_NONE);
+ ret = bt_deinitialize();
- ret = bt_avrcp_target_notify_shuffle_mode(0x01);
- assert_eq(ret, BT_ERROR_NOT_INITIALIZED);
+ ret = bt_avrcp_target_notify_shuffle_mode(0x01);
+ assert_eq(ret, BT_ERROR_NOT_INITIALIZED);
+ } else {
+ ret = bt_avrcp_target_notify_shuffle_mode(0x01);
+ assert_eq(ret, BT_ERROR_NOT_SUPPORTED);
+ }
return 0;
}
*/
int utc_bluetooth_bt_avrcp_target_notify_track_n(void)
{
- assert_eq(startup_flag, BT_ERROR_NONE);
+ if (media_supported) {
+ assert_eq(startup_flag, BT_ERROR_NONE);
- ret = bt_deinitialize();
- assert_eq(ret, BT_ERROR_NONE);
+ ret = bt_deinitialize();
- ret = bt_avrcp_target_notify_track("title", "artist", "album", "genre", 5, 20, 2);
- assert_eq(ret, BT_ERROR_NOT_INITIALIZED);
+ ret = bt_avrcp_target_notify_track("title", "artist", "album", "genre", 5, 20, 2);
+ assert_eq(ret, BT_ERROR_NOT_INITIALIZED);
+ } else {
+ ret = bt_avrcp_target_notify_track("title", "artist", "album", "genre", 5, 20, 2);
+ assert_eq(ret, BT_ERROR_NOT_SUPPORTED);
+ }
return 0;
}
*/
int utc_bluetooth_bt_avrcp_unset_equalizer_state_changed_cb_n(void)
{
- assert_eq(startup_flag, BT_ERROR_NONE);
+ if (media_supported) {
+ assert_eq(startup_flag, BT_ERROR_NONE);
- ret = bt_deinitialize();
- assert_eq(ret, BT_ERROR_NONE);
+ ret = bt_deinitialize();
- ret = bt_avrcp_unset_equalizer_state_changed_cb();
- assert_eq(ret, BT_ERROR_NOT_INITIALIZED);
+ ret = bt_avrcp_unset_equalizer_state_changed_cb();
+ assert_eq(ret, BT_ERROR_NOT_INITIALIZED);
+ } else {
+ ret = bt_avrcp_unset_equalizer_state_changed_cb();
+ assert_eq(ret, BT_ERROR_NOT_SUPPORTED);
+ }
return 0;
}
*/
int utc_bluetooth_bt_avrcp_unset_repeat_mode_changed_cb_n(void)
{
- assert_eq(startup_flag, BT_ERROR_NONE);
+ if (media_supported) {
+ assert_eq(startup_flag, BT_ERROR_NONE);
- ret = bt_deinitialize();
- assert_eq(ret, BT_ERROR_NONE);
+ ret = bt_deinitialize();
- ret = bt_avrcp_unset_repeat_mode_changed_cb();
- assert_eq(ret, BT_ERROR_NOT_INITIALIZED);
+ ret = bt_avrcp_unset_repeat_mode_changed_cb();
+ assert_eq(ret, BT_ERROR_NOT_INITIALIZED);
+ } else {
+ ret = bt_avrcp_unset_repeat_mode_changed_cb();
+ assert_eq(ret, BT_ERROR_NOT_SUPPORTED);
+ }
return 0;
}
*/
int utc_bluetooth_bt_avrcp_unset_scan_mode_changed_cb_n(void)
{
- assert_eq(startup_flag, BT_ERROR_NONE);
+ if (media_supported) {
+ assert_eq(startup_flag, BT_ERROR_NONE);
- ret = bt_deinitialize();
- assert_eq(ret, BT_ERROR_NONE);
+ ret = bt_deinitialize();
- ret = bt_avrcp_unset_scan_mode_changed_cb();
- assert_eq(ret, BT_ERROR_NOT_INITIALIZED);
+ ret = bt_avrcp_unset_scan_mode_changed_cb();
+ assert_eq(ret, BT_ERROR_NOT_INITIALIZED);
+ } else {
+ ret = bt_avrcp_unset_scan_mode_changed_cb();
+ assert_eq(ret, BT_ERROR_NOT_SUPPORTED);
+ }
return 0;
}
*/
int utc_bluetooth_bt_avrcp_unset_shuffle_mode_changed_cb_n(void)
{
- assert_eq(startup_flag, BT_ERROR_NONE);
+ if (media_supported) {
+ assert_eq(startup_flag, BT_ERROR_NONE);
- ret = bt_deinitialize();
- assert_eq(ret, BT_ERROR_NONE);
+ ret = bt_deinitialize();
- ret = bt_avrcp_unset_shuffle_mode_changed_cb();
- assert_eq(ret, BT_ERROR_NOT_INITIALIZED);
+ ret = bt_avrcp_unset_shuffle_mode_changed_cb();
+ assert_eq(ret, BT_ERROR_NOT_INITIALIZED);
+ } else {
+ ret = bt_avrcp_unset_shuffle_mode_changed_cb();
+ assert_eq(ret, BT_ERROR_NOT_SUPPORTED);
+ }
return 0;
}
*/
int utc_bluetooth_bt_ag_open_sco_n(void)
{
- if(call_supported) {
+ if (call_supported) {
assert_eq(startup_flag, BT_ERROR_NONE);
ret = bt_deinitialize();
- assert_eq(ret, BT_ERROR_NONE);
ret = bt_ag_open_sco();
assert_eq(ret, BT_ERROR_NOT_INITIALIZED);
*/
int utc_bluetooth_bt_ag_close_sco_n(void)
{
- if(call_supported) {
+ if (call_supported) {
assert_eq(startup_flag, BT_ERROR_NONE);
ret = bt_deinitialize();
- assert_eq(ret, BT_ERROR_NONE);
ret = bt_ag_close_sco();
assert_eq(ret, BT_ERROR_NOT_INITIALIZED);
{
bool is_sco = false;
- if(call_supported) {
+ if (call_supported) {
assert_eq(startup_flag, BT_ERROR_NONE);
ret = bt_deinitialize();
- assert_eq(ret, BT_ERROR_NONE);
ret = bt_ag_is_sco_opened(&is_sco);
assert_eq(ret, BT_ERROR_NOT_INITIALIZED);
{
bool state = false;
- if(call_supported) {
+ if (call_supported) {
assert_eq(startup_flag, BT_ERROR_NONE);
ret = bt_deinitialize();
- assert_eq(ret, BT_ERROR_NONE);
ret = bt_ag_notify_voice_recognition_state(state);
assert_eq(ret, BT_ERROR_NOT_INITIALIZED);
*/
int utc_bluetooth_bt_ag_set_sco_state_changed_cb_n(void)
{
- if(call_supported) {
+ if (call_supported) {
assert_eq(startup_flag, BT_ERROR_NONE);
ret = bt_deinitialize();
- assert_eq(ret, BT_ERROR_NONE);
ret = bt_ag_set_sco_state_changed_cb(
__bt_ag_sco_state_changed_cb, NULL);
*/
int utc_bluetooth_bt_ag_unset_sco_state_changed_cb_n(void)
{
- if(call_supported) {
+ if (call_supported) {
assert_eq(startup_flag, BT_ERROR_NONE);
ret = bt_deinitialize();
- assert_eq(ret, BT_ERROR_NONE);
ret = bt_ag_unset_sco_state_changed_cb();
assert_eq(ret, BT_ERROR_NOT_INITIALIZED);
system_info_get_platform_bool("http://tizen.org/feature/network.bluetooth.audio.call", &call_supported);
#endif
- if(bt_supported) {
+ if (bt_supported) {
startup_flag = BT_ERROR_NONE;
ret = bt_initialize();
if(BT_ERROR_NONE != ret) {
return;
}
- if(media_supported || call_supported) {
+ if (media_supported || call_supported) {
ret = bt_audio_initialize();
if(BT_ERROR_NONE != ret) {
fprintf(stderr, "Startup error at %s:%d\n", __FILE__, __LINE__);
/**
* @function utc_bluetooth_audio_positive_cleanup
- * @description Called after each test
+ * @description Called before each test
* @parameter NA
* @return NA
*/
void utc_bluetooth_audio_positive_cleanup(void)
{
- if(media_supported || call_supported)
+ if (media_supported || call_supported)
bt_audio_deinitialize();
- if(bt_supported)
+ if (bt_supported)
bt_deinitialize();
}
*/
int utc_bluetooth_bt_audio_initialize_p(void)
{
- if(media_supported || call_supported) {
+ if (media_supported || call_supported) {
assert_eq(startup_flag, BT_ERROR_NONE);
ret = bt_audio_deinitialize();
- assert_eq(ret, BT_ERROR_NONE);
ret = bt_audio_initialize();
assert_eq(ret, BT_ERROR_NONE);
*/
int utc_bluetooth_bt_audio_set_connection_state_changed_cb_p(void)
{
- if(media_supported || call_supported) {
+ if (media_supported || call_supported) {
assert_eq(startup_flag, BT_ERROR_NONE);
ret = bt_audio_set_connection_state_changed_cb
*/
int utc_bluetooth_bt_audio_unset_connection_state_changed_cb_p(void)
{
- if(media_supported || call_supported) {
+ if (media_supported || call_supported) {
assert_eq(startup_flag, BT_ERROR_NONE);
ret = bt_audio_set_connection_state_changed_cb
(connection_state_changed_cb_for_audio_p, NULL);
- assert_eq(ret, BT_ERROR_NONE);
ret = bt_audio_unset_connection_state_changed_cb();
assert_eq(ret, BT_ERROR_NONE);
*/
int utc_bluetooth_bt_audio_deinitialize_p(void)
{
- if(media_supported || call_supported) {
+ if (media_supported || call_supported) {
assert_eq(startup_flag, BT_ERROR_NONE);
ret = bt_audio_deinitialize();
int utc_bluetooth_bt_avrcp_targe_initialize_p(void)
{
int result;
- assert_eq(startup_flag, BT_ERROR_NONE);
+ if (media_supported) {
+ assert_eq(startup_flag, BT_ERROR_NONE);
- result = bt_avrcp_target_initialize(
- __bt_avrcp_target_connection_state_changed_cb,
- NULL);
- assert_eq(result, BT_ERROR_NONE);
+ result = bt_avrcp_target_initialize(
+ __bt_avrcp_target_connection_state_changed_cb,
+ NULL);
+ assert_eq(result, BT_ERROR_NONE);
- if(result == BT_ERROR_NONE)
ret = bt_avrcp_target_deinitialize();
-
+ } else {
+ result = bt_avrcp_target_initialize(
+ __bt_avrcp_target_connection_state_changed_cb,
+ NULL);
+ assert_eq(result, BT_ERROR_NOT_SUPPORTED);
+ }
return 0;
}
int utc_bluetooth_bt_avrcp_target_deinitialize_p(void)
{
int result;
- assert_eq(startup_flag, BT_ERROR_NONE);
+ if (media_supported) {
+ assert_eq(startup_flag, BT_ERROR_NONE);
- ret = bt_avrcp_target_initialize(
- __bt_avrcp_target_connection_state_changed_cb,
- NULL);
- assert_eq(ret, BT_ERROR_NONE);
+ ret = bt_avrcp_target_initialize(
+ __bt_avrcp_target_connection_state_changed_cb,
+ NULL);
- if(ret == BT_ERROR_NONE) {
result = bt_avrcp_target_deinitialize();
assert_eq(result, BT_ERROR_NONE);
+ } else {
+ result = bt_avrcp_target_deinitialize();
+ assert_eq(result, BT_ERROR_NOT_SUPPORTED);
}
return 0;
int utc_bluetooth_bt_avrcp_target_notify_equalizer_state_p(void)
{
int result;
- assert_eq(startup_flag, BT_ERROR_NONE);
- ret = bt_avrcp_target_initialize(
- __bt_avrcp_target_connection_state_changed_cb,
+ if (media_supported) {
+ assert_eq(startup_flag, BT_ERROR_NONE);
+ ret = bt_avrcp_target_initialize(
+ __bt_avrcp_target_connection_state_changed_cb,
NULL);
- assert_eq(ret, BT_ERROR_NONE);
- if(ret == BT_ERROR_NONE) {
result = bt_avrcp_target_notify_equalizer_state(BT_AVRCP_EQUALIZER_STATE_ON);
assert_eq(result, BT_ERROR_NONE);
+
ret = bt_avrcp_target_deinitialize();
+ } else {
+ result = bt_avrcp_target_notify_equalizer_state(BT_AVRCP_EQUALIZER_STATE_ON);
+ assert_eq(result, BT_ERROR_NOT_SUPPORTED);
}
return 0;
int utc_bluetooth_bt_avrcp_target_notify_repeat_mode_p(void)
{
int result;
- assert_eq(startup_flag, BT_ERROR_NONE);
- ret = bt_avrcp_target_initialize(
- __bt_avrcp_target_connection_state_changed_cb,
- NULL);
- assert_eq(ret, BT_ERROR_NONE);
+ if (media_supported) {
+ assert_eq(startup_flag, BT_ERROR_NONE);
+ ret = bt_avrcp_target_initialize(
+ __bt_avrcp_target_connection_state_changed_cb,
+ NULL);
- if(ret == BT_ERROR_NONE) {
result = bt_avrcp_target_notify_repeat_mode(BT_AVRCP_REPEAT_MODE_SINGLE_TRACK);
assert_eq(result, BT_ERROR_NONE);
+
ret = bt_avrcp_target_deinitialize();
+ } else {
+ result = bt_avrcp_target_notify_repeat_mode(BT_AVRCP_REPEAT_MODE_SINGLE_TRACK);
+ assert_eq(result, BT_ERROR_NOT_SUPPORTED);
}
return 0;
int utc_bluetooth_bt_avrcp_target_notify_shuffle_mode_p(void)
{
int result;
- assert_eq(startup_flag, BT_ERROR_NONE);
- ret = bt_avrcp_target_initialize(
- __bt_avrcp_target_connection_state_changed_cb,
- NULL);
- assert_eq(ret, BT_ERROR_NONE);
-
- if(ret == BT_ERROR_NONE) {
+ if (media_supported) {
+ assert_eq(startup_flag, BT_ERROR_NONE);
+ ret = bt_avrcp_target_initialize(
+ __bt_avrcp_target_connection_state_changed_cb,
+ NULL);
+ assert_eq(ret, BT_ERROR_NONE);
+
+ if(ret == BT_ERROR_NONE) {
+ result = bt_avrcp_target_notify_shuffle_mode(BT_AVRCP_SHUFFLE_MODE_ALL_TRACK);
+ assert_eq(result, BT_ERROR_NONE);
+ ret = bt_avrcp_target_deinitialize();
+ }
+ } else {
result = bt_avrcp_target_notify_shuffle_mode(BT_AVRCP_SHUFFLE_MODE_ALL_TRACK);
- assert_eq(result, BT_ERROR_NONE);
- ret = bt_avrcp_target_deinitialize();
+ assert_eq(result, BT_ERROR_NOT_SUPPORTED);
}
return 0;
int utc_bluetooth_bt_avrcp_target_notify_scan_mode_p(void)
{
int result;
- assert_eq(startup_flag, BT_ERROR_NONE);
- ret = bt_avrcp_target_initialize(
- __bt_avrcp_target_connection_state_changed_cb,
- NULL);
- assert_eq(ret, BT_ERROR_NONE);
+ if (media_supported) {
+ assert_eq(startup_flag, BT_ERROR_NONE);
+ ret = bt_avrcp_target_initialize(
+ __bt_avrcp_target_connection_state_changed_cb,
+ NULL);
- if(ret == BT_ERROR_NONE) {
result = bt_avrcp_target_notify_scan_mode(BT_AVRCP_SCAN_MODE_ALL_TRACK);
assert_eq(result, BT_ERROR_NONE);
+
ret = bt_avrcp_target_deinitialize();
+ } else {
+ result = bt_avrcp_target_notify_scan_mode(BT_AVRCP_SCAN_MODE_ALL_TRACK);
+ assert_eq(result, BT_ERROR_NOT_SUPPORTED);
}
return 0;
int utc_bluetooth_bt_avrcp_target_notify_player_state_p(void)
{
int result;
- assert_eq(startup_flag, BT_ERROR_NONE);
- ret = bt_avrcp_target_initialize(
- __bt_avrcp_target_connection_state_changed_cb,
- NULL);
- assert_eq(ret, BT_ERROR_NONE);
+ if (media_supported) {
+ assert_eq(startup_flag, BT_ERROR_NONE);
+ ret = bt_avrcp_target_initialize(
+ __bt_avrcp_target_connection_state_changed_cb,
+ NULL);
- if(ret == BT_ERROR_NONE) {
result = bt_avrcp_target_notify_player_state(BT_AVRCP_PLAYER_STATE_STOPPED);
assert_eq(result, BT_ERROR_NONE);
+
ret = bt_avrcp_target_deinitialize();
+ } else {
+ result = bt_avrcp_target_notify_player_state(BT_AVRCP_PLAYER_STATE_STOPPED);
+ assert_eq(result, BT_ERROR_NOT_SUPPORTED);
}
return 0;
{
int result;
unsigned int position = 0;
- assert_eq(startup_flag, BT_ERROR_NONE);
- ret = bt_avrcp_target_initialize(
- __bt_avrcp_target_connection_state_changed_cb,
- NULL);
- assert_eq(ret, BT_ERROR_NONE);
+ if (media_supported) {
+ assert_eq(startup_flag, BT_ERROR_NONE);
+ ret = bt_avrcp_target_initialize(
+ __bt_avrcp_target_connection_state_changed_cb,
+ NULL);
- if(ret == BT_ERROR_NONE) {
result = bt_avrcp_target_notify_position(position);
assert_eq(result, BT_ERROR_NONE);
+
ret = bt_avrcp_target_deinitialize();
+ } else {
+ result = bt_avrcp_target_notify_position(position);
+ assert_eq(result, BT_ERROR_NOT_SUPPORTED);
}
return 0;
int utc_bluetooth_bt_avrcp_target_notify_track_p(void)
{
int result;
- assert_eq(startup_flag, BT_ERROR_NONE);
- ret = bt_avrcp_target_initialize(
- __bt_avrcp_target_connection_state_changed_cb,
- NULL);
- assert_eq(ret, BT_ERROR_NONE);
+ if (media_supported) {
+ assert_eq(startup_flag, BT_ERROR_NONE);
+ ret = bt_avrcp_target_initialize(
+ __bt_avrcp_target_connection_state_changed_cb,
+ NULL);
- if(ret == BT_ERROR_NONE) {
result = bt_avrcp_target_notify_track("title", "artist", "album", "genre", 5, 20, 2);
assert_eq(result, BT_ERROR_NONE);
+
ret = bt_avrcp_target_deinitialize();
+ } else {
+ result = bt_avrcp_target_notify_track("title", "artist", "album", "genre", 5, 20, 2);
+ assert_eq(result, BT_ERROR_NOT_SUPPORTED);
}
return 0;
int utc_bluetooth_bt_avrcp_set_equalizer_state_changed_p(void)
{
int result;
- assert_eq(startup_flag, BT_ERROR_NONE);
- ret = bt_avrcp_target_initialize(
- __bt_avrcp_target_connection_state_changed_cb,
- NULL);
- assert_eq(ret, BT_ERROR_NONE);
+ if (media_supported) {
+ assert_eq(startup_flag, BT_ERROR_NONE);
+ ret = bt_avrcp_target_initialize(
+ __bt_avrcp_target_connection_state_changed_cb,
+ NULL);
- if(ret == BT_ERROR_NONE) {
result = bt_avrcp_set_equalizer_state_changed_cb(__bt_avrcp_set_equalizer_state_changed_cb, NULL);
assert_eq(result, BT_ERROR_NONE);
+
result = bt_avrcp_unset_equalizer_state_changed_cb();
ret = bt_avrcp_target_deinitialize();
+ } else {
+ result = bt_avrcp_set_equalizer_state_changed_cb(__bt_avrcp_set_equalizer_state_changed_cb, NULL);
+ assert_eq(result, BT_ERROR_NOT_SUPPORTED);
}
return 0;
int utc_bluetooth_bt_avrcp_unset_equalizer_state_changed_p(void)
{
int result;
- assert_eq(startup_flag, BT_ERROR_NONE);
- ret = bt_avrcp_target_initialize(
- __bt_avrcp_target_connection_state_changed_cb,
- NULL);
- assert_eq(ret, BT_ERROR_NONE);
+ if (media_supported) {
+ assert_eq(startup_flag, BT_ERROR_NONE);
+ ret = bt_avrcp_target_initialize(
+ __bt_avrcp_target_connection_state_changed_cb,
+ NULL);
- if(ret == BT_ERROR_NONE) {
result = bt_avrcp_set_equalizer_state_changed_cb(__bt_avrcp_set_equalizer_state_changed_cb, NULL);
- assert_eq(result, BT_ERROR_NONE);
result = bt_avrcp_unset_equalizer_state_changed_cb();
assert_eq(result, BT_ERROR_NONE);
ret = bt_avrcp_target_deinitialize();
+ } else {
+ result = bt_avrcp_unset_equalizer_state_changed_cb();
+ assert_eq(result, BT_ERROR_NOT_SUPPORTED);
}
return 0;
int utc_bluetooth_bt_avrcp_set_repeat_mode_changed_p(void)
{
int result;
- assert_eq(startup_flag, BT_ERROR_NONE);
- ret = bt_avrcp_target_initialize(
- __bt_avrcp_target_connection_state_changed_cb,
- NULL);
- assert_eq(ret, BT_ERROR_NONE);
+ if (media_supported) {
+ assert_eq(startup_flag, BT_ERROR_NONE);
+ ret = bt_avrcp_target_initialize(
+ __bt_avrcp_target_connection_state_changed_cb,
+ NULL);
- if(ret == BT_ERROR_NONE) {
result = bt_avrcp_set_repeat_mode_changed_cb(__bt_avrcp_set_repeat_mode_changed_cb, NULL);
assert_eq(result, BT_ERROR_NONE);
result = bt_avrcp_unset_repeat_mode_changed_cb();
ret = bt_avrcp_target_deinitialize();
+ } else {
+ result = bt_avrcp_set_repeat_mode_changed_cb(__bt_avrcp_set_repeat_mode_changed_cb, NULL);
+ assert_eq(result, BT_ERROR_NOT_SUPPORTED);
}
return 0;
int utc_bluetooth_bt_avrcp_unset_repeat_mode_changed_p(void)
{
int result;
- assert_eq(startup_flag, BT_ERROR_NONE);
- ret = bt_avrcp_target_initialize(
- __bt_avrcp_target_connection_state_changed_cb,
- NULL);
- assert_eq(ret, BT_ERROR_NONE);
+ if (media_supported) {
+ assert_eq(startup_flag, BT_ERROR_NONE);
+ ret = bt_avrcp_target_initialize(
+ __bt_avrcp_target_connection_state_changed_cb,
+ NULL);
- if(ret == BT_ERROR_NONE) {
result = bt_avrcp_set_repeat_mode_changed_cb(__bt_avrcp_set_repeat_mode_changed_cb, NULL);
- assert_eq(result, BT_ERROR_NONE);
-
result = bt_avrcp_unset_repeat_mode_changed_cb();
assert_eq(result, BT_ERROR_NONE);
ret = bt_avrcp_target_deinitialize();
+ } else {
+ result = bt_avrcp_set_repeat_mode_changed_cb(__bt_avrcp_set_repeat_mode_changed_cb, NULL);
+ assert_eq(result, BT_ERROR_NOT_SUPPORTED);
}
return 0;
int utc_bluetooth_bt_avrcp_set_shuffle_mode_changed_p(void)
{
int result;
- assert_eq(startup_flag, BT_ERROR_NONE);
- ret = bt_avrcp_target_initialize(
- __bt_avrcp_target_connection_state_changed_cb,
- NULL);
- assert_eq(ret, BT_ERROR_NONE);
+ if (media_supported) {
+ assert_eq(startup_flag, BT_ERROR_NONE);
+ ret = bt_avrcp_target_initialize(
+ __bt_avrcp_target_connection_state_changed_cb,
+ NULL);
- if(ret == BT_ERROR_NONE) {
result = bt_avrcp_set_shuffle_mode_changed_cb(__bt_avrcp_set_shuffle_mode_changed_cb, NULL);
assert_eq(result, BT_ERROR_NONE);
result = bt_avrcp_unset_shuffle_mode_changed_cb();
ret = bt_avrcp_target_deinitialize();
+ } else {
+ result = bt_avrcp_set_shuffle_mode_changed_cb(__bt_avrcp_set_shuffle_mode_changed_cb, NULL);
+ assert_eq(result, BT_ERROR_NOT_SUPPORTED);
}
return 0;
int utc_bluetooth_bt_avrcp_unset_shuffle_mode_changed_p(void)
{
int result;
- assert_eq(startup_flag, BT_ERROR_NONE);
- ret = bt_avrcp_target_initialize(
- __bt_avrcp_target_connection_state_changed_cb,
- NULL);
- assert_eq(ret, BT_ERROR_NONE);
+ if(media_supported) {
+ assert_eq(startup_flag, BT_ERROR_NONE);
+ ret = bt_avrcp_target_initialize(
+ __bt_avrcp_target_connection_state_changed_cb,
+ NULL);
- if(ret == BT_ERROR_NONE) {
result = bt_avrcp_set_shuffle_mode_changed_cb(__bt_avrcp_set_shuffle_mode_changed_cb, NULL);
- assert_eq(result, BT_ERROR_NONE);
result = bt_avrcp_unset_shuffle_mode_changed_cb();
assert_eq(result, BT_ERROR_NONE);
ret = bt_avrcp_target_deinitialize();
+ } else {
+ result = bt_avrcp_unset_shuffle_mode_changed_cb();
+ assert_eq(result, BT_ERROR_NOT_SUPPORTED);
}
return 0;
int utc_bluetooth_bt_avrcp_set_scan_mode_changed_p(void)
{
int result;
- assert_eq(startup_flag, BT_ERROR_NONE);
- ret = bt_avrcp_target_initialize(
- __bt_avrcp_target_connection_state_changed_cb,
- NULL);
- assert_eq(ret, BT_ERROR_NONE);
+ if (media_supported) {
+ assert_eq(startup_flag, BT_ERROR_NONE);
+ ret = bt_avrcp_target_initialize(
+ __bt_avrcp_target_connection_state_changed_cb,
+ NULL);
- if(ret == BT_ERROR_NONE) {
result = bt_avrcp_set_scan_mode_changed_cb(
__bt_avrcp_set_scan_mode_changed_cb, NULL);
assert_eq(result, BT_ERROR_NONE);
result = bt_avrcp_unset_scan_mode_changed_cb();
ret = bt_avrcp_target_deinitialize();
+ } else {
+ result = bt_avrcp_set_scan_mode_changed_cb(
+ __bt_avrcp_set_scan_mode_changed_cb, NULL);
+ assert_eq(result, BT_ERROR_NOT_SUPPORTED);
}
return 0;
int utc_bluetooth_bt_avrcp_unset_scan_mode_changed_p(void)
{
int result;
- assert_eq(startup_flag, BT_ERROR_NONE);
- ret = bt_avrcp_target_initialize(
- __bt_avrcp_target_connection_state_changed_cb,
- NULL);
- assert_eq(ret, BT_ERROR_NONE);
+ if (media_supported) {
+ assert_eq(startup_flag, BT_ERROR_NONE);
+ ret = bt_avrcp_target_initialize(
+ __bt_avrcp_target_connection_state_changed_cb,
+ NULL);
- if(ret == BT_ERROR_NONE) {
result = bt_avrcp_set_scan_mode_changed_cb(
__bt_avrcp_set_scan_mode_changed_cb, NULL);
- assert_eq(result, BT_ERROR_NONE);
result = bt_avrcp_unset_scan_mode_changed_cb();
assert_eq(result, BT_ERROR_NONE);
ret = bt_avrcp_target_deinitialize();
+ } else {
+ result = bt_avrcp_unset_scan_mode_changed_cb();
+ assert_eq(result, BT_ERROR_NOT_SUPPORTED);
}
return 0;