// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
-// http://www.apache.org/licenses/LICENSE-2.0
+// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
return MEDIA_CONTROLLER_ERROR_NONE;
}
+static int __mc_server_set_ability(mc_ability_support_e support)
+{
+ int ret = MEDIA_CONTROLLER_ERROR_NONE;
+
+ ret = mc_server_set_ability_support(g_mc_server, MC_ABILITY_SHUFFLE, support);
+ assert_eq(ret, MEDIA_CONTROLLER_ERROR_NONE);
+
+ ret = mc_server_set_ability_support(g_mc_server, MC_ABILITY_REPEAT, support);
+ assert_eq(ret, MEDIA_CONTROLLER_ERROR_NONE);
+
+ ret = mc_server_set_ability_support(g_mc_server, MC_ABILITY_PLAYBACK_POSITION, support);
+ assert_eq(ret, MEDIA_CONTROLLER_ERROR_NONE);
+
+ ret = mc_server_set_ability_support(g_mc_server, MC_ABILITY_PLAYLIST, support);
+ assert_eq(ret, MEDIA_CONTROLLER_ERROR_NONE);
+
+ ret = mc_server_set_ability_support(g_mc_server, MC_ABILITY_CLIENT_CUSTOM, support);
+ assert_eq(ret, MEDIA_CONTROLLER_ERROR_NONE);
+
+ ret = mc_server_set_ability_support(g_mc_server, MC_ABILITY_SEARCH, support);
+ assert_eq(ret, MEDIA_CONTROLLER_ERROR_NONE);
+
+ return ret;
+}
+
/**
* @function utc_media_controller_startup
* @description Called before each test
*/
void utc_media_controller_startup(void)
{
- mc_error_e ret = MEDIA_CONTROLLER_ERROR_NONE;
-
- // server start
- ret = mc_server_create(&g_mc_server);
- if (ret != MEDIA_CONTROLLER_ERROR_NONE)
- {
- FPRINTF("[%s:%d] mc_server_create failed (code: %d)\\n", __FILE__, __LINE__, ret);
- startup_ret = ret;
- return;
- }
-
- // server initialize data, it will be removed by destroying server when test finish
- ret = mc_server_set_playback_state(g_mc_server, MC_PLAYBACK_STATE_PLAYING);
- if ( ret != MEDIA_CONTROLLER_ERROR_NONE) {
- FPRINTF("[%s:%d] mc_server_set_playback_state failed (code: %d)\\n", __FILE__, __LINE__, ret);
- startup_ret = ret;
- return;
- }
-
- ret = mc_server_set_playback_position(g_mc_server, 10000);
- if ( ret != MEDIA_CONTROLLER_ERROR_NONE) {
- FPRINTF("[%s:%d] mc_server_set_playback_position failed (code: %d)\\n", __FILE__, __LINE__, ret);
- startup_ret = ret;
- return;
- }
-
- ret = mc_server_set_playback_content_type(g_mc_server, g_mc_test_content_type);
- if ( ret != MEDIA_CONTROLLER_ERROR_NONE) {
- FPRINTF("[%s:%d] mc_server_set_playback_content_type failed (code: %d)\\n", __FILE__, __LINE__, ret);
- startup_ret = ret;
- return;
- }
-
- ret = mc_server_set_content_age_rating(g_mc_server, g_mc_test_age_rating);
- if ( ret != MEDIA_CONTROLLER_ERROR_NONE) {
- FPRINTF("[%s:%d] mc_server_set_content_age_rating failed (code: %d)\\n", __FILE__, __LINE__, ret);
- startup_ret = ret;
- return;
- }
+ mc_error_e ret = MEDIA_CONTROLLER_ERROR_NONE;
+
+ // server start
+ ret = mc_server_create(&g_mc_server);
+ if (ret != MEDIA_CONTROLLER_ERROR_NONE)
+ {
+ FPRINTF("[%s:%d] mc_server_create failed (code: %d)\\n", __FILE__, __LINE__, ret);
+ startup_ret = ret;
+ return;
+ }
+
+ // server initialize data, it will be removed by destroying server when test finish
+ ret = mc_server_set_playback_state(g_mc_server, MC_PLAYBACK_STATE_PLAYING);
+ if ( ret != MEDIA_CONTROLLER_ERROR_NONE) {
+ FPRINTF("[%s:%d] mc_server_set_playback_state failed (code: %d)\\n", __FILE__, __LINE__, ret);
+ startup_ret = ret;
+ return;
+ }
+
+ ret = mc_server_set_playback_position(g_mc_server, 10000);
+ if ( ret != MEDIA_CONTROLLER_ERROR_NONE) {
+ FPRINTF("[%s:%d] mc_server_set_playback_position failed (code: %d)\\n", __FILE__, __LINE__, ret);
+ startup_ret = ret;
+ return;
+ }
+
+ ret = mc_server_set_playback_content_type(g_mc_server, g_mc_test_content_type);
+ if ( ret != MEDIA_CONTROLLER_ERROR_NONE) {
+ FPRINTF("[%s:%d] mc_server_set_playback_content_type failed (code: %d)\\n", __FILE__, __LINE__, ret);
+ startup_ret = ret;
+ return;
+ }
+
+ ret = mc_server_set_content_age_rating(g_mc_server, g_mc_test_age_rating);
+ if ( ret != MEDIA_CONTROLLER_ERROR_NONE) {
+ FPRINTF("[%s:%d] mc_server_set_content_age_rating failed (code: %d)\\n", __FILE__, __LINE__, ret);
+ startup_ret = ret;
+ return;
+ }
ret = mc_server_set_playlist_item_info(g_mc_server, g_mc_test_playlist_name, g_mc_test_playlist_index);
if ( ret != MEDIA_CONTROLLER_ERROR_NONE) {
return;
}
- ret = mc_server_update_playback_info(g_mc_server);
- if ( ret != MEDIA_CONTROLLER_ERROR_NONE) {
- FPRINTF("[%s:%d] mc_server_update_playback_info failed (code: %d)\\n", __FILE__, __LINE__, ret);
- startup_ret = ret;
- return;
- }
-
- ret = mc_server_update_shuffle_mode(g_mc_server, MC_SHUFFLE_MODE_ON);
- if ( ret != MEDIA_CONTROLLER_ERROR_NONE) {
- FPRINTF("[%s:%d] mc_server_update_shuffle_mode failed (code: %d)\\n", __FILE__, __LINE__, ret);
- startup_ret = ret;
- return;
- }
-
- ret = mc_server_update_repeat_mode(g_mc_server, MC_REPEAT_MODE_ON);
- if ( ret != MEDIA_CONTROLLER_ERROR_NONE) {
- FPRINTF("[%s:%d] mc_server_update_repeat_mode failed (code: %d)\\n", __FILE__, __LINE__, ret);
- startup_ret = ret;
- return;
- }
-
- ret = mc_server_set_playback_ability(g_mc_server, MC_PLAYBACK_ACTION_PLAY, MC_ABILITY_SUPPORTED_YES);
- if ( ret != MEDIA_CONTROLLER_ERROR_NONE) {
- FPRINTF("[%s:%d] mc_server_set_playback_ability failed (code: %d)\\n", __FILE__, __LINE__, ret);
- startup_ret = ret;
- return;
- }
-
- ret = mc_server_set_playback_ability(g_mc_server, MC_PLAYBACK_ACTION_PAUSE, MC_ABILITY_SUPPORTED_YES);
- if ( ret != MEDIA_CONTROLLER_ERROR_NONE) {
- FPRINTF("[%s:%d] mc_server_set_playback_ability failed (code: %d)\\n", __FILE__, __LINE__, ret);
- startup_ret = ret;
- return;
- }
-
- ret = mc_server_set_playback_ability(g_mc_server, MC_PLAYBACK_ACTION_STOP, MC_ABILITY_SUPPORTED_YES);
- if ( ret != MEDIA_CONTROLLER_ERROR_NONE) {
- FPRINTF("[%s:%d] mc_server_set_playback_ability failed (code: %d)\\n", __FILE__, __LINE__, ret);
- startup_ret = ret;
- return;
- }
-
- ret = mc_server_set_playback_ability(g_mc_server, MC_PLAYBACK_ACTION_NEXT, MC_ABILITY_SUPPORTED_YES);
- if ( ret != MEDIA_CONTROLLER_ERROR_NONE) {
- FPRINTF("[%s:%d] mc_server_set_playback_ability failed (code: %d)\\n", __FILE__, __LINE__, ret);
- startup_ret = ret;
- return;
- }
-
- ret = mc_server_set_playback_ability(g_mc_server, MC_PLAYBACK_ACTION_PREV, MC_ABILITY_SUPPORTED_YES);
- if ( ret != MEDIA_CONTROLLER_ERROR_NONE) {
- FPRINTF("[%s:%d] mc_server_set_playback_ability failed (code: %d)\\n", __FILE__, __LINE__, ret);
- startup_ret = ret;
- return;
- }
+ ret = mc_server_update_playback_info(g_mc_server);
+ if ( ret != MEDIA_CONTROLLER_ERROR_NONE) {
+ FPRINTF("[%s:%d] mc_server_update_playback_info failed (code: %d)\\n", __FILE__, __LINE__, ret);
+ startup_ret = ret;
+ return;
+ }
+
+ ret = mc_server_update_shuffle_mode(g_mc_server, MC_SHUFFLE_MODE_ON);
+ if ( ret != MEDIA_CONTROLLER_ERROR_NONE) {
+ FPRINTF("[%s:%d] mc_server_update_shuffle_mode failed (code: %d)\\n", __FILE__, __LINE__, ret);
+ startup_ret = ret;
+ return;
+ }
+
+ ret = mc_server_update_repeat_mode(g_mc_server, MC_REPEAT_MODE_ON);
+ if ( ret != MEDIA_CONTROLLER_ERROR_NONE) {
+ FPRINTF("[%s:%d] mc_server_update_repeat_mode failed (code: %d)\\n", __FILE__, __LINE__, ret);
+ startup_ret = ret;
+ return;
+ }
+
+ ret = mc_server_set_playback_ability(g_mc_server, MC_PLAYBACK_ACTION_PLAY, MC_ABILITY_SUPPORTED_YES);
+ if ( ret != MEDIA_CONTROLLER_ERROR_NONE) {
+ FPRINTF("[%s:%d] mc_server_set_playback_ability failed (code: %d)\\n", __FILE__, __LINE__, ret);
+ startup_ret = ret;
+ return;
+ }
+
+ ret = mc_server_set_playback_ability(g_mc_server, MC_PLAYBACK_ACTION_PAUSE, MC_ABILITY_SUPPORTED_YES);
+ if ( ret != MEDIA_CONTROLLER_ERROR_NONE) {
+ FPRINTF("[%s:%d] mc_server_set_playback_ability failed (code: %d)\\n", __FILE__, __LINE__, ret);
+ startup_ret = ret;
+ return;
+ }
+
+ ret = mc_server_set_playback_ability(g_mc_server, MC_PLAYBACK_ACTION_STOP, MC_ABILITY_SUPPORTED_YES);
+ if ( ret != MEDIA_CONTROLLER_ERROR_NONE) {
+ FPRINTF("[%s:%d] mc_server_set_playback_ability failed (code: %d)\\n", __FILE__, __LINE__, ret);
+ startup_ret = ret;
+ return;
+ }
+
+ ret = mc_server_set_playback_ability(g_mc_server, MC_PLAYBACK_ACTION_NEXT, MC_ABILITY_SUPPORTED_YES);
+ if ( ret != MEDIA_CONTROLLER_ERROR_NONE) {
+ FPRINTF("[%s:%d] mc_server_set_playback_ability failed (code: %d)\\n", __FILE__, __LINE__, ret);
+ startup_ret = ret;
+ return;
+ }
+
+ ret = mc_server_set_playback_ability(g_mc_server, MC_PLAYBACK_ACTION_PREV, MC_ABILITY_SUPPORTED_YES);
+ if ( ret != MEDIA_CONTROLLER_ERROR_NONE) {
+ FPRINTF("[%s:%d] mc_server_set_playback_ability failed (code: %d)\\n", __FILE__, __LINE__, ret);
+ startup_ret = ret;
+ return;
+ }
ret = mc_server_set_playback_ability(g_mc_server, MC_PLAYBACK_ACTION_FAST_FORWARD, MC_ABILITY_SUPPORTED_YES);
- if ( ret != MEDIA_CONTROLLER_ERROR_NONE) {
- FPRINTF("[%s:%d] mc_server_set_playback_ability failed (code: %d)\\n", __FILE__, __LINE__, ret);
- startup_ret = ret;
- return;
- }
-
- ret = mc_server_set_playback_ability(g_mc_server, MC_PLAYBACK_ACTION_REWIND, MC_ABILITY_SUPPORTED_YES);
- if ( ret != MEDIA_CONTROLLER_ERROR_NONE) {
- FPRINTF("[%s:%d] mc_server_set_playback_ability failed (code: %d)\\n", __FILE__, __LINE__, ret);
- startup_ret = ret;
- return;
- }
-
- ret = mc_server_set_playback_ability(g_mc_server, MC_PLAYBACK_ACTION_TOGGLE_PLAY_PAUSE, MC_ABILITY_SUPPORTED_YES);
- if ( ret != MEDIA_CONTROLLER_ERROR_NONE) {
- FPRINTF("[%s:%d] mc_server_set_playback_ability failed (code: %d)\\n", __FILE__, __LINE__, ret);
- startup_ret = ret;
- return;
- }
+ if ( ret != MEDIA_CONTROLLER_ERROR_NONE) {
+ FPRINTF("[%s:%d] mc_server_set_playback_ability failed (code: %d)\\n", __FILE__, __LINE__, ret);
+ startup_ret = ret;
+ return;
+ }
+
+ ret = mc_server_set_playback_ability(g_mc_server, MC_PLAYBACK_ACTION_REWIND, MC_ABILITY_SUPPORTED_YES);
+ if ( ret != MEDIA_CONTROLLER_ERROR_NONE) {
+ FPRINTF("[%s:%d] mc_server_set_playback_ability failed (code: %d)\\n", __FILE__, __LINE__, ret);
+ startup_ret = ret;
+ return;
+ }
+
+ ret = mc_server_set_playback_ability(g_mc_server, MC_PLAYBACK_ACTION_TOGGLE_PLAY_PAUSE, MC_ABILITY_SUPPORTED_YES);
+ if ( ret != MEDIA_CONTROLLER_ERROR_NONE) {
+ FPRINTF("[%s:%d] mc_server_set_playback_ability failed (code: %d)\\n", __FILE__, __LINE__, ret);
+ startup_ret = ret;
+ return;
+ }
ret = mc_server_update_playback_ability(g_mc_server);
- if ( ret != MEDIA_CONTROLLER_ERROR_NONE) {
- FPRINTF("[%s:%d] mc_server_update_playback_ability failed (code: %d)\\n", __FILE__, __LINE__, ret);
- startup_ret = ret;
- return;
- }
+ if ( ret != MEDIA_CONTROLLER_ERROR_NONE) {
+ FPRINTF("[%s:%d] mc_server_update_playback_ability failed (code: %d)\\n", __FILE__, __LINE__, ret);
+ startup_ret = ret;
+ return;
+ }
- ret = mc_server_set_shuffle_ability(g_mc_server, g_mc_test_ability);
- if ( ret != MEDIA_CONTROLLER_ERROR_NONE) {
- FPRINTF("[%s:%d] mc_server_set_shuffle_ability failed (code: %d)\\n", __FILE__, __LINE__, ret);
- startup_ret = ret;
- return;
- }
+ ret = __mc_server_set_ability(MC_ABILITY_SUPPORTED_NO);
+ if ( ret != MEDIA_CONTROLLER_ERROR_NONE) {
+ FPRINTF("[%s:%d] __mc_server_set_ability failed (code: %d)\\n", __FILE__, __LINE__, ret);
+ startup_ret = ret;
+ return;
+ }
- ret = mc_server_set_repeat_ability(g_mc_server, g_mc_test_ability);
- if ( ret != MEDIA_CONTROLLER_ERROR_NONE) {
- FPRINTF("[%s:%d] mc_server_set_repeat_ability failed (code: %d)\\n", __FILE__, __LINE__, ret);
- startup_ret = ret;
- return;
- }
-
- // client start
- ret = mc_client_create(&g_mc_client);
- if (ret != MEDIA_CONTROLLER_ERROR_NONE)
- {
- FPRINTF("[%s:%d] mc_client_create failed (code: %d)\\n", __FILE__, __LINE__, ret);
- startup_ret = ret;
- return;
- }
+ // client start
+ ret = mc_client_create(&g_mc_client);
+ if (ret != MEDIA_CONTROLLER_ERROR_NONE)
+ {
+ FPRINTF("[%s:%d] mc_client_create failed (code: %d)\\n", __FILE__, __LINE__, ret);
+ startup_ret = ret;
+ return;
+ }
g_request_id = NULL;
- return;
+ return;
}
*/
void utc_media_controller_cleanup(void)
{
- if (g_mc_server != NULL) {
+ if (g_mc_server != NULL) {
mc_server_destroy(g_mc_server);
g_mc_server = NULL;
- }
- if (g_mc_client != NULL) {
+ }
+ if (g_mc_client != NULL) {
mc_client_destroy(g_mc_client);
g_mc_client = NULL;
- }
- if (g_mc_bundle != NULL) {
+ }
+ if (g_mc_bundle != NULL) {
bundle_free(g_mc_bundle);
g_mc_bundle = NULL;
- }
- if (g_mc_server_name != NULL) {
+ }
+ if (g_mc_server_name != NULL) {
free(g_mc_server_name);
g_mc_server_name = NULL;
- }
- if (g_mc_client_name != NULL) {
+ }
+ if (g_mc_client_name != NULL) {
free(g_mc_client_name);
g_mc_client_name = NULL;
- }
+ }
if (g_request_id != NULL) {
free(g_request_id);
g_request_id = NULL;
- }
+ }
if (g_mc_custom_data.name) {
free(g_mc_custom_data.name);
g_mc_custom_data.name = NULL;
g_mc_search = NULL;
}
- return;
+ return;
}
/**
*/
int utc_mc_server_create_p(void)
{
- assert_eq(startup_ret, MEDIA_CONTROLLER_ERROR_NONE);
+ assert_eq(startup_ret, MEDIA_CONTROLLER_ERROR_NONE);
- int ret = MEDIA_CONTROLLER_ERROR_NONE;
+ int ret = MEDIA_CONTROLLER_ERROR_NONE;
- ret = mc_server_destroy(g_mc_server);
- assert_eq(ret, MEDIA_CONTROLLER_ERROR_NONE);
+ ret = mc_server_destroy(g_mc_server);
+ assert_eq(ret, MEDIA_CONTROLLER_ERROR_NONE);
g_mc_server = NULL;
- ret = mc_server_create(&g_mc_server);
- assert_eq(ret, MEDIA_CONTROLLER_ERROR_NONE);
- return 0;
+ ret = mc_server_create(&g_mc_server);
+ assert_eq(ret, MEDIA_CONTROLLER_ERROR_NONE);
+ return 0;
}
/**
*/
int utc_mc_server_create_n(void)
{
- assert_eq(startup_ret, MEDIA_CONTROLLER_ERROR_NONE);
-
- int ret = MEDIA_CONTROLLER_ERROR_NONE;
+ assert_eq(startup_ret, MEDIA_CONTROLLER_ERROR_NONE);
- ret = mc_server_destroy(g_mc_server);
- assert_eq(ret, MEDIA_CONTROLLER_ERROR_NONE);
- g_mc_server = NULL;
+ int ret = MEDIA_CONTROLLER_ERROR_NONE;
- ret = mc_server_create(NULL);
- assert_eq(ret, MEDIA_CONTROLLER_ERROR_INVALID_PARAMETER);
+ ret = mc_server_create(NULL);
+ assert_eq(ret, MEDIA_CONTROLLER_ERROR_INVALID_PARAMETER);
- return 0;
+ return 0;
}
*/
int utc_mc_server_destroy_p(void)
{
- assert_eq(startup_ret, MEDIA_CONTROLLER_ERROR_NONE);
+ assert_eq(startup_ret, MEDIA_CONTROLLER_ERROR_NONE);
- int ret = MEDIA_CONTROLLER_ERROR_NONE;
+ int ret = MEDIA_CONTROLLER_ERROR_NONE;
- ret = mc_server_destroy(g_mc_server);
- assert_eq(ret, MEDIA_CONTROLLER_ERROR_NONE);
- g_mc_server = NULL;
+ ret = mc_server_destroy(g_mc_server);
+ assert_eq(ret, MEDIA_CONTROLLER_ERROR_NONE);
+ g_mc_server = NULL;
- return 0;
+ return 0;
}
*/
int utc_mc_server_destroy_n(void)
{
- assert_eq(startup_ret, MEDIA_CONTROLLER_ERROR_NONE);
+ assert_eq(startup_ret, MEDIA_CONTROLLER_ERROR_NONE);
- int ret = MEDIA_CONTROLLER_ERROR_NONE;
+ int ret = MEDIA_CONTROLLER_ERROR_NONE;
- ret = mc_server_destroy(NULL);
- assert_eq(ret, MEDIA_CONTROLLER_ERROR_INVALID_PARAMETER);
+ ret = mc_server_destroy(NULL);
+ assert_eq(ret, MEDIA_CONTROLLER_ERROR_INVALID_PARAMETER);
- return 0;
+ return 0;
}
/**
*/
int utc_mc_server_set_playback_state_p(void)
{
- assert_eq(startup_ret, MEDIA_CONTROLLER_ERROR_NONE);
+ assert_eq(startup_ret, MEDIA_CONTROLLER_ERROR_NONE);
- int ret = MEDIA_CONTROLLER_ERROR_NONE;
- const mc_playback_states_e playback_state = MC_PLAYBACK_STATE_PLAYING;
+ int ret = MEDIA_CONTROLLER_ERROR_NONE;
+ const mc_playback_states_e playback_state = MC_PLAYBACK_STATE_PLAYING;
- ret = mc_server_set_playback_state(g_mc_server, playback_state);
- assert_eq(ret, MEDIA_CONTROLLER_ERROR_NONE);
+ ret = mc_server_set_playback_state(g_mc_server, playback_state);
+ assert_eq(ret, MEDIA_CONTROLLER_ERROR_NONE);
- return 0;
+ return 0;
}
*/
int utc_mc_server_set_playback_state_n(void)
{
- assert_eq(startup_ret, MEDIA_CONTROLLER_ERROR_NONE);
+ assert_eq(startup_ret, MEDIA_CONTROLLER_ERROR_NONE);
- int ret = MEDIA_CONTROLLER_ERROR_NONE;
- const mc_playback_states_e playback_state = MC_PLAYBACK_STATE_NONE-1;
+ int ret = MEDIA_CONTROLLER_ERROR_NONE;
+ const mc_playback_states_e playback_state = MC_PLAYBACK_STATE_NONE-1;
- ret = mc_server_set_playback_state(NULL, playback_state);
- assert_eq(ret, MEDIA_CONTROLLER_ERROR_INVALID_PARAMETER);
+ ret = mc_server_set_playback_state(NULL, playback_state);
+ assert_eq(ret, MEDIA_CONTROLLER_ERROR_INVALID_PARAMETER);
- ret = mc_server_set_playback_state(g_mc_server, playback_state);
- assert_eq(ret, MEDIA_CONTROLLER_ERROR_INVALID_PARAMETER);
+ ret = mc_server_set_playback_state(g_mc_server, playback_state);
+ assert_eq(ret, MEDIA_CONTROLLER_ERROR_INVALID_PARAMETER);
- return 0;
+ return 0;
}
/**
*/
int utc_mc_server_set_playback_position_p(void)
{
- assert_eq(startup_ret, MEDIA_CONTROLLER_ERROR_NONE);
+ assert_eq(startup_ret, MEDIA_CONTROLLER_ERROR_NONE);
- int ret = MEDIA_CONTROLLER_ERROR_NONE;
- unsigned long long playback_position = 1000;
+ int ret = MEDIA_CONTROLLER_ERROR_NONE;
+ unsigned long long playback_position = 1000;
- ret = mc_server_set_playback_position(g_mc_server, playback_position);
- assert_eq(ret, MEDIA_CONTROLLER_ERROR_NONE);
+ ret = mc_server_set_playback_position(g_mc_server, playback_position);
+ assert_eq(ret, MEDIA_CONTROLLER_ERROR_NONE);
- return 0;
+ return 0;
}
*/
int utc_mc_server_set_playback_position_n(void)
{
- assert_eq(startup_ret, MEDIA_CONTROLLER_ERROR_NONE);
+ assert_eq(startup_ret, MEDIA_CONTROLLER_ERROR_NONE);
- int ret = MEDIA_CONTROLLER_ERROR_NONE;
- unsigned long long playback_position = 1000;
+ int ret = MEDIA_CONTROLLER_ERROR_NONE;
+ unsigned long long playback_position = 1000;
- ret = mc_server_set_playback_position(NULL, playback_position);
- assert_eq(ret, MEDIA_CONTROLLER_ERROR_INVALID_PARAMETER);
+ ret = mc_server_set_playback_position(NULL, playback_position);
+ assert_eq(ret, MEDIA_CONTROLLER_ERROR_INVALID_PARAMETER);
- return 0;
+ return 0;
}
/**
*/
int utc_mc_server_set_playback_content_type_p(void)
{
- assert_eq(startup_ret, MEDIA_CONTROLLER_ERROR_NONE);
+ assert_eq(startup_ret, MEDIA_CONTROLLER_ERROR_NONE);
- int ret = MEDIA_CONTROLLER_ERROR_NONE;
+ int ret = MEDIA_CONTROLLER_ERROR_NONE;
- ret = mc_server_set_playback_content_type(g_mc_server, g_mc_test_content_type);
- assert_eq(ret, MEDIA_CONTROLLER_ERROR_NONE);
+ ret = mc_server_set_playback_content_type(g_mc_server, g_mc_test_content_type);
+ assert_eq(ret, MEDIA_CONTROLLER_ERROR_NONE);
- return 0;
+ return 0;
}
/**
*/
int utc_mc_server_set_playback_content_type_n(void)
{
- assert_eq(startup_ret, MEDIA_CONTROLLER_ERROR_NONE);
+ assert_eq(startup_ret, MEDIA_CONTROLLER_ERROR_NONE);
- int ret = MEDIA_CONTROLLER_ERROR_NONE;
+ int ret = MEDIA_CONTROLLER_ERROR_NONE;
- ret = mc_server_set_playback_content_type(NULL, g_mc_test_content_type);
- assert_eq(ret, MEDIA_CONTROLLER_ERROR_INVALID_PARAMETER);
+ ret = mc_server_set_playback_content_type(NULL, g_mc_test_content_type);
+ assert_eq(ret, MEDIA_CONTROLLER_ERROR_INVALID_PARAMETER);
- ret = mc_server_set_playback_content_type(g_mc_server, -1);
- assert_eq(ret, MEDIA_CONTROLLER_ERROR_INVALID_PARAMETER);
+ ret = mc_server_set_playback_content_type(g_mc_server, -1);
+ assert_eq(ret, MEDIA_CONTROLLER_ERROR_INVALID_PARAMETER);
- return 0;
+ return 0;
}
/**
*/
int utc_mc_server_set_content_age_rating_p(void)
{
- assert_eq(startup_ret, MEDIA_CONTROLLER_ERROR_NONE);
+ assert_eq(startup_ret, MEDIA_CONTROLLER_ERROR_NONE);
- int ret = MEDIA_CONTROLLER_ERROR_NONE;
+ int ret = MEDIA_CONTROLLER_ERROR_NONE;
- ret = mc_server_set_content_age_rating(g_mc_server, g_mc_test_age_rating);
- assert_eq(ret, MEDIA_CONTROLLER_ERROR_NONE);
+ ret = mc_server_set_content_age_rating(g_mc_server, g_mc_test_age_rating);
+ assert_eq(ret, MEDIA_CONTROLLER_ERROR_NONE);
- return 0;
+ return 0;
}
/**
*/
int utc_mc_server_set_content_age_rating_n(void)
{
- assert_eq(startup_ret, MEDIA_CONTROLLER_ERROR_NONE);
+ assert_eq(startup_ret, MEDIA_CONTROLLER_ERROR_NONE);
- int ret = MEDIA_CONTROLLER_ERROR_NONE;
+ int ret = MEDIA_CONTROLLER_ERROR_NONE;
- ret = mc_server_set_content_age_rating(NULL, g_mc_test_age_rating);
- assert_eq(ret, MEDIA_CONTROLLER_ERROR_INVALID_PARAMETER);
+ ret = mc_server_set_content_age_rating(NULL, g_mc_test_age_rating);
+ assert_eq(ret, MEDIA_CONTROLLER_ERROR_INVALID_PARAMETER);
- ret = mc_server_set_content_age_rating(g_mc_server, -1);
- assert_eq(ret, MEDIA_CONTROLLER_ERROR_INVALID_PARAMETER);
+ ret = mc_server_set_content_age_rating(g_mc_server, -1);
+ assert_eq(ret, MEDIA_CONTROLLER_ERROR_INVALID_PARAMETER);
- return 0;
+ return 0;
}
/**
*/
int utc_mc_server_set_icon_p(void)
{
- assert_eq(startup_ret, MEDIA_CONTROLLER_ERROR_NONE);
+ assert_eq(startup_ret, MEDIA_CONTROLLER_ERROR_NONE);
- int ret = MEDIA_CONTROLLER_ERROR_NONE;
+ int ret = MEDIA_CONTROLLER_ERROR_NONE;
- ret = mc_server_set_icon(g_mc_server, g_mc_test_icon_path);
- assert_eq(ret, MEDIA_CONTROLLER_ERROR_NONE);
+ ret = mc_server_set_icon(g_mc_server, g_mc_test_icon_path);
+ assert_eq(ret, MEDIA_CONTROLLER_ERROR_NONE);
- return 0;
+ return 0;
}
/**
*/
int utc_mc_server_set_icon_n(void)
{
- assert_eq(startup_ret, MEDIA_CONTROLLER_ERROR_NONE);
+ assert_eq(startup_ret, MEDIA_CONTROLLER_ERROR_NONE);
- int ret = MEDIA_CONTROLLER_ERROR_NONE;
+ int ret = MEDIA_CONTROLLER_ERROR_NONE;
- ret = mc_server_set_icon(NULL, g_mc_test_icon_path);
- assert_eq(ret, MEDIA_CONTROLLER_ERROR_INVALID_PARAMETER);
+ ret = mc_server_set_icon(NULL, g_mc_test_icon_path);
+ assert_eq(ret, MEDIA_CONTROLLER_ERROR_INVALID_PARAMETER);
- return 0;
+ return 0;
}
/**
*/
int utc_mc_server_set_playback_ability_p(void)
{
- assert_eq(startup_ret, MEDIA_CONTROLLER_ERROR_NONE);
+ assert_eq(startup_ret, MEDIA_CONTROLLER_ERROR_NONE);
- int ret = MEDIA_CONTROLLER_ERROR_NONE;
+ int ret = MEDIA_CONTROLLER_ERROR_NONE;
- ret = mc_server_set_playback_ability(g_mc_server, MC_PLAYBACK_ACTION_PLAY, MC_ABILITY_SUPPORTED_YES);
- assert_eq(ret, MEDIA_CONTROLLER_ERROR_NONE);
+ ret = mc_server_set_playback_ability(g_mc_server, MC_PLAYBACK_ACTION_PLAY, MC_ABILITY_SUPPORTED_YES);
+ assert_eq(ret, MEDIA_CONTROLLER_ERROR_NONE);
- ret = mc_server_set_playback_ability(g_mc_server, MC_PLAYBACK_ACTION_PAUSE, MC_ABILITY_SUPPORTED_NO);
+ ret = mc_server_set_playback_ability(g_mc_server, MC_PLAYBACK_ACTION_PAUSE, MC_ABILITY_SUPPORTED_NO);
assert_eq(ret, MEDIA_CONTROLLER_ERROR_NONE);
- ret = mc_server_set_playback_ability(g_mc_server, MC_PLAYBACK_ACTION_STOP, MC_ABILITY_SUPPORTED_YES);
+ ret = mc_server_set_playback_ability(g_mc_server, MC_PLAYBACK_ACTION_STOP, MC_ABILITY_SUPPORTED_YES);
assert_eq(ret, MEDIA_CONTROLLER_ERROR_NONE);
- ret = mc_server_set_playback_ability(g_mc_server, MC_PLAYBACK_ACTION_NEXT, MC_ABILITY_SUPPORTED_NO);
+ ret = mc_server_set_playback_ability(g_mc_server, MC_PLAYBACK_ACTION_NEXT, MC_ABILITY_SUPPORTED_NO);
assert_eq(ret, MEDIA_CONTROLLER_ERROR_NONE);
- ret = mc_server_set_playback_ability(g_mc_server, MC_PLAYBACK_ACTION_PREV, MC_ABILITY_SUPPORTED_YES);
+ ret = mc_server_set_playback_ability(g_mc_server, MC_PLAYBACK_ACTION_PREV, MC_ABILITY_SUPPORTED_YES);
assert_eq(ret, MEDIA_CONTROLLER_ERROR_NONE);
ret = mc_server_set_playback_ability(g_mc_server, MC_PLAYBACK_ACTION_FAST_FORWARD, MC_ABILITY_SUPPORTED_NO);
assert_eq(ret, MEDIA_CONTROLLER_ERROR_NONE);
- ret = mc_server_set_playback_ability(g_mc_server, MC_PLAYBACK_ACTION_REWIND, MC_ABILITY_SUPPORTED_YES);
+ ret = mc_server_set_playback_ability(g_mc_server, MC_PLAYBACK_ACTION_REWIND, MC_ABILITY_SUPPORTED_YES);
assert_eq(ret, MEDIA_CONTROLLER_ERROR_NONE);
- ret = mc_server_set_playback_ability(g_mc_server, MC_PLAYBACK_ACTION_TOGGLE_PLAY_PAUSE, MC_ABILITY_SUPPORTED_NO);
+ ret = mc_server_set_playback_ability(g_mc_server, MC_PLAYBACK_ACTION_TOGGLE_PLAY_PAUSE, MC_ABILITY_SUPPORTED_NO);
assert_eq(ret, MEDIA_CONTROLLER_ERROR_NONE);
- return 0;
+ return 0;
}
/**
*/
int utc_mc_server_set_playback_ability_n(void)
{
- assert_eq(startup_ret, MEDIA_CONTROLLER_ERROR_NONE);
+ assert_eq(startup_ret, MEDIA_CONTROLLER_ERROR_NONE);
- int ret = MEDIA_CONTROLLER_ERROR_NONE;
+ int ret = MEDIA_CONTROLLER_ERROR_NONE;
- ret = mc_server_set_playback_ability(NULL, MC_PLAYBACK_ACTION_PLAY, MC_ABILITY_SUPPORTED_YES);
- assert_eq(ret, MEDIA_CONTROLLER_ERROR_INVALID_PARAMETER);
+ ret = mc_server_set_playback_ability(NULL, MC_PLAYBACK_ACTION_PLAY, MC_ABILITY_SUPPORTED_YES);
+ assert_eq(ret, MEDIA_CONTROLLER_ERROR_INVALID_PARAMETER);
- ret = mc_server_set_playback_ability(g_mc_server, -1, MC_ABILITY_SUPPORTED_YES);
- assert_eq(ret, MEDIA_CONTROLLER_ERROR_INVALID_PARAMETER);
+ ret = mc_server_set_playback_ability(g_mc_server, -1, MC_ABILITY_SUPPORTED_YES);
+ assert_eq(ret, MEDIA_CONTROLLER_ERROR_INVALID_PARAMETER);
- ret = mc_server_set_playback_ability(g_mc_server, MC_PLAYBACK_ACTION_PLAY, -1);
- assert_eq(ret, MEDIA_CONTROLLER_ERROR_INVALID_PARAMETER);
+ ret = mc_server_set_playback_ability(g_mc_server, MC_PLAYBACK_ACTION_PLAY, -1);
+ assert_eq(ret, MEDIA_CONTROLLER_ERROR_INVALID_PARAMETER);
- ret = mc_server_set_playback_ability(g_mc_server, MC_PLAYBACK_ACTION_PLAY, MC_ABILITY_SUPPORTED_UNDECIDED);
- assert_eq(ret, MEDIA_CONTROLLER_ERROR_INVALID_PARAMETER);
+ ret = mc_server_set_playback_ability(g_mc_server, MC_PLAYBACK_ACTION_PLAY, MC_ABILITY_SUPPORTED_UNDECIDED);
+ assert_eq(ret, MEDIA_CONTROLLER_ERROR_INVALID_PARAMETER);
- return 0;
+ return 0;
}
/**
*/
int utc_mc_server_update_playback_ability_p(void)
{
- assert_eq(startup_ret, MEDIA_CONTROLLER_ERROR_NONE);
+ assert_eq(startup_ret, MEDIA_CONTROLLER_ERROR_NONE);
- int ret = MEDIA_CONTROLLER_ERROR_NONE;
+ int ret = MEDIA_CONTROLLER_ERROR_NONE;
- ret = mc_client_set_playback_ability_updated_cb(g_mc_client, _mc_playback_ability_updated_cb, NULL);
- assert_eq(ret, MEDIA_CONTROLLER_ERROR_NONE);
+ ret = mc_client_set_playback_ability_updated_cb(g_mc_client, _mc_playback_ability_updated_cb, NULL);
+ assert_eq(ret, MEDIA_CONTROLLER_ERROR_NONE);
- ret = mc_server_update_playback_ability(g_mc_server);
- assert_eq(ret, MEDIA_CONTROLLER_ERROR_NONE);
+ ret = mc_server_update_playback_ability(g_mc_server);
+ assert_eq(ret, MEDIA_CONTROLLER_ERROR_NONE);
assert_eq(WAIT_CALLBACK_RESULT, TRUE);
- return 0;
+ return 0;
}
/**
*/
int utc_mc_server_update_playback_ability_n(void)
{
- assert_eq(startup_ret, MEDIA_CONTROLLER_ERROR_NONE);
+ assert_eq(startup_ret, MEDIA_CONTROLLER_ERROR_NONE);
- int ret = MEDIA_CONTROLLER_ERROR_NONE;
+ int ret = MEDIA_CONTROLLER_ERROR_NONE;
- ret = mc_server_update_playback_ability(NULL);
- assert_eq(ret, MEDIA_CONTROLLER_ERROR_INVALID_PARAMETER);
+ ret = mc_server_update_playback_ability(NULL);
+ assert_eq(ret, MEDIA_CONTROLLER_ERROR_INVALID_PARAMETER);
- return 0;
+ return 0;
}
/**
*/
int utc_mc_server_set_shuffle_ability_p(void)
{
- assert_eq(startup_ret, MEDIA_CONTROLLER_ERROR_NONE);
+ assert_eq(startup_ret, MEDIA_CONTROLLER_ERROR_NONE);
- int ret = MEDIA_CONTROLLER_ERROR_NONE;
+ int ret = MEDIA_CONTROLLER_ERROR_NONE;
- ret = mc_client_set_shuffle_ability_updated_cb(g_mc_client, _mc_shuffle_ability_updated_cb, NULL);
- assert_eq(ret, MEDIA_CONTROLLER_ERROR_NONE);
+ ret = mc_client_set_shuffle_ability_updated_cb(g_mc_client, _mc_shuffle_ability_updated_cb, NULL);
+ assert_eq(ret, MEDIA_CONTROLLER_ERROR_NONE);
- ret = mc_server_set_shuffle_ability(g_mc_server, g_mc_test_ability);
- assert_eq(ret, MEDIA_CONTROLLER_ERROR_NONE);
+ ret = mc_server_set_shuffle_ability(g_mc_server, g_mc_test_ability);
+ assert_eq(ret, MEDIA_CONTROLLER_ERROR_NONE);
assert_eq(WAIT_CALLBACK_RESULT, TRUE);
- return 0;
+ return 0;
}
/**
*/
int utc_mc_server_set_shuffle_ability_n(void)
{
- assert_eq(startup_ret, MEDIA_CONTROLLER_ERROR_NONE);
+ assert_eq(startup_ret, MEDIA_CONTROLLER_ERROR_NONE);
- int ret = MEDIA_CONTROLLER_ERROR_NONE;
+ int ret = MEDIA_CONTROLLER_ERROR_NONE;
- ret = mc_server_set_shuffle_ability(NULL, g_mc_test_ability);
- assert_eq(ret, MEDIA_CONTROLLER_ERROR_INVALID_PARAMETER);
+ ret = mc_server_set_shuffle_ability(NULL, g_mc_test_ability);
+ assert_eq(ret, MEDIA_CONTROLLER_ERROR_INVALID_PARAMETER);
- ret = mc_server_set_shuffle_ability(g_mc_server, -1);
- assert_eq(ret, MEDIA_CONTROLLER_ERROR_INVALID_PARAMETER);
+ ret = mc_server_set_shuffle_ability(g_mc_server, -1);
+ assert_eq(ret, MEDIA_CONTROLLER_ERROR_INVALID_PARAMETER);
- return 0;
+ return 0;
}
/**
*/
int utc_mc_server_set_repeat_ability_p(void)
{
- assert_eq(startup_ret, MEDIA_CONTROLLER_ERROR_NONE);
+ assert_eq(startup_ret, MEDIA_CONTROLLER_ERROR_NONE);
- int ret = MEDIA_CONTROLLER_ERROR_NONE;
+ int ret = MEDIA_CONTROLLER_ERROR_NONE;
- ret = mc_client_set_repeat_ability_updated_cb(g_mc_client, _mc_repeat_ability_updated_cb, NULL);
- assert_eq(ret, MEDIA_CONTROLLER_ERROR_NONE);
+ ret = mc_client_set_repeat_ability_updated_cb(g_mc_client, _mc_repeat_ability_updated_cb, NULL);
+ assert_eq(ret, MEDIA_CONTROLLER_ERROR_NONE);
- ret = mc_server_set_repeat_ability(g_mc_server, g_mc_test_ability);
- assert_eq(ret, MEDIA_CONTROLLER_ERROR_NONE);
+ ret = mc_server_set_repeat_ability(g_mc_server, g_mc_test_ability);
+ assert_eq(ret, MEDIA_CONTROLLER_ERROR_NONE);
assert_eq(WAIT_CALLBACK_RESULT, TRUE);
- return 0;
+ return 0;
}
/**
*/
int utc_mc_server_set_repeat_ability_n(void)
{
- assert_eq(startup_ret, MEDIA_CONTROLLER_ERROR_NONE);
+ assert_eq(startup_ret, MEDIA_CONTROLLER_ERROR_NONE);
- int ret = MEDIA_CONTROLLER_ERROR_NONE;
+ int ret = MEDIA_CONTROLLER_ERROR_NONE;
- ret = mc_server_set_shuffle_ability(NULL, g_mc_test_ability);
- assert_eq(ret, MEDIA_CONTROLLER_ERROR_INVALID_PARAMETER);
+ ret = mc_server_set_repeat_ability(NULL, g_mc_test_ability);
+ assert_eq(ret, MEDIA_CONTROLLER_ERROR_INVALID_PARAMETER);
- ret = mc_server_set_repeat_ability(g_mc_server, -1);
- assert_eq(ret, MEDIA_CONTROLLER_ERROR_INVALID_PARAMETER);
+ ret = mc_server_set_repeat_ability(g_mc_server, -1);
+ assert_eq(ret, MEDIA_CONTROLLER_ERROR_INVALID_PARAMETER);
- return 0;
+ return 0;
+}
+
+/**
+ * @testcase utc_mc_server_set_ability_support_p
+ * @since_tizen 5.5
+ * @description Positive test case of mc_server_set_ability_support()
+ */
+int utc_mc_server_set_ability_support_p(void)
+{
+ assert_eq(startup_ret, MEDIA_CONTROLLER_ERROR_NONE);
+ int i = 0;
+
+ int ret = MEDIA_CONTROLLER_ERROR_NONE;
+
+ ret = mc_client_set_ability_support_updated_cb(g_mc_client, _mc_ability_updated_cb, NULL);
+ assert_eq(ret, MEDIA_CONTROLLER_ERROR_NONE);
+
+ for (i = 0; i <= MC_ABILITY_SEARCH; i++) {
+ ret = mc_server_set_ability_support(g_mc_server, i, g_mc_test_ability);
+ assert_eq(ret, MEDIA_CONTROLLER_ERROR_NONE);
+ assert_eq(WAIT_CALLBACK_RESULT, TRUE);
+ }
+
+ return 0;
+}
+
+/**
+ * @testcase utc_mc_server_set_ability_support_n
+ * @since_tizen 5.5
+ * @description Negative test case of mc_server_set_ability_support()
+ */
+int utc_mc_server_set_ability_support_n(void)
+{
+ assert_eq(startup_ret, MEDIA_CONTROLLER_ERROR_NONE);
+
+ int ret = MEDIA_CONTROLLER_ERROR_NONE;
+
+ ret = mc_server_set_ability_support(NULL, MC_ABILITY_SHUFFLE, g_mc_test_ability);
+ assert_eq(ret, MEDIA_CONTROLLER_ERROR_INVALID_PARAMETER);
+
+ ret = mc_server_set_ability_support(g_mc_server, MC_ABILITY_SHUFFLE, MC_ABILITY_SUPPORTED_UNDECIDED);
+ assert_eq(ret, MEDIA_CONTROLLER_ERROR_INVALID_PARAMETER);
+
+ return 0;
}
/**
*/
int utc_mc_server_update_playback_info_p(void)
{
- assert_eq(startup_ret, MEDIA_CONTROLLER_ERROR_NONE);
+ assert_eq(startup_ret, MEDIA_CONTROLLER_ERROR_NONE);
- int ret = MEDIA_CONTROLLER_ERROR_NONE;
+ int ret = MEDIA_CONTROLLER_ERROR_NONE;
- ret = mc_client_set_playback_updated_cb(g_mc_client, _mc_playback_updated_cb, NULL);
- assert_eq(ret, MEDIA_CONTROLLER_ERROR_NONE);
+ ret = mc_client_set_playback_updated_cb(g_mc_client, _mc_playback_updated_cb, NULL);
+ assert_eq(ret, MEDIA_CONTROLLER_ERROR_NONE);
- ret = mc_server_set_playback_state(g_mc_server, g_mc_test_playback_state);
- assert_eq(ret, MEDIA_CONTROLLER_ERROR_NONE);
+ ret = mc_server_set_playback_state(g_mc_server, g_mc_test_playback_state);
+ assert_eq(ret, MEDIA_CONTROLLER_ERROR_NONE);
- ret = mc_server_set_playback_position(g_mc_server, g_mc_test_playback_position);
- assert_eq(ret, MEDIA_CONTROLLER_ERROR_NONE);
+ ret = mc_server_set_playback_position(g_mc_server, g_mc_test_playback_position);
+ assert_eq(ret, MEDIA_CONTROLLER_ERROR_NONE);
- ret = mc_server_set_playback_content_type(g_mc_server, g_mc_test_content_type);
- assert_eq(ret, MEDIA_CONTROLLER_ERROR_NONE);
+ ret = mc_server_set_playback_content_type(g_mc_server, g_mc_test_content_type);
+ assert_eq(ret, MEDIA_CONTROLLER_ERROR_NONE);
ret = mc_server_set_content_age_rating(g_mc_server, g_mc_test_age_rating);
assert_eq(ret, MEDIA_CONTROLLER_ERROR_NONE);
ret = mc_server_set_playlist_item_info(g_mc_server, g_mc_test_playlist_name, g_mc_test_playlist_index);
assert_eq(ret, MEDIA_CONTROLLER_ERROR_NONE);
- ret = mc_server_update_playback_info(g_mc_server);
- assert_eq(ret, MEDIA_CONTROLLER_ERROR_NONE);
+ ret = mc_server_update_playback_info(g_mc_server);
+ assert_eq(ret, MEDIA_CONTROLLER_ERROR_NONE);
assert_eq(WAIT_CALLBACK_RESULT, TRUE);
- return 0;
+ return 0;
}
/**
*/
int utc_mc_server_update_playback_info_n(void)
{
- assert_eq(startup_ret, MEDIA_CONTROLLER_ERROR_NONE);
+ assert_eq(startup_ret, MEDIA_CONTROLLER_ERROR_NONE);
- int ret = MEDIA_CONTROLLER_ERROR_NONE;
+ int ret = MEDIA_CONTROLLER_ERROR_NONE;
- ret = mc_server_update_playback_info(NULL);
- assert_eq(ret, MEDIA_CONTROLLER_ERROR_INVALID_PARAMETER);
+ ret = mc_server_update_playback_info(NULL);
+ assert_eq(ret, MEDIA_CONTROLLER_ERROR_INVALID_PARAMETER);
- return 0;
+ return 0;
}
/**
*/
int utc_mc_server_update_shuffle_mode_p(void)
{
- assert_eq(startup_ret, MEDIA_CONTROLLER_ERROR_NONE);
+ assert_eq(startup_ret, MEDIA_CONTROLLER_ERROR_NONE);
- int ret = MEDIA_CONTROLLER_ERROR_NONE;
+ int ret = MEDIA_CONTROLLER_ERROR_NONE;
- ret = mc_client_set_shuffle_mode_updated_cb(g_mc_client, _mc_shuffle_mode_updated_cb, NULL);
- assert_eq(ret, MEDIA_CONTROLLER_ERROR_NONE);
+ ret = mc_client_set_shuffle_mode_updated_cb(g_mc_client, _mc_shuffle_mode_updated_cb, NULL);
+ assert_eq(ret, MEDIA_CONTROLLER_ERROR_NONE);
- ret = mc_server_update_shuffle_mode(g_mc_server, g_mc_test_shuffle_mode);
- assert_eq(ret, MEDIA_CONTROLLER_ERROR_NONE);
+ ret = mc_server_update_shuffle_mode(g_mc_server, g_mc_test_shuffle_mode);
+ assert_eq(ret, MEDIA_CONTROLLER_ERROR_NONE);
assert_eq(WAIT_CALLBACK_RESULT, TRUE);
- return 0;
+ return 0;
}
/**
*/
int utc_mc_server_update_shuffle_mode_n(void)
{
- assert_eq(startup_ret, MEDIA_CONTROLLER_ERROR_NONE);
+ assert_eq(startup_ret, MEDIA_CONTROLLER_ERROR_NONE);
- int ret = MEDIA_CONTROLLER_ERROR_NONE;
+ int ret = MEDIA_CONTROLLER_ERROR_NONE;
- ret = mc_server_update_shuffle_mode(NULL, g_mc_test_shuffle_mode);
- assert_eq(ret, MEDIA_CONTROLLER_ERROR_INVALID_PARAMETER);
+ ret = mc_server_update_shuffle_mode(NULL, g_mc_test_shuffle_mode);
+ assert_eq(ret, MEDIA_CONTROLLER_ERROR_INVALID_PARAMETER);
- ret = mc_server_update_shuffle_mode(g_mc_server, -1);
- assert_eq(ret, MEDIA_CONTROLLER_ERROR_INVALID_PARAMETER);
+ ret = mc_server_update_shuffle_mode(g_mc_server, -1);
+ assert_eq(ret, MEDIA_CONTROLLER_ERROR_INVALID_PARAMETER);
- return 0;
+ return 0;
}
/**
*/
int utc_mc_server_update_repeat_mode_p(void)
{
- assert_eq(startup_ret, MEDIA_CONTROLLER_ERROR_NONE);
+ assert_eq(startup_ret, MEDIA_CONTROLLER_ERROR_NONE);
- int ret = MEDIA_CONTROLLER_ERROR_NONE;
+ int ret = MEDIA_CONTROLLER_ERROR_NONE;
- ret = mc_client_set_repeat_mode_updated_cb(g_mc_client, _mc_repeat_mode_changed_cb, NULL);
- assert_eq(ret, MEDIA_CONTROLLER_ERROR_NONE);
+ ret = mc_client_set_repeat_mode_updated_cb(g_mc_client, _mc_repeat_mode_changed_cb, NULL);
+ assert_eq(ret, MEDIA_CONTROLLER_ERROR_NONE);
- ret = mc_server_update_repeat_mode(g_mc_server, g_mc_test_repeat_mode);
- assert_eq(ret, MEDIA_CONTROLLER_ERROR_NONE);
+ ret = mc_server_update_repeat_mode(g_mc_server, g_mc_test_repeat_mode);
+ assert_eq(ret, MEDIA_CONTROLLER_ERROR_NONE);
assert_eq(WAIT_CALLBACK_RESULT, TRUE);
- return 0;
+ return 0;
}
/**
*/
int utc_mc_server_update_repeat_mode_n(void)
{
- assert_eq(startup_ret, MEDIA_CONTROLLER_ERROR_NONE);
+ assert_eq(startup_ret, MEDIA_CONTROLLER_ERROR_NONE);
- int ret = MEDIA_CONTROLLER_ERROR_NONE;
+ int ret = MEDIA_CONTROLLER_ERROR_NONE;
- ret = mc_server_update_repeat_mode(NULL, g_mc_test_repeat_mode);
- assert_eq(ret, MEDIA_CONTROLLER_ERROR_INVALID_PARAMETER);
+ ret = mc_server_update_repeat_mode(NULL, g_mc_test_repeat_mode);
+ assert_eq(ret, MEDIA_CONTROLLER_ERROR_INVALID_PARAMETER);
- ret = mc_server_update_repeat_mode(g_mc_server, -1);
- assert_eq(ret, MEDIA_CONTROLLER_ERROR_INVALID_PARAMETER);
+ ret = mc_server_update_repeat_mode(g_mc_server, -1);
+ assert_eq(ret, MEDIA_CONTROLLER_ERROR_INVALID_PARAMETER);
- return 0;
+ return 0;
}
/**
*/
int utc_mc_server_set_playback_position_cmd_received_cb_p(void)
{
- assert_eq(startup_ret, MEDIA_CONTROLLER_ERROR_NONE);
+ assert_eq(startup_ret, MEDIA_CONTROLLER_ERROR_NONE);
- int ret = MEDIA_CONTROLLER_ERROR_NONE;
+ int ret = MEDIA_CONTROLLER_ERROR_NONE;
- ret = mc_server_set_playback_position_cmd_received_cb(g_mc_server, _mc_server_playback_position_cmd_received_cb, NULL);
- assert_eq(ret, MEDIA_CONTROLLER_ERROR_NONE);
+ ret = mc_server_set_playback_position_cmd_received_cb(g_mc_server, _mc_server_playback_position_cmd_received_cb, NULL);
+ assert_eq(ret, MEDIA_CONTROLLER_ERROR_NONE);
- return 0;
+ return 0;
}
/**
*/
int utc_mc_server_set_playback_position_cmd_received_cb_n(void)
{
- assert_eq(startup_ret, MEDIA_CONTROLLER_ERROR_NONE);
+ assert_eq(startup_ret, MEDIA_CONTROLLER_ERROR_NONE);
- int ret = MEDIA_CONTROLLER_ERROR_NONE;
+ int ret = MEDIA_CONTROLLER_ERROR_NONE;
- ret = mc_server_set_playback_position_cmd_received_cb(NULL, _mc_server_playback_position_cmd_received_cb, NULL);
- assert_eq(ret, MEDIA_CONTROLLER_ERROR_INVALID_PARAMETER);
+ ret = mc_server_set_playback_position_cmd_received_cb(NULL, _mc_server_playback_position_cmd_received_cb, NULL);
+ assert_eq(ret, MEDIA_CONTROLLER_ERROR_INVALID_PARAMETER);
- ret = mc_server_set_playback_position_cmd_received_cb(g_mc_server, NULL, NULL);
- assert_eq(ret, MEDIA_CONTROLLER_ERROR_INVALID_PARAMETER);
+ ret = mc_server_set_playback_position_cmd_received_cb(g_mc_server, NULL, NULL);
+ assert_eq(ret, MEDIA_CONTROLLER_ERROR_INVALID_PARAMETER);
- return 0;
+ return 0;
}
/**
*/
int utc_mc_server_unset_playback_position_cmd_received_cb_p(void)
{
- assert_eq(startup_ret, MEDIA_CONTROLLER_ERROR_NONE);
+ assert_eq(startup_ret, MEDIA_CONTROLLER_ERROR_NONE);
- int ret = MEDIA_CONTROLLER_ERROR_NONE;
+ int ret = MEDIA_CONTROLLER_ERROR_NONE;
- ret = mc_server_set_playback_position_cmd_received_cb(g_mc_server, _mc_server_playback_position_cmd_received_cb, NULL);
- assert_eq(ret, MEDIA_CONTROLLER_ERROR_NONE);
+ ret = mc_server_set_playback_position_cmd_received_cb(g_mc_server, _mc_server_playback_position_cmd_received_cb, NULL);
+ assert_eq(ret, MEDIA_CONTROLLER_ERROR_NONE);
- ret = mc_server_unset_playback_position_cmd_received_cb(g_mc_server);
- assert_eq(ret, MEDIA_CONTROLLER_ERROR_NONE);
+ ret = mc_server_unset_playback_position_cmd_received_cb(g_mc_server);
+ assert_eq(ret, MEDIA_CONTROLLER_ERROR_NONE);
- return 0;
+ return 0;
}
/**
*/
int utc_mc_server_unset_playback_position_cmd_received_cb_n(void)
{
- assert_eq(startup_ret, MEDIA_CONTROLLER_ERROR_NONE);
+ assert_eq(startup_ret, MEDIA_CONTROLLER_ERROR_NONE);
- int ret = MEDIA_CONTROLLER_ERROR_NONE;
+ int ret = MEDIA_CONTROLLER_ERROR_NONE;
- ret = mc_server_set_playback_position_cmd_received_cb(g_mc_server, _mc_server_playback_position_cmd_received_cb, NULL);
- assert_eq(ret, MEDIA_CONTROLLER_ERROR_NONE);
+ ret = mc_server_set_playback_position_cmd_received_cb(g_mc_server, _mc_server_playback_position_cmd_received_cb, NULL);
+ assert_eq(ret, MEDIA_CONTROLLER_ERROR_NONE);
- ret = mc_server_unset_playback_position_cmd_received_cb(NULL);
- assert_eq(ret, MEDIA_CONTROLLER_ERROR_INVALID_PARAMETER);
+ ret = mc_server_unset_playback_position_cmd_received_cb(NULL);
+ assert_eq(ret, MEDIA_CONTROLLER_ERROR_INVALID_PARAMETER);
- return 0;
+ return 0;
}
/**
*/
int utc_mc_server_set_shuffle_mode_cmd_received_cb_p(void)
{
- assert_eq(startup_ret, MEDIA_CONTROLLER_ERROR_NONE);
+ assert_eq(startup_ret, MEDIA_CONTROLLER_ERROR_NONE);
- int ret = MEDIA_CONTROLLER_ERROR_NONE;
+ int ret = MEDIA_CONTROLLER_ERROR_NONE;
- ret = mc_server_set_shuffle_mode_cmd_received_cb(g_mc_server, _mc_server_shuffle_mode_cmd_received_cb, NULL);
- assert_eq(ret, MEDIA_CONTROLLER_ERROR_NONE);
+ ret = mc_server_set_shuffle_mode_cmd_received_cb(g_mc_server, _mc_server_shuffle_mode_cmd_received_cb, NULL);
+ assert_eq(ret, MEDIA_CONTROLLER_ERROR_NONE);
- return 0;
+ return 0;
}
/**
*/
int utc_mc_server_set_shuffle_mode_cmd_received_cb_n(void)
{
- assert_eq(startup_ret, MEDIA_CONTROLLER_ERROR_NONE);
+ assert_eq(startup_ret, MEDIA_CONTROLLER_ERROR_NONE);
- int ret = MEDIA_CONTROLLER_ERROR_NONE;
+ int ret = MEDIA_CONTROLLER_ERROR_NONE;
- ret = mc_server_set_shuffle_mode_cmd_received_cb(NULL, _mc_server_shuffle_mode_cmd_received_cb, NULL);
- assert_eq(ret, MEDIA_CONTROLLER_ERROR_INVALID_PARAMETER);
+ ret = mc_server_set_shuffle_mode_cmd_received_cb(NULL, _mc_server_shuffle_mode_cmd_received_cb, NULL);
+ assert_eq(ret, MEDIA_CONTROLLER_ERROR_INVALID_PARAMETER);
- ret = mc_server_set_shuffle_mode_cmd_received_cb(g_mc_server, NULL, NULL);
- assert_eq(ret, MEDIA_CONTROLLER_ERROR_INVALID_PARAMETER);
+ ret = mc_server_set_shuffle_mode_cmd_received_cb(g_mc_server, NULL, NULL);
+ assert_eq(ret, MEDIA_CONTROLLER_ERROR_INVALID_PARAMETER);
- return 0;
+ return 0;
}
/**
*/
int utc_mc_server_unset_shuffle_mode_cmd_received_cb_p(void)
{
- assert_eq(startup_ret, MEDIA_CONTROLLER_ERROR_NONE);
+ assert_eq(startup_ret, MEDIA_CONTROLLER_ERROR_NONE);
- int ret = MEDIA_CONTROLLER_ERROR_NONE;
+ int ret = MEDIA_CONTROLLER_ERROR_NONE;
- ret = mc_server_set_shuffle_mode_cmd_received_cb(g_mc_server, _mc_server_shuffle_mode_cmd_received_cb, NULL);
- assert_eq(ret, MEDIA_CONTROLLER_ERROR_NONE);
+ ret = mc_server_set_shuffle_mode_cmd_received_cb(g_mc_server, _mc_server_shuffle_mode_cmd_received_cb, NULL);
+ assert_eq(ret, MEDIA_CONTROLLER_ERROR_NONE);
- ret = mc_server_unset_shuffle_mode_cmd_received_cb(g_mc_server);
- assert_eq(ret, MEDIA_CONTROLLER_ERROR_NONE);
+ ret = mc_server_unset_shuffle_mode_cmd_received_cb(g_mc_server);
+ assert_eq(ret, MEDIA_CONTROLLER_ERROR_NONE);
- return 0;
+ return 0;
}
/**
*/
int utc_mc_server_unset_shuffle_mode_cmd_received_cb_n(void)
{
- assert_eq(startup_ret, MEDIA_CONTROLLER_ERROR_NONE);
+ assert_eq(startup_ret, MEDIA_CONTROLLER_ERROR_NONE);
- int ret = MEDIA_CONTROLLER_ERROR_NONE;
+ int ret = MEDIA_CONTROLLER_ERROR_NONE;
- ret = mc_server_set_shuffle_mode_cmd_received_cb(g_mc_server, _mc_server_shuffle_mode_cmd_received_cb, NULL);
- assert_eq(ret, MEDIA_CONTROLLER_ERROR_NONE);
+ ret = mc_server_set_shuffle_mode_cmd_received_cb(g_mc_server, _mc_server_shuffle_mode_cmd_received_cb, NULL);
+ assert_eq(ret, MEDIA_CONTROLLER_ERROR_NONE);
- ret = mc_server_unset_shuffle_mode_cmd_received_cb(NULL);
- assert_eq(ret, MEDIA_CONTROLLER_ERROR_INVALID_PARAMETER);
+ ret = mc_server_unset_shuffle_mode_cmd_received_cb(NULL);
+ assert_eq(ret, MEDIA_CONTROLLER_ERROR_INVALID_PARAMETER);
- return 0;
+ return 0;
}
/**
*/
int utc_mc_server_set_repeat_mode_cmd_received_cb_p(void)
{
- assert_eq(startup_ret, MEDIA_CONTROLLER_ERROR_NONE);
+ assert_eq(startup_ret, MEDIA_CONTROLLER_ERROR_NONE);
- int ret = MEDIA_CONTROLLER_ERROR_NONE;
+ int ret = MEDIA_CONTROLLER_ERROR_NONE;
- ret = mc_server_set_repeat_mode_cmd_received_cb(g_mc_server, _mc_server_repeat_mode_cmd_received_cb, NULL);
- assert_eq(ret, MEDIA_CONTROLLER_ERROR_NONE);
+ ret = mc_server_set_repeat_mode_cmd_received_cb(g_mc_server, _mc_server_repeat_mode_cmd_received_cb, NULL);
+ assert_eq(ret, MEDIA_CONTROLLER_ERROR_NONE);
- return 0;
+ return 0;
}
/**
*/
int utc_mc_server_set_repeat_mode_cmd_received_cb_n(void)
{
- assert_eq(startup_ret, MEDIA_CONTROLLER_ERROR_NONE);
+ assert_eq(startup_ret, MEDIA_CONTROLLER_ERROR_NONE);
- int ret = MEDIA_CONTROLLER_ERROR_NONE;
+ int ret = MEDIA_CONTROLLER_ERROR_NONE;
- ret = mc_server_set_repeat_mode_cmd_received_cb(NULL, _mc_server_repeat_mode_cmd_received_cb, NULL);
- assert_eq(ret, MEDIA_CONTROLLER_ERROR_INVALID_PARAMETER);
+ ret = mc_server_set_repeat_mode_cmd_received_cb(NULL, _mc_server_repeat_mode_cmd_received_cb, NULL);
+ assert_eq(ret, MEDIA_CONTROLLER_ERROR_INVALID_PARAMETER);
- ret = mc_server_set_repeat_mode_cmd_received_cb(g_mc_server, NULL, NULL);
- assert_eq(ret, MEDIA_CONTROLLER_ERROR_INVALID_PARAMETER);
+ ret = mc_server_set_repeat_mode_cmd_received_cb(g_mc_server, NULL, NULL);
+ assert_eq(ret, MEDIA_CONTROLLER_ERROR_INVALID_PARAMETER);
- return 0;
+ return 0;
}
/**
*/
int utc_mc_server_unset_repeat_mode_cmd_received_cb_p(void)
{
- assert_eq(startup_ret, MEDIA_CONTROLLER_ERROR_NONE);
+ assert_eq(startup_ret, MEDIA_CONTROLLER_ERROR_NONE);
- int ret = MEDIA_CONTROLLER_ERROR_NONE;
+ int ret = MEDIA_CONTROLLER_ERROR_NONE;
- ret = mc_server_set_repeat_mode_cmd_received_cb(g_mc_server, _mc_server_repeat_mode_cmd_received_cb, NULL);
- assert_eq(ret, MEDIA_CONTROLLER_ERROR_NONE);
+ ret = mc_server_set_repeat_mode_cmd_received_cb(g_mc_server, _mc_server_repeat_mode_cmd_received_cb, NULL);
+ assert_eq(ret, MEDIA_CONTROLLER_ERROR_NONE);
- ret = mc_server_unset_repeat_mode_cmd_received_cb(g_mc_server);
- assert_eq(ret, MEDIA_CONTROLLER_ERROR_NONE);
+ ret = mc_server_unset_repeat_mode_cmd_received_cb(g_mc_server);
+ assert_eq(ret, MEDIA_CONTROLLER_ERROR_NONE);
- return 0;
+ return 0;
}
/**
*/
int utc_mc_server_unset_repeat_mode_cmd_received_cb_n(void)
{
- assert_eq(startup_ret, MEDIA_CONTROLLER_ERROR_NONE);
+ assert_eq(startup_ret, MEDIA_CONTROLLER_ERROR_NONE);
- int ret = MEDIA_CONTROLLER_ERROR_NONE;
+ int ret = MEDIA_CONTROLLER_ERROR_NONE;
- ret = mc_server_set_repeat_mode_cmd_received_cb(g_mc_server, _mc_server_repeat_mode_cmd_received_cb, NULL);
- assert_eq(ret, MEDIA_CONTROLLER_ERROR_NONE);
+ ret = mc_server_set_repeat_mode_cmd_received_cb(g_mc_server, _mc_server_repeat_mode_cmd_received_cb, NULL);
+ assert_eq(ret, MEDIA_CONTROLLER_ERROR_NONE);
- ret = mc_server_unset_repeat_mode_cmd_received_cb(NULL);
- assert_eq(ret, MEDIA_CONTROLLER_ERROR_INVALID_PARAMETER);
+ ret = mc_server_unset_repeat_mode_cmd_received_cb(NULL);
+ assert_eq(ret, MEDIA_CONTROLLER_ERROR_INVALID_PARAMETER);
- return 0;
+ return 0;
}
/**
*/
int utc_mc_server_set_playback_action_cmd_received_cb_p(void)
{
- assert_eq(startup_ret, MEDIA_CONTROLLER_ERROR_NONE);
+ assert_eq(startup_ret, MEDIA_CONTROLLER_ERROR_NONE);
- int ret = MEDIA_CONTROLLER_ERROR_NONE;
+ int ret = MEDIA_CONTROLLER_ERROR_NONE;
- ret = mc_server_set_playback_action_cmd_received_cb(g_mc_server, _mc_server_playback_action_cmd_received_cb, NULL);
- assert_eq(ret, MEDIA_CONTROLLER_ERROR_NONE);
+ ret = mc_server_set_playback_action_cmd_received_cb(g_mc_server, _mc_server_playback_action_cmd_received_cb, NULL);
+ assert_eq(ret, MEDIA_CONTROLLER_ERROR_NONE);
- return 0;
+ return 0;
}
/**
*/
int utc_mc_server_set_playback_action_cmd_received_cb_n(void)
{
- assert_eq(startup_ret, MEDIA_CONTROLLER_ERROR_NONE);
+ assert_eq(startup_ret, MEDIA_CONTROLLER_ERROR_NONE);
- int ret = MEDIA_CONTROLLER_ERROR_NONE;
+ int ret = MEDIA_CONTROLLER_ERROR_NONE;
- ret = mc_server_set_playback_action_cmd_received_cb(NULL, _mc_server_playback_action_cmd_received_cb, NULL);
- assert_eq(ret, MEDIA_CONTROLLER_ERROR_INVALID_PARAMETER);
+ ret = mc_server_set_playback_action_cmd_received_cb(NULL, _mc_server_playback_action_cmd_received_cb, NULL);
+ assert_eq(ret, MEDIA_CONTROLLER_ERROR_INVALID_PARAMETER);
- ret = mc_server_set_playback_action_cmd_received_cb(g_mc_server, NULL, NULL);
- assert_eq(ret, MEDIA_CONTROLLER_ERROR_INVALID_PARAMETER);
+ ret = mc_server_set_playback_action_cmd_received_cb(g_mc_server, NULL, NULL);
+ assert_eq(ret, MEDIA_CONTROLLER_ERROR_INVALID_PARAMETER);
- return 0;
+ return 0;
}
/**
*/
int utc_mc_server_unset_playback_action_cmd_received_cb_p(void)
{
- assert_eq(startup_ret, MEDIA_CONTROLLER_ERROR_NONE);
+ assert_eq(startup_ret, MEDIA_CONTROLLER_ERROR_NONE);
- int ret = MEDIA_CONTROLLER_ERROR_NONE;
+ int ret = MEDIA_CONTROLLER_ERROR_NONE;
- ret = mc_server_set_playback_action_cmd_received_cb(g_mc_server, _mc_server_playback_action_cmd_received_cb, NULL);
- assert_eq(ret, MEDIA_CONTROLLER_ERROR_NONE);
+ ret = mc_server_set_playback_action_cmd_received_cb(g_mc_server, _mc_server_playback_action_cmd_received_cb, NULL);
+ assert_eq(ret, MEDIA_CONTROLLER_ERROR_NONE);
- ret = mc_server_unset_playback_action_cmd_received_cb(g_mc_server);
- assert_eq(ret, MEDIA_CONTROLLER_ERROR_NONE);
+ ret = mc_server_unset_playback_action_cmd_received_cb(g_mc_server);
+ assert_eq(ret, MEDIA_CONTROLLER_ERROR_NONE);
- return 0;
+ return 0;
}
/**
*/
int utc_mc_server_unset_playback_action_cmd_received_cb_n(void)
{
- assert_eq(startup_ret, MEDIA_CONTROLLER_ERROR_NONE);
+ assert_eq(startup_ret, MEDIA_CONTROLLER_ERROR_NONE);
- int ret = MEDIA_CONTROLLER_ERROR_NONE;
+ int ret = MEDIA_CONTROLLER_ERROR_NONE;
- ret = mc_server_set_playback_action_cmd_received_cb(g_mc_server, _mc_server_playback_action_cmd_received_cb, NULL);
- assert_eq(ret, MEDIA_CONTROLLER_ERROR_NONE);
+ ret = mc_server_set_playback_action_cmd_received_cb(g_mc_server, _mc_server_playback_action_cmd_received_cb, NULL);
+ assert_eq(ret, MEDIA_CONTROLLER_ERROR_NONE);
- ret = mc_server_unset_playback_action_cmd_received_cb(NULL);
- assert_eq(ret, MEDIA_CONTROLLER_ERROR_INVALID_PARAMETER);
+ ret = mc_server_unset_playback_action_cmd_received_cb(NULL);
+ assert_eq(ret, MEDIA_CONTROLLER_ERROR_INVALID_PARAMETER);
- return 0;
+ return 0;
}
/**
*/
int utc_mc_server_set_playlist_cmd_received_cb_p(void)
{
- assert_eq(startup_ret, MEDIA_CONTROLLER_ERROR_NONE);
+ assert_eq(startup_ret, MEDIA_CONTROLLER_ERROR_NONE);
- int ret = MEDIA_CONTROLLER_ERROR_NONE;
+ int ret = MEDIA_CONTROLLER_ERROR_NONE;
- ret = mc_server_set_playlist_cmd_received_cb(g_mc_server, _mc_server_playlist_cmd_received_cb, NULL);
- assert_eq(ret, MEDIA_CONTROLLER_ERROR_NONE);
+ ret = mc_server_set_playlist_cmd_received_cb(g_mc_server, _mc_server_playlist_cmd_received_cb, NULL);
+ assert_eq(ret, MEDIA_CONTROLLER_ERROR_NONE);
- return 0;
+ return 0;
}
/**
*/
int utc_mc_server_set_playlist_cmd_received_cb_n(void)
{
- assert_eq(startup_ret, MEDIA_CONTROLLER_ERROR_NONE);
+ assert_eq(startup_ret, MEDIA_CONTROLLER_ERROR_NONE);
- int ret = MEDIA_CONTROLLER_ERROR_NONE;
+ int ret = MEDIA_CONTROLLER_ERROR_NONE;
- ret = mc_server_set_playlist_cmd_received_cb(NULL, _mc_server_playlist_cmd_received_cb, NULL);
- assert_eq(ret, MEDIA_CONTROLLER_ERROR_INVALID_PARAMETER);
+ ret = mc_server_set_playlist_cmd_received_cb(NULL, _mc_server_playlist_cmd_received_cb, NULL);
+ assert_eq(ret, MEDIA_CONTROLLER_ERROR_INVALID_PARAMETER);
- ret = mc_server_set_playlist_cmd_received_cb(g_mc_server, NULL, NULL);
- assert_eq(ret, MEDIA_CONTROLLER_ERROR_INVALID_PARAMETER);
+ ret = mc_server_set_playlist_cmd_received_cb(g_mc_server, NULL, NULL);
+ assert_eq(ret, MEDIA_CONTROLLER_ERROR_INVALID_PARAMETER);
- return 0;
+ return 0;
}
/**
*/
int utc_mc_server_unset_playlist_cmd_received_cb_p(void)
{
- assert_eq(startup_ret, MEDIA_CONTROLLER_ERROR_NONE);
+ assert_eq(startup_ret, MEDIA_CONTROLLER_ERROR_NONE);
- int ret = MEDIA_CONTROLLER_ERROR_NONE;
+ int ret = MEDIA_CONTROLLER_ERROR_NONE;
- ret = mc_server_set_playlist_cmd_received_cb(g_mc_server, _mc_server_playlist_cmd_received_cb, NULL);
- assert_eq(ret, MEDIA_CONTROLLER_ERROR_NONE);
+ ret = mc_server_set_playlist_cmd_received_cb(g_mc_server, _mc_server_playlist_cmd_received_cb, NULL);
+ assert_eq(ret, MEDIA_CONTROLLER_ERROR_NONE);
- ret = mc_server_unset_playlist_cmd_received_cb(g_mc_server);
- assert_eq(ret, MEDIA_CONTROLLER_ERROR_NONE);
+ ret = mc_server_unset_playlist_cmd_received_cb(g_mc_server);
+ assert_eq(ret, MEDIA_CONTROLLER_ERROR_NONE);
- return 0;
+ return 0;
}
/**
*/
int utc_mc_server_unset_playlist_cmd_received_cb_n(void)
{
- assert_eq(startup_ret, MEDIA_CONTROLLER_ERROR_NONE);
+ assert_eq(startup_ret, MEDIA_CONTROLLER_ERROR_NONE);
- int ret = MEDIA_CONTROLLER_ERROR_NONE;
+ int ret = MEDIA_CONTROLLER_ERROR_NONE;
- ret = mc_server_set_playlist_cmd_received_cb(g_mc_server, _mc_server_playlist_cmd_received_cb, NULL);
- assert_eq(ret, MEDIA_CONTROLLER_ERROR_NONE);
+ ret = mc_server_set_playlist_cmd_received_cb(g_mc_server, _mc_server_playlist_cmd_received_cb, NULL);
+ assert_eq(ret, MEDIA_CONTROLLER_ERROR_NONE);
- ret = mc_server_unset_playlist_cmd_received_cb(NULL);
- assert_eq(ret, MEDIA_CONTROLLER_ERROR_INVALID_PARAMETER);
+ ret = mc_server_unset_playlist_cmd_received_cb(NULL);
+ assert_eq(ret, MEDIA_CONTROLLER_ERROR_INVALID_PARAMETER);
- return 0;
+ return 0;
}
/**
*/
int utc_mc_server_set_custom_cmd_received_cb_p(void)
{
- assert_eq(startup_ret, MEDIA_CONTROLLER_ERROR_NONE);
+ assert_eq(startup_ret, MEDIA_CONTROLLER_ERROR_NONE);
- int ret = MEDIA_CONTROLLER_ERROR_NONE;
+ int ret = MEDIA_CONTROLLER_ERROR_NONE;
- ret = mc_server_set_custom_cmd_received_cb(g_mc_server, _mc_server_custom_cmd_received_cb, NULL);
- assert_eq(ret, MEDIA_CONTROLLER_ERROR_NONE);
+ ret = mc_server_set_custom_cmd_received_cb(g_mc_server, _mc_server_custom_cmd_received_cb, NULL);
+ assert_eq(ret, MEDIA_CONTROLLER_ERROR_NONE);
- return 0;
+ return 0;
}
/**
*/
int utc_mc_server_set_custom_cmd_received_cb_n(void)
{
- assert_eq(startup_ret, MEDIA_CONTROLLER_ERROR_NONE);
+ assert_eq(startup_ret, MEDIA_CONTROLLER_ERROR_NONE);
- int ret = MEDIA_CONTROLLER_ERROR_NONE;
+ int ret = MEDIA_CONTROLLER_ERROR_NONE;
- ret = mc_server_set_custom_cmd_received_cb(NULL, _mc_server_custom_cmd_received_cb, NULL);
- assert_eq(ret, MEDIA_CONTROLLER_ERROR_INVALID_PARAMETER);
+ ret = mc_server_set_custom_cmd_received_cb(NULL, _mc_server_custom_cmd_received_cb, NULL);
+ assert_eq(ret, MEDIA_CONTROLLER_ERROR_INVALID_PARAMETER);
- ret = mc_server_set_custom_cmd_received_cb(g_mc_server, NULL, NULL);
- assert_eq(ret, MEDIA_CONTROLLER_ERROR_INVALID_PARAMETER);
+ ret = mc_server_set_custom_cmd_received_cb(g_mc_server, NULL, NULL);
+ assert_eq(ret, MEDIA_CONTROLLER_ERROR_INVALID_PARAMETER);
- return 0;
+ return 0;
}
/**
*/
int utc_mc_server_unset_custom_cmd_received_cb_p(void)
{
- assert_eq(startup_ret, MEDIA_CONTROLLER_ERROR_NONE);
+ assert_eq(startup_ret, MEDIA_CONTROLLER_ERROR_NONE);
- int ret = MEDIA_CONTROLLER_ERROR_NONE;
+ int ret = MEDIA_CONTROLLER_ERROR_NONE;
- ret = mc_server_set_custom_cmd_received_cb(g_mc_server, _mc_server_custom_cmd_received_cb, NULL);
- assert_eq(ret, MEDIA_CONTROLLER_ERROR_NONE);
+ ret = mc_server_set_custom_cmd_received_cb(g_mc_server, _mc_server_custom_cmd_received_cb, NULL);
+ assert_eq(ret, MEDIA_CONTROLLER_ERROR_NONE);
- ret = mc_server_unset_custom_cmd_received_cb(g_mc_server);
- assert_eq(ret, MEDIA_CONTROLLER_ERROR_NONE);
+ ret = mc_server_unset_custom_cmd_received_cb(g_mc_server);
+ assert_eq(ret, MEDIA_CONTROLLER_ERROR_NONE);
- return 0;
+ return 0;
}
/**
*/
int utc_mc_server_unset_custom_cmd_received_cb_n(void)
{
- assert_eq(startup_ret, MEDIA_CONTROLLER_ERROR_NONE);
+ assert_eq(startup_ret, MEDIA_CONTROLLER_ERROR_NONE);
- int ret = MEDIA_CONTROLLER_ERROR_NONE;
+ int ret = MEDIA_CONTROLLER_ERROR_NONE;
- ret = mc_server_set_custom_cmd_received_cb(g_mc_server, _mc_server_custom_cmd_received_cb, NULL);
- assert_eq(ret, MEDIA_CONTROLLER_ERROR_NONE);
+ ret = mc_server_set_custom_cmd_received_cb(g_mc_server, _mc_server_custom_cmd_received_cb, NULL);
+ assert_eq(ret, MEDIA_CONTROLLER_ERROR_NONE);
- ret = mc_server_unset_custom_cmd_received_cb(NULL);
- assert_eq(ret, MEDIA_CONTROLLER_ERROR_INVALID_PARAMETER);
+ ret = mc_server_unset_custom_cmd_received_cb(NULL);
+ assert_eq(ret, MEDIA_CONTROLLER_ERROR_INVALID_PARAMETER);
- return 0;
+ return 0;
}
/**
int ret = MEDIA_CONTROLLER_ERROR_NONE;
+ ret = __mc_server_set_ability(g_mc_test_ability);
+ assert_eq(ret, MEDIA_CONTROLLER_ERROR_NONE);
+
ret = mc_client_get_latest_server_info(g_mc_client, &g_mc_server_name, &g_mc_server_state);
assert_eq(ret, MEDIA_CONTROLLER_ERROR_NONE);
*/
int utc_mc_server_send_cmd_reply_n(void)
{
- assert_eq(startup_ret, MEDIA_CONTROLLER_ERROR_NONE);
+ assert_eq(startup_ret, MEDIA_CONTROLLER_ERROR_NONE);
- int ret = MEDIA_CONTROLLER_ERROR_NONE;
+ int ret = MEDIA_CONTROLLER_ERROR_NONE;
- ret = mc_server_send_cmd_reply(NULL, g_mc_test_appname, g_request_id, g_mc_test_reply_result, NULL);
- assert_eq(ret, MEDIA_CONTROLLER_ERROR_INVALID_PARAMETER);
+ ret = mc_server_send_cmd_reply(NULL, g_mc_test_appname, g_request_id, g_mc_test_reply_result, NULL);
+ assert_eq(ret, MEDIA_CONTROLLER_ERROR_INVALID_PARAMETER);
- ret = mc_server_send_cmd_reply(g_mc_server, NULL, g_request_id, g_mc_test_reply_result, NULL);
- assert_eq(ret, MEDIA_CONTROLLER_ERROR_INVALID_PARAMETER);
+ ret = mc_server_send_cmd_reply(g_mc_server, NULL, g_request_id, g_mc_test_reply_result, NULL);
+ assert_eq(ret, MEDIA_CONTROLLER_ERROR_INVALID_PARAMETER);
- ret = mc_server_send_cmd_reply(g_mc_server, g_mc_test_appname, NULL, g_mc_test_reply_result, NULL);
- assert_eq(ret, MEDIA_CONTROLLER_ERROR_INVALID_PARAMETER);
+ ret = mc_server_send_cmd_reply(g_mc_server, g_mc_test_appname, NULL, g_mc_test_reply_result, NULL);
+ assert_eq(ret, MEDIA_CONTROLLER_ERROR_INVALID_PARAMETER);
- return 0;
+ return 0;
}
/**
*/
int utc_mc_server_foreach_client_p(void)
{
- assert_eq(startup_ret, MEDIA_CONTROLLER_ERROR_NONE);
+ assert_eq(startup_ret, MEDIA_CONTROLLER_ERROR_NONE);
- int ret = MEDIA_CONTROLLER_ERROR_NONE;
+ int ret = MEDIA_CONTROLLER_ERROR_NONE;
- ret = mc_server_foreach_client(g_mc_client, _mc_activated_client_cb, &g_mc_client_name);
- assert_eq(ret, MEDIA_CONTROLLER_ERROR_NONE);
+ ret = mc_server_foreach_client(g_mc_client, _mc_activated_client_cb, &g_mc_client_name);
+ assert_eq(ret, MEDIA_CONTROLLER_ERROR_NONE);
assert_neq(g_mc_client_name, NULL);
- return 0;
+ return 0;
}
/**
*/
int utc_mc_server_foreach_client_n(void)
{
- assert_eq(startup_ret, MEDIA_CONTROLLER_ERROR_NONE);
+ assert_eq(startup_ret, MEDIA_CONTROLLER_ERROR_NONE);
- int ret = MEDIA_CONTROLLER_ERROR_NONE;
+ int ret = MEDIA_CONTROLLER_ERROR_NONE;
- ret = mc_server_foreach_client(NULL, _mc_activated_client_cb, NULL);
- assert_eq(ret, MEDIA_CONTROLLER_ERROR_INVALID_PARAMETER);
+ ret = mc_server_foreach_client(NULL, _mc_activated_client_cb, NULL);
+ assert_eq(ret, MEDIA_CONTROLLER_ERROR_INVALID_PARAMETER);
- ret = mc_server_foreach_client(g_mc_client, NULL, NULL);
- assert_eq(ret, MEDIA_CONTROLLER_ERROR_INVALID_PARAMETER);
+ ret = mc_server_foreach_client(g_mc_client, NULL, NULL);
+ assert_eq(ret, MEDIA_CONTROLLER_ERROR_INVALID_PARAMETER);
- return 0;
+ return 0;
}
/**
*/
int utc_mc_server_set_event_reply_received_cb_p(void)
{
- assert_eq(startup_ret, MEDIA_CONTROLLER_ERROR_NONE);
+ assert_eq(startup_ret, MEDIA_CONTROLLER_ERROR_NONE);
- int ret = MEDIA_CONTROLLER_ERROR_NONE;
+ int ret = MEDIA_CONTROLLER_ERROR_NONE;
- ret = mc_server_set_event_reply_received_cb(g_mc_server, _mc_server_event_reply_received_cb, NULL);
- assert_eq(ret, MEDIA_CONTROLLER_ERROR_NONE);
+ ret = mc_server_set_event_reply_received_cb(g_mc_server, _mc_server_event_reply_received_cb, NULL);
+ assert_eq(ret, MEDIA_CONTROLLER_ERROR_NONE);
- return 0;
+ return 0;
}
/**
*/
int utc_mc_server_set_event_reply_received_cb_n(void)
{
- assert_eq(startup_ret, MEDIA_CONTROLLER_ERROR_NONE);
+ assert_eq(startup_ret, MEDIA_CONTROLLER_ERROR_NONE);
- int ret = MEDIA_CONTROLLER_ERROR_NONE;
+ int ret = MEDIA_CONTROLLER_ERROR_NONE;
- ret = mc_server_set_event_reply_received_cb(NULL, _mc_server_event_reply_received_cb, NULL);
- assert_eq(ret, MEDIA_CONTROLLER_ERROR_INVALID_PARAMETER);
+ ret = mc_server_set_event_reply_received_cb(NULL, _mc_server_event_reply_received_cb, NULL);
+ assert_eq(ret, MEDIA_CONTROLLER_ERROR_INVALID_PARAMETER);
- ret = mc_server_set_event_reply_received_cb(g_mc_server, NULL, NULL);
- assert_eq(ret, MEDIA_CONTROLLER_ERROR_INVALID_PARAMETER);
+ ret = mc_server_set_event_reply_received_cb(g_mc_server, NULL, NULL);
+ assert_eq(ret, MEDIA_CONTROLLER_ERROR_INVALID_PARAMETER);
- return 0;
+ return 0;
}
/**
*/
int utc_mc_server_unset_event_reply_received_cb_p(void)
{
- assert_eq(startup_ret, MEDIA_CONTROLLER_ERROR_NONE);
+ assert_eq(startup_ret, MEDIA_CONTROLLER_ERROR_NONE);
- int ret = MEDIA_CONTROLLER_ERROR_NONE;
+ int ret = MEDIA_CONTROLLER_ERROR_NONE;
- ret = mc_server_set_event_reply_received_cb(g_mc_server, _mc_server_event_reply_received_cb, NULL);
- assert_eq(ret, MEDIA_CONTROLLER_ERROR_NONE);
+ ret = mc_server_set_event_reply_received_cb(g_mc_server, _mc_server_event_reply_received_cb, NULL);
+ assert_eq(ret, MEDIA_CONTROLLER_ERROR_NONE);
- ret = mc_server_unset_event_reply_received_cb(g_mc_server);
- assert_eq(ret, MEDIA_CONTROLLER_ERROR_NONE);
+ ret = mc_server_unset_event_reply_received_cb(g_mc_server);
+ assert_eq(ret, MEDIA_CONTROLLER_ERROR_NONE);
- return 0;
+ return 0;
}
/**
*/
int utc_mc_server_unset_event_reply_received_cb_n(void)
{
- assert_eq(startup_ret, MEDIA_CONTROLLER_ERROR_NONE);
+ assert_eq(startup_ret, MEDIA_CONTROLLER_ERROR_NONE);
- int ret = MEDIA_CONTROLLER_ERROR_NONE;
+ int ret = MEDIA_CONTROLLER_ERROR_NONE;
- ret = mc_server_unset_event_reply_received_cb(NULL);
- assert_eq(ret, MEDIA_CONTROLLER_ERROR_INVALID_PARAMETER);
+ ret = mc_server_unset_event_reply_received_cb(NULL);
+ assert_eq(ret, MEDIA_CONTROLLER_ERROR_INVALID_PARAMETER);
- return 0;
+ return 0;
}
/**
*/
int utc_mc_server_set_search_cmd_received_cb_p(void)
{
- assert_eq(startup_ret, MEDIA_CONTROLLER_ERROR_NONE);
+ assert_eq(startup_ret, MEDIA_CONTROLLER_ERROR_NONE);
- int ret = MEDIA_CONTROLLER_ERROR_NONE;
+ int ret = MEDIA_CONTROLLER_ERROR_NONE;
- ret = mc_server_set_search_cmd_received_cb(g_mc_server, _mc_server_search_cmd_received_cb, NULL);
- assert_eq(ret, MEDIA_CONTROLLER_ERROR_NONE);
+ ret = mc_server_set_search_cmd_received_cb(g_mc_server, _mc_server_search_cmd_received_cb, NULL);
+ assert_eq(ret, MEDIA_CONTROLLER_ERROR_NONE);
- return 0;
+ return 0;
}
/**
*/
int utc_mc_server_set_search_cmd_received_cb_n(void)
{
- assert_eq(startup_ret, MEDIA_CONTROLLER_ERROR_NONE);
+ assert_eq(startup_ret, MEDIA_CONTROLLER_ERROR_NONE);
- int ret = MEDIA_CONTROLLER_ERROR_NONE;
+ int ret = MEDIA_CONTROLLER_ERROR_NONE;
- ret = mc_server_set_search_cmd_received_cb(NULL, _mc_server_search_cmd_received_cb, NULL);
- assert_eq(ret, MEDIA_CONTROLLER_ERROR_INVALID_PARAMETER);
+ ret = mc_server_set_search_cmd_received_cb(NULL, _mc_server_search_cmd_received_cb, NULL);
+ assert_eq(ret, MEDIA_CONTROLLER_ERROR_INVALID_PARAMETER);
- ret = mc_server_set_search_cmd_received_cb(g_mc_server, NULL, NULL);
- assert_eq(ret, MEDIA_CONTROLLER_ERROR_INVALID_PARAMETER);
+ ret = mc_server_set_search_cmd_received_cb(g_mc_server, NULL, NULL);
+ assert_eq(ret, MEDIA_CONTROLLER_ERROR_INVALID_PARAMETER);
- return 0;
+ return 0;
}
/**
*/
int utc_mc_server_unset_search_cmd_received_cb_p(void)
{
- assert_eq(startup_ret, MEDIA_CONTROLLER_ERROR_NONE);
+ assert_eq(startup_ret, MEDIA_CONTROLLER_ERROR_NONE);
- int ret = MEDIA_CONTROLLER_ERROR_NONE;
+ int ret = MEDIA_CONTROLLER_ERROR_NONE;
- ret = mc_server_set_search_cmd_received_cb(g_mc_server, _mc_server_search_cmd_received_cb, NULL);
- assert_eq(ret, MEDIA_CONTROLLER_ERROR_NONE);
+ ret = mc_server_set_search_cmd_received_cb(g_mc_server, _mc_server_search_cmd_received_cb, NULL);
+ assert_eq(ret, MEDIA_CONTROLLER_ERROR_NONE);
- ret = mc_server_unset_search_cmd_received_cb(g_mc_server);
- assert_eq(ret, MEDIA_CONTROLLER_ERROR_NONE);
+ ret = mc_server_unset_search_cmd_received_cb(g_mc_server);
+ assert_eq(ret, MEDIA_CONTROLLER_ERROR_NONE);
- return 0;
+ return 0;
}
/**
*/
int utc_mc_server_unset_search_cmd_received_cb_n(void)
{
- assert_eq(startup_ret, MEDIA_CONTROLLER_ERROR_NONE);
+ assert_eq(startup_ret, MEDIA_CONTROLLER_ERROR_NONE);
- int ret = MEDIA_CONTROLLER_ERROR_NONE;
+ int ret = MEDIA_CONTROLLER_ERROR_NONE;
- ret = mc_server_set_search_cmd_received_cb(g_mc_server, _mc_server_search_cmd_received_cb, NULL);
- assert_eq(ret, MEDIA_CONTROLLER_ERROR_NONE);
+ ret = mc_server_set_search_cmd_received_cb(g_mc_server, _mc_server_search_cmd_received_cb, NULL);
+ assert_eq(ret, MEDIA_CONTROLLER_ERROR_NONE);
- ret = mc_server_unset_search_cmd_received_cb(NULL);
- assert_eq(ret, MEDIA_CONTROLLER_ERROR_INVALID_PARAMETER);
+ ret = mc_server_unset_search_cmd_received_cb(NULL);
+ assert_eq(ret, MEDIA_CONTROLLER_ERROR_INVALID_PARAMETER);
- return 0;
+ return 0;
}
/**
*/
int utc_mc_client_create_p(void)
{
- assert_eq(startup_ret, MEDIA_CONTROLLER_ERROR_NONE);
+ assert_eq(startup_ret, MEDIA_CONTROLLER_ERROR_NONE);
- int ret = MEDIA_CONTROLLER_ERROR_NONE;
+ int ret = MEDIA_CONTROLLER_ERROR_NONE;
- ret = mc_client_destroy(g_mc_client);
- assert_eq(ret, MEDIA_CONTROLLER_ERROR_NONE);
+ ret = mc_client_destroy(g_mc_client);
+ assert_eq(ret, MEDIA_CONTROLLER_ERROR_NONE);
g_mc_client = NULL;
- ret = mc_client_create(&g_mc_client);
- assert_eq(ret, MEDIA_CONTROLLER_ERROR_NONE);
+ ret = mc_client_create(&g_mc_client);
+ assert_eq(ret, MEDIA_CONTROLLER_ERROR_NONE);
- return 0;
+ return 0;
}
/**
*/
int utc_mc_client_create_n(void)
{
- assert_eq(startup_ret, MEDIA_CONTROLLER_ERROR_NONE);
+ assert_eq(startup_ret, MEDIA_CONTROLLER_ERROR_NONE);
- int ret = MEDIA_CONTROLLER_ERROR_NONE;
+ int ret = MEDIA_CONTROLLER_ERROR_NONE;
- ret = mc_client_destroy(g_mc_client);
- assert_eq(ret, MEDIA_CONTROLLER_ERROR_NONE);
- g_mc_client = NULL;
+ ret = mc_client_destroy(g_mc_client);
+ assert_eq(ret, MEDIA_CONTROLLER_ERROR_NONE);
+ g_mc_client = NULL;
- ret = mc_client_create(NULL);
- assert_eq(ret, MEDIA_CONTROLLER_ERROR_INVALID_PARAMETER);
+ ret = mc_client_create(NULL);
+ assert_eq(ret, MEDIA_CONTROLLER_ERROR_INVALID_PARAMETER);
- return 0;
+ return 0;
}
*/
int utc_mc_client_destroy_p(void)
{
- assert_eq(startup_ret, MEDIA_CONTROLLER_ERROR_NONE);
+ assert_eq(startup_ret, MEDIA_CONTROLLER_ERROR_NONE);
- int ret = MEDIA_CONTROLLER_ERROR_NONE;
+ int ret = MEDIA_CONTROLLER_ERROR_NONE;
- ret = mc_client_destroy(g_mc_client);
- assert_eq(ret, MEDIA_CONTROLLER_ERROR_NONE);
- g_mc_client = NULL;
+ ret = mc_client_destroy(g_mc_client);
+ assert_eq(ret, MEDIA_CONTROLLER_ERROR_NONE);
+ g_mc_client = NULL;
- return 0;
+ return 0;
}
*/
int utc_mc_client_destroy_n(void)
{
- assert_eq(startup_ret, MEDIA_CONTROLLER_ERROR_NONE);
+ assert_eq(startup_ret, MEDIA_CONTROLLER_ERROR_NONE);
- int ret = MEDIA_CONTROLLER_ERROR_NONE;
+ int ret = MEDIA_CONTROLLER_ERROR_NONE;
- ret = mc_client_destroy(NULL);
- assert_eq(ret, MEDIA_CONTROLLER_ERROR_INVALID_PARAMETER);
+ ret = mc_client_destroy(NULL);
+ assert_eq(ret, MEDIA_CONTROLLER_ERROR_INVALID_PARAMETER);
- return 0;
+ return 0;
}
/**
*/
int utc_mc_client_set_server_updated_cb_p(void)
{
- assert_eq(startup_ret, MEDIA_CONTROLLER_ERROR_NONE);
+ assert_eq(startup_ret, MEDIA_CONTROLLER_ERROR_NONE);
- int ret = MEDIA_CONTROLLER_ERROR_NONE;
+ int ret = MEDIA_CONTROLLER_ERROR_NONE;
- ret = mc_client_unset_server_updated_cb(g_mc_client);
- assert_eq(ret, MEDIA_CONTROLLER_ERROR_NONE);
+ ret = mc_client_unset_server_updated_cb(g_mc_client);
+ assert_eq(ret, MEDIA_CONTROLLER_ERROR_NONE);
- ret = mc_client_set_server_updated_cb(g_mc_client, _mc_server_state_updated_cb, NULL);
- assert_eq(ret, MEDIA_CONTROLLER_ERROR_NONE);
+ ret = mc_client_set_server_updated_cb(g_mc_client, _mc_server_state_updated_cb, NULL);
+ assert_eq(ret, MEDIA_CONTROLLER_ERROR_NONE);
ret = mc_server_destroy(g_mc_server);
g_mc_server = NULL;
assert_eq(ret, MEDIA_CONTROLLER_ERROR_NONE);
assert_eq(WAIT_CALLBACK_RESULT, TRUE);
- return 0;
+ return 0;
}
/**
*/
int utc_mc_client_set_server_updated_cb_n(void)
{
- assert_eq(startup_ret, MEDIA_CONTROLLER_ERROR_NONE);
+ assert_eq(startup_ret, MEDIA_CONTROLLER_ERROR_NONE);
- int ret = MEDIA_CONTROLLER_ERROR_NONE;
+ int ret = MEDIA_CONTROLLER_ERROR_NONE;
- ret = mc_client_unset_server_updated_cb(g_mc_client);
- assert_eq(ret, MEDIA_CONTROLLER_ERROR_NONE);
+ ret = mc_client_unset_server_updated_cb(g_mc_client);
+ assert_eq(ret, MEDIA_CONTROLLER_ERROR_NONE);
- ret = mc_client_set_server_updated_cb(NULL, _mc_server_state_updated_cb, NULL);
- assert_eq(ret, MEDIA_CONTROLLER_ERROR_INVALID_PARAMETER);
+ ret = mc_client_set_server_updated_cb(NULL, _mc_server_state_updated_cb, NULL);
+ assert_eq(ret, MEDIA_CONTROLLER_ERROR_INVALID_PARAMETER);
- ret = mc_client_set_server_updated_cb(g_mc_client, NULL, NULL);
- assert_eq(ret, MEDIA_CONTROLLER_ERROR_INVALID_PARAMETER);
+ ret = mc_client_set_server_updated_cb(g_mc_client, NULL, NULL);
+ assert_eq(ret, MEDIA_CONTROLLER_ERROR_INVALID_PARAMETER);
- return 0;
+ return 0;
}
/**
*/
int utc_mc_client_unset_server_updated_cb_p(void)
{
- assert_eq(startup_ret, MEDIA_CONTROLLER_ERROR_NONE);
+ assert_eq(startup_ret, MEDIA_CONTROLLER_ERROR_NONE);
- int ret = MEDIA_CONTROLLER_ERROR_NONE;
+ int ret = MEDIA_CONTROLLER_ERROR_NONE;
- ret = mc_client_unset_server_updated_cb(g_mc_client);
- assert_eq(ret, MEDIA_CONTROLLER_ERROR_NONE);
+ ret = mc_client_unset_server_updated_cb(g_mc_client);
+ assert_eq(ret, MEDIA_CONTROLLER_ERROR_NONE);
- return 0;
+ return 0;
}
*/
int utc_mc_client_unset_server_updated_cb_n(void)
{
- assert_eq(startup_ret, MEDIA_CONTROLLER_ERROR_NONE);
+ assert_eq(startup_ret, MEDIA_CONTROLLER_ERROR_NONE);
- int ret = MEDIA_CONTROLLER_ERROR_NONE;
+ int ret = MEDIA_CONTROLLER_ERROR_NONE;
- ret = mc_client_unset_server_updated_cb(NULL);
- assert_eq(ret, MEDIA_CONTROLLER_ERROR_INVALID_PARAMETER);
+ ret = mc_client_unset_server_updated_cb(NULL);
+ assert_eq(ret, MEDIA_CONTROLLER_ERROR_INVALID_PARAMETER);
- return 0;
+ return 0;
}
/**
*/
int utc_mc_client_set_playback_updated_cb_p(void)
{
- assert_eq(startup_ret, MEDIA_CONTROLLER_ERROR_NONE);
+ assert_eq(startup_ret, MEDIA_CONTROLLER_ERROR_NONE);
- int ret = MEDIA_CONTROLLER_ERROR_NONE;
+ int ret = MEDIA_CONTROLLER_ERROR_NONE;
- ret = mc_client_set_playback_updated_cb(g_mc_client, _mc_playback_updated_cb, NULL);
- assert_eq(ret, MEDIA_CONTROLLER_ERROR_NONE);
+ ret = mc_client_set_playback_updated_cb(g_mc_client, _mc_playback_updated_cb, NULL);
+ assert_eq(ret, MEDIA_CONTROLLER_ERROR_NONE);
- return 0;
+ return 0;
}
*/
int utc_mc_client_set_playback_updated_cb_n(void)
{
- assert_eq(startup_ret, MEDIA_CONTROLLER_ERROR_NONE);
+ assert_eq(startup_ret, MEDIA_CONTROLLER_ERROR_NONE);
- int ret = MEDIA_CONTROLLER_ERROR_NONE;
+ int ret = MEDIA_CONTROLLER_ERROR_NONE;
- ret = mc_client_set_playback_updated_cb(NULL, _mc_playback_updated_cb, NULL);
- assert_eq(ret, MEDIA_CONTROLLER_ERROR_INVALID_PARAMETER);
+ ret = mc_client_set_playback_updated_cb(NULL, _mc_playback_updated_cb, NULL);
+ assert_eq(ret, MEDIA_CONTROLLER_ERROR_INVALID_PARAMETER);
- ret = mc_client_set_playback_updated_cb(g_mc_client, NULL, NULL);
- assert_eq(ret, MEDIA_CONTROLLER_ERROR_INVALID_PARAMETER);
+ ret = mc_client_set_playback_updated_cb(g_mc_client, NULL, NULL);
+ assert_eq(ret, MEDIA_CONTROLLER_ERROR_INVALID_PARAMETER);
- return 0;
+ return 0;
}
/**
*/
int utc_mc_client_unset_playback_updated_cb_p(void)
{
- assert_eq(startup_ret, MEDIA_CONTROLLER_ERROR_NONE);
+ assert_eq(startup_ret, MEDIA_CONTROLLER_ERROR_NONE);
- int ret = MEDIA_CONTROLLER_ERROR_NONE;
+ int ret = MEDIA_CONTROLLER_ERROR_NONE;
- ret = mc_client_unset_playback_updated_cb(g_mc_client);
- assert_eq(ret, MEDIA_CONTROLLER_ERROR_NONE);
+ ret = mc_client_unset_playback_updated_cb(g_mc_client);
+ assert_eq(ret, MEDIA_CONTROLLER_ERROR_NONE);
- return 0;
+ return 0;
}
*/
int utc_mc_client_unset_playback_updated_cb_n(void)
{
- assert_eq(startup_ret, MEDIA_CONTROLLER_ERROR_NONE);
+ assert_eq(startup_ret, MEDIA_CONTROLLER_ERROR_NONE);
- int ret = MEDIA_CONTROLLER_ERROR_NONE;
+ int ret = MEDIA_CONTROLLER_ERROR_NONE;
- ret = mc_client_unset_playback_updated_cb(NULL);
- assert_eq(ret, MEDIA_CONTROLLER_ERROR_INVALID_PARAMETER);
+ ret = mc_client_unset_playback_updated_cb(NULL);
+ assert_eq(ret, MEDIA_CONTROLLER_ERROR_INVALID_PARAMETER);
- return 0;
+ return 0;
}
/**
*/
int utc_mc_client_unset_metadata_updated_cb_p(void)
{
- assert_eq(startup_ret, MEDIA_CONTROLLER_ERROR_NONE);
+ assert_eq(startup_ret, MEDIA_CONTROLLER_ERROR_NONE);
- int ret = MEDIA_CONTROLLER_ERROR_NONE;
+ int ret = MEDIA_CONTROLLER_ERROR_NONE;
- ret = mc_client_unset_metadata_updated_cb(g_mc_client);
- assert_eq(ret, MEDIA_CONTROLLER_ERROR_NONE);
+ ret = mc_client_unset_metadata_updated_cb(g_mc_client);
+ assert_eq(ret, MEDIA_CONTROLLER_ERROR_NONE);
- return 0;
+ return 0;
}
*/
int utc_mc_client_unset_metadata_updated_cb_n(void)
{
- assert_eq(startup_ret, MEDIA_CONTROLLER_ERROR_NONE);
+ assert_eq(startup_ret, MEDIA_CONTROLLER_ERROR_NONE);
- int ret = MEDIA_CONTROLLER_ERROR_NONE;
+ int ret = MEDIA_CONTROLLER_ERROR_NONE;
- ret = mc_client_unset_metadata_updated_cb(NULL);
- assert_eq(ret, MEDIA_CONTROLLER_ERROR_INVALID_PARAMETER);
+ ret = mc_client_unset_metadata_updated_cb(NULL);
+ assert_eq(ret, MEDIA_CONTROLLER_ERROR_INVALID_PARAMETER);
- return 0;
+ return 0;
}
/**
*/
int utc_mc_client_set_shuffle_mode_updated_cb_p(void)
{
- assert_eq(startup_ret, MEDIA_CONTROLLER_ERROR_NONE);
+ assert_eq(startup_ret, MEDIA_CONTROLLER_ERROR_NONE);
- int ret = MEDIA_CONTROLLER_ERROR_NONE;
+ int ret = MEDIA_CONTROLLER_ERROR_NONE;
- ret = mc_client_set_shuffle_mode_updated_cb(g_mc_client, _mc_shuffle_mode_updated_cb, NULL);
- assert_eq(ret, MEDIA_CONTROLLER_ERROR_NONE);
+ ret = mc_client_set_shuffle_mode_updated_cb(g_mc_client, _mc_shuffle_mode_updated_cb, NULL);
+ assert_eq(ret, MEDIA_CONTROLLER_ERROR_NONE);
- return 0;
+ return 0;
}
*/
int utc_mc_client_set_shuffle_mode_updated_cb_n(void)
{
- assert_eq(startup_ret, MEDIA_CONTROLLER_ERROR_NONE);
+ assert_eq(startup_ret, MEDIA_CONTROLLER_ERROR_NONE);
- int ret = MEDIA_CONTROLLER_ERROR_NONE;
+ int ret = MEDIA_CONTROLLER_ERROR_NONE;
- ret = mc_client_set_shuffle_mode_updated_cb(NULL, _mc_shuffle_mode_updated_cb, NULL);
- assert_eq(ret, MEDIA_CONTROLLER_ERROR_INVALID_PARAMETER);
+ ret = mc_client_set_shuffle_mode_updated_cb(NULL, _mc_shuffle_mode_updated_cb, NULL);
+ assert_eq(ret, MEDIA_CONTROLLER_ERROR_INVALID_PARAMETER);
- ret = mc_client_set_shuffle_mode_updated_cb(g_mc_client, NULL, NULL);
- assert_eq(ret, MEDIA_CONTROLLER_ERROR_INVALID_PARAMETER);
+ ret = mc_client_set_shuffle_mode_updated_cb(g_mc_client, NULL, NULL);
+ assert_eq(ret, MEDIA_CONTROLLER_ERROR_INVALID_PARAMETER);
- return 0;
+ return 0;
}
/**
*/
int utc_mc_client_unset_shuffle_mode_updated_cb_p(void)
{
- assert_eq(startup_ret, MEDIA_CONTROLLER_ERROR_NONE);
+ assert_eq(startup_ret, MEDIA_CONTROLLER_ERROR_NONE);
- int ret = MEDIA_CONTROLLER_ERROR_NONE;
+ int ret = MEDIA_CONTROLLER_ERROR_NONE;
- ret = mc_client_unset_shuffle_mode_updated_cb(g_mc_client);
- assert_eq(ret, MEDIA_CONTROLLER_ERROR_NONE);
+ ret = mc_client_unset_shuffle_mode_updated_cb(g_mc_client);
+ assert_eq(ret, MEDIA_CONTROLLER_ERROR_NONE);
- return 0;
+ return 0;
}
*/
int utc_mc_client_unset_shuffle_mode_updated_cb_n(void)
{
- assert_eq(startup_ret, MEDIA_CONTROLLER_ERROR_NONE);
+ assert_eq(startup_ret, MEDIA_CONTROLLER_ERROR_NONE);
- int ret = MEDIA_CONTROLLER_ERROR_NONE;
+ int ret = MEDIA_CONTROLLER_ERROR_NONE;
- ret = mc_client_unset_shuffle_mode_updated_cb(NULL);
- assert_eq(ret, MEDIA_CONTROLLER_ERROR_INVALID_PARAMETER);
+ ret = mc_client_unset_shuffle_mode_updated_cb(NULL);
+ assert_eq(ret, MEDIA_CONTROLLER_ERROR_INVALID_PARAMETER);
- return 0;
+ return 0;
}
/**
*/
int utc_mc_client_set_repeat_mode_updated_cb_p(void)
{
- assert_eq(startup_ret, MEDIA_CONTROLLER_ERROR_NONE);
+ assert_eq(startup_ret, MEDIA_CONTROLLER_ERROR_NONE);
- int ret = MEDIA_CONTROLLER_ERROR_NONE;
+ int ret = MEDIA_CONTROLLER_ERROR_NONE;
- ret = mc_client_set_repeat_mode_updated_cb(g_mc_client, _mc_repeat_mode_changed_cb, NULL);
- assert_eq(ret, MEDIA_CONTROLLER_ERROR_NONE);
+ ret = mc_client_set_repeat_mode_updated_cb(g_mc_client, _mc_repeat_mode_changed_cb, NULL);
+ assert_eq(ret, MEDIA_CONTROLLER_ERROR_NONE);
- return 0;
+ return 0;
}
*/
int utc_mc_client_set_repeat_mode_updated_cb_n(void)
{
- assert_eq(startup_ret, MEDIA_CONTROLLER_ERROR_NONE);
+ assert_eq(startup_ret, MEDIA_CONTROLLER_ERROR_NONE);
- int ret = MEDIA_CONTROLLER_ERROR_NONE;
+ int ret = MEDIA_CONTROLLER_ERROR_NONE;
- ret = mc_client_set_repeat_mode_updated_cb(NULL, _mc_repeat_mode_changed_cb, NULL);
- assert_eq(ret, MEDIA_CONTROLLER_ERROR_INVALID_PARAMETER);
+ ret = mc_client_set_repeat_mode_updated_cb(NULL, _mc_repeat_mode_changed_cb, NULL);
+ assert_eq(ret, MEDIA_CONTROLLER_ERROR_INVALID_PARAMETER);
- ret = mc_client_set_repeat_mode_updated_cb(g_mc_client, NULL, NULL);
- assert_eq(ret, MEDIA_CONTROLLER_ERROR_INVALID_PARAMETER);
+ ret = mc_client_set_repeat_mode_updated_cb(g_mc_client, NULL, NULL);
+ assert_eq(ret, MEDIA_CONTROLLER_ERROR_INVALID_PARAMETER);
- return 0;
+ return 0;
}
/**
*/
int utc_mc_client_set_shuffle_ability_updated_cb_p(void)
{
- assert_eq(startup_ret, MEDIA_CONTROLLER_ERROR_NONE);
+ assert_eq(startup_ret, MEDIA_CONTROLLER_ERROR_NONE);
- int ret = MEDIA_CONTROLLER_ERROR_NONE;
+ int ret = MEDIA_CONTROLLER_ERROR_NONE;
- ret = mc_client_set_shuffle_ability_updated_cb(g_mc_client, _mc_shuffle_ability_updated_cb, NULL);
- assert_eq(ret, MEDIA_CONTROLLER_ERROR_NONE);
+ ret = mc_client_set_shuffle_ability_updated_cb(g_mc_client, _mc_shuffle_ability_updated_cb, NULL);
+ assert_eq(ret, MEDIA_CONTROLLER_ERROR_NONE);
- return 0;
+ return 0;
}
*/
int utc_mc_client_set_shuffle_ability_updated_cb_n(void)
{
- assert_eq(startup_ret, MEDIA_CONTROLLER_ERROR_NONE);
+ assert_eq(startup_ret, MEDIA_CONTROLLER_ERROR_NONE);
- int ret = MEDIA_CONTROLLER_ERROR_NONE;
+ int ret = MEDIA_CONTROLLER_ERROR_NONE;
- ret = mc_client_set_shuffle_ability_updated_cb(NULL, _mc_shuffle_ability_updated_cb, NULL);
- assert_eq(ret, MEDIA_CONTROLLER_ERROR_INVALID_PARAMETER);
+ ret = mc_client_set_shuffle_ability_updated_cb(NULL, _mc_shuffle_ability_updated_cb, NULL);
+ assert_eq(ret, MEDIA_CONTROLLER_ERROR_INVALID_PARAMETER);
- ret = mc_client_set_shuffle_ability_updated_cb(g_mc_client, NULL, NULL);
- assert_eq(ret, MEDIA_CONTROLLER_ERROR_INVALID_PARAMETER);
+ ret = mc_client_set_shuffle_ability_updated_cb(g_mc_client, NULL, NULL);
+ assert_eq(ret, MEDIA_CONTROLLER_ERROR_INVALID_PARAMETER);
- return 0;
+ return 0;
}
/**
*/
int utc_mc_client_unset_shuffle_ability_updated_cb_p(void)
{
- assert_eq(startup_ret, MEDIA_CONTROLLER_ERROR_NONE);
+ assert_eq(startup_ret, MEDIA_CONTROLLER_ERROR_NONE);
- int ret = MEDIA_CONTROLLER_ERROR_NONE;
+ int ret = MEDIA_CONTROLLER_ERROR_NONE;
- ret = mc_client_unset_shuffle_ability_updated_cb(g_mc_client);
- assert_eq(ret, MEDIA_CONTROLLER_ERROR_NONE);
+ ret = mc_client_unset_shuffle_ability_updated_cb(g_mc_client);
+ assert_eq(ret, MEDIA_CONTROLLER_ERROR_NONE);
- return 0;
+ return 0;
}
*/
int utc_mc_client_unset_shuffle_ability_updated_cb_n(void)
{
- assert_eq(startup_ret, MEDIA_CONTROLLER_ERROR_NONE);
+ assert_eq(startup_ret, MEDIA_CONTROLLER_ERROR_NONE);
- int ret = MEDIA_CONTROLLER_ERROR_NONE;
+ int ret = MEDIA_CONTROLLER_ERROR_NONE;
- ret = mc_client_unset_shuffle_ability_updated_cb(NULL);
- assert_eq(ret, MEDIA_CONTROLLER_ERROR_INVALID_PARAMETER);
+ ret = mc_client_unset_shuffle_ability_updated_cb(NULL);
+ assert_eq(ret, MEDIA_CONTROLLER_ERROR_INVALID_PARAMETER);
- return 0;
+ return 0;
}
/**
*/
int utc_mc_client_set_repeat_ability_updated_cb_p(void)
{
- assert_eq(startup_ret, MEDIA_CONTROLLER_ERROR_NONE);
+ assert_eq(startup_ret, MEDIA_CONTROLLER_ERROR_NONE);
- int ret = MEDIA_CONTROLLER_ERROR_NONE;
+ int ret = MEDIA_CONTROLLER_ERROR_NONE;
- ret = mc_client_set_repeat_ability_updated_cb(g_mc_client, _mc_repeat_ability_updated_cb, NULL);
- assert_eq(ret, MEDIA_CONTROLLER_ERROR_NONE);
+ ret = mc_client_set_repeat_ability_updated_cb(g_mc_client, _mc_repeat_ability_updated_cb, NULL);
+ assert_eq(ret, MEDIA_CONTROLLER_ERROR_NONE);
- return 0;
+ return 0;
}
-
/**
* @testcase utc_mc_client_set_repeat_ability_updated_cb_n
* @since_tizen 5.0
*/
int utc_mc_client_set_repeat_ability_updated_cb_n(void)
{
- assert_eq(startup_ret, MEDIA_CONTROLLER_ERROR_NONE);
+ assert_eq(startup_ret, MEDIA_CONTROLLER_ERROR_NONE);
- int ret = MEDIA_CONTROLLER_ERROR_NONE;
+ int ret = MEDIA_CONTROLLER_ERROR_NONE;
- ret = mc_client_set_repeat_ability_updated_cb(NULL, _mc_repeat_ability_updated_cb, NULL);
- assert_eq(ret, MEDIA_CONTROLLER_ERROR_INVALID_PARAMETER);
+ ret = mc_client_set_repeat_ability_updated_cb(NULL, _mc_repeat_ability_updated_cb, NULL);
+ assert_eq(ret, MEDIA_CONTROLLER_ERROR_INVALID_PARAMETER);
- ret = mc_client_set_repeat_ability_updated_cb(g_mc_client, NULL, NULL);
- assert_eq(ret, MEDIA_CONTROLLER_ERROR_INVALID_PARAMETER);
+ ret = mc_client_set_repeat_ability_updated_cb(g_mc_client, NULL, NULL);
+ assert_eq(ret, MEDIA_CONTROLLER_ERROR_INVALID_PARAMETER);
- return 0;
+ return 0;
}
/**
*/
int utc_mc_client_unset_repeat_ability_updated_cb_p(void)
{
- assert_eq(startup_ret, MEDIA_CONTROLLER_ERROR_NONE);
+ assert_eq(startup_ret, MEDIA_CONTROLLER_ERROR_NONE);
- int ret = MEDIA_CONTROLLER_ERROR_NONE;
+ int ret = MEDIA_CONTROLLER_ERROR_NONE;
- ret = mc_client_unset_repeat_ability_updated_cb(g_mc_client);
- assert_eq(ret, MEDIA_CONTROLLER_ERROR_NONE);
+ ret = mc_client_unset_repeat_ability_updated_cb(g_mc_client);
+ assert_eq(ret, MEDIA_CONTROLLER_ERROR_NONE);
- return 0;
+ return 0;
}
*/
int utc_mc_client_unset_repeat_ability_updated_cb_n(void)
{
- assert_eq(startup_ret, MEDIA_CONTROLLER_ERROR_NONE);
+ assert_eq(startup_ret, MEDIA_CONTROLLER_ERROR_NONE);
- int ret = MEDIA_CONTROLLER_ERROR_NONE;
+ int ret = MEDIA_CONTROLLER_ERROR_NONE;
- ret = mc_client_unset_repeat_ability_updated_cb(NULL);
- assert_eq(ret, MEDIA_CONTROLLER_ERROR_INVALID_PARAMETER);
+ ret = mc_client_unset_repeat_ability_updated_cb(NULL);
+ assert_eq(ret, MEDIA_CONTROLLER_ERROR_INVALID_PARAMETER);
- return 0;
+ return 0;
+}
+
+/**
+ * @testcase utc_mc_client_set_ability_support_updated_cb_p
+ * @since_tizen 5.5
+ * @description Positive test case of utc_mc_client_set_ability_support_updated_cb()
+ */
+int utc_mc_client_set_ability_support_updated_cb_p(void)
+{
+ assert_eq(startup_ret, MEDIA_CONTROLLER_ERROR_NONE);
+
+ int ret = MEDIA_CONTROLLER_ERROR_NONE;
+
+ ret = mc_client_set_ability_support_updated_cb(g_mc_client, _mc_ability_updated_cb, NULL);
+ assert_eq(ret, MEDIA_CONTROLLER_ERROR_NONE);
+
+ return 0;
+}
+
+/**
+ * @testcase utc_mc_client_set_ability_support_updated_cb_n
+ * @since_tizen 5.5
+ * @description Negative test case of utc_mc_client_set_ability_support_updated_cb()
+ */
+int utc_mc_client_set_ability_support_updated_cb_n(void)
+{
+ assert_eq(startup_ret, MEDIA_CONTROLLER_ERROR_NONE);
+
+ int ret = MEDIA_CONTROLLER_ERROR_NONE;
+
+ ret = mc_client_set_ability_support_updated_cb(NULL, _mc_ability_updated_cb, NULL);
+ assert_eq(ret, MEDIA_CONTROLLER_ERROR_INVALID_PARAMETER);
+
+ ret = mc_client_set_ability_support_updated_cb(g_mc_client, NULL, NULL);
+ assert_eq(ret, MEDIA_CONTROLLER_ERROR_INVALID_PARAMETER);
+
+ return 0;
+}
+
+/**
+ * @testcase utc_mc_client_unset_ability_support_updated_cb_p
+ * @since_tizen 5.5
+ * @description Positive test case of utc_mc_client_unset_ability_support_updated_cb()
+ */
+int utc_mc_client_unset_ability_support_updated_cb_p(void)
+{
+ assert_eq(startup_ret, MEDIA_CONTROLLER_ERROR_NONE);
+
+ int ret = MEDIA_CONTROLLER_ERROR_NONE;
+
+ ret = mc_client_unset_ability_support_updated_cb(g_mc_client);
+ assert_eq(ret, MEDIA_CONTROLLER_ERROR_NONE);
+
+ return 0;
+}
+
+
+/**
+ * @testcase utc_mc_client_unset_ability_support_updated_cb_n
+ * @since_tizen 5.5
+ * @description Negative test case of utc_mc_client_unset_ability_support_updated_cb()
+ */
+int utc_mc_client_unset_ability_support_updated_cb_n(void)
+{
+ assert_eq(startup_ret, MEDIA_CONTROLLER_ERROR_NONE);
+
+ int ret = MEDIA_CONTROLLER_ERROR_NONE;
+
+ ret = mc_client_unset_ability_support_updated_cb(NULL);
+ assert_eq(ret, MEDIA_CONTROLLER_ERROR_INVALID_PARAMETER);
+
+ return 0;
}
/**
int ret = MEDIA_CONTROLLER_ERROR_NONE;
+ ret = __mc_server_set_ability(g_mc_test_ability);
+ assert_eq(ret, MEDIA_CONTROLLER_ERROR_NONE);
+
ret = mc_client_get_latest_server_info(g_mc_client, &g_mc_server_name, &g_mc_server_state);
assert_eq(ret, MEDIA_CONTROLLER_ERROR_NONE);
*/
int utc_mc_client_get_playlist_item_info_n(void)
{
- assert_eq(startup_ret, MEDIA_CONTROLLER_ERROR_NONE);
+ assert_eq(startup_ret, MEDIA_CONTROLLER_ERROR_NONE);
- int ret = MEDIA_CONTROLLER_ERROR_NONE;
- mc_playback_h playback_info = NULL;
+ int ret = MEDIA_CONTROLLER_ERROR_NONE;
+ mc_playback_h playback_info = NULL;
char *playlist_name = NULL;
char *index = 0;
- ret = mc_client_get_latest_server_info(g_mc_client, &g_mc_server_name, &g_mc_server_state);
- assert_eq(ret, MEDIA_CONTROLLER_ERROR_NONE);
+ ret = mc_client_get_latest_server_info(g_mc_client, &g_mc_server_name, &g_mc_server_state);
+ assert_eq(ret, MEDIA_CONTROLLER_ERROR_NONE);
- ret = mc_client_get_server_playback_info(g_mc_client, g_mc_server_name, &playback_info);
- assert_eq(ret, MEDIA_CONTROLLER_ERROR_NONE);
+ ret = mc_client_get_server_playback_info(g_mc_client, g_mc_server_name, &playback_info);
+ assert_eq(ret, MEDIA_CONTROLLER_ERROR_NONE);
- ret = mc_client_get_playlist_item_info(NULL, &playlist_name, &index);
- assert_eq(ret, MEDIA_CONTROLLER_ERROR_INVALID_PARAMETER);
+ ret = mc_client_get_playlist_item_info(NULL, &playlist_name, &index);
+ assert_eq(ret, MEDIA_CONTROLLER_ERROR_INVALID_PARAMETER);
- ret = mc_client_get_playlist_item_info(playback_info, NULL, &index);
- assert_eq(ret, MEDIA_CONTROLLER_ERROR_INVALID_PARAMETER);
+ ret = mc_client_get_playlist_item_info(playback_info, NULL, &index);
+ assert_eq(ret, MEDIA_CONTROLLER_ERROR_INVALID_PARAMETER);
- ret = mc_client_get_playlist_item_info(playback_info, &playlist_name, NULL);
- assert_eq(ret, MEDIA_CONTROLLER_ERROR_INVALID_PARAMETER);
+ ret = mc_client_get_playlist_item_info(playback_info, &playlist_name, NULL);
+ assert_eq(ret, MEDIA_CONTROLLER_ERROR_INVALID_PARAMETER);
- ret = mc_client_destroy_playback(playback_info);
- assert_eq(ret, MEDIA_CONTROLLER_ERROR_NONE);
+ ret = mc_client_destroy_playback(playback_info);
+ assert_eq(ret, MEDIA_CONTROLLER_ERROR_NONE);
- return 0;
+ return 0;
}
/**
*/
int utc_mc_client_get_server_icon_p(void)
{
- assert_eq(startup_ret, MEDIA_CONTROLLER_ERROR_NONE);
+ assert_eq(startup_ret, MEDIA_CONTROLLER_ERROR_NONE);
- int ret = MEDIA_CONTROLLER_ERROR_NONE;
- char *icon_path = NULL;
+ int ret = MEDIA_CONTROLLER_ERROR_NONE;
+ char *icon_path = NULL;
- ret = mc_server_set_icon(g_mc_server, g_mc_test_icon_path);
- assert_eq(ret, MEDIA_CONTROLLER_ERROR_NONE);
+ ret = mc_server_set_icon(g_mc_server, g_mc_test_icon_path);
+ assert_eq(ret, MEDIA_CONTROLLER_ERROR_NONE);
- ret = mc_client_get_latest_server_info(g_mc_client, &g_mc_server_name, &g_mc_server_state);
- assert_eq(ret, MEDIA_CONTROLLER_ERROR_NONE);
+ ret = mc_client_get_latest_server_info(g_mc_client, &g_mc_server_name, &g_mc_server_state);
+ assert_eq(ret, MEDIA_CONTROLLER_ERROR_NONE);
- ret = mc_client_get_server_icon(g_mc_client, g_mc_server_name, &icon_path);
- assert_eq(ret, MEDIA_CONTROLLER_ERROR_NONE);
- assert_eq(strcmp(icon_path, g_mc_test_icon_path), 0);
+ ret = mc_client_get_server_icon(g_mc_client, g_mc_server_name, &icon_path);
+ assert_eq(ret, MEDIA_CONTROLLER_ERROR_NONE);
+ assert_eq(strcmp(icon_path, g_mc_test_icon_path), 0);
if (icon_path)
free(icon_path);
- return 0;
+ return 0;
}
/**
*/
int utc_mc_client_get_server_icon_n(void)
{
- assert_eq(startup_ret, MEDIA_CONTROLLER_ERROR_NONE);
+ assert_eq(startup_ret, MEDIA_CONTROLLER_ERROR_NONE);
- int ret = MEDIA_CONTROLLER_ERROR_NONE;
- char *icon_path = NULL;
+ int ret = MEDIA_CONTROLLER_ERROR_NONE;
+ char *icon_path = NULL;
- ret = mc_server_set_icon(g_mc_server, g_mc_test_icon_path);
- assert_eq(ret, MEDIA_CONTROLLER_ERROR_NONE);
+ ret = mc_server_set_icon(g_mc_server, g_mc_test_icon_path);
+ assert_eq(ret, MEDIA_CONTROLLER_ERROR_NONE);
- ret = mc_client_get_latest_server_info(g_mc_client, &g_mc_server_name, &g_mc_server_state);
- assert_eq(ret, MEDIA_CONTROLLER_ERROR_NONE);
+ ret = mc_client_get_latest_server_info(g_mc_client, &g_mc_server_name, &g_mc_server_state);
+ assert_eq(ret, MEDIA_CONTROLLER_ERROR_NONE);
- ret = mc_client_get_server_icon(NULL, g_mc_server_name, &icon_path);
- assert_eq(ret, MEDIA_CONTROLLER_ERROR_INVALID_PARAMETER);
+ ret = mc_client_get_server_icon(NULL, g_mc_server_name, &icon_path);
+ assert_eq(ret, MEDIA_CONTROLLER_ERROR_INVALID_PARAMETER);
- ret = mc_client_get_server_icon(g_mc_client, NULL, &icon_path);
- assert_eq(ret, MEDIA_CONTROLLER_ERROR_INVALID_PARAMETER);
+ ret = mc_client_get_server_icon(g_mc_client, NULL, &icon_path);
+ assert_eq(ret, MEDIA_CONTROLLER_ERROR_INVALID_PARAMETER);
- ret = mc_client_get_server_icon(g_mc_client, g_mc_server_name, NULL);
- assert_eq(ret, MEDIA_CONTROLLER_ERROR_INVALID_PARAMETER);
+ ret = mc_client_get_server_icon(g_mc_client, g_mc_server_name, NULL);
+ assert_eq(ret, MEDIA_CONTROLLER_ERROR_INVALID_PARAMETER);
if (icon_path)
free(icon_path);
- return 0;
+ return 0;
}
/**
*/
int utc_mc_client_get_server_playback_ability_n(void)
{
- assert_eq(startup_ret, MEDIA_CONTROLLER_ERROR_NONE);
+ assert_eq(startup_ret, MEDIA_CONTROLLER_ERROR_NONE);
- int ret = MEDIA_CONTROLLER_ERROR_NONE;
- mc_playback_ability_h ability = NULL;
+ int ret = MEDIA_CONTROLLER_ERROR_NONE;
+ mc_playback_ability_h ability = NULL;
- ret = mc_client_get_latest_server_info(g_mc_client, &g_mc_server_name, &g_mc_server_state);
- assert_eq(ret, MEDIA_CONTROLLER_ERROR_NONE);
+ ret = mc_client_get_latest_server_info(g_mc_client, &g_mc_server_name, &g_mc_server_state);
+ assert_eq(ret, MEDIA_CONTROLLER_ERROR_NONE);
- ret = mc_client_get_server_playback_ability(NULL, g_mc_server_name, &ability);
- assert_eq(ret, MEDIA_CONTROLLER_ERROR_INVALID_PARAMETER);
+ ret = mc_client_get_server_playback_ability(NULL, g_mc_server_name, &ability);
+ assert_eq(ret, MEDIA_CONTROLLER_ERROR_INVALID_PARAMETER);
- ret = mc_client_get_server_playback_ability(g_mc_client, NULL, &ability);
- assert_eq(ret, MEDIA_CONTROLLER_ERROR_INVALID_PARAMETER);
+ ret = mc_client_get_server_playback_ability(g_mc_client, NULL, &ability);
+ assert_eq(ret, MEDIA_CONTROLLER_ERROR_INVALID_PARAMETER);
- ret = mc_client_get_server_playback_ability(g_mc_client, g_mc_server_name, NULL);
- assert_eq(ret, MEDIA_CONTROLLER_ERROR_INVALID_PARAMETER);
+ ret = mc_client_get_server_playback_ability(g_mc_client, g_mc_server_name, NULL);
+ assert_eq(ret, MEDIA_CONTROLLER_ERROR_INVALID_PARAMETER);
- return 0;
+ return 0;
}
/**
*/
int utc_mc_client_get_server_shuffle_ability_support_p(void)
{
- assert_eq(startup_ret, MEDIA_CONTROLLER_ERROR_NONE);
+ assert_eq(startup_ret, MEDIA_CONTROLLER_ERROR_NONE);
- int ret = MEDIA_CONTROLLER_ERROR_NONE;
- mc_ability_support_e supported = MC_ABILITY_SUPPORTED_UNDECIDED;
+ int ret = MEDIA_CONTROLLER_ERROR_NONE;
+ mc_ability_support_e supported = MC_ABILITY_SUPPORTED_UNDECIDED;
- ret = mc_client_get_latest_server_info(g_mc_client, &g_mc_server_name, &g_mc_server_state);
- assert_eq(ret, MEDIA_CONTROLLER_ERROR_NONE);
+ ret = __mc_server_set_ability(g_mc_test_ability);
+ assert_eq(ret, MEDIA_CONTROLLER_ERROR_NONE);
- ret = mc_client_get_server_shuffle_ability_support(g_mc_client, g_mc_server_name, &supported);
- assert_eq(ret, MEDIA_CONTROLLER_ERROR_NONE);
- assert_eq(supported, g_mc_test_ability);
+ ret = mc_client_get_latest_server_info(g_mc_client, &g_mc_server_name, &g_mc_server_state);
+ assert_eq(ret, MEDIA_CONTROLLER_ERROR_NONE);
- return 0;
+ ret = mc_client_get_server_shuffle_ability_support(g_mc_client, g_mc_server_name, &supported);
+ assert_eq(ret, MEDIA_CONTROLLER_ERROR_NONE);
+ assert_eq(supported, g_mc_test_ability);
+
+ return 0;
}
/**
*/
int utc_mc_client_get_server_shuffle_ability_support_n(void)
{
- assert_eq(startup_ret, MEDIA_CONTROLLER_ERROR_NONE);
+ assert_eq(startup_ret, MEDIA_CONTROLLER_ERROR_NONE);
- int ret = MEDIA_CONTROLLER_ERROR_NONE;
- mc_ability_support_e supported = MC_ABILITY_SUPPORTED_UNDECIDED;
+ int ret = MEDIA_CONTROLLER_ERROR_NONE;
+ mc_ability_support_e supported = MC_ABILITY_SUPPORTED_UNDECIDED;
- ret = mc_client_get_latest_server_info(g_mc_client, &g_mc_server_name, &g_mc_server_state);
- assert_eq(ret, MEDIA_CONTROLLER_ERROR_NONE);
+ ret = mc_client_get_latest_server_info(g_mc_client, &g_mc_server_name, &g_mc_server_state);
+ assert_eq(ret, MEDIA_CONTROLLER_ERROR_NONE);
- ret = mc_client_get_server_shuffle_ability_support(NULL, g_mc_server_name, &supported);
- assert_eq(ret, MEDIA_CONTROLLER_ERROR_INVALID_PARAMETER);
+ ret = mc_client_get_server_shuffle_ability_support(NULL, g_mc_server_name, &supported);
+ assert_eq(ret, MEDIA_CONTROLLER_ERROR_INVALID_PARAMETER);
- ret = mc_client_get_server_shuffle_ability_support(g_mc_client, NULL, &supported);
- assert_eq(ret, MEDIA_CONTROLLER_ERROR_INVALID_PARAMETER);
+ ret = mc_client_get_server_shuffle_ability_support(g_mc_client, NULL, &supported);
+ assert_eq(ret, MEDIA_CONTROLLER_ERROR_INVALID_PARAMETER);
- ret = mc_client_get_server_shuffle_ability_support(g_mc_client, g_mc_server_name, NULL);
- assert_eq(ret, MEDIA_CONTROLLER_ERROR_INVALID_PARAMETER);
+ ret = mc_client_get_server_shuffle_ability_support(g_mc_client, g_mc_server_name, NULL);
+ assert_eq(ret, MEDIA_CONTROLLER_ERROR_INVALID_PARAMETER);
- return 0;
+ return 0;
}
/**
*/
int utc_mc_client_get_server_repeat_ability_support_p(void)
{
- assert_eq(startup_ret, MEDIA_CONTROLLER_ERROR_NONE);
+ assert_eq(startup_ret, MEDIA_CONTROLLER_ERROR_NONE);
- int ret = MEDIA_CONTROLLER_ERROR_NONE;
- mc_ability_support_e supported = MC_ABILITY_SUPPORTED_UNDECIDED;
+ int ret = MEDIA_CONTROLLER_ERROR_NONE;
+ mc_ability_support_e supported = MC_ABILITY_SUPPORTED_UNDECIDED;
- ret = mc_client_get_latest_server_info(g_mc_client, &g_mc_server_name, &g_mc_server_state);
- assert_eq(ret, MEDIA_CONTROLLER_ERROR_NONE);
+ ret = __mc_server_set_ability(g_mc_test_ability);
+ assert_eq(ret, MEDIA_CONTROLLER_ERROR_NONE);
- ret = mc_client_get_server_repeat_ability_support(g_mc_client, g_mc_server_name, &supported);
- assert_eq(ret, MEDIA_CONTROLLER_ERROR_NONE);
- assert_eq(supported, g_mc_test_ability);
+ ret = mc_client_get_latest_server_info(g_mc_client, &g_mc_server_name, &g_mc_server_state);
+ assert_eq(ret, MEDIA_CONTROLLER_ERROR_NONE);
- return 0;
+ ret = mc_client_get_server_repeat_ability_support(g_mc_client, g_mc_server_name, &supported);
+ assert_eq(ret, MEDIA_CONTROLLER_ERROR_NONE);
+ assert_eq(supported, g_mc_test_ability);
+
+ return 0;
}
/**
*/
int utc_mc_client_get_server_repeat_ability_support_n(void)
{
- assert_eq(startup_ret, MEDIA_CONTROLLER_ERROR_NONE);
+ assert_eq(startup_ret, MEDIA_CONTROLLER_ERROR_NONE);
- int ret = MEDIA_CONTROLLER_ERROR_NONE;
- mc_ability_support_e supported = MC_ABILITY_SUPPORTED_UNDECIDED;
+ int ret = MEDIA_CONTROLLER_ERROR_NONE;
+ mc_ability_support_e supported = MC_ABILITY_SUPPORTED_UNDECIDED;
- ret = mc_client_get_latest_server_info(g_mc_client, &g_mc_server_name, &g_mc_server_state);
- assert_eq(ret, MEDIA_CONTROLLER_ERROR_NONE);
+ ret = mc_client_get_latest_server_info(g_mc_client, &g_mc_server_name, &g_mc_server_state);
+ assert_eq(ret, MEDIA_CONTROLLER_ERROR_NONE);
- ret = mc_client_get_server_repeat_ability_support(NULL, g_mc_server_name, &supported);
- assert_eq(ret, MEDIA_CONTROLLER_ERROR_INVALID_PARAMETER);
+ ret = mc_client_get_server_repeat_ability_support(NULL, g_mc_server_name, &supported);
+ assert_eq(ret, MEDIA_CONTROLLER_ERROR_INVALID_PARAMETER);
- ret = mc_client_get_server_repeat_ability_support(g_mc_client, NULL, &supported);
- assert_eq(ret, MEDIA_CONTROLLER_ERROR_INVALID_PARAMETER);
+ ret = mc_client_get_server_repeat_ability_support(g_mc_client, NULL, &supported);
+ assert_eq(ret, MEDIA_CONTROLLER_ERROR_INVALID_PARAMETER);
- ret = mc_client_get_server_repeat_ability_support(g_mc_client, g_mc_server_name, NULL);
- assert_eq(ret, MEDIA_CONTROLLER_ERROR_INVALID_PARAMETER);
+ ret = mc_client_get_server_repeat_ability_support(g_mc_client, g_mc_server_name, NULL);
+ assert_eq(ret, MEDIA_CONTROLLER_ERROR_INVALID_PARAMETER);
- return 0;
+ return 0;
+}
+
+/**
+ * @testcase utc_mc_client_get_server_ability_support_p
+ * @since_tizen 5.5
+ * @description Positive test case of mc_client_get_server_ability_support()
+ */
+int utc_mc_client_get_server_ability_support_p(void)
+{
+ assert_eq(startup_ret, MEDIA_CONTROLLER_ERROR_NONE);
+
+ int ret = MEDIA_CONTROLLER_ERROR_NONE;
+ mc_ability_support_e supported = MC_ABILITY_SUPPORTED_UNDECIDED;
+
+ ret = __mc_server_set_ability(g_mc_test_ability);
+ assert_eq(ret, MEDIA_CONTROLLER_ERROR_NONE);
+
+ ret = mc_client_get_latest_server_info(g_mc_client, &g_mc_server_name, &g_mc_server_state);
+ assert_eq(ret, MEDIA_CONTROLLER_ERROR_NONE);
+
+ ret = mc_client_get_server_ability_support(g_mc_client, g_mc_server_name, MC_ABILITY_SHUFFLE, &supported);
+ assert_eq(ret, MEDIA_CONTROLLER_ERROR_NONE);
+ assert_eq(supported, g_mc_test_ability);
+
+ ret = mc_client_get_server_ability_support(g_mc_client, g_mc_server_name, MC_ABILITY_REPEAT, &supported);
+ assert_eq(ret, MEDIA_CONTROLLER_ERROR_NONE);
+ assert_eq(supported, g_mc_test_ability);
+
+ ret = mc_client_get_server_ability_support(g_mc_client, g_mc_server_name, MC_ABILITY_PLAYBACK_POSITION, &supported);
+ assert_eq(ret, MEDIA_CONTROLLER_ERROR_NONE);
+ assert_eq(supported, g_mc_test_ability);
+
+ ret = mc_client_get_server_ability_support(g_mc_client, g_mc_server_name, MC_ABILITY_PLAYLIST, &supported);
+ assert_eq(ret, MEDIA_CONTROLLER_ERROR_NONE);
+ assert_eq(supported, g_mc_test_ability);
+
+ ret = mc_client_get_server_ability_support(g_mc_client, g_mc_server_name, MC_ABILITY_CLIENT_CUSTOM, &supported);
+ assert_eq(ret, MEDIA_CONTROLLER_ERROR_NONE);
+ assert_eq(supported, g_mc_test_ability);
+
+ ret = mc_client_get_server_ability_support(g_mc_client, g_mc_server_name, MC_ABILITY_SEARCH, &supported);
+ assert_eq(ret, MEDIA_CONTROLLER_ERROR_NONE);
+ assert_eq(supported, g_mc_test_ability);
+
+ return 0;
+}
+
+/**
+ * @testcase utc_mc_client_get_server_ability_support_n
+ * @since_tizen 5.5
+ * @description Negative test case of mc_client_get_server_ability_support()
+ */
+int utc_mc_client_get_server_ability_support_n(void)
+{
+ assert_eq(startup_ret, MEDIA_CONTROLLER_ERROR_NONE);
+
+ int ret = MEDIA_CONTROLLER_ERROR_NONE;
+ mc_ability_support_e supported = MC_ABILITY_SUPPORTED_UNDECIDED;
+
+ ret = mc_client_get_latest_server_info(g_mc_client, &g_mc_server_name, &g_mc_server_state);
+ assert_eq(ret, MEDIA_CONTROLLER_ERROR_NONE);
+
+ ret = mc_client_get_server_ability_support(NULL, g_mc_server_name, MC_ABILITY_SHUFFLE, &supported);
+ assert_eq(ret, MEDIA_CONTROLLER_ERROR_INVALID_PARAMETER);
+
+ ret = mc_client_get_server_ability_support(g_mc_client, NULL, MC_ABILITY_SHUFFLE, &supported);
+ assert_eq(ret, MEDIA_CONTROLLER_ERROR_INVALID_PARAMETER);
+
+ ret = mc_client_get_server_ability_support(g_mc_client, g_mc_server_name, MC_ABILITY_SHUFFLE, NULL);
+ assert_eq(ret, MEDIA_CONTROLLER_ERROR_INVALID_PARAMETER);
+
+ ret = mc_client_get_server_ability_support(g_mc_client, g_mc_server_name, -1, NULL);
+ assert_eq(ret, MEDIA_CONTROLLER_ERROR_INVALID_PARAMETER);
+
+ return 0;
}
/**
*/
int utc_mc_client_foreach_server_n(void)
{
- assert_eq(startup_ret, MEDIA_CONTROLLER_ERROR_NONE);
+ assert_eq(startup_ret, MEDIA_CONTROLLER_ERROR_NONE);
- int ret = MEDIA_CONTROLLER_ERROR_NONE;
+ int ret = MEDIA_CONTROLLER_ERROR_NONE;
- ret = mc_client_foreach_server(NULL, _mc_activated_server_cb, NULL);
- assert_eq(ret, MEDIA_CONTROLLER_ERROR_INVALID_PARAMETER);
+ ret = mc_client_foreach_server(NULL, _mc_activated_server_cb, NULL);
+ assert_eq(ret, MEDIA_CONTROLLER_ERROR_INVALID_PARAMETER);
- ret = mc_client_foreach_server(g_mc_client, NULL, NULL);
- assert_eq(ret, MEDIA_CONTROLLER_ERROR_INVALID_PARAMETER);
+ ret = mc_client_foreach_server(g_mc_client, NULL, NULL);
+ assert_eq(ret, MEDIA_CONTROLLER_ERROR_INVALID_PARAMETER);
- return 0;
+ return 0;
}
/**
*/
int utc_mc_client_send_playback_action_cmd_n(void)
{
- assert_eq(startup_ret, MEDIA_CONTROLLER_ERROR_NONE);
+ assert_eq(startup_ret, MEDIA_CONTROLLER_ERROR_NONE);
- int ret = MEDIA_CONTROLLER_ERROR_NONE;
- mc_playback_action_e playback_action = MC_PLAYBACK_ACTION_STOP;
+ int ret = MEDIA_CONTROLLER_ERROR_NONE;
+ mc_playback_action_e playback_action = MC_PLAYBACK_ACTION_STOP;
- ret = mc_client_get_latest_server_info(g_mc_client, &g_mc_server_name, &g_mc_server_state);
- assert_eq(ret, MEDIA_CONTROLLER_ERROR_NONE);
+ ret = mc_client_get_latest_server_info(g_mc_client, &g_mc_server_name, &g_mc_server_state);
+ assert_eq(ret, MEDIA_CONTROLLER_ERROR_NONE);
- ret = mc_client_send_playback_action_cmd(NULL, g_mc_server_name, playback_action, &g_request_id);
- assert_eq(ret, MEDIA_CONTROLLER_ERROR_INVALID_PARAMETER);
+ ret = mc_client_send_playback_action_cmd(NULL, g_mc_server_name, playback_action, &g_request_id);
+ assert_eq(ret, MEDIA_CONTROLLER_ERROR_INVALID_PARAMETER);
- ret = mc_client_send_playback_action_cmd(g_mc_client, NULL, playback_action, &g_request_id);
- assert_eq(ret, MEDIA_CONTROLLER_ERROR_INVALID_PARAMETER);
+ ret = mc_client_send_playback_action_cmd(g_mc_client, NULL, playback_action, &g_request_id);
+ assert_eq(ret, MEDIA_CONTROLLER_ERROR_INVALID_PARAMETER);
- ret = mc_client_send_playback_action_cmd(g_mc_client, g_mc_server_name, MC_PLAYBACK_ACTION_PLAY-1, &g_request_id);
- assert_eq(ret, MEDIA_CONTROLLER_ERROR_INVALID_PARAMETER);
+ ret = mc_client_send_playback_action_cmd(g_mc_client, g_mc_server_name, MC_PLAYBACK_ACTION_PLAY-1, &g_request_id);
+ assert_eq(ret, MEDIA_CONTROLLER_ERROR_INVALID_PARAMETER);
- return 0;
+ return 0;
}
/**
int ret = MEDIA_CONTROLLER_ERROR_NONE;
+ ret = __mc_server_set_ability(g_mc_test_ability);
+ assert_eq(ret, MEDIA_CONTROLLER_ERROR_NONE);
+
ret = mc_server_set_playback_position_cmd_received_cb(g_mc_server, _mc_server_playback_position_cmd_received_cb, &g_request_id);
assert_eq(ret, MEDIA_CONTROLLER_ERROR_NONE);
*/
int utc_mc_client_send_playback_position_cmd_n(void)
{
- assert_eq(startup_ret, MEDIA_CONTROLLER_ERROR_NONE);
+ assert_eq(startup_ret, MEDIA_CONTROLLER_ERROR_NONE);
- int ret = MEDIA_CONTROLLER_ERROR_NONE;
+ int ret = MEDIA_CONTROLLER_ERROR_NONE;
- ret = mc_client_get_latest_server_info(g_mc_client, &g_mc_server_name, &g_mc_server_state);
- assert_eq(ret, MEDIA_CONTROLLER_ERROR_NONE);
+ ret = mc_client_get_latest_server_info(g_mc_client, &g_mc_server_name, &g_mc_server_state);
+ assert_eq(ret, MEDIA_CONTROLLER_ERROR_NONE);
- ret = mc_client_send_playback_position_cmd(NULL, g_mc_server_name, g_mc_test_playback_position, &g_request_id);
- assert_eq(ret, MEDIA_CONTROLLER_ERROR_INVALID_PARAMETER);
+ ret = mc_client_send_playback_position_cmd(NULL, g_mc_server_name, g_mc_test_playback_position, &g_request_id);
+ assert_eq(ret, MEDIA_CONTROLLER_ERROR_INVALID_PARAMETER);
- ret = mc_client_send_playback_position_cmd(g_mc_client, NULL, g_mc_test_playback_position, &g_request_id);
- assert_eq(ret, MEDIA_CONTROLLER_ERROR_INVALID_PARAMETER);
+ ret = mc_client_send_playback_position_cmd(g_mc_client, NULL, g_mc_test_playback_position, &g_request_id);
+ assert_eq(ret, MEDIA_CONTROLLER_ERROR_INVALID_PARAMETER);
- return 0;
+ ret = mc_client_send_playback_position_cmd(g_mc_client, g_mc_server_name, g_mc_test_playback_position, &g_request_id);
+ assert_eq(ret, MEDIA_CONTROLLER_ERROR_ABILITY_LIMITED_BY_SERVER_APP);
+
+ return 0;
}
/**
int ret = MEDIA_CONTROLLER_ERROR_NONE;
+ ret = __mc_server_set_ability(g_mc_test_ability);
+ assert_eq(ret, MEDIA_CONTROLLER_ERROR_NONE);
+
ret = mc_server_set_shuffle_mode_cmd_received_cb(g_mc_server, _mc_server_shuffle_mode_cmd_received_cb, &g_request_id);
assert_eq(ret, MEDIA_CONTROLLER_ERROR_NONE);
*/
int utc_mc_client_send_shuffle_mode_cmd_n(void)
{
- assert_eq(startup_ret, MEDIA_CONTROLLER_ERROR_NONE);
+ assert_eq(startup_ret, MEDIA_CONTROLLER_ERROR_NONE);
- int ret = MEDIA_CONTROLLER_ERROR_NONE;
+ int ret = MEDIA_CONTROLLER_ERROR_NONE;
- ret = mc_client_get_latest_server_info(g_mc_client, &g_mc_server_name, &g_mc_server_state);
- assert_eq(ret, MEDIA_CONTROLLER_ERROR_NONE);
+ ret = mc_client_get_latest_server_info(g_mc_client, &g_mc_server_name, &g_mc_server_state);
+ assert_eq(ret, MEDIA_CONTROLLER_ERROR_NONE);
- ret = mc_client_send_shuffle_mode_cmd(NULL, g_mc_server_name, g_mc_test_shuffle_mode, &g_request_id);
- assert_eq(ret, MEDIA_CONTROLLER_ERROR_INVALID_PARAMETER);
+ ret = mc_client_send_shuffle_mode_cmd(NULL, g_mc_server_name, g_mc_test_shuffle_mode, &g_request_id);
+ assert_eq(ret, MEDIA_CONTROLLER_ERROR_INVALID_PARAMETER);
- ret = mc_client_send_shuffle_mode_cmd(g_mc_client, NULL, g_mc_test_shuffle_mode, &g_request_id);
- assert_eq(ret, MEDIA_CONTROLLER_ERROR_INVALID_PARAMETER);
+ ret = mc_client_send_shuffle_mode_cmd(g_mc_client, NULL, g_mc_test_shuffle_mode, &g_request_id);
+ assert_eq(ret, MEDIA_CONTROLLER_ERROR_INVALID_PARAMETER);
- ret = mc_client_send_shuffle_mode_cmd(g_mc_client, g_mc_server_name, -1, &g_request_id);
- assert_eq(ret, MEDIA_CONTROLLER_ERROR_INVALID_PARAMETER);
+ ret = mc_client_send_shuffle_mode_cmd(g_mc_client, g_mc_server_name, -1, &g_request_id);
+ assert_eq(ret, MEDIA_CONTROLLER_ERROR_INVALID_PARAMETER);
- return 0;
+ ret = mc_client_send_shuffle_mode_cmd(g_mc_client, g_mc_server_name, MC_SHUFFLE_MODE_OFF, &g_request_id);
+ assert_eq(ret, MEDIA_CONTROLLER_ERROR_ABILITY_LIMITED_BY_SERVER_APP);
+
+ return 0;
}
/**
int ret = MEDIA_CONTROLLER_ERROR_NONE;
+ ret = __mc_server_set_ability(g_mc_test_ability);
+ assert_eq(ret, MEDIA_CONTROLLER_ERROR_NONE);
+
ret = mc_server_set_repeat_mode_cmd_received_cb(g_mc_server, _mc_server_repeat_mode_cmd_received_cb, &g_request_id);
assert_eq(ret, MEDIA_CONTROLLER_ERROR_NONE);
*/
int utc_mc_client_send_repeat_mode_cmd_n(void)
{
- assert_eq(startup_ret, MEDIA_CONTROLLER_ERROR_NONE);
+ assert_eq(startup_ret, MEDIA_CONTROLLER_ERROR_NONE);
- int ret = MEDIA_CONTROLLER_ERROR_NONE;
+ int ret = MEDIA_CONTROLLER_ERROR_NONE;
- ret = mc_client_get_latest_server_info(g_mc_client, &g_mc_server_name, &g_mc_server_state);
- assert_eq(ret, MEDIA_CONTROLLER_ERROR_NONE);
+ ret = mc_client_get_latest_server_info(g_mc_client, &g_mc_server_name, &g_mc_server_state);
+ assert_eq(ret, MEDIA_CONTROLLER_ERROR_NONE);
- ret = mc_client_send_repeat_mode_cmd(NULL, g_mc_server_name, g_mc_test_repeat_mode, &g_request_id);
- assert_eq(ret, MEDIA_CONTROLLER_ERROR_INVALID_PARAMETER);
+ ret = mc_client_send_repeat_mode_cmd(NULL, g_mc_server_name, g_mc_test_repeat_mode, &g_request_id);
+ assert_eq(ret, MEDIA_CONTROLLER_ERROR_INVALID_PARAMETER);
- ret = mc_client_send_repeat_mode_cmd(g_mc_client, NULL, g_mc_test_repeat_mode, &g_request_id);
- assert_eq(ret, MEDIA_CONTROLLER_ERROR_INVALID_PARAMETER);
+ ret = mc_client_send_repeat_mode_cmd(g_mc_client, NULL, g_mc_test_repeat_mode, &g_request_id);
+ assert_eq(ret, MEDIA_CONTROLLER_ERROR_INVALID_PARAMETER);
- ret = mc_client_send_repeat_mode_cmd(g_mc_client, g_mc_server_name, -1, &g_request_id);
- assert_eq(ret, MEDIA_CONTROLLER_ERROR_INVALID_PARAMETER);
+ ret = mc_client_send_repeat_mode_cmd(g_mc_client, g_mc_server_name, -1, &g_request_id);
+ assert_eq(ret, MEDIA_CONTROLLER_ERROR_INVALID_PARAMETER);
- return 0;
+ ret = mc_client_send_repeat_mode_cmd(g_mc_client, g_mc_server_name, MC_REPEAT_MODE_ONE_MEDIA, &g_request_id);
+ assert_eq(ret, MEDIA_CONTROLLER_ERROR_ABILITY_LIMITED_BY_SERVER_APP);
+
+ return 0;
}
/**
int ret = MEDIA_CONTROLLER_ERROR_NONE;
+ ret = __mc_server_set_ability(g_mc_test_ability);
+ assert_eq(ret, MEDIA_CONTROLLER_ERROR_NONE);
+
ret = mc_server_set_playlist_cmd_received_cb(g_mc_server, _mc_server_playlist_cmd_received_cb, &g_request_id);
assert_eq(ret, MEDIA_CONTROLLER_ERROR_NONE);
ret = mc_client_send_playlist_cmd(g_mc_client, g_mc_server_name, NULL, g_mc_test_playlist_index, -1, g_mc_test_playback_position, &g_request_id);
assert_eq(ret, MEDIA_CONTROLLER_ERROR_INVALID_PARAMETER);
+ ret = mc_client_send_playlist_cmd(g_mc_client, g_mc_server_name, g_mc_test_playlist_name, g_mc_test_playlist_index, g_mc_test_playback_action, g_mc_test_playback_position, &g_request_id);
+ assert_eq(ret, MEDIA_CONTROLLER_ERROR_ABILITY_LIMITED_BY_SERVER_APP);
+
return 0;
}
int ret = MEDIA_CONTROLLER_ERROR_NONE;
+ ret = __mc_server_set_ability(g_mc_test_ability);
+ assert_eq(ret, MEDIA_CONTROLLER_ERROR_NONE);
+
ret = mc_server_set_custom_cmd_received_cb(g_mc_server, _mc_server_custom_cmd_received_cb, NULL);
assert_eq(ret, MEDIA_CONTROLLER_ERROR_NONE);
ret = mc_client_send_custom_cmd(g_mc_client, NULL, g_mc_test_cmd, NULL, &g_request_id);
assert_eq(ret, MEDIA_CONTROLLER_ERROR_INVALID_PARAMETER);
+ ret = mc_client_send_custom_cmd(g_mc_client, g_mc_server_name, g_mc_test_cmd, NULL, &g_request_id);
+ assert_eq(ret, MEDIA_CONTROLLER_ERROR_ABILITY_LIMITED_BY_SERVER_APP);
+
return 0;
}
mc_search_h get_search = NULL;
gboolean cb_result = FALSE;
- ret = mc_server_set_search_cmd_received_cb(g_mc_server, _mc_server_search_cmd_received_cb, &get_search);
- assert_eq(ret, MEDIA_CONTROLLER_ERROR_NONE);
+ ret = __mc_server_set_ability(g_mc_test_ability);
+ assert_eq(ret, MEDIA_CONTROLLER_ERROR_NONE);
+
+ ret = mc_server_set_search_cmd_received_cb(g_mc_server, _mc_server_search_cmd_received_cb, &get_search);
+ assert_eq(ret, MEDIA_CONTROLLER_ERROR_NONE);
ret = mc_client_get_latest_server_info(g_mc_client, &g_mc_server_name, &g_mc_server_state);
assert_eq(ret, MEDIA_CONTROLLER_ERROR_NONE);
assert_eq(ret, MEDIA_CONTROLLER_ERROR_INVALID_PARAMETER);
ret = mc_client_send_search_cmd(g_mc_client, g_mc_server_name, NULL, NULL);
- assert_eq(ret, MEDIA_CONTROLLER_ERROR_INVALID_PARAMETER);
+ assert_eq(ret, MEDIA_CONTROLLER_ERROR_ABILITY_LIMITED_BY_SERVER_APP);
ret = mc_search_destroy(g_mc_search);
assert_eq(ret, MEDIA_CONTROLLER_ERROR_NONE);
ret = mc_client_subscribe(g_mc_client, MC_SUBSCRIPTION_TYPE_SERVER_STATE, g_mc_server_name);
assert_eq(ret, MEDIA_CONTROLLER_ERROR_NONE);
+ ret = mc_client_set_ability_support_updated_cb(g_mc_client, _mc_ability_updated_cb, NULL);
+ assert_eq(ret, MEDIA_CONTROLLER_ERROR_NONE);
+
+ ret = mc_client_subscribe(g_mc_client, MC_SUBSCRIPTION_TYPE_ABILITY_SUPPORT, g_mc_server_name);
+ assert_eq(ret, MEDIA_CONTROLLER_ERROR_NONE);
+
return 0;
}
ret = mc_client_foreach_server_subscribed(g_mc_client, MC_SUBSCRIPTION_TYPE_PLAYBACK, NULL, NULL);
assert_eq(ret, MEDIA_CONTROLLER_ERROR_INVALID_PARAMETER);
- return 0;
+ return 0;
}
/**
*/
int utc_mc_client_send_event_reply_p(void)
{
- assert_eq(startup_ret, MEDIA_CONTROLLER_ERROR_NONE);
+ assert_eq(startup_ret, MEDIA_CONTROLLER_ERROR_NONE);
- int ret = MEDIA_CONTROLLER_ERROR_NONE;
+ int ret = MEDIA_CONTROLLER_ERROR_NONE;
ret = mc_client_set_custom_event_received_cb(g_mc_client, _mc_custom_event_received_cb, &g_mc_custom_data);
assert_eq(ret, MEDIA_CONTROLLER_ERROR_NONE);
- ret = mc_server_set_event_reply_received_cb(g_mc_server, _mc_server_event_reply_received_cb, &g_mc_reply_data);
- assert_eq(ret, MEDIA_CONTROLLER_ERROR_NONE);
+ ret = mc_server_set_event_reply_received_cb(g_mc_server, _mc_server_event_reply_received_cb, &g_mc_reply_data);
+ assert_eq(ret, MEDIA_CONTROLLER_ERROR_NONE);
ret = mc_server_foreach_client(g_mc_server, _mc_activated_client_cb, &g_mc_client_name);
assert_eq(ret, MEDIA_CONTROLLER_ERROR_NONE);
assert_eq(strcmp(g_mc_custom_data.name, g_mc_test_appname), 0);
assert_eq(strcmp(g_mc_custom_data.request_id, g_request_id), 0);
- ret = mc_client_send_event_reply(g_mc_client, g_mc_custom_data.name, g_mc_custom_data.request_id, g_mc_test_reply_result, NULL);
- assert_eq(ret, MEDIA_CONTROLLER_ERROR_NONE);
+ ret = mc_client_send_event_reply(g_mc_client, g_mc_custom_data.name, g_mc_custom_data.request_id, g_mc_test_reply_result, NULL);
+ assert_eq(ret, MEDIA_CONTROLLER_ERROR_NONE);
assert_eq(WAIT_CALLBACK_RESULT, TRUE);
assert_eq(g_mc_reply_data.result, TRUE);
assert_eq(strcmp(g_mc_reply_data.name, g_mc_test_appname), 0);
assert_eq(strcmp(g_mc_reply_data.request_id, g_request_id), 0);
- return 0;
+ return 0;
}
/**
*/
int utc_mc_client_send_event_reply_n(void)
{
- assert_eq(startup_ret, MEDIA_CONTROLLER_ERROR_NONE);
+ assert_eq(startup_ret, MEDIA_CONTROLLER_ERROR_NONE);
- int ret = MEDIA_CONTROLLER_ERROR_NONE;
+ int ret = MEDIA_CONTROLLER_ERROR_NONE;
- ret = mc_client_send_event_reply(NULL, g_mc_test_appname, g_request_id, 0, NULL);
- assert_eq(ret, MEDIA_CONTROLLER_ERROR_INVALID_PARAMETER);
+ ret = mc_client_send_event_reply(NULL, g_mc_test_appname, g_request_id, 0, NULL);
+ assert_eq(ret, MEDIA_CONTROLLER_ERROR_INVALID_PARAMETER);
- ret = mc_client_send_event_reply(g_mc_client, NULL, g_request_id, 0, NULL);
- assert_eq(ret, MEDIA_CONTROLLER_ERROR_INVALID_PARAMETER);
+ ret = mc_client_send_event_reply(g_mc_client, NULL, g_request_id, 0, NULL);
+ assert_eq(ret, MEDIA_CONTROLLER_ERROR_INVALID_PARAMETER);
- ret = mc_client_send_event_reply(g_mc_client, g_mc_test_appname, NULL, 0, NULL);
- assert_eq(ret, MEDIA_CONTROLLER_ERROR_INVALID_PARAMETER);
+ ret = mc_client_send_event_reply(g_mc_client, g_mc_test_appname, NULL, 0, NULL);
+ assert_eq(ret, MEDIA_CONTROLLER_ERROR_INVALID_PARAMETER);
- return 0;
+ return 0;
}
/**