}
/**
- * @testcase utc_mc_client_destroy_playback_p
- * @since_tizen 2.4
- * @description Positive test case of mc_client_destroy_playback()
+ * @testcase utc_mc_client_get_playlist_item_index_p
+ * @since_tizen 4.0
+ * @description Positive test case of mc_client_get_playlist_item_index()
*/
-int utc_mc_client_destroy_playback_p(void)
+int utc_mc_client_get_playlist_item_index_p(void)
+{
+ assert_eq(startup_ret, MEDIA_CONTROLLER_ERROR_NONE);
+
+ int ret = MEDIA_CONTROLLER_ERROR_NONE;
+ mc_playback_h playback_info = 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_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_index(playback_info, &index);
+ assert_eq(ret, MEDIA_CONTROLLER_ERROR_NONE);
+ assert_eq(strcmp(index, "3"), 0);
+
+ if (index != NULL)
+ free(index);
+
+ ret = mc_client_destroy_playback(playback_info);
+ assert_eq(ret, MEDIA_CONTROLLER_ERROR_NONE);
+
+ return 0;
+}
+
+/**
+ * @testcase utc_mc_client_get_playlist_item_index_n
+ * @since_tizen 4.0
+ * @description Negative test case of mc_client_get_playlist_item_index()
+ */
+int utc_mc_client_get_playlist_item_index_n(void)
+{
+ assert_eq(startup_ret, MEDIA_CONTROLLER_ERROR_NONE);
+
+ int ret = MEDIA_CONTROLLER_ERROR_NONE;
+ mc_playback_h playback_info = 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_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_index(NULL, &index);
+ assert_eq(ret, MEDIA_CONTROLLER_ERROR_INVALID_PARAMETER);
+
+ ret = mc_client_get_playlist_item_index(playback_info, NULL);
+ assert_eq(ret, MEDIA_CONTROLLER_ERROR_INVALID_PARAMETER);
+
+ ret = mc_client_destroy_playback(playback_info);
+ assert_eq(ret, MEDIA_CONTROLLER_ERROR_NONE);
+
+ return 0;
+}
+
++/**
++ * @testcase utc_mc_client_get_playlist_item_info_p
++ * @since_tizen 5.0
++ * @description Positive test case of mc_client_get_playlist_item_info()
++ */
++int utc_mc_client_get_playlist_item_info_p(void)
++{
++ assert_eq(startup_ret, MEDIA_CONTROLLER_ERROR_NONE);
++
++ 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_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(playback_info, &playlist_name, &index);
++ assert_eq(ret, MEDIA_CONTROLLER_ERROR_NONE);
++ assert_eq(strcmp(playlist_name, g_playlist_name), 0);
++ assert_eq(strcmp(index, "3"), 0);
++
++ if (index != NULL)
++ free(index);
++
++ ret = mc_client_destroy_playback(playback_info);
++ assert_eq(ret, MEDIA_CONTROLLER_ERROR_NONE);
++
++ return 0;
++}
++
++/**
++ * @testcase utc_mc_client_get_playlist_item_info_n
++ * @since_tizen 5.0
++ * @description Negative test case of mc_client_get_playlist_item_info()
++ */
++int utc_mc_client_get_playlist_item_info_n(void)
++{
++ assert_eq(startup_ret, MEDIA_CONTROLLER_ERROR_NONE);
++
++ 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_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(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_destroy_playback(playback_info);
++ assert_eq(ret, MEDIA_CONTROLLER_ERROR_NONE);
++
++ return 0;
++}
++
+/**
+ * @testcase utc_mc_client_destroy_playback_p
+ * @since_tizen 2.4
+ * @description Positive test case of mc_client_destroy_playback()
+ */
+int utc_mc_client_destroy_playback_p(void)
{
assert_eq(startup_ret, MEDIA_CONTROLLER_ERROR_NONE);